diff --git a/LICENSE b/LICENSE old mode 100755 new mode 100644 index 4a459866a57c25462afad17f3fe0b50d440da080..4947287f7b5ccb5d1e8b7b2d3aa5d89f322c160d --- a/LICENSE +++ b/LICENSE @@ -1,177 +1,177 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + END OF TERMS AND CONDITIONS \ No newline at end of file diff --git "a/OpenHarmony\345\274\200\346\272\220\351\241\271\347\233\256.md" "b/OpenHarmony\345\274\200\346\272\220\351\241\271\347\233\256.md" new file mode 100644 index 0000000000000000000000000000000000000000..6140862d413ea5a82517e7bf6ba1248885304ef6 --- /dev/null +++ "b/OpenHarmony\345\274\200\346\272\220\351\241\271\347\233\256.md" @@ -0,0 +1,335 @@ +# OpenHarmony开源项目 + +## 项目介绍 + +OpenHarmony是开放原子开源基金会(OpenAtom Foundation)旗下开源项目,定位是一款面向全场景的开源分布式操作系统。 + +OpenHarmony在传统的单设备系统能力的基础上,创造性地提出了基于同一套系统能力、适配多种终端形态的理念,支持多种终端设备上运行,第一个版本支持128K\~128M设备上运行,欢迎参加开源社区一起持续演进。针对设备开发者,OpenHarmony采用了组件化的设计方案,可以根据设备的资源能力和业务特征进行灵活裁剪,满足不同形态的终端设备对于操作系统的要求。可运行在百K级别的资源受限设备和穿戴类设备,也可运行在百M级别的智能家用摄像头/行车记录仪等相对资源丰富的设备。 + +## 技术架构 + +OpenHarmony整体遵从分层设计,从下向上依次为:内核层、系统服务层、框架层和应用层。系统功能按照“系统 \> 子系统 \> 功能/模块”逐级展开,在多设备部署场景下,支持根据实际需求裁剪某些非必要的子系统或功能/模块。OpenHarmony技术架构如下所示。 + +![](zh-cn/readme/figures/1.png) + +**内核层** + +- 内核子系统:采用多内核(Linux内核或者LiteOS)设计,支持针对不同资源受限设备选用适合的OS内核。内核抽象层(KAL,Kernel Abstract Layer)通过屏蔽多内核差异,对上层提供基础的内核能力,包括进程/线程管理、内存管理、文件系统、网络管理和外设管理等。 + +- 驱动子系统:驱动框架(HDF)是系统硬件生态开放的基础,提供统一外设访问能力和驱动开发、管理框架。 + + +**系统服务层** + +系统服务层是OpenHarmony的核心能力集合,通过框架层对应用程序提供服务。该层包含以下几个部分: + +- 系统基本能力子系统集:为分布式应用在多设备上的运行、调度、迁移等操作提供了基础能力,由分布式软总线、分布式数据管理、分布式任务调度、公共基础库、多模输入、图形、安全、AI等子系统组成。 + +- 基础软件服务子系统集:提供公共的、通用的软件服务,由事件通知、电话、多媒体、DFX(Design For X) 等子系统组成。 + +- 增强软件服务子系统集:提供针对不同设备的、差异化的能力增强型软件服务,由智慧屏专有业务、穿戴专有业务、IoT专有业务等子系统组成。 + +- 硬件服务子系统集:提供硬件服务,由位置服务、生物特征识别、穿戴专有硬件服务、IoT专有硬件服务等子系统组成。 + + +根据不同设备形态的部署环境,基础软件服务子系统集、增强软件服务子系统集、硬件服务子系统集内部可以按子系统粒度裁剪,每个子系统内部又可以按功能粒度裁剪。 + +**框架层** + +框架层为应用开发提供了Java/C/C++/JS等多语言的用户程序框架和Ability框架,两种UI框架(包括适用于Java语言的Java UI框架、适用于JS语言的JS UI框架),以及各种软硬件服务对外开放的多语言框架API。根据系统的组件化裁剪程度,设备支持的API也会有所不同。 + +**应用层** + +应用层包括系统应用和第三方非系统应用。应用由一个或多个FA(Feature Ability)或PA(Particle Ability)组成。其中,FA有UI界面,提供与用户交互的能力;而PA无UI界面,提供后台运行任务的能力以及统一的数据访问抽象。基于FA/PA开发的应用,能够实现特定的业务功能,支持跨设备调度与分发,为用户提供一致、高效的应用体验。 + +## 特点 + +1. 硬件互助,资源共享 + + 主要通过下列模块达成 + + - 分布式软总线 + + 分布式软总线是多设备终端的统一基座,为“[1+8+N](zh-cn_topic_0000000000029587.md#li7594174334311)”设备的无缝互联提供了统一的分布式通信能力,能够快速发现并连接设备,高效地传输任务和数据。 + + + - 分布式数据管理 + + 分布式数据管理位于基于分布式软总线之上的能力,实现了应用程序数据和用户数据的分布式管理。用户数据不再与单一物理设备绑定,业务逻辑与数据存储分离,应用跨设备运行时数据无缝衔接,为打造一致、流畅的用户体验创造了基础条件 + + + - 分布式任务调度 + + 分布式任务调度基于分布式软总线、分布式数据管理、分布式Profile等技术特性,构建统一的分布式服务管理(发现、同步、注册、调用)机制,支持对跨设备的应用进行远程启动、远程调用、绑定/解绑、以及迁移等操作,能够根据不同设备的能力、位置、业务运行状态、资源使用情况并结合用户的习惯和意图,选择最合适的设备运行分布式任务 + + + - 设备虚拟化 + + 分布式设备虚拟化平台可以实现不同设备的资源融合、设备管理、数据处理,将周边设备作为手机能力的延伸,共同形成一个超级虚拟终端。 + + +2. 一次开发,多端部署 + + OpenHarmony提供用户程序框架、Ability框架以及UI框架,能够保证开发的应用在多终端运行时保证一致性。一次开发、多端部署。 + + 多终端软件平台API具备一致性,确保用户程序的运行兼容性。 + + - 支持在开发过程中预览终端的能力适配情况(CPU/内存/外设/软件资源等)。 + - 支持根据用户程序与软件平台的兼容性来调度用户呈现。 + +3. 统一OS,弹性部署 + + OpenHarmony通过组件化和组件弹性化等设计方法,做到硬件资源的可大可小,在多种终端设备间,按需弹性部署,全面覆盖了ARM、RISC-V、x86等各种CPU,从百KB到GB级别的RAM。 + + +## **设备类型** + +OpenHarmony支持如下几种设备类型: + +- **轻量系统类设备(参考内存≥128KB)** + + 面向MCU类处理器,例如Arm Cortex-M、RISC-V 32位的设备,资源极其有限,参考内存≥128KB,提供丰富的近距连接能力以及丰富的外设总线访问能力。典型产品有智能家居领域的联接类模组、传感器设备等。联接类模组通常应用在智能物联网设备中,负责实现联接部分的硬件模块,在智能家居领域由厂家集成到其设备中。例如:联接类模组提供WLAN/Bluetooth的接入和数据的联接,模组与厂家家居的芯片通常通过UART或GPIO等总线接口进行通信。 + +- **小型系统类设备(参考内存≥1MB)** + + 面向应用处理器,例如Arm Cortex-A的设备,参考内存≥1MB,提供更高的安全能力,提供标准的图形框架,提供视频编解码的多媒体能力。典型产品有智能家居领域的IPCamera、电子猫眼、路由器以及智慧出行域的行车记录仪等。 + + +- **标准系统类设备(参考内存≥128MB)** + + 面向应用处理器,例如Arm Cortex-A的设备,参考内存≥128MB,提供增强的交互能力,提供3D GPU以及硬件合成能力,提供更多控件以及动效更丰富的图形能力,提供完整的应用框架。典型产品有高端的冰箱显示屏等。 + +- **大型系统类设备(参考内存≥1GB)** + + 面向应用处理器,例如Arm Cortex-A的设备,参考内存≥1GB,提供完整的兼容应用框架。典型的产品有智慧屏、智能手表等。 + + +## 详细特征 + +入口:[https://gitee.com/openharmony/docs/tree/master/readme](https://gitee.com/openharmony/docs/tree/master/readme) + +\*本次开源部分主要支持百K级,百M级设备,以下内容主要介绍涉及到的相关子系统内容。 + +**表 1** 子系统 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

系 统

+

简 介

+

链 接

+

JS应用开发框架

+

作为JS应用开发框架的轻量实现,提供一套跨平台的类web应用开发框架,通过Toolkit将开发者编写的HTML、CSS和JS 文件编译打包成JS Bundle,然后再将JS Bundle解析运行成C++ UIKit的View 组件进行渲染。通过支持三方开发者使用声明式的API进行应用开发,以数据驱动视图变化,避免了大量的视图操作,大大降低了应用开发难度,提升开发者开发体验。

+

README

+

DFX

+

针对不同硬件架构和资源提供组件化且可定制的DFX框架。根据RISC-V、Cortex-M、Cortex-A不同硬件平台,提供两种不同的轻量级DFX框架。

+

README

+

XTS认证

+

XTS是OpenHarmony生态认证测试套件的集合,当前包括acts(application compatibility test suite)应用兼容性测试套,后续会拓展dcts(device compatibility test suite)设备兼容性测试套等。

+

README

+

全球化

+

全球化资源管理子系统主要提供语言资源回溯和多偏好语言支持的能力,包括多语言资源回溯和多偏好语言支持。

+

README

+

公共基础

+

公共基础库存放OpenHarmony通用的基础组件。这些基础组件可被OpenHarmony各业务子系统及上层应用所使用。

+

README

+

内核

+

OpenHarmony内核是面向IoT领域的实时操作系统内核,它具备类似RTOS般轻快和Linux般易用的特点。包括功能组件部分:进程和线程调度、内存管理、IPC机制、timer管理等操作系统基础组件。

+

README

+

分布式任务调度

+

分布式任务调度模块负责跨设备组件管理,提供访问和控制远程组件的能力,支持分布式场景下的应用协同。

+

README

+

分布式通信

+

实现近场设备间统一的分布式通信能力管理,提供不区分链路的设备发现和传输接口。包含服务发布、数据传输、安全等功能

+

README

+

启动恢复

+

启动恢复负责在内核启动之后,应用启动之前的操作系统中间层的启动。支持使用LiteOS-A内核的平台,当前包括:Hi3516DV300平台和Hi3518EV300平台。

+

README

+

图形

+

主要包括UI组件、布局、动画、字体、输入事件、窗口管理、渲染绘制等模块,构建基于轻量OS的应用框架,满足硬件资源较小的物联网设备的OpenHarmony系统应用开发。

+

README

+

媒体

+

为多媒体应用开发者提供统一的开发接口,使得开发者可以专注于应用业务的开发,轻松使用多媒体的资源。

+

README

+

安全

+

主要提供样例给开发者展示如何去使用已有的安全机制来提升系统的安全能力,包括安全启动、应用权限管理、IPC通信鉴权、HUKS、HiChain、应用签名验签。

+

README

+

测试

+

开发过程采用测试驱动开发模式,开发者基于系统新增特性可以通过开发者自己开发用例保证,对于系统已有特性的修改,也可通过修改项目中原有自测试用例保证,旨在帮助开发者在开发阶段就能开发出高质量代码。

+

README

+

用户程序框架

+

包含两个模块:Ability子系统和包管理子系统。Ability子系统,是OpenHarmony为开发者提供的一套开发OpenHarmony应用的开发框架。包管理子系统,是OpenHarmony为开发者提供的安装包管理框架。

+

README

+

AI子系统

+

AI业务子系统是提供原生的分布式AI能力的子系统,提供了统一的AI引擎框架,实现算法能力快速插件化集成。框架中主要包含插件管理、模块管理和通信管理等模块,对AI算法能力进行生命周期管理和按需部署。后续,会逐步定义统一的AI能力接口,便于AI能力的分布式调用。同时,提供适配不同推理框架层级的统一推理接口。

+

README

+

泛Sensor

+

泛Sensor中包含传感器和小器件,传感器用于侦测环境中所发生事件或变化,并将此消息发送至其他电子设备,小器件用于向外传递信号的设备,包括马达和LED灯,对开发者提供控制马达振动和LED灯开关的能力。

+

README

+

电源管理

+

电源管理子系统主要提供了电池、充放电状态查询能力和系统电源管理服务能力,目前主要包括电量查询和亮灭屏控制锁的能力。

+

README

+

升级服务

+

升级服务是提供设备远程升级的能力,可以让你的设备轻松支持OTA升级能力。目前仅支持全量包升级方式,全量包是将新系统全部内容做成升级包,进行升级。

+

README

+

编译构建

+

编译构建提供了一个在GN与ninja基础上的编译构建框架。支持以下功能:1.构建不同芯片平台的产品。如:Hi3518EV300平台的ipcamera产品,Hi3516DV300平台的ipcamera产品,Hi3861平台的WLAN模组产品。2.构建HPM包管理配置生成的自定义产品。

+

README

+

驱动

+

OpenHarmony驱动子系统采用C面向对象编程模型构建,通过平台解耦、内核解耦,兼容不同内核,提供了归一化的驱动平台底座,旨在为开发者提供更精准、更高效的开发环境,力求做到一次开发,多系统部署。

+

README

+
+ +## 快速入门 + +入口:[https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/Readme-CN.md](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/Readme-CN.md) + +**表 2** 快速入门 + + + + + + + + + + + + + + + + + + + + +

开发板类型

+

简述

+

链 接

+

Hi3861开发板

+

Hi3861 WLAN模组是一片大约2cm*5cm大小的开发板,是一款高度集成的2.4GHz WLAN SoC芯片,集成IEEE 802.11b/g/n基带和RF(Radio Frequency)电路。支持OpenHarmony/Huawei LiteOS和第三方组件。

+

快速入门

+

Hi3516开发板

+

Hi3516DV300作为新一代行业专用Smart HD IP摄像机SOC,集成新一代ISP、业界最新的H.265视频压缩编码器,同时集成高性能NNIE引擎。

+

快速入门

+

Hi3518开发板

+

Hi3518EV300作为新一代智慧视觉处理SOC,集成新一代ISP(Image Signal Processor)以及业界最新的H.265视频压缩编码器。

+

快速入门

+
+ +## 开发者文档 + +简体中文:[OpenHarmony开发者文档](Readme-zh-cn.md) + +English Version:[OpenHarmony Documentation](docs/Readme-en.md) + +## 源码下载 + +获取OpenHarmony源码:[下载说明](https://openharmony.gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/get-code/%E6%BA%90%E7%A0%81%E8%8E%B7%E5%8F%96.md) + +## 如何参与 + +参与社区:[社区介绍链接](https://gitee.com/openharmony/community/blob/master/README.md) + +参与贡献:[如何贡献链接](https://gitee.com/openharmony/docs/blob/master/zh-cn/contribute/%E5%8F%82%E4%B8%8E%E8%B4%A1%E7%8C%AE.md) + +## 许可协议 + +OpenHarmony是一种开源软件,参考各仓下LICENSE文本。 + +## 联系方式 + +网站: + +[https://openharmony.gitee.com](https://openharmony.gitee.com/) + +邮箱: + +contact@openharmony.io + diff --git a/Readme-CN.md b/Readme-CN.md deleted file mode 100755 index 9a0db53aff3625f7029455ba4cd3fcb9cb75df39..0000000000000000000000000000000000000000 --- a/Readme-CN.md +++ /dev/null @@ -1,32 +0,0 @@ -# OpenHarmony开发者文档 - -此工程存放OpenHarmony提供的快速入门、开发指南、API参考等开发者文档,欢迎参与OpenHarmony开发者文档开源项目,与我们一起完善开发者文档。 - -[View English](docs-en/Readme-EN.md) - -## 文档目录结构 - -- quick-start:[快速入门](quick-start/Readme-CN.md) -- get-code:[获取源码/获取工具](get-code/Readme-CN.md) -- docker:[Docker镜像构建](docker/README.md) -- kernel:[内核](kernel/Readme-CN.md) -- driver:[驱动](driver/Readme-CN.md) -- subsystems:[子系统](subsystems/Readme-CN.md) -- bundles:[组件开发](bundles/Readme-CN.md) -- porting:[三方库移植](porting/Readme-CN.md) -- guide:[设备开发](guide/Readme-CN.md) -- security:[安全](security/Readme-CN.md) -- api-LinkIoT:[联接类模组API](api/api-LinkIoT/Readme-CN.md) -- api-SmartVision-Devices:[智慧视觉设备API](api/api-SmartVision-Devices/Readme-CN.md) -- contribute:[贡献](contribute/参与贡献.md) -- term:[术语](term/术语.md) -- 3rd-Party-License:[第三方开源软件及许可证说明](quick-start/第三方开源软件及许可证说明.md) - -## 贡献 - -非常欢迎您贡献文档,我们鼓励开发者以各种方式参与文档反馈和贡献。 - -您可以对现有文档进行评价、简单更改、反馈文档质量问题、贡献您的原创内容,详细请参考[贡献文档](contribute/贡献文档.md)。 - -卓越贡献者将会在开发者社区文档贡献专栏表彰公示。 - diff --git a/Readme-en.md b/Readme-en.md new file mode 100644 index 0000000000000000000000000000000000000000..df5dd1186f6f2995846d8771a5919ee79d307b9a --- /dev/null +++ b/Readme-en.md @@ -0,0 +1,46 @@ +# WELCOME TO OPENHARMONY +OpenHarmony is an open-source project launched by the OpenAtom Foundation and serves as an open-source, distributed operating system that is intended to address all conceivable usage scenarios. OpenHarmony is an open-source version of HarmonyOS. +HarmonyOS is a future-proof distributed operating system open to you as part of the initiatives for the all-scenario strategy. It is adaptable to mobile office, fitness and health, social communication, entertainment, and many other scenarios. Unlike any legacy operating system that runs on a standalone device, HarmonyOS is built on a distributed architecture designed based on a set of system capabilities. It is able to run on a wide range of device forms, including smartphones, wearables, tablets, PCs, smart TVs, AI speakers, head units, earphones, and AR/VR glasses. + +## Motivation +Traditional OSs are limited to a specific type of device, while OpenHarmony provides distributed features that are compatible with a wide range of different devices. The first version supports devices with 128 KB to 128 MB of memory. Join us as we keep updating OpenHarmony versions. +For device developers, OpenHarmony utilizes a component-based design to tailor its features to better suit specific devices, based on each device's capabilities and service characteristics. OpenHarmony can run on devices with limited resources and wearables with hundreds of KB of memory, as well as more powerful devices, such as smart home cameras and dashcams with hundreds of MB of memory. + +[中文版本](Readme-zh-cn.md) + +## OpenHarmony Documentation +- [Getting Started](en/device-dev/quick-start/Readme-EN.md) +- [Source Code Acquisition/Tool Acquisition](en/device-dev/get-code/source-code-acquisition.md) +- [Kernel Usage Guidelines](en/device-dev/kernel/Readme-EN.md) +- [Driver Usage Guidelines](en/device-dev/driver/Readme-EN.md) +- [Subsystem Development Guidelines](en/device-dev/subsystems/Readme-EN.md) +- [Bundle Development Guidelines](en/device-dev/bundles/Readme-EN.md) +- [Device Development Guidelines](en/device-dev/guide/Readme-EN.md) +- [Third-Party Library Porting Guidelines](en/device-dev/porting/Readme-EN.md) +- [Privacy and Security](en/device-dev/security/Readme-EN.md) +- [Glossary](en/device-dev/glossary/glossary.md) + +## Start Contributing +OpenHarmony is an open-source community and encourages everyone in the community to submit patches directly to the project. You can contribute either to the code or documentation. +- [Contributing to the Code](en/contribute/contributing-code.md) +- [Contributing to the Documentation](en/contribute/documentation-contribution.md) + +For more details on how to contribute, see [Contributing Documents](en/contibute). +## Get Source Code and Tools +To download the source code and tools required for the project, click the following links: +- [Source Code Acquisition](en/device-dev/get-code/source-code-acquisition.md) +- [Tool Acquisition](en/device-dev/get-code/acquiring-tools.md) + +## Where to Turn for Help +You can subscribe to the mailing list to get constant updates on new features, released road maps, and community activities. For how to subscribe to the mailing list or get any other support, see [Communication in Community](https://gitee.com/openharmony/docs/tree/master/en/contribute/communication-in-community.md). + +## Code of Conduct +OpenHarmony is committed to providing a welcoming and inspiring community for all. In order to maintain a collaborative environment, we recommend you read and follow the community [Code of Conduct](https://gitee.com/openharmony/docs/blob/master/en/contribute/code-of-conduct.md). + +## Contributors & Acknowledgements +A great open-source project wouldn't be possible without the hard work of many contributors. We'd like to invite anyone from around the world to participate in this exciting journey, and we're grateful for your time, passion, and efforts! + +## Release +In order to provide new features and bug fixes, the community constantly updates code and provides new releases. + +See [OpenHarmony Release Notes](en/release-notes/OpenHarmony-Release-Notes.md). \ No newline at end of file diff --git a/Readme-zh-cn.md b/Readme-zh-cn.md new file mode 100644 index 0000000000000000000000000000000000000000..0c2f5fe7d03342faa06294c991b2f7c953fb68f2 --- /dev/null +++ b/Readme-zh-cn.md @@ -0,0 +1,77 @@ +# OpenHarmony开发者文档 + +此工程存放OpenHarmony提供的快速入门、开发指南、API参考等开发者文档,欢迎参与OpenHarmony开发者文档开源项目,与我们一起完善开发者文档。 + +[View English](Readme-EN.md) + +## 文档目录结构 + +- quick-start:[快速入门](zh-cn/device-dev/quick-start/Readme-CN.md) + +- get-code:[获取源码/获取工具](zh-cn/device-dev/get-code/Readme-CN.md) + +- docker:[Docker镜像构建](docker/README.md) + +- kernel:[内核](zh-cn/device-dev/kernel/Readme-CN.md) + +- driver:[驱动](zh-cn/device-dev/driver/Readme-CN.md) + +- subsystems:[子系统](zh-cn/device-dev/subsystems/Readme-CN.md) + + [编译构建](zh-cn/device-dev/subsystems/编译构建.md) + + [分布式远程启动](zh-cn/device-dev/subsystems/分布式远程启动.md) + + [图形图像](zh-cn/device-dev/subsystems/图形图像.md) + + [媒体](zh-cn/device-dev/subsystems/媒体.md) + + [公共基础](zh-cn/device-dev/subsystems/公共基础.md) + + [AI框架](zh-cn/device-dev/subsystems/AI框架.md) + + [Sensor服务](zh-cn/device-dev/subsystems/Sensor服务.md) + + [用户程序框架](zh-cn/device-dev/subsystems/用户程序框架.md) + + [OTA升级](zh-cn/device-dev/subsystems/OTA升级.md) + + [安全](zh-cn/device-dev/subsystems/安全.md) + + [启动恢复](zh-cn/device-dev/subsystems/启动恢复.md) + + [测试](zh-cn/device-dev/subsystems/测试.md) + + [DFX](zh-cn/device-dev/subsystems/DFX.md) + + [XTS认证](zh-cn/device-dev/subsystems/XTS认证子系统开发指南.md) + +- bundles:[组件开发](zh-cn/device-dev/bundles/Readme-CN.md) + +- porting:[三方库移植/三方芯片移植](zh-cn/device-dev/porting/Readme-CN.md) + +- guide:[设备开发](zh-cn/device-dev/guide/Readme-CN.md) + + [WLAN连接类产品](zh-cn/device-dev/guide/WLAN连接类产品.md) + [无屏摄像头类产品](zh-cn/device-dev/guide/无屏摄像头类产品.md) + [带屏摄像头类产品](zh-cn/device-dev/guide/带屏摄像头类产品.md) + +- security:[安全](zh-cn/device-dev/security/Readme-CN.md) + +- contribute:[贡献](zh-cn/contribute/参与贡献.md) + +- glossary:[术语](zh-cn/device-dev/glossary/术语.md) + +- 3rd-Party-License:[第三方开源软件及许可证说明](zh-cn/contribute/第三方开源软件及许可证说明.md) + +## 版本更新 +参考[版本更新](zh-cn/release-notes/OpenHarmony-Release-Notes.md) + +## 贡献 + +非常欢迎您贡献文档,我们鼓励开发者以各种方式参与文档反馈和贡献。 + +您可以对现有文档进行评价、简单更改、反馈文档质量问题、贡献您的原创内容,详细请参考[贡献文档](zh-cn/contribute/贡献文档.md)。 + +卓越贡献者将会在开发者社区文档贡献专栏表彰公示。 + diff --git a/api/api-LinkIoT/AtCmdTbl.md b/api/api-LinkIoT/AtCmdTbl.md deleted file mode 100755 index ee827e53fc2ad6e949a92f2fc1462816e6d0a2fe..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/AtCmdTbl.md +++ /dev/null @@ -1,120 +0,0 @@ -# AtCmdTbl - -## **Overview** - -**Related Modules:** - -[Wifiiot](Wifiiot.md) - -**Description:** - -Defines the AT command registration structure. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

atCmdName

-

char * 

-

atCmdLen

-

char 

-

atTestCmd

-

AtCallbackFunc 

-

atQueryCmd

-

AtCallbackFunc 

-

atSetupCmd

-

AtCallbackFunc 

-

atExeCmd

-

AtCallbackFunc 

-
- -## **Details** - -## **Field Documentation** - -## atCmdLen - -``` -char AtCmdTbl::atCmdLen -``` - - **Description:** - -AT command length - -## atCmdName - -``` -char* AtCmdTbl::atCmdName -``` - - **Description:** - -AT command name - -## atExeCmd - -``` -AtCallbackFunc AtCmdTbl::atExeCmd -``` - - **Description:** - -AT command execution - -## atQueryCmd - -``` -AtCallbackFunc AtCmdTbl::atQueryCmd -``` - - **Description:** - -AT command query - -## atSetupCmd - -``` -AtCallbackFunc AtCmdTbl::atSetupCmd -``` - - **Description:** - -AT command setup - -## atTestCmd - -``` -AtCallbackFunc AtCmdTbl::atTestCmd -``` - - **Description:** - -AT test command - diff --git a/api/api-LinkIoT/Broadcast.md b/api/api-LinkIoT/Broadcast.md deleted file mode 100755 index dc33012242f117f67128f3c14885ef63b885b0da..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/Broadcast.md +++ /dev/null @@ -1,120 +0,0 @@ -# Broadcast - -## **Overview** - -Provides data subscription and data push for services. - -With this module, the [Service](Service.md), [Feature](Feature.md), or other modules can broadcast events or data. All services that listen to these events or data can receive these broadcasts. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

Consumer

-

Defines the topic consumer used to receive events and push data. You need to implement this struct for your application.

-

Provider

-

Defines the provider of events and data of a topic.

-

Subscriber

-

Defines the subscriber for external interfaces to subscribe to events and data of a topic.

-
- -## Typedefs - - - - - - - - - - -

Typedef Name

-

Description

-

Topic

-

typedef uint32 

-

Indicates the topic of an event or data, which is used to distinguish different types of events or data.

-
- -## Enumerations - - - - - - - - - - -

Enumeration Name

-

Description

-

BroadcastErrCode { EC_ALREADY_SUBSCRIBED = EC_SUCCESS + 1 }

-

Enumerates error codes unique to the Broadcast service.

-
- -## **Details** - -## **Typedef Documentation** - -## Topic - -``` -typedef uint32 [Topic](Broadcast.md#gaf03f5bc94cad32ab628a6cdee09b0542) -``` - - **Description:** - -Indicates the topic of an event or data, which is used to distinguish different types of events or data. - -## **Enumeration Type Documentation** - -## BroadcastErrCode - -``` -enum [BroadcastErrCode](Broadcast.md#ga98f7a28020aa045ad049d116e1ca666d) -``` - - **Description:** - -Enumerates error codes unique to the Broadcast service. - - - - - - - - - - -

Enumerator

-

Description

-
EC_ALREADY_SUBSCRIBED 

Error code showing that a topic has been subscribed to

-
- diff --git a/api/api-LinkIoT/CMSIS.md b/api/api-LinkIoT/CMSIS.md deleted file mode 100755 index 84afe1f44bac9552de90a9115a3831bbeac830db..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/CMSIS.md +++ /dev/null @@ -1,3159 +0,0 @@ -# CMSIS - -## **Overview** - -Provides standard, universal real-time operating system \(RTOS\) APIs. - -These APIs comply with ARM CMSIS and are used for thread management, timer management, inter-process communications, and semaphores. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

osVersion_t

-

Describes the system version.

-

osThreadAttr_t

-

Describes thread attributes.

-

osTimerAttr_t

-

Describes timer attributes.

-

osEventFlagsAttr_t

-

Describes event attributes.

-

osMutexAttr_t

-

Describes mutex attributes.

-

osSemaphoreAttr_t

-

Describes semaphore attributes.

-

osMessageQueueAttr_t

-

Describes message queue attributes.

-
- -## Macros - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

osWaitForever   0xFFFFFFFFU

-

Indicates that the RTOS waits forever unless an event flag is received.

-

osNoWait   0x0U

-

Indicates that the RTOS does not wait.

-

osFlagsWaitAny   0x00000000U

-

Indicates that the RTOS waits until any event flag is triggered.

-

osFlagsWaitAll   0x00000001U

-

Indicates that the system waits until all event flags are triggered.

-

osFlagsNoClear   0x00000002U

-

Indicates that defined flags are not cleared.

-

osFlagsError   0x80000000U

-

Indicates a flag error.

-

osFlagsErrorUnknown   0xFFFFFFFFU

-

Indicates an unknown error.

-

osFlagsErrorTimeout   0xFFFFFFFEU

-

Indicates a timeout.

-

osFlagsErrorResource   0xFFFFFFFDU

-

Indicates a resource error.

-

osFlagsErrorParameter   0xFFFFFFFCU

-

Indicates an incorrect parameter.

-
- -## Typedefs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Typedef Name

-

Description

-

osThreadFunc_t) (void *argument)

-

typedef void(* 

-

Callback for thread scheduling.

-

osTimerFunc_t) (void *argument)

-

typedef void(* 

-

Callback for timer triggering.

-

osThreadId_t

-

typedef void * 

-

Identifies a thread.

-

osTimerId_t

-

typedef void * 

-

Identifies a timer.

-

osEventFlagsId_t

-

typedef void * 

-

Identifies an event flag.

-

osMutexId_t

-

typedef void * 

-

Identifies a mutex.

-

osSemaphoreId_t

-

typedef void * 

-

Identifies a semaphore object.

-

osMessageQueueId_t

-

typedef void * 

-

Identifies a message queue.

-

TZ_ModuleId_t

-

typedef uint32_t 

-

Identifies a TrustZone module call process.

-
- -## Enumerations - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

osKernelState_t {   osKernelInactive = 0, osKernelReady = 1, osKernelRunning = 2, osKernelLocked = 3,   osKernelSuspended = 4, osKernelError = -1, osKernelReserved = 0x7FFFFFFFU }

-

Enumerates kernel states.

-

osThreadState_t {   osThreadInactive = 0, osThreadReady = 1, osThreadRunning = 2, osThreadBlocked = 3,   osThreadTerminated = 4, osThreadError = -1, osThreadReserved = 0x7FFFFFFF }

-

Enumerates thread states.

-

osPriority_t {   osPriorityNone = 0, osPriorityIdle = 1, osPriorityLow = 8, osPriorityLow1 = 8+1,   osPriorityLow2 = 8+2, osPriorityLow3 = 8+3, osPriorityLow4 = 8+4, osPriorityLow5 = 8+5,   osPriorityLow6 = 8+6, osPriorityLow7 = 8+7, osPriorityBelowNormal = 16, osPriorityBelowNormal1 = 16+1,   osPriorityBelowNormal2 = 16+2, osPriorityBelowNormal3 = 16+3, osPriorityBelowNormal4 = 16+4, osPriorityBelowNormal5 = 16+5,   osPriorityBelowNormal6 = 16+6, osPriorityBelowNormal7 = 16+7, osPriorityNormal = 24, osPriorityNormal1 = 24+1,   osPriorityNormal2 = 24+2, osPriorityNormal3 = 24+3, osPriorityNormal4 = 24+4, osPriorityNormal5 = 24+5,   osPriorityNormal6 = 24+6, osPriorityNormal7 = 24+7, osPriorityAboveNormal = 32, osPriorityAboveNormal1 = 32+1,   osPriorityAboveNormal2 = 32+2, osPriorityAboveNormal3 = 32+3, osPriorityAboveNormal4 = 32+4, osPriorityAboveNormal5 = 32+5,   osPriorityAboveNormal6 = 32+6, osPriorityAboveNormal7 = 32+7, osPriorityHigh = 40, osPriorityHigh1 = 40+1,   osPriorityHigh2 = 40+2, osPriorityHigh3 = 40+3, osPriorityHigh4 = 40+4, osPriorityHigh5 = 40+5,   osPriorityHigh6 = 40+6, osPriorityHigh7 = 40+7, osPriorityRealtime = 48, osPriorityRealtime1 = 48+1,   osPriorityRealtime2 = 48+2, osPriorityRealtime3 = 48+3, osPriorityRealtime4 = 48+4, osPriorityRealtime5 = 48+5,   osPriorityRealtime6 = 48+6, osPriorityRealtime7 = 48+7, osPriorityISR = 56, osPriorityError = -1,   osPriorityReserved = 0x7FFFFFFF }

-

Enumerates thread priorities.

-

osTimerType_t { osTimerOnce = 0, osTimerPeriodic = 1 }

-

Enumerates timer types.

-

os_timer_rouses_type { osTimerRousesIgnore = 0, osTimerRousesAllow = 1 }

-

Enumerates timer permissions.

-

os_timer_align_type { osTimerAlignIgnore = 0, osTimerAlignAllow = 1 }

-

Enumerates timer alignment modes.

-

osStatus_t {   osOK = 0, osError = -1, osErrorTimeout = -2, osErrorResource = -3,   osErrorParameter = -4, osErrorNoMemory = -5, osErrorISR = -6, osStatusReserved = 0x7FFFFFFF }

-

Enumerates return values of CMSIS-RTOS.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

osKernelInitialize (void)

-

osStatus_t 

-

Initializes the RTOS kernel.

-

osKernelGetInfo (osVersion_t *version, char *id_buf, uint32_t id_size)

-

osStatus_t 

-

Obtains the system version and name.

-

osKernelGetState (void)

-

osKernelState_t 

-

Obtains the kernel state.

-

osKernelStart (void)

-

osStatus_t 

-

Starts the kernel.

-

osKernelLock (void)

-

int32_t 

-

Locks the kernel.

-

osKernelUnlock (void)

-

int32_t 

-

Unlocks the kernel.

-

osKernelRestoreLock (int32_t lock)

-

int32_t 

-

Restores the previous lock state of the kernel.

-

osKernelGetTickFreq (void)

-

uint32_t 

-

Obtains the number of kernel ticks per second.

-

osKernelGetSysTimerCount (void)

-

uint32_t 

-

Obtains the kernel system timer.

-

osKernelGetSysTimerFreq (void)

-

uint32_t 

-

Obtains the frequency of the system timer.

-

osThreadNew (osThreadFunc_t func, void *argument, const osThreadAttr_t *attr)

-

osThreadId_t 

-

Creates an active thread.

-

osThreadGetName (osThreadId_t thread_id)

-

const char * 

-

Obtains the name of a thread.

-

osThreadGetId (void)

-

osThreadId_t 

-

Obtains the ID of the currently running thread.

-

osThreadGetState (osThreadId_t thread_id)

-

osThreadState_t 

-

Obtains the state of a thread.

-

osThreadGetStackSize (osThreadId_t thread_id)

-

uint32_t 

-

Obtains the stack size of a thread.

-

osThreadGetStackSpace (osThreadId_t thread_id)

-

uint32_t 

-

Obtains the size of the available stack space for a thread based on the stack watermark.

-

osThreadSetPriority (osThreadId_t thread_id, osPriority_t priority)

-

osStatus_t 

-

Changes the priority of a thread.

-

osThreadGetPriority (osThreadId_t thread_id)

-

osPriority_t 

-

Gets the prority of an active thread.

-

osThreadYield (void)

-

osStatus_t 

-

Sets the currently running thread to the ready state.

-

osThreadSuspend (osThreadId_t thread_id)

-

osStatus_t 

-

Suspends a thread.

-

osThreadResume (osThreadId_t thread_id)

-

osStatus_t 

-

Resumes a thread from the suspended state.

-

osThreadTerminate (osThreadId_t thread_id)

-

osStatus_t 

-

Terminates a thread.

-

osThreadGetCount (void)

-

uint32_t 

-

Obtains the number of active threads.

-

osDelay (uint32_t ticks)

-

osStatus_t 

-

Waits for a period of time.

-

osDelayUntil (uint64_t ticks)

-

osStatus_t 

-

Waits until a specified time arrives.

-

osTimerNew (osTimerFunc_t func, osTimerType_t type, void *argument, const osTimerAttr_t *attr)

-

osTimerId_t 

-

Creates and initializes a timer.

-

osTimerStart (osTimerId_t timer_id, uint32_t ticks)

-

osStatus_t 

-

Starts or restarts a timer.

-

osTimerStop (osTimerId_t timer_id)

-

osStatus_t 

-

Stops a timer.

-

osTimerIsRunning (osTimerId_t timer_id)

-

uint32_t 

-

Checks whether a timer is running.

-

osTimerDelete (osTimerId_t timer_id)

-

osStatus_t 

-

Deletes a timer.

-

osEventFlagsNew (const osEventFlagsAttr_t *attr)

-

osEventFlagsId_t 

-

Creates and initializes an event flags object.

-

osEventFlagsSet (osEventFlagsId_t ef_id, uint32_t flags)

-

uint32_t 

-

Sets event flags.

-

osEventFlagsClear (osEventFlagsId_t ef_id, uint32_t flags)

-

uint32_t 

-

Clears event flags.

-

osEventFlagsGet (osEventFlagsId_t ef_id)

-

uint32_t 

-

Obtains event flags.

-

osEventFlagsWait (osEventFlagsId_t ef_id, uint32_t flags, uint32_t options, uint32_t timeout)

-

uint32_t 

-

Waits for event flags to trigger.

-

osEventFlagsDelete (osEventFlagsId_t ef_id)

-

osStatus_t 

-

Deletes an event flags object.

-

osMutexNew (const osMutexAttr_t *attr)

-

osMutexId_t 

-

Creates and initializes a mutex.

-

osMutexAcquire (osMutexId_t mutex_id, uint32_t timeout)

-

osStatus_t 

-

Obtains a mutex.

-

osMutexRelease (osMutexId_t mutex_id)

-

osStatus_t 

-

Releases a mutex.

-

osMutexGetOwner (osMutexId_t mutex_id)

-

osThreadId_t 

-

Obtains the thread ID of the currently acquired mutex.

-

osMutexDelete (osMutexId_t mutex_id)

-

osStatus_t 

-

Deletes a mutex.

-

osSemaphoreNew (uint32_t max_count, uint32_t initial_count, const osSemaphoreAttr_t *attr)

-

osSemaphoreId_t 

-

Creates and initializes a semaphore object.

-

osSemaphoreAcquire (osSemaphoreId_t semaphore_id, uint32_t timeout)

-

osStatus_t 

-

Acquires a token of a semaphore object.

-

osSemaphoreRelease (osSemaphoreId_t semaphore_id)

-

osStatus_t 

-

Releases a token of a semaphore object.

-

osSemaphoreGetCount (osSemaphoreId_t semaphore_id)

-

uint32_t 

-

Obtains the number of available tokens of a semaphore object.

-

osSemaphoreDelete (osSemaphoreId_t semaphore_id)

-

osStatus_t 

-

Deletes a semaphore object.

-

osMessageQueueNew (uint32_t msg_count, uint32_t msg_size, const osMessageQueueAttr_t *attr)

-

osMessageQueueId_t 

-

Creates and initializes a message queue.

-

osMessageQueuePut (osMessageQueueId_t mq_id, const void *msg_ptr, uint8_t msg_prio, uint32_t timeout)

-

osStatus_t 

-

Places a message in a message queue.

-

osMessageQueueGet (osMessageQueueId_t mq_id, void *msg_ptr, uint8_t *msg_prio, uint32_t timeout)

-

osStatus_t 

-

Obtains a message in a message queue.

-

osMessageQueueGetCapacity (osMessageQueueId_t mq_id)

-

uint32_t 

-

Obtains the maximum number of messages that can be placed in a message queue.

-

osMessageQueueGetMsgSize (osMessageQueueId_t mq_id)

-

uint32_t 

-

Obtains the maximum size of messages that can be placed in a message queue.

-

osMessageQueueGetCount (osMessageQueueId_t mq_id)

-

uint32_t 

-

Obtains the number of queued messages in a message queue.

-

osMessageQueueGetSpace (osMessageQueueId_t mq_id)

-

uint32_t 

-

Obtains the number of available slots for messages in a message queue.

-

osMessageQueueDelete (osMessageQueueId_t mq_id)

-

osStatus_t 

-

Deletes a message queue.

-
- -## **Details** - -## **Macro Definition Documentation** - -## osFlagsError - -``` -#define osFlagsError   0x80000000U -``` - - **Description:** - -Indicates a flag error. - -## osFlagsErrorParameter - -``` -#define osFlagsErrorParameter   0xFFFFFFFCU -``` - - **Description:** - -Indicates an incorrect parameter. - -## osFlagsErrorResource - -``` -#define osFlagsErrorResource   0xFFFFFFFDU -``` - - **Description:** - -Indicates a resource error. - -## osFlagsErrorTimeout - -``` -#define osFlagsErrorTimeout   0xFFFFFFFEU -``` - - **Description:** - -Indicates a timeout. - -## osFlagsErrorUnknown - -``` -#define osFlagsErrorUnknown   0xFFFFFFFFU -``` - - **Description:** - -Indicates an unknown error. - -## osFlagsNoClear - -``` -#define osFlagsNoClear   0x00000002U -``` - - **Description:** - -Indicates that defined flags are not cleared. - -## osFlagsWaitAll - -``` -#define osFlagsWaitAll   0x00000001U -``` - - **Description:** - -Indicates that the system waits until all event flags are triggered. - -## osFlagsWaitAny - -``` -#define osFlagsWaitAny   0x00000000U -``` - - **Description:** - -Indicates that the RTOS waits until any event flag is triggered. - -## osNoWait - -``` -#define osNoWait   0x0U -``` - - **Description:** - -Indicates that the RTOS does not wait. - -## osWaitForever - -``` -#define osWaitForever   0xFFFFFFFFU -``` - - **Description:** - -Indicates that the RTOS waits forever unless an event flag is received. - -## **Typedef Documentation** - -## osEventFlagsId\_t - -``` -typedef void* [osEventFlagsId_t](CMSIS.md#gaf0a3ba8f502ca6581ed1009005c0dadd) -``` - - **Description:** - -Identifies an event flag. - -## osMessageQueueId\_t - -``` -typedef void* [osMessageQueueId_t](CMSIS.md#ga206dbc05367e03c39fc6d4d1ebcff317) -``` - - **Description:** - -Identifies a message queue. - -## osMutexId\_t - -``` -typedef void* [osMutexId_t](CMSIS.md#ga29b7ba721f4fe0b11c84c55d079cc3e7) -``` - - **Description:** - -Identifies a mutex. - -## osSemaphoreId\_t - -``` -typedef void* [osSemaphoreId_t](CMSIS.md#ga5abc2c02a86678b63a711e13894ac5b1) -``` - - **Description:** - -Identifies a semaphore object. - -## osThreadFunc\_t - -``` -typedef void(* osThreadFunc_t) (void *argument) -``` - - **Description:** - -Callback for thread scheduling. - -## osThreadId\_t - -``` -typedef void* [osThreadId_t](CMSIS.md#ga6333e016ba9b008e6dd76851c38b9217) -``` - - **Description:** - -Identifies a thread. - -## osTimerFunc\_t - -``` -typedef void(* osTimerFunc_t) (void *argument) -``` - - **Description:** - -Callback for timer triggering. - -## osTimerId\_t - -``` -typedef void* [osTimerId_t](CMSIS.md#gac2000ac2a8c6740700fd8e6c938cff44) -``` - - **Description:** - -Identifies a timer. - -## TZ\_ModuleId\_t - -``` -typedef uint32_t [TZ_ModuleId_t](CMSIS.md#gad5ef21485fe5f60263bc0b48006202cb) -``` - - **Description:** - -Identifies a TrustZone module call process. - -## **Enumeration Type Documentation** - -## os\_timer\_align\_type - -``` -enum [os_timer_align_type](CMSIS.md#ga3d617b70715d7fb2c7c6f06809ee3913) -``` - - **Description:** - -Enumerates timer alignment modes. - - - - - - - - - - - - - -

Enumerator

-

Description

-
osTimerAlignIgnore 

The timer ignores alignment.

-
osTimerAlignAllow 

The timer allows alignment.

-
- -## os\_timer\_rouses\_type - -``` -enum [os_timer_rouses_type](CMSIS.md#ga6274cbe33c6db824bbc40dc6eaa8e578) -``` - - **Description:** - -Enumerates timer permissions. - - - - - - - - - - - - - -

Enumerator

-

Description

-
osTimerRousesIgnore 

The timer is not allowed to wake up the RTOS.

-
osTimerRousesAllow 

The timer is allowed to wake up the RTOS.

-
- -## osKernelState\_t - -``` -enum [osKernelState_t](CMSIS.md#ga08326469274b668140ca934b168a5ad4) -``` - - **Description:** - -Enumerates kernel states. - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
osKernelInactive 

The kernel is inactive.

-
osKernelReady 

The kernel is ready.

-
osKernelRunning 

The kernel is running.

-
osKernelLocked 

The kernel is locked.

-
osKernelSuspended 

The kernel is suspended.

-
osKernelError 

The kernel is abnormal.

-
osKernelReserved 

Reserved

-
- -## osPriority\_t - -``` -enum [osPriority_t](CMSIS.md#gad4e3e0971b41f2d17584a8c6837342ec) -``` - - **Description:** - -Enumerates thread priorities. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
osPriorityNone 

Undefined

-
osPriorityIdle 

Reserved for idle threads

-
osPriorityLow 

Low (unsupported)

-
osPriorityLow1 

Low + 1

-
osPriorityLow2 

Low + 2

-
osPriorityLow3 

Low + 3

-
osPriorityLow4 

Low + 4

-
osPriorityLow5 

Low + 5

-
osPriorityLow6 

Low + 6

-
osPriorityLow7 

Low + 7

-
osPriorityBelowNormal 

Below normal

-
osPriorityBelowNormal1 

Below normal + 1

-
osPriorityBelowNormal2 

Below normal + 2

-
osPriorityBelowNormal3 

Below normal + 3

-
osPriorityBelowNormal4 

Below normal + 4

-
osPriorityBelowNormal5 

Below normal + 5

-
osPriorityBelowNormal6 

Below normal + 6

-
osPriorityBelowNormal7 

Below normal + 7 (unsupported)

-
osPriorityNormal 

Normal (unsupported)

-
osPriorityNormal1 

Normal + 1 (unsupported)

-
osPriorityNormal2 

Normal + 2 (unsupported)

-
osPriorityNormal3 

Normal + 3 (unsupported)

-
osPriorityNormal4 

Normal + 4 (unsupported)

-
osPriorityNormal5 

Normal + 5 (unsupported)

-
osPriorityNormal6 

Normal + 6 (unsupported)

-
osPriorityNormal7 

Normal + 7 (unsupported)

-
osPriorityAboveNormal 

Above normal (unsupported)

-
osPriorityAboveNormal1 

Above normal + 1 (unsupported)

-
osPriorityAboveNormal2 

Above normal + 2 (unsupported)

-
osPriorityAboveNormal3 

Above normal + 3 (unsupported)

-
osPriorityAboveNormal4 

Above normal + 4 (unsupported)

-
osPriorityAboveNormal5 

Above normal + 5 (unsupported)

-
osPriorityAboveNormal6 

Above normal + 6 (unsupported)

-
osPriorityAboveNormal7 

Above normal + 7 (unsupported)

-
osPriorityHigh 

High (unsupported)

-
osPriorityHigh1 

High + 1 (unsupported)

-
osPriorityHigh2 

High + 2 (unsupported)

-
osPriorityHigh3 

High + 3 (unsupported)

-
osPriorityHigh4 

High + 4 (unsupported)

-
osPriorityHigh5 

High + 5 (unsupported)

-
osPriorityHigh6 

High + 6 (unsupported)

-
osPriorityHigh7 

High + 7 (unsupported)

-
osPriorityRealtime 

Real-time (unsupported)

-
osPriorityRealtime1 

Real-time + 1 (unsupported)

-
osPriorityRealtime2 

Real-time + 2 (unsupported)

-
osPriorityRealtime3 

Real-time + 3 (unsupported)

-
osPriorityRealtime4 

Real-time + 4 (unsupported)

-
osPriorityRealtime5 

Real-time + 5 (unsupported)

-
osPriorityRealtime6 

Real-time + 6 (unsupported)

-
osPriorityRealtime7 

Real-time + 7 (unsupported)

-
osPriorityISR 

Reserved for ISR deferred threads (unsupported)

-
osPriorityError 

Invalid

-
osPriorityReserved 

Reserved. It enables the compiler to identify enumeration variables as 32-bit numbers and prevents the enumeration variables from being optimized.

-
- -## osStatus\_t - -``` -enum [osStatus_t](CMSIS.md#ga6c0dbe6069e4e7f47bb4cd32ae2b813e) -``` - - **Description:** - -Enumerates return values of CMSIS-RTOS. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
osOK 

Operation completed successfully

-
osError 

Unspecified error

-
osErrorTimeout 

Timeout

-
osErrorResource 

Resource error

-
osErrorParameter 

Incorrect parameter

-
osErrorNoMemory 

Insufficient memory

-
osErrorISR 

Service interruption

-
osStatusReserved 

Reserved. It is used to prevent the compiler from optimizing enumerations.

-
- -## osThreadState\_t - -``` -enum [osThreadState_t](CMSIS.md#gad3dc89e942e38d9f3af858a0269a820d) -``` - - **Description:** - -Enumerates thread states. - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
osThreadInactive 

The thread is inactive.

-
osThreadReady 

The thread is ready.

-
osThreadRunning 

The thread is running.

-
osThreadBlocked 

The thread is blocked.

-
osThreadTerminated 

The thread is terminated.

-
osThreadError 

The thread is abnormal.

-
osThreadReserved 

Reserved

-
- -## osTimerType\_t - -``` -enum [osTimerType_t](CMSIS.md#ga7dc24a4c2b90334427081c3da7a71915) -``` - - **Description:** - -Enumerates timer types. - - - - - - - - - - - - - -

Enumerator

-

Description

-
osTimerOnce 

One-shot timer

-
osTimerPeriodic 

Repeating timer

-
- -## **Function Documentation** - -## osDelay\(\) - -``` -[osStatus_t](CMSIS.md#ga6c0dbe6069e4e7f47bb4cd32ae2b813e) osDelay (uint32_t ticks) -``` - - **Description:** - -Waits for a period of time. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
ticksIndicates the number of ticks to wait for.
- -**Returns:** - -Returns the CMSIS-RTOS running result. - - - -## osDelayUntil\(\) - -``` -[osStatus_t](CMSIS.md#ga6c0dbe6069e4e7f47bb4cd32ae2b813e) osDelayUntil (uint64_t ticks) -``` - - **Description:** - -Waits until a specified time arrives. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
ticksIndicates the number of ticks converted from the absolute time.
- -**Returns:** - -Returns the CMSIS-RTOS running result. - - - -## osEventFlagsClear\(\) - -``` -uint32_t osEventFlagsClear ([osEventFlagsId_t](CMSIS.md#gaf0a3ba8f502ca6581ed1009005c0dadd) ef_id, uint32_t flags ) -``` - - **Description:** - -Clears event flags. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
ef_idIndicates the event flags ID, which is obtained using osEventFlagsNew.
flagsIndicates the event flags to clear.
- -**Returns:** - -Returns the event flags; returns osFlagsErrorParameter in the case of an error. - - - -## osEventFlagsDelete\(\) - -``` -[osStatus_t](CMSIS.md#ga6c0dbe6069e4e7f47bb4cd32ae2b813e) osEventFlagsDelete ([osEventFlagsId_t](CMSIS.md#gaf0a3ba8f502ca6581ed1009005c0dadd) ef_id) -``` - - **Description:** - -Deletes an event flags object. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
ef_idIndicates the event flags ID, which is obtained using osEventFlagsNew.
- -**Returns:** - -Returns the CMSIS-RTOS running result. - - - -## osEventFlagsGet\(\) - -``` -uint32_t osEventFlagsGet ([osEventFlagsId_t](CMSIS.md#gaf0a3ba8f502ca6581ed1009005c0dadd) ef_id) -``` - - **Description:** - -Obtains event flags. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
ef_idIndicates the event flags ID, which is obtained using osEventFlagsNew.
- -**Returns:** - -Returns the event flags triggered. - - - -## osEventFlagsNew\(\) - -``` -[osEventFlagsId_t](CMSIS.md#gaf0a3ba8f502ca6581ed1009005c0dadd) osEventFlagsNew (const [osEventFlagsAttr_t](osEventFlagsAttr_t.md) * attr) -``` - - **Description:** - -Creates and initializes an event flags object. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
attrIndicates the pointer to the event flags attributes. This parameter is not used.
- -**Returns:** - -Returns the event flags ID; returns NULL in the case of an error. - - - -## osEventFlagsSet\(\) - -``` -uint32_t osEventFlagsSet ([osEventFlagsId_t](CMSIS.md#gaf0a3ba8f502ca6581ed1009005c0dadd) ef_id, uint32_t flags ) -``` - - **Description:** - -Sets event flags. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
ef_idIndicates the event flags ID, which is obtained using osEventFlagsNew.
flagsIndicates the event flags to set.
- -**Returns:** - -Returns the event flags; returns osFlagsErrorParameter in the case of an error. - - - -## osEventFlagsWait\(\) - -``` -uint32_t osEventFlagsWait ([osEventFlagsId_t](CMSIS.md#gaf0a3ba8f502ca6581ed1009005c0dadd) ef_id, uint32_t flags, uint32_t options, uint32_t timeout ) -``` - - **Description:** - -Waits for event flags to trigger. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
ef_idIndicates the event flags ID, which is obtained using osEventFlagsNew.
flagsIndicates the event flags to trigger.
optionsIndicates the configuration of the event flags to trigger.
timeoutIndicates the timeout duration.
- -**Returns:** - -Returns the triggered event flags; returns an error value in the case of an error. - - - -## osKernelGetInfo\(\) - -``` -[osStatus_t](CMSIS.md#ga6c0dbe6069e4e7f47bb4cd32ae2b813e) osKernelGetInfo ([osVersion_t](osVersion_t.md) * version, char * id_buf, uint32_t id_size ) -``` - - **Description:** - -Obtains the system version and name. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
versionIndicates the pointer to the buffer for storing the version.
id_bufIndicates the pointer to the buffer for storing the kernel ID.
id_sizeIndicates the size of the buffer for storing the kernel ID.
- -**Returns:** - -Returns the CMSIS-RTOS running result. - - - -## osKernelGetState\(\) - -``` -[osKernelState_t](CMSIS.md#ga08326469274b668140ca934b168a5ad4) osKernelGetState (void ) -``` - - **Description:** - -Obtains the kernel state. - -**Returns:** - -Returns the kernel state. - - - -## osKernelGetSysTimerCount\(\) - -``` -uint32_t osKernelGetSysTimerCount (void ) -``` - - **Description:** - -Obtains the kernel system timer. - -**Returns:** - -Returns the kernel system timer. - - - -## osKernelGetSysTimerFreq\(\) - -``` -uint32_t osKernelGetSysTimerFreq (void ) -``` - - **Description:** - -Obtains the frequency of the system timer. - -**Returns:** - -Returns the system timer frequency. - - - -## osKernelGetTickFreq\(\) - -``` -uint32_t osKernelGetTickFreq (void ) -``` - - **Description:** - -Obtains the number of kernel ticks per second. - -**Returns:** - -Returns the number of kernel ticks. - - - -## osKernelInitialize\(\) - -``` -[osStatus_t](CMSIS.md#ga6c0dbe6069e4e7f47bb4cd32ae2b813e) osKernelInitialize (void ) -``` - - **Description:** - -Initializes the RTOS kernel. - -**Returns:** - -Returns the CMSIS-RTOS running result. - - - -## osKernelLock\(\) - -``` -int32_t osKernelLock (void ) -``` - - **Description:** - -Locks the kernel. - -**Returns:** - -Returns 1 if the kernel is locked successfully; returns 0 if the lock starts; returns a negative value in the case of an error. - - - -## osKernelRestoreLock\(\) - -``` -int32_t osKernelRestoreLock (int32_t lock) -``` - - **Description:** - -Restores the previous lock state of the kernel. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
locksIndicates the lock state to restore to. The value 1 indicates the locked state, and 0 indicates the unlocked state.
- -**Returns:** - -Returns 1 if the kernel is locked; returns 0 if the kernel is not locked; returns a negative value in the case of an error. - - - -## osKernelStart\(\) - -``` -[osStatus_t](CMSIS.md#ga6c0dbe6069e4e7f47bb4cd32ae2b813e) osKernelStart (void ) -``` - - **Description:** - -Starts the kernel. - -**Returns:** - -Returns the CMSIS-RTOS running result. - - - -## osKernelUnlock\(\) - -``` -int32_t osKernelUnlock (void ) -``` - - **Description:** - -Unlocks the kernel. - -**Returns:** - -Returns 1 if the kernel is unlocked successfully; returns 0 if the kernel is not locked; returns a negative value in the case of an error. - - - -## osMessageQueueDelete\(\) - -``` -[osStatus_t](CMSIS.md#ga6c0dbe6069e4e7f47bb4cd32ae2b813e) osMessageQueueDelete ([osMessageQueueId_t](CMSIS.md#ga206dbc05367e03c39fc6d4d1ebcff317) mq_id) -``` - - **Description:** - -Deletes a message queue. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
osMessageQueueId_tIndicates the message queue ID, which is obtained using osMessageQueueNew.
- -**Returns:** - -Returns the CMSIS-RTOS running result. - - - -## osMessageQueueGet\(\) - -``` -[osStatus_t](CMSIS.md#ga6c0dbe6069e4e7f47bb4cd32ae2b813e) osMessageQueueGet ([osMessageQueueId_t](CMSIS.md#ga206dbc05367e03c39fc6d4d1ebcff317) mq_id, void * msg_ptr, uint8_t * msg_prio, uint32_t timeout ) -``` - - **Description:** - -Obtains a message in a message queue. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
osMessageQueueId_tIndicates the message queue ID, which is obtained using osMessageQueueNew.
msg_ptrIndicates the pointer to the buffer for storing the message to be retrieved from the message queue.
msg_prioIndicates the pointer to the buffer for storing the priority of the message to be retrieved from the message queue. This parameter can be left empty.
timeoutIndicates the timeout duration.
- -**Returns:** - -Returns the CMSIS-RTOS running result. - - - -## osMessageQueueGetCapacity\(\) - -``` -uint32_t osMessageQueueGetCapacity ([osMessageQueueId_t](CMSIS.md#ga206dbc05367e03c39fc6d4d1ebcff317) mq_id) -``` - - **Description:** - -Obtains the maximum number of messages that can be placed in a message queue. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
osMessageQueueId_tIndicates the message queue ID, which is obtained using osMessageQueueNew.
- -**Returns:** - -Returns the maximum number. - - - -## osMessageQueueGetCount\(\) - -``` -uint32_t osMessageQueueGetCount ([osMessageQueueId_t](CMSIS.md#ga206dbc05367e03c39fc6d4d1ebcff317) mq_id) -``` - - **Description:** - -Obtains the number of queued messages in a message queue. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
osMessageQueueId_tIndicates the message queue ID, which is obtained using osMessageQueueNew.
- -**Returns:** - -Returns the number of queued messages. - - - -## osMessageQueueGetMsgSize\(\) - -``` -uint32_t osMessageQueueGetMsgSize ([osMessageQueueId_t](CMSIS.md#ga206dbc05367e03c39fc6d4d1ebcff317) mq_id) -``` - - **Description:** - -Obtains the maximum size of messages that can be placed in a message queue. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
osMessageQueueId_tIndicates the message queue ID, which is obtained using osMessageQueueNew.
- -**Returns:** - -Returns the maximum message size. - - - -## osMessageQueueGetSpace\(\) - -``` -uint32_t osMessageQueueGetSpace ([osMessageQueueId_t](CMSIS.md#ga206dbc05367e03c39fc6d4d1ebcff317) mq_id) -``` - - **Description:** - -Obtains the number of available slots for messages in a message queue. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
osMessageQueueId_tIndicates the message queue ID, which is obtained using osMessageQueueNew.
- -**Returns:** - -Returns the number of available slots for messages. - - - -## osMessageQueueNew\(\) - -``` -[osMessageQueueId_t](CMSIS.md#ga206dbc05367e03c39fc6d4d1ebcff317) osMessageQueueNew (uint32_t msg_count, uint32_t msg_size, const [osMessageQueueAttr_t](osMessageQueueAttr_t.md) * attr ) -``` - - **Description:** - -Creates and initializes a message queue. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
msg_countIndicates the number of messages in the message queue.
msg_sizeIndicates the size of messages in the message queue.
attrIndicates the pointer to the message queue attributes. This parameter is not used.
- -**Returns:** - -Returns the message queue ID; returns NULL in the case of an error. - - - -## osMessageQueuePut\(\) - -``` -[osStatus_t](CMSIS.md#ga6c0dbe6069e4e7f47bb4cd32ae2b813e) osMessageQueuePut ([osMessageQueueId_t](CMSIS.md#ga206dbc05367e03c39fc6d4d1ebcff317) mq_id, const void * msg_ptr, uint8_t msg_prio, uint32_t timeout ) -``` - - **Description:** - -Places a message in a message queue. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
osMessageQueueId_tIndicates the message queue ID, which is obtained using osMessageQueueNew.
msg_ptrIndicates the pointer to the buffer for storing the message to be placed in the message queue.
msg_prioIndicates the priority of the message to be placed in the message queue.
timeoutIndicates the timeout duration.
- -**Returns:** - -Returns the CMSIS-RTOS running result. - - - -## osMutexAcquire\(\) - -``` -[osStatus_t](CMSIS.md#ga6c0dbe6069e4e7f47bb4cd32ae2b813e) osMutexAcquire ([osMutexId_t](CMSIS.md#ga29b7ba721f4fe0b11c84c55d079cc3e7) mutex_id, uint32_t timeout ) -``` - - **Description:** - -Obtains a mutex. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
mutex_idIndicates the mutex ID, which is obtained using osMutexNew.
timeoutIndicates the timeout duration.
- -**Returns:** - -Returns the CMSIS-RTOS running result. - - - -## osMutexDelete\(\) - -``` -[osStatus_t](CMSIS.md#ga6c0dbe6069e4e7f47bb4cd32ae2b813e) osMutexDelete ([osMutexId_t](CMSIS.md#ga29b7ba721f4fe0b11c84c55d079cc3e7) mutex_id) -``` - - **Description:** - -Deletes a mutex. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
mutex_idIndicates the mutex ID, which is obtained using osMutexNew.
- -**Returns:** - -Returns the CMSIS-RTOS running result. - - - -## osMutexGetOwner\(\) - -``` -[osThreadId_t](CMSIS.md#ga6333e016ba9b008e6dd76851c38b9217) osMutexGetOwner ([osMutexId_t](CMSIS.md#ga29b7ba721f4fe0b11c84c55d079cc3e7) mutex_id) -``` - - **Description:** - -Obtains the thread ID of the currently acquired mutex. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
mutex_idIndicates the mutex ID, which is obtained using osMutexNew.
- -**Returns:** - -Returns the thread ID. - - - -## osMutexNew\(\) - -``` -[osMutexId_t](CMSIS.md#ga29b7ba721f4fe0b11c84c55d079cc3e7) osMutexNew (const [osMutexAttr_t](osMutexAttr_t.md) * attr) -``` - - **Description:** - -Creates and initializes a mutex. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
attrIndicates the pointer to the mutex attributes. This parameter is not used.
- -**Returns:** - -Returns the mutex ID; returns NULL in the case of an error. - - - -## osMutexRelease\(\) - -``` -[osStatus_t](CMSIS.md#ga6c0dbe6069e4e7f47bb4cd32ae2b813e) osMutexRelease ([osMutexId_t](CMSIS.md#ga29b7ba721f4fe0b11c84c55d079cc3e7) mutex_id) -``` - - **Description:** - -Releases a mutex. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
mutex_idIndicates the mutex ID, which is obtained using osMutexNew.
- -**Returns:** - -Returns the CMSIS-RTOS running result. - - - -## osSemaphoreAcquire\(\) - -``` -[osStatus_t](CMSIS.md#ga6c0dbe6069e4e7f47bb4cd32ae2b813e) osSemaphoreAcquire ([osSemaphoreId_t](CMSIS.md#ga5abc2c02a86678b63a711e13894ac5b1) semaphore_id, uint32_t timeout ) -``` - - **Description:** - -Acquires a token of a semaphore object. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
semaphore_idIndicates the semaphore ID, which is obtained using osSemaphoreNew.
timeoutIndicates the timeout duration.
- -**Returns:** - -Returns the CMSIS-RTOS running result. - - - -## osSemaphoreDelete\(\) - -``` -[osStatus_t](CMSIS.md#ga6c0dbe6069e4e7f47bb4cd32ae2b813e) osSemaphoreDelete ([osSemaphoreId_t](CMSIS.md#ga5abc2c02a86678b63a711e13894ac5b1) semaphore_id) -``` - - **Description:** - -Deletes a semaphore object. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
semaphore_idIndicates the semaphore ID, which is obtained using osSemaphoreNew.
- -**Returns:** - -Returns the CMSIS-RTOS running result. - - - -## osSemaphoreGetCount\(\) - -``` -uint32_t osSemaphoreGetCount ([osSemaphoreId_t](CMSIS.md#ga5abc2c02a86678b63a711e13894ac5b1) semaphore_id) -``` - - **Description:** - -Obtains the number of available tokens of a semaphore object. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
semaphore_idIndicates the semaphore ID, which is obtained using osSemaphoreNew.
- -**Returns:** - -Returns the number of available tokens. - - - -## osSemaphoreNew\(\) - -``` -[osSemaphoreId_t](CMSIS.md#ga5abc2c02a86678b63a711e13894ac5b1) osSemaphoreNew (uint32_t max_count, uint32_t initial_count, const [osSemaphoreAttr_t](osSemaphoreAttr_t.md) * attr ) -``` - - **Description:** - -Creates and initializes a semaphore object. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
max_countIndicates the maximum number of available tokens that can be applied for.
initial_countIndicates the initial number of available tokens.
attrIndicates the pointer to the semaphore attributes. This parameter is not used.
- -**Returns:** - -Returns the semaphore ID; returns NULL in the case of an error. - - - -## osSemaphoreRelease\(\) - -``` -[osStatus_t](CMSIS.md#ga6c0dbe6069e4e7f47bb4cd32ae2b813e) osSemaphoreRelease ([osSemaphoreId_t](CMSIS.md#ga5abc2c02a86678b63a711e13894ac5b1) semaphore_id) -``` - - **Description:** - -Releases a token of a semaphore object. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
semaphore_idIndicates the semaphore ID, which is obtained using osSemaphoreNew.
- -**Returns:** - -Returns the CMSIS-RTOS running result. - - - -## osThreadGetCount\(\) - -``` -uint32_t osThreadGetCount (void ) -``` - - **Description:** - -Obtains the number of active threads. - -**Returns:** - -Returns the number; returns 0 in the case of an error. - - - -## osThreadGetId\(\) - -``` -[osThreadId_t](CMSIS.md#ga6333e016ba9b008e6dd76851c38b9217) osThreadGetId (void ) -``` - - **Description:** - -Obtains the ID of the currently running thread. - -**Returns:** - -Returns the thread ID; returns NULL in the case of an error. - - - -## osThreadGetName\(\) - -``` -const char* osThreadGetName ([osThreadId_t](CMSIS.md#ga6333e016ba9b008e6dd76851c38b9217) thread_id) -``` - - **Description:** - -Obtains the name of a thread. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
thread_idIndicates the thread ID, which is obtained using osThreadNew or osThreadGetId.
- -**Returns:** - -Returns the thread name; returns NULL in the case of an error. - - - -## osThreadGetPriority\(\) - -``` -[osPriority_t](CMSIS.md#gad4e3e0971b41f2d17584a8c6837342ec) osThreadGetPriority ([osThreadId_t](CMSIS.md#ga6333e016ba9b008e6dd76851c38b9217) thread_id) -``` - - **Description:** - -Gets the prority of an active thread. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
thread_idIndicates the thread ID, which is obtained using osThreadNew or osThreadGetId.
- -**Returns:** - -Returns the prority of the thread. - - - -## osThreadGetStackSize\(\) - -``` -uint32_t osThreadGetStackSize ([osThreadId_t](CMSIS.md#ga6333e016ba9b008e6dd76851c38b9217) thread_id) -``` - - **Description:** - -Obtains the stack size of a thread. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
thread_idIndicates the thread ID, which is obtained using osThreadNew or osThreadGetId.
- -**Returns:** - -Returns the stack size, in bytes; returns 0 in the case of an error. - - - -## osThreadGetStackSpace\(\) - -``` -uint32_t osThreadGetStackSpace ([osThreadId_t](CMSIS.md#ga6333e016ba9b008e6dd76851c38b9217) thread_id) -``` - - **Description:** - -Obtains the size of the available stack space for a thread based on the stack watermark. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
thread_idIndicates the thread ID, which is obtained using osThreadNew or osThreadGetId.
- -**Returns:** - -Returns the available stack size, in bytes; returns 0 in the case of an error. - - - -## osThreadGetState\(\) - -``` -[osThreadState_t](CMSIS.md#gad3dc89e942e38d9f3af858a0269a820d) osThreadGetState ([osThreadId_t](CMSIS.md#ga6333e016ba9b008e6dd76851c38b9217) thread_id) -``` - - **Description:** - -Obtains the state of a thread. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
thread_idIndicates the thread ID, which is obtained using osThreadNew or osThreadGetId.
- -**Returns:** - -Returns the thread state. - - - -## osThreadNew\(\) - -``` -[osThreadId_t](CMSIS.md#ga6333e016ba9b008e6dd76851c38b9217) osThreadNew ([osThreadFunc_t](CMSIS.md#ga8ef2773ed8ef63ab8727e0d06ebec4d2) func, void * argument, const [osThreadAttr_t](osThreadAttr_t.md) * attr ) -``` - - **Description:** - -Creates an active thread. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
funcIndicates the entry of the thread callback function.
argumentIndicates the pointer to the argument passed to the thread.
attrIndicates the thread attributes. If this parameter is left unspecified, the default value 0 is used.
- -**Returns:** - -Returns the thread ID; returns NULL in the case of an error. - - - -## osThreadResume\(\) - -``` -[osStatus_t](CMSIS.md#ga6c0dbe6069e4e7f47bb4cd32ae2b813e) osThreadResume ([osThreadId_t](CMSIS.md#ga6333e016ba9b008e6dd76851c38b9217) thread_id) -``` - - **Description:** - -Resumes a thread from the suspended state. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
thread_idIndicates the thread ID, which is obtained using osThreadNew or osThreadGetId.
- -**Returns:** - -Returns the CMSIS-RTOS running result. - - - -## osThreadSetPriority\(\) - -``` -[osStatus_t](CMSIS.md#ga6c0dbe6069e4e7f47bb4cd32ae2b813e) osThreadSetPriority ([osThreadId_t](CMSIS.md#ga6333e016ba9b008e6dd76851c38b9217) thread_id, [osPriority_t](CMSIS.md#gad4e3e0971b41f2d17584a8c6837342ec) priority ) -``` - - **Description:** - -Changes the priority of a thread. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
thread_idIndicates the thread ID, which is obtained using osThreadNew or osThreadGetId.
priorityIndicates the new priority.
- -**Returns:** - -Returns the CMSIS-RTOS running result. - - - -## osThreadSuspend\(\) - -``` -[osStatus_t](CMSIS.md#ga6c0dbe6069e4e7f47bb4cd32ae2b813e) osThreadSuspend ([osThreadId_t](CMSIS.md#ga6333e016ba9b008e6dd76851c38b9217) thread_id) -``` - - **Description:** - -Suspends a thread. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
thread_idIndicates the thread ID, which is obtained using osThreadNew or osThreadGetId.
- -**Returns:** - -Returns the CMSIS-RTOS running result. - - - -## osThreadTerminate\(\) - -``` -[osStatus_t](CMSIS.md#ga6c0dbe6069e4e7f47bb4cd32ae2b813e) osThreadTerminate ([osThreadId_t](CMSIS.md#ga6333e016ba9b008e6dd76851c38b9217) thread_id) -``` - - **Description:** - -Terminates a thread. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
thread_idIndicates the thread ID, which is obtained using osThreadNew or osThreadGetId.
- -**Returns:** - -Returns the CMSIS-RTOS running result. - - - -## osThreadYield\(\) - -``` -[osStatus_t](CMSIS.md#ga6c0dbe6069e4e7f47bb4cd32ae2b813e) osThreadYield (void ) -``` - - **Description:** - -Sets the currently running thread to the ready state. - -**Returns:** - -Returns the CMSIS-RTOS running result. - - - -## osTimerDelete\(\) - -``` -[osStatus_t](CMSIS.md#ga6c0dbe6069e4e7f47bb4cd32ae2b813e) osTimerDelete ([osTimerId_t](CMSIS.md#gac2000ac2a8c6740700fd8e6c938cff44) timer_id) -``` - - **Description:** - -Deletes a timer. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
timer_idIndicates the timer ID, which is obtained using osTimerNew.
- -**Returns:** - -Returns the CMSIS-RTOS running result. - - - -## osTimerIsRunning\(\) - -``` -uint32_t osTimerIsRunning ([osTimerId_t](CMSIS.md#gac2000ac2a8c6740700fd8e6c938cff44) timer_id) -``` - - **Description:** - -Checks whether a timer is running. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
timer_idIndicates the timer ID, which is obtained using osTimerNew.
- -**Returns:** - -Returns 1 if the timer is running; returns 0 otherwise. - - - -## osTimerNew\(\) - -``` -[osTimerId_t](CMSIS.md#gac2000ac2a8c6740700fd8e6c938cff44) osTimerNew ([osTimerFunc_t](CMSIS.md#ga77a298218f3c8382b39a09a6d134d040) func, [osTimerType_t](CMSIS.md#ga7dc24a4c2b90334427081c3da7a71915) type, void * argument, const [osTimerAttr_t](osTimerAttr_t.md) * attr ) -``` - - **Description:** - -Creates and initializes a timer. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
funcIndicates the entry of the timer callback function.
typeIndicates the timer type.
argumentIndicates the pointer to the argument used in timer callback.
attrIndicates the pointer to the timer attributes. This parameter is not used.
- -**Returns:** - -Returns the timer ID; returns NULL in the case of an error. - - - -## osTimerStart\(\) - -``` -[osStatus_t](CMSIS.md#ga6c0dbe6069e4e7f47bb4cd32ae2b813e) osTimerStart ([osTimerId_t](CMSIS.md#gac2000ac2a8c6740700fd8e6c938cff44) timer_id, uint32_t ticks ) -``` - - **Description:** - -Starts or restarts a timer. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
timer_idIndicates the timer ID, which is obtained using osTimerNew.
ticksIndicates the number of ticks since the timer starts running.
- -**Returns:** - -Returns the CMSIS-RTOS running result. - - - -## osTimerStop\(\) - -``` -[osStatus_t](CMSIS.md#ga6c0dbe6069e4e7f47bb4cd32ae2b813e) osTimerStop ([osTimerId_t](CMSIS.md#gac2000ac2a8c6740700fd8e6c938cff44) timer_id) -``` - - **Description:** - -Stops a timer. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
timer_idIndicates the timer ID, which is obtained using osTimerNew.
- -**Returns:** - -Returns the CMSIS-RTOS running result. - - - -## **Variable Documentation** - -## api - -``` -uint32_t osVersion_t::api -``` - - **Description:** - -API version - -## attr\_bits \[1/6\] - -``` -uint32_t osThreadAttr_t::attr_bits -``` - - **Description:** - -Thread attribute bits - -## attr\_bits \[2/6\] - -``` -uint32_t osTimerAttr_t::attr_bits -``` - - **Description:** - -Reserved attribute bits - -## attr\_bits \[3/6\] - -``` -uint32_t osEventFlagsAttr_t::attr_bits -``` - - **Description:** - -Reserved attribute bits - -## attr\_bits \[4/6\] - -``` -uint32_t osMutexAttr_t::attr_bits -``` - - **Description:** - -Reserved attribute bits - -## attr\_bits \[5/6\] - -``` -uint32_t osSemaphoreAttr_t::attr_bits -``` - - **Description:** - -Reserved attribute bits - -## attr\_bits \[6/6\] - -``` -uint32_t osMessageQueueAttr_t::attr_bits -``` - - **Description:** - -Reserved attribute bits - -## cb\_mem \[1/6\] - -``` -void* osThreadAttr_t::cb_mem -``` - - **Description:** - -Memory for the thread control block - -## cb\_mem \[2/6\] - -``` -void* osTimerAttr_t::cb_mem -``` - - **Description:** - -Memory for the timer control block - -## cb\_mem \[3/6\] - -``` -void* osEventFlagsAttr_t::cb_mem -``` - - **Description:** - -Memory for the event control block - -## cb\_mem \[4/6\] - -``` -void* osMutexAttr_t::cb_mem -``` - - **Description:** - -Memory for the mutex control block - -## cb\_mem \[5/6\] - -``` -void* osSemaphoreAttr_t::cb_mem -``` - - **Description:** - -Memory for the semaphore control block - -## cb\_mem \[6/6\] - -``` -void* osMessageQueueAttr_t::cb_mem -``` - - **Description:** - -Memory for the message queue control block - -## cb\_size \[1/6\] - -``` -uint32_t osThreadAttr_t::cb_size -``` - - **Description:** - -Size of the memory for the thread control block - -## cb\_size \[2/6\] - -``` -uint32_t osTimerAttr_t::cb_size -``` - - **Description:** - -Size of the memory for the timer control block - -## cb\_size \[3/6\] - -``` -uint32_t osEventFlagsAttr_t::cb_size -``` - - **Description:** - -Size of the memory for the event control block - -## cb\_size \[4/6\] - -``` -uint32_t osMutexAttr_t::cb_size -``` - - **Description:** - -Size of the memory for the mutex control block - -## cb\_size \[5/6\] - -``` -uint32_t osSemaphoreAttr_t::cb_size -``` - - **Description:** - -Size of the memory for the semaphore control block - -## cb\_size \[6/6\] - -``` -uint32_t osMessageQueueAttr_t::cb_size -``` - - **Description:** - -Size of the memory for the message queue control block - -## kernel - -``` -uint32_t osVersion_t::kernel -``` - - **Description:** - -Kernel version - -## mq\_mem - -``` -void* osMessageQueueAttr_t::mq_mem -``` - - **Description:** - -Memory for storing data in the message queue - -## mq\_size - -``` -uint32_t osMessageQueueAttr_t::mq_size -``` - - **Description:** - -Size of the memory for storing data in the message queue - -## name \[1/6\] - -``` -const char* osThreadAttr_t::name -``` - - **Description:** - -Thread name - -## name \[2/6\] - -``` -const char* osTimerAttr_t::name -``` - - **Description:** - -Timer name - -## name \[3/6\] - -``` -const char* osEventFlagsAttr_t::name -``` - - **Description:** - -Event name - -## name \[4/6\] - -``` -const char* osMutexAttr_t::name -``` - - **Description:** - -Mutex name - -## name \[5/6\] - -``` -const char* osSemaphoreAttr_t::name -``` - - **Description:** - -Semaphore name - -## name \[6/6\] - -``` -const char* osMessageQueueAttr_t::name -``` - - **Description:** - -Message queue name - -## priority - -``` -[osPriority_t](CMSIS.md#gad4e3e0971b41f2d17584a8c6837342ec) osThreadAttr_t::priority -``` - - **Description:** - -Thread priority - -## reserved - -``` -uint32_t osThreadAttr_t::reserved -``` - - **Description:** - -Reserved - -## stack\_mem - -``` -void* osThreadAttr_t::stack_mem -``` - - **Description:** - -Memory for the thread stack - -## stack\_size - -``` -uint32_t osThreadAttr_t::stack_size -``` - - **Description:** - -Size of the thread stack - -## tz\_module - -``` -[TZ_ModuleId_t](CMSIS.md#gad5ef21485fe5f60263bc0b48006202cb) osThreadAttr_t::tz_module -``` - - **Description:** - -TrustZone module of the thread - diff --git a/api/api-LinkIoT/CapabilityMap.md b/api/api-LinkIoT/CapabilityMap.md deleted file mode 100755 index a08a0700efde7b09322fb451b3426d692909f010..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/CapabilityMap.md +++ /dev/null @@ -1,36 +0,0 @@ -# CapabilityMap - -## **Overview** - -**Related Modules:** - -[Softbus](Softbus.md) - -**Description:** - -Defines the mapping between supported capabilities and bitmaps. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

bitmap

-

DataBitMap 

-

capability

-

char * 

-
- diff --git a/api/api-LinkIoT/CommonDeviceInfo.md b/api/api-LinkIoT/CommonDeviceInfo.md deleted file mode 100755 index 70cae4c9c6b02f2bf22b42798963eadadd11aadd..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/CommonDeviceInfo.md +++ /dev/null @@ -1,36 +0,0 @@ -# CommonDeviceInfo - -## **Overview** - -**Related Modules:** - -[Softbus](Softbus.md) - -**Description:** - -Defines the type and content of a device to set. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

key

-

CommonDeviceKey 

-

value

-

const char * 

-
- diff --git a/api/api-LinkIoT/Consumer.md b/api/api-LinkIoT/Consumer.md deleted file mode 100755 index 048256c6945a1995fe2bcfefd34839b490ab2d86..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/Consumer.md +++ /dev/null @@ -1,126 +0,0 @@ -# Consumer - -## **Overview** - -**Related Modules:** - -[Broadcast](Broadcast.md) - -**Description:** - -Defines the topic consumer used to receive events and push data. You need to implement this struct for your application. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

identity

-

const Identity

-

Notify )(Consumer *consumer, const Topic *topic, const Request *origin)

-

void(* 

-

Defines how the consumer will process the events or data of a released topic.

-

Equal )(const Consumer *current, const Consumer *other)

-

BOOL(* 

-

Checks whether two consumers are equal.

-
- -## **Details** - -## **Field Documentation** - -## Equal - -``` -BOOL(* Consumer::Equal) (const [Consumer](Consumer.md) *current, const [Consumer](Consumer.md) *other) -``` - - **Description:** - -Checks whether two consumers are equal. - -You need to implement this function to prevent repeated topic subscription. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
currentIndicates the pointer to the current consumer.
otherIndicates the pointer to the target consumer to compare.
- -**Returns:** - -Returns **TRUE** if the two consumers are equal; returns **FALSE** otherwise. - - - -## identity - -``` -const [Identity](Identity.md)* Consumer::identity -``` - - **Description:** - -[Consumer](Consumer.md) ID - -## Notify - -``` -void(* Consumer::Notify) ([Consumer](Consumer.md) *consumer, const [Topic](Broadcast.md#gaf03f5bc94cad32ab628a6cdee09b0542) *topic, const [Request](Request.md) *origin) -``` - - **Description:** - -Defines how the consumer will process the events or data of a released topic. - -You can implement this function for consumers to process topics associated with the them. Note that the passed topic must have been subscribed by the consumer. Otherwise, the function does nothing. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
consumerIndicates this pointer of the consumer.
topicIndicates the pointer to the topic to be processed.
originIndicates the pointer to the data to be processed.
- diff --git a/api/api-LinkIoT/DeviceMap.md b/api/api-LinkIoT/DeviceMap.md deleted file mode 100755 index 6fe3d6ab1eb8eeeb0bd22b03bdc20683a29c323f..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/DeviceMap.md +++ /dev/null @@ -1,36 +0,0 @@ -# DeviceMap - -## **Overview** - -**Related Modules:** - -[Softbus](Softbus.md) - -**Description:** - -Defines the mappings between the device type enumerations and device type names. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

value

-

char * 

-

devType

-

DeviceType 

-
- diff --git a/api/api-LinkIoT/Feature.md b/api/api-LinkIoT/Feature.md deleted file mode 100755 index bd8b1ded509d10338ecd1c4f671e72c26d79ec1a..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/Feature.md +++ /dev/null @@ -1,196 +0,0 @@ -# Feature - -## **Overview** - -**Related Modules:** - -[Samgr](Samgr.md) - -**Description:** - -Defines the base class of a feature. - -You need to implement the pointer to the feature. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

GetName )(Feature *feature)

-

const char *(* 

-

Obtains a feature name.

-

OnInitialize )(Feature *feature, Service *parent, Identity identity)

-

void(* 

-

Initializes a feature.

-

OnStop )(Feature *feature, Identity identity)

-

void(* 

-

Stops a feature.

-

OnMessage )(Feature *feature, Request *request)

-

BOOL(* 

-

Processes a feature message.

-
- -## **Details** - -## **Field Documentation** - -## GetName - -``` -const char*(* Feature::GetName) ([Feature](Feature.md) *feature) -``` - - **Description:** - -Obtains a feature name. - -This function is implemented by developers and called by Samgr during feature registration and startup. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
featureIndicates the pointer to the feature.
- -**Returns:** - -Returns a constant character string less than 16 bytes if the operation is successful; returns **NULL** if the operation fails. - - - -## OnInitialize - -``` -void(* Feature::OnInitialize) ([Feature](Feature.md) *feature, [Service](Service.md) *parent, [Identity](Identity.md) identity) -``` - - **Description:** - -Initializes a feature. - -This function is implemented by developers. After Samgr dispatches tasks to a service, the service calls this function in its own tasks. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
featureIndicates the pointer to the feature.
parentIndicates the pointer to the Service to which the feature belongs.
identityIndicates the identity of a feature dispatched by the system.
- -## OnMessage - -``` -BOOL(* Feature::OnMessage) ([Feature](Feature.md) *feature, [Request](Request.md) *request) -``` - - **Description:** - -Processes a feature message. - -This function is implemented by developers to process requests sent by callers through [IUnknown](IUnknown.md). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
featureIndicates the pointer to the feature.
requestIndicates the request message.
- -**Returns:** - -Returns **TRUE** if the processing is successful; returns **FALSE** if the processing fails. - - - -## OnStop - -``` -void(* Feature::OnStop) ([Feature](Feature.md) *feature, [Identity](Identity.md) identity) -``` - - **Description:** - -Stops a feature. - -This function is implemented by developers and is called by Samgr when a feature is deregistered to stop running services. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
featureIndicates the pointer to the feature.
identityIndicates the Identity of the feature to be stopped.
- diff --git a/api/api-LinkIoT/HotspotConfig.md b/api/api-LinkIoT/HotspotConfig.md deleted file mode 100755 index 9d823304e46c414d214b1a6aed8420ad04a93ab1..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/HotspotConfig.md +++ /dev/null @@ -1,115 +0,0 @@ -# HotspotConfig - -## **Overview** - -**Related Modules:** - -[Wifiservice](Wifiservice.md) - -**Description:** - -Represents the hotspot configuration. - -A hotspot configuration must contain the SSID \(or BSSID\), security type, and key \(if the security type is open\). - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

ssid [WIFI_MAX_SSID_LEN]

-

char 

-

securityType

-

int 

-

band

-

int 

-

channelNum

-

int 

-

preSharedKey [WIFI_MAX_KEY_LEN]

-

char 

-
- -## **Details** - -## **Field Documentation** - -## band - -``` -int HotspotConfig::band -``` - - **Description:** - -Frequency band - -## channelNum - -``` -int HotspotConfig::channelNum -``` - - **Description:** - -Channel number - -## preSharedKey - -``` -char HotspotConfig::preSharedKey[[WIFI_MAX_KEY_LEN](Wifiservice.md#ga6017e2d011b6cffcd3663db81a2b52d8)] -``` - - **Description:** - -Key. For its length, see [WIFI\_MAX\_SSID\_LEN](Wifiservice.md#ga7e01d8c5079081de486637b4482c937a). - -## securityType - -``` -int HotspotConfig::securityType -``` - - **Description:** - -Security type - -## ssid - -``` -char HotspotConfig::ssid[[WIFI_MAX_SSID_LEN](Wifiservice.md#ga7e01d8c5079081de486637b4482c937a)] -``` - - **Description:** - -[Service](Service.md) set ID \(SSID\). For its length, see [WIFI\_MAX\_SSID\_LEN](Wifiservice.md#ga7e01d8c5079081de486637b4482c937a). - diff --git a/api/api-LinkIoT/IOT.md b/api/api-LinkIoT/IOT.md deleted file mode 100644 index 643879b8f32114bb1625a7883ec9e0f9a16c75fb..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/IOT.md +++ /dev/null @@ -1,5 +0,0 @@ -# IOT平台 - -- **[IOT子系统](IOT子系统.md)** - - diff --git "a/api/api-LinkIoT/IOT\345\255\220\347\263\273\347\273\237.md" "b/api/api-LinkIoT/IOT\345\255\220\347\263\273\347\273\237.md" deleted file mode 100755 index a18dd0f136f246f3d8e8884d417e01662e755b34..0000000000000000000000000000000000000000 --- "a/api/api-LinkIoT/IOT\345\255\220\347\263\273\347\273\237.md" +++ /dev/null @@ -1,5 +0,0 @@ -# IOT子系统 - -- **[Wifiiot](Wifiiot.md)** - - diff --git a/api/api-LinkIoT/IPublishCallback.md b/api/api-LinkIoT/IPublishCallback.md deleted file mode 100755 index dc44fa3422fb5108d8b2b49061742876cf7099dd..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/IPublishCallback.md +++ /dev/null @@ -1,36 +0,0 @@ -# IPublishCallback - -## **Overview** - -**Related Modules:** - -[Softbus](Softbus.md) - -**Description:** - -Defines the callbacks for successful and failed service publishing. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

onPublishSuccess )(int publishId)

-

void(* 

-

onPublishFail )(int publishId, PublishFailReason reason)

-

void(* 

-
- diff --git a/api/api-LinkIoT/ISessionListener.md b/api/api-LinkIoT/ISessionListener.md deleted file mode 100755 index f5efb396d05037cc332d619ac004cc1e055bb6ef..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/ISessionListener.md +++ /dev/null @@ -1,54 +0,0 @@ -# ISessionListener - -## **Overview** - -**Related Modules:** - -[Softbus](Softbus.md) - -**Description:** - -Defines session callbacks. - -When a session is opened or closed, or there is data to process, the related callback is invoked. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

onSessionOpened )(int sessionId)

-

int(* 

-

Called when a session is opened.

-

onSessionClosed )(int sessionId)

-

void(* 

-

Called when a session is closed.

-

onBytesReceived )(int sessionId, const void *data, unsigned int dataLen)

-

void(* 

-

Called when data is received.

-
- diff --git a/api/api-LinkIoT/IUnknown.md b/api/api-LinkIoT/IUnknown.md deleted file mode 100755 index d1f62ee6f601896a5f82129ade9d973f0a99adc2..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/IUnknown.md +++ /dev/null @@ -1,77 +0,0 @@ -# IUnknown - -## **Overview** - -**Related Modules:** - -[Samgr](Samgr.md) - -**Description:** - -Defines the **[IUnknown](IUnknown.md)** class. - -You need to inherit this structure when developing a subclass of the **[IUnknown](IUnknown.md)** interface. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

QueryInterface )(IUnknown *iUnknown, int version, void **target)

-

int(* 

-

AddRef )(IUnknown *iUnknown)

-

int(* 

-

Release )(IUnknown *iUnknown)

-

int(* 

-
- -## **Details** - -## **Field Documentation** - -## AddRef - -``` -int(* IUnknown::AddRef) ([IUnknown](IUnknown.md) *iUnknown) -``` - - **Description:** - -Adds the reference count. - -## QueryInterface - -``` -int(* IUnknown::QueryInterface) ([IUnknown](IUnknown.md) *iUnknown, int version, void **target) -``` - - **Description:** - -Queries the subclass object of the **[IUnknown](IUnknown.md)** interface of a specified version \(downcasting\). - -## Release - -``` -int(* IUnknown::Release) ([IUnknown](IUnknown.md) *iUnknown) -``` - - **Description:** - -Release the reference to an **[IUnknown](IUnknown.md)** interface. - diff --git a/api/api-LinkIoT/IUnknownEntry.md b/api/api-LinkIoT/IUnknownEntry.md deleted file mode 100755 index e25697d35e655bd52b413cdd3c0a4281a9f11bff..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/IUnknownEntry.md +++ /dev/null @@ -1,77 +0,0 @@ -# IUnknownEntry - -## **Overview** - -**Related Modules:** - -[Samgr](Samgr.md) - -**Description:** - -Defines the **[IUnknown](IUnknown.md)** implementation class. - -You need to inherit this structure when developing a subclass of the **[IUnknown](IUnknown.md)** implementation class. Each **[IUnknown](IUnknown.md)** interface must correspond to one or more **[IUnknown](IUnknown.md)** implementation classes. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

ver

-

uint16 

-

ref

-

int16 

-

iUnknown

-

IUnknown 

-
- -## **Details** - -## **Field Documentation** - -## iUnknown - -``` -[IUnknown](IUnknown.md) IUnknownEntry::iUnknown -``` - - **Description:** - -Implementation of **[IUnknown](IUnknown.md)** interface, which is related to the specific definition implementation. - -## ref - -``` -int16 IUnknownEntry::ref -``` - - **Description:** - -Reference count of **[IUnknown](IUnknown.md)** interface. - -## ver - -``` -uint16 IUnknownEntry::ver -``` - - **Description:** - -Version information of **[IUnknown](IUnknown.md)** interface. - diff --git a/api/api-LinkIoT/Identity.md b/api/api-LinkIoT/Identity.md deleted file mode 100755 index e7795bee5c4e09b517d6437bdd340b1fdc770187..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/Identity.md +++ /dev/null @@ -1,77 +0,0 @@ -# Identity - -## **Overview** - -**Related Modules:** - -[Samgr](Samgr.md) - -**Description:** - -Identifies a service and feature. - -You can use this structure to identity a [IUnknown](IUnknown.md) feature to which messages will be sent through the asynchronous function of [IUnknown](IUnknown.md). - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

serviceId

-

int16 

-

featureId

-

int16 

-

queueId

-

MQueueId 

-
- -## **Details** - -## **Field Documentation** - -## featureId - -``` -int16 Identity::featureId -``` - - **Description:** - -[Feature](Feature.md) ID - -## queueId - -``` -MQueueId Identity::queueId -``` - - **Description:** - -Message queue ID - -## serviceId - -``` -int16 Identity::serviceId -``` - - **Description:** - -[Service](Service.md) ID - diff --git a/api/api-LinkIoT/KAL.md b/api/api-LinkIoT/KAL.md deleted file mode 100755 index 3b9dc8ebe1dc766156a5fe15f62defe80851a3e2..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/KAL.md +++ /dev/null @@ -1,922 +0,0 @@ -# KAL - -## **Overview** - -Defines the kernel adaptation layer \(KAL\), which provides compatible interfaces across different types of OpenHarmony devices. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - -

File Name

-

Description

-

kal.h

-

Defines the kernel adaptation layer (KAL), which provides compatible interfaces across different types of OpenHarmony devices.

-
- -## Data Structures - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

ThreadInfo

-

Describes a thread.

-

MemInfo

-

Describes a memory pool.

-
- -## Macros - - - - - - - - - - -

Macro Name and Value

-

Description

-

KAL_TASK_NAME_LEN 32

-

Indicates the maximum length of a thread name.

-
- -## Enumerations - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

KalTimerType { KAL_TIMER_ONCE = 0, KAL_TIMER_PERIODIC = 1 }

-

Enumerates timer types.

-

KalErrCode { KAL_OK = 0, KAL_ERR_PARA = 1, KAL_ERR_INNER = 2, KAL_ERR_TIMER_STATE = 0x100 }

-

Enumerates return values of the KAL function.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

KalThreadGetInfo (unsigned int threadId, ThreadInfo *info)

-

unsigned int

-

Obtains thread information.

-

KalDelayUs (unsigned int us)

-

void

-

Delays a thread.

-

KalTimerCreate (KalTimerProc func, KalTimerType type, void *arg, unsigned int ticks)

-

KalTimerId

-

Creates a timer.

-

KalTimerStart (KalTimerId timerId)

-

KalErrCode

-

Starts a timer.

-

KalTimerChange (KalTimerId timerId, unsigned int ticks)

-

KalErrCode

-

Changes the duration of a timer.

-

KalTimerStop (KalTimerId timerId)

-

KalErrCode

-

Stops a timer.

-

KalTimerDelete (KalTimerId timerId)

-

KalErrCode

-

Deletes a timer.

-

KalTimerIsRunning (KalTimerId timerId)

-

unsigned int

-

Checks whether a timer is running.

-

KalTickToMs (unsigned int ticks)

-

unsigned int

-

Converts system ticks into milliseconds.

-

KalMsToTick (unsigned int millisec)

-

unsigned int

-

Converts milliseconds into system ticks.

-

KalGetMemInfo (MemInfo *pmemInfo)

-

KalErrCode

-

Obtains memory information.

-
- -## **Details** - -## **Enumeration Type Documentation** - -## KalErrCode - -``` -enum [KalErrCode](KAL.md#ga595e811b5dcad5dc834be507d6839c36) -``` - -**Description:** - -Enumerates return values of the KAL function. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-

KAL_OK

-

A successful execution

-

-

KAL_ERR_PARA

-

Incorrect parameter

-

-

KAL_ERR_INNER

-

Internal execution error

-

-

KAL_ERR_TIMER_STATE

-

Timer status error

-

-
- -## KalTimerType - -``` -enum [KalTimerType](KAL.md#gacde4b0c553c297f66311b87c4bbbb27d) -``` - -**Description:** - -Enumerates timer types. - - - - - - - - - - - - - -

Enumerator

-

Description

-

KAL_TIMER_ONCE

-

One-shot timer

-

-

KAL_TIMER_PERIODIC

-

Repetitive timer

-

-
- -## **Function Documentation** - -## KalDelayUs\(\) - -``` -void KalDelayUs (unsigned int us) -``` - -**Description:** - -Delays a thread. - -The delay unit is microsecond. The actual delay precision can reach only the tick level. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-

us

-

Indicates the number of microseconds to delay. The actual delay precision is one tick.

-
- -## KalGetMemInfo\(\) - -``` -[KalErrCode](KAL.md#ga595e811b5dcad5dc834be507d6839c36) KalGetMemInfo ([MemInfo](MemInfo.md) * pmemInfo) -``` - -**Description:** - -Obtains memory information. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-

pmemInfo

-

Indicates the pointer to the memory information.

-
- -**Returns:** - -Returns an enumerated value defined by [KalErrCode](KAL.md#ga595e811b5dcad5dc834be507d6839c36), where [KAL\_OK](KAL.md#gga595e811b5dcad5dc834be507d6839c36a249642877a22187565c646fcb4c43228) indicates a success. - -## KalMsToTick\(\) - -``` -unsigned int KalMsToTick (unsigned int millisec) -``` - -**Description:** - -Converts milliseconds into system ticks. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-

millisec

-

Indicates the milliseconds to convert.

-
- -**Returns:** - -Returns the system ticks generated. - -## KalThreadGetInfo\(\) - -``` -unsigned int KalThreadGetInfo (unsigned int threadId, [ThreadInfo](ThreadInfo.md) * info ) -``` - -**Description:** - -Obtains thread information. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-

threadId

-

Indicates the thread ID.

-

info

-

Indicates the pointer to the buffer for storing the obtained thread information.

-
- -**Returns:** - -Returns **0** if the thread information is obtained; returns a negative value otherwise. - -## KalTickToMs\(\) - -``` -unsigned int KalTickToMs (unsigned int ticks) -``` - -**Description:** - -Converts system ticks into milliseconds. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-

ticks

-

Indicates the number of ticks to convert.

-
- -**Returns:** - -Returns the milliseconds generated. - -## KalTimerChange\(\) - -``` -[KalErrCode](KAL.md#ga595e811b5dcad5dc834be507d6839c36) KalTimerChange (KalTimerId timerId, unsigned int ticks ) -``` - -**Description:** - -Changes the duration of a timer. - -The timer duration can be changed only before the timer is started. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-

timerId

-

Indicates the ID of the timer whose duration is to change, which is the value returned by KalTimerCreate.

-

ticks

-

Indicates the new duration of the timer.

-
- -**Returns:** - -Returns an enumerated value defined by [KalErrCode](KAL.md#ga595e811b5dcad5dc834be507d6839c36), where [KAL\_OK](KAL.md#gga595e811b5dcad5dc834be507d6839c36a249642877a22187565c646fcb4c43228) indicates a success. - -## KalTimerCreate\(\) - -``` -KalTimerId KalTimerCreate (KalTimerProc func, [KalTimerType](KAL.md#gacde4b0c553c297f66311b87c4bbbb27d) type, void * arg, unsigned int ticks ) -``` - -**Description:** - -Creates a timer. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-

func

-

Indicates the entry to timer callback. The callback is triggered when the timer expires.

-

type

-

Indicates the timer type.

-

arg

-

Indicates the pointer to the argument used in timer callback.

-

ticks

-

Indicates the duration of the timer to create.

-
- -**Returns:** - -Returns the timer ID; returns **NULL** in the case of an error. - -## KalTimerDelete\(\) - -``` -[KalErrCode](KAL.md#ga595e811b5dcad5dc834be507d6839c36) KalTimerDelete (KalTimerId timerId) -``` - -**Description:** - -Deletes a timer. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-

timerId

-

Indicates the ID of the timer to delete, which is the value returned by KalTimerCreate.

-
- -**Returns:** - -Returns an enumerated value defined by [KalErrCode](KAL.md#ga595e811b5dcad5dc834be507d6839c36), where [KAL\_OK](KAL.md#gga595e811b5dcad5dc834be507d6839c36a249642877a22187565c646fcb4c43228) indicates a success. - -## KalTimerIsRunning\(\) - -``` -unsigned int KalTimerIsRunning (KalTimerId timerId) -``` - -**Description:** - -Checks whether a timer is running. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-

timerId

-

Indicates the ID of the timer to check, which is the value returned by KalTimerCreate.

-
- -**Returns:** - -Returns **1** if the timer is running; returns **0** if the timer is not running or the input parameter is incorrect. - -## KalTimerStart\(\) - -``` -[KalErrCode](KAL.md#ga595e811b5dcad5dc834be507d6839c36) KalTimerStart (KalTimerId timerId) -``` - -**Description:** - -Starts a timer. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-

timerId

-

Indicates the ID of the timer to start, which is the value returned by KalTimerCreate.

-
- -**Returns:** - -Returns an enumerated value defined by [KalErrCode](KAL.md#ga595e811b5dcad5dc834be507d6839c36), where [KAL\_OK](KAL.md#gga595e811b5dcad5dc834be507d6839c36a249642877a22187565c646fcb4c43228) indicates a success. - -## KalTimerStop\(\) - -``` -[KalErrCode](KAL.md#ga595e811b5dcad5dc834be507d6839c36) KalTimerStop (KalTimerId timerId) -``` - -**Description:** - -Stops a timer. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-

timerId

-

Indicates the ID of the timer to stop, which is the value returned by KalTimerCreate.

-
- -**Returns:** - -Returns an enumerated value defined by [KalErrCode](KAL.md#ga595e811b5dcad5dc834be507d6839c36), where [KAL\_OK](KAL.md#gga595e811b5dcad5dc834be507d6839c36a249642877a22187565c646fcb4c43228) indicates a success. - -## **Variable Documentation** - -## bottomOfStack - -``` -unsigned int ThreadInfo::bottomOfStack -``` - -**Description:** - -Thread stack bottom - -## currUsed - -``` -unsigned int ThreadInfo::currUsed -``` - -**Description:** - -Current stack space usage - -## eventMask - -``` -unsigned int ThreadInfo::eventMask -``` - -**Description:** - -Thread event mask - -## eventStru - -``` -unsigned int ThreadInfo::eventStru[3] -``` - -**Description:** - -Thread event - -## free - -``` -unsigned int MemInfo::free -``` - -**Description:** - -Available space of the memory pool, in bytes - -## freeLmp - -``` -unsigned int MemInfo::freeLmp -``` - -**Description:** - -Available space of the small memory pool, in bytes - -## freeNodeNum - -``` -unsigned int MemInfo::freeNodeNum -``` - -**Description:** - -Number of available nodes in the memory pool - -## id - -``` -unsigned int ThreadInfo::id -``` - -**Description:** - -Thread ID - -## mallocFailCount - -``` -unsigned int MemInfo::mallocFailCount -``` - -**Description:** - -Number of memory allocation failures - -## maxFreeNodeSize - -``` -unsigned int MemInfo::maxFreeNodeSize -``` - -**Description:** - -Size of the largest available node in the memory pool, in bytes - -## mepc - -``` -unsigned int ThreadInfo::mepc -``` - -**Description:** - -Current thread MEPC - -## mstatus - -``` -unsigned int ThreadInfo::mstatus -``` - -**Description:** - -Current thread status - -## name - -``` -char ThreadInfo::name[[KAL_TASK_NAME_LEN](KAL.md#ga5c36b53bd6e8cbdbcd79f702eda94fdc)] -``` - -**Description:** - -Thread name - -## overflowFlag - -``` -unsigned int ThreadInfo::overflowFlag -``` - -**Description:** - -Thread stack overflow flag - -## peakUsed - -``` -unsigned int ThreadInfo::peakUsed -``` - -**Description:** - -Peak stack space usage - -## peekSize - -``` -unsigned int MemInfo::peekSize -``` - -**Description:** - -Peak memory usage of the memory pool - -## priority - -``` -unsigned short ThreadInfo::priority -``` - -**Description:** - -Thread priority - -## ra - -``` -unsigned int ThreadInfo::ra -``` - -**Description:** - -Current thread RA - -## sp - -``` -unsigned int ThreadInfo::sp -``` - -**Description:** - -Thread stack pointer - -## stackSize - -``` -unsigned int ThreadInfo::stackSize -``` - -**Description:** - -Thread stack size - -## status - -``` -unsigned short ThreadInfo::status -``` - -**Description:** - -Thread status - -## taskMutex - -``` -void* ThreadInfo::taskMutex -``` - -**Description:** - -Thread mutex - -## taskSem - -``` -void* ThreadInfo::taskSem -``` - -**Description:** - -Thread semaphore - -## topOfStack - -``` -unsigned int ThreadInfo::topOfStack -``` - -**Description:** - -Thread stack top - -## total - -``` -unsigned int MemInfo::total -``` - -**Description:** - -Total space of the memory pool, in bytes - -## totalLmp - -``` -unsigned int MemInfo::totalLmp -``` - -**Description:** - -Total space of the small memory pool, in bytes - -## tp - -``` -unsigned int ThreadInfo::tp -``` - -**Description:** - -Current thread TP - -## used - -``` -unsigned int MemInfo::used -``` - -**Description:** - -Used space of the memory pool, in bytes - -## usedLmp - -``` -unsigned int MemInfo::usedLmp -``` - -**Description:** - -Used space of the small memory pool, in bytes - -## usedNodeNum - -``` -unsigned int MemInfo::usedNodeNum -``` - -**Description:** - -Number of used nodes in the memory pool - diff --git a/api/api-LinkIoT/Kv_store.md b/api/api-LinkIoT/Kv_store.md deleted file mode 100755 index 79a3c59754344b0763e733d276fc6cfa95747d3e..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/Kv_store.md +++ /dev/null @@ -1,197 +0,0 @@ -# Kv\_store - -## **Overview** - -Provides functions for obtaining, setting, and deleting a key-value pair. - -Key-value pairs can be permanently stored in the file system. If [FEATURE\_KV\_CACHE](Utils_config.md#gad3d71669516ef0bb50e2b105507a6b29) is enabled, key-value pairs can be stored in the cache. For details about cache specifications, see [MAX\_CACHE\_SIZE](Utils_config.md#ga6c8469dfe973ac952cf40394bd2c160b). For details about the number of key-value pairs that can be stored in an application, see [MAX\_KV\_SUM](Utils_config.md#ga4f258bd7d7d52c6770cce77f3e16ce72). - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - -

File Name

-

Description

-

kv_store.h

-

Provides functions for obtaining, setting, and deleting a key-value pair.

-
- -## Functions - - - - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

UtilsGetValue (const char *key, char *value, unsigned int len)

-

int 

-

Obtains the value matching a specified key from the file system or cache.

-

UtilsSetValue (const char *key, const char *value)

-

int 

-

Adds or updates the value matching a specified key in the file system or cache.

-

UtilsDeleteValue (const char *key)

-

int 

-

Deletes the value matching a specified key from the file system or cache.

-

ClearKVCache (void)

-

int 

-

Clears all key-value pairs from the cache.

-
- -## **Details** - -## **Function Documentation** - -## ClearKVCache\(\) - -``` -int ClearKVCache (void ) -``` - - **Description:** - -Clears all key-value pairs from the cache. - -**Attention:** - -This function is available only if [FEATURE\_KV\_CACHE](Utils_config.md#gad3d71669516ef0bb50e2b105507a6b29) is enabled. - -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - - - -## UtilsDeleteValue\(\) - -``` -int UtilsDeleteValue (const char * key) -``` - - **Description:** - -Deletes the value matching a specified key from the file system or cache. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
keyIndicates the key whose value is to be deleted. It allows only lowercase letters, digits, underscores (_), and dots (.). Its length cannot exceed 32 bytes (including the end-of-text character in the string).
- -**Returns:** - -Returns **0** if the operation is successful; returns **-9** if a parameter is incorrect; returns **-1** in other scenarios. - - - -## UtilsGetValue\(\) - -``` -int UtilsGetValue (const char * key, char * value, unsigned int len ) -``` - - **Description:** - -Obtains the value matching a specified key from the file system or cache. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the key to be indexed. It allows only lowercase letters, digits, underscores (_), and dots (.). Its length cannot exceed 32 bytes (including the end-of-text character in the string).
valueIndicates the buffer for storing the value that matches the key. This is an output parameter.
lenIndicates the size of the value space in the buffer.
- -**Returns:** - -Returns the length of the value if the operation is successful; returns **-9** if a parameter is incorrect; returns **-1** in other scenarios; returns **0** if the value is obtained from the cache. - - - -## UtilsSetValue\(\) - -``` -int UtilsSetValue (const char * key, const char * value ) -``` - - **Description:** - -Adds or updates the value matching a specified key in the file system or cache. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the key whose value is to be added or updated. It allows only lowercase letters, digits, underscores (_), and dots (.). Its length cannot exceed 32 bytes (including the end-of-text character in the string).
valueIndicates the value to be added or updated. Its length cannot exceed 128 bytes (including the end-of-text character in the string).
- -**Returns:** - -Returns **0** if the operation is successful; returns **-9** if a parameter is incorrect; returns **-1** in other scenarios. - - - diff --git a/api/api-LinkIoT/MemInfo.md b/api/api-LinkIoT/MemInfo.md deleted file mode 100755 index 4650c8729186569f3101a6ed1d3e3429690d171c..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/MemInfo.md +++ /dev/null @@ -1,81 +0,0 @@ -# MemInfo - -## **Overview** - -**Related Modules:** - -[KAL](zh-cn_topic_0000001054595087.md) - -**Description:** - -Describes a memory pool. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

total

-

unsigned int 

-

used

-

unsigned int 

-

free

-

unsigned int 

-

freeNodeNum

-

unsigned int 

-

usedNodeNum

-

unsigned int 

-

maxFreeNodeSize

-

unsigned int 

-

mallocFailCount

-

unsigned int 

-

peekSize

-

unsigned int 

-

totalLmp

-

unsigned int 

-

usedLmp

-

unsigned int 

-

freeLmp

-

unsigned int 

-
- diff --git a/api/api-LinkIoT/OHOS-Init.md b/api/api-LinkIoT/OHOS-Init.md deleted file mode 100755 index 28597cacca7cdfac5f97c80dc123dbfc0ae813cd..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/OHOS-Init.md +++ /dev/null @@ -1,587 +0,0 @@ -# OHOS Init - -## **Overview** - -Provides the entries for initializing and starting services and features. - -This module provides the entries for initializing services and features during service development. Services and features are initialized in the following sequence: core phase, core system service, core system feature, system startup, system service, system feature, application-layer service, and application-layer feature. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - -

File Name

-

Description

-

ohos_init.h

-

Provides the entries for initializing and starting services and features.

-
- -## Macros - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

CORE_INIT(func)   LAYER_INITCALL_DEF(func, core, "core")

-

Identifies the entry for initializing and starting a core phase by the priority 2.

-

CORE_INIT_PRI(func, priority)   LAYER_INITCALL(func, core, "core", priority)

-

Identifies the entry for initializing and starting a core phase by the specified priority.

-

SYS_SERVICE_INIT(func)   LAYER_INITCALL_DEF(func, sys_service, "sys.service")

-

Identifies the entry for initializing and starting a core system service by the priority 2.

-

SYS_SERVICE_INIT_PRI(func, priority)   LAYER_INITCALL(func, sys_service, "sys.service", priority)

-

Identifies the entry for initializing and starting a core system service by the specified priority.

-

SYS_FEATURE_INIT(func)   LAYER_INITCALL_DEF(func, sys_feature, "sys.feature")

-

Identifies the entry for initializing and starting a core system feature by the priority 2.

-

SYS_FEATURE_INIT_PRI(func, priority)   LAYER_INITCALL(func, sys_feature, "sys.feature", priority)

-

Identifies the entry for initializing and starting a core system feature by the specified priority.

-

SYS_RUN(func)   LAYER_INITCALL_DEF(func, run, "run")

-

Identifies the entry for initializing and starting a system running phase by the priority 2.

-

SYS_RUN_PRI(func, priority)   LAYER_INITCALL(func, run, "run", priority)

-

Identifies the entry for initializing and starting a system running phase by the specified priority.

-

SYSEX_SERVICE_INIT(func)   LAYER_INITCALL_DEF(func, app_service, "app.service")

-

Identifies the entry for initializing and starting a system service by the priority 2.

-

SYSEX_SERVICE_INIT_PRI(func, priority)   LAYER_INITCALL(func, app_service, "app.service", priority)

-

Identifies the entry for initializing and starting a system service by the specified priority.

-

SYSEX_FEATURE_INIT(func)   LAYER_INITCALL_DEF(func, app_feature, "app.feature")

-

Identifies the entry for initializing and starting a system feature by the priority 2.

-

SYSEX_FEATURE_INIT_PRI(func, priority)   LAYER_INITCALL(func, app_feature, "app.feature", priority)

-

Identifies the entry for initializing and starting a system feature by the specified priority.

-

APP_SERVICE_INIT(func)   LAYER_INITCALL_DEF(func, app_service, "app.service")

-

Identifies the entry for initializing and starting an application-layer service by the priority 2.

-

APP_SERVICE_INIT_PRI(func, priority)   LAYER_INITCALL(func, app_service, "app.service", priority)

-

Identifies the entry for initializing and starting an application-layer service by the specified priority.

-

APP_FEATURE_INIT(func)   LAYER_INITCALL_DEF(func, app_feature, "app.feature")

-

Identifies the entry for initializing and starting an application-layer feature by the priority 2.

-

APP_FEATURE_INIT_PRI(func, priority)   LAYER_INITCALL(func, app_feature, "app.feature", priority)

-

Identifies the entry for initializing and starting an application-layer feature by the specified priority.

-
- -## **Details** - -## **Macro Definition Documentation** - -## APP\_FEATURE\_INIT - -``` -#define APP_FEATURE_INIT( func)   LAYER_INITCALL_DEF(func, app_feature, "app.feature") -``` - - **Description:** - -Identifies the entry for initializing and starting an application-layer feature by the priority 2. - -This macro is used to identify the entry called at the priority 2 of the application-layer feature phase of the startup process. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
funcIndicates the entry function for initializing and starting an application-layer feature. The type is void (*)(void).
- -## APP\_FEATURE\_INIT\_PRI - -``` -#define APP_FEATURE_INIT_PRI( func,  priority )   LAYER_INITCALL(func, app_feature, "app.feature", priority) -``` - - **Description:** - -Identifies the entry for initializing and starting an application-layer feature by the specified priority. - -This macro is used to identify the entry called at the specified priority of the application-layer feature phase of the startup process. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
funcIndicates the entry function for initializing and starting an application-layer feature. The type is void (*)(void).
priorityIndicates the calling priority when starting the application-layer feature. The value range is [0, 5), and the calling sequence is 0, 1, 2, 3, and 4.
- -## APP\_SERVICE\_INIT - -``` -#define APP_SERVICE_INIT( func)   LAYER_INITCALL_DEF(func, app_service, "app.service") -``` - - **Description:** - -Identifies the entry for initializing and starting an application-layer service by the priority 2. - -This macro is used to identify the entry called at the priority 2 of the application-layer service phase of the startup process. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
funcIndicates the entry function for initializing and starting an application-layer service. The type is void (*)(void).
- -## APP\_SERVICE\_INIT\_PRI - -``` -#define APP_SERVICE_INIT_PRI( func,  priority )   LAYER_INITCALL(func, app_service, "app.service", priority) -``` - - **Description:** - -Identifies the entry for initializing and starting an application-layer service by the specified priority. - -This macro is used to identify the entry called at the specified priority of the application-layer service phase of the startup process. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
funcIndicates the entry function for initializing and starting an application-layer service. The type is void (*)(void).
priorityIndicates the calling priority when starting the application-layer service phase. The value range is [0,5), and the calling sequence is 0, 1, 2, 3, and 4.
- -## CORE\_INIT - -``` -#define CORE_INIT( func)   LAYER_INITCALL_DEF(func, core, "core") -``` - - **Description:** - -Identifies the entry for initializing and starting a core phase by the priority 2. - -This macro is used when Samgr is initialized and started. This macro is used to identify the entry called at the priority 2 of the core phase of the startup process. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
funcIndicates the entry function for initializing and starting a core phase. The type is void (*)(void).
- -## CORE\_INIT\_PRI - -``` -#define CORE_INIT_PRI( func,  priority )   LAYER_INITCALL(func, core, "core", priority) -``` - - **Description:** - -Identifies the entry for initializing and starting a core phase by the specified priority. - -This macro is used when Samgr is initialized and started. This macro is used to identify the entry called at the specified priority of the core phase of the startup process. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
funcIndicates the entry function for initializing and starting a core phase. The type is void (*)(void).
priorityIndicates the calling priority when starting the core phase. The value range is [0,5), and the calling sequence is 0, 1, 2, 3, and 4.
- -## SYS\_FEATURE\_INIT - -``` -#define SYS_FEATURE_INIT( func)   LAYER_INITCALL_DEF(func, sys_feature, "sys.feature") -``` - - **Description:** - -Identifies the entry for initializing and starting a core system feature by the priority 2. - -This macro is used to identify the entry called at the priority 2 in the core system feature phase of the startup process. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
funcIndicates the entry function for initializing and starting a core system service. The type is void (*)(void).
- -## SYS\_FEATURE\_INIT\_PRI - -``` -#define SYS_FEATURE_INIT_PRI( func,  priority )   LAYER_INITCALL(func, sys_feature, "sys.feature", priority) -``` - - **Description:** - -Identifies the entry for initializing and starting a core system feature by the specified priority. - -This macro is used to identify the entry called at the specified priority in the core system feature phase of the startup process. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
funcIndicates the entry function for initializing and starting a core system feature. The type is void (*)(void).
priorityIndicates the calling priority when starting the core system feature phase. The value range is [0, 5), and the calling sequence is 0, 1, 2, 3, and 4.
- -## SYS\_RUN - -``` -#define SYS_RUN( func)   LAYER_INITCALL_DEF(func, run, "run") -``` - - **Description:** - -Identifies the entry for initializing and starting a system running phase by the priority 2. - -This macro is used to identify the entry called at the priority 2 in the system startup phase of the startup process. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
funcIndicates the entry function for initializing and starting a system running phase. The type is void (*)(void).
- -## SYS\_RUN\_PRI - -``` -#define SYS_RUN_PRI( func,  priority )   LAYER_INITCALL(func, run, "run", priority) -``` - - **Description:** - -Identifies the entry for initializing and starting a system running phase by the specified priority. - -This macro is used to identify the entry called at the specified priority in the system startup phase of the startup process. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
funcIndicates the entry function for initializing and starting a system running phase. The type is void (*)(void).
priorityIndicates the calling priority when starting the system startup phase. The value range is [0, 5), and the calling sequence is 0, 1, 2, 3, and 4.
- -## SYS\_SERVICE\_INIT - -``` -#define SYS_SERVICE_INIT( func)   LAYER_INITCALL_DEF(func, sys_service, "sys.service") -``` - - **Description:** - -Identifies the entry for initializing and starting a core system service by the priority 2. - -This macro is used to identify the entry called at the priority 2 in the core system service phase of the startup process. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
funcIndicates the entry function for initializing and starting a core system service. The type is void (*)(void).
- -## SYS\_SERVICE\_INIT\_PRI - -``` -#define SYS_SERVICE_INIT_PRI( func,  priority )   LAYER_INITCALL(func, sys_service, "sys.service", priority) -``` - - **Description:** - -Identifies the entry for initializing and starting a core system service by the specified priority. - -This macro is used to identify the entry called at the specified priority in the core system service phase of the startup process. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
funcIndicates the entry function for initializing and starting a core system service. The type is void (*)(void).
priorityIndicates the calling priority when starting the core system service in the startup phase. The value range is [0,5), and the calling sequence is 0, 1, 2, 3, and 4.
- -## SYSEX\_FEATURE\_INIT - -``` -#define SYSEX_FEATURE_INIT( func)   LAYER_INITCALL_DEF(func, app_feature, "app.feature") -``` - - **Description:** - -Identifies the entry for initializing and starting a system feature by the priority 2. - -This macro is used to identify the entry called at the priority 2 of the system feature phase of the startup process. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
funcIndicates the entry function for initializing and starting a system feature. The type is void (*)(void).
- -## SYSEX\_FEATURE\_INIT\_PRI - -``` -#define SYSEX_FEATURE_INIT_PRI( func,  priority )   LAYER_INITCALL(func, app_feature, "app.feature", priority) -``` - - **Description:** - -Identifies the entry for initializing and starting a system feature by the specified priority. - -This macro is used to identify the entry called at the specified priority of the system feature phase of the startup process. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
funcIndicates the entry function for initializing and starting a system feature. The type is void (*)(void).
priorityIndicates the calling priority when starting the system feature phase. The value range is [0,5), and the calling sequence is 0, 1, 2, 3, and 4.
- -## SYSEX\_SERVICE\_INIT - -``` -#define SYSEX_SERVICE_INIT( func)   LAYER_INITCALL_DEF(func, app_service, "app.service") -``` - - **Description:** - -Identifies the entry for initializing and starting a system service by the priority 2. - -This macro is used to identify the entry called at the priority 2 in the system service phase of the startup process. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
funcIndicates the entry function for initializing and starting a system service. The type is void (*)(void).
- -## SYSEX\_SERVICE\_INIT\_PRI - -``` -#define SYSEX_SERVICE_INIT_PRI( func,  priority )   LAYER_INITCALL(func, app_service, "app.service", priority) -``` - - **Description:** - -Identifies the entry for initializing and starting a system service by the specified priority. - -This macro is used to identify the entry called at the specified priority of the system service phase of the startup process. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
funcIndicates the entry function for initializing and starting a system service. The type is void (*)(void).
priorityIndicates the calling priority when starting the system service phase. The value range is [0,5), and the calling sequence is 0, 1, 2, 3, and 4.
- diff --git "a/api/api-LinkIoT/OpenHarmony\345\206\205\346\240\270.md" "b/api/api-LinkIoT/OpenHarmony\345\206\205\346\240\270.md" deleted file mode 100755 index d3191abac810739ed80c5517365cf30e66d8ded8..0000000000000000000000000000000000000000 --- "a/api/api-LinkIoT/OpenHarmony\345\206\205\346\240\270.md" +++ /dev/null @@ -1,5 +0,0 @@ -# OpenHarmony内核 - -- **[标准库](标准库.md)** - - diff --git a/api/api-LinkIoT/Parameter.md b/api/api-LinkIoT/Parameter.md deleted file mode 100755 index 94ba91bc64b3c84c902328bbdde0ecd5135e6478..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/Parameter.md +++ /dev/null @@ -1,783 +0,0 @@ -# Parameter - -## **Overview** - -Provides functions for obtaining system parameters. - -This module can obtain device information such as device type and manufacturer. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - -

File Name

-

Description

-

parameter.h

-

Declares functions for obtaining system parameters.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

GetParameter (const char *key, const char *def, char *value, unsigned int len)

-

int 

-

Obtains a system parameter matching the specified key.

-

SetParameter (const char *key, const char *value)

-

int 

-

Sets or updates a system parameter.

-

GetProductType (void)

-

char * 

-

Obtains the device type.

-

GetManufacture (void)

-

char * 

-

Obtains the device manufacturer.

-

GetBrand (void)

-

char * 

-

Obtains the device brand.

-

GetMarketName (void)

-

char * 

-

Obtains the device marketing name.

-

GetProductSeries (void)

-

char * 

-

Obtains the device series name.

-

GetProductModel (void)

-

char * 

-

Obtains the device authentication model.

-

GetSoftwareModel (void)

-

char * 

-

Obtains the device software model.

-

GetHardwareModel (void)

-

char * 

-

Obtains the device hardware model.

-

GetHardwareProfile (void)

-

char * 

-

Obtains the device hardware profile.

-

GetSerial (void)

-

char * 

-

Obtains the device serial number (SN).

-

GetOsName (void)

-

char * 

-

Obtains the operating system (OS) name.

-

GetDisplayVersion (void)

-

char * 

-

Obtains the software version visible to users.

-

GetBootloaderVersion (void)

-

char * 

-

Obtains the bootloader version of this device.

-

GetSecurityPatchTag (void)

-

char * 

-

Obtains the security patch tag.

-

GetAbiList (void)

-

char * 

-

Obtains the list of application binary interfaces (ABIs) supported on this device.

-

GetSdkApiLevel (void)

-

char * 

-

Obtains the SDK API level that matches the current system software.

-

GetFirstApiLevel (void)

-

char * 

-

Obtains the first SDK API level of the system software.

-

GetIncrementalVersion (void)

-

char * 

-

Obtains the incremental version.

-

GetVersionId (void)

-

char * 

-

Obtains the version ID.

-

GetBuildType (void)

-

char * 

-

Obtains the build type.

-

GetBuildUser (void)

-

char * 

-

Obtains the build account user name.

-

GetBuildHost (void)

-

char * 

-

Obtains the build host name.

-

GetBuildTime (void)

-

char * 

-

Obtains the version build time.

-

GetBuildRootHash (void)

-

char * 

-

Obtains the buildroot hash value of this version.

-
- -## **Details** - -## **Function Documentation** - -## GetAbiList\(\) - -``` -char* GetAbiList (void ) -``` - - **Description:** - -Obtains the list of application binary interfaces \(ABIs\) supported on this device. - -The interfaces in the ABI list are separated by commas \(,\). This function is available only for an OS with an ecosystem accommodating native applications. - -**Returns:** - -Returns the ABI list if a result is found; returns **NULL** otherwise. The return result is released by the caller. - - - -## GetBootloaderVersion\(\) - -``` -char* GetBootloaderVersion (void ) -``` - - **Description:** - -Obtains the bootloader version of this device. - -The bootloader version can have a maximum length of 64 characters. - -**Returns:** - -Returns the bootloader version if a result is found; returns **NULL** otherwise. The return result is released by the caller. - - - -## GetBrand\(\) - -``` -char* GetBrand (void ) -``` - - **Description:** - -Obtains the device brand. - -The device brand can have a maximum length of 32 characters. - -**Returns:** - -Returns the device brand if a result is found; returns **NULL** otherwise. The return result is released by the caller. - - - -## GetBuildHost\(\) - -``` -char* GetBuildHost (void ) -``` - - **Description:** - -Obtains the build host name. - -The build host name can have a maximum length of 32 characters. - -**Returns:** - -Returns the build host name if a result is found; returns **NULL** otherwise. The return result is released by the caller. - - - -## GetBuildRootHash\(\) - -``` -char* GetBuildRootHash (void ) -``` - - **Description:** - -Obtains the buildroot hash value of this version. - -The buildroot hash value is represented by the root hash value in the software version hash tree. - -**Returns:** - -Returns the buildroot hash value if a result is found; returns **NULL** otherwise. The return result is released by the caller. - - - -## GetBuildTime\(\) - -``` -char* GetBuildTime (void ) -``` - - **Description:** - -Obtains the version build time. - -The version build time is represented by the number of milliseconds elapsed since 1970-01-01 00:00:00 GMT. - -**Returns:** - -Returns the version build time if a result is found; returns **NULL** otherwise. The return result is released by the caller. - - - -## GetBuildType\(\) - -``` -char* GetBuildType (void ) -``` - - **Description:** - -Obtains the build type. - -Different build types with the same baseline codes will be returned, for example, **debug/release** and **log/nolog**. Multiple build types can be separated by semicolons \(;\). - -**Returns:** - -Returns the build type if a result is found; returns **NULL** otherwise. The return result is released by the caller. - - - -## GetBuildUser\(\) - -``` -char* GetBuildUser (void ) -``` - - **Description:** - -Obtains the build account user name. - -The build account user name can have a maximum length of 32 characters. - -**Returns:** - -Returns the build account user name if a result is found; returns **NULL** otherwise. The return result is released by the caller. - - - -## GetDisplayVersion\(\) - -``` -char* GetDisplayVersion (void ) -``` - - **Description:** - -Obtains the software version visible to users. - -The software version visible to users can have a maximum length of 64 characters. - -**Returns:** - -Returns the software version visible to users if a result is found; returns **NULL** otherwise. The return result is released by the caller. - - - -## GetFirstApiLevel\(\) - -``` -char* GetFirstApiLevel (void ) -``` - - **Description:** - -Obtains the first SDK API level of the system software. - -In general, the first SDK API level is an integer. This function is only available for an OS with an ecosystem. - -**Returns:** - -Returns the first SDK API level if a result is found; returns **NULL** otherwise. The return result is released by the caller. - - - -## GetHardwareModel\(\) - -``` -char* GetHardwareModel (void ) -``` - - **Description:** - -Obtains the device hardware model. - -The device hardware model can have a maximum length of 32 characters. - -**Returns:** - -Returns the device hardware model if a result is found; returns **NULL** otherwise. The return result is released by the caller. - - - -## GetHardwareProfile\(\) - -``` -char* GetHardwareProfile (void ) -``` - - **Description:** - -Obtains the device hardware profile. - -The device hardware profile is a string in JSON format and has a maximum length of 1000 characters. - -**Returns:** - -Returns the device hardware profile if a result is found; returns **NULL** otherwise. The return result is released by the caller. The JSON field in the device hardware profile is defined as follows: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Description

-

key

-

Audio playback

-

aout

-

Display

-

display

-

Camera

-

camera

-

2D acceleration capability

-

DMA_2D

-

Random-access memory

-

RAM

-

Read-only memory

-

ROM

-

Graphics processing unit

-

GPU

-

Neural-network processing unit

-

NPU

-

Radio

-

radio

-

Bluetooth

-

bluetooth

-

Wi-Fi

-

WIFI

-

USB

-

usbhost

-
- -## GetIncrementalVersion\(\) - -``` -char* GetIncrementalVersion (void ) -``` - - **Description:** - -Obtains the incremental version. - -The incremental version can be used as the unique software version when the device model is the same. - -**Returns:** - -Returns the incremental version if a result is found; returns **NULL** otherwise. The return result is released by the caller. - - - -## GetManufacture\(\) - -``` -char* GetManufacture (void ) -``` - - **Description:** - -Obtains the device manufacturer. - -The device manufacturer can have a maximum length of 32 characters. - -**Returns:** - -Returns the device manufacturer if a result is found; returns **NULL** otherwise. The return result is released by the caller. - - - -## GetMarketName\(\) - -``` -char* GetMarketName (void ) -``` - - **Description:** - -Obtains the device marketing name. - -The device marketing name can have a maximum length of 32 characters. - -**Returns:** - -Returns the device marketing name if a result is found; returns **NULL** otherwise. The return result is released by the caller. - - - -## GetOsName\(\) - -``` -char* GetOsName (void ) -``` - - **Description:** - -Obtains the operating system \(OS\) name. - -The device OS name can have a maximum length of 32 characters. - -**Returns:** - -Returns the device OS name if a result is found; returns **NULL** otherwise. The return result is released by the caller. - - - -## GetParameter\(\) - -``` -int GetParameter (const char * key, const char * def, char * value, unsigned int len ) -``` - - **Description:** - -Obtains a system parameter matching the specified **key**. - -If no system parameter is found, the **def** parameter will be returned. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the key for the system parameter to query. The value can contain lowercase letters, digits, underscores (_), and dots (.). Its length cannot exceed 32 bytes (including the end-of-text character in the string).
defIndicates the default value to return when no query result is found. This parameter is specified by the caller.
valueIndicates the data buffer that stores the query result. This parameter is applied for and released by the caller and can be used as an output parameter.
lenIndicates the length of the data in the buffer.
- -**Returns:** - -Returns the number of bytes of the system parameter if the operation is successful; returns **-9** if a parameter is incorrect; returns **-1** in other scenarios. - - - -## GetProductModel\(\) - -``` -char* GetProductModel (void ) -``` - - **Description:** - -Obtains the device authentication model. - -The device authentication model can have a maximum length of 32 characters. - -**Returns:** - -Returns the device authentication model if a result is found; returns **NULL** otherwise. The return result is released by the caller. - - - -## GetProductSeries\(\) - -``` -char* GetProductSeries (void ) -``` - - **Description:** - -Obtains the device series name. - -The device series name can have a maximum length of 32 characters. - -**Returns:** - -Returns the device series name if a result is found; returns **NULL** otherwise. The return result is released by the caller. - - - -## GetProductType\(\) - -``` -char* GetProductType (void ) -``` - - **Description:** - -Obtains the device type. - -The device type can have a maximum length of 32 characters. - -**Returns:** - -Returns the device type if a result is found, for example, returns **wifiiot** if the application is running on a Wi-Fi connected IoT device; returns **NULL** otherwise. The return result is released by the caller. - - - -## GetSdkApiLevel\(\) - -``` -char* GetSdkApiLevel (void ) -``` - - **Description:** - -Obtains the SDK API level that matches the current system software. - -In general, the SDK API level is an integer. This function is only available for an OS with an ecosystem. - -**Returns:** - -Returns the SDK API level if a result is found; returns **NULL** otherwise. The return result is released by the caller. - - - -## GetSecurityPatchTag\(\) - -``` -char* GetSecurityPatchTag (void ) -``` - - **Description:** - -Obtains the security patch tag. - -**Returns:** - -Returns the security patch tag if a result is found; returns **NULL** otherwise. The return result is released by the caller. - - - -## GetSerial\(\) - -``` -char* GetSerial (void ) -``` - - **Description:** - -Obtains the device serial number \(SN\). - -The device SN can have a maximum length of 64 characters. - -**Returns:** - -Returns the device SN if a result is found; returns **NULL** otherwise. The return result is released by the caller. - - - -## GetSoftwareModel\(\) - -``` -char* GetSoftwareModel (void ) -``` - - **Description:** - -Obtains the device software model. - -The device software model can have a maximum length of 32 characters. - -**Returns:** - -Returns the device software model if a result is found; returns **NULL** otherwise. The return result is released by the caller. - - - -## GetVersionId\(\) - -``` -char* GetVersionId (void ) -``` - - **Description:** - -Obtains the version ID. - -The version ID can have a maximum length of 127 characters. It is the unique identifier of a device. - -**Returns:** - -Returns the version ID if a result is found; returns **NULL** otherwise. The return result is released by the caller. - - - -## SetParameter\(\) - -``` -int SetParameter (const char * key, const char * value ) -``` - - **Description:** - -Sets or updates a system parameter. - -You can use this function to set a system parameter that matches **key** as **value**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the key for the parameter to set or update. The value can contain lowercase letters, digits, underscores (_), and dots (.). Its length cannot exceed 32 bytes (including the end-of-text character in the string).
valueIndicates the system parameter value. Its length cannot exceed 128 bytes (including the end-of-text character in the string).
- -**Returns:** - -Returns **0** if the operation is successful; returns **-9** if a parameter is incorrect; returns **-1** in other scenarios. - - - diff --git a/api/api-LinkIoT/Power.md b/api/api-LinkIoT/Power.md deleted file mode 100755 index e07d68af2bed460205451aa34615278e3d4ac018..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/Power.md +++ /dev/null @@ -1,262 +0,0 @@ -# Power - -## **Overview** - -Provides device power management functions. - -This module is used to reboot the device and set low power consumption for the device. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - - - - -

File Name

-

Description

-

lowpower.h

-

Sets low power consumption for the device.

-

reset.h

-

Reboots the device.

-
- -## Enumerations - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

LpcType { NO_SLEEP, LIGHT_SLEEP, DEEP_SLEEP }

-

Enumerates low power consumption modes.

-

RebootCause {   SYS_REBOOT_CAUSE_UNKNOWN = 0, SYS_REBOOT_CAUSE_CMD, SYS_REBOOT_CAUSE_UPG, SYS_REBOOT_CAUSE_UPG_B,   SYS_REBOOT_CAUSE_WIFI_MODE, SYS_REBOOT_CAUSE_USR_NORMAL_REBOOT, SYS_REBOOT_CAUSE_USR0, SYS_REBOOT_CAUSE_USR1,   SYS_REBOOT_CAUSE_AT_BUSY, SYS_REBOOT_CAUSE_MAX }

-

Enumerates reboot causes.

-
- -## Functions - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

LpcInit (void)

-

unsigned int 

-

Initializes low power consumption.

-

LpcSetType (LpcType type)

-

unsigned int 

-

Sets low power consumption for the device.

-

RebootDevice (RebootCause cause)

-

void 

-

Reboots the device using different causes.

-
- -## **Details** - -## **Enumeration Type Documentation** - -## LpcType - -``` -enum [LpcType](Power.md#gaa6139ca73fa81742134fe74345ccb748) -``` - - **Description:** - -Enumerates low power consumption modes. - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
NO_SLEEP 

No sleep

-
LIGHT_SLEEP 

Light sleep

-
DEEP_SLEEP 

Deep sleep

-
- -## RebootCause - -``` -enum [RebootCause](Power.md#gaeac1b873015f5b0a8aa7f3c068507426) -``` - - **Description:** - -Enumerates reboot causes. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
SYS_REBOOT_CAUSE_UNKNOWN 

Unknown cause

-
SYS_REBOOT_CAUSE_CMD 

System reboot

-
SYS_REBOOT_CAUSE_UPG 

Reboot upon an upgrade

-
SYS_REBOOT_CAUSE_UPG_B 

Reboot upon an upgrade on the backup partition

-
SYS_REBOOT_CAUSE_WIFI_MODE 

Reboot in Wi-Fi mode

-
SYS_REBOOT_CAUSE_USR_NORMAL_REBOOT 

Normal reboot

-
SYS_REBOOT_CAUSE_USR0 

Custom cause 0

-
SYS_REBOOT_CAUSE_USR1 

Custom cause 1

-
SYS_REBOOT_CAUSE_AT_BUSY 

Reboot upon busy AT commands

-
SYS_REBOOT_CAUSE_MAX 

Maximum value

-
- -## **Function Documentation** - -## LpcInit\(\) - -``` -unsigned int LpcInit (void ) -``` - - **Description:** - -Initializes low power consumption. - -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; Returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## LpcSetType\(\) - -``` -unsigned int LpcSetType ([LpcType](Power.md#gaa6139ca73fa81742134fe74345ccb748) type) -``` - - **Description:** - -Sets low power consumption for the device. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
typeIndicates the low power consumption mode to set.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; Returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## RebootDevice\(\) - -``` -void RebootDevice ([RebootCause](Power.md#gaeac1b873015f5b0a8aa7f3c068507426) cause) -``` - - **Description:** - -Reboots the device using different causes. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
causeIndicates the reboot cause.
- diff --git a/api/api-LinkIoT/Provider.md b/api/api-LinkIoT/Provider.md deleted file mode 100755 index f43ac7deaa94ec1ec1f11f0e0882f8e48784a671..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/Provider.md +++ /dev/null @@ -1,78 +0,0 @@ -# Provider - -## **Overview** - -**Related Modules:** - -[Broadcast](Broadcast.md) - -**Description:** - -Defines the provider of events and data of a topic. - -## **Summary** - -## Data Fields - - - - - - - - - - -

Variable Name

-

Description

-

Publish )(IUnknown *iUnknown, const Topic *topic, uint8 *data, int16 len)

-

BOOL(* 

-

Publishes events and data of a specified topic.

-
- -## **Details** - -## **Field Documentation** - -## Publish - -``` -BOOL(* Provider::Publish) ([IUnknown](IUnknown.md) *iUnknown, const [Topic](Broadcast.md#gaf03f5bc94cad32ab628a6cdee09b0542) *topic, uint8 *data, int16 len) -``` - - **Description:** - -Publishes events and data of a specified topic. - -The events or data is published by the publisher, sent to all consumers who have subscribed to the topic, and processed by the consumers. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
iUnknownIndicates external interface of the pub/sub feature.
topicIndicates the pointer to the topic to publish.
dataIndicates the pointer to the data to publish.
lenIndicates the length of the data to be published. The length must be the same as the data length. The caller must ensure the validity of this parameter.
- -**Returns:** - -Returns **TRUE** if the topic is successfully published; returns **FALSE** otherwise. - - - diff --git a/api/api-LinkIoT/PublishInfo.md b/api/api-LinkIoT/PublishInfo.md deleted file mode 100755 index 7f1747901aaecddbe4ade67efcebb5591c3d5ad8..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/PublishInfo.md +++ /dev/null @@ -1,61 +0,0 @@ -# PublishInfo - -## **Overview** - -**Related Modules:** - -[Softbus](Softbus.md) - -**Description:** - -Defines service provisioning information sent to a discovering device. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

publishId

-

int 

-

mode

-

int 

-

medium

-

ExchanageMedium 

-

freq

-

ExchangeFre 

-

capability

-

const char * 

-

capabilityData

-

unsigned char * 

-

dataLen

-

unsigned int 

-
- diff --git a/api/api-LinkIoT/Readme-CN.md b/api/api-LinkIoT/Readme-CN.md deleted file mode 100755 index b77e1ff02d62ad788acef0d7dcf3a06e9481c954..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/Readme-CN.md +++ /dev/null @@ -1,128 +0,0 @@ -# 联接类模组API - -- [OpenHarmony内核](OpenHarmony内核.md) - - [标准库](标准库.md) - - [CMSIS](CMSIS.md) - - [KAL](KAL.md) - -- [系统基础能力子系统集](系统基础能力子系统集.md) - - [公共通信子系统](公共通信子系统.md) - - [Wifiservice](Wifiservice.md) - - [Softbus](Softbus.md) - - - [服务框架子系统](服务框架子系统.md) - - [Broadcast](Broadcast.md) - - [Samgr](Samgr.md) - - [OHOS Init](OHOS-Init.md) - -- [基础软件服务子系统集及硬件服务子系统集](基础软件服务子系统集及硬件服务子系统集.md) - - [电源管理子系统](电源管理子系统.md) - - [Power](Power.md) - -- [公共基础库](公共基础库.md) - - [Utils子系统](Utils子系统.md) - - [Kv\_store](Kv_store.md) - - [Parameter](Parameter.md) - - [Utils\_config](Utils_config.md) - - [Utils\_file](Utils_file.md) - -- [IOT平台](IOT平台.md) - - [IOT子系统](IOT子系统.md) - - [Wifiiot](Wifiiot.md) - -- [头文件和结构体](头文件和结构体.md) - - [头文件](头文件.md) - - [common.h](common-h.md) - - [discovery\_service.h](discovery_service-h.md) - - [feature.h](feature-h.md) - - [iunknown.h](iunknown-h.md) - - [kal.h](kal-h.md) - - [kv\_store.h](kv_store-h.md) - - [lowpower.h](lowpower-h.md) - - [message.h](message-h.md) - - [ohos\_init.h](ohos_init-h.md) - - [parameter.h](parameter-h.md) - - [reset.h](reset-h.md) - - [session.h](session-h.md) - - [station\_info.h](station_info-h.md) - - [samgr\_lite.h](samgr_lite-h.md) - - [service.h](service-h.md) - - [utils\_config.h](utils_config-h.md) - - [utils\_file.h](utils_file-h.md) - - [wifi\_device.h](wifi_device-h.md) - - [wifi\_device\_config.h](wifi_device_config-h.md) - - [wifi\_error\_code.h](wifi_error_code-h.md) - - [wifi\_event.h](wifi_event-h.md) - - [wifi\_hotspot.h](wifi_hotspot-h.md) - - [wifi\_hotspot\_config.h](wifi_hotspot_config-h.md) - - [wifi\_linked\_info.h](wifi_linked_info-h.md) - - [wifi\_scan\_info.h](wifi_scan_info-h.md) - - [wifiiot\_adc.h](wifiiot_adc-h.md) - - [wifiiot\_at.h](wifiiot_at-h.md) - - [wifiiot\_errno.h](wifiiot_errno-h.md) - - [wifiiot\_flash.h](wifiiot_flash-h.md) - - [wifiiot\_flash\_ex.h](wifiiot_flash_ex-h.md) - - [wifiiot\_gpio.h](wifiiot_gpio-h.md) - - [wifiiot\_gpio\_ex.h](wifiiot_gpio_ex-h.md) - - [wifiiot\_i2c.h](wifiiot_i2c-h.md) - - [wifiiot\_i2c\_ex.h](wifiiot_i2c_ex-h.md) - - [wifiiot\_i2s.h](wifiiot_i2s-h.md) - - [wifiiot\_kal.h](wifiiot_kal-h.md) - - [wifiiot\_partition.h](wifiiot_partition-h.md) - - [wifiiot\_pwm.h](wifiiot_pwm-h.md) - - [wifiiot\_sdio.h](wifiiot_sdio-h.md) - - [wifiiot\_spi.h](wifiiot_spi-h.md) - - [wifiiot\_uart.h](wifiiot_uart-h.md) - - [wifiiot\_uart\_ex.h](wifiiot_uart_ex-h.md) - - [wifiiot\_watchdog.h](wifiiot_watchdog-h.md) - - - [结构体](结构体.md) - - [AtCmdTbl](AtCmdTbl.md) - - [Consumer](Consumer.md) - - [CapabilityMap](CapabilityMap.md) - - [CommonDeviceInfo](CommonDeviceInfo.md) - - [DeviceMap](DeviceMap.md) - - [Feature](Feature.md) - - [HotspotConfig](HotspotConfig.md) - - [IPublishCallback](IPublishCallback.md) - - [ISessionListener](ISessionListener.md) - - [IUnknown](IUnknown.md) - - [IUnknownEntry](IUnknownEntry.md) - - [Identity](Identity.md) - - [MemInfo](MemInfo.md) - - [Provider](Provider.md) - - [PublishInfo](PublishInfo.md) - - [Request](Request.md) - - [Response](Response.md) - - [Subscriber](Subscriber.md) - - [StationInfo](StationInfo.md) - - [SimpleVector](SimpleVector.md) - - [SamgrLite](SamgrLite.md) - - [Service](Service.md) - - [ThreadInfo](ThreadInfo.md) - - [TaskConfig](TaskConfig.md) - - [WifiDeviceConfig](WifiDeviceConfig.md) - - [WifiScanParams](WifiScanParams.md) - - [WifiEvent](WifiEvent.md) - - [WifiLinkedInfo](WifiLinkedInfo.md) - - [WifiScanInfo](WifiScanInfo.md) - - [WifiIotI2cData](WifiIotI2cData.md) - - [WifiIotI2cFunc](WifiIotI2cFunc.md) - - [WifiIotI2sAttribute](WifiIotI2sAttribute.md) - - [WifiIotFlashPartitionInfo](WifiIotFlashPartitionInfo.md) - - [WifiIotFlashPartitionTable](WifiIotFlashPartitionTable.md) - - [WifiIotSdioExtendFunc](WifiIotSdioExtendFunc.md) - - [WifiIotSdioAdmatable](WifiIotSdioAdmatable.md) - - [WifiIotSdioIntcallback](WifiIotSdioIntcallback.md) - - [WifiIotSpiCfgBasicInfo](WifiIotSpiCfgBasicInfo.md) - - [WifiIotSpiCfgInitParam](WifiIotSpiCfgInitParam.md) - - [WifiIotUartAttribute](WifiIotUartAttribute.md) - - [WifiIotUartExtraAttr](WifiIotUartExtraAttr.md) - - [osVersion\_t](osVersion_t.md) - - [osThreadAttr\_t](osThreadAttr_t.md) - - [osTimerAttr\_t](osTimerAttr_t.md) - - [osEventFlagsAttr\_t](osEventFlagsAttr_t.md) - - [osMutexAttr\_t](osMutexAttr_t.md) - - [osSemaphoreAttr\_t](osSemaphoreAttr_t.md) - - [osMessageQueueAttr\_t](osMessageQueueAttr_t.md) - diff --git a/api/api-LinkIoT/Request.md b/api/api-LinkIoT/Request.md deleted file mode 100755 index abf3d53dafae84ea1a186e0dd010fc026077dd26..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/Request.md +++ /dev/null @@ -1,92 +0,0 @@ -# Request - -## **Overview** - -**Related Modules:** - -[Samgr](Samgr.md) - -**Description:** - -Defines a request. - -You can use this structure to define the request that will be sent to a feature through the asynchronous function of [IUnknown](IUnknown.md). [Request](Request.md), which is data that is packed to send to a feature. If the data is not empty and the length is not 0, the system automatically releases the data. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

msgId

-

int16 

-

len

-

int16 

-

data

-

void * 

-

msgValue

-

uint32 

-
- -## **Details** - -## **Field Documentation** - -## data - -``` -void* Request::data -``` - - **Description:** - -Data content - -## len - -``` -int16 Request::len -``` - - **Description:** - -Data length - -## msgId - -``` -int16 Request::msgId -``` - - **Description:** - -Message ID - -## msgValue - -``` -uint32 Request::msgValue -``` - - **Description:** - -Message value, which is defined by developers - diff --git a/api/api-LinkIoT/Response.md b/api/api-LinkIoT/Response.md deleted file mode 100755 index 6965f60cac60bb4904d22280be4160f343592f54..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/Response.md +++ /dev/null @@ -1,62 +0,0 @@ -# Response - -## **Overview** - -**Related Modules:** - -[Samgr](Samgr.md) - -**Description:** - -Defines a response. - -This structure is used to send a response after the message processing function of a service or feature processes a request. If the data is not empty and the length is not 0, the system automatically releases the data. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

data

-

void * 

-

len

-

int16 

-
- -## **Details** - -## **Field Documentation** - -## data - -``` -void* Response::data -``` - - **Description:** - -Data content - -## len - -``` -int16 Response::len -``` - - **Description:** - -Data length - diff --git a/api/api-LinkIoT/Samgr.md b/api/api-LinkIoT/Samgr.md deleted file mode 100755 index 6dd1e2dbb16d653d37a6a610e9bf01954c1002bd..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/Samgr.md +++ /dev/null @@ -1,1525 +0,0 @@ -# Samgr - -## **Overview** - -Manages system capabilities. - -This module provides the development framework base of the service-oriented architecture \(SOA\). You can develop your own abilities based on the Samgr development framework. This module provides basic models of services, features, and functions, and registration and discovery capabilities. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - - - - - - - - - - - - - - - - -

File Name

-

Description

-

common.h

-

Provides common objects and functions for Samgr and external modules.

-

feature.h

-

Defines the base class of a feature.

-

iunknown.h

-

Provides the base class and default implementation for external functions of system capabilities.

-

message.h

-

Provides message communication APIs that help you to implement asynchronous functions of IUnknown.

-

samgr_lite.h

-

Manages system capabilities.

-

service.h

-

Provides basic types and constants of services.

-
- -## Data Structures - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

SimpleVector

-

Defines the simplified vector class, which is extended by four elements.

-

Feature

-

Defines the base class of a feature.

-

IUnknown

-

Defines the IUnknown class.

-

IUnknownEntry

-

Defines the IUnknown implementation class.

-

Identity

-

Identifies a service and feature.

-

Request

-

Defines a request.

-

Response

-

Defines a response.

-

SamgrLite

-

Represents the system ability management class.

-

TaskConfig

-

Defines task configurations for a service.

-

Service

-

Indicates the basic type of a service.

-
- -## Macros - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

GET_OFFSIZE(T, member)   (long)((char *)&(((T *)(0))->member))

-

Calculates the offset of the member in the T type.

-

INHERIT_FEATURE

-

Inherits from the macro of the feature class.

-

DEFAULT_VERSION   0x20

-

Defines the default IUnknown version. You can customize the version.

-

INHERIT_IUNKNOWN

-

Defines the macro for inheriting the IUnknown interface.

-

INHERIT_IUNKNOWNENTRY(T)

-

Defines the macro for inheriting the classes that implement the IUnknown interface.

-

DEFAULT_IUNKNOWN_IMPL

-

Defines the default marco for initializing the IUnknown interface.

-

IUNKNOWN_ENTRY_BEGIN(version)

-

Defines the macro for initializing the classes that implement the IUnknown interface.

-

IUNKNOWN_ENTRY_END   }

-

IUnknown Defines the end macro for initializing the IUnknown implementation object.

-

GET_IUNKNOWN(T)   (IUnknown *)(&((T).iUnknown))

-

Obtains the pointer of the IUnknown interface object from the subclass object T (generic macro) of the IUnknown implementation class.

-

BOOTSTRAP_SERVICE    "Bootstrap"

-

Starts a bootstrap service, which is used by samgr and implemented by system service developers.

-

INHERIT_SERVICE

-

Indicates the macro used to inherit the members from the service class.

-
- -## Typedefs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Typedef Name

-

Description

-

Vector

-

typedef struct SimpleVector 

-

Defines the simplified vector class, which is extended by four elements.

-

IUnknownEntry

-

typedef struct IUnknownEntry 

-

Defines the IUnknown implementation class.

-

Handler) (const Request *request, const Response *response)

-

typedef void(* 

-

Handles asynchronous responses.

-

BootMessage

-

typedef enum BootMessage 

-

Enumerates the IDs of the message to be processed for starting the bootstrap service.

-

SamgrLite

-

typedef struct SamgrLite 

-

Represents the system ability management class.

-

TaskType

-

typedef enum TaskType 

-

Enumerates task types.

-

SpecifyTag

-

typedef enum SpecifyTag 

-

Specifies the tag for the task shared by multiple services.

-

TaskPriority

-

typedef enum TaskPriority 

-

Enumerates task priority.

-
- -## Enumerations - - - - - - - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

BootMessage { BOOT_SYS_COMPLETED, BOOT_APP_COMPLETED, BOOT_REG_SERVICE, BOOTSTRAP_BUTT }

-

Enumerates the IDs of the message to be processed for starting the bootstrap service.

-

TaskType { SHARED_TASK = 0, SINGLE_TASK = 1, SPECIFIED_TASK = 2, NO_TASK = 0xFF }

-

Enumerates task types.

-

SpecifyTag { LEVEL_HIGH = 0, LEVEL_MIDDLE = 1, LEVEL_LOW = 2, LEVEL_CUSTOM_BEGIN }

-

Specifies the tag for the task shared by multiple services.

-

TaskPriority {   PRI_LOW = 9, PRI_BELOW_NORMAL = 16, PRI_NORMAL = 24, PRI_ABOVE_NORMAL = 32,   PRI_BUTT = 39 }

-

Enumerates task priority.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

VECTOR_Make (VECTOR_Key key, VECTOR_Compare compare)

-

Vector 

-

Creates or initializes a vector object.

-

VECTOR_Clear (Vector *vector)

-

void 

-

Destruct a vector object.

-

VECTOR_Add (Vector *vector, void *element)

-

int16 

-

Adds an element to the vector.

-

VECTOR_Size (Vector *vector)

-

int16 

-

Obtains the number of elements in the vector, including elements that have been set to NULL.

-

VECTOR_Num (Vector *vector)

-

int16 

-

Obtains the number of valid elements in the vector, excluding elements that have been set to NULL.

-

VECTOR_At (Vector *vector, int16 index)

-

void * 

-

Obtains the element at a specified position.

-

VECTOR_Swap (Vector *vector, int16 index, void *element)

-

void * 

-

Swaps the element at a specified position in a vector with another element.

-

VECTOR_Find (Vector *vector, const void *element)

-

int16 

-

Checks the position of an element.

-

VECTOR_FindByKey (Vector *vector, const void *key)

-

int16 

-

Checks the position of the element with a specified key.

-

IUNKNOWN_AddRef (IUnknown *iUnknown)

-

int 

-

Increments the reference count in this IUnknown interface.

-

IUNKNOWN_QueryInterface (IUnknown *iUnknown, int ver, void **target)

-

int 

-

Queries the IUnknown interfaces of a specified version (downcasting).

-

IUNKNOWN_Release (IUnknown *iUnknown)

-

int 

-

Releases a reference to an IUnknown interface that is no longer used.

-

SAMGR_SendRequest (const Identity *identity, const Request *request, Handler handler)

-

int32 

-

Sends a request to a service or feature of a specified identity.

-

SAMGR_SendSharedRequest (const Identity *identity, const Request *request, uint32 *token, Handler handler)

-

uint32 * 

-

Sends a request to multiple services or features to save memory.

-

SAMGR_SendSharedDirectRequest (const Identity *id, const Request *req, const Response *resp, uint32 **ref, Handler handler)

-

int32 

-

Sends a request and response of a caller to the feature thread. The handler is directly called to process the request and response without using the message processing functions. (Customized function for the broadcast service)

-

SAMGR_SendResponse (const Request *request, const Response *response)

-

int32 

-

Sends a response after processing a request.

-

SAMGR_SendResponseByIdentity (const Identity *id, const Request *request, const Response *response)

-

int32 

-

Sends a response to a specified service or feature after processing the original request. (Customized function for bootstrap)

-

SAMGR_GetInstance (void)

-

SamgrLite

-

Obtains the singleton Samgr instance.

-

SAMGR_Bootstrap (void)

-

void 

-

Starts system services and features.

-
- -## **Details** - -## **Macro Definition Documentation** - -## DEFAULT\_IUNKNOWN\_IMPL - -``` -#define DEFAULT_IUNKNOWN_IMPL -``` - -``` -Values: .QueryInterface = [IUNKNOWN_QueryInterface](Samgr.md#gac857d12648500c7dab1cb43e85ae2ed4), \ - - .AddRef = [IUNKNOWN_AddRef](Samgr.md#ga9abef49ec89bf913c3bed03faf478c1e), \ - - .Release = [IUNKNOWN_Release](Samgr.md#gabd462f8a5e6460a68760cd0719982296) - - -``` - - **Description:** - -Defines the default marco for initializing the **[IUnknown](IUnknown.md)** interface. - -When creating a subclass object of the **[IUnknown](IUnknown.md)** interface, you can use this macro to initialize members of the **[IUnknown](IUnknown.md)** interface to their default values. - -## DEFAULT\_VERSION - -``` -#define DEFAULT_VERSION   0x20 -``` - - **Description:** - -Defines the default [IUnknown](IUnknown.md) version. You can customize the version. - -The **[IUnknown](IUnknown.md)** interface of the default version can be called only in the current process. Inter-process communication is not supported. - -## GET\_IUNKNOWN - -``` -#define GET_IUNKNOWN( T)   ([IUnknown](IUnknown.md) *)(&((T).iUnknown)) -``` - - **Description:** - -Obtains the pointer of the **[IUnknown](IUnknown.md)** interface object from the subclass object T \(generic macro\) of the **[IUnknown](IUnknown.md)** implementation class. - -Use this macro when registering **[IUnknown](IUnknown.md)** interfaces with Samgr so that you can obtain the interfaces from the subclass objects of different **[IUnknown](IUnknown.md)** implementation classes. - -## GET\_OFFSIZE - -``` -#define GET_OFFSIZE( T,  member )   (long)((char *)&(((T *)(0))->member)) -``` - - **Description:** - -Calculates the offset of the member in the T type. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
Indicatesthe T type.
memberIndicates the name of the T member variable.
- -## INHERIT\_FEATURE - -``` -#define INHERIT_FEATURE -``` - -``` -Values: const char *(*GetName)([Feature](Feature.md) *feature); \ - - void (*OnInitialize)([Feature](Feature.md) *feature, [Service](Service.md) *parent, [Identity](Identity.md) identity); \ - - void (*OnStop)([Feature](Feature.md) *feature, [Identity](Identity.md) identity); \ - - BOOL (*OnMessage)([Feature](Feature.md) *feature, [Request](Request.md) *request) - - -``` - - **Description:** - -Inherits from the macro of the feature class. - -This macro provides the capability of inheriting the feature lifecycle. - -## INHERIT\_IUNKNOWN - -``` -#define INHERIT_IUNKNOWN -``` - -``` -Values: int (*QueryInterface)([IUnknown](IUnknown.md) *iUnknown, int version, void **target); \ - - int (*AddRef)([IUnknown](IUnknown.md) *iUnknown); \ - - int (*Release)([IUnknown](IUnknown.md) *iUnknown) - - -``` - - **Description:** - -Defines the macro for inheriting the **[IUnknown](IUnknown.md)** interface. - -When developing a subclass of the **[IUnknown](IUnknown.md)** class, you can use this macro to inherit the structures of the **[IUnknown](IUnknown.md)** interface. - -## INHERIT\_IUNKNOWNENTRY - -``` -#define INHERIT_IUNKNOWNENTRY( T) -``` - -``` -Values: uint16 ver; \ - - int16 ref; \ - - T iUnknown - - -``` - - **Description:** - -Defines the macro for inheriting the classes that implement the **[IUnknown](IUnknown.md)** interface. - -When developing a subclass of a class that implements the **[IUnknown](IUnknown.md)** interface, you can use this macro to inherit the structures of the **[IUnknown](IUnknown.md)** implementation class. - -## INHERIT\_SERVICE - -``` -#define INHERIT_SERVICE -``` - -``` -Values: const char *(*GetName)([Service](Service.md) * service); \ - - BOOL (*Initialize)([Service](Service.md) * service, [Identity](Identity.md) identity); \ - - BOOL (*MessageHandle)([Service](Service.md) * service, [Request](Request.md) * request); \ - - TaskConfig (*GetTaskConfig)([Service](Service.md) * service) - - -``` - - **Description:** - -Indicates the macro used to inherit the members from the **service** class. - -This macro provides the capability of inheriting the lifecycle functions of the **service** class. You can use this macro to customize the service structure. - -## IUNKNOWN\_ENTRY\_BEGIN - -``` -#define IUNKNOWN_ENTRY_BEGIN( version) -``` - -``` -Values: .ver = (version), \ - - .ref = 1, \ - - .iUnknown = { \ - - DEFAULT_IUNKNOWN_IMPL - - -``` - - **Description:** - -Defines the macro for initializing the classes that implement the **[IUnknown](IUnknown.md)** interface. - -When creating a subclass object of a class that implements the **[IUnknown](IUnknown.md)** interface, you can use this macro to initialize members of the **[IUnknown](IUnknown.md)** implementation class to their default values. You need to add the initialization of the customized member variable. - -## IUNKNOWN\_ENTRY\_END - -``` -#define IUNKNOWN_ENTRY_END   } -``` - - **Description:** - -[IUnknown](IUnknown.md) Defines the end macro for initializing the **[IUnknown](IUnknown.md)** implementation object. - -This macro is used when a subclass object of the **[IUnknown](IUnknown.md)** implementation class is initialized. - -## **Typedef Documentation** - -## BootMessage - -``` -typedef enum [BootMessage](Samgr.md#gaf39e482610dca95f0dba85613755eb40) [BootMessage](Samgr.md#gaf39e482610dca95f0dba85613755eb40) -``` - - **Description:** - -Enumerates the IDs of the message to be processed for starting the bootstrap service. - -This function is implemented by developers of the system service. Messages sent to the bootstrap service when Samgr is started. - -## Handler - -``` -typedef void(* Handler) (const [Request](Request.md) *request, const [Response](Response.md) *response) -``` - - **Description:** - -Handles asynchronous responses. - -This function will be used when a service or feature uses [IUnknown](IUnknown.md) to send a request. If the caller is a feature, this function is used to handle the response that is sent after the feature processes a request. If the caller is a service, **Handler** will run in the service thread. - -## IUnknownEntry - -``` -typedef struct [IUnknownEntry](IUnknownEntry.md) [IUnknownEntry](IUnknownEntry.md) -``` - - **Description:** - -Defines the **[IUnknown](IUnknown.md)** implementation class. - -You need to inherit this structure when developing a subclass of the **[IUnknown](IUnknown.md)** implementation class. Each **[IUnknown](IUnknown.md)** interface must correspond to one or more **[IUnknown](IUnknown.md)** implementation classes. - -## SamgrLite - -``` -typedef struct [SamgrLite](SamgrLite.md) [SamgrLite](SamgrLite.md) -``` - - **Description:** - -Represents the system ability management class. - -This class is used for registering and discovering services, features, and functions. - -## SpecifyTag - -``` -typedef enum [SpecifyTag](Samgr.md#ga704a59a45a705ef7a15d16e3cab8c1b0) [SpecifyTag](Samgr.md#ga704a59a45a705ef7a15d16e3cab8c1b0) -``` - - **Description:** - -Specifies the tag for the task shared by multiple services. - -These enumerations are used for specifying a multi-service sharing task. - -## TaskPriority - -``` -typedef enum [TaskPriority](Samgr.md#gaee057e5f06a7b2533e6f58bde34d15fa) [TaskPriority](Samgr.md#gaee057e5f06a7b2533e6f58bde34d15fa) -``` - - **Description:** - -Enumerates task priority. - -These enumerations are used for configuring the task priority. The valid range of the priority is \(9, 39\). - -## TaskType - -``` -typedef enum [TaskType](Samgr.md#ga026844c14ab62f42a2e19b54d622609b) [TaskType](Samgr.md#ga026844c14ab62f42a2e19b54d622609b) -``` - - **Description:** - -Enumerates task types. - -These enumerations are used for configuring the task type. - -## Vector - -``` -typedef struct [SimpleVector](SimpleVector.md) [Vector](Samgr.md#ga255ca81c214b8a94a90f786ceef94514) -``` - - **Description:** - -Defines the simplified vector class, which is extended by four elements. - -This class is applicable to the C language development scenario where the data volume is small and dynamic expansion is required. - -## **Enumeration Type Documentation** - -## BootMessage - -``` -enum [BootMessage](Samgr.md#gaf39e482610dca95f0dba85613755eb40) -``` - - **Description:** - -Enumerates the IDs of the message to be processed for starting the bootstrap service. - -This function is implemented by developers of the system service. Messages sent to the bootstrap service when Samgr is started. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
BOOT_SYS_COMPLETED 

Message indicating that the core system service is initialized

-
BOOT_APP_COMPLETED 

Message indicating that the system and application-layer services are initialized

-
BOOT_REG_SERVICE 

Message indicating service registration during running

-
BOOTSTRAP_BUTT 

Maximum number of message IDs

-
- -## SpecifyTag - -``` -enum [SpecifyTag](Samgr.md#ga704a59a45a705ef7a15d16e3cab8c1b0) -``` - - **Description:** - -Specifies the tag for the task shared by multiple services. - -These enumerations are used for specifying a multi-service sharing task. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
LEVEL_HIGH 

Preset tag

-
LEVEL_MIDDLE 

Preset tag

-
LEVEL_LOW 

Preset tag

-
LEVEL_CUSTOM_BEGIN 

Customized tag

-
- -## TaskPriority - -``` -enum [TaskPriority](Samgr.md#gaee057e5f06a7b2533e6f58bde34d15fa) -``` - - **Description:** - -Enumerates task priority. - -These enumerations are used for configuring the task priority. The valid range of the priority is \(9, 39\). - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
PRI_LOW 

Low-priority: (9, 15)

-
PRI_BELOW_NORMAL 

Lower than the normal priority: [16, 23)

-
PRI_NORMAL 

Normal priority: [24, 31). The log service is available.

-
PRI_ABOVE_NORMAL 

Higher than the normal priority: [32, 39). The communication service is available.

-
PRI_BUTT 

Upper limit of the priority

-
- -## TaskType - -``` -enum [TaskType](Samgr.md#ga026844c14ab62f42a2e19b54d622609b) -``` - - **Description:** - -Enumerates task types. - -These enumerations are used for configuring the task type. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
SHARED_TASK 

Tasks shared based on their priority by services

-
SINGLE_TASK 

Task exclusively occupied by a service

-
SPECIFIED_TASK 

A specified task shared by multiple services

-
NO_TASK 

No task for the service. Generally, this situation does not occur.

-
- -## **Function Documentation** - -## IUNKNOWN\_AddRef\(\) - -``` -int IUNKNOWN_AddRef ([IUnknown](IUnknown.md) * iUnknown) -``` - - **Description:** - -Increments the reference count in this **[IUnknown](IUnknown.md)** interface. - -This function is called in **QueryInterface**. Do not call this function in the **[IUnknown](IUnknown.md)** interface. When the **QueryInterface** function is re-implemented, you need to call this function in the new **QueryInterface**.**** - -****The system does not provide a lock to protect functions. Therefore, you need to re-implement functions if multiple developers are using them. **** - -**Parameters:** - -## IUNKNOWN\_QueryInterface\(\) - -``` -int IUNKNOWN_QueryInterface ([IUnknown](IUnknown.md) * iUnknown, int ver, void ** target ) -``` - - **Description:** - -Queries the **[IUnknown](IUnknown.md)** interfaces of a specified version \(downcasting\). - -After obtaining the **[IUnknown](IUnknown.md)** interface object, the function caller uses **QueryInterface** to convert the object to the required subclass type. The system converts [DEFAULT\_VERSION](Samgr.md#ga13dae059206df8d2d9b9b42e694b3f9c) into the subclass type required by the caller. If the type conversion requirements cannot be met, you need to re-implement this function. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
iUnknownIndicates the pointer to the IUnknown interface.
versionIndicates the version of the IUnknown interface object to be converted.
targetIndicates the IUnknown subclass type required by the caller. This is an output parameter.
- -**Returns:** - -Returns **EC\_SUCCESS** if the conversion is successful; returns other error codes if the conversion fails. - - - -## IUNKNOWN\_Release\(\) - -``` -int IUNKNOWN_Release ([IUnknown](IUnknown.md) * iUnknown) -``` - - **Description:** - -Releases a reference to an **[IUnknown](IUnknown.md)** interface that is no longer used. - -In the default implementation provided by the system, if the reference count is **0**, the memory of the **[IUnknown](IUnknown.md)** interface object and implementation object is not released. If the memory of the **[IUnknown](IUnknown.md)** interface object and implementation object is dynamically allocated, this function needs to be re-implemented. If the reference count is **0**, the memory of the **[IUnknown](IUnknown.md)** interface object and implementation object is released. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
iUnknownIndicates the pointer to the IUnknown interface object.
- -**Returns:** - -**** Indicates the number of **[IUnknown](IUnknown.md)** interface objects that are referenced after the current reference is released.******** - -## SAMGR\_Bootstrap\(\) - -``` -void SAMGR_Bootstrap (void ) -``` - - **Description:** - -Starts system services and features. - -This function is called in the **main** function to start all services when an independent process is developed. This function is called after the dynamic library \(containing system services and features\) is loaded during system running. - -**Attention:** - -This function cannot be called frequently. Otherwise, problems such as repeated service startup may occur. It is recommended that this function be called once in the **main** function or after the dynamic library is loaded. - - - -## SAMGR\_GetInstance\(\) - -``` -[SamgrLite](SamgrLite.md)* SAMGR_GetInstance (void ) -``` - - **Description:** - -Obtains the singleton Samgr instance. - -You need to call this function before using the Samgr capabilities. - -**Returns:** - -Returns the pointer to the singleton instance [SamgrLite](SamgrLite.md). - - - -## SAMGR\_SendRequest\(\) - -``` -int32 SAMGR_SendRequest (const [Identity](Identity.md) * identity, const [Request](Request.md) * request, [Handler](Samgr.md#ga5e13d943cc6a87a5c99fe604f3bc01e4) handler ) -``` - - **Description:** - -Sends a request to a service or feature of a specified identity. - -This function is called by a service to send messages to its own features through the asynchronous function of [IUnknown](IUnknown.md). - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
identityIndicates the pointer to the ID of the feature or service that processes the message.
requestIndicates the pointer to the request.
handlerIndicates the function handling the response. If the value is NULL, no response is required.
- -**Returns:** - -Returns **EC\_SUCCESS** if the request is sent successfully; returns other error codes if the request fails to be sent. The caller needs to release the memory applied in the request. - - - -## SAMGR\_SendResponse\(\) - -``` -int32 SAMGR_SendResponse (const [Request](Request.md) * request, const [Response](Response.md) * response ) -``` - - **Description:** - -Sends a response after processing a request. - -This function is called to send a response after processing a request by **MessageHandle** of a service or **OnMessage** of a feature. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
requestIndicates the pointer to the original request.
responseIndicates the pointer to the response content.
- -**Returns:** - -Returns **EC\_SUCCESS** if the response is sent successfully; returns other error codes if the response fails to be sent. - -**Attention:** - -- This function can be called only in **MessageHandle** or **OnMessage**. -- The request must be the original one passed from **MessageHandle** or **OnMessage**. Otherwise, a memory exception occurs. -- When the caller sends a request, the **handler** callback function must be carried. -- The response is sent to the message queue of the service to which the requester belongs for processing. Therefore, the requester should wait for the response in non-blocking mode. - -## SAMGR\_SendResponseByIdentity\(\) - -``` -int32 SAMGR_SendResponseByIdentity (const [Identity](Identity.md) * id, const [Request](Request.md) * request, const [Response](Response.md) * response ) -``` - - **Description:** - -Sends a response to a specified service or feature after processing the original request. \(Customized function for **bootstrap**\) - -This function is called to send a response after processing a request by **MessageHandle** of a service or **OnMessage** of a feature. This function can be customized to implement phased startup of different types of services. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the pointer to the ID of a service or feature. The response is sent to the thread of the service or feature for processing.
requestIndicates the pointer to the original request.
responseIndicates the pointer to the response content.
- -**Returns:** - -Returns **EC\_SUCCESS** if the response is sent successfully; returns other error codes if the response fails to be sent. - -**Attention:** - -- This function can be called only in **MessageHandle** or **OnMessage**. -- The request must be the original one passed from **MessageHandle** or **OnMessage**. Otherwise, a memory exception occurs. -- When the caller sends a request, the **handler** callback function must be carried. -- The response is sent to the message queue of a specified ID for processing. Therefore, wait for the response in non-blocking mode. - -## SAMGR\_SendSharedDirectRequest\(\) - -``` -int32 SAMGR_SendSharedDirectRequest (const [Identity](Identity.md) * id, const [Request](Request.md) * req, const [Response](Response.md) * resp, uint32 ** ref, [Handler](Samgr.md#ga5e13d943cc6a87a5c99fe604f3bc01e4) handler ) -``` - - **Description:** - -Sends a request and response of a caller to the feature thread. The handler is directly called to process the request and response without using the message processing functions. \(Customized function for the broadcast service\) - -This function is used to publish topics for the [Broadcast](Broadcast.md) service to broadcast messages. The value of reference counting is incremented by one each time this function is called. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the pointer to the IDs of services or features, to which the request and response are sent.
requestIndicates the pointer to the request.
respIndicates the pointer to the response.
refIndicates the reference counting.
handlerIndicates the function for handling the request and response. This parameter cannot be NULL.
- -**Returns:** - -Returns **EC\_SUCCESS** if the request and response are sent successfully; returns other error codes if the request and response fail to be sent. - -**Attention:** - -- Ensure that the thread specified by **identity** processes the message after all messages are sent. Common practice: Add a lock before sending a request and add the same lock during processing. -- If **NULL** is returned, the caller needs to release the memory of the request and response. -- If the response changes each time when a request is sent, ensure that the response will not be released. \(Set **len** to **0**, the **data** of response will be the resident memory.\) - -## SAMGR\_SendSharedRequest\(\) - -``` -uint32* SAMGR_SendSharedRequest (const [Identity](Identity.md) * identity, const [Request](Request.md) * request, uint32 * token, [Handler](Samgr.md#ga5e13d943cc6a87a5c99fe604f3bc01e4) handler ) -``` - - **Description:** - -Sends a request to multiple services or features to save memory. - -This function is used to publish topics for the [Broadcast](Broadcast.md) service to broadcast messages. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
identityIndicates the pointer to the IDs of services or features, to which requests are sent.
requestIndicates the pointer to the request.
tokenIndicates the pointer to reference counting.
handlerIndicates the function handling the response. If the value is NULL, no response is required.
- -**Attention:** - -- Ensure that the thread specified by **identity** processes the message after all messages are sent. Common practice: Add a lock before sending a request and add the same lock during processing. -- If **NULL** is returned, the caller needs to release the memory of the request. - -## VECTOR\_Add\(\) - -``` -int16 VECTOR_Add ([Vector](Samgr.md#ga255ca81c214b8a94a90f786ceef94514) * vector, void * element ) -``` - - **Description:** - -Adds an element to the vector. - -This function is used to add an element to the vector. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
vectorIndicates the this pointer to the vector.
elementIndicates the element to add.
- -**Returns:** - -Returns the location of the element to be added if the operation is successful; returns **INVALID\_INDEX** if the operation fails. - - - -## VECTOR\_At\(\) - -``` -void* VECTOR_At ([Vector](Samgr.md#ga255ca81c214b8a94a90f786ceef94514) * vector, int16 index ) -``` - - **Description:** - -Obtains the element at a specified position. - -This function is used to obtain the element at a specified position. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
vectorIndicates the this pointer to the vector.
indexIndicates the subscript to be obtained.
- -**Returns:** - -Returns the element if obtained; returns **NULL** otherwise. - - - -## VECTOR\_Clear\(\) - -``` -void VECTOR_Clear ([Vector](Samgr.md#ga255ca81c214b8a94a90f786ceef94514) * vector) -``` - - **Description:** - -Destruct a vector object. - -This function is used to clear the memory applied by the vector after the temporary vector in the stack is used. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
vectorIndicates the pointer to the vector to clear.
- -## VECTOR\_Find\(\) - -``` -int16 VECTOR_Find ([Vector](Samgr.md#ga255ca81c214b8a94a90f786ceef94514) * vector, const void * element ) -``` - - **Description:** - -Checks the position of an element. - -This function is used to check whether a vector has a specified element. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
vectorIndicates the this pointer to the vector.
elementIndicates the element to be checked.
- -**Returns:** - -Returns the index of the element that is not less than 0 if the check is successful; returns **INVALID\_INDEX** if the check fails. - - - -## VECTOR\_FindByKey\(\) - -``` -int16 VECTOR_FindByKey ([Vector](Samgr.md#ga255ca81c214b8a94a90f786ceef94514) * vector, const void * key ) -``` - - **Description:** - -Checks the position of the element with a specified key. - -This function is used to check an element based on its key value. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
vectorIndicates the this pointer to the vector.
keyIndicates the pointer to the key value of the element to check.
- -**Returns:** - -Returns the index of the key element that is not less than 0 if the check is successful; returns **INVALID\_INDEX** if the check fails. - - - -## VECTOR\_Make\(\) - -``` -[Vector](Samgr.md#ga255ca81c214b8a94a90f786ceef94514) VECTOR_Make (VECTOR_Key key, VECTOR_Compare compare ) -``` - - **Description:** - -Creates or initializes a vector object. - -This function is used to create or initialize a vector object. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the pointer to the function provided by users for converting data elements into key values. If this function is not provided, set it to NULL.
compareIndicates the pointer to the function for comparing the sizes of two elements. If this function is not provided, set it to NULL.
- -**Returns:** - -Returns the vector right value object. - - - -## VECTOR\_Num\(\) - -``` -int16 VECTOR_Num ([Vector](Samgr.md#ga255ca81c214b8a94a90f786ceef94514) * vector) -``` - - **Description:** - -Obtains the number of valid elements in the vector, excluding elements that have been set to **NULL**. - -This function is used to check whether the number of elements reaches the upper limit. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
vectorIndicates the this pointer to the vector.
- -**Returns:** - -Returns the top - free value of the vector, which indicates the number of non-null elements. - - - -## VECTOR\_Size\(\) - -``` -int16 VECTOR_Size ([Vector](Samgr.md#ga255ca81c214b8a94a90f786ceef94514) * vector) -``` - - **Description:** - -Obtains the number of elements in the vector, including elements that have been set to **NULL**. - -This function is used for full traversal. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
vectorIndicates the this pointer to the vector.
- -**Returns:** - -Returns the top value of the vector, which indicates the number of elements. - - - -## VECTOR\_Swap\(\) - -``` -void* VECTOR_Swap ([Vector](Samgr.md#ga255ca81c214b8a94a90f786ceef94514) * vector, int16 index, void * element ) -``` - - **Description:** - -Swaps the element at a specified position in a vector with another element. - -This function is used to clear, sort, or update elements in the vector. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
vectorIndicates the this pointer to the vector.
indexIndicates the position of the element to be swapped.
elementIndicates the pointer to the new element.
- -**Attention:** - -Before using this function, ensure that the index is valid. You can use **VECTOR\_Size** to obtain the upper limit of the index. - -**Returns:** - -Returns the original element if the swapping is successful; returns **NULL** if the swapping fails. - -**See also:** - -[VECTOR\_Size](Samgr.md#ga1432f30c136d14bc00414d883d8be3bd) - diff --git a/api/api-LinkIoT/SamgrLite.md b/api/api-LinkIoT/SamgrLite.md deleted file mode 100755 index 81662a312ef585f3acbc6e65c4d260018c3609f2..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/SamgrLite.md +++ /dev/null @@ -1,456 +0,0 @@ -# SamgrLite - -## **Overview** - -**Related Modules:** - -[Samgr](Samgr.md) - -**Description:** - -Represents the system ability management class. - -This class is used for registering and discovering services, features, and functions. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

RegisterService )(Service *service)

-

BOOL(* 

-

Registers a service.

-

UnregisterService )(const char *name)

-

Service *(* 

-

Unregisters a service.

-

RegisterFeature )(const char *serviceName, Feature *feature)

-

BOOL(* 

-

Registers a feature.

-

UnregisterFeature )(const char *serviceName, const char *featureName)

-

Feature *(* 

-

Unregisters a feature.

-

RegisterDefaultFeatureApi )(const char *service, IUnknown *publicApi)

-

BOOL(* 

-

Registers the API for the default feature of a service.

-

UnregisterDefaultFeatureApi )(const char *service)

-

IUnknown *(* 

-

Unregisters the API from the default feature of a service.

-

RegisterFeatureApi )(const char *service, const char *feature, IUnknown *publicApi)

-

BOOL(* 

-

Registers the API for a feature.

-

UnregisterFeatureApi )(const char *service, const char *feature)

-

IUnknown *(* 

-

Unregisters the API from a feature.

-

GetDefaultFeatureApi )(const char *service)

-

IUnknown *(* 

-

Obtains the API specific to the default feature.

-

GetFeatureApi )(const char *serviceName, const char *feature)

-

IUnknown *(* 

-

Obtains the API specific to the feature.

-
- -## **Details** - -## **Field Documentation** - -## GetDefaultFeatureApi - -``` -[IUnknown](IUnknown.md)*(* SamgrLite::GetDefaultFeatureApi) (const char *service) -``` - - **Description:** - -Obtains the API specific to the default feature. - -You need to call this function before using the system capabilities of the service involved. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
serviceIndicates the name of the service to which the default feature belongs.
- -**Returns:** - -Returns the **[IUnknown](IUnknown.md) \*** object that can be called if the operation is successful; returns **NULL** if the operation fails. - - - -## GetFeatureApi - -``` -[IUnknown](IUnknown.md)*(* SamgrLite::GetFeatureApi) (const char *serviceName, const char *feature) -``` - - **Description:** - -Obtains the API specific to the feature. - -You need to call this function before using the system capabilities of the service involved. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
serviceIndicates the name of the service to which the feature belongs.
featureIndicates the name of the feature whose API will be obtained.
- -**Returns:** - -Returns the **[IUnknown](IUnknown.md) \*** object that can be called if the operation is successful; returns **NULL** if the operation fails. - - - -## RegisterDefaultFeatureApi - -``` -BOOL(* SamgrLite::RegisterDefaultFeatureApi) (const char *service, [IUnknown](IUnknown.md) *publicApi) -``` - - **Description:** - -Registers the API for the default feature of a service. - -You need to call this function after the service is registered. The pointers to the [IUnknown](IUnknown.md) and [IUnknown](IUnknown.md) members to be registered cannot be empty. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
serviceIndicates the name of the service whose default feature's API will be registered.
publicApiIndicates the API to be registered.
- -**Returns:** - -Returns **TRUE** if the registration is successful; returns **FALSE** if the registration fails. - - - -## RegisterFeature - -``` -BOOL(* SamgrLite::RegisterFeature) (const char *serviceName, [Feature](Feature.md) *feature) -``` - - **Description:** - -Registers a feature. - -You need to call this function in the startup entry of each feature. [Feature](Feature.md) and [Feature](Feature.md) structure members to be registered cannot be empty. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
featureIndicates the feature to be registered.
- -**Returns:** - -Returns **TRUE** if the registration is successful; returns **FALSE** if the registration fails. - - - -## RegisterFeatureApi - -``` -BOOL(* SamgrLite::RegisterFeatureApi) (const char *service, const char *feature, [IUnknown](IUnknown.md) *publicApi) -``` - - **Description:** - -Registers the API for a feature. - -You can call this function only if the feature has been registered. The pointers to the [IUnknown](IUnknown.md) and [IUnknown](IUnknown.md) members to be registered cannot be empty. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
serviceIndicates the name of the service whose API will be registered.
featureIndicates the name of the feature whose API will be registered.
publicApiIndicates the API to be registered.
- -**Returns:** - -Returns **TRUE** if the registration is successful; returns **FALSE** if the registration fails. - - - -## RegisterService - -``` -BOOL(* SamgrLite::RegisterService) ([Service](Service.md) *service) -``` - - **Description:** - -Registers a service. - -You need to call this function in the startup entry of each service. [Service](Service.md) and [Service](Service.md) structure members to be registered cannot be empty. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
serviceIndicates the service to be registered.
- -**Returns:** - -Returns **TRUE** if the registration is successful; returns **FALSE** if the registration fails. - - - -## UnregisterDefaultFeatureApi - -``` -[IUnknown](IUnknown.md)*(* SamgrLite::UnregisterDefaultFeatureApi) (const char *service) -``` - - **Description:** - -Unregisters the API from the default feature of a service. - -You need to call this function to unregister [IUnknown](IUnknown.md) if the service to which the default feature belongs is no longer required. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
serviceIndicates the name of the service whose default feature's API will be unregistered.
- -**Returns:** - -Returns the unregistered function object if the unregistration is successful. The memory is released by the caller. Returns **NULL** if the unregistration fails. - - - -## UnregisterFeature - -``` -[Feature](Feature.md)*(* SamgrLite::UnregisterFeature) (const char *serviceName, const char *featureName) -``` - - **Description:** - -Unregisters a feature. - -You need to call this function when the feature is no longer required. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
serviceNameIndicates the name of the service whose feature will be unregistered.
featureNameIndicates the name of the feature to be unregistered.
- -**Attention:** - -Before unregistering the feature, you must unregister its functions. Otherwise, the unregistration fails. - -**Returns:** - -Returns the unregistered feature object if the unregistration is successful. The memory is released by the caller. Returns **NULL** if the unregistration fails. - - - -## UnregisterFeatureApi - -``` -[IUnknown](IUnknown.md)*(* SamgrLite::UnregisterFeatureApi) (const char *service, const char *feature) -``` - - **Description:** - -Unregisters the API from a feature. - -You must call this function before unregistering the feature no longer required. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
serviceIndicates the name of the service whose API will be unregistered.
featureIndicates the name of the feature whose API will be unregistered.
- -**Returns:** - -Returns the unregistered function object if the unregistration is successful. The memory is released by the caller. Returns **NULL** if the unregistration fails. - - - -## UnregisterService - -``` -[Service](Service.md)*(* SamgrLite::UnregisterService) (const char *name) -``` - - **Description:** - -Unregisters a service. - -You need to call this function when the service is no longer required. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
nameIndicates the name of the service to be unregistered.
- -**Attention:** - -Before unregistering the service, you must unregister its features and functions. - -**Returns:** - -Returns the unregistered service object if the unregistration is successful. The memory is released by the caller. Returns **NULL** if the unregistration fails. - - - diff --git a/api/api-LinkIoT/Service.md b/api/api-LinkIoT/Service.md deleted file mode 100755 index 66d88c5ea40960f83ea98d9cf5b828249e87b7b3..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/Service.md +++ /dev/null @@ -1,194 +0,0 @@ -# Service - -## **Overview** - -**Related Modules:** - -[Samgr](Samgr.md) - -**Description:** - -Indicates the basic type of a service. - -You need to implement the function pointers of **[Service](Service.md)**. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

GetName )(Service *service)

-

const char *(* 

-

Obtains the name of a service.

-

Initialize )(Service *service, Identity identity)

-

BOOL(* 

-

Initializes the service.

-

MessageHandle )(Service *service, Request *request)

-

BOOL(* 

-

Processes service messages.

-

GetTaskConfig )(Service *service)

-

TaskConfig(* 

-

Obtains task configurations of a service.

-
- -## **Details** - -## **Field Documentation** - -## GetName - -``` -const char*(* Service::GetName) ([Service](Service.md) *service) -``` - - **Description:** - -Obtains the name of a service. - -This function is called by Samgr during service registration and startup. You need to implement this function. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
serviceIndicates the pointer to the service.
- -**Returns:** - -Returns a constant string no more than 16 bytes if the service name is obtained successfully; returns **NULL** if the service name fails to be obtained. - - - -## GetTaskConfig - -``` -[TaskConfig](TaskConfig.md)(* Service::GetTaskConfig) ([Service](Service.md) *service) -``` - - **Description:** - -Obtains task configurations of a service. - -This function is used to return task configurations. You need to implement this function. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
serviceIndicates the pointer to the service.
- -**Returns:** - -Returns [TaskConfig](TaskConfig.md). - - - -## Initialize - -``` -BOOL(* Service::Initialize) ([Service](Service.md) *service, [Identity](Identity.md) identity) -``` - - **Description:** - -Initializes the service. - -After Samgr assigns tasks to a service, the service calls the function in its own tasks. You need to implement this function. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
serviceIndicates the pointer to the service.
identityIndicates the ID allocated by the system to the service. For details, see Identity.
- -**Returns:** - -Returns **TRUE** if the initialization is successful; returns **FALSE** otherwise. - - - -## MessageHandle - -``` -BOOL(* Service::MessageHandle) ([Service](Service.md) *service, [Request](Request.md) *request) -``` - - **Description:** - -Processes service messages. - -This function is used to process requests sent by the caller through [IUnknown](IUnknown.md). You need to implement this function. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
serviceIndicates the pointer to the service.
requestIndicates the pointer to the request data.
- -**Returns:** - -Returns **TRUE** if the message processing is successful; returns **FALSE** if the processing fails. - - - diff --git a/api/api-LinkIoT/SimpleVector.md b/api/api-LinkIoT/SimpleVector.md deleted file mode 100755 index 1ecefe27db889ac4ea8ee397dce996e88866815d..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/SimpleVector.md +++ /dev/null @@ -1,122 +0,0 @@ -# SimpleVector - -## **Overview** - -**Related Modules:** - -[Samgr](Samgr.md) - -**Description:** - -Defines the simplified vector class, which is extended by four elements. - -This class is applicable to the C language development scenario where the data volume is small and dynamic expansion is required. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

max

-

int16 

-

top

-

int16 

-

free

-

int16 

-

data

-

void ** 

-

key

-

VECTOR_Key 

-

compare

-

VECTOR_Compare 

-
- -## **Details** - -## **Field Documentation** - -## compare - -``` -VECTOR_Compare SimpleVector::compare -``` - - **Description:** - -Compares the sizes of key1 and key2, which are provided by users. The value **1** indicates that key1 is greater than key2, the value **0** indicates that key1 is equal to key2, and the value **-1** indicates that key1 is less than key2. The default value is **NULL**. - -## data - -``` -void** SimpleVector::data -``` - - **Description:** - -Data storage pointer - -## free - -``` -int16 SimpleVector::free -``` - - **Description:** - -Number of data records that have been released. The initial value is **0**. - -## key - -``` -VECTOR_Key SimpleVector::key -``` - - **Description:** - -Converts a data element into a key for comparison. The key is provided by users, and the default value is **NULL**. - -## max - -``` -int16 SimpleVector::max -``` - - **Description:** - -Maximum number of data records that can be stored. The initial value is **0**. - -## top - -``` -int16 SimpleVector::top -``` - - **Description:** - -Peak value of the number of stored data records. The initial value is **0**. - diff --git a/api/api-LinkIoT/Softbus.md b/api/api-LinkIoT/Softbus.md deleted file mode 100755 index d0e60f161533d2ef78d9abc81b547c2386249560..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/Softbus.md +++ /dev/null @@ -1,1165 +0,0 @@ -# Softbus - -## **Overview** - -Provides high-speed, secure communication between devices. - -This module implements unified distributed communication capability management between nearby devices, and provides link-independent device discovery and transmission interfaces to support service publishing and data transmission. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - - - - -

File Name

-

Description

-

discovery_service.h

-

Declares unified device service publishing interfaces.

-

session.h

-

Declares unified data transmission interfaces.

-
- -## Data Structures - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

PublishInfo

-

Defines service provisioning information sent to a discovering device.

-

CapabilityMap

-

Defines the mapping between supported capabilities and bitmaps.

-

DeviceMap

-

Defines the mappings between the device type enumerations and device type names.

-

IPublishCallback

-

Defines the callbacks for successful and failed service publishing.

-

CommonDeviceInfo

-

Defines the type and content of a device to set.

-

ISessionListener

-

Defines session callbacks.

-
- -## Typedefs - - - - - - - - - - - - - - - - - - - -

Typedef Name

-

Description

-

PublishInfo

-

typedef struct PublishInfo 

-

Defines service provisioning information sent to a discovering device.

-

DeviceType

-

typedef enum DeviceTypeEnum 

-

Enumerates device types.

-

IPublishCallback

-

typedef struct IPublishCallback 

-

Defines the callbacks for successful and failed service publishing.

-

CommonDeviceInfo

-

typedef struct CommonDeviceInfo 

-

Defines the type and content of a device to set.

-
- -## Enumerations - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

ExchanageMedium { AUTO = 0, BLE = 1, COAP = 2, USB = 3 }

-

Enumerates media, such as Bluetooth, Wi-Fi, and USB, used for publishing services.

-

ExchangeFre { LOW = 0, MID = 1, HIGH = 2, SUPER_HIGH = 3 }

-

Enumerates frequencies for publishing services. This enumeration is involved only in Bluetooth and is not supported currently.

-

DiscoverMode { DISCOVER_MODE_PASSIVE = 0x55, DISCOVER_MODE_ACTIVE = 0xAA }

-

Enumerates the modes in which services are published. The publishing service supports the passive mode. Lite devices support the passive mode only.

-

PublishFailReason { PUBLISH_FAIL_REASON_NOT_SUPPORT_MEDIUM = 1, PUBLISH_FAIL_REASON_PARAMETER_INVALID = 2, PUBLISH_FAIL_REASON_UNKNOWN = 0xFF }

-

Enumerates failure reasons for publishing services.

-

DataBitMap {   HICALL_CAPABILITY_BITMAP = 0, PROFILE_CAPABILITY_BITMAP = 1, HOMEVISIONPIC_CAPABILITY_BITMAP = 2, CASTPLUS_CAPABILITY_BITMAP,   AA_CAPABILITY_BITMAP, DVKIT_CAPABILITY_BITMAP, DDMP_CAPABILITY_BITMAP }

-

Enumerates supported capabilities published by a device.

-

DeviceTypeEnum {   UNKOWN = 0x00, PHONE = 0x0E, PAD = 0x11, TV = 0x9C,   PC = 0x0C, AUDIO = 0x0A, CAR = 0x83, L0 = 0xF1,   L1 = 0xF2 }

-

Enumerates device types.

-

CommonDeviceKey { COMM_DEVICE_KEY_DEVID = 0, COMM_DEVICE_KEY_DEVTYPE = 1, COMM_DEVICE_KEY_DEVNAME = 2, COMM_DEVICE_KEY_MAX }

-

Enumerates device information, such as its ID, type, and name.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

PublishService (const char *moduleName, const struct PublishInfo *info, const struct IPublishCallback *cb)

-

int 

-

Publishes a service to the discovering device in the LAN.

-

UnPublishService (const char *moduleName, int publishId)

-

int 

-

Unpublishes a service based on the publicId and moduleName.

-

SetCommonDeviceInfo (const struct CommonDeviceInfo *devInfo, unsigned int num)

-

int 

-

Sets common device information, such as its ID, type, and name.

-

CreateSessionServer (const char *mouduleName, const char *sessionName, struct ISessionListener *listener)

-

int 

-

Creates a session server based on a module name and session name.

-

RemoveSessionServer (const char *mouduleName, const char *sessionName)

-

int 

-

Removes a session server based on a module name and session name.

-

SendBytes (int sessionId, const void *data, unsigned int len)

-

int 

-

Sends data based on a session ID.

-

GetMySessionName (int sessionId, char *sessionName, unsigned int len)

-

int 

-

Obtains the session name registered by the local device based on the session ID.

-

GetPeerSessionName (int sessionId, char *sessionName, unsigned int len)

-

int 

-

Obtains the session name registered by the peer device based on the session ID.

-

GetPeerDeviceId (int sessionId, char *devId, unsigned int len)

-

int 

-

Obtains the peer device ID based on a session ID.

-

CloseSession (int sessionId)

-

void 

-

Closes a connected session based on a session ID.

-
- -## **Details** - -## **Typedef Documentation** - -## CommonDeviceInfo - -``` -typedef struct [CommonDeviceInfo](CommonDeviceInfo.md) [CommonDeviceInfo](CommonDeviceInfo.md) -``` - - **Description:** - -Defines the type and content of a device to set. - -## DeviceType - -``` -typedef enum [DeviceTypeEnum](Softbus.md#gab20b49630026f3118d6c05b0a022f230) [DeviceType](Softbus.md#ga9334bacb3ded964dc3c3367a6b70bcf4) -``` - - **Description:** - -Enumerates device types. - -## IPublishCallback - -``` -typedef struct [IPublishCallback](IPublishCallback.md) [IPublishCallback](IPublishCallback.md) -``` - - **Description:** - -Defines the callbacks for successful and failed service publishing. - -## PublishInfo - -``` -typedef struct [PublishInfo](PublishInfo.md) [PublishInfo](PublishInfo.md) -``` - - **Description:** - -Defines service provisioning information sent to a discovering device. - -## **Enumeration Type Documentation** - -## CommonDeviceKey - -``` -enum [CommonDeviceKey](Softbus.md#ga25be99ffbe88e41f7ce51d2678010254) -``` - - **Description:** - -Enumerates device information, such as its ID, type, and name. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
COMM_DEVICE_KEY_DEVID 

Device ID. The value contains a maximum of 64 characters.

-
COMM_DEVICE_KEY_DEVTYPE 

Device type. Currently, only ddmpCapability is supported.

-
COMM_DEVICE_KEY_DEVNAME 

Device name. The value contains a maximum of 63 characters.

-
COMM_DEVICE_KEY_MAX 

Reserved

-
- -## DataBitMap - -``` -enum [DataBitMap](Softbus.md#gab839c7f1fd448f52f003ab0693f27bb4) -``` - - **Description:** - -Enumerates supported capabilities published by a device. - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
HICALL_CAPABILITY_BITMAP 

MeeTime

-
PROFILE_CAPABILITY_BITMAP 

Video reverse connection in the smart domain

-
HOMEVISIONPIC_CAPABILITY_BITMAP 

Gallery in Vision

-
CASTPLUS_CAPABILITY_BITMAP 

cast+

-
AA_CAPABILITY_BITMAP 

Input method in Vision

-
DVKIT_CAPABILITY_BITMAP 

Device virtualization tool package

-
DDMP_CAPABILITY_BITMAP 

Distributed middleware

-
- -## DeviceTypeEnum - -``` -enum [DeviceTypeEnum](Softbus.md#gab20b49630026f3118d6c05b0a022f230) -``` - - **Description:** - -Enumerates device types. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
UNKOWN 

Unknown

-
PHONE 

Smartphone

-
PAD 

Tablet

-
TV 

Smart TV

-
PC 

PC

-
AUDIO 

Audio device

-
CAR 

Vehicle-mounted device

-
L0 

Light device L0

-
L1 

Light device L1

-
- -## DiscoverMode - -``` -enum [DiscoverMode](Softbus.md#ga7369479474cf45e9ca9c0f756473c74f) -``` - - **Description:** - -Enumerates the modes in which services are published. The publishing service supports the passive mode. Lite devices support the passive mode only. - - - - - - - - - - - - - -

Enumerator

-

Description

-
DISCOVER_MODE_PASSIVE 

Passive

-
DISCOVER_MODE_ACTIVE 

Proactive

-
- -## ExchanageMedium - -``` -enum [ExchanageMedium](Softbus.md#gaf5c7c122990f0ab5bd46b9bc47b5868b) -``` - - **Description:** - -Enumerates media, such as Bluetooth, Wi-Fi, and USB, used for publishing services. - -Currently, the media can only be set to coap. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
AUTO 

Automatic medium selection

-
BLE 

Bluetooth

-
COAP 

Wi-Fi

-
USB 

USB

-
- -## ExchangeFre - -``` -enum [ExchangeFre](Softbus.md#gacf2c77bd7e2c82784078762978123ea3) -``` - - **Description:** - -Enumerates frequencies for publishing services. This enumeration is involved only in Bluetooth and is not supported currently. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
LOW 

Low

-
MID 

Medium

-
HIGH 

High

-
SUPER_HIGH 

Super-high

-
- -## PublishFailReason - -``` -enum [PublishFailReason](Softbus.md#ga6632fcae1db4a3a13370e3fb49e5e620) -``` - - **Description:** - -Enumerates failure reasons for publishing services. - -The failure reason is returned to the caller through the callback function. - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
PUBLISH_FAIL_REASON_NOT_SUPPORT_MEDIUM 

Unsupported medium

-
PUBLISH_FAIL_REASON_PARAMETER_INVALID 

Invalid parameter

-
PUBLISH_FAIL_REASON_UNKNOWN 

Unknown reason

-
- -## **Function Documentation** - -## CloseSession\(\) - -``` -void CloseSession (int sessionId) -``` - - **Description:** - -Closes a connected session based on a session ID. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sessionIdIndicates the session ID.
- -## CreateSessionServer\(\) - -``` -int CreateSessionServer (const char * mouduleName, const char * sessionName, struct [ISessionListener](ISessionListener.md) * listener ) -``` - - **Description:** - -Creates a session server based on a module name and session name. - -A maximum of 18 session servers can be created. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
moduleNameIndicates the pointer to the module name, which can be used to check whether the session server is in this module. The value cannot be empty and can contain a maximum of 64 characters.
sessionNameIndicates the pointer to the session name, which is the unique ID of the session server. The value cannot be empty and can contain a maximum of 64 characters.
listenerIndicates the pointer to the session callback structure, which cannot be empty.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - -**See also:** - -[RemoveSessionServer](Softbus.md#ga225a1e178544457263d94078e638b7b5) - -## GetMySessionName\(\) - -``` -int GetMySessionName (int sessionId, char * sessionName, unsigned int len ) -``` - - **Description:** - -Obtains the session name registered by the local device based on the session ID. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
sessionIdIndicates the session ID.
sessionNameIndicates the pointer to the buffer for storing the session name.
lenIndicates the length of the buffer.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - - - -## GetPeerDeviceId\(\) - -``` -int GetPeerDeviceId (int sessionId, char * devId, unsigned int len ) -``` - - **Description:** - -Obtains the peer device ID based on a session ID. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
sessionIdIndicates the session ID.
devIdIndicates the pointer to the buffer for storing the device ID.
lenIndicates the length of the buffer.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - - - -## GetPeerSessionName\(\) - -``` -int GetPeerSessionName (int sessionId, char * sessionName, unsigned int len ) -``` - - **Description:** - -Obtains the session name registered by the peer device based on the session ID. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
sessionIdIndicates the session ID.
sessionNameIndicates the pointer to the buffer for storing the session name.
lenIndicates the length of the buffer.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - - - -## PublishService\(\) - -``` -int PublishService (const char * moduleName, const struct [PublishInfo](PublishInfo.md) * info, const struct [IPublishCallback](IPublishCallback.md) * cb ) -``` - - **Description:** - -Publishes a service to the discovering device in the LAN. - -The **publicId** and **moduleName** uniquely identify a service. A maximum of three services can be published. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
moduleNameIndicates the pointer to the module name of the upper-layer service. The value contains a maximum of 63 bytes.
infoIndicates the pointer to the service to publish. For details, see PublishInfo.
cbIndicates the pointer to the callback for service publishing. For details, see IPublishCallback.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - - - -## RemoveSessionServer\(\) - -``` -int RemoveSessionServer (const char * mouduleName, const char * sessionName ) -``` - - **Description:** - -Removes a session server based on a module name and session name. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
moduleNameIndicates the pointer to the name of the registered module, which can be used to check whether the session server is in this module. The value cannot be empty and can contain a maximum of 64 characters.
sessionNameIndicates the pointer to the session name. The value cannot be empty and can contain a maximum of 64 characters.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - -**See also:** - -[CreateSessionServer](Softbus.md#gad7e95cced3378e8f489553d70b121392) - -## SendBytes\(\) - -``` -int SendBytes (int sessionId, const void * data, unsigned int len ) -``` - - **Description:** - -Sends data based on a session ID. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
sessionIdIndicates the session ID.
dataIndicates the pointer to the data to send, which cannot be NULL.
lenIndicates the length of the data to send. The maximum length cannot exceed 984 characters.
- -**Returns:** - -Returns **0** if the function is called successfully; returns **-1** otherwise. - - - -## SetCommonDeviceInfo\(\) - -``` -int SetCommonDeviceInfo (const struct [CommonDeviceInfo](CommonDeviceInfo.md) * devInfo, unsigned int num ) -``` - - **Description:** - -Sets common device information, such as its ID, type, and name. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
devInfoIndicates the pointer to the device information array.
2num Indicates the number of elements in the device information array. If the value is inconsistent with the length of the device information array, the program breaks down.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -**See also:** - -[PublishService](Softbus.md#ga010557e05b3f0b0b1a05157f1724e13a) - -## UnPublishService\(\) - -``` -int UnPublishService (const char * moduleName, int publishId ) -``` - - **Description:** - -Unpublishes a service based on the **publicId** and **moduleName**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
moduleNameIndicates the pointer to the module name of the upper-layer service. The value contains a maximum of 63 bytes.
publishIdIndicates the ID of the service to unpublish. The value must be greater than 0.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - - - -## **Variable Documentation** - -## bitmap - -``` -[DataBitMap](Softbus.md#gab839c7f1fd448f52f003ab0693f27bb4) CapabilityMap::bitmap -``` - - **Description:** - -Bitmaps. For details, see [DataBitMap](Softbus.md#gab839c7f1fd448f52f003ab0693f27bb4). - -## capability \[1/2\] - -``` -const char* PublishInfo::capability -``` - - **Description:** - -[Service](Service.md) publishing capabilities. For details, see **g\_capabilityMap**. - -## capability \[2/2\] - -``` -char* CapabilityMap::capability -``` - - **Description:** - -Capability. For details, see **g\_capabilityMap**. - -## capabilityData - -``` -unsigned char* PublishInfo::capabilityData -``` - - **Description:** - -Capability data for service publishing - -## dataLen - -``` -unsigned int PublishInfo::dataLen -``` - - **Description:** - -Maximum length of the capability data for service publishing \(2 bytes\) - -## devType - -``` -[DeviceType](Softbus.md#ga9334bacb3ded964dc3c3367a6b70bcf4) DeviceMap::devType -``` - - **Description:** - -Enumeration of a device type. Only enumerations defined in **g\_devMap** are supported. - -## freq - -``` -[ExchangeFre](Softbus.md#gacf2c77bd7e2c82784078762978123ea3) PublishInfo::freq -``` - - **Description:** - -[Service](Service.md) publishing frequency - -## key - -``` -[CommonDeviceKey](Softbus.md#ga25be99ffbe88e41f7ce51d2678010254) CommonDeviceInfo::key -``` - - **Description:** - -Device information type. For details, see [CommonDeviceKey](Softbus.md#ga25be99ffbe88e41f7ce51d2678010254). - -## medium - -``` -[ExchanageMedium](Softbus.md#gaf5c7c122990f0ab5bd46b9bc47b5868b) PublishInfo::medium -``` - - **Description:** - -[Service](Service.md) publishing medium - -## mode - -``` -int PublishInfo::mode -``` - - **Description:** - -[Service](Service.md) publishing mode, which can be [DISCOVER\_MODE\_PASSIVE](Softbus.md#gga7369479474cf45e9ca9c0f756473c74fac6dc5925b6fb96b8e7e094dcb16b6ebf) or [DISCOVER\_MODE\_ACTIVE](Softbus.md#gga7369479474cf45e9ca9c0f756473c74fa9223119d2d3b76ce474ba46fcc2b2cdb) - -## onBytesReceived - -``` -void(* ISessionListener::onBytesReceived) (int sessionId, const void *data, unsigned int dataLen) -``` - - **Description:** - -Called when data is received. - -This function is used to notify that data is received. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
sessionIdIndicates the session ID.
dataIndicates the pointer to the data received.
dataLenIndicates the length of the data received.
- -## onPublishFail - -``` -void(* IPublishCallback::onPublishFail) (int publishId, [PublishFailReason](Softbus.md#ga6632fcae1db4a3a13370e3fb49e5e620) reason) -``` - - **Description:** - -Callback for failed publishing - -## onPublishSuccess - -``` -void(* IPublishCallback::onPublishSuccess) (int publishId) -``` - - **Description:** - -Callback for successful publishing - -## onSessionClosed - -``` -void(* ISessionListener::onSessionClosed) (int sessionId) -``` - - **Description:** - -Called when a session is closed. - -This function can be used to release resources related to the session. You do not need to call [CloseSession](Softbus.md#ga5b0c0b334f387f9c2753146ee0890780). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sessionIdIndicates the session ID.
- -## onSessionOpened - -``` -int(* ISessionListener::onSessionOpened) (int sessionId) -``` - - **Description:** - -Called when a session is opened. - -This function can be used to verify the session or initialize resources related to the session. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sessionIdIndicates the session ID.
- -**Returns:** - -Returns **0** if the session connection is accepted; returns a non-zero value otherwise \(you do not need to call [CloseSession](Softbus.md#ga5b0c0b334f387f9c2753146ee0890780) to close the session\). - - - -## publishId - -``` -int PublishInfo::publishId -``` - - **Description:** - -[Service](Service.md) publishing ID - -## value \[1/2\] - -``` -char* DeviceMap::value -``` - - **Description:** - -Name of a device type. Only names defined in **g\_devMap** are supported. - -## value \[2/2\] - -``` -const char* CommonDeviceInfo::value -``` - - **Description:** - -Content to set - diff --git a/api/api-LinkIoT/StationInfo.md b/api/api-LinkIoT/StationInfo.md deleted file mode 100755 index ae866e8cbcab5f929dc383f64e7b36518c542909..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/StationInfo.md +++ /dev/null @@ -1,55 +0,0 @@ -# StationInfo - -## **Overview** - -**Related Modules:** - -[Wifiservice](Wifiservice.md) - -**Description:** - -Represents the station information. - -The station information is returned when **OnHotspotStaJoin** or **OnHotspotStaLeave** is called. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - -

Variable Name

-

Description

-

macAddress [WIFI_MAC_LEN]

-

unsigned char 

-
- -## **Details** - -## **Field Documentation** - -## macAddress - -``` -unsigned char StationInfo::macAddress[[WIFI_MAC_LEN](Wifiservice.md#gabc871a0934ad71ec71b29de3f9bc4815)] -``` - - **Description:** - -MAC address. For its length, see [WIFI\_MAC\_LEN](Wifiservice.md#gabc871a0934ad71ec71b29de3f9bc4815). - diff --git a/api/api-LinkIoT/Subscriber.md b/api/api-LinkIoT/Subscriber.md deleted file mode 100755 index a6f97b8d305d4c91ececb979395e8ef09e23e577..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/Subscriber.md +++ /dev/null @@ -1,208 +0,0 @@ -# Subscriber - -## **Overview** - -**Related Modules:** - -[Broadcast](Broadcast.md) - -**Description:** - -Defines the subscriber for external interfaces to subsribe to events and data of a topic. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

AddTopic )(IUnknown *iUnknown, const Topic *topic)

-

int(* 

-

Adds a specified topic to the Broadcast service.

-

Subscribe )(IUnknown *iUnknown, const Topic *topic, Consumer *consumer)

-

int(* 

-

Subscribes to a specified topic for consumers.

-

ModifyConsumer )(IUnknown *iUnknown, const Topic *topic, Consumer *old, Consumer *current)

-

Consumer *(* 

-

Modifies the consumer of a specified topic.

-

Unsubscribe )(IUnknown *iUnknown, const Topic *topic, const Consumer *consumer)

-

Consumer *(* 

-

Unsubscribes from a specified topic.

-
- -## **Details** - -## **Field Documentation** - -## AddTopic - -``` -int(* Subscriber::AddTopic) ([IUnknown](IUnknown.md) *iUnknown, const [Topic](Broadcast.md#gaf03f5bc94cad32ab628a6cdee09b0542) *topic) -``` - - **Description:** - -Adds a specified topic to the Broadcast service. - -The specified topic is added by the subscriber. A topic can be subscribed to only after being added. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
iUnknownIndicates external interface of the pub/sub feature.
topicIndicates the topic to be subscribed to.
- -**Returns:** - -Returns **EC\_SUCCESS** if the topic is successfully added; returns other error codes if the topic fails to be added. - - - -## ModifyConsumer - -``` -[Consumer](Consumer.md)*(* Subscriber::ModifyConsumer) ([IUnknown](IUnknown.md) *iUnknown, const [Topic](Broadcast.md#gaf03f5bc94cad32ab628a6cdee09b0542) *topic, [Consumer](Consumer.md) *old, [Consumer](Consumer.md) *current) -``` - - **Description:** - -Modifies the consumer of a specified topic. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
iUnknownIndicates the pointer to the external interface of the pub/sub feature.
topicIndicates the pointer to the topic whose consumer will be modified.
oldIndicates the pointer to the original consumer of the topic.
currentIndicates the pointer to the new consumer of the topic.
- -**Returns:** - -Returns the pointer of the original consumer if the modification is successful; returns **NULL** otherwise. - - - -## Subscribe - -``` -int(* Subscriber::Subscribe) ([IUnknown](IUnknown.md) *iUnknown, const [Topic](Broadcast.md#gaf03f5bc94cad32ab628a6cdee09b0542) *topic, [Consumer](Consumer.md) *consumer) -``` - - **Description:** - -Subscribes to a specified topic for consumers. - -Call this function on the subscriber. The topic to be subscribed to must have been added to the Broadcast service. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
iUnknownIndicates external interface of the pub/sub feature.
topicIndicates the topic to be subscribed to.
consumerIndicates the consumer who subscribes to the topic.
- -**Returns:** - -Returns **EC\_SUCCESS** if the subscription is successful; returns other error codes if the subscription fails. - - - -## Unsubscribe - -``` -[Consumer](Consumer.md)*(* Subscriber::Unsubscribe) ([IUnknown](IUnknown.md) *iUnknown, const [Topic](Broadcast.md#gaf03f5bc94cad32ab628a6cdee09b0542) *topic, const [Consumer](Consumer.md) *consumer) -``` - - **Description:** - -Unsubscribes from a specified topic. - -This function cancels the subscription relationship between the specified topic and consumer. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
iUnknownIndicates external interface of the pub/sub feature. This parameter is used to obtain subscription relationships.
topicIndicates the pointer to the topic to unsubscribe from.
consumerIndicates the pointer to the consumer.
- -**Returns:** - -Returns the pointer of the consumer if the unsubscription is successful; returns **NULL** otherwise. - - - diff --git a/api/api-LinkIoT/TaskConfig.md b/api/api-LinkIoT/TaskConfig.md deleted file mode 100755 index 54827529c7c1f39f823545cb8dd8338eb8a890b0..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/TaskConfig.md +++ /dev/null @@ -1,107 +0,0 @@ -# TaskConfig - -## **Overview** - -**Related Modules:** - -[Samgr](Samgr.md) - -**Description:** - -Defines task configurations for a service. - -This structure defines task configurations for a service, including the task priority, stack size, queue size, task type, and shared task ID. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

level

-

int16 

-

priority

-

int16 

-

stackSize

-

uint16 

-

queueSize

-

uint16 

-

taskFlags

-

uint8 

-
- -## **Details** - -## **Field Documentation** - -## level - -``` -int16 TaskConfig::level -``` - - **Description:** - -ID of a multi-service sharing task. For details about the level definition, see [SpecifyTag](Samgr.md#gae9c7eed07272a46851d61e646b6e86d5). - -## priority - -``` -int16 TaskConfig::priority -``` - - **Description:** - -Task priority. For details about the definition of priority, see [TaskPriority](Samgr.md#gaef69bbb3353ea484414c3bbaf8ec362b). - -## queueSize - -``` -uint16 TaskConfig::queueSize -``` - - **Description:** - -Size of a task queue - -## stackSize - -``` -uint16 TaskConfig::stackSize -``` - - **Description:** - -Size of a task stack - -## taskFlags - -``` -uint8 TaskConfig::taskFlags -``` - - **Description:** - -Task type. For details about the taskFlags definition, see [TaskType](Samgr.md#gab265648f2dbef93878ad8c383712b43a). - diff --git a/api/api-LinkIoT/ThreadInfo.md b/api/api-LinkIoT/ThreadInfo.md deleted file mode 100755 index b1959c50c7a97909aa8ac0f03e2a25b565733e88..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/ThreadInfo.md +++ /dev/null @@ -1,121 +0,0 @@ -# ThreadInfo - -## **Overview** - -**Related Modules:** - -[KAL](zh-cn_topic_0000001054595087.md) - -**Description:** - -Describes a thread. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

name [KAL_TASK_NAME_LEN]

-

char 

-

id

-

unsigned int 

-

status

-

unsigned short 

-

priority

-

unsigned short 

-

taskSem

-

void * 

-

taskMutex

-

void * 

-

eventStru [3]

-

unsigned int 

-

eventMask

-

unsigned int 

-

stackSize

-

unsigned int 

-

topOfStack

-

unsigned int 

-

bottomOfStack

-

unsigned int 

-

mstatus

-

unsigned int 

-

mepc

-

unsigned int 

-

tp

-

unsigned int 

-

ra

-

unsigned int 

-

sp

-

unsigned int 

-

currUsed

-

unsigned int 

-

peakUsed

-

unsigned int 

-

overflowFlag

-

unsigned int 

-
- diff --git a/api/api-LinkIoT/Utils_config.md b/api/api-LinkIoT/Utils_config.md deleted file mode 100755 index 7a316b89e774d93ad9e52cfaf82e6482bf865121..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/Utils_config.md +++ /dev/null @@ -1,102 +0,0 @@ -# Utils\_config - -## **Overview** - -Represents the configuration file of the utils subsystem. - -Vendors can set their desired items in the configuration file. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - -

File Name

-

Description

-

utils_config.h

-

Represents the configuration file of the utils subsystem.

-
- -## Macros - - - - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

FEATURE_KV_CACHE

-

Specifies whether the KV store supports cache.

-

MAX_CACHE_SIZE   10

-

Indicates the number of data items that can be stored in the KV store cache.

-

MAX_KV_SUM   50

-

Indicates the number of data items that can be stored for each application.

-
- -## **Details** - -## **Macro Definition Documentation** - -## FEATURE\_KV\_CACHE - -``` -#define FEATURE_KV_CACHE -``` - - **Description:** - -Specifies whether the KV store supports cache. - -If this variable is defined, the KV store supports cache. Vendors determine whether to enable this feature. It is enabled by default. - -## MAX\_CACHE\_SIZE - -``` -#define MAX_CACHE_SIZE   10 -``` - - **Description:** - -Indicates the number of data items that can be stored in the KV store cache. - -Default value: 10 - -## MAX\_KV\_SUM - -``` -#define MAX_KV_SUM   50 -``` - - **Description:** - -Indicates the number of data items that can be stored for each application. - -Default value: 50 - diff --git a/api/api-LinkIoT/Utils_file.md b/api/api-LinkIoT/Utils_file.md deleted file mode 100755 index 637e732ee8cbe38644d94cac82eec3deb8854193..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/Utils_file.md +++ /dev/null @@ -1,671 +0,0 @@ -# Utils\_file - -## **Overview** - -Performs operations on a file. - -This module allows you to performs file operations such as to open, close, read, and write a file, and to obtain the file size. The filing system varies according to the hardware platform. The following limitations are imposed on a platform that uses the Serial Peripheral Interface Flash Filing System \(SPIFFS\): - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - -

File Name

-

Description

-

utils_file.h

-

Performs operations on a file, including to open, close, write, read, and delete a file.

-
- -## Macros - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

SEEK_SET_FS   0

-

Defines the offset position used by UtilsFileSeek in a file to start offsetting from the file header.

-

SEEK_CUR_FS   1

-

Defines the offset position used by UtilsFileSeek in a file to start offsetting from the current read and write position.

-

SEEK_END_FS   2

-

Defines the offset position used by UtilsFileSeek in a file to start offsetting from the end of the file.

-

O_RDONLY_FS   00

-

Defines a flag used byUtilsFileOpen to open a file in read-only mode.

-

O_WRONLY_FS   01

-

Defines a flag used by UtilsFileOpen to open a file in write-only mode.

-

O_RDWR_FS   02

-

Defines a flag used by UtilsFileOpen to open a file in read-and-write mode.

-

O_CREAT_FS   0100

-

Defines a flag used by UtilsFileOpen to create a file when the file to open does not exist.

-

O_EXCL_FS   0200

-

Defines a flag used by UtilsFileOpen to check whether the file to open exists when O_CREAT_FS is already set.

-

O_TRUNC_FS   01000

-

Defines a flag used by UtilsFileOpen to clear the file content if the file exists and can be opened in write mode.

-

O_APPEND_FS   02000

-

Defines a flag used by UtilsFileOpen to start reading or writing from the end of a file.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

UtilsFileOpen (const char *path, int oflag, int mode)

-

int 

-

Opens or creates a file.

-

UtilsFileClose (int fd)

-

int 

-

Closes a file with the specified file descriptor.

-

UtilsFileRead (int fd, char *buf, unsigned int len)

-

int 

-

Reads a specified length of data from a file with the specified file descriptor and writes the data into the buffer.

-

UtilsFileWrite (int fd, const char *buf, unsigned int len)

-

int 

-

Writes a specified length of data into a file with the specified file descriptor.

-

UtilsFileDelete (const char *path)

-

int 

-

Deletes a specified file.

-

UtilsFileStat (const char *path, unsigned int *fileSize)

-

int 

-

Obtains the file size.

-

UtilsFileSeek (int fd, int offset, unsigned int whence)

-

int 

-

Adjusts the read and write position offset in a file.

-

UtilsFileCopy (const char *src, const char *dest)

-

int 

-

Copies the source file to a target file.

-

UtilsFileMove (const char *src, const char *dest)

-

int 

-

Moves the source file into a target file.

-
- -## **Details** - -## **Macro Definition Documentation** - -## O\_APPEND\_FS - -``` -#define O_APPEND_FS   02000 -``` - - **Description:** - -Defines a flag used by [UtilsFileOpen](Utils_file.md#ga17115e4a2d52b37bffcbd465e2c1a899) to start reading or writing from the end of a file. - -## O\_CREAT\_FS - -``` -#define O_CREAT_FS   0100 -``` - - **Description:** - -Defines a flag used by [UtilsFileOpen](Utils_file.md#ga17115e4a2d52b37bffcbd465e2c1a899) to create a file when the file to open does not exist. - -## O\_EXCL\_FS - -``` -#define O_EXCL_FS   0200 -``` - - **Description:** - -Defines a flag used by [UtilsFileOpen](Utils_file.md#ga17115e4a2d52b37bffcbd465e2c1a899) to check whether the file to open exists when [O\_CREAT\_FS](Utils_file.md#ga79f003e100f1a5126fbea0dc355e3483) is already set. - -If the file does not exist, a new file will be created. If the file exists, the file cannot be opened. - -## O\_RDONLY\_FS - -``` -#define O_RDONLY_FS   00 -``` - - **Description:** - -Defines a flag used by[UtilsFileOpen](Utils_file.md#ga17115e4a2d52b37bffcbd465e2c1a899) to open a file in read-only mode. - -## O\_RDWR\_FS - -``` -#define O_RDWR_FS   02 -``` - - **Description:** - -Defines a flag used by [UtilsFileOpen](Utils_file.md#ga17115e4a2d52b37bffcbd465e2c1a899) to open a file in read-and-write mode. - -## O\_TRUNC\_FS - -``` -#define O_TRUNC_FS   01000 -``` - - **Description:** - -Defines a flag used by [UtilsFileOpen](Utils_file.md#ga17115e4a2d52b37bffcbd465e2c1a899) to clear the file content if the file exists and can be opened in write mode. - -## O\_WRONLY\_FS - -``` -#define O_WRONLY_FS   01 -``` - - **Description:** - -Defines a flag used by [UtilsFileOpen](Utils_file.md#ga17115e4a2d52b37bffcbd465e2c1a899) to open a file in write-only mode. - -## SEEK\_CUR\_FS - -``` -#define SEEK_CUR_FS   1 -``` - - **Description:** - -Defines the offset position used by [UtilsFileSeek](Utils_file.md#ga5ae2e96182ab66be3b048a970383764c) in a file to start offsetting from the current read and write position. - -## SEEK\_END\_FS - -``` -#define SEEK_END_FS   2 -``` - - **Description:** - -Defines the offset position used by [UtilsFileSeek](Utils_file.md#ga5ae2e96182ab66be3b048a970383764c) in a file to start offsetting from the end of the file. - -## SEEK\_SET\_FS - -``` -#define SEEK_SET_FS   0 -``` - - **Description:** - -Defines the offset position used by [UtilsFileSeek](Utils_file.md#ga5ae2e96182ab66be3b048a970383764c) in a file to start offsetting from the file header. - -## **Function Documentation** - -## UtilsFileClose\(\) - -``` -int UtilsFileClose (int fd) -``` - - **Description:** - -Closes a file with the specified file descriptor. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
fdIndicates the file descriptor of the file to close.
- -**Returns:** - -Returns **0** if the file is closed; returns **-1** otherwise. - - - -## UtilsFileCopy\(\) - -``` -int UtilsFileCopy (const char * src, const char * dest ) -``` - - **Description:** - -Copies the source file to a target file. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
srcIndicates the source file to copy.
destIndicates the target file.
- -**Attention:** - -If the number of opened files reaches the upper limit \(32\), close any two files first. Otherwise, the file cannot be copied. - -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - - - -## UtilsFileDelete\(\) - -``` -int UtilsFileDelete (const char * path) -``` - - **Description:** - -Deletes a specified file. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
pathIndicates the file to delete.
- -**Attention:** - -If the number of opened files reaches the upper limit \(32\), close any of them first. Otherwise, the file cannot be deleted. - -**Returns:** - -Returns **0** if the file is deleted; returns **-1** otherwise. - - - -## UtilsFileMove\(\) - -``` -int UtilsFileMove (const char * src, const char * dest ) -``` - - **Description:** - -Moves the source file into a target file. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
srcIndicates the source file.
destIndicates the target file.
- -**Attention:** - -If the number of opened files reaches the upper limit \(32\), close any two files first. Otherwise, the file cannot be moved. - -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - - - -## UtilsFileOpen\(\) - -``` -int UtilsFileOpen (const char * path, int oflag, int mode ) -``` - - **Description:** - -Opens or creates a file. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
pathIndicates the file to open or create.
oflagIndicates the mode of opening a file. The following modes are supported. These modes can be used together, with each of them identified by "or".
modeUsed for function compatibility. This parameter does not take effect in any scenario.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

oflag

-

Description

-

O_RDONLY_FS

-

For details, see O_RDONLY_FS.

-

O_WRONLY_FS

-

For details, see O_WRONLY_FS.

-

O_RDWR_FS

-

For details, see O_RDWR_FS.

-

O_CREAT_FS

-

For details, see O_CREAT_FS.

-

O_EXCL_FS

-

For details, see O_EXCL_FS.

-

O_TRUNC_FS

-

For details, see O_TRUNC_FS.

-

O_APPEND_FS

-

For details, see O_APPEND_FS.

-
- -**Returns:** - -Returns the file descriptor if the file is opened or created; returns **-1** otherwise. - - - -## UtilsFileRead\(\) - -``` -int UtilsFileRead (int fd, char * buf, unsigned int len ) -``` - - **Description:** - -Reads a specified length of data from a file with the specified file descriptor and writes the data into the buffer. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
fdIndicates the file descriptor of the file to read.
bufIndicates the buffer that stores the read data. This is an output parameter.
lenIndicates the length of the data to read.
- -**Returns:** - -Returns the number of bytes of the data if the data is read; returns **-1** otherwise. - - - -## UtilsFileSeek\(\) - -``` -int UtilsFileSeek (int fd, int offset, unsigned int whence ) -``` - - **Description:** - -Adjusts the read and write position offset in a file. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
fdIndicates the file descriptor of the file where the read and write position offset needs adjustment.
offsetIndicates the offset of the read and write position based on the whence parameter. The value can be negative if the value of whence is SEEK_CUR_FS or SEEK_END_FS.
whenceIndicates the start position of the offset. The following start positions are supported.
- - - - - - - - - - - - - - - - - - - - -

whence

-

Description

-

SEEK_SET_FS

-

Adjusts the read and write position to the file header.

-

Then adds the offset after the read and write position.

-

SEEK_CUR_FS

-

Adds the offset after the current read and write position.

-

SEEK_END_FS

-

Adjusts the read and write position to the end of the file.

-

Then adds the offset after the read and write position.

-
- -**Returns:** - -Returns the current read and write position if the operation is successful; returns **-1** otherwise. - - - -## UtilsFileStat\(\) - -``` -int UtilsFileStat (const char * path, unsigned int * fileSize ) -``` - - **Description:** - -Obtains the file size. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
pathIndicates the file name.
fileSizeIndicates the file size. This is an output parameter.
- -**Returns:** - -Returns **0** if the file size is obtained; returns **-1** otherwise. - - - -## UtilsFileWrite\(\) - -``` -int UtilsFileWrite (int fd, const char * buf, unsigned int len ) -``` - - **Description:** - -Writes a specified length of data into a file with the specified file descriptor. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
fdIndicates the file descriptor of the file where to write the data.
bufIndicates the data to write.
lenIndicates the length of the data to write.
- -**Returns:** - -Returns the number of bytes of the data if the data is written; returns **-1** otherwise. - - - diff --git "a/api/api-LinkIoT/Utils\345\255\220\347\263\273\347\273\237.md" "b/api/api-LinkIoT/Utils\345\255\220\347\263\273\347\273\237.md" deleted file mode 100755 index 43b332c390161c1876774f0966e465ef94d87c8c..0000000000000000000000000000000000000000 --- "a/api/api-LinkIoT/Utils\345\255\220\347\263\273\347\273\237.md" +++ /dev/null @@ -1,11 +0,0 @@ -# Utils子系统 - -- **[Kv\_store](Kv_store.md)** - -- **[Parameter](Parameter.md)** - -- **[Utils\_config](Utils_config.md)** - -- **[Utils\_file](Utils_file.md)** - - diff --git a/api/api-LinkIoT/WifiDeviceConfig.md b/api/api-LinkIoT/WifiDeviceConfig.md deleted file mode 100755 index e4849ea0875fe784d7b547eafb81157ad0c19137..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/WifiDeviceConfig.md +++ /dev/null @@ -1,143 +0,0 @@ -# WifiDeviceConfig - -## **Overview** - -**Related Modules:** - -[Wifiservice](Wifiservice.md) - -**Description:** - -Represents the Wi-Fi station configuration used to connect to a specified Wi-Fi device. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

ssid [WIFI_MAX_SSID_LEN]

-

char 

-

bssid [WIFI_MAC_LEN]

-

unsigned char 

-

preSharedKey [WIFI_MAX_KEY_LEN]

-

char 

-

securityType

-

int 

-

netId

-

int 

-

freq

-

unsigned int 

-

wapiPskType

-

int 

-
- -## **Details** - -## **Field Documentation** - -## bssid - -``` -unsigned char WifiDeviceConfig::bssid[[WIFI_MAC_LEN](Wifiservice.md#gabc871a0934ad71ec71b29de3f9bc4815)] -``` - - **Description:** - -Basic service set ID \(BSSID\). For its length, see [WIFI\_MAC\_LEN](Wifiservice.md#gabc871a0934ad71ec71b29de3f9bc4815). - -## freq - -``` -unsigned int WifiDeviceConfig::freq -``` - - **Description:** - -Frequency - -## netId - -``` -int WifiDeviceConfig::netId -``` - - **Description:** - -Allocated **networkId** - -## preSharedKey - -``` -char WifiDeviceConfig::preSharedKey[[WIFI_MAX_KEY_LEN](Wifiservice.md#ga6017e2d011b6cffcd3663db81a2b52d8)] -``` - - **Description:** - -Key. For its length, see [WIFI\_MAX\_KEY\_LEN](Wifiservice.md#ga6017e2d011b6cffcd3663db81a2b52d8). - -## securityType - -``` -int WifiDeviceConfig::securityType -``` - - **Description:** - -Security type. It is defined in [WifiSecurityType](Wifiservice.md#ga97c133f7db7c1234babcde03c4ce1b05). - -## ssid - -``` -char WifiDeviceConfig::ssid[[WIFI_MAX_SSID_LEN](Wifiservice.md#ga7e01d8c5079081de486637b4482c937a)] -``` - - **Description:** - -[Service](Service.md) set ID \(SSID\). For its length, see [WIFI\_MAX\_SSID\_LEN](Wifiservice.md#ga7e01d8c5079081de486637b4482c937a). - -## wapiPskType - -``` -int WifiDeviceConfig::wapiPskType -``` - - **Description:** - -PSK type, see [WifiPskType](Wifiservice.md#gaa1a44d23b8478232f14d2adfc82cee77). - diff --git a/api/api-LinkIoT/WifiEvent.md b/api/api-LinkIoT/WifiEvent.md deleted file mode 100755 index e532d2863651490fb56e5b388b67d18e529bdb71..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/WifiEvent.md +++ /dev/null @@ -1,115 +0,0 @@ -# WifiEvent - -## **Overview** - -**Related Modules:** - -[Wifiservice](Wifiservice.md) - -**Description:** - -Represents the pointer to a Wi-Fi event callback for station and hotspot connection, disconnection, or scan. - -If you do not need a callback, set the value of its pointer to **NULL**. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

OnWifiConnectionChanged )(int state, WifiLinkedInfo *info)

-

void(* 

-

OnWifiScanStateChanged )(int state, int size)

-

void(* 

-

OnHotspotStateChanged )(int state)

-

void(* 

-

OnHotspotStaJoin )(StationInfo *info)

-

void(* 

-

OnHotspotStaLeave )(StationInfo *info)

-

void(* 

-
- -## **Details** - -## **Field Documentation** - -## OnHotspotStaJoin - -``` -void(* WifiEvent::OnHotspotStaJoin) ([StationInfo](StationInfo.md) *info) -``` - - **Description:** - -Station connected - -## OnHotspotStaLeave - -``` -void(* WifiEvent::OnHotspotStaLeave) ([StationInfo](StationInfo.md) *info) -``` - - **Description:** - -Station disconnected - -## OnHotspotStateChanged - -``` -void(* WifiEvent::OnHotspotStateChanged) (int state) -``` - - **Description:** - -Hotspot state change - -## OnWifiConnectionChanged - -``` -void(* WifiEvent::OnWifiConnectionChanged) (int state, [WifiLinkedInfo](WifiLinkedInfo.md) *info) -``` - - **Description:** - -Connection state change - -## OnWifiScanStateChanged - -``` -void(* WifiEvent::OnWifiScanStateChanged) (int state, int size) -``` - - **Description:** - -Scan state change - diff --git a/api/api-LinkIoT/WifiIotFlashPartitionInfo.md b/api/api-LinkIoT/WifiIotFlashPartitionInfo.md deleted file mode 100755 index 66c22c11332e542ea6bf9c6e876c374dbc7e08ee..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/WifiIotFlashPartitionInfo.md +++ /dev/null @@ -1,128 +0,0 @@ -# WifiIotFlashPartitionInfo - -## **Overview** - -**Related Modules:** - -[Wifiiot](Wifiiot.md) - -**Description:** - -Describes an entry in a flash partition table. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

addr: 24

-

unsigned int 

-

id: 7

-

unsigned int 

-

dir: 1

-

unsigned int 

-

size: 24

-

unsigned int 

-

reserve: 8

-

unsigned int 

-

addition

-

unsigned int 

-
- -## **Details** - -## **Field Documentation** - -## addition - -``` -unsigned int WifiIotFlashPartitionInfo::addition -``` - - **Description:** - -Custom flash partition information - -## addr - -``` -unsigned int WifiIotFlashPartitionInfo::addr -``` - - **Description:** - -Address of a flash partition. The value is 16 MB. If the address is in reverse order, the value is the end low address. - -## dir - -``` -unsigned int WifiIotFlashPartitionInfo::dir -``` - - **Description:** - -Storage direction of the flash partition. The value **0** indicates the regular order, and **1** indicates the reverse order. - -## id - -``` -unsigned int WifiIotFlashPartitionInfo::id -``` - - **Description:** - -Flash partition ID - -## reserve - -``` -unsigned int WifiIotFlashPartitionInfo::reserve -``` - - **Description:** - -Padding bit - -## size - -``` -unsigned int WifiIotFlashPartitionInfo::size -``` - - **Description:** - -Size of the flash partition - diff --git a/api/api-LinkIoT/WifiIotFlashPartitionTable.md b/api/api-LinkIoT/WifiIotFlashPartitionTable.md deleted file mode 100755 index 33fbd094359a3332e9ab281d8b23e59b82c7108e..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/WifiIotFlashPartitionTable.md +++ /dev/null @@ -1,53 +0,0 @@ -# WifiIotFlashPartitionTable - -## **Overview** - -**Related Modules:** - -[Wifiiot](Wifiiot.md) - -**Description:** - -Describes a flash partition table. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - -

Variable Name

-

Description

-

table [WIFI_IOT_FLASH_PARTITON_MAX]

-

WifiIotFlashPartitionInfo 

-
- -## **Details** - -## **Field Documentation** - -## table - -``` -[WifiIotFlashPartitionInfo](WifiIotFlashPartitionInfo.md) WifiIotFlashPartitionTable::table[[WIFI_IOT_FLASH_PARTITON_MAX](Wifiiot.md#gafa09129be9f2e306ae54ab9d913d4c96)] -``` - - **Description:** - -Description for an entry in a flash partition table. For details on the number of entries, see [WIFI\_IOT\_FLASH\_PARTITON\_MAX](Wifiiot.md#gafa09129be9f2e306ae54ab9d913d4c96). - diff --git a/api/api-LinkIoT/WifiIotI2cData.md b/api/api-LinkIoT/WifiIotI2cData.md deleted file mode 100755 index 90894b5c127da8821c9951563d02fac467334926..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/WifiIotI2cData.md +++ /dev/null @@ -1,90 +0,0 @@ -# WifiIotI2cData - -## **Overview** - -**Related Modules:** - -[Wifiiot](Wifiiot.md) - -**Description:** - -Defines I2C data transmission attributes. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

sendBuf

-

unsigned char * 

-

sendLen

-

unsigned int 

-

receiveBuf

-

unsigned char * 

-

receiveLen

-

unsigned int 

-
- -## **Details** - -## **Field Documentation** - -## receiveBuf - -``` -unsigned char* WifiIotI2cData::receiveBuf -``` - - **Description:** - -Pointer to the buffer for storing data to receive - -## receiveLen - -``` -unsigned int WifiIotI2cData::receiveLen -``` - - **Description:** - -Length of data received - -## sendBuf - -``` -unsigned char* WifiIotI2cData::sendBuf -``` - - **Description:** - -Pointer to the buffer storing data to send - -## sendLen - -``` -unsigned int WifiIotI2cData::sendLen -``` - - **Description:** - -Length of data to send - diff --git a/api/api-LinkIoT/WifiIotI2cFunc.md b/api/api-LinkIoT/WifiIotI2cFunc.md deleted file mode 100755 index e105e2a734d8414be9b8589b5c7c04b555ba4c72..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/WifiIotI2cFunc.md +++ /dev/null @@ -1,83 +0,0 @@ -# WifiIotI2cFunc - -## **Overview** - -**Related Modules:** - -[Wifiiot](Wifiiot.md) - -**Description:** - -Defines I2C callbacks. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

resetFunc

-

I2CResetFunc 

-

prepareFunc

-

I2cPrepareFunc 

-

restoreFunc

-

I2cRestoreFunc 

-
- -## **Details** - -## **Field Documentation** - -## prepareFunc - -``` -[I2cPrepareFunc](Wifiiot.md#ga1f0c8fe1deb1cf1fc8b19d69c2fca729) WifiIotI2cFunc::prepareFunc -``` - - **Description:** - -Callback invoked for data preparation - -## resetFunc - -``` -[I2CResetFunc](Wifiiot.md#ga1176c2c06eca906f3e662027df156109) WifiIotI2cFunc::resetFunc -``` - - **Description:** - -Callback invoked upon an I2C device exception - -## restoreFunc - -``` -[I2cRestoreFunc](Wifiiot.md#ga16779c755404f2ec8543452268a9fb3b) WifiIotI2cFunc::restoreFunc -``` - - **Description:** - -Callback invoked for data recovery - diff --git a/api/api-LinkIoT/WifiIotI2sAttribute.md b/api/api-LinkIoT/WifiIotI2sAttribute.md deleted file mode 100755 index a8e67b9412fa9a7ae3ff3f9efb03f20ea5509b22..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/WifiIotI2sAttribute.md +++ /dev/null @@ -1,60 +0,0 @@ -# WifiIotI2sAttribute - -## **Overview** - -**Related Modules:** - -[Wifiiot](Wifiiot.md) - -**Description:** - -Defines I2S attributes. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

sampleRate

-

WifiIotI2sSampleRate 

-

resolution

-

WifiIotI2sResolution 

-
- -## **Details** - -## **Field Documentation** - -## resolution - -``` -[WifiIotI2sResolution](Wifiiot.md#gac024b870d63e802d8119e88a82953807) WifiIotI2sAttribute::resolution -``` - - **Description:** - -Resolution - -## sampleRate - -``` -[WifiIotI2sSampleRate](Wifiiot.md#ga5e124d70b18cf4cff40bcce78445f689) WifiIotI2sAttribute::sampleRate -``` - - **Description:** - -Sampling rate - diff --git a/api/api-LinkIoT/WifiIotSdioAdmatable.md b/api/api-LinkIoT/WifiIotSdioAdmatable.md deleted file mode 100755 index dbb2e58fc4b3c7df4a0252d9166dc839c5d2a829..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/WifiIotSdioAdmatable.md +++ /dev/null @@ -1,75 +0,0 @@ -# WifiIotSdioAdmatable - -## **Overview** - -**Related Modules:** - -[Wifiiot](Wifiiot.md) - -**Description:** - -Defines attributes of an SDIO ADMA table. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

param

-

unsigned short 

-

len

-

unsigned short 

-

address

-

unsigned int 

-
- -## **Details** - -## **Field Documentation** - -## address - -``` -unsigned int WifiIotSdioAdmatable::address -``` - - **Description:** - -Data address - -## len - -``` -unsigned short WifiIotSdioAdmatable::len -``` - - **Description:** - -Data length - -## param - -``` -unsigned short WifiIotSdioAdmatable::param -``` - - **Description:** - -Data sending parameter - diff --git a/api/api-LinkIoT/WifiIotSdioExtendFunc.md b/api/api-LinkIoT/WifiIotSdioExtendFunc.md deleted file mode 100755 index b4743012d310cb9651aaf38deede4490b02a7bd4..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/WifiIotSdioExtendFunc.md +++ /dev/null @@ -1,150 +0,0 @@ -# WifiIotSdioExtendFunc - -## **Overview** - -**Related Modules:** - -[Wifiiot](Wifiiot.md) - -**Description:** - -Provides extended SDIO attributes. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

intStat

-

unsigned int 

-

msgStat

-

unsigned int 

-

xferCount

-

unsigned int 

-

creditInfo

-

unsigned int 

-

creditIsvalid

-

unsigned char 

-

commReg [WIFI_IOT_SDIO_EXTENDREG_COUNT]

-

unsigned char 

-

commregIsvalid

-

unsigned char 

-

validCommregCnt

-

unsigned int 

-
- -## **Details** - -## **Field Documentation** - -## commReg - -``` -unsigned char WifiIotSdioExtendFunc::commReg[[WIFI_IOT_SDIO_EXTENDREG_COUNT](Wifiiot.md#ga107279ca1341146ae076f8e08c10d1dc)] -``` - - **Description:** - -Common register - -## commregIsvalid - -``` -unsigned char WifiIotSdioExtendFunc::commregIsvalid -``` - - **Description:** - -Whether a common register is valid - -## creditInfo - -``` -unsigned int WifiIotSdioExtendFunc::creditInfo -``` - - **Description:** - -Flow control information - -## creditIsvalid - -``` -unsigned char WifiIotSdioExtendFunc::creditIsvalid -``` - - **Description:** - -Whether flow control information is valid - -## intStat - -``` -unsigned int WifiIotSdioExtendFunc::intStat -``` - - **Description:** - -Interrupt status - -## msgStat - -``` -unsigned int WifiIotSdioExtendFunc::msgStat -``` - - **Description:** - -Message status - -## validCommregCnt - -``` -unsigned int WifiIotSdioExtendFunc::validCommregCnt -``` - - **Description:** - -Number of valid common registers - -## xferCount - -``` -unsigned int WifiIotSdioExtendFunc::xferCount -``` - - **Description:** - -Number of sent bytes - diff --git a/api/api-LinkIoT/WifiIotSdioIntcallback.md b/api/api-LinkIoT/WifiIotSdioIntcallback.md deleted file mode 100755 index 9e06194e5c9dab6cd65d70de9e4cfa1f791e5606..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/WifiIotSdioIntcallback.md +++ /dev/null @@ -1,135 +0,0 @@ -# WifiIotSdioIntcallback - -## **Overview** - -**Related Modules:** - -[Wifiiot](Wifiiot.md) - -**Description:** - -SDIO interrupt callback structure. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

RdstartCallback )(unsigned int len, unsigned char *admaTable)

-

int(* 

-

RdoverCallback )(void)

-

int(* 

-

RderrCallback )(void)

-

void(* 

-

WrstartCallback )(unsigned int len, unsigned char *admaTable)

-

int(* 

-

WroverCallback )(void)

-

int(* 

-

ProcessmsgCallback )(unsigned int msg)

-

void(* 

-

SoftRstCallback )(void)

-

void(* 

-
- -## **Details** - -## **Field Documentation** - -## ProcessmsgCallback - -``` -void(* WifiIotSdioIntcallback::ProcessmsgCallback) (unsigned int msg) -``` - - **Description:** - -Callback invoked when a message is received from the host - -## RderrCallback - -``` -void(* WifiIotSdioIntcallback::RderrCallback) (void) -``` - - **Description:** - -Callback invoked when a data read failure occurs on the host - -## RdoverCallback - -``` -int(* WifiIotSdioIntcallback::RdoverCallback) (void) -``` - - **Description:** - -Callback invoked when the host finishes a read operation - -## RdstartCallback - -``` -int(* WifiIotSdioIntcallback::RdstartCallback) (unsigned int len, unsigned char *admaTable) -``` - - **Description:** - -Callback invoked when the host starts a read operation - -## SoftRstCallback - -``` -void(* WifiIotSdioIntcallback::SoftRstCallback) (void) -``` - - **Description:** - -Callback invoked when a soft reset interrupt message is received from the host - -## WroverCallback - -``` -int(* WifiIotSdioIntcallback::WroverCallback) (void) -``` - - **Description:** - -Callback invoked when the host finishes a write operation - -## WrstartCallback - -``` -int(* WifiIotSdioIntcallback::WrstartCallback) (unsigned int len, unsigned char *admaTable) -``` - - **Description:** - -Callback invoked when the host starts a write operation - diff --git a/api/api-LinkIoT/WifiIotSpiCfgBasicInfo.md b/api/api-LinkIoT/WifiIotSpiCfgBasicInfo.md deleted file mode 100755 index f7f28221e599ffdbf55f07b600adaefef5d92e2a..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/WifiIotSpiCfgBasicInfo.md +++ /dev/null @@ -1,135 +0,0 @@ -# WifiIotSpiCfgBasicInfo - -## **Overview** - -**Related Modules:** - -[Wifiiot](Wifiiot.md) - -**Description:** - -Defines data communication parameters. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

cpol: 1

-

unsigned int 

-

cpha: 1

-

unsigned int 

-

framMode: 2

-

unsigned int 

-

dataWidth: 4

-

unsigned int 

-

endian: 1

-

unsigned int 

-

pad: 23

-

unsigned int 

-

freq

-

unsigned int 

-
- -## **Details** - -## **Field Documentation** - -## cpha - -``` -unsigned int WifiIotSpiCfgBasicInfo::cpha -``` - - **Description:** - -Communication phase. For details about available values, see [WifiIotSpiCfgClockCpha](Wifiiot.md#ga1eb13cffbbdec9da1d57c766763b94e5). - -## cpol - -``` -unsigned int WifiIotSpiCfgBasicInfo::cpol -``` - - **Description:** - -Communication polarity. For details about available values, see [WifiIotSpiCfgClockCpol](Wifiiot.md#gad6674c8b0989b6a329d5fd5ff0d5d750). - -## dataWidth - -``` -unsigned int WifiIotSpiCfgBasicInfo::dataWidth -``` - - **Description:** - -Communication data width. For details about available values, see [WifiIotSpiCfgDataWidth](Wifiiot.md#ga6f2e44db2698c33b81bd6caa438a55ea). - -## endian - -``` -unsigned int WifiIotSpiCfgBasicInfo::endian -``` - - **Description:** - -Endian mode. For details about available values, see [WifiIotSpiCfgEndian](Wifiiot.md#ga31924085df23a024413fa6e63e13c41e). - -## framMode - -``` -unsigned int WifiIotSpiCfgBasicInfo::framMode -``` - - **Description:** - -Communication protocol. For details about available values, see [WifiIotSpiCfgFramMode](Wifiiot.md#gaef7c192e049db14e2326c0bfba181670). - -## freq - -``` -unsigned int WifiIotSpiCfgBasicInfo::freq -``` - - **Description:** - -Communication frequency. The value ranges from 2460 Hz to 40 MHz. - -## pad - -``` -unsigned int WifiIotSpiCfgBasicInfo::pad -``` - - **Description:** - -Padding bit - diff --git a/api/api-LinkIoT/WifiIotSpiCfgInitParam.md b/api/api-LinkIoT/WifiIotSpiCfgInitParam.md deleted file mode 100755 index 75ae13c32f21dc8029a9308724795286ab448277..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/WifiIotSpiCfgInitParam.md +++ /dev/null @@ -1,68 +0,0 @@ -# WifiIotSpiCfgInitParam - -## **Overview** - -**Related Modules:** - -[Wifiiot](Wifiiot.md) - -**Description:** - -Specifies whether a device is a master or slave device. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

isSlave: 1

-

unsigned int 

-

pad: 31

-

unsigned int 

-
- -## **Details** - -## **Field Documentation** - -## isSlave - -``` -unsigned int WifiIotSpiCfgInitParam::isSlave -``` - - **Description:** - -Whether the device is a slave device - -## pad - -``` -unsigned int WifiIotSpiCfgInitParam::pad -``` - - **Description:** - -Padding bit - diff --git a/api/api-LinkIoT/WifiIotUartAttribute.md b/api/api-LinkIoT/WifiIotUartAttribute.md deleted file mode 100755 index 429876daa98830c5deee42e2ff74c62dc4f62ae9..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/WifiIotUartAttribute.md +++ /dev/null @@ -1,105 +0,0 @@ -# WifiIotUartAttribute - -## **Overview** - -**Related Modules:** - -[Wifiiot](Wifiiot.md) - -**Description:** - -Defines the basic attributes of a UART device. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

baudRate

-

unsigned int 

-

dataBits

-

unsigned char 

-

stopBits

-

unsigned char 

-

parity

-

unsigned char 

-

pad

-

unsigned char 

-
- -## **Details** - -## **Field Documentation** - -## baudRate - -``` -unsigned int WifiIotUartAttribute::baudRate -``` - - **Description:** - -Baud rate - -## dataBits - -``` -unsigned char WifiIotUartAttribute::dataBits -``` - - **Description:** - -Data bits. The value range is specified in [WifiIotUartIdxDataBit](Wifiiot.md#gafdf1adfc0e0ed18282aa3006300b12b4). - -## pad - -``` -unsigned char WifiIotUartAttribute::pad -``` - - **Description:** - -Padding bit - -## parity - -``` -unsigned char WifiIotUartAttribute::parity -``` - - **Description:** - -Parity bit. The value range is specified in [WifiIotUartParity](Wifiiot.md#ga9cee98ab295d2e42ab7f0fb614268602). - -## stopBits - -``` -unsigned char WifiIotUartAttribute::stopBits -``` - - **Description:** - -Stop bits. The value range is specified in [WifiIotUartStopBit](Wifiiot.md#gab0a1b43e8e98b028717e6557003b3172). - diff --git a/api/api-LinkIoT/WifiIotUartExtraAttr.md b/api/api-LinkIoT/WifiIotUartExtraAttr.md deleted file mode 100755 index 029efc20d083bed9c001a5859131bd20f4ff2ec1..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/WifiIotUartExtraAttr.md +++ /dev/null @@ -1,165 +0,0 @@ -# WifiIotUartExtraAttr - -## **Overview** - -**Related Modules:** - -[Wifiiot](Wifiiot.md) - -**Description:** - -Defines the extended attributes of a UART device. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

txFifoLine

-

WifiIotUartFifoLine 

-

rxFifoLine

-

WifiIotUartFifoLine 

-

flowFifoLine

-

WifiIotUartFifoLine 

-

txBlock

-

WifiIotUartBlockState 

-

rxBlock

-

WifiIotUartBlockState 

-

txBufSize

-

unsigned short 

-

rxBufSize

-

unsigned short 

-

txUseDma

-

WifiIotUartDmaState 

-

rxUseDma

-

WifiIotUartDmaState 

-
- -## **Details** - -## **Field Documentation** - -## flowFifoLine - -``` -[WifiIotUartFifoLine](Wifiiot.md#ga1c15f86994b472d35bee5d6b57d42a49) WifiIotUartExtraAttr::flowFifoLine -``` - - **Description:** - -FIFO interrupt threshold for flow control - -## rxBlock - -``` -[WifiIotUartBlockState](Wifiiot.md#ga93f35a58dc54e29d4892d1e94179c72d) WifiIotUartExtraAttr::rxBlock -``` - - **Description:** - -Rx block state - -## rxBufSize - -``` -unsigned short WifiIotUartExtraAttr::rxBufSize -``` - - **Description:** - -Rx buffer size - -## rxFifoLine - -``` -[WifiIotUartFifoLine](Wifiiot.md#ga1c15f86994b472d35bee5d6b57d42a49) WifiIotUartExtraAttr::rxFifoLine -``` - - **Description:** - -Rx FIFO interrupt threshold - -## rxUseDma - -``` -[WifiIotUartDmaState](Wifiiot.md#gaf36ed6a640d85e79dfee020131e0d86f) WifiIotUartExtraAttr::rxUseDma -``` - - **Description:** - -Whether DMA is used to receive data - -## txBlock - -``` -[WifiIotUartBlockState](Wifiiot.md#ga93f35a58dc54e29d4892d1e94179c72d) WifiIotUartExtraAttr::txBlock -``` - - **Description:** - -Tx block state - -## txBufSize - -``` -unsigned short WifiIotUartExtraAttr::txBufSize -``` - - **Description:** - -Tx buffer size - -## txFifoLine - -``` -[WifiIotUartFifoLine](Wifiiot.md#ga1c15f86994b472d35bee5d6b57d42a49) WifiIotUartExtraAttr::txFifoLine -``` - - **Description:** - -Tx FIFO interrupt threshold - -## txUseDma - -``` -[WifiIotUartDmaState](Wifiiot.md#gaf36ed6a640d85e79dfee020131e0d86f) WifiIotUartExtraAttr::txUseDma -``` - - **Description:** - -Whether DMA is used to send data - diff --git a/api/api-LinkIoT/WifiLinkedInfo.md b/api/api-LinkIoT/WifiLinkedInfo.md deleted file mode 100755 index 8823358dfed6eadad3a2094b4d52fe19f1c88bd2..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/WifiLinkedInfo.md +++ /dev/null @@ -1,115 +0,0 @@ -# WifiLinkedInfo - -## **Overview** - -**Related Modules:** - -[Wifiservice](Wifiservice.md) - -**Description:** - -Represents the Wi-Fi connection information. - -This refers to the information about the hotspot connected to this station. The information is obtained using [GetLinkedInfo](Wifiservice.md#gaa8f07a31b01761da44f0fe90d461c168). - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

ssid [WIFI_MAX_SSID_LEN]

-

char 

-

bssid [WIFI_MAC_LEN]

-

unsigned char 

-

rssi

-

int 

-

connState

-

WifiConnState 

-

disconnectedReason

-

unsigned short 

-
- -## **Details** - -## **Field Documentation** - -## bssid - -``` -unsigned char WifiLinkedInfo::bssid[[WIFI_MAC_LEN](Wifiservice.md#gabc871a0934ad71ec71b29de3f9bc4815)] -``` - - **Description:** - -Basic service set ID \(BSSID\). For its length, see [WIFI\_MAC\_LEN](Wifiservice.md#gabc871a0934ad71ec71b29de3f9bc4815). - -## connState - -``` -[WifiConnState](Wifiservice.md#ga970b7d5373775b1c7f3b31074bae50e1) WifiLinkedInfo::connState -``` - - **Description:** - -Wi-Fi connection state, which is defined in [WifiConnState](Wifiservice.md#ga970b7d5373775b1c7f3b31074bae50e1) - -## disconnectedReason - -``` -unsigned short WifiLinkedInfo::disconnectedReason -``` - - **Description:** - -Reason for Wi-Fi disconnection - -## rssi - -``` -int WifiLinkedInfo::rssi -``` - - **Description:** - -Received signal strength indicator \(RSSI\) - -## ssid - -``` -char WifiLinkedInfo::ssid[[WIFI_MAX_SSID_LEN](Wifiservice.md#ga7e01d8c5079081de486637b4482c937a)] -``` - - **Description:** - -[Service](Service.md) set ID \(SSID\). For its length, see [WIFI\_MAX\_SSID\_LEN](Wifiservice.md#ga7e01d8c5079081de486637b4482c937a). - diff --git a/api/api-LinkIoT/WifiScanInfo.md b/api/api-LinkIoT/WifiScanInfo.md deleted file mode 100755 index 85725b3c7cea4669046754b40ac0aa713796644e..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/WifiScanInfo.md +++ /dev/null @@ -1,128 +0,0 @@ -# WifiScanInfo - -## **Overview** - -**Related Modules:** - -[Wifiservice](Wifiservice.md) - -**Description:** - -Represents the Wi-Fi scan result information. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

ssid [WIFI_MAX_SSID_LEN]

-

char 

-

bssid [WIFI_MAC_LEN]

-

unsigned char 

-

securityType

-

int 

-

rssi

-

int 

-

band

-

int 

-

frequency

-

int 

-
- -## **Details** - -## **Field Documentation** - -## band - -``` -int WifiScanInfo::band -``` - - **Description:** - -Frequency band - -## bssid - -``` -unsigned char WifiScanInfo::bssid[[WIFI_MAC_LEN](Wifiservice.md#gabc871a0934ad71ec71b29de3f9bc4815)] -``` - - **Description:** - -Basic service set ID \(BSSID\). For its length, see [WIFI\_MAC\_LEN](Wifiservice.md#gabc871a0934ad71ec71b29de3f9bc4815). - -## frequency - -``` -int WifiScanInfo::frequency -``` - - **Description:** - -Frequency in MHz - -## rssi - -``` -int WifiScanInfo::rssi -``` - - **Description:** - -Received signal strength indicator \(RSSI\) - -## securityType - -``` -int WifiScanInfo::securityType -``` - - **Description:** - -Security type. For details, see [WifiSecurityType](Wifiservice.md#ga97c133f7db7c1234babcde03c4ce1b05). - -## ssid - -``` -char WifiScanInfo::ssid[[WIFI_MAX_SSID_LEN](Wifiservice.md#ga7e01d8c5079081de486637b4482c937a)] -``` - - **Description:** - -[Service](Service.md) set ID \(SSID\). For its length, see [WIFI\_MAX\_SSID\_LEN](Wifiservice.md#ga7e01d8c5079081de486637b4482c937a). - diff --git a/api/api-LinkIoT/WifiScanParams.md b/api/api-LinkIoT/WifiScanParams.md deleted file mode 100755 index 325bba59237d057c1143d6aac3a383e33f7972d7..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/WifiScanParams.md +++ /dev/null @@ -1,128 +0,0 @@ -# WifiScanParams - -## **Overview** - -**Related Modules:** - -[Wifiservice](Wifiservice.md) - -**Description:** - -Represents the Wi-Fi station configuration used to connect to a specified Wi-Fi device. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

ssid [WIFI_MAX_SSID_LEN]

-

char 

-

ssidLen

-

char 

-

bssid [WIFI_MAC_LEN]

-

char 

-

freqs

-

int 

-

band

-

int 

-

scanType

-

WifiScanType 

-
- -## **Details** - -## **Field Documentation** - -## band - -``` -int WifiScanParams::band -``` - - **Description:** - -Frequency band. - -## bssid - -``` -char WifiScanParams::bssid[[WIFI_MAC_LEN](Wifiservice.md#gabc871a0934ad71ec71b29de3f9bc4815)] -``` - - **Description:** - -Basic service set ID \(BSSID\). Its length is defined by [WIFI\_MAC\_LEN](Wifiservice.md#gabc871a0934ad71ec71b29de3f9bc4815). - -## freqs - -``` -int WifiScanParams::freqs -``` - - **Description:** - -Frequency. - -## scanType - -``` -[WifiScanType](Wifiservice.md#ga007bf5e22727debc02cad860e41a60a3) WifiScanParams::scanType -``` - - **Description:** - -Wi-Fi scan type, which is defined by [WifiScanType](Wifiservice.md#ga007bf5e22727debc02cad860e41a60a3). - -## ssid - -``` -char WifiScanParams::ssid[[WIFI_MAX_SSID_LEN](Wifiservice.md#ga7e01d8c5079081de486637b4482c937a)] -``` - - **Description:** - -[Service](Service.md) set ID \(SSID\). Its maximum length is defined by [WIFI\_MAX\_SSID\_LEN](Wifiservice.md#ga7e01d8c5079081de486637b4482c937a). - -## ssidLen - -``` -char WifiScanParams::ssidLen -``` - - **Description:** - -Length of the SSID. - diff --git a/api/api-LinkIoT/Wifiiot.md b/api/api-LinkIoT/Wifiiot.md deleted file mode 100755 index 14f4ffc1a1f19d336d9462bf83f449cd54f858a2..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/Wifiiot.md +++ /dev/null @@ -1,7243 +0,0 @@ -# Wifiiot - -## **Overview** - -Provides dedicated device operation interfaces on the Wi-Fi module, including ADC, AT, flash, GPIO, I2C, I2S, partition, PWM, SDIO, UART, and watchdog. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Name

-

Description

-

wifiiot_adc.h

-

Declares the ADC interface functions for you to read data.

-

wifiiot_at.h

-

Declares the AT interface functions.

-

wifiiot_errno.h

-

Defines error codes used by the Wi-Fi module.

-

wifiiot_flash.h

-

Declares the flash interface functions.

-

wifiiot_flash_ex.h

-

Declares the extended flash interface functions for obtaining flash information.

-

wifiiot_gpio.h

-

Declares the GPIO interface functions.

-

wifiiot_gpio_ex.h

-

Declares the extended GPIO interface functions.

-

wifiiot_i2c.h

-

Declares the I2C interface functions.

-

wifiiot_i2c_ex.h

-

Declares the extended I2C interface functions.

-

wifiiot_i2s.h

-

Declares the I2S interface functions.

-

wifiiot_kal.h

-

Declares the KAL interface functions.

-

wifiiot_partition.h

-

Declares the partition interface functions.

-

wifiiot_pwm.h

-

Declares the PWM interface functions.

-

wifiiot_sdio.h

-

Declares the SDIO interface functions.

-

wifiiot_spi.h

-

Declares the SPI interface functions.

-

wifiiot_uart.h

-

Declares the UART interface functions.

-

wifiiot_uart_ex.h

-

Declares the extended UART interface functions.

-

wifiiot_watchdog.h

-

Declares the watchdog interface functions.

-
- -## Data Structures - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

AtCmdTbl

-

Defines the AT command registration structure.

-

WifiIotI2cData

-

Defines I2C data transmission attributes.

-

WifiIotI2cFunc

-

Defines I2C callbacks.

-

WifiIotI2sAttribute

-

Defines I2S attributes.

-

WifiIotFlashPartitionInfo

-

Describes an entry in a flash partition table.

-

WifiIotFlashPartitionTable

-

Describes a flash partition table.

-

WifiIotSdioExtendFunc

-

Provides extended SDIO attributes.

-

WifiIotSdioAdmatable

-

Defines attributes of an SDIO ADMA table.

-

WifiIotSdioIntcallback

-

SDIO interrupt callback structure.

-

WifiIotSpiCfgBasicInfo

-

Defines data communication parameters.

-

WifiIotSpiCfgInitParam

-

Specifies whether a device is a master or slave device.

-

WifiIotUartAttribute

-

Defines the basic attributes of a UART device.

-

WifiIotUartExtraAttr

-

Defines the extended attributes of a UART device.

-
- -## Macros - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

WIFI_IOT_SUCCESS   0

-

Defines a module-level return value to indicate a successful operation.

-

WIFI_IOT_FAILURE   (-1)

-

Defines a module-level return value to indicate an operation failure.

-

WIFI_IOT_ERR_UART_INVALID_PARAMETER   0x80001000

-

Defines a UART error code to indicate an invalid parameter.

-

WIFI_IOT_ERR_UART_INVALID_SUSPEND   0x80001001

-

Defines a UART error code to indicate an invalid pause operation.

-

WIFI_IOT_ERR_UART_INVALID_PARITY   0x80001002

-

Defines a UART error code to indicate an invalid parity check.

-

WIFI_IOT_ERR_UART_INVALID_DATA_BITS   0x80001003

-

Defines a UART error code to indicate an invalid data bit.

-

WIFI_IOT_ERR_UART_INVALID_STOP_BITS   0x80001004

-

Defines a UART error code to indicate an invalid stop bit.

-

WIFI_IOT_ERR_UART_INVALID_BAUD   0x80001005

-

Defines a UART error code to indicate an invalid baud rate.

-

WIFI_IOT_ERR_UART_INVALID_COM_PORT   0x80001006

-

Defines a UART error code to indicate an invalid port number.

-

WIFI_IOT_ERR_UART_NOT_SUPPORT_DMA   0x80001007

-

Defines a UART error code to indicate a non-support for DMA.

-

WIFI_IOT_ERR_UART_NOT_BLOCK_MODE   0x80001008

-

Defines a UART error code to indicate the non-block mode.

-

WIFI_IOT_ERR_GPIO_INVALID_PARAMETER   0x80001040

-

Defines a GPIO error code to indicate an invalid parameter.

-

WIFI_IOT_ERR_GPIO_REPEAT_INIT   0x80001041

-

Defines a GPIO error code to indicate repeated initialization.

-

WIFI_IOT_ERR_GPIO_NOT_INIT   0x80001042

-

Defines a GPIO error code to indicate non-initialization.

-

WIFI_IOT_ERR_GPIO_NOT_SUPPORT   0x80001043

-

Defines a GPIO error code to indicate a non-support.

-

WIFI_IOT_ERR_FLASH_NOT_INIT   0x800010C0

-

Defines a flash error code to indicate non-initialization.

-

WIFI_IOT_ERR_FLASH_INVALID_PARAM   0x800010C1

-

Defines a flash error code to indicate an invalid parameter.

-

WIFI_IOT_ERR_FLASH_INVALID_PARAM_BEYOND_ADDR   0x800010C2

-

Defines a flash error code to indicate that the address is out of range.

-

WIFI_IOT_ERR_FLASH_INVALID_PARAM_SIZE_ZERO   0x800010C3

-

Defines a flash error code to indicate that the parameter size is 0

-

WIFI_IOT_ERR_FLASH_INVALID_PARAM_ERASE_NOT_ALIGN   0x800010C4

-

Defines a flash error code to indicate that the erase size is not aligned.

-

WIFI_IOT_ERR_FLASH_INVALID_PARAM_IOCTRL_DATA_NULL   0x800010C5

-

Defines a flash error code to indicate that the data of the I/O controller is empty.

-

WIFI_IOT_ERR_FLASH_INVALID_PARAM_DATA_NULL   0x800010C6

-

Defines a flash error code to indicate empty data.

-

WIFI_IOT_ERR_FLASH_INVALID_PARAM_PAD1   0x800010C7

-

Defines a flash error code to indicate that pad1 is incorrect.

-

WIFI_IOT_ERR_FLASH_INVALID_PARAM_PAD2   0x800010C8

-

Defines a flash error code to indicate that pad2 is incorrect.

-

WIFI_IOT_ERR_FLASH_INVALID_PARAM_PAD3   0x800010C9

-

Defines a flash error code to indicate that pad3 is incorrect.

-

WIFI_IOT_ERR_FLASH_INVALID_PARAM_PAD4   0x800010CA

-

Defines a flash error code to indicate that pad4 is incorrect.

-

WIFI_IOT_ERR_FLASH_TIME_OUT_WAIT_READY   0x800010CB

-

Defines a flash error code to indicate a timeout on waiting for ready.

-

WIFI_IOT_ERR_FLASH_QUAD_MODE_READ_REG1   0x800010CC

-

Defines a flash error code to indicate that an error occurs when reading register 1.

-

WIFI_IOT_ERR_FLASH_QUAD_MODE_READ_REG2   0x800010CD

-

Defines a flash error code to indicate that an error occurs when reading register 2.

-

WIFI_IOT_ERR_FLASH_QUAD_MODE_COMPARE_REG   0x800010CE

-

Defines a flash error code to indicate that an error occurs when comparing registers.

-

WIFI_IOT_ERR_FLASH_NO_MATCH_FLASH   0x800010CF

-

Defines a flash error code to indicate a flash mismatch.

-

WIFI_IOT_ERR_FLASH_WRITE_ENABLE   0x800010D0

-

Defines a flash error code to indicate a failure in enabling write.

-

WIFI_IOT_ERR_FLASH_NO_MATCH_ERASE_SIZE   0x800010D1

-

Defines a flash error code to indicate a mismatch in the size of data to erase.

-

WIFI_IOT_ERR_FLASH_MAX_SPI_OP   0x800010D2

-

Defines a flash error code to indicate the maximum value of the SPI operation.

-

WIFI_IOT_ERR_FLASH_NOT_SUPPORT_IOCTRL_ID   0x800010D3

-

Defines a flash error code to indicate an unsupported IO controller ID..

-

WIFI_IOT_ERR_FLASH_INVALID_CHIP_ID   0x800010D4

-

Defines a flash error code to indicate an invalid chip ID.

-

WIFI_IOT_ERR_FLASH_RE_INIT   0x800010D5

-

Defines a flash error code to indicate repeated initialization.

-

WIFI_IOT_ERR_FLASH_WRITE_NOT_SUPPORT_ERASE   0x800010D6

-

Defines a flash error code to indicate a non-support for data erasure.

-

WIFI_IOT_ERR_FLASH_WRITE_COMPARE_WRONG   0x800010D7

-

Defines a flash error code to indicate that an error occurs when comparing the data written.

-

WIFI_IOT_ERR_FLASH_WAIT_CFG_START_TIME_OUT   0x800010D8

-

Defines a flash error code to indicate a timeout on waiting for a configuration to start.

-

WIFI_IOT_ERR_FLASH_PATITION_INIT_FAIL   0x800010D9

-

Defines a flash error code to indicate a partition initialization failure.

-

WIFI_IOT_ERR_FLASH_INITILIZATION   0x800010DA

-

Defines a flash error code to indicate initialization.

-

WIFI_IOT_ERR_FLASH_ERASE_NOT_4K_ALIGN   0x800010DB

-

Defines a flash error code to indicate that the size of data to erase is not a multiple of 4K bytes.

-

WIFI_IOT_ERR_FLASH_PROTECT_NOT_SUPPORT   0x800010DC

-

Defines a flash error code to indicate a non-support.

-

WIFI_IOT_ERR_FLASH_PROTECT_NOT_INIT   0x800010DD

-

Defines a flash error code to indicate non-initialization.

-

WIFI_IOT_ERR_FLASH_PROTECT_RE_INIT   0x800010DE

-

Defines a flash error code to indicate repeated initialization.

-

WIFI_IOT_ERR_FLASH_PROTECT_NOT_FIND_CHIP   0x800010DF

-

Defines a flash error code to indicate that no chip is found.

-

WIFI_IOT_ERR_FLASH_CRYPTO_INVALID_PARAM   0x800010F0

-

Defines a flash error code to indicate an invalid parameter.

-

WIFI_IOT_ERR_FLASH_CRYPTO_BEYOND_ADDR_SIZE   0x800010F1

-

Defines a flash error code to indicate that the address is out of range.

-

WIFI_IOT_ERR_FLASH_CRYPTO_MALLOC_FAIL   0x800001F2

-

Defines a flash error code to indicate a failure in applying for memory.

-

WIFI_IOT_ERR_FLASH_CRYPTO_DATA_ENCRYPT_ERR   0x800001F3

-

Defines a flash error code to indicate an encryption error.

-

WIFI_IOT_ERR_FLASH_CRYPTO_DATA_DECRYPT_ERR   0x800001F4

-

Defines a flash error code to indicate a decryption error.

-

WIFI_IOT_ERR_FLASH_CRYPTO_KEY_EMPTY_ERR   0x800001F5

-

Defines a flash error code to indicate an empty key value.

-

WIFI_IOT_ERR_FLASH_CRYPTO_MEMCPY_FAIL   0x800001F6

-

Defines a flash error code to indicate a copy failure.

-

WIFI_IOT_ERR_FLASH_CRYPTO_NOT_SUPPORT   0x800001F7

-

Defines a flash error code to indicate a non-support for encryption.

-

WIFI_IOT_ERR_FLASH_CRYPTO_PREPARE_ERR   0x800001F8

-

Defines a flash error code to indicate an incorrect parameter during encryption.

-

WIFI_IOT_ERR_FLASH_CRYPTO_KEY_INVALID_ERR   0x800001F9

-

Defines a flash error code to indicate an invalid key.

-

WIFI_IOT_ERR_FLASH_CRYPTO_KEY_SAVE_ERR   0x800001FA

-

Defines a flash error code to indicate a failure in saving the key.

-

WIFI_IOT_ERR_FLASH_CRYPTO_KERNEL_ADDR_ERR   0x800001FB

-

Defines a flash error code to indicate an incorrect kernel address..

-

WIFI_IOT_ERR_I2C_NOT_INIT   0x80001180

-

Defines an I2C error code to indicate a non-support.

-

WIFI_IOT_ERR_I2C_INVALID_PARAMETER   0x80001181

-

Defines an I2C error code to indicate an invalid parameter.

-

WIFI_IOT_ERR_I2C_TIMEOUT_START   0x80001182

-

Defines an I2C error code to indicate a start timeout.

-

WIFI_IOT_ERR_I2C_TIMEOUT_WAIT   0x80001183

-

Defines an I2C error code to indicate a wait timeout.

-

WIFI_IOT_ERR_I2C_TIMEOUT_STOP   0x80001184

-

Defines an I2C error code to indicate a stop timeout.

-

WIFI_IOT_ERR_I2C_TIMEOUT_RCV_BYTE   0x80001185

-

Defines an I2C error code to indicate a receive timeout.

-

WIFI_IOT_ERR_I2C_TIMEOUT_RCV_BYTE_PROC   0x80001186

-

Defines an I2C error code to indicate a processing timeout.

-

WIFI_IOT_ERR_I2C_WAIT_SEM_FAIL   0x80001187

-

Defines an I2C error code to indicate a waiting failure.

-

WIFI_IOT_ERR_I2C_START_ACK_ERR   0x80001188

-

Defines an I2C error code to indicate a responding failure.

-

WIFI_IOT_ERR_I2C_WAIT_ACK_ERR   0x80001189

-

Defines an I2C error code to indicate a failure in waiting for a response.

-

WIFI_IOT_ERR_SPI_NOT_INIT   0x800011C0

-

Defines an SPI error code to indicate non-initialization.

-

WIFI_IOT_ERR_SPI_REINIT   0x800011C1

-

Defines an SPI error code to indicate repeated initialization.

-

WIFI_IOT_ERR_SPI_PARAMETER_WRONG   0x800011C2

-

Defines an SPI error code to indicate a parameter error.

-

WIFI_IOT_ERR_SPI_BUSY   0x800011C3

-

Defines an SPI error code to indicate the busy state.

-

WIFI_IOT_ERR_SPI_WRITE_TIMEOUT   0x800011C4

-

Defines an SPI error code to indicate a write timeout.

-

WIFI_IOT_ERR_SPI_READ_TIMEOUT   0x800011C5

-

Defines an SPI error code to indicate a read timeout.

-

WIFI_IOT_ERR_SPI_NOT_SUPPORT_DMA   0x800011C6

-

Defines an SPI error code to indicate a non-support for DMA.

-

WIFI_IOT_ERR_SDIO_INVALID_PARAMETER   0x80001280

-

Defines an SDIO error code to indicate an invalid parameter.

-

WIFI_IOT_ERR_ADC_PARAMETER_WRONG   0x80001300

-

Defines an ADC error code to indicate a parameter error.

-

WIFI_IOT_ERR_ADC_INVALID_CHANNEL_ID   0x80001301

-

Defines an ADC error code to indicate an invalid channel.

-

WIFI_IOT_ERR_ADC_TIMEOUT   0x80001302

-

Defines an ADC error code to indicate a timeout.

-

WIFI_IOT_ERR_ADC_NOT_INIT   0x80001303

-

Defines an ADC error code to indicate non-initialization.

-

WIFI_IOT_ERR_PWM_NO_INIT   0x80001340

-

Defines a PWM error code to indicate non-initialization.

-

WIFI_IOT_ERR_PWM_INITILIZATION_ALREADY   0x80001341

-

Defines a PWM error code to indicate an initialization error.

-

WIFI_IOT_ERR_PWM_INVALID_PARAMETER   0x80001342

-

Defines a PWM error code to indicate an invalid parameter.

-

WIFI_IOT_ERR_DMA_INVALID_PARA   0x80001380

-

Defines a DMA error code to indicate an invalid parameter.

-

WIFI_IOT_ERR_DMA_NOT_INIT   0x80001381

-

Defines a DMA error code to indicate non-initialization.

-

WIFI_IOT_ERR_DMA_BUSY   0x80001382

-

Defines a DMA error code to indicate the busy state.

-

WIFI_IOT_ERR_DMA_TRANSFER_FAIL   0x80001383

-

Defines a DMA error code to indicate a transmission failure.

-

WIFI_IOT_ERR_DMA_TRANSFER_TIMEOUT   0x80001384

-

Defines a DMA error code to indicate a transmission timeout.

-

WIFI_IOT_ERR_DMA_GET_NOTE_FAIL   0x80001385

-

Defines a DMA error code to indicate a retrieval failure.

-

WIFI_IOT_ERR_DMA_LLI_NOT_CREATE   0x80001386

-

Defines a DMA error code to indicate that the LLI is not created.

-

WIFI_IOT_ERR_DMA_CH_IRQ_ENABLE_FAIL   0x80001387

-

Defines a DMA error code to indicate a failure in enabling channel interrupt.

-

WIFI_IOT_ERR_I2S_INVALID_PARAMETER   0x80001400

-

Defines an I2S error code to indicate an invalid parameter.

-

WIFI_IOT_ERR_I2S_WRITE_TIMEOUT   0x80001401

-

Defines an I2S error code to indicate a write timeout.

-

WIFI_IOT_ERR_AT_NAME_OR_FUNC_REPEAT_REGISTERED   0x80003280

-

Defines an AT error code to indicate repeated function registration.

-

WIFI_IOT_ERR_AT_INVALID_PARAMETER   0x80003281

-

Defines an AT error code to indicate an invalid parameter.

-

WIFI_IOT_FLASH_PARTITON_MAX    12

-

Indicates the maximum number of partition tables.

-

WIFI_IOT_SDIO_EXTENDREG_COUNT    64

-

Indicates the number of extended registers on an SDIO device.

-
- -## Typedefs - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Typedef Name

-

Description

-

GpioIsrCallbackFunc) (char *arg)

-

typedef void(* 

-

Indicates the GPIO interrupt callback.

-

I2CResetFunc) (void)

-

typedef void(* 

-

Indicates the callback invoked when a device exception occurs.

-

I2cPrepareFunc) (void)

-

typedef void(* 

-

Indicates the callback invoked for device preparation.

-

I2cRestoreFunc) (void)

-

typedef void(* 

-

Indicates the callback invoked for device recovery.

-

TickIdleKalCallback) (void)

-

typedef void(* 

-

Indicates the idle task and CPU tick callbacks.

-

NotifyHostMessageEvent ) (void)

-

typedef void(* 

-

Indicates the callback invoked upon a message event on the host.

-

SpiIsrFunc ) (void)

-

typedef void(* 

-

Indicates the SPI callback, which is used in SpiRegisterUsrFunc.

-
- -## Enumerations - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

WifiIotAdcChannelIndex {   WIFI_IOT_ADC_CHANNEL_0, WIFI_IOT_ADC_CHANNEL_1, WIFI_IOT_ADC_CHANNEL_2, WIFI_IOT_ADC_CHANNEL_3,   WIFI_IOT_ADC_CHANNEL_4, WIFI_IOT_ADC_CHANNEL_5, WIFI_IOT_ADC_CHANNEL_6, WIFI_IOT_ADC_CHANNEL_7,   WIFI_IOT_ADC_CHANNEL_BUTT }

-

Enumerates ADC channel indexes.

-

WifiIotAdcCurBais {   WIFI_IOT_ADC_CUR_BAIS_DEFAULT, WIFI_IOT_ADC_CUR_BAIS_AUTO, WIFI_IOT_ADC_CUR_BAIS_1P8V, WIFI_IOT_ADC_CUR_BAIS_3P3V,   WIFI_IOT_ADC_CUR_BAIS_BUTT }

-

Enumerates analog power control modes.

-

WifiIotAdcEquModelSel {   WIFI_IOT_ADC_EQU_MODEL_1, WIFI_IOT_ADC_EQU_MODEL_2, WIFI_IOT_ADC_EQU_MODEL_4, WIFI_IOT_ADC_EQU_MODEL_8,   WIFI_IOT_ADC_EQU_MODEL_BUTT }

-

Enumerates equation models.

-

WifiIotGpioIdx {   WIFI_IOT_GPIO_IDX_0, WIFI_IOT_GPIO_IDX_1, WIFI_IOT_GPIO_IDX_2, WIFI_IOT_GPIO_IDX_3,   WIFI_IOT_GPIO_IDX_4, WIFI_IOT_GPIO_IDX_5, WIFI_IOT_GPIO_IDX_6, WIFI_IOT_GPIO_IDX_7,   WIFI_IOT_GPIO_IDX_8, WIFI_IOT_GPIO_IDX_9, WIFI_IOT_GPIO_IDX_10, WIFI_IOT_GPIO_IDX_11,   WIFI_IOT_GPIO_IDX_12, WIFI_IOT_GPIO_IDX_13, WIFI_IOT_GPIO_IDX_14, WIFI_IOT_GPIO_IDX_MAX }

-

Enumerates GPIO pin IDs.

-

WifiIotGpioValue { WIFI_IOT_GPIO_VALUE0 = 0, WIFI_IOT_GPIO_VALUE1 }

-

Enumerates GPIO level values.

-

WifiIotGpioDir { WIFI_IOT_GPIO_DIR_IN = 0, WIFI_IOT_GPIO_DIR_OUT }

-

Enumerates GPIO directions.

-

WifiIotGpioIntType { WIFI_IOT_INT_TYPE_LEVEL = 0, WIFI_IOT_INT_TYPE_EDGE }

-

Enumerates GPIO interrupt trigger modes.

-

WifiIotGpioIntPolarity { WIFI_IOT_GPIO_EDGE_FALL_LEVEL_LOW = 0, WIFI_IOT_GPIO_EDGE_RISE_LEVEL_HIGH }

-

Enumerates I/O interrupt polarities.

-

WifiIotIoName {   WIFI_IOT_IO_NAME_GPIO_0, WIFI_IOT_IO_NAME_GPIO_1, WIFI_IOT_IO_NAME_GPIO_2, WIFI_IOT_IO_NAME_GPIO_3,   WIFI_IOT_IO_NAME_GPIO_4, WIFI_IOT_IO_NAME_GPIO_5, WIFI_IOT_IO_NAME_GPIO_6, WIFI_IOT_IO_NAME_GPIO_7,   WIFI_IOT_IO_NAME_GPIO_8, WIFI_IOT_IO_NAME_GPIO_9, WIFI_IOT_IO_NAME_GPIO_10, WIFI_IOT_IO_NAME_GPIO_11,   WIFI_IOT_IO_NAME_GPIO_12, WIFI_IOT_IO_NAME_GPIO_13, WIFI_IOT_IO_NAME_GPIO_14, WIFI_IOT_IO_NAME_MAX }

-

Enumerates GPIO hardware pin IDs.

-

WifiIotIoFuncGpio0 {   WIFI_IOT_IO_FUNC_GPIO_0_GPIO, WIFI_IOT_IO_FUNC_GPIO_0_UART1_TXD = 2, WIFI_IOT_IO_FUNC_GPIO_0_SPI1_CK, WIFI_IOT_IO_FUNC_GPIO_0_JTAG_TDO,   WIFI_IOT_IO_FUNC_GPIO_0_PWM3_OUT, WIFI_IOT_IO_FUNC_GPIO_0_I2C1_SDA }

-

Enumerates the functions of GPIO hardware pin 0.

-

WifiiIotIoFuncGpio1 { WIFI_IOT_IO_FUNC_GPIO_1_GPIO }

-

Enumerates the functions of GPIO hardware pin 1.

-

WifiIotIoFuncGpio2 {   WIFI_IOT_IO_FUNC_GPIO_2_GPIO, WIFI_IOT_IO_FUNC_GPIO_2_UART1_RTS_N = 2, WIFI_IOT_IO_FUNC_GPIO_2_SPI1_TXD, WIFI_IOT_IO_FUNC_GPIO_2_JTAG_TRSTN,   WIFI_IOT_IO_FUNC_GPIO_2_PWM2_OUT, WIFI_IOT_IO_FUNC_GPIO_2_SSI_CLK = 7 }

-

Enumerates the functions of GPIO hardware pin 2.

-

WifiIotIoFuncGpio3 {   WIFI_IOT_IO_FUNC_GPIO_3_GPIO, WIFI_IOT_IO_FUNC_GPIO_3_UART0_TXD, WIFI_IOT_IO_FUNC_GPIO_3_UART1_CTS_N, WIFI_IOT_IO_FUNC_GPIO_3_SPI1_CSN,   WIFI_IOT_IO_FUNC_GPIO_3_JTAG_TDI, WIFI_IOT_IO_FUNC_GPIO_3_PWM5_OUT, WIFI_IOT_IO_FUNC_GPIO_3_I2C1_SDA, WIFI_IOT_IO_FUNC_GPIO_3_SSI_DATA }

-

Enumerates the functions of GPIO hardware pin 3.

-

WifiIotIoFuncGpio4 {   WIFI_IOT_IO_FUNC_GPIO_4_GPIO, WIFI_IOT_IO_FUNC_GPIO_4_UART0_RXD = 2, WIFI_IOT_IO_FUNC_GPIO_4_JTAG_TMS = 4, WIFI_IOT_IO_FUNC_GPIO_4_PWM1_OUT,   WIFI_IOT_IO_FUNC_GPIO_4_I2C1_SCL }

-

Enumerates the functions of GPIO hardware pin 4.

-

WifiIotIoFuncGpio5 {   WIFI_IOT_IO_FUNC_GPIO_5_GPIO, WIFI_IOT_IO_FUNC_GPIO_5_UART1_RXD = 2, WIFI_IOT_IO_FUNC_GPIO_5_SPI0_CSN, WIFI_IOT_IO_FUNC_GPIO_5_PWM2_OUT = 5,   WIFI_IOT_IO_FUNC_GPIO_5_I2S0_MCLK, WIFI_IOT_IO_FUNC_GPIO_5_BT_STATUS }

-

Enumerates the functions of GPIO hardware pin 5.

-

WifiIotIoFuncGpio6 {   WIFI_IOT_IO_FUNC_GPIO_6_GPIO, WIFI_IOT_IO_FUNC_GPIO_6_UART1_TXD = 2, WIFI_IOT_IO_FUNC_GPIO_6_SPI0_CK, WIFI_IOT_IO_FUNC_GPIO_6_PWM3_OUT = 5,   WIFI_IOT_IO_FUNC_GPIO_6_I2S0_TX, WIFI_IOT_IO_FUNC_GPIO_6_COEX_SWITCH }

-

Enumerates the functions of GPIO hardware pin 6.

-

WifiIotIoFuncGpio7 {   WIFI_IOT_IO_FUNC_GPIO_7_GPIO, WIFI_IOT_IO_FUNC_GPIO_7_UART1_CTS_N = 2, WIFI_IOT_IO_FUNC_GPIO_7_SPI0_RXD, WIFI_IOT_IO_FUNC_GPIO_7_PWM0_OUT = 5,   WIFI_IOT_IO_FUNC_GPIO_7_I2S0_BCLK, WIFI_IOT_IO_FUNC_GPIO_7_BT_ACTIVE }

-

Enumerates the functions of GPIO hardware pin 7.

-

WifiIotIoFuncGpio8 {   WIFI_IOT_IO_FUNC_GPIO_8_GPIO, WIFI_IOT_IO_FUNC_GPIO_8_UART1_RTS_N = 2, WIFI_IOT_IO_FUNC_GPIO_8_SPI0_TXD, WIFI_IOT_IO_FUNC_GPIO_8_PWM1_OUT = 5,   WIFI_IOT_IO_FUNC_GPIO_8_I2S0_WS, WIFI_IOT_IO_FUNC_GPIO_8_WLAN_ACTIVE }

-

Enumerates the functions of GPIO hardware pin 8.

-

WifiIotIoFuncGpio9 {   WIFI_IOT_IO_FUNC_GPIO_9_GPIO, WIFI_IOT_IO_FUNC_GPIO_9_I2C0_SCL, WIFI_IOT_IO_FUNC_GPIO_9_UART2_RTS_N, WIFI_IOT_IO_FUNC_GPIO_9_SDIO_D2,   WIFI_IOT_IO_FUNC_GPIO_9_SPI0_TXD, WIFI_IOT_IO_FUNC_GPIO_9_PWM0_OUT, WIFI_IOT_IO_FUNC_GPIO_9_I2S0_MCLK = 7 }

-

Enumerates the functions of GPIO hardware pin 9.

-

WifiIotIoFuncGpio10 {   WIFI_IOT_IO_FUNC_GPIO_10_GPIO, WIFI_IOT_IO_FUNC_GPIO_10_I2C0_SDA, WIFI_IOT_IO_FUNC_GPIO_10_UART2_CTS_N, WIFI_IOT_IO_FUNC_GPIO_10_SDIO_D3,   WIFI_IOT_IO_FUNC_GPIO_10_SPI0_CK, WIFI_IOT_IO_FUNC_GPIO_10_PWM1_OUT, WIFI_IOT_IO_FUNC_GPIO_10_I2S0_TX = 7 }

-

Enumerates the functions of GPIO hardware pin 10.

-

WifiIotIoFuncGpio11 {   WIFI_IOT_IO_FUNC_GPIO_11_GPIO, WIFI_IOT_IO_FUNC_GPIO_11_UART2_TXD = 2, WIFI_IOT_IO_FUNC_GPIO_11_SDIO_CMD, WIFI_IOT_IO_FUNC_GPIO_11_SPI0_RXD,   WIFI_IOT_IO_FUNC_GPIO_11_PWM2_OUT, WIFI_IOT_IO_FUNC_GPIO_11_RF_TX_EN_EXT, WIFI_IOT_IO_FUNC_GPIO_11_I2S0_RX }

-

Enumerates the functions of GPIO hardware pin 11.

-

WifiIotIoFuncGpio12 {   WIFI_IOT_IO_FUNC_GPIO_12_GPIO, WIFI_IOT_IO_FUNC_GPIO_12_UART2_RXD = 2, WIFI_IOT_IO_FUNC_GPIO_12_SDIO_CLK, WIFI_IOT_IO_FUNC_GPIO_12_SPI0_CSN,   WIFI_IOT_IO_FUNC_GPIO_12_PWM3_OUT, WIFI_IOT_IO_FUNC_GPIO_12_RF_RX_EN_EXT, WIFI_IOT_IO_FUNC_GPIO_12_I2S0_BCLK }

-

Enumerates the functions of GPIO hardware pin 12.

-

WifiIotIoFuncGpio13 {   WIFI_IOT_IO_FUNC_GPIO_13_SSI_DATA, WIFI_IOT_IO_FUNC_GPIO_13_UART0_TXD, WIFI_IOT_IO_FUNC_GPIO_13_UART2_RTS_N, WIFI_IOT_IO_FUNC_GPIO_13_SDIO_D0,   WIFI_IOT_IO_FUNC_GPIO_13_GPIO, WIFI_IOT_IO_FUNC_GPIO_13_PWM4_OUT, WIFI_IOT_IO_FUNC_GPIO_13_I2C0_SDA, WIFI_IOT_IO_FUNC_GPIO_13_I2S0_WS }

-

Enumerates the functions of GPIO hardware pin 13.

-

WifiIotIoFuncGpio14 {   WIFI_IOT_IO_FUNC_GPIO_14_SSI_CLK, WIFI_IOT_IO_FUNC_GPIO_14_UART0_RXD, WIFI_IOT_IO_FUNC_GPIO_14_UART2_CTS_N, WIFI_IOT_IO_FUNC_GPIO_14_SDIO_D1,   WIFI_IOT_IO_FUNC_GPIO_14_GPIO, WIFI_IOT_IO_FUNC_GPIO_14_PWM5_OUT, WIFI_IOT_IO_FUNC_GPIO_14_I2C0_SCL }

-

Enumerates the functions of GPIO hardware pin 14.

-

WifiIotIoDriverStrength {   WIFI_IOT_IO_DRIVER_STRENGTH_0 = 0, WIFI_IOT_IO_DRIVER_STRENGTH_1, WIFI_IOT_IO_DRIVER_STRENGTH_2, WIFI_IOT_IO_DRIVER_STRENGTH_3,   WIFI_IOT_IO_DRIVER_STRENGTH_4, WIFI_IOT_IO_DRIVER_STRENGTH_5, WIFI_IOT_IO_DRIVER_STRENGTH_6, WIFI_IOT_IO_DRIVER_STRENGTH_7,   WIFI_IOT_IO_DRIVER_STRENGTH_MAX }

-

Enumerates I/O driver strength levels.

-

WifiIotIoPull { WIFI_IOT_IO_PULL_NONE, WIFI_IOT_IO_PULL_UP, WIFI_IOT_IO_PULL_DOWN, WIFI_IOT_IO_PULL_MAX }

-

Enumerates GPIO pull-up or pull-down settings.

-

WifiIotI2cIdx { WIFI_IOT_I2C_IDX_0, WIFI_IOT_I2C_IDX_1 }

-

Enumerates I2C hardware indexes.

-

WifiIotI2sSampleRate { WIFI_IOT_I2S_SAMPLE_RATE_8K = 8, WIFI_IOT_I2S_SAMPLE_RATE_16K = 16, WIFI_IOT_I2S_SAMPLE_RATE_32K = 32, WIFI_IOT_I2S_SAMPLE_RATE_48K = 48 }

-

Enumerates I2S sampling rates.

-

WifiIotI2sResolution { WIFI_IOT_I2S_RESOLUTION_16BIT = 16, WIFI_IOT_I2S_RESOLUTION_24BIT = 24 }

-

Enumerates I2S resolution.

-

WifiIotFlashPartitionTableId {   WIFI_IOT_FLASH_PARTITON_BOOT = 0, WIFI_IOT_FLASH_PARTITON_FACTORY_NV, WIFI_IOT_FLASH_PARTITON_NORMAL_NV, WIFI_IOT_FLASH_PARTITON_NORMAL_NV_BACKUP,   WIFI_IOT_FLASH_PARTITON_KERNEL_A, WIFI_IOT_FLASH_PARTITON_KERNEL_B, WIFI_IOT_FLASH_PARTITON_HILINK, WIFI_IOT_FLASH_PARTITON_FILE_SYSTEM,   WIFI_IOT_FLASH_PARTITON_USR_RESERVE, WIFI_IOT_FLASH_PARTITON_HILINK_PKI, WIFI_IOT_FLASH_PARTITON_CRASH_INFO, WIFI_IOT_FLASH_PARTITON_BOOT_BACK }

-

Indicates the partition table ID.

-

WifiIotPwmClkSource { WIFI_IOT_PWM_CLK_160M, WIFI_IOT_PWM_CLK_XTAL, WIFI_IOT_PWM_CLK_MAX }

-

Enumerates PWM clock sources.

-

WifiIotPwmPort {   WIFI_IOT_PWM_PORT_PWM0 = 0, WIFI_IOT_PWM_PORT_PWM1 = 1, WIFI_IOT_PWM_PORT_PWM2 = 2, WIFI_IOT_PWM_PORT_PWM3 = 3,   WIFI_IOT_PWM_PORT_PWM4 = 4, WIFI_IOT_PWM_PORT_PWM5 = 5, WIFI_IOT_PWM_PORT_MAX }

-

Enumerates PWM ports.

-

WifiIotSpiIdx { WIFI_IOT_SPI_ID_0 = 0, WIFI_IOT_SPI_ID_1 }

-

Enumerates SPI channel IDs.

-

WifiIotSpiCfgClockCpol { WIFI_IOT_SPI_CFG_CLOCK_CPOL_0, WIFI_IOT_SPI_CFG_CLOCK_CPOL_1 }

-

Enumerates communication polarities.

-

WifiIotSpiCfgClockCpha { WIFI_IOT_SPI_CFG_CLOCK_CPHA_0, WIFI_IOT_SPI_CFG_CLOCK_CPHA_1 }

-

Enumerates communication phases.

-

WifiIotSpiCfgFramMode { WIFI_IOT_SPI_CFG_FRAM_MODE_MOTOROLA, WIFI_IOT_SPI_CFG_FRAM_MODE_TI, WIFI_IOT_SPI_CFG_FRAM_MODE_MICROWIRE }

-

Enumerates communication protocols.

-

WifiIotSpiCfgDataWidth {   WIFI_IOT_SPI_CFG_DATA_WIDTH_E_4BIT = 0x3, WIFI_IOT_SPI_CFG_DATA_WIDTH_E_5BIT, WIFI_IOT_SPI_CFG_DATA_WIDTH_E_6BIT, WIFI_IOT_SPI_CFG_DATA_WIDTH_E_7BIT,   WIFI_IOT_SPI_CFG_DATA_WIDTH_E_8BIT, WIFI_IOT_SPI_CFG_DATA_WIDTH_E_9BIT, WIFI_IOT_SPI_CFG_DATA_WIDTH_E_10BIT, WIFI_IOT_SPI_CFG_DATA_WIDTH_E_11BIT,   WIFI_IOT_SPI_CFG_DATA_WIDTH_E_12BIT, WIFI_IOT_SPI_CFG_DATA_WIDTH_E_13BIT, WIFI_IOT_SPI_CFG_DATA_WIDTH_E_14BIT, WIFI_IOT_SPI_CFG_DATA_WIDTH_E_15BIT,   WIFI_IOT_SPI_CFG_DATA_WIDTH_E_16BIT }

-

Enumerates the communication data width, that is, the number of valid bits in each frame.

-

WifiIotSpiCfgEndian { WIFI_IOT_SPI_CFG_ENDIAN_LITTLE, WIFI_IOT_SPI_CFG_ENDIAN_BIG }

-

Enumerates the endian mode of each frame.

-

WifiIotUartIdx { WIFI_IOT_UART_IDX_0, WIFI_IOT_UART_IDX_1, WIFI_IOT_UART_IDX_2, WIFI_IOT_UART_IDX_MAX }

-

Enumerates the UART serial number.

-

WifiIotUartIdxDataBit { WIFI_IOT_UART_DATA_BIT_5 = 5, WIFI_IOT_UART_DATA_BIT_6, WIFI_IOT_UART_DATA_BIT_7, WIFI_IOT_UART_DATA_BIT_8 }

-

Enumerates the number of UART data bits.

-

WifiIotUartStopBit { WIFI_IOT_UART_STOP_BIT_1 = 1, WIFI_IOT_UART_STOP_BIT_2 = 2 }

-

Enumerates the number of UART stop bits.

-

WifiIotUartParity { WIFI_IOT_UART_PARITY_NONE = 0, WIFI_IOT_UART_PARITY_ODD = 1, WIFI_IOT_UART_PARITY_EVEN = 2 }

-

Enumerates the UART parity bit.

-

WifiIotUartFifoLine {   WIFI_IOT_FIFO_LINE_ONE_EIGHT = 1, WIFI_IOT_FIFO_LINE_ONE_QUARTER, WIFI_IOT_FIFO_LINE_HALF, WIFI_IOT_FIFO_LINE_THREE_QUARTERS,   WIFI_IOT_FIFO_LINE_SEVEN_EIGHTS }

-

Enumerates UART FIFO interrupt thresholds.

-

WifiIotUartBlockState { WIFI_IOT_UART_BLOCK_STATE_NONE_BLOCK = 1, WIFI_IOT_UART_BLOCK_STATE_BLOCK }

-

Enumerates UART block states.

-

WifiIotUartDmaState { WIFI_IOT_UART_NONE_DMA = 1, WIFI_IOT_UART_USE_DMA }

-

Enumerates UART DMA states.

-

WifiIotFlowCtrl { WIFI_IOT_FLOW_CTRL_NONE, WIFI_IOT_FLOW_CTRL_RTS_CTS, WIFI_IOT_FLOW_CTRL_RTS_ONLY, WIFI_IOT_FLOW_CTRL_CTS_ONLY }

-

Enumerates hardware flow control modes.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

AdcRead (WifiIotAdcChannelIndex channel, unsigned short *data, WifiIotAdcEquModelSel equModel, WifiIotAdcCurBais curBais, unsigned short rstCnt)

-

unsigned int 

-

Reads a piece of sampled data from a specified ADC channel based on the input parameters.

-

AtRegisterCmd (const AtCmdTbl *cmdTbl, unsigned short cmdNum)

-

unsigned int 

-

Registers a certain number of AT commands.

-

AtSysCmdRegister (void)

-

void 

-

Registers a system AT command.

-

AtPrintf (const char *fmt,...)

-

int 

-

Formats data and outputs it to the AT command terminal.

-

AtInit (void)

-

unsigned int 

-

Initializes an AT command task.

-

AtCheckUartBusy (unsigned char enable)

-

void 

-

Sets whether to check the UART busy status during low-power voting.

-

FlashRead (const unsigned int flashOffset, const unsigned int size, unsigned char *ramData)

-

unsigned int 

-

Reads data from a flash memory address.

-

FlashWrite (const unsigned int flashOffset, unsigned int size, const unsigned char *ramData, unsigned char doErase)

-

unsigned int 

-

Writes data to a flash memory address.

-

FlashErase (const unsigned int flashOffset, const unsigned int size)

-

unsigned int 

-

Erases data in a specified flash memory address.

-

FlashInit (void)

-

unsigned int 

-

Initializes the flash device.

-

FlashDeinit (void)

-

unsigned int 

-

Deinitializes the flash device.

-

FlashIoctl (unsigned short cmd, char *data)

-

unsigned int 

-

Obtains flash information based on a specific command.

-

GpioInit (void)

-

unsigned int 

-

Initializes the GPIO device.

-

GpioDeinit (void)

-

unsigned int 

-

Deinitializes the GPIO device.

-

GpioSetDir (WifiIotGpioIdx id, WifiIotGpioDir dir)

-

unsigned int 

-

Sets the direction for a GPIO pin.

-

GpioGetDir (WifiIotGpioIdx id, WifiIotGpioDir *dir)

-

unsigned int 

-

Obtains the direction for a GPIO pin.

-

GpioSetOutputVal (WifiIotGpioIdx id, WifiIotGpioValue val)

-

unsigned int 

-

Sets the output level value for a GPIO pin.

-

GpioGetOutputVal (WifiIotGpioIdx id, WifiIotGpioValue *val)

-

unsigned int 

-

Obtains the output level value of a GPIO pin.

-

GpioGetInputVal (WifiIotGpioIdx id, WifiIotGpioValue *val)

-

unsigned int 

-

Obtains the input level value of a GPIO pin.

-

GpioRegisterIsrFunc (WifiIotGpioIdx id, WifiIotGpioIntType intType, WifiIotGpioIntPolarity intPolarity, GpioIsrCallbackFunc func, char *arg)

-

unsigned int 

-

Enables the interrupt function for a GPIO pin.

-

GpioUnregisterIsrFunc (WifiIotGpioIdx id)

-

unsigned int 

-

Disables the interrupt function for a GPIO pin.

-

GpioSetIsrMask (WifiIotGpioIdx id, unsigned char mask)

-

unsigned int 

-

Masks the interrupt function for a GPIO pin.

-

GpioSetIsrMode (WifiIotGpioIdx id, WifiIotGpioIntType intType, WifiIotGpioIntPolarity intPolarity)

-

unsigned int 

-

Sets the interrupt trigger mode of a GPIO pin.

-

IoSetPull (WifiIotIoName id, WifiIotIoPull val)

-

unsigned int 

-

Sets the pull for a GPIO pin.

-

IoSetFunc (WifiIotIoName id, unsigned char val)

-

unsigned int 

-

Sets the multiplexing function for a GPIO pin.

-

IoGetPull (WifiIotIoName id, WifiIotIoPull *val)

-

unsigned int 

-

Obtains the pull type of a GPIO pin.

-

IoGetFunc (WifiIotIoName id, unsigned char *val)

-

unsigned int 

-

Obtains the multiplexing function for a GPIO pin.

-

IOGetDriverStrength (WifiIotIoName id, WifiIotIoDriverStrength *val)

-

unsigned int 

-

Obtains the driver strength of a GPIO pin.

-

IOSetDriverStrength (WifiIotIoName id, WifiIotIoDriverStrength val)

-

unsigned int 

-

Sets the driver strength of a GPIO pin.

-

I2cInit (WifiIotI2cIdx id, unsigned int baudrate)

-

unsigned int 

-

Initializes an I2C device with a specified baud rate.

-

I2cDeinit (WifiIotI2cIdx id)

-

unsigned int 

-

Deinitializes an I2C device.

-

I2cWrite (WifiIotI2cIdx id, unsigned short deviceAddr, const WifiIotI2cData *i2cData)

-

unsigned int 

-

Writes data to an I2C device.

-

I2cRead (WifiIotI2cIdx id, unsigned short deviceAddr, const WifiIotI2cData *i2cData)

-

unsigned int 

-

Reads data from an I2C device.

-

I2cWriteread (WifiIotI2cIdx id, unsigned short deviceAddr, const WifiIotI2cData *i2cData)

-

unsigned int 

-

Sends data to and receives data responses from an I2C device.

-

I2cRegisterResetBusFunc (WifiIotI2cIdx id, WifiIotI2cFunc pfn)

-

void 

-

Registers an I2C callback.

-

I2cSetBaudrate (WifiIotI2cIdx id, unsigned int baudrate)

-

unsigned int 

-

Sets the baud rate for an I2C device.

-

I2sInit (const WifiIotI2sAttribute *i2sAttribute)

-

unsigned int 

-

Initializes the I2S device.

-

I2sDeinit (void)

-

unsigned int 

-

Deinitializes the I2S device.

-

I2sWrite (unsigned char *wrData, unsigned int wrLen, unsigned int timeOutMs)

-

unsigned int 

-

Writes data to the I2S device.

-

I2sRead (unsigned char *rdData, unsigned int rdLen, unsigned int timeOutMs)

-

unsigned int 

-

Reads data from the I2S device.

-

KalTickRegisterCallback (TickIdleKalCallback cb)

-

void 

-

Registers the CPU tick callback.

-

KalThreadRegisterIdleCallback (TickIdleKalCallback cb)

-

void 

-

Registers the idle task callback.

-

FlashPartitionInit (void)

-

unsigned int 

-

Initializes a flash partition.

-

GetPartitionTable (void)

-

WifiIotFlashPartitionTable

-

Obtains a flash partition table.

-

PwmInit (WifiIotPwmPort port)

-

unsigned int 

-

Initializes a PWM device.

-

PwmDeinit (WifiIotPwmPort port)

-

unsigned int 

-

Deinitializes a PWM device.

-

PwmStart (WifiIotPwmPort port, unsigned short duty, unsigned short freq)

-

unsigned int 

-

Outputs PWM signals based on the input parameters.

-

PwmStop (WifiIotPwmPort port)

-

unsigned int 

-

Stops the PWM signal output.

-

SdioInit (void)

-

unsigned int 

-

Initializes the SDIO device.

-

SdioReinit (void)

-

unsigned int 

-

Reinitializes the SDIO device.

-

SdioSoftReset (void)

-

void 

-

Resets the SDIO device.

-

SdioRegisterCallback (const WifiIotSdioIntcallback *callbackFunc)

-

unsigned int 

-

Registers an interrupt callback for the SDIO device.

-

SdioCompleteSend (unsigned char *admaTable, unsigned int admaIndex)

-

unsigned int 

-

Completes data sending on the SDIO device.

-

SdioSetPadAdmatab (unsigned int padlen, unsigned char *admatable, unsigned int admaIndex)

-

unsigned int 

-

Sets the ADMA table that requires data padding.

-

SdioWriteExtinfo (WifiIotSdioExtendFunc *extFunc)

-

unsigned int 

-

Sets the extended SDIO attributes.

-

SdioSendData (unsigned int xferBytes)

-

void 

-

Starts to send data.

-

SdioSetAdmatable (unsigned char *admatable, unsigned int admaIndex, const unsigned int *dataAddr, unsigned int dataLen)

-

unsigned int 

-

Sets an SDIO ADMA.

-

SdioSchedMsg (void)

-

unsigned int 

-

Sends a suspended SDIO message.

-

SdioSendSyncMsg (unsigned int msg)

-

unsigned int 

-

Adds a message to a message queue and sends the message.

-

SdioSendMsgAck (unsigned int msg)

-

unsigned int 

-

Sends a specified message.

-

SdioProcessMsg (unsigned int sendMsg, unsigned int clearMsg)

-

unsigned int 

-

Clears a specified suspended message in the message queue, adds a new message to it, and sends the new message.

-

SdioIsPendingMsg (unsigned int msg)

-

unsigned int 

-

Checks whether a specified message is suspended.

-

SdioIsSendingMsg (unsigned int msg)

-

unsigned int 

-

Checks whether a specified message is being sent.

-

SdioGetExtendInfo (void)

-

WifiIotSdioExtendFunc

-

Obtains the extended configuration.

-

SdioRegisterNotifyMessageCallback (NotifyHostMessageEvent msgEventCallback)

-

void 

-

Registers the callback that will be invoked when the host sends a message or data.

-

SdioSetPowerdownWhenDeepSleep (unsigned char powerDown)

-

void 

-

Sets whether the SDIO device is powered off in deep sleep mode.

-

SpiSlaveWrite (WifiIotSpiIdx spiId, char *writeData, unsigned int byteLen, unsigned int timeOutMs)

-

unsigned int 

-

Sends data in SPI slave mode.

-

SpiSlaveRead (WifiIotSpiIdx spiId, char *readData, unsigned int byteLen, unsigned int timeOutMs)

-

unsigned int 

-

Reads data in SPI slave mode.

-

SpiHostWrite (WifiIotSpiIdx spiId, char *writeData, unsigned int byteLen)

-

unsigned int 

-

Sends data in half-duplex SPI master mode.

-

SpiHostRead (WifiIotSpiIdx spiId, char *readData, unsigned int byteLen)

-

unsigned int 

-

Reads data in half-duplex SPI master mode.

-

SpiHostWriteread (WifiIotSpiIdx spiId, char *writeData, char *readData, unsigned int byteLen)

-

unsigned int 

-

Sends and reads data in full-duplex SPI master mode.

-

SpiSetBasicInfo (WifiIotSpiIdx spiId, const WifiIotSpiCfgBasicInfo *param)

-

unsigned int 

-

Sets the SPI channel parameter.

-

SpiInit (WifiIotSpiIdx spiId, WifiIotSpiCfgInitParam initParam, const WifiIotSpiCfgBasicInfo *param)

-

unsigned int 

-

Initializes an SPI device.

-

SpiDeinit (WifiIotSpiIdx spiId)

-

unsigned int 

-

Deinitializes an SPI device.

-

SpiSetIrqMode (WifiIotSpiIdx spiId, unsigned char irqEn)

-

unsigned int 

-

Sets whether to enable the interrupt request (IRQ) mode for an SPI device.

-

SpiSetDmaMode (WifiIotSpiIdx spiId, unsigned char dmaEn)

-

unsigned int 

-

Sets whether to enable DMA to transfer data for an SPI device in slave mode.

-

SpiRegisterUsrFunc (WifiIotSpiIdx spiId, SpiIsrFunc prepareF, SpiIsrFunc restoreF)

-

unsigned int 

-

Registers the data TX preparation/recovery function.

-

SpiSetLoopBackMode (WifiIotSpiIdx spiId, unsigned char lbEn)

-

unsigned int 

-

Sets whether to enable loopback test for an SPI device.

-

UartInit (WifiIotUartIdx id, const WifiIotUartAttribute *param, const WifiIotUartExtraAttr *extraAttr)

-

unsigned int 

-

Configures a UART device.

-

UartRead (WifiIotUartIdx id, unsigned char *data, unsigned int dataLen)

-

int 

-

Reads data from a UART device.

-

UartWrite (WifiIotUartIdx id, const unsigned char *data, unsigned int dataLen)

-

int 

-

Writes data to a UART device.

-

UartDeinit (WifiIotUartIdx id)

-

unsigned int 

-

Deinitializes a UART device.

-

UartSetFlowCtrl (WifiIotUartIdx id, WifiIotFlowCtrl flowCtrl)

-

unsigned int 

-

Sets UART hardware flow control.

-

UartIsBufEmpty (WifiIotUartIdx id, unsigned char *empty)

-

unsigned int 

-

Checks whether the buffer on a UART device is empty.

-

UartWriteImmediately (WifiIotUartIdx id, const unsigned char *data, unsigned int dataLen)

-

int 

-

Writes data to be sent to a UART device in polling mode.

-

UartGetAttribute (WifiIotUartIdx id, WifiIotUartAttribute *attr, WifiIotUartExtraAttr *extraAttr)

-

unsigned int 

-

Obtains UART attributes.

-

UartIsBusy (WifiIotUartIdx id, unsigned char *busy)

-

unsigned int 

-

Checks whether the buffer on a UART device is busy.

-

WatchDogEnable (void)

-

void 

-

Enables the watchdog.

-

WatchDogKick (void)

-

void 

-

Feeds the watchdog.

-

WatchDogDisable (void)

-

void 

-

Disables the watchdog.

-
- -## **Details** - -## **Macro Definition Documentation** - -## WIFI\_IOT\_ERR\_ADC\_INVALID\_CHANNEL\_ID - -``` -#define WIFI_IOT_ERR_ADC_INVALID_CHANNEL_ID   0x80001301 -``` - - **Description:** - -Defines an ADC error code to indicate an invalid channel. - -## WIFI\_IOT\_ERR\_ADC\_NOT\_INIT - -``` -#define WIFI_IOT_ERR_ADC_NOT_INIT   0x80001303 -``` - - **Description:** - -Defines an ADC error code to indicate non-initialization. - -## WIFI\_IOT\_ERR\_ADC\_PARAMETER\_WRONG - -``` -#define WIFI_IOT_ERR_ADC_PARAMETER_WRONG   0x80001300 -``` - - **Description:** - -Defines an ADC error code to indicate a parameter error. - -## WIFI\_IOT\_ERR\_ADC\_TIMEOUT - -``` -#define WIFI_IOT_ERR_ADC_TIMEOUT   0x80001302 -``` - - **Description:** - -Defines an ADC error code to indicate a timeout. - -## WIFI\_IOT\_ERR\_AT\_INVALID\_PARAMETER - -``` -#define WIFI_IOT_ERR_AT_INVALID_PARAMETER   0x80003281 -``` - - **Description:** - -Defines an AT error code to indicate an invalid parameter. - -## WIFI\_IOT\_ERR\_AT\_NAME\_OR\_FUNC\_REPEAT\_REGISTERED - -``` -#define WIFI_IOT_ERR_AT_NAME_OR_FUNC_REPEAT_REGISTERED   0x80003280 -``` - - **Description:** - -Defines an AT error code to indicate repeated function registration. - -## WIFI\_IOT\_ERR\_DMA\_BUSY - -``` -#define WIFI_IOT_ERR_DMA_BUSY   0x80001382 -``` - - **Description:** - -Defines a DMA error code to indicate the busy state. - -## WIFI\_IOT\_ERR\_DMA\_CH\_IRQ\_ENABLE\_FAIL - -``` -#define WIFI_IOT_ERR_DMA_CH_IRQ_ENABLE_FAIL   0x80001387 -``` - - **Description:** - -Defines a DMA error code to indicate a failure in enabling channel interrupt. - -## WIFI\_IOT\_ERR\_DMA\_GET\_NOTE\_FAIL - -``` -#define WIFI_IOT_ERR_DMA_GET_NOTE_FAIL   0x80001385 -``` - - **Description:** - -Defines a DMA error code to indicate a retrieval failure. - -## WIFI\_IOT\_ERR\_DMA\_INVALID\_PARA - -``` -#define WIFI_IOT_ERR_DMA_INVALID_PARA   0x80001380 -``` - - **Description:** - -Defines a DMA error code to indicate an invalid parameter. - -## WIFI\_IOT\_ERR\_DMA\_LLI\_NOT\_CREATE - -``` -#define WIFI_IOT_ERR_DMA_LLI_NOT_CREATE   0x80001386 -``` - - **Description:** - -Defines a DMA error code to indicate that the LLI is not created. - -## WIFI\_IOT\_ERR\_DMA\_NOT\_INIT - -``` -#define WIFI_IOT_ERR_DMA_NOT_INIT   0x80001381 -``` - - **Description:** - -Defines a DMA error code to indicate non-initialization. - -## WIFI\_IOT\_ERR\_DMA\_TRANSFER\_FAIL - -``` -#define WIFI_IOT_ERR_DMA_TRANSFER_FAIL   0x80001383 -``` - - **Description:** - -Defines a DMA error code to indicate a transmission failure. - -## WIFI\_IOT\_ERR\_DMA\_TRANSFER\_TIMEOUT - -``` -#define WIFI_IOT_ERR_DMA_TRANSFER_TIMEOUT   0x80001384 -``` - - **Description:** - -Defines a DMA error code to indicate a transmission timeout. - -## WIFI\_IOT\_ERR\_FLASH\_CRYPTO\_BEYOND\_ADDR\_SIZE - -``` -#define WIFI_IOT_ERR_FLASH_CRYPTO_BEYOND_ADDR_SIZE   0x800010F1 -``` - - **Description:** - -Defines a flash error code to indicate that the address is out of range. - -## WIFI\_IOT\_ERR\_FLASH\_CRYPTO\_DATA\_DECRYPT\_ERR - -``` -#define WIFI_IOT_ERR_FLASH_CRYPTO_DATA_DECRYPT_ERR   0x800001F4 -``` - - **Description:** - -Defines a flash error code to indicate a decryption error. - -## WIFI\_IOT\_ERR\_FLASH\_CRYPTO\_DATA\_ENCRYPT\_ERR - -``` -#define WIFI_IOT_ERR_FLASH_CRYPTO_DATA_ENCRYPT_ERR   0x800001F3 -``` - - **Description:** - -Defines a flash error code to indicate an encryption error. - -## WIFI\_IOT\_ERR\_FLASH\_CRYPTO\_INVALID\_PARAM - -``` -#define WIFI_IOT_ERR_FLASH_CRYPTO_INVALID_PARAM   0x800010F0 -``` - - **Description:** - -Defines a flash error code to indicate an invalid parameter. - -## WIFI\_IOT\_ERR\_FLASH\_CRYPTO\_KERNEL\_ADDR\_ERR - -``` -#define WIFI_IOT_ERR_FLASH_CRYPTO_KERNEL_ADDR_ERR   0x800001FB -``` - - **Description:** - -Defines a flash error code to indicate an incorrect kernel address.. - -## WIFI\_IOT\_ERR\_FLASH\_CRYPTO\_KEY\_EMPTY\_ERR - -``` -#define WIFI_IOT_ERR_FLASH_CRYPTO_KEY_EMPTY_ERR   0x800001F5 -``` - - **Description:** - -Defines a flash error code to indicate an empty key value. - -## WIFI\_IOT\_ERR\_FLASH\_CRYPTO\_KEY\_INVALID\_ERR - -``` -#define WIFI_IOT_ERR_FLASH_CRYPTO_KEY_INVALID_ERR   0x800001F9 -``` - - **Description:** - -Defines a flash error code to indicate an invalid key. - -## WIFI\_IOT\_ERR\_FLASH\_CRYPTO\_KEY\_SAVE\_ERR - -``` -#define WIFI_IOT_ERR_FLASH_CRYPTO_KEY_SAVE_ERR   0x800001FA -``` - - **Description:** - -Defines a flash error code to indicate a failure in saving the key. - -## WIFI\_IOT\_ERR\_FLASH\_CRYPTO\_MALLOC\_FAIL - -``` -#define WIFI_IOT_ERR_FLASH_CRYPTO_MALLOC_FAIL   0x800001F2 -``` - - **Description:** - -Defines a flash error code to indicate a failure in applying for memory. - -## WIFI\_IOT\_ERR\_FLASH\_CRYPTO\_MEMCPY\_FAIL - -``` -#define WIFI_IOT_ERR_FLASH_CRYPTO_MEMCPY_FAIL   0x800001F6 -``` - - **Description:** - -Defines a flash error code to indicate a copy failure. - -## WIFI\_IOT\_ERR\_FLASH\_CRYPTO\_NOT\_SUPPORT - -``` -#define WIFI_IOT_ERR_FLASH_CRYPTO_NOT_SUPPORT   0x800001F7 -``` - - **Description:** - -Defines a flash error code to indicate a non-support for encryption. - -## WIFI\_IOT\_ERR\_FLASH\_CRYPTO\_PREPARE\_ERR - -``` -#define WIFI_IOT_ERR_FLASH_CRYPTO_PREPARE_ERR   0x800001F8 -``` - - **Description:** - -Defines a flash error code to indicate an incorrect parameter during encryption. - -## WIFI\_IOT\_ERR\_FLASH\_ERASE\_NOT\_4K\_ALIGN - -``` -#define WIFI_IOT_ERR_FLASH_ERASE_NOT_4K_ALIGN   0x800010DB -``` - - **Description:** - -Defines a flash error code to indicate that the size of data to erase is not a multiple of 4K bytes. - -## WIFI\_IOT\_ERR\_FLASH\_INITILIZATION - -``` -#define WIFI_IOT_ERR_FLASH_INITILIZATION   0x800010DA -``` - - **Description:** - -Defines a flash error code to indicate initialization. - -## WIFI\_IOT\_ERR\_FLASH\_INVALID\_CHIP\_ID - -``` -#define WIFI_IOT_ERR_FLASH_INVALID_CHIP_ID   0x800010D4 -``` - - **Description:** - -Defines a flash error code to indicate an invalid chip ID. - -## WIFI\_IOT\_ERR\_FLASH\_INVALID\_PARAM - -``` -#define WIFI_IOT_ERR_FLASH_INVALID_PARAM   0x800010C1 -``` - - **Description:** - -Defines a flash error code to indicate an invalid parameter. - -## WIFI\_IOT\_ERR\_FLASH\_INVALID\_PARAM\_BEYOND\_ADDR - -``` -#define WIFI_IOT_ERR_FLASH_INVALID_PARAM_BEYOND_ADDR   0x800010C2 -``` - - **Description:** - -Defines a flash error code to indicate that the address is out of range. - -## WIFI\_IOT\_ERR\_FLASH\_INVALID\_PARAM\_DATA\_NULL - -``` -#define WIFI_IOT_ERR_FLASH_INVALID_PARAM_DATA_NULL   0x800010C6 -``` - - **Description:** - -Defines a flash error code to indicate empty data. - -## WIFI\_IOT\_ERR\_FLASH\_INVALID\_PARAM\_ERASE\_NOT\_ALIGN - -``` -#define WIFI_IOT_ERR_FLASH_INVALID_PARAM_ERASE_NOT_ALIGN   0x800010C4 -``` - - **Description:** - -Defines a flash error code to indicate that the erase size is not aligned. - -## WIFI\_IOT\_ERR\_FLASH\_INVALID\_PARAM\_IOCTRL\_DATA\_NULL - -``` -#define WIFI_IOT_ERR_FLASH_INVALID_PARAM_IOCTRL_DATA_NULL   0x800010C5 -``` - - **Description:** - -Defines a flash error code to indicate that the data of the I/O controller is empty. - -## WIFI\_IOT\_ERR\_FLASH\_INVALID\_PARAM\_PAD1 - -``` -#define WIFI_IOT_ERR_FLASH_INVALID_PARAM_PAD1   0x800010C7 -``` - - **Description:** - -Defines a flash error code to indicate that pad1 is incorrect. - -## WIFI\_IOT\_ERR\_FLASH\_INVALID\_PARAM\_PAD2 - -``` -#define WIFI_IOT_ERR_FLASH_INVALID_PARAM_PAD2   0x800010C8 -``` - - **Description:** - -Defines a flash error code to indicate that pad2 is incorrect. - -## WIFI\_IOT\_ERR\_FLASH\_INVALID\_PARAM\_PAD3 - -``` -#define WIFI_IOT_ERR_FLASH_INVALID_PARAM_PAD3   0x800010C9 -``` - - **Description:** - -Defines a flash error code to indicate that pad3 is incorrect. - -## WIFI\_IOT\_ERR\_FLASH\_INVALID\_PARAM\_PAD4 - -``` -#define WIFI_IOT_ERR_FLASH_INVALID_PARAM_PAD4   0x800010CA -``` - - **Description:** - -Defines a flash error code to indicate that pad4 is incorrect. - -## WIFI\_IOT\_ERR\_FLASH\_INVALID\_PARAM\_SIZE\_ZERO - -``` -#define WIFI_IOT_ERR_FLASH_INVALID_PARAM_SIZE_ZERO   0x800010C3 -``` - - **Description:** - -Defines a flash error code to indicate that the parameter size is **0** - -## WIFI\_IOT\_ERR\_FLASH\_MAX\_SPI\_OP - -``` -#define WIFI_IOT_ERR_FLASH_MAX_SPI_OP   0x800010D2 -``` - - **Description:** - -Defines a flash error code to indicate the maximum value of the SPI operation. - -## WIFI\_IOT\_ERR\_FLASH\_NO\_MATCH\_ERASE\_SIZE - -``` -#define WIFI_IOT_ERR_FLASH_NO_MATCH_ERASE_SIZE   0x800010D1 -``` - - **Description:** - -Defines a flash error code to indicate a mismatch in the size of data to erase. - -## WIFI\_IOT\_ERR\_FLASH\_NO\_MATCH\_FLASH - -``` -#define WIFI_IOT_ERR_FLASH_NO_MATCH_FLASH   0x800010CF -``` - - **Description:** - -Defines a flash error code to indicate a flash mismatch. - -## WIFI\_IOT\_ERR\_FLASH\_NOT\_INIT - -``` -#define WIFI_IOT_ERR_FLASH_NOT_INIT   0x800010C0 -``` - - **Description:** - -Defines a flash error code to indicate non-initialization. - -## WIFI\_IOT\_ERR\_FLASH\_NOT\_SUPPORT\_IOCTRL\_ID - -``` -#define WIFI_IOT_ERR_FLASH_NOT_SUPPORT_IOCTRL_ID   0x800010D3 -``` - - **Description:** - -Defines a flash error code to indicate an unsupported IO controller ID.. - -## WIFI\_IOT\_ERR\_FLASH\_PATITION\_INIT\_FAIL - -``` -#define WIFI_IOT_ERR_FLASH_PATITION_INIT_FAIL   0x800010D9 -``` - - **Description:** - -Defines a flash error code to indicate a partition initialization failure. - -## WIFI\_IOT\_ERR\_FLASH\_PROTECT\_NOT\_FIND\_CHIP - -``` -#define WIFI_IOT_ERR_FLASH_PROTECT_NOT_FIND_CHIP   0x800010DF -``` - - **Description:** - -Defines a flash error code to indicate that no chip is found. - -## WIFI\_IOT\_ERR\_FLASH\_PROTECT\_NOT\_INIT - -``` -#define WIFI_IOT_ERR_FLASH_PROTECT_NOT_INIT   0x800010DD -``` - - **Description:** - -Defines a flash error code to indicate non-initialization. - -## WIFI\_IOT\_ERR\_FLASH\_PROTECT\_NOT\_SUPPORT - -``` -#define WIFI_IOT_ERR_FLASH_PROTECT_NOT_SUPPORT   0x800010DC -``` - - **Description:** - -Defines a flash error code to indicate a non-support. - -## WIFI\_IOT\_ERR\_FLASH\_PROTECT\_RE\_INIT - -``` -#define WIFI_IOT_ERR_FLASH_PROTECT_RE_INIT   0x800010DE -``` - - **Description:** - -Defines a flash error code to indicate repeated initialization. - -## WIFI\_IOT\_ERR\_FLASH\_QUAD\_MODE\_COMPARE\_REG - -``` -#define WIFI_IOT_ERR_FLASH_QUAD_MODE_COMPARE_REG   0x800010CE -``` - - **Description:** - -Defines a flash error code to indicate that an error occurs when comparing registers. - -## WIFI\_IOT\_ERR\_FLASH\_QUAD\_MODE\_READ\_REG1 - -``` -#define WIFI_IOT_ERR_FLASH_QUAD_MODE_READ_REG1   0x800010CC -``` - - **Description:** - -Defines a flash error code to indicate that an error occurs when reading register 1. - -## WIFI\_IOT\_ERR\_FLASH\_QUAD\_MODE\_READ\_REG2 - -``` -#define WIFI_IOT_ERR_FLASH_QUAD_MODE_READ_REG2   0x800010CD -``` - - **Description:** - -Defines a flash error code to indicate that an error occurs when reading register 2. - -## WIFI\_IOT\_ERR\_FLASH\_RE\_INIT - -``` -#define WIFI_IOT_ERR_FLASH_RE_INIT   0x800010D5 -``` - - **Description:** - -Defines a flash error code to indicate repeated initialization. - -## WIFI\_IOT\_ERR\_FLASH\_TIME\_OUT\_WAIT\_READY - -``` -#define WIFI_IOT_ERR_FLASH_TIME_OUT_WAIT_READY   0x800010CB -``` - - **Description:** - -Defines a flash error code to indicate a timeout on waiting for ready. - -## WIFI\_IOT\_ERR\_FLASH\_WAIT\_CFG\_START\_TIME\_OUT - -``` -#define WIFI_IOT_ERR_FLASH_WAIT_CFG_START_TIME_OUT   0x800010D8 -``` - - **Description:** - -Defines a flash error code to indicate a timeout on waiting for a configuration to start. - -## WIFI\_IOT\_ERR\_FLASH\_WRITE\_COMPARE\_WRONG - -``` -#define WIFI_IOT_ERR_FLASH_WRITE_COMPARE_WRONG   0x800010D7 -``` - - **Description:** - -Defines a flash error code to indicate that an error occurs when comparing the data written. - -## WIFI\_IOT\_ERR\_FLASH\_WRITE\_ENABLE - -``` -#define WIFI_IOT_ERR_FLASH_WRITE_ENABLE   0x800010D0 -``` - - **Description:** - -Defines a flash error code to indicate a failure in enabling write. - -## WIFI\_IOT\_ERR\_FLASH\_WRITE\_NOT\_SUPPORT\_ERASE - -``` -#define WIFI_IOT_ERR_FLASH_WRITE_NOT_SUPPORT_ERASE   0x800010D6 -``` - - **Description:** - -Defines a flash error code to indicate a non-support for data erasure. - -## WIFI\_IOT\_ERR\_GPIO\_INVALID\_PARAMETER - -``` -#define WIFI_IOT_ERR_GPIO_INVALID_PARAMETER   0x80001040 -``` - - **Description:** - -Defines a GPIO error code to indicate an invalid parameter. - -## WIFI\_IOT\_ERR\_GPIO\_NOT\_INIT - -``` -#define WIFI_IOT_ERR_GPIO_NOT_INIT   0x80001042 -``` - - **Description:** - -Defines a GPIO error code to indicate non-initialization. - -## WIFI\_IOT\_ERR\_GPIO\_NOT\_SUPPORT - -``` -#define WIFI_IOT_ERR_GPIO_NOT_SUPPORT   0x80001043 -``` - - **Description:** - -Defines a GPIO error code to indicate a non-support. - -## WIFI\_IOT\_ERR\_GPIO\_REPEAT\_INIT - -``` -#define WIFI_IOT_ERR_GPIO_REPEAT_INIT   0x80001041 -``` - - **Description:** - -Defines a GPIO error code to indicate repeated initialization. - -## WIFI\_IOT\_ERR\_I2C\_INVALID\_PARAMETER - -``` -#define WIFI_IOT_ERR_I2C_INVALID_PARAMETER   0x80001181 -``` - - **Description:** - -Defines an I2C error code to indicate an invalid parameter. - -## WIFI\_IOT\_ERR\_I2C\_NOT\_INIT - -``` -#define WIFI_IOT_ERR_I2C_NOT_INIT   0x80001180 -``` - - **Description:** - -Defines an I2C error code to indicate a non-support. - -## WIFI\_IOT\_ERR\_I2C\_START\_ACK\_ERR - -``` -#define WIFI_IOT_ERR_I2C_START_ACK_ERR   0x80001188 -``` - - **Description:** - -Defines an I2C error code to indicate a responding failure. - -## WIFI\_IOT\_ERR\_I2C\_TIMEOUT\_RCV\_BYTE - -``` -#define WIFI_IOT_ERR_I2C_TIMEOUT_RCV_BYTE   0x80001185 -``` - - **Description:** - -Defines an I2C error code to indicate a receive timeout. - -## WIFI\_IOT\_ERR\_I2C\_TIMEOUT\_RCV\_BYTE\_PROC - -``` -#define WIFI_IOT_ERR_I2C_TIMEOUT_RCV_BYTE_PROC   0x80001186 -``` - - **Description:** - -Defines an I2C error code to indicate a processing timeout. - -## WIFI\_IOT\_ERR\_I2C\_TIMEOUT\_START - -``` -#define WIFI_IOT_ERR_I2C_TIMEOUT_START   0x80001182 -``` - - **Description:** - -Defines an I2C error code to indicate a start timeout. - -## WIFI\_IOT\_ERR\_I2C\_TIMEOUT\_STOP - -``` -#define WIFI_IOT_ERR_I2C_TIMEOUT_STOP   0x80001184 -``` - - **Description:** - -Defines an I2C error code to indicate a stop timeout. - -## WIFI\_IOT\_ERR\_I2C\_TIMEOUT\_WAIT - -``` -#define WIFI_IOT_ERR_I2C_TIMEOUT_WAIT   0x80001183 -``` - - **Description:** - -Defines an I2C error code to indicate a wait timeout. - -## WIFI\_IOT\_ERR\_I2C\_WAIT\_ACK\_ERR - -``` -#define WIFI_IOT_ERR_I2C_WAIT_ACK_ERR   0x80001189 -``` - - **Description:** - -Defines an I2C error code to indicate a failure in waiting for a response. - -## WIFI\_IOT\_ERR\_I2C\_WAIT\_SEM\_FAIL - -``` -#define WIFI_IOT_ERR_I2C_WAIT_SEM_FAIL   0x80001187 -``` - - **Description:** - -Defines an I2C error code to indicate a waiting failure. - -## WIFI\_IOT\_ERR\_I2S\_INVALID\_PARAMETER - -``` -#define WIFI_IOT_ERR_I2S_INVALID_PARAMETER   0x80001400 -``` - - **Description:** - -Defines an I2S error code to indicate an invalid parameter. - -## WIFI\_IOT\_ERR\_I2S\_WRITE\_TIMEOUT - -``` -#define WIFI_IOT_ERR_I2S_WRITE_TIMEOUT   0x80001401 -``` - - **Description:** - -Defines an I2S error code to indicate a write timeout. - -## WIFI\_IOT\_ERR\_PWM\_INITILIZATION\_ALREADY - -``` -#define WIFI_IOT_ERR_PWM_INITILIZATION_ALREADY   0x80001341 -``` - - **Description:** - -Defines a PWM error code to indicate an initialization error. - -## WIFI\_IOT\_ERR\_PWM\_INVALID\_PARAMETER - -``` -#define WIFI_IOT_ERR_PWM_INVALID_PARAMETER   0x80001342 -``` - - **Description:** - -Defines a PWM error code to indicate an invalid parameter. - -## WIFI\_IOT\_ERR\_PWM\_NO\_INIT - -``` -#define WIFI_IOT_ERR_PWM_NO_INIT   0x80001340 -``` - - **Description:** - -Defines a PWM error code to indicate non-initialization. - -## WIFI\_IOT\_ERR\_SDIO\_INVALID\_PARAMETER - -``` -#define WIFI_IOT_ERR_SDIO_INVALID_PARAMETER   0x80001280 -``` - - **Description:** - -Defines an SDIO error code to indicate an invalid parameter. - -## WIFI\_IOT\_ERR\_SPI\_BUSY - -``` -#define WIFI_IOT_ERR_SPI_BUSY   0x800011C3 -``` - - **Description:** - -Defines an SPI error code to indicate the busy state. - -## WIFI\_IOT\_ERR\_SPI\_NOT\_INIT - -``` -#define WIFI_IOT_ERR_SPI_NOT_INIT   0x800011C0 -``` - - **Description:** - -Defines an SPI error code to indicate non-initialization. - -## WIFI\_IOT\_ERR\_SPI\_NOT\_SUPPORT\_DMA - -``` -#define WIFI_IOT_ERR_SPI_NOT_SUPPORT_DMA   0x800011C6 -``` - - **Description:** - -Defines an SPI error code to indicate a non-support for DMA. - -## WIFI\_IOT\_ERR\_SPI\_PARAMETER\_WRONG - -``` -#define WIFI_IOT_ERR_SPI_PARAMETER_WRONG   0x800011C2 -``` - - **Description:** - -Defines an SPI error code to indicate a parameter error. - -## WIFI\_IOT\_ERR\_SPI\_READ\_TIMEOUT - -``` -#define WIFI_IOT_ERR_SPI_READ_TIMEOUT   0x800011C5 -``` - - **Description:** - -Defines an SPI error code to indicate a read timeout. - -## WIFI\_IOT\_ERR\_SPI\_REINIT - -``` -#define WIFI_IOT_ERR_SPI_REINIT   0x800011C1 -``` - - **Description:** - -Defines an SPI error code to indicate repeated initialization. - -## WIFI\_IOT\_ERR\_SPI\_WRITE\_TIMEOUT - -``` -#define WIFI_IOT_ERR_SPI_WRITE_TIMEOUT   0x800011C4 -``` - - **Description:** - -Defines an SPI error code to indicate a write timeout. - -## WIFI\_IOT\_ERR\_UART\_INVALID\_BAUD - -``` -#define WIFI_IOT_ERR_UART_INVALID_BAUD   0x80001005 -``` - - **Description:** - -Defines a UART error code to indicate an invalid baud rate. - -## WIFI\_IOT\_ERR\_UART\_INVALID\_COM\_PORT - -``` -#define WIFI_IOT_ERR_UART_INVALID_COM_PORT   0x80001006 -``` - - **Description:** - -Defines a UART error code to indicate an invalid port number. - -## WIFI\_IOT\_ERR\_UART\_INVALID\_DATA\_BITS - -``` -#define WIFI_IOT_ERR_UART_INVALID_DATA_BITS   0x80001003 -``` - - **Description:** - -Defines a UART error code to indicate an invalid data bit. - -## WIFI\_IOT\_ERR\_UART\_INVALID\_PARAMETER - -``` -#define WIFI_IOT_ERR_UART_INVALID_PARAMETER   0x80001000 -``` - - **Description:** - -Defines a UART error code to indicate an invalid parameter. - -## WIFI\_IOT\_ERR\_UART\_INVALID\_PARITY - -``` -#define WIFI_IOT_ERR_UART_INVALID_PARITY   0x80001002 -``` - - **Description:** - -Defines a UART error code to indicate an invalid parity check. - -## WIFI\_IOT\_ERR\_UART\_INVALID\_STOP\_BITS - -``` -#define WIFI_IOT_ERR_UART_INVALID_STOP_BITS   0x80001004 -``` - - **Description:** - -Defines a UART error code to indicate an invalid stop bit. - -## WIFI\_IOT\_ERR\_UART\_INVALID\_SUSPEND - -``` -#define WIFI_IOT_ERR_UART_INVALID_SUSPEND   0x80001001 -``` - - **Description:** - -Defines a UART error code to indicate an invalid pause operation. - -## WIFI\_IOT\_ERR\_UART\_NOT\_BLOCK\_MODE - -``` -#define WIFI_IOT_ERR_UART_NOT_BLOCK_MODE   0x80001008 -``` - - **Description:** - -Defines a UART error code to indicate the non-block mode. - -## WIFI\_IOT\_ERR\_UART\_NOT\_SUPPORT\_DMA - -``` -#define WIFI_IOT_ERR_UART_NOT_SUPPORT_DMA   0x80001007 -``` - - **Description:** - -Defines a UART error code to indicate a non-support for DMA. - -## WIFI\_IOT\_FAILURE - -``` -#define WIFI_IOT_FAILURE   (-1) -``` - - **Description:** - -Defines a module-level return value to indicate an operation failure. - -## WIFI\_IOT\_SUCCESS - -``` -#define WIFI_IOT_SUCCESS   0 -``` - - **Description:** - -Defines a module-level return value to indicate a successful operation. - -## **Typedef Documentation** - -## GpioIsrCallbackFunc - -``` -typedef void(* GpioIsrCallbackFunc) (char *arg) -``` - - **Description:** - -Indicates the GPIO interrupt callback. - -## I2cPrepareFunc - -``` -typedef void(* I2cPrepareFunc) (void) -``` - - **Description:** - -Indicates the callback invoked for device preparation. - -## I2CResetFunc - -``` -typedef void(* I2CResetFunc) (void) -``` - - **Description:** - -Indicates the callback invoked when a device exception occurs. - -## I2cRestoreFunc - -``` -typedef void(* I2cRestoreFunc) (void) -``` - - **Description:** - -Indicates the callback invoked for device recovery. - -## TickIdleKalCallback - -``` -typedef void(* TickIdleKalCallback) (void) -``` - - **Description:** - -Indicates the idle task and CPU tick callbacks. - -## **Enumeration Type Documentation** - -## WifiiIotIoFuncGpio1 - -``` -enum [WifiiIotIoFuncGpio1](Wifiiot.md#gae9c6ae0f852d8701036823a6223adf7e) -``` - - **Description:** - -Enumerates the functions of GPIO hardware pin 1. - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_IO_FUNC_GPIO_1_GPIO 

GPIO1 function

-
- -## WifiIotAdcChannelIndex - -``` -enum [WifiIotAdcChannelIndex](Wifiiot.md#ga4c8b663163c7b23071914947a2bca73b) -``` - - **Description:** - -Enumerates ADC channel indexes. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_ADC_CHANNEL_0 

Channel 0

-
WIFI_IOT_ADC_CHANNEL_1 

Channel 1

-
WIFI_IOT_ADC_CHANNEL_2 

Channel 2

-
WIFI_IOT_ADC_CHANNEL_3 

Channel 3

-
WIFI_IOT_ADC_CHANNEL_4 

Channel 4

-
WIFI_IOT_ADC_CHANNEL_5 

Channel 5

-
WIFI_IOT_ADC_CHANNEL_6 

Channel 6

-
WIFI_IOT_ADC_CHANNEL_7 

Channel 7

-
WIFI_IOT_ADC_CHANNEL_BUTT 

Button value

-
- -## WifiIotAdcCurBais - -``` -enum [WifiIotAdcCurBais](Wifiiot.md#gaac161eb7075f815f6d39a63615bfa82d) -``` - - **Description:** - -Enumerates analog power control modes. - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_ADC_CUR_BAIS_DEFAULT 

Automatic control

-
WIFI_IOT_ADC_CUR_BAIS_AUTO 

Automatic control

-
WIFI_IOT_ADC_CUR_BAIS_1P8V 

Manual control (AVDD = 1.8 V)

-
WIFI_IOT_ADC_CUR_BAIS_3P3V 

Manual control (AVDD = 3.3 V)

-
WIFI_IOT_ADC_CUR_BAIS_BUTT 

Button value

-
- -## WifiIotAdcEquModelSel - -``` -enum [WifiIotAdcEquModelSel](Wifiiot.md#gafb9992ebf1655f994dc56883c8fe4b2e) -``` - - **Description:** - -Enumerates equation models. - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_ADC_EQU_MODEL_1 

One-equation model

-
WIFI_IOT_ADC_EQU_MODEL_2 

Two-equation model

-
WIFI_IOT_ADC_EQU_MODEL_4 

Four-equation model

-
WIFI_IOT_ADC_EQU_MODEL_8 

Eight-equation model

-
WIFI_IOT_ADC_EQU_MODEL_BUTT 

Button value

-
- -## WifiIotFlashPartitionTableId - -``` -enum [WifiIotFlashPartitionTableId](Wifiiot.md#ga2f287bbb40987fe6d1d7fa525574c00c) -``` - - **Description:** - -Indicates the partition table ID. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_FLASH_PARTITON_BOOT 

Boot partition ID

-
WIFI_IOT_FLASH_PARTITON_FACTORY_NV 

Factory NV partition ID

-
WIFI_IOT_FLASH_PARTITON_NORMAL_NV 

Normal NV partition ID

-
WIFI_IOT_FLASH_PARTITON_NORMAL_NV_BACKUP 

Normal backup NV partition ID

-
WIFI_IOT_FLASH_PARTITON_KERNEL_A 

Kernel A running partition ID

-
WIFI_IOT_FLASH_PARTITON_KERNEL_B 

Kernel B running partition ID

-
WIFI_IOT_FLASH_PARTITON_HILINK 

HiLink partition ID

-
WIFI_IOT_FLASH_PARTITON_FILE_SYSTEM 

File system partition ID

-
WIFI_IOT_FLASH_PARTITON_USR_RESERVE 

User reserved partition ID

-
WIFI_IOT_FLASH_PARTITON_HILINK_PKI 

HiLink PKI partition ID

-
WIFI_IOT_FLASH_PARTITON_CRASH_INFO 

Crash log partition ID

-
WIFI_IOT_FLASH_PARTITON_BOOT_BACK 

Backup boot partition ID

-
- -## WifiIotFlowCtrl - -``` -enum [WifiIotFlowCtrl](Wifiiot.md#gacf7ec5d973706e8239c7c6e4a470d8ab) -``` - - **Description:** - -Enumerates hardware flow control modes. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_FLOW_CTRL_NONE 

Hardware flow control disabled

-
WIFI_IOT_FLOW_CTRL_RTS_CTS 

RTS and CTS hardware flow control enabled

-
WIFI_IOT_FLOW_CTRL_RTS_ONLY 

RTS hardware flow control enabled

-
WIFI_IOT_FLOW_CTRL_CTS_ONLY 

RTS hardware flow control enabled

-
- -## WifiIotGpioDir - -``` -enum [WifiIotGpioDir](Wifiiot.md#gab4b1fb50c758d491ba297a65e1c7a70a) -``` - - **Description:** - -Enumerates GPIO directions. - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_GPIO_DIR_IN 

Input

-
WIFI_IOT_GPIO_DIR_OUT 

Output

-
- -## WifiIotGpioIdx - -``` -enum [WifiIotGpioIdx](Wifiiot.md#gacb21f234cf149161f1f95f3330eeb8e7) -``` - - **Description:** - -Enumerates GPIO pin IDs. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_GPIO_IDX_0 

GPIO0

-
WIFI_IOT_GPIO_IDX_1 

GPIO1

-
WIFI_IOT_GPIO_IDX_2 

GPIO2

-
WIFI_IOT_GPIO_IDX_3 

GPIO3

-
WIFI_IOT_GPIO_IDX_4 

GPIO4

-
WIFI_IOT_GPIO_IDX_5 

GPIO5

-
WIFI_IOT_GPIO_IDX_6 

GPIO6

-
WIFI_IOT_GPIO_IDX_7 

GPIO7

-
WIFI_IOT_GPIO_IDX_8 

GPIO8

-
WIFI_IOT_GPIO_IDX_9 

GPIO9

-
WIFI_IOT_GPIO_IDX_10 

GPIO10

-
WIFI_IOT_GPIO_IDX_11 

GPIO11

-
WIFI_IOT_GPIO_IDX_12 

GPIO12

-
WIFI_IOT_GPIO_IDX_13 

GPIO13

-
WIFI_IOT_GPIO_IDX_14 

GPIO14

-
WIFI_IOT_GPIO_IDX_MAX 

Maximum value

-
- -## WifiIotGpioIntPolarity - -``` -enum [WifiIotGpioIntPolarity](Wifiiot.md#gab81589838cedcc3933bb789c97ad3643) -``` - - **Description:** - -Enumerates I/O interrupt polarities. - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_GPIO_EDGE_FALL_LEVEL_LOW 

Interrupt at a low level or falling edge

-
WIFI_IOT_GPIO_EDGE_RISE_LEVEL_HIGH 

Interrupt at a high level or rising edge

-
- -## WifiIotGpioIntType - -``` -enum [WifiIotGpioIntType](Wifiiot.md#gac8eb8ad448903ed52c96ccc675e81f94) -``` - - **Description:** - -Enumerates GPIO interrupt trigger modes. - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_INT_TYPE_LEVEL 

Level-sensitive interrupt

-
WIFI_IOT_INT_TYPE_EDGE 

Edge-sensitive interrupt

-
- -## WifiIotGpioValue - -``` -enum [WifiIotGpioValue](Wifiiot.md#gac9095d1db72e5046b2ec1895aaec0e6b) -``` - - **Description:** - -Enumerates GPIO level values. - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_GPIO_VALUE0 

Low GPIO level

-
WIFI_IOT_GPIO_VALUE1 

High GPIO level

-
- -## WifiIotI2cIdx - -``` -enum [WifiIotI2cIdx](Wifiiot.md#gaeeb58e02e3783d02e1ed4bad313cc0b8) -``` - - **Description:** - -Enumerates I2C hardware indexes. - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_I2C_IDX_0 

I2C hardware index 0

-
WIFI_IOT_I2C_IDX_1 

I2C hardware index 1

-
- -## WifiIotI2sResolution - -``` -enum [WifiIotI2sResolution](Wifiiot.md#gac024b870d63e802d8119e88a82953807) -``` - - **Description:** - -Enumerates I2S resolution. - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_I2S_RESOLUTION_16BIT 

16-bit resolution

-
WIFI_IOT_I2S_RESOLUTION_24BIT 

24-bit resolution

-
- -## WifiIotI2sSampleRate - -``` -enum [WifiIotI2sSampleRate](Wifiiot.md#ga5e124d70b18cf4cff40bcce78445f689) -``` - - **Description:** - -Enumerates I2S sampling rates. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_I2S_SAMPLE_RATE_8K 

8K sampling rate

-
WIFI_IOT_I2S_SAMPLE_RATE_16K 

16K sampling rate

-
WIFI_IOT_I2S_SAMPLE_RATE_32K 

32K sampling rate

-
WIFI_IOT_I2S_SAMPLE_RATE_48K 

48K sampling rate

-
- -## WifiIotIoDriverStrength - -``` -enum [WifiIotIoDriverStrength](Wifiiot.md#gae97ab4109f511ceeee889dba9e79a968) -``` - - **Description:** - -Enumerates I/O driver strength levels. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_IO_DRIVER_STRENGTH_0 

Driver strength level 0 (highest)

-
WIFI_IOT_IO_DRIVER_STRENGTH_1 

Driver strength level 1

-
WIFI_IOT_IO_DRIVER_STRENGTH_2 

Driver strength level 2

-
WIFI_IOT_IO_DRIVER_STRENGTH_3 

Driver strength level 3

-
WIFI_IOT_IO_DRIVER_STRENGTH_4 

Driver strength level 4

-
WIFI_IOT_IO_DRIVER_STRENGTH_5 

Driver strength level 5

-
WIFI_IOT_IO_DRIVER_STRENGTH_6 

Driver strength level 6

-
WIFI_IOT_IO_DRIVER_STRENGTH_7 

Driver strength level 7 (lowest)

-
WIFI_IOT_IO_DRIVER_STRENGTH_MAX 

Maximum value

-
- -## WifiIotIoFuncGpio0 - -``` -enum [WifiIotIoFuncGpio0](Wifiiot.md#ga2b08eb2a302e2c4fa216a1373bea4a01) -``` - - **Description:** - -Enumerates the functions of GPIO hardware pin 0. - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_IO_FUNC_GPIO_0_GPIO 

GPIO0 function

-
WIFI_IOT_IO_FUNC_GPIO_0_UART1_TXD 

Functions of UART1 TXD

-
WIFI_IOT_IO_FUNC_GPIO_0_SPI1_CK 

SPI1 CK function

-
WIFI_IOT_IO_FUNC_GPIO_0_JTAG_TDO 

Functions of JTAG TD0

-
WIFI_IOT_IO_FUNC_GPIO_0_PWM3_OUT 

PWM3 OUT function

-
WIFI_IOT_IO_FUNC_GPIO_0_I2C1_SDA 

I2C1 SDA function

-
- -## WifiIotIoFuncGpio10 - -``` -enum [WifiIotIoFuncGpio10](Wifiiot.md#gad4670688ad729f40424bccfeb1afc3b2) -``` - - **Description:** - -Enumerates the functions of GPIO hardware pin 10. - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_IO_FUNC_GPIO_10_GPIO 

GPIO10 function

-
WIFI_IOT_IO_FUNC_GPIO_10_I2C0_SDA 

I2C0 SDA function

-
WIFI_IOT_IO_FUNC_GPIO_10_UART2_CTS_N 

UART2 CTS function

-
WIFI_IOT_IO_FUNC_GPIO_10_SDIO_D3 

SDIO D3 function

-
WIFI_IOT_IO_FUNC_GPIO_10_SPI0_CK 

SPI0 CK function

-
WIFI_IOT_IO_FUNC_GPIO_10_PWM1_OUT 

PWM1 OUT function

-
WIFI_IOT_IO_FUNC_GPIO_10_I2S0_TX 

I2S0 TX function

-
- -## WifiIotIoFuncGpio11 - -``` -enum [WifiIotIoFuncGpio11](Wifiiot.md#ga5099248aa82355e85ba5a6227f2ab1a7) -``` - - **Description:** - -Enumerates the functions of GPIO hardware pin 11. - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_IO_FUNC_GPIO_11_GPIO 

GPIO11 function

-
WIFI_IOT_IO_FUNC_GPIO_11_UART2_TXD 

UART2 TXD function

-
WIFI_IOT_IO_FUNC_GPIO_11_SDIO_CMD 

SDIO CMD function

-
WIFI_IOT_IO_FUNC_GPIO_11_SPI0_RXD 

SDIO RXD function

-
WIFI_IOT_IO_FUNC_GPIO_11_PWM2_OUT 

PWM2 OUT function

-
WIFI_IOT_IO_FUNC_GPIO_11_RF_TX_EN_EXT 

RF TX_EN_EXT function

-
WIFI_IOT_IO_FUNC_GPIO_11_I2S0_RX 

I2S0 RX function

-
- -## WifiIotIoFuncGpio12 - -``` -enum [WifiIotIoFuncGpio12](Wifiiot.md#gaed0008f886fc864d90f6d1c2ae9677a0) -``` - - **Description:** - -Enumerates the functions of GPIO hardware pin 12. - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_IO_FUNC_GPIO_12_GPIO 

GPIO12 function

-
WIFI_IOT_IO_FUNC_GPIO_12_UART2_RXD 

SUART2 RXD function

-
WIFI_IOT_IO_FUNC_GPIO_12_SDIO_CLK 

SDIO CLK function

-
WIFI_IOT_IO_FUNC_GPIO_12_SPI0_CSN 

SDIO CSN function

-
WIFI_IOT_IO_FUNC_GPIO_12_PWM3_OUT 

PWM3 OUT function

-
WIFI_IOT_IO_FUNC_GPIO_12_RF_RX_EN_EXT 

RF RX_EN_EXT function

-
WIFI_IOT_IO_FUNC_GPIO_12_I2S0_BCLK 

I2S0 BCLK function

-
- -## WifiIotIoFuncGpio13 - -``` -enum [WifiIotIoFuncGpio13](Wifiiot.md#ga364b7c7cc88086ad40c4c3d2dd098648) -``` - - **Description:** - -Enumerates the functions of GPIO hardware pin 13. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_IO_FUNC_GPIO_13_SSI_DATA 

SSI DATA function

-
WIFI_IOT_IO_FUNC_GPIO_13_UART0_TXD 

UART0 TXD function

-
WIFI_IOT_IO_FUNC_GPIO_13_UART2_RTS_N 

UART2 RTS function

-
WIFI_IOT_IO_FUNC_GPIO_13_SDIO_D0 

SDIO D0 function

-
WIFI_IOT_IO_FUNC_GPIO_13_GPIO 

GPIO13 function

-
WIFI_IOT_IO_FUNC_GPIO_13_PWM4_OUT 

PWM4 OUT function

-
WIFI_IOT_IO_FUNC_GPIO_13_I2C0_SDA 

I2C0 SDA function

-
WIFI_IOT_IO_FUNC_GPIO_13_I2S0_WS 

I2S0 WS function

-
- -## WifiIotIoFuncGpio14 - -``` -enum [WifiIotIoFuncGpio14](Wifiiot.md#gafcf6d4cb0113b803d834bac89af8d9b8) -``` - - **Description:** - -Enumerates the functions of GPIO hardware pin 14. - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_IO_FUNC_GPIO_14_SSI_CLK 

SSI CLK function

-
WIFI_IOT_IO_FUNC_GPIO_14_UART0_RXD 

UART0 RXD function

-
WIFI_IOT_IO_FUNC_GPIO_14_UART2_CTS_N 

UART2 CTS function

-
WIFI_IOT_IO_FUNC_GPIO_14_SDIO_D1 

SDIO D1 function

-
WIFI_IOT_IO_FUNC_GPIO_14_GPIO 

GPIO14 function

-
WIFI_IOT_IO_FUNC_GPIO_14_PWM5_OUT 

PWM5 OUT function

-
WIFI_IOT_IO_FUNC_GPIO_14_I2C0_SCL 

I2C0 SCL function

-
- -## WifiIotIoFuncGpio2 - -``` -enum [WifiIotIoFuncGpio2](Wifiiot.md#gac9d0974184776d35ca9b0f73829f317b) -``` - - **Description:** - -Enumerates the functions of GPIO hardware pin 2. - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_IO_FUNC_GPIO_2_GPIO 

GPIO2 function

-
WIFI_IOT_IO_FUNC_GPIO_2_UART1_RTS_N 

UART1 RTS function

-
WIFI_IOT_IO_FUNC_GPIO_2_SPI1_TXD 

SPI1 TXD function

-
WIFI_IOT_IO_FUNC_GPIO_2_JTAG_TRSTN 

JTAG TRSTN function

-
WIFI_IOT_IO_FUNC_GPIO_2_PWM2_OUT 

PWM2 OUT function

-
WIFI_IOT_IO_FUNC_GPIO_2_SSI_CLK 

SSI CLK function

-
- -## WifiIotIoFuncGpio3 - -``` -enum [WifiIotIoFuncGpio3](Wifiiot.md#gaca745c98fc2ef9994e67444c9aa53db8) -``` - - **Description:** - -Enumerates the functions of GPIO hardware pin 3. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_IO_FUNC_GPIO_3_GPIO 

GPIO3 function

-
WIFI_IOT_IO_FUNC_GPIO_3_UART0_TXD 

UART0 TXD function

-
WIFI_IOT_IO_FUNC_GPIO_3_UART1_CTS_N 

UART1 CTS function

-
WIFI_IOT_IO_FUNC_GPIO_3_SPI1_CSN 

SPI CSN function

-
WIFI_IOT_IO_FUNC_GPIO_3_JTAG_TDI 

JTAG TDI function

-
WIFI_IOT_IO_FUNC_GPIO_3_PWM5_OUT 

PWM5 OUT function

-
WIFI_IOT_IO_FUNC_GPIO_3_I2C1_SDA 

I2C1 SDA function

-
WIFI_IOT_IO_FUNC_GPIO_3_SSI_DATA 

SSI DATA function

-
- -## WifiIotIoFuncGpio4 - -``` -enum [WifiIotIoFuncGpio4](Wifiiot.md#ga70218b6740d703737739ce4372e2f1e2) -``` - - **Description:** - -Enumerates the functions of GPIO hardware pin 4. - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_IO_FUNC_GPIO_4_GPIO 

GPIO4 function

-
WIFI_IOT_IO_FUNC_GPIO_4_UART0_RXD 

UART0 RXD function

-
WIFI_IOT_IO_FUNC_GPIO_4_JTAG_TMS 

JTAG TMS function

-
WIFI_IOT_IO_FUNC_GPIO_4_PWM1_OUT 

PWM1 OUT function

-
WIFI_IOT_IO_FUNC_GPIO_4_I2C1_SCL 

I2C1 SCL function

-
- -## WifiIotIoFuncGpio5 - -``` -enum [WifiIotIoFuncGpio5](Wifiiot.md#ga6cbed71f3a94f8e7513c4b91ae1e54ce) -``` - - **Description:** - -Enumerates the functions of GPIO hardware pin 5. - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_IO_FUNC_GPIO_5_GPIO 

GPIO5 function

-
WIFI_IOT_IO_FUNC_GPIO_5_UART1_RXD 

UART1 RXD function

-
WIFI_IOT_IO_FUNC_GPIO_5_SPI0_CSN 

SPI0 CSN function

-
WIFI_IOT_IO_FUNC_GPIO_5_PWM2_OUT 

PWM2 OUT function

-
WIFI_IOT_IO_FUNC_GPIO_5_I2S0_MCLK 

I2C0 MCLK function

-
WIFI_IOT_IO_FUNC_GPIO_5_BT_STATUS 

BT STATUS function

-
- -## WifiIotIoFuncGpio6 - -``` -enum [WifiIotIoFuncGpio6](Wifiiot.md#ga42008386d7791b97dbfa1fa6b6c4dc1d) -``` - - **Description:** - -Enumerates the functions of GPIO hardware pin 6. - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_IO_FUNC_GPIO_6_GPIO 

GPIO6 function

-
WIFI_IOT_IO_FUNC_GPIO_6_UART1_TXD 

UART1 TXD function

-
WIFI_IOT_IO_FUNC_GPIO_6_SPI0_CK 

SPI0 CK function

-
WIFI_IOT_IO_FUNC_GPIO_6_PWM3_OUT 

PWM3 OUT function

-
WIFI_IOT_IO_FUNC_GPIO_6_I2S0_TX 

I2S0 TX function

-
WIFI_IOT_IO_FUNC_GPIO_6_COEX_SWITCH 

COEX switch function

-
- -## WifiIotIoFuncGpio7 - -``` -enum [WifiIotIoFuncGpio7](Wifiiot.md#gac66dc390f39e0933c051790b20552b7c) -``` - - **Description:** - -Enumerates the functions of GPIO hardware pin 7. - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_IO_FUNC_GPIO_7_GPIO 

GPIO7 function

-
WIFI_IOT_IO_FUNC_GPIO_7_UART1_CTS_N 

UART1 CTS function

-
WIFI_IOT_IO_FUNC_GPIO_7_SPI0_RXD 

SPI0 RXD function

-
WIFI_IOT_IO_FUNC_GPIO_7_PWM0_OUT 

PWM0 OUT function

-
WIFI_IOT_IO_FUNC_GPIO_7_I2S0_BCLK 

I2S0 BCLK function

-
WIFI_IOT_IO_FUNC_GPIO_7_BT_ACTIVE 

BT ACTIVE function

-
- -## WifiIotIoFuncGpio8 - -``` -enum [WifiIotIoFuncGpio8](Wifiiot.md#gae63cd3d5c677fac3b01a3c67e8faf0fb) -``` - - **Description:** - -Enumerates the functions of GPIO hardware pin 8. - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_IO_FUNC_GPIO_8_GPIO 

GPIO8 function

-
WIFI_IOT_IO_FUNC_GPIO_8_UART1_RTS_N 

UART1 RTS function

-
WIFI_IOT_IO_FUNC_GPIO_8_SPI0_TXD 

SPI0 TXD function

-
WIFI_IOT_IO_FUNC_GPIO_8_PWM1_OUT 

PWM1 OUT function

-
WIFI_IOT_IO_FUNC_GPIO_8_I2S0_WS 

I2S0 WS function

-
WIFI_IOT_IO_FUNC_GPIO_8_WLAN_ACTIVE 

WLAN ACTIVE function

-
- -## WifiIotIoFuncGpio9 - -``` -enum [WifiIotIoFuncGpio9](Wifiiot.md#ga641da9889bd5a8a758e1a4eb2a5a19e4) -``` - - **Description:** - -Enumerates the functions of GPIO hardware pin 9. - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_IO_FUNC_GPIO_9_GPIO 

GPIO9 function

-
WIFI_IOT_IO_FUNC_GPIO_9_I2C0_SCL 

I2C0 SCL function

-
WIFI_IOT_IO_FUNC_GPIO_9_UART2_RTS_N 

UART2 RTS function

-
WIFI_IOT_IO_FUNC_GPIO_9_SDIO_D2 

SDIO D2 function

-
WIFI_IOT_IO_FUNC_GPIO_9_SPI0_TXD 

SPI0 TXD function

-
WIFI_IOT_IO_FUNC_GPIO_9_PWM0_OUT 

PWM0 OUT function

-
WIFI_IOT_IO_FUNC_GPIO_9_I2S0_MCLK 

I2S0 MCLK function

-
- -## WifiIotIoName - -``` -enum [WifiIotIoName](Wifiiot.md#ga2f42c70f1dd8a04746e30a97b3dfc415) -``` - - **Description:** - -Enumerates GPIO hardware pin IDs. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_IO_NAME_GPIO_0 

GPIO hardware pin 0

-
WIFI_IOT_IO_NAME_GPIO_1 

GPIO hardware pin 1

-
WIFI_IOT_IO_NAME_GPIO_2 

GPIO hardware pin 2

-
WIFI_IOT_IO_NAME_GPIO_3 

GPIO hardware pin 3

-
WIFI_IOT_IO_NAME_GPIO_4 

GPIO hardware pin 4

-
WIFI_IOT_IO_NAME_GPIO_5 

GPIO hardware pin 5

-
WIFI_IOT_IO_NAME_GPIO_6 

GPIO hardware pin 6

-
WIFI_IOT_IO_NAME_GPIO_7 

GPIO hardware pin 7

-
WIFI_IOT_IO_NAME_GPIO_8 

GPIO hardware pin 8

-
WIFI_IOT_IO_NAME_GPIO_9 

GPIO hardware pin 9

-
WIFI_IOT_IO_NAME_GPIO_10 

GPIO hardware pin 10

-
WIFI_IOT_IO_NAME_GPIO_11 

GPIO hardware pin 11

-
WIFI_IOT_IO_NAME_GPIO_12 

GPIO hardware pin 12

-
WIFI_IOT_IO_NAME_GPIO_13 

GPIO hardware pin 13

-
WIFI_IOT_IO_NAME_GPIO_14 

GPIO hardware pin 14

-
WIFI_IOT_IO_NAME_MAX 

Maximum value

-
- -## WifiIotIoPull - -``` -enum [WifiIotIoPull](Wifiiot.md#gacc20a5c6456ec381ed931232c29d1c4f) -``` - - **Description:** - -Enumerates GPIO pull-up or pull-down settings. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_IO_PULL_NONE 

No pull

-
WIFI_IOT_IO_PULL_UP 

Pull-up

-
WIFI_IOT_IO_PULL_DOWN 

Pull-down

-
WIFI_IOT_IO_PULL_MAX 

Maximum value

-
- -## WifiIotPwmClkSource - -``` -enum [WifiIotPwmClkSource](Wifiiot.md#ga2ecbd0ab9636fedd354de7447056df29) -``` - - **Description:** - -Enumerates PWM clock sources. - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_PWM_CLK_160M 

160 MHz working clock

-
WIFI_IOT_PWM_CLK_XTAL 

24 MHz or 40 MHz external crystal

-
WIFI_IOT_PWM_CLK_MAX 

Maximum value

-
- -## WifiIotPwmPort - -``` -enum [WifiIotPwmPort](Wifiiot.md#gab3518ce878df4a40d614e88a6f81dea7) -``` - - **Description:** - -Enumerates PWM ports. - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_PWM_PORT_PWM0 

PWM0

-
WIFI_IOT_PWM_PORT_PWM1 

PWM1

-
WIFI_IOT_PWM_PORT_PWM2 

PWM2

-
WIFI_IOT_PWM_PORT_PWM3 

PWM3

-
WIFI_IOT_PWM_PORT_PWM4 

PWM4

-
WIFI_IOT_PWM_PORT_PWM5 

PWM5

-
WIFI_IOT_PWM_PORT_MAX 

Maximum value

-
- -## WifiIotSpiCfgClockCpha - -``` -enum [WifiIotSpiCfgClockCpha](Wifiiot.md#ga1eb13cffbbdec9da1d57c766763b94e5) -``` - - **Description:** - -Enumerates communication phases. - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_SPI_CFG_CLOCK_CPHA_0 

Phase 0

-
WIFI_IOT_SPI_CFG_CLOCK_CPHA_1 

Phase 1

-
- -## WifiIotSpiCfgClockCpol - -``` -enum [WifiIotSpiCfgClockCpol](Wifiiot.md#gad6674c8b0989b6a329d5fd5ff0d5d750) -``` - - **Description:** - -Enumerates communication polarities. - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_SPI_CFG_CLOCK_CPOL_0 

Polarity 0

-
WIFI_IOT_SPI_CFG_CLOCK_CPOL_1 

Polarity 1

-
- -## WifiIotSpiCfgDataWidth - -``` -enum [WifiIotSpiCfgDataWidth](Wifiiot.md#ga6f2e44db2698c33b81bd6caa438a55ea) -``` - - **Description:** - -Enumerates the communication data width, that is, the number of valid bits in each frame. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_SPI_CFG_DATA_WIDTH_E_4BIT 

4 bits

-
WIFI_IOT_SPI_CFG_DATA_WIDTH_E_5BIT 

5 bits

-
WIFI_IOT_SPI_CFG_DATA_WIDTH_E_6BIT 

6 bits

-
WIFI_IOT_SPI_CFG_DATA_WIDTH_E_7BIT 

7 bits

-
WIFI_IOT_SPI_CFG_DATA_WIDTH_E_8BIT 

8 bits

-
WIFI_IOT_SPI_CFG_DATA_WIDTH_E_9BIT 

9 bits

-
WIFI_IOT_SPI_CFG_DATA_WIDTH_E_10BIT 

10 bits

-
WIFI_IOT_SPI_CFG_DATA_WIDTH_E_11BIT 

11 bits

-
WIFI_IOT_SPI_CFG_DATA_WIDTH_E_12BIT 

12 bits

-
WIFI_IOT_SPI_CFG_DATA_WIDTH_E_13BIT 

13 bits

-
WIFI_IOT_SPI_CFG_DATA_WIDTH_E_14BIT 

14 bits

-
WIFI_IOT_SPI_CFG_DATA_WIDTH_E_15BIT 

15 bits

-
WIFI_IOT_SPI_CFG_DATA_WIDTH_E_16BIT 

16 bits

-
- -## WifiIotSpiCfgEndian - -``` -enum [WifiIotSpiCfgEndian](Wifiiot.md#ga31924085df23a024413fa6e63e13c41e) -``` - - **Description:** - -Enumerates the endian mode of each frame. - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_SPI_CFG_ENDIAN_LITTLE 

Little-endian

-
WIFI_IOT_SPI_CFG_ENDIAN_BIG 

Big-endian

-
- -## WifiIotSpiCfgFramMode - -``` -enum [WifiIotSpiCfgFramMode](Wifiiot.md#gaef7c192e049db14e2326c0bfba181670) -``` - - **Description:** - -Enumerates communication protocols. - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_SPI_CFG_FRAM_MODE_MOTOROLA 

Motorola protocol

-
WIFI_IOT_SPI_CFG_FRAM_MODE_TI 

Texas Instruments protocol

-
WIFI_IOT_SPI_CFG_FRAM_MODE_MICROWIRE 

Microwire protocol

-
- -## WifiIotSpiIdx - -``` -enum [WifiIotSpiIdx](Wifiiot.md#ga1d095e78d92cdf2ffc5e34443726e44b) -``` - - **Description:** - -Enumerates SPI channel IDs. - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_SPI_ID_0 

Channel 0

-
WIFI_IOT_SPI_ID_1 

Channel 1

-
- -## WifiIotUartBlockState - -``` -enum [WifiIotUartBlockState](Wifiiot.md#ga93f35a58dc54e29d4892d1e94179c72d) -``` - - **Description:** - -Enumerates UART block states. - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_UART_BLOCK_STATE_NONE_BLOCK 

Block disabled

-
WIFI_IOT_UART_BLOCK_STATE_BLOCK 

Block enabled

-
- -## WifiIotUartDmaState - -``` -enum [WifiIotUartDmaState](Wifiiot.md#gaf36ed6a640d85e79dfee020131e0d86f) -``` - - **Description:** - -Enumerates UART DMA states. - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_UART_NONE_DMA 

DMA disabled

-
WIFI_IOT_UART_USE_DMA 

DMA enabled

-
- -## WifiIotUartFifoLine - -``` -enum [WifiIotUartFifoLine](Wifiiot.md#ga1c15f86994b472d35bee5d6b57d42a49) -``` - - **Description:** - -Enumerates UART FIFO interrupt thresholds. - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_FIFO_LINE_ONE_EIGHT 

FIFO = 1/8 full

-
WIFI_IOT_FIFO_LINE_ONE_QUARTER 

FIFO = 1/4 full

-
WIFI_IOT_FIFO_LINE_HALF 

FIFO = 1/2 full

-
WIFI_IOT_FIFO_LINE_THREE_QUARTERS 

FIFO = 3/4 full

-
WIFI_IOT_FIFO_LINE_SEVEN_EIGHTS 

FIFO = 7/8 full

-
- -## WifiIotUartIdx - -``` -enum [WifiIotUartIdx](Wifiiot.md#ga2699252424e5469ef243ae279a263c44) -``` - - **Description:** - -Enumerates the UART serial number. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_UART_IDX_0 

Physical port 0

-
WIFI_IOT_UART_IDX_1 

Physical port 1

-
WIFI_IOT_UART_IDX_2 

Physical port 2

-
WIFI_IOT_UART_IDX_MAX 

Maximum value

-
- -## WifiIotUartIdxDataBit - -``` -enum [WifiIotUartIdxDataBit](Wifiiot.md#gafdf1adfc0e0ed18282aa3006300b12b4) -``` - - **Description:** - -Enumerates the number of UART data bits. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_UART_DATA_BIT_5 

5 data bits

-
WIFI_IOT_UART_DATA_BIT_6 

6 data bits

-
WIFI_IOT_UART_DATA_BIT_7 

7 data bits

-
WIFI_IOT_UART_DATA_BIT_8 

8 data bits

-
- -## WifiIotUartParity - -``` -enum [WifiIotUartParity](Wifiiot.md#ga9cee98ab295d2e42ab7f0fb614268602) -``` - - **Description:** - -Enumerates the UART parity bit. - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_UART_PARITY_NONE 

No parity

-
WIFI_IOT_UART_PARITY_ODD 

Odd parity

-
WIFI_IOT_UART_PARITY_EVEN 

Even parity

-
- -## WifiIotUartStopBit - -``` -enum [WifiIotUartStopBit](Wifiiot.md#gab0a1b43e8e98b028717e6557003b3172) -``` - - **Description:** - -Enumerates the number of UART stop bits. - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_IOT_UART_STOP_BIT_1 

1 stop bit

-
WIFI_IOT_UART_STOP_BIT_2 

2 stop bit

-
- -## **Function Documentation** - -## AdcRead\(\) - -``` -unsigned int AdcRead ([WifiIotAdcChannelIndex](Wifiiot.md#ga4c8b663163c7b23071914947a2bca73b) channel, unsigned short * data, [WifiIotAdcEquModelSel](Wifiiot.md#gafb9992ebf1655f994dc56883c8fe4b2e) equModel, [WifiIotAdcCurBais](Wifiiot.md#gaac161eb7075f815f6d39a63615bfa82d) curBais, unsigned short rstCnt ) -``` - - **Description:** - -Reads a piece of sampled data from a specified ADC channel based on the input parameters. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
channelIndicates the ADC channel index.
dataIndicates the pointer to the address for storing the read data.
equModelIndicates the equation model.
curBaisIndicates the analog power control mode.
rstCntIndicates the count of the time from reset to conversion start. One count is equal to 334 ns. The value must range from 0 to 0xFF0.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## AtCheckUartBusy\(\) - -``` -void AtCheckUartBusy (unsigned char enable) -``` - - **Description:** - -Sets whether to check the UART busy status during low-power voting. - -This function determines whether to check the UART status before the device enters the low-power mode. If **enable** is set to **1** and the UART is found to be busy, the device does not enter the low-power mode. In other scenarios, the device enters the low-power mode. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
enableSpecifies whether to check the UART busy status. The value 1 means to check the UART busy status, and 0 means not to check the busy status.
- -## AtInit\(\) - -``` -unsigned int AtInit (void ) -``` - - **Description:** - -Initializes an AT command task. - -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## AtPrintf\(\) - -``` -int AtPrintf (const char * fmt,  ... ) -``` - - **Description:** - -Formats data and outputs it to the AT command terminal. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
fmtIndicates the pointer to the control character string to format.
...Represents a variable parameter list in the character string format.
- -**Returns:** - -Returns the number of bytes \(excluding the end character\) output to the AT command terminal if the operation is successful; returns **-1** otherwise. - - - -## AtRegisterCmd\(\) - -``` -unsigned int AtRegisterCmd (const [AtCmdTbl](AtCmdTbl.md) * cmdTbl, unsigned short cmdNum ) -``` - - **Description:** - -Registers a certain number of AT commands. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
cmdTblIndicates the command table.
cmdNumIndicates the number of AT commands in the command table.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## AtSysCmdRegister\(\) - -``` -void AtSysCmdRegister (void ) -``` - - **Description:** - -Registers a system AT command. - -For example, you can use this function to register the AT+RST command, which is a system AT command used to reset a device. - -## FlashDeinit\(\) - -``` -unsigned int FlashDeinit (void ) -``` - - **Description:** - -Deinitializes the flash device. - -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## FlashErase\(\) - -``` -unsigned int FlashErase (const unsigned int flashOffset, const unsigned int size ) -``` - - **Description:** - -Erases data in a specified flash memory address. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
flashOffsetIndicates the address of the flash memory data to erase.
sizeIndicates the length of the data to erase, in bytes. The value must be a multiple of 4000 bytes.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## FlashInit\(\) - -``` -unsigned int FlashInit (void ) -``` - - **Description:** - -Initializes the flash device. - -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## FlashIoctl\(\) - -``` -unsigned int FlashIoctl (unsigned short cmd, char * data ) -``` - - **Description:** - -Obtains flash information based on a specific command. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
cmdIndicates the command ID. The value 0 indicates an attempt to obtain flash partition information, and 1 indicates an attempt to obtain the flash busy status.
dataIndicates the pointer to the memory where the obtained information will be saved.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the flash information is obtained; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## FlashPartitionInit\(\) - -``` -unsigned int FlashPartitionInit (void ) -``` - - **Description:** - -Initializes a flash partition. - -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## FlashRead\(\) - -``` -unsigned int FlashRead (const unsigned int flashOffset, const unsigned int size, unsigned char * ramData ) -``` - - **Description:** - -Reads data from a flash memory address. - -This function reads a specified length of data from a specified flash memory address. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
flashOffsetIndicates the address of the flash memory from which data is to read.
sizeIndicates the length of the data to read.
ramDataIndicates the pointer to the RAM for storing the read data.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## FlashWrite\(\) - -``` -unsigned int FlashWrite (const unsigned int flashOffset, unsigned int size, const unsigned char * ramData, unsigned char doErase ) -``` - - **Description:** - -Writes data to a flash memory address. - -This function writes a specified length of data to a specified flash memory address. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
flashOffsetIndicates the address of the flash memory to which data is to write.
sizeIndicates the length of the data to write.
ramDataIndicates the pointer to the RAM for storing the data to write.
doEraseIndicates whether to automatically erase and overwrite the data.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## GetPartitionTable\(\) - -``` -[WifiIotFlashPartitionTable](WifiIotFlashPartitionTable.md)* GetPartitionTable (void ) -``` - - **Description:** - -Obtains a flash partition table. - -**Returns:** - -Returns the pointer to the partition table. - - - -## GpioDeinit\(\) - -``` -unsigned int GpioDeinit (void ) -``` - - **Description:** - -Deinitializes the GPIO device. - -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## GpioGetDir\(\) - -``` -unsigned int GpioGetDir ([WifiIotGpioIdx](Wifiiot.md#gacb21f234cf149161f1f95f3330eeb8e7) id, [WifiIotGpioDir](Wifiiot.md#gab4b1fb50c758d491ba297a65e1c7a70a) * dir ) -``` - - **Description:** - -Obtains the direction for a GPIO pin. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the GPIO pin ID.
dirIndicates the pointer to the GPIO input/output direction.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## GpioGetInputVal\(\) - -``` -unsigned int GpioGetInputVal ([WifiIotGpioIdx](Wifiiot.md#gacb21f234cf149161f1f95f3330eeb8e7) id, [WifiIotGpioValue](Wifiiot.md#gac9095d1db72e5046b2ec1895aaec0e6b) * val ) -``` - - **Description:** - -Obtains the input level value of a GPIO pin. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the GPIO pin ID.
valIndicates the pointer to the input level value.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## GpioGetOutputVal\(\) - -``` -unsigned int GpioGetOutputVal ([WifiIotGpioIdx](Wifiiot.md#gacb21f234cf149161f1f95f3330eeb8e7) id, [WifiIotGpioValue](Wifiiot.md#gac9095d1db72e5046b2ec1895aaec0e6b) * val ) -``` - - **Description:** - -Obtains the output level value of a GPIO pin. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the GPIO pin ID.
valIndicates the pointer to the output level value.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## GpioInit\(\) - -``` -unsigned int GpioInit (void ) -``` - - **Description:** - -Initializes the GPIO device. - -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## GpioRegisterIsrFunc\(\) - -``` -unsigned int GpioRegisterIsrFunc ([WifiIotGpioIdx](Wifiiot.md#gacb21f234cf149161f1f95f3330eeb8e7) id, [WifiIotGpioIntType](Wifiiot.md#gac8eb8ad448903ed52c96ccc675e81f94) intType, [WifiIotGpioIntPolarity](Wifiiot.md#gab81589838cedcc3933bb789c97ad3643) intPolarity, [GpioIsrCallbackFunc](Wifiiot.md#ga93120443d8150e18701ce6d3dd290408) func, char * arg ) -``` - - **Description:** - -Enables the interrupt function for a GPIO pin. - -This function can be used to set the interrupt type, interrupt polarity, and interrupt callback for a GPIO pin. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the GPIO pin ID.
intTypeIndicates the interrupt type.
intPolarityIndicates the interrupt polarity.
funcIndicates the interrupt callback function.
argIndicates the pointer to the argument used in the interrupt callback function.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## GpioSetDir\(\) - -``` -unsigned int GpioSetDir ([WifiIotGpioIdx](Wifiiot.md#gacb21f234cf149161f1f95f3330eeb8e7) id, [WifiIotGpioDir](Wifiiot.md#gab4b1fb50c758d491ba297a65e1c7a70a) dir ) -``` - - **Description:** - -Sets the direction for a GPIO pin. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the GPIO pin ID.
dirIndicates the GPIO input/output direction.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## GpioSetIsrMask\(\) - -``` -unsigned int GpioSetIsrMask ([WifiIotGpioIdx](Wifiiot.md#gacb21f234cf149161f1f95f3330eeb8e7) id, unsigned char mask ) -``` - - **Description:** - -Masks the interrupt function for a GPIO pin. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the GPIO pin ID.
maskIndicates whether the interrupt function is masked. The value 1 means to mask the interrupt function, and 0 means not to mask the interrupt function.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## GpioSetIsrMode\(\) - -``` -unsigned int GpioSetIsrMode ([WifiIotGpioIdx](Wifiiot.md#gacb21f234cf149161f1f95f3330eeb8e7) id, [WifiIotGpioIntType](Wifiiot.md#gac8eb8ad448903ed52c96ccc675e81f94) intType, [WifiIotGpioIntPolarity](Wifiiot.md#gab81589838cedcc3933bb789c97ad3643) intPolarity ) -``` - - **Description:** - -Sets the interrupt trigger mode of a GPIO pin. - -This function configures a GPIO pin based on the interrupt type and interrupt polarity. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the GPIO pin ID.
intTypeIndicates the interrupt type.
intPolarityIndicates the interrupt polarity.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## GpioSetOutputVal\(\) - -``` -unsigned int GpioSetOutputVal ([WifiIotGpioIdx](Wifiiot.md#gacb21f234cf149161f1f95f3330eeb8e7) id, [WifiIotGpioValue](Wifiiot.md#gac9095d1db72e5046b2ec1895aaec0e6b) val ) -``` - - **Description:** - -Sets the output level value for a GPIO pin. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the GPIO pin ID.
valIndicates the output level value.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## GpioUnregisterIsrFunc\(\) - -``` -unsigned int GpioUnregisterIsrFunc ([WifiIotGpioIdx](Wifiiot.md#gacb21f234cf149161f1f95f3330eeb8e7) id) -``` - - **Description:** - -Disables the interrupt function for a GPIO pin. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
idIndicates the GPIO pin ID.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## I2cDeinit\(\) - -``` -unsigned int I2cDeinit ([WifiIotI2cIdx](Wifiiot.md#gaeeb58e02e3783d02e1ed4bad313cc0b8) id) -``` - - **Description:** - -Deinitializes an I2C device. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
idIndicates the I2C device ID.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## I2cInit\(\) - -``` -unsigned int I2cInit ([WifiIotI2cIdx](Wifiiot.md#gaeeb58e02e3783d02e1ed4bad313cc0b8) id, unsigned int baudrate ) -``` - - **Description:** - -Initializes an I2C device with a specified baud rate. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the I2C device ID.
baudrateIndicates the I2C baud rate.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## I2cRead\(\) - -``` -unsigned int I2cRead ([WifiIotI2cIdx](Wifiiot.md#gaeeb58e02e3783d02e1ed4bad313cc0b8) id, unsigned short deviceAddr, const [WifiIotI2cData](WifiIotI2cData.md) * i2cData ) -``` - - **Description:** - -Reads data from an I2C device. - -The data read will be saved to the address specified by **i2cData**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the I2C device ID.
deviceAddrIndicates the I2C device address.
i2cDataIndicates the pointer to the data descriptor to read.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## I2cRegisterResetBusFunc\(\) - -``` -void I2cRegisterResetBusFunc ([WifiIotI2cIdx](Wifiiot.md#gaeeb58e02e3783d02e1ed4bad313cc0b8) id, [WifiIotI2cFunc](WifiIotI2cFunc.md) pfn ) -``` - - **Description:** - -Registers an I2C callback. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the I2C device ID.
pfnIndicates the type of the callback to register.
- -## I2cSetBaudrate\(\) - -``` -unsigned int I2cSetBaudrate ([WifiIotI2cIdx](Wifiiot.md#gaeeb58e02e3783d02e1ed4bad313cc0b8) id, unsigned int baudrate ) -``` - - **Description:** - -Sets the baud rate for an I2C device. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the I2C device ID.
baudrateIndicates the I2C baud rate to set.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## I2cWrite\(\) - -``` -unsigned int I2cWrite ([WifiIotI2cIdx](Wifiiot.md#gaeeb58e02e3783d02e1ed4bad313cc0b8) id, unsigned short deviceAddr, const [WifiIotI2cData](WifiIotI2cData.md) * i2cData ) -``` - - **Description:** - -Writes data to an I2C device. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the I2C device ID.
deviceAddrIndicates the I2C device address.
i2cDataIndicates the pointer to the data descriptor to write.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## I2cWriteread\(\) - -``` -unsigned int I2cWriteread ([WifiIotI2cIdx](Wifiiot.md#gaeeb58e02e3783d02e1ed4bad313cc0b8) id, unsigned short deviceAddr, const [WifiIotI2cData](WifiIotI2cData.md) * i2cData ) -``` - - **Description:** - -Sends data to and receives data responses from an I2C device. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the I2C device ID.
deviceAddrIndicates the I2C device address.
i2cDataIndicates the pointer to the device descriptor of the data to receive.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## I2sDeinit\(\) - -``` -unsigned int I2sDeinit (void ) -``` - - **Description:** - -Deinitializes the I2S device. - -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## I2sInit\(\) - -``` -unsigned int I2sInit (const [WifiIotI2sAttribute](WifiIotI2sAttribute.md) * i2sAttribute) -``` - - **Description:** - -Initializes the I2S device. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
i2sAttributeIndicates the pointer to the I2S configuration parameter.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## I2sRead\(\) - -``` -unsigned int I2sRead (unsigned char * rdData, unsigned int rdLen, unsigned int timeOutMs ) -``` - - **Description:** - -Reads data from the I2S device. - -This function reads data with the length specified by **rdLen** from an I2S device within the duration specified by **timeOutMs**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
rdDataIndicates the pointer to the data to read.
rdLenIndicates the length of the data to read.
timeOutMsIndicates the timeout interval.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## I2sWrite\(\) - -``` -unsigned int I2sWrite (unsigned char * wrData, unsigned int wrLen, unsigned int timeOutMs ) -``` - - **Description:** - -Writes data to the I2S device. - -This function writes data with the length specified by **wrLen** to an I2S device within the duration specified by **timeOutMs**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
wrDataIndicates the pointer to the data to write.
wrLenIndicates the length of the data to write.
timeOutMsIndicates the timeout interval.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## IOGetDriverStrength\(\) - -``` -unsigned int IOGetDriverStrength ([WifiIotIoName](Wifiiot.md#ga2f42c70f1dd8a04746e30a97b3dfc415) id, [WifiIotIoDriverStrength](Wifiiot.md#gae97ab4109f511ceeee889dba9e79a968) * val ) -``` - - **Description:** - -Obtains the driver strength of a GPIO pin. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the GPIO pin.
valIndicates the pointer to the address where the I/O driver strength level is to be stored.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## IoGetFunc\(\) - -``` -unsigned int IoGetFunc ([WifiIotIoName](Wifiiot.md#ga2f42c70f1dd8a04746e30a97b3dfc415) id, unsigned char * val ) -``` - - **Description:** - -Obtains the multiplexing function for a GPIO pin. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the GPIO pin.
valIndicates the pointer to the address whether I/O multiplexing function is to be stored. For example, if the value of id is WIFI_IOT_IO_NAME_GPIO_0, the value type of val is WifiIotIoFuncGpio0. If the value of id is WIFI_IOT_IO_NAME_GPIO_1, the value type of val is WifiIotIoFuncGpio1. The same rule applies to other values.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## IoGetPull\(\) - -``` -unsigned int IoGetPull ([WifiIotIoName](Wifiiot.md#ga2f42c70f1dd8a04746e30a97b3dfc415) id, [WifiIotIoPull](Wifiiot.md#gacc20a5c6456ec381ed931232c29d1c4f) * val ) -``` - - **Description:** - -Obtains the pull type of a GPIO pin. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the GPIO pin.
valIndicates the pointer to the address where the pull type is to be stored.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## IOSetDriverStrength\(\) - -``` -unsigned int IOSetDriverStrength ([WifiIotIoName](Wifiiot.md#ga2f42c70f1dd8a04746e30a97b3dfc415) id, [WifiIotIoDriverStrength](Wifiiot.md#gae97ab4109f511ceeee889dba9e79a968) val ) -``` - - **Description:** - -Sets the driver strength of a GPIO pin. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the GPIO pin.
valIndicates the I/O driver strength level obtained.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## IoSetFunc\(\) - -``` -unsigned int IoSetFunc ([WifiIotIoName](Wifiiot.md#ga2f42c70f1dd8a04746e30a97b3dfc415) id, unsigned char val ) -``` - - **Description:** - -Sets the multiplexing function for a GPIO pin. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the GPIO pin.
valIndicates the I/O multiplexing function. For example, if the value of id is WIFI_IOT_IO_NAME_GPIO_0, the value type of val is WifiIotIoFuncGpio0. If the value of id is WIFI_IOT_IO_NAME_GPIO_1, the value type of val is WifiIotIoFuncGpio1. The same rule applies to other values.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## IoSetPull\(\) - -``` -unsigned int IoSetPull ([WifiIotIoName](Wifiiot.md#ga2f42c70f1dd8a04746e30a97b3dfc415) id, [WifiIotIoPull](Wifiiot.md#gacc20a5c6456ec381ed931232c29d1c4f) val ) -``` - - **Description:** - -Sets the pull for a GPIO pin. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the GPIO pin.
valIndicates the pull-up or pull-down to set.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## KalThreadRegisterIdleCallback\(\) - -``` -void KalThreadRegisterIdleCallback ([TickIdleKalCallback](Wifiiot.md#ga8be54bbf12f538188db10aaaf4bdbdf9) cb) -``` - - **Description:** - -Registers the idle task callback. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
cbIndicates the idle task callback to register.
- -## KalTickRegisterCallback\(\) - -``` -void KalTickRegisterCallback ([TickIdleKalCallback](Wifiiot.md#ga8be54bbf12f538188db10aaaf4bdbdf9) cb) -``` - - **Description:** - -Registers the CPU tick callback. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
cbIndicates the CPU tick callback to register.
- -## PwmDeinit\(\) - -``` -unsigned int PwmDeinit ([WifiIotPwmPort](Wifiiot.md#gab3518ce878df4a40d614e88a6f81dea7) port) -``` - - **Description:** - -Deinitializes a PWM device. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
portIndicates the PWM port number.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; eturns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## PwmInit\(\) - -``` -unsigned int PwmInit ([WifiIotPwmPort](Wifiiot.md#gab3518ce878df4a40d614e88a6f81dea7) port) -``` - - **Description:** - -Initializes a PWM device. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
portIndicates the PWM port number.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## PwmStart\(\) - -``` -unsigned int PwmStart ([WifiIotPwmPort](Wifiiot.md#gab3518ce878df4a40d614e88a6f81dea7) port, unsigned short duty, unsigned short freq ) -``` - - **Description:** - -Outputs PWM signals based on the input parameters. - -This function outputs PWM signals from a specified port based on the configured frequency division multiple and duty cycle. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
portIndicates the PWM port number.
dutyIndicates the PWM duty cycle.
freqIndicates the frequency-division multiple.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## PwmStop\(\) - -``` -unsigned int PwmStop ([WifiIotPwmPort](Wifiiot.md#gab3518ce878df4a40d614e88a6f81dea7) port) -``` - - **Description:** - -Stops the PWM signal output. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
portIndicates the PWM port number.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## SdioCompleteSend\(\) - -``` -unsigned int SdioCompleteSend (unsigned char * admaTable, unsigned int admaIndex ) -``` - - **Description:** - -Completes data sending on the SDIO device. - -After data sending is complete, the SDIO device sets a complete flag for the ADMA ID **admaIndex** to indicate that the ADMA data between channel 0 and the complete flag is set. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
admaTableIndicates the pointer to the start address of the ADMA table. Each ADMA table occupies 8 bytes.
admaIndexIndicates the ADMA ID, ranging from 0 to 130.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## SdioGetExtendInfo\(\) - -``` -[WifiIotSdioExtendFunc](WifiIotSdioExtendFunc.md)* SdioGetExtendInfo (void ) -``` - - **Description:** - -Obtains the extended configuration. - -**Returns:** - -Returns the pointer to the address of the extended configuration. - - - -## SdioInit\(\) - -``` -unsigned int SdioInit (void ) -``` - - **Description:** - -Initializes the SDIO device. - -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## SdioIsPendingMsg\(\) - -``` -unsigned int SdioIsPendingMsg (unsigned int msg) -``` - - **Description:** - -Checks whether a specified message is suspended. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
msgIndicates the ID of the message to check, ranging from 0 to 31.
- -**Returns:** - -Returns **1** if the message is suspended; returns **0** otherwise. - - - -## SdioIsSendingMsg\(\) - -``` -unsigned int SdioIsSendingMsg (unsigned int msg) -``` - - **Description:** - -Checks whether a specified message is being sent. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
msgIndicates the ID of the message to check, ranging from 0 to 31.
- -**Returns:** - -Returns **1** if the message is being sent; returns **0** otherwise. - - - -## SdioProcessMsg\(\) - -``` -unsigned int SdioProcessMsg (unsigned int sendMsg, unsigned int clearMsg ) -``` - - **Description:** - -Clears a specified suspended message in the message queue, adds a new message to it, and sends the new message. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sendMsgIndicates the ID of the message to send, ranging from 0 to 31.
clearMsgIndicates the ID of the message to clear, ranging from 0 to 31.
- -**Returns:** - -Returns **1** if the operation is successful; returns **0** otherwise. - - - -## SdioRegisterCallback\(\) - -``` -unsigned int SdioRegisterCallback (const [WifiIotSdioIntcallback](WifiIotSdioIntcallback.md) * callbackFunc) -``` - - **Description:** - -Registers an interrupt callback for the SDIO device. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
callbackFuncIndicates the pointer to the interrupt callback to register.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## SdioRegisterNotifyMessageCallback\(\) - -``` -void SdioRegisterNotifyMessageCallback ([NotifyHostMessageEvent](Wifiiot.md#ga133bb67c0fa6e9dcab35f00edff68e58) msgEventCallback) -``` - - **Description:** - -Registers the callback that will be invoked when the host sends a message or data. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
msgEventCallbackIndicates the callback to be invoked when a message or data is sent.
- -## SdioReinit\(\) - -``` -unsigned int SdioReinit (void ) -``` - - **Description:** - -Reinitializes the SDIO device. - -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## SdioSchedMsg\(\) - -``` -unsigned int SdioSchedMsg (void ) -``` - - **Description:** - -Sends a suspended SDIO message. - -**Returns:** - -Returns **1** if no message is suspended or the suspended message is successfully sent; returns **0** if the SDIO device is not working or is sending messages. - - - -## SdioSendData\(\) - -``` -void SdioSendData (unsigned int xferBytes) -``` - - **Description:** - -Starts to send data. - -Data with the length specified by **xferBytes** is ready for transmission. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xferBytesIndicates the length of the data to send.
- -## SdioSendMsgAck\(\) - -``` -unsigned int SdioSendMsgAck (unsigned int msg) -``` - - **Description:** - -Sends a specified message. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
msgIndicates the ID of the message to send, ranging from 0 to 31.
- -**Returns:** - -Returns **1** if the operation is successful; returns **0** otherwise. - - - -## SdioSendSyncMsg\(\) - -``` -unsigned int SdioSendSyncMsg (unsigned int msg) -``` - - **Description:** - -Adds a message to a message queue and sends the message. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
msgIndicates the ID of the message to add to the message queue and send, ranging from 0 to 31.
- -**Returns:** - -Returns **1** if the operation is successful; returns **0** otherwise. - - - -## SdioSetAdmatable\(\) - -``` -unsigned int SdioSetAdmatable (unsigned char * admatable, unsigned int admaIndex, const unsigned int * dataAddr, unsigned int dataLen ) -``` - - **Description:** - -Sets an SDIO ADMA. - -This function places a specified length of data into the ADMA with a specified ADMA ID **admaIndex**. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
admatableIndicates the pointer to the start address of the ADMA table. Each ADMA table occupies 8 bytes.
admaIndexIndicates the ADMA ID, ranging from 0 to 130.
dataAddrIndicates the pointer to the address where data is to send.
dataLenIndicates the length of the data to send.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## SdioSetPadAdmatab\(\) - -``` -unsigned int SdioSetPadAdmatab (unsigned int padlen, unsigned char * admatable, unsigned int admaIndex ) -``` - - **Description:** - -Sets the ADMA table that requires data padding. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
padlenIndicates the length of the data to pad.
admatableIndicates the pointer to the start address of the ADMA table. Each ADMA table occupies 8 bytes.
admaIndexIndicates the ADMA ID, ranging from 0 to 130.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## SdioSetPowerdownWhenDeepSleep\(\) - -``` -void SdioSetPowerdownWhenDeepSleep (unsigned char powerDown) -``` - - **Description:** - -Sets whether the SDIO device is powered off in deep sleep mode. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
powerDownSpecifies whether to power off the SDIO device. The value 1 means to power it off, and 0 means not to power it off.
- -## SdioSoftReset\(\) - -``` -void SdioSoftReset (void ) -``` - - **Description:** - -Resets the SDIO device. - -## SdioWriteExtinfo\(\) - -``` -unsigned int SdioWriteExtinfo ([WifiIotSdioExtendFunc](WifiIotSdioExtendFunc.md) * extFunc) -``` - - **Description:** - -Sets the extended SDIO attributes. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
extFuncIndicates the pointer to the extended attributes.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## SpiDeinit\(\) - -``` -unsigned int SpiDeinit ([WifiIotSpiIdx](Wifiiot.md#ga1d095e78d92cdf2ffc5e34443726e44b) spiId) -``` - - **Description:** - -Deinitializes an SPI device. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
spiIdIndicates the SPI channel ID.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## SpiHostRead\(\) - -``` -unsigned int SpiHostRead ([WifiIotSpiIdx](Wifiiot.md#ga1d095e78d92cdf2ffc5e34443726e44b) spiId, char * readData, unsigned int byteLen ) -``` - - **Description:** - -Reads data in half-duplex SPI master mode. - -In SPI master mode, this function reads data of the length specified by **byteLen** in **readData** through the channel specified by **spiId**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
spiIdIndicates the SPI channel ID.
readDataIndicates the pointer to the data to read.
byteLenIndicates the length of the data to read.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## SpiHostWrite\(\) - -``` -unsigned int SpiHostWrite ([WifiIotSpiIdx](Wifiiot.md#ga1d095e78d92cdf2ffc5e34443726e44b) spiId, char * writeData, unsigned int byteLen ) -``` - - **Description:** - -Sends data in half-duplex SPI master mode. - -In SPI master mode, this function sends data of the length specified by **byteLen** in **writeData** through the channel specified by **spiId**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
spiIdIndicates the SPI channel ID.
writeDataIndicates the pointer to the data to send.
byteLenIndicates the length of the data to send.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## SpiHostWriteread\(\) - -``` -unsigned int SpiHostWriteread ([WifiIotSpiIdx](Wifiiot.md#ga1d095e78d92cdf2ffc5e34443726e44b) spiId, char * writeData, char * readData, unsigned int byteLen ) -``` - - **Description:** - -Sends and reads data in full-duplex SPI master mode. - -In SPI master mode, this function sends data in **writeData** and reads data of the length specified by **byteLen** in **readData** both through the channel specified by **spiId**. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
spiIdIndicates the SPI channel ID.
writeDataIndicates the pointer to the data to send.
readDataIndicates the pointer to the data to read.
byteLenIndicates the length of the data to read.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## SpiInit\(\) - -``` -unsigned int SpiInit ([WifiIotSpiIdx](Wifiiot.md#ga1d095e78d92cdf2ffc5e34443726e44b) spiId, [WifiIotSpiCfgInitParam](WifiIotSpiCfgInitParam.md) initParam, const [WifiIotSpiCfgBasicInfo](WifiIotSpiCfgBasicInfo.md) * param ) -``` - - **Description:** - -Initializes an SPI device. - -This function initializes the device with the channel ID **spiId**, device type **initParam**, and device parameter **param**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
spiIdIndicates the SPI channel ID.
initParamSpecifies whether the device is a slave one.
paramIndicates the pointer to the SPI device parameter.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## SpiRegisterUsrFunc\(\) - -``` -unsigned int SpiRegisterUsrFunc ([WifiIotSpiIdx](Wifiiot.md#ga1d095e78d92cdf2ffc5e34443726e44b) spiId, [SpiIsrFunc](Wifiiot.md#gad1acc3e9c9d1c63f70aeb9d5201ed1f0) prepareF, [SpiIsrFunc](Wifiiot.md#gad1acc3e9c9d1c63f70aeb9d5201ed1f0) restoreF ) -``` - - **Description:** - -Registers the data TX preparation/recovery function. - -This function registers the functions registered by **prepareF** and **restoreF** for an SPI device with a channel specified by **spiId**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
spiIdIndicates the SPI channel ID.
prepareFIndicates the function used for data preparation.
restoreFIndicates the function used for data recovery.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## SpiSetBasicInfo\(\) - -``` -unsigned int SpiSetBasicInfo ([WifiIotSpiIdx](Wifiiot.md#ga1d095e78d92cdf2ffc5e34443726e44b) spiId, const [WifiIotSpiCfgBasicInfo](WifiIotSpiCfgBasicInfo.md) * param ) -``` - - **Description:** - -Sets the SPI channel parameter. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
spiIdIndicates the SPI channel ID.
paramIndicates the pointer to the SPI parameter to set.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## SpiSetDmaMode\(\) - -``` -unsigned int SpiSetDmaMode ([WifiIotSpiIdx](Wifiiot.md#ga1d095e78d92cdf2ffc5e34443726e44b) spiId, unsigned char dmaEn ) -``` - - **Description:** - -Sets whether to enable DMA to transfer data for an SPI device in slave mode. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
spiIdIndicates the SPI channel ID.
dmaEnSpecifies whether to enable DMA. The value 1 means to enable DMA, and 0 means to disable DMA.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## SpiSetIrqMode\(\) - -``` -unsigned int SpiSetIrqMode ([WifiIotSpiIdx](Wifiiot.md#ga1d095e78d92cdf2ffc5e34443726e44b) spiId, unsigned char irqEn ) -``` - - **Description:** - -Sets whether to enable the interrupt request \(IRQ\) mode for an SPI device. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
spiIdIndicates the SPI channel ID.
irqEnSpecifies whether to enable IRQ. The value 1 means to enable IRQ, and 0 means to disable IRQ.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## SpiSetLoopBackMode\(\) - -``` -unsigned int SpiSetLoopBackMode ([WifiIotSpiIdx](Wifiiot.md#ga1d095e78d92cdf2ffc5e34443726e44b) spiId, unsigned char lbEn ) -``` - - **Description:** - -Sets whether to enable loopback test for an SPI device. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
spiIdIndicates the SPI channel ID.
lbEnSpecifies whether to enable loopback test. The value 1 means to enable loopback test, and 0 means to disable loopback test.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## SpiSlaveRead\(\) - -``` -unsigned int SpiSlaveRead ([WifiIotSpiIdx](Wifiiot.md#ga1d095e78d92cdf2ffc5e34443726e44b) spiId, char * readData, unsigned int byteLen, unsigned int timeOutMs ) -``` - - **Description:** - -Reads data in SPI slave mode. - -In SPI slave mode, this function reads data of the length specified by **byteLen** in **readData** through the channel specified by **spiId** within the duration **timeOutMs**. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
spiIdIndicates the SPI channel ID.
readDataIndicates the pointer to the data to read.
byteLenIndicates the length of the data to read.
timeOutMsIndicates the timeout interval.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## SpiSlaveWrite\(\) - -``` -unsigned int SpiSlaveWrite ([WifiIotSpiIdx](Wifiiot.md#ga1d095e78d92cdf2ffc5e34443726e44b) spiId, char * writeData, unsigned int byteLen, unsigned int timeOutMs ) -``` - - **Description:** - -Sends data in SPI slave mode. - -In SPI slave mode, this function sends data of the length specified by **byteLen** in **writeData** through the channel specified by **spiId** within the duration **timeOutMs**. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
spiIdIndicates the SPI channel ID.
writeDataIndicates the pointer to the data to send.
byteLenIndicates the length of the data to send.
timeOutMsIndicates the timeout interval.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## UartDeinit\(\) - -``` -unsigned int UartDeinit ([WifiIotUartIdx](Wifiiot.md#ga2699252424e5469ef243ae279a263c44) id) -``` - - **Description:** - -Deinitializes a UART device. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
idIndicates the UART port number.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## UartGetAttribute\(\) - -``` -unsigned int UartGetAttribute ([WifiIotUartIdx](Wifiiot.md#ga2699252424e5469ef243ae279a263c44) id, [WifiIotUartAttribute](WifiIotUartAttribute.md) * attr, [WifiIotUartExtraAttr](WifiIotUartExtraAttr.md) * extraAttr ) -``` - - **Description:** - -Obtains UART attributes. - -This function obtains the basic and extended attributes of a UART device. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the UART port number.
attrIndicates the pointer to the basic UART attributes.
extraAttrIndicates the pointer to the extended UART attributes.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## UartInit\(\) - -``` -unsigned int UartInit ([WifiIotUartIdx](Wifiiot.md#ga2699252424e5469ef243ae279a263c44) id, const [WifiIotUartAttribute](WifiIotUartAttribute.md) * param, const [WifiIotUartExtraAttr](WifiIotUartExtraAttr.md) * extraAttr ) -``` - - **Description:** - -Configures a UART device. - -This function configures a UART device with the port number specified by **id** based on the basic and extended attributes. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the UART port number.
paramIndicates the pointer to the basic UART attributes.
extraAttrIndicates the pointer to the extended UART attributes.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## UartIsBufEmpty\(\) - -``` -unsigned int UartIsBufEmpty ([WifiIotUartIdx](Wifiiot.md#ga2699252424e5469ef243ae279a263c44) id, unsigned char * empty ) -``` - - **Description:** - -Checks whether the buffer on a UART device is empty. - -The query result will be stored in **empty**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the UART port number.
emptyIndicates the pointer to the address whether the query result is to be stored. If the buffer is empty, the query result is 1. If the buffer is not empty, the query result is 0.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## UartIsBusy\(\) - -``` -unsigned int UartIsBusy ([WifiIotUartIdx](Wifiiot.md#ga2699252424e5469ef243ae279a263c44) id, unsigned char * busy ) -``` - - **Description:** - -Checks whether the buffer on a UART device is busy. - -The query result will be stored in **busy**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the UART port number.
busyIndicates the pointer to the address whether the query result is to be stored. If the buffer is busy, the query result is 1. If the buffer is not busy, the query result is 0.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## UartRead\(\) - -``` -int UartRead ([WifiIotUartIdx](Wifiiot.md#ga2699252424e5469ef243ae279a263c44) id, unsigned char * data, unsigned int dataLen ) -``` - - **Description:** - -Reads data from a UART device. - -This function reads a specified length of data from a UART device with the port number specified by **id**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the UART port number.
dataIndicates the pointer to the start address of the data to read.
dataLenIndicates the number of bytes to read.
- -**Returns:** - -Returns the number of bytes read if the operation is successful; returns **-1** otherwise. - - - -## UartSetFlowCtrl\(\) - -``` -unsigned int UartSetFlowCtrl ([WifiIotUartIdx](Wifiiot.md#ga2699252424e5469ef243ae279a263c44) id, [WifiIotFlowCtrl](Wifiiot.md#gacf7ec5d973706e8239c7c6e4a470d8ab) flowCtrl ) -``` - - **Description:** - -Sets UART hardware flow control. - -This function configures flow control for a UART device with the port number specified by **id**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the UART port number.
flowCtrlIndicates the parameter used for hardware flow control.
- -**Returns:** - -Returns [WIFI\_IOT\_SUCCESS](Wifiiot.md#gae70eaf627c0370cc271dcb8060aee861) if the operation is successful; returns an error code defined in [wifiiot\_errno.h](wifiiot_errno-h.md) otherwise. - - - -## UartWrite\(\) - -``` -int UartWrite ([WifiIotUartIdx](Wifiiot.md#ga2699252424e5469ef243ae279a263c44) id, const unsigned char * data, unsigned int dataLen ) -``` - - **Description:** - -Writes data to a UART device. - -This function writes a specified length of data to a UART device with the port number specified by **id**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the UART port number.
dataIndicates the pointer to the start address of the data to write.
dataLenIndicates the number of bytes to write.
- -**Returns:** - -Returns the number of bytes written if the operation is successful; returns **-1** otherwise. - - - -## UartWriteImmediately\(\) - -``` -int UartWriteImmediately ([WifiIotUartIdx](Wifiiot.md#ga2699252424e5469ef243ae279a263c44) id, const unsigned char * data, unsigned int dataLen ) -``` - - **Description:** - -Writes data to be sent to a UART device in polling mode. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the UART port number.
dataIndicates the pointer to the start address of the data to write.
dataLenIndicates the number of bytes to write.
- -**Returns:** - -Returns the number of bytes written if the operation is successful; returns **-1** otherwise. - - - -## WatchDogDisable\(\) - -``` -void WatchDogDisable (void ) -``` - - **Description:** - -Disables the watchdog. - -## WatchDogEnable\(\) - -``` -void WatchDogEnable (void ) -``` - - **Description:** - -Enables the watchdog. - -## WatchDogKick\(\) - -``` -void WatchDogKick (void ) -``` - - **Description:** - -Feeds the watchdog. - diff --git a/api/api-LinkIoT/Wifiservice.md b/api/api-LinkIoT/Wifiservice.md deleted file mode 100755 index 5c46bf1194b724a7ad877a58152970664401a0ee..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/Wifiservice.md +++ /dev/null @@ -1,1517 +0,0 @@ -# Wifiservice - -## **Overview** - -Provides functions for the Wi-Fi station and hotspot modes. - -You can use this module to enable and disable the Wi-Fi station or hotspot mode, connect to and disconnect from a station or hotspot, query the station or hotspot status, and listen for events. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Name

-

Description

-

station_info.h

-

Defines the structure and macro of the station information contained in the event information.

-

wifi_device.h

-

Provides capabilities to enable and disable the station mode, connect to and disconnect from a station, query the station status, and listen for events.

-

wifi_device_config.h

-

Defines the Wi-Fi station configuration.

-

wifi_error_code.h

-

Defines error codes of the Wi-Fi service.

-

wifi_event.h

-

Defines callbacks and structure of Wi-Fi events.

-

wifi_hotspot.h

-

Provides capabilities to enable and disable the hotspot mode, connect to and disconnect from a hotspot, query the hotspot status, and listen for events.

-

wifi_hotspot_config.h

-

Defines the Wi-Fi hotspot configuration.

-

wifi_linked_info.h

-

Defines the data structure and macro of the Wi-Fi connection information.

-

wifi_scan_info.h

-

Defines the data structure and macro of the Wi-Fi scan result information.

-
- -## Data Structures - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

StationInfo

-

Represents the station information.

-

WifiDeviceConfig

-

Represents the Wi-Fi station configuration used to connect to a specified Wi-Fi device.

-

WifiScanParams

-

Represents the Wi-Fi station configuration used to connect to a specified Wi-Fi device.

-

WifiEvent

-

Represents the pointer to a Wi-Fi event callback for station and hotspot connection, disconnection, or scan.

-

HotspotConfig

-

Represents the hotspot configuration.

-

WifiLinkedInfo

-

Represents the Wi-Fi connection information.

-

WifiScanInfo

-

Represents the Wi-Fi scan result information.

-
- -## Macros - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

WIFI_MAX_CONFIG_SIZE   10

-

Indicates the maximum number of Wi-Fi station configurations that can be added using AddDeviceConfig.

-

WIFI_CONFIG_INVALID   (-1)

-

Indicates the value of networkId when the configuration file is unavailable.

-

WIFI_MAX_SSID_LEN   33

-

Indicates the maximum length of a Wi-Fi SSID.

-

WIFI_MAX_KEY_LEN   65

-

Indicates the maximum length of a Wi-Fi key.

-

WIFI_MAC_LEN   6

-

Indicates the maximum length of a Wi-Fi MAC address or a Wi-Fi BSSID.

-

WIFI_PSK_LEN   32

-

Indicates the maximum length of a Wi-Fi PSK.

-

WIFI_STA_ACTIVE   1

-

Indicates that the Wi-Fi station mode is enabled.

-

WIFI_STA_NOT_ACTIVE   0

-

Indicates that the Wi-Fi station mode is disabled.

-

WIFI_HOTSPOT_ACTIVE   1

-

Indicates that the Wi-Fi hotspot mode is enabled.

-

WIFI_HOTSPOT_NOT_ACTIVE   0

-

Indicates that the Wi-Fi hotspot mode is disabled.

-

WIFI_MAX_EVENT_SIZE   10

-

Indicates the maximum number of event listeners that can be registered using RegisterWifiEvent.

-

HOTSPOT_DEFAULT_CHANNEL    6

-

Defines the default channel of the hotspot mode.

-

WIFI_MAX_STA_NUM    6

-

Defines the maximum number of stations connected to a hotspot.

-

WIFI_SCAN_HOTSPOT_LIMIT    64

-

Indicates the maximum number of hotspots that can be detected in a Wi-Fi scan.

-
- -## Typedefs - - - - - - - - - - -

Typedef Name

-

Description

-

WifiDeviceConfig

-

typedef struct WifiDeviceConfig 

-

Represents the Wi-Fi station configuration used to connect to a specified Wi-Fi device.

-
- -## Enumerations - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

WifiSecurityType {   WIFI_SEC_TYPE_INVALID = -1, WIFI_SEC_TYPE_OPEN, WIFI_SEC_TYPE_WEP, WIFI_SEC_TYPE_PSK,   WIFI_SEC_TYPE_SAE }

-

Enumerates Wi-Fi security types.

-

WifiPskType { WIFI_PSK_TYPE_ASCII = 0, WIFI_PSK_TYPE_HEX }

-

Enumerates psk encryption types.

-

WifiScanType { WIFI_FREQ_SCAN, WIFI_SSID_SCAN, WIFI_BSSID_SCAN, WIFI_BAND_SCAN }

-

Enumerates Wi-Fi scan types.

-

WifiErrorCode {   WIFI_SUCCESS = 0, ERROR_WIFI_INVALID_ARGS = -1, ERROR_WIFI_CHIP_INVALID = -2, ERROR_WIFI_IFACE_INVALID = -3,   ERROR_WIFI_RTT_CONTROLLER_INVALID = -4, ERROR_WIFI_NOT_SUPPORTED = -5, ERROR_WIFI_NOT_AVAILABLE = -6, ERROR_WIFI_NOT_STARTED = -7,   ERROR_WIFI_BUSY = -8, ERROR_WIFI_UNKNOWN = -9 }

-

Enumerates Wi-Fi error codes.

-

WifiEventState { WIFI_STATE_NOT_AVALIABLE = 0, WIFI_STATE_AVALIABLE }

-

Enumerates states in Wi-Fi events.

-

RssiLevel { RSSI_LEVEL_1 = 1, RSSI_LEVEL_2 = 2, RSSI_LEVEL_3 = 3, RSSI_LEVEL_4 = 4 }

-

Enumerates received signal strength indicator (RSSI) levels.

-

HotspotBandType { HOTSPOT_BAND_TYPE_2G = 1, HOTSPOT_BAND_TYPE_5G = 2 }

-

Enumerates frequency bands supported by the Wi-Fi hotspot mode.

-

WifiConnState { WIFI_DISCONNECTED, WIFI_CONNECTED }

-

Enumerates Wi-Fi connection states.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

EnableWifi (void)

-

WifiErrorCode 

-

Enables the station mode.

-

DisableWifi (void)

-

WifiErrorCode 

-

Disables the station mode.

-

IsWifiActive (void)

-

int 

-

Checks whether the station mode is enabled.

-

Scan (void)

-

WifiErrorCode 

-

Starts a Wi-Fi scan.

-

GetScanInfoList (WifiScanInfo *result, unsigned int *size)

-

WifiErrorCode 

-

Obtains an array of hotspots detected in a Wi-Fi scan.

-

AddDeviceConfig (const WifiDeviceConfig *config, int *result)

-

WifiErrorCode 

-

Adds a specified hotspot configuration for connecting to a hotspot.

-

GetDeviceConfigs (WifiDeviceConfig *result, unsigned int *size)

-

WifiErrorCode 

-

Obtains all hotspot configurations.

-

RemoveDevice (int networkId)

-

WifiErrorCode 

-

Removes a hotspot configuration matching a specified networkId.

-

ConnectTo (int networkId)

-

WifiErrorCode 

-

Connects to a hotspot matching a specified networkId.

-

Disconnect (void)

-

WifiErrorCode 

-

Disconnects this Wi-Fi connection.

-

GetLinkedInfo (WifiLinkedInfo *result)

-

WifiErrorCode 

-

Obtains information about the connected hotspot.

-

RegisterWifiEvent (WifiEvent *event)

-

WifiErrorCode 

-

Registers a callback for a specified Wi-Fi event.

-

UnRegisterWifiEvent (const WifiEvent *event)

-

WifiErrorCode 

-

Unregisters a callback previously registered for a specified Wi-Fi event.

-

GetDeviceMacAddress (unsigned char *result)

-

WifiErrorCode 

-

Obtains the MAC address of this device.

-

AdvanceScan (WifiScanParams *params)

-

WifiErrorCode 

-

Starts a Wi-Fi scan based on a specified parameter.

-

EnableHotspot (void)

-

WifiErrorCode 

-

Enables the hotspot mode.

-

DisableHotspot (void)

-

WifiErrorCode 

-

Disables the hotspot mode.

-

SetHotspotConfig (const HotspotConfig *config)

-

WifiErrorCode 

-

Sets a specified hotspot configuration.

-

GetHotspotConfig (HotspotConfig *result)

-

WifiErrorCode 

-

Obtains a specified hotspot configuration.

-

IsHotspotActive (void)

-

int 

-

Checks whether the hotspot mode is enabled.

-

GetStationList (StationInfo *result, unsigned int *size)

-

WifiErrorCode 

-

Obtains an array of stations connected to this hotspot.

-

GetSignalLevel (int rssi, int band)

-

int 

-

Obtains the signal level indicated by a specified received signal strength indicator (RSSI) and frequency band.

-

SetBand (int band)

-

WifiErrorCode 

-

Sets the frequency band for this hotspot.

-

GetBand (int *result)

-

WifiErrorCode 

-

Obtains the frequency band of this hotspot.

-
- -## **Details** - -## **Macro Definition Documentation** - -## WIFI\_CONFIG\_INVALID - -``` -#define WIFI_CONFIG_INVALID   (-1) -``` - - **Description:** - -Indicates the value of **networkId** when the configuration file is unavailable. - -Generally, the configuration file is unavailable because the configuration matching the **networkId** is uninitialized. - -## WIFI\_HOTSPOT\_ACTIVE - -``` -#define WIFI_HOTSPOT_ACTIVE   1 -``` - - **Description:** - -Indicates that the Wi-Fi hotspot mode is enabled. - -## WIFI\_HOTSPOT\_NOT\_ACTIVE - -``` -#define WIFI_HOTSPOT_NOT_ACTIVE   0 -``` - - **Description:** - -Indicates that the Wi-Fi hotspot mode is disabled. - -## WIFI\_MAC\_LEN - -``` -#define WIFI_MAC_LEN   6 -``` - - **Description:** - -Indicates the maximum length of a Wi-Fi MAC address or a Wi-Fi BSSID. - -## WIFI\_MAX\_CONFIG\_SIZE - -``` -#define WIFI_MAX_CONFIG_SIZE   10 -``` - - **Description:** - -Indicates the maximum number of Wi-Fi station configurations that can be added using [AddDeviceConfig](Wifiservice.md#gaa0a50013ff978d6f82c655403946d8c9). - -If the maximum number is reached, an error will be returned. In this case, you must delete at least one configuration before you can add new ones. - -## WIFI\_MAX\_EVENT\_SIZE - -``` -#define WIFI_MAX_EVENT_SIZE   10 -``` - - **Description:** - -Indicates the maximum number of event listeners that can be registered using [RegisterWifiEvent](Wifiservice.md#ga0e4d452915d1588664b91837b821eada). - -When the maximum number is reached, you need to unregister at least one listener before registering new ones. - -## WIFI\_MAX\_KEY\_LEN - -``` -#define WIFI_MAX_KEY_LEN   65 -``` - - **Description:** - -Indicates the maximum length of a Wi-Fi key. - -The maximum length is 64, and the last bit is reserved and set to **\\0**. - -## WIFI\_MAX\_SSID\_LEN - -``` -#define WIFI_MAX_SSID_LEN   33 -``` - - **Description:** - -Indicates the maximum length of a Wi-Fi SSID. - -The maximum length is 32, and the last bit is reserved and set to **\\0**. - -## WIFI\_PSK\_LEN - -``` -#define WIFI_PSK_LEN   32 -``` - - **Description:** - -Indicates the maximum length of a Wi-Fi PSK. - -## WIFI\_STA\_ACTIVE - -``` -#define WIFI_STA_ACTIVE   1 -``` - - **Description:** - -Indicates that the Wi-Fi station mode is enabled. - -## WIFI\_STA\_NOT\_ACTIVE - -``` -#define WIFI_STA_NOT_ACTIVE   0 -``` - - **Description:** - -Indicates that the Wi-Fi station mode is disabled. - -## **Typedef Documentation** - -## WifiDeviceConfig - -``` -typedef struct [WifiDeviceConfig](WifiDeviceConfig.md) [WifiDeviceConfig](WifiDeviceConfig.md) -``` - - **Description:** - -Represents the Wi-Fi station configuration used to connect to a specified Wi-Fi device. - -## **Enumeration Type Documentation** - -## HotspotBandType - -``` -enum [HotspotBandType](Wifiservice.md#ga37e10532da87571ee89193beac42d246) -``` - - **Description:** - -Enumerates frequency bands supported by the Wi-Fi hotspot mode. - - - - - - - - - - - - - -

Enumerator

-

Description

-
HOTSPOT_BAND_TYPE_2G 

2.4 GHz

-
HOTSPOT_BAND_TYPE_5G 

5 GHz

-
- -## RssiLevel - -``` -enum [RssiLevel](Wifiservice.md#gadb1b12fe6311711103e759aac7a470d4) -``` - - **Description:** - -Enumerates received signal strength indicator \(RSSI\) levels. - -Four RSSI levels are available: 1 to 4. The higher the RSSI level, the stronger the Wi-Fi signal. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
RSSI_LEVEL_1 

Level 1. The RSSI value for a 2.4 GHz hotspot ranges from -88 (included) to -82 (excluded), and that for a 5 GHz hotspot ranges from -85 (included) to -79 (excluded).

-
RSSI_LEVEL_2 

Level 2. The RSSI value for a 2.4 GHz hotspot ranges from -82 (included) to -75 (excluded), and that for a 5 GHz hotspot ranges from -79 (included) to -72 (excluded).

-
RSSI_LEVEL_3 

Level 3. The RSSI value for a 2.4 GHz hotspot ranges from -75 (included) to -65 (excluded), and that for a 5 GHz hotspot ranges from -72 (included) to -65 (excluded).

-
RSSI_LEVEL_4 

Level 4. The RSSI value for a 2.4 GHz or 5 GHz hotspot is greater than or equal to -65.

-
- -## WifiConnState - -``` -enum [WifiConnState](Wifiservice.md#ga970b7d5373775b1c7f3b31074bae50e1) -``` - - **Description:** - -Enumerates Wi-Fi connection states. - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_DISCONNECTED 

Disconnected

-
WIFI_CONNECTED 

Connected

-
- -## WifiErrorCode - -``` -enum [WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) -``` - - **Description:** - -Enumerates Wi-Fi error codes. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_SUCCESS 

No errors.

-
ERROR_WIFI_INVALID_ARGS 

Invalid parameters

-
ERROR_WIFI_CHIP_INVALID 

Invalid chip

-
ERROR_WIFI_IFACE_INVALID 

Invalid Wi-Fi interface

-
ERROR_WIFI_RTT_CONTROLLER_INVALID 

Invalid RTT controller

-
ERROR_WIFI_NOT_SUPPORTED 

Wi-Fi not supported by the current version or device

-
ERROR_WIFI_NOT_AVAILABLE 

Wi-Fi unavailable

-
ERROR_WIFI_NOT_STARTED 

Wi-Fi not initialized or started

-
ERROR_WIFI_BUSY 

System busy

-
ERROR_WIFI_UNKNOWN 

Unknown error

-
- -## WifiEventState - -``` -enum [WifiEventState](Wifiservice.md#ga6be99f93ce0d2d222c1f5f0a8217354d) -``` - - **Description:** - -Enumerates states in Wi-Fi events. - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_STATE_NOT_AVALIABLE 

Unavailable state

-
WIFI_STATE_AVALIABLE 

Available state

-
- -## WifiPskType - -``` -enum [WifiPskType](Wifiservice.md#gaa1a44d23b8478232f14d2adfc82cee77) -``` - - **Description:** - -Enumerates psk encryption types. - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_PSK_TYPE_ASCII 

Indicates that the ascii type of psk encryption type

-
WIFI_PSK_TYPE_HEX 

Indicates that the hex type of psk encryption type

-
- -## WifiScanType - -``` -enum [WifiScanType](Wifiservice.md#ga007bf5e22727debc02cad860e41a60a3) -``` - - **Description:** - -Enumerates Wi-Fi scan types. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_FREQ_SCAN 

A scan based on a specified frequency.

-
WIFI_SSID_SCAN 

A scan based on a specified SSID.

-
WIFI_BSSID_SCAN 

A scan based on a specified BSSID.

-
WIFI_BAND_SCAN 

A scan based on a specified frequency band.

-
- -## WifiSecurityType - -``` -enum [WifiSecurityType](Wifiservice.md#ga97c133f7db7c1234babcde03c4ce1b05) -``` - - **Description:** - -Enumerates Wi-Fi security types. - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
WIFI_SEC_TYPE_INVALID 

Invalid security type

-
WIFI_SEC_TYPE_OPEN 

Open

-
WIFI_SEC_TYPE_WEP 

Wired Equivalent Privacy (WEP)

-
WIFI_SEC_TYPE_PSK 

Pre-shared key (PSK)

-
WIFI_SEC_TYPE_SAE 

Simultaneous Authentication of Equals (SAE)

-
- -## **Function Documentation** - -## AddDeviceConfig\(\) - -``` -[WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) AddDeviceConfig (const [WifiDeviceConfig](WifiDeviceConfig.md) * config, int * result ) -``` - - **Description:** - -Adds a specified hotspot configuration for connecting to a hotspot. - -This function generates a **networkId**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
configIndicates the hotspot configuration to add.
resultIndicates the generated networkId. Each networkId matches a hotspot configuration.
- -**Returns:** - -Returns [WIFI\_SUCCESS](Wifiservice.md#gga2506c6ad226c4feb1d19248013ff9568ad1c692e09196ec357d0150f1853a758e) if the specified hotspot configuration is added; returns an error code defined in [WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) otherwise. - - - -## AdvanceScan\(\) - -``` -[WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) AdvanceScan ([WifiScanParams](WifiScanParams.md) * params) -``` - - **Description:** - -Starts a Wi-Fi scan based on a specified parameter. - -Only results matching the specified parameter will be returned for the Wi-Fi scan. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
paramsIndicates the pointer to the parameter for starting the Wi-Fi scan. For details, see WifiScanParams.
- -**Returns:** - -Returns [WIFI\_SUCCESS](Wifiservice.md#gga2506c6ad226c4feb1d19248013ff9568ad1c692e09196ec357d0150f1853a758e) if the Wi-Fi scan is started successfully; returns an error code defined in [WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) otherwise. - - - -## ConnectTo\(\) - -``` -[WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) ConnectTo (int networkId) -``` - - **Description:** - -Connects to a hotspot matching a specified **networkId**. - -Before calling this function, call [AddDeviceConfig](Wifiservice.md#gaa0a50013ff978d6f82c655403946d8c9) to add a hotspot configuration. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
networkIdIndicates the networkId matching the target hotspot.
- -**Returns:** - -Returns [WIFI\_SUCCESS](Wifiservice.md#gga2506c6ad226c4feb1d19248013ff9568ad1c692e09196ec357d0150f1853a758e) if the hotspot is connected; returns an error code defined in [WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) otherwise. - - - -## DisableHotspot\(\) - -``` -[WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) DisableHotspot (void ) -``` - - **Description:** - -Disables the hotspot mode. - -**Returns:** - -Returns [WIFI\_SUCCESS](Wifiservice.md#gga2506c6ad226c4feb1d19248013ff9568ad1c692e09196ec357d0150f1853a758e) if the hotspot mode is disabled; returns an error code defined in [WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) otherwise. - - - -## DisableWifi\(\) - -``` -[WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) DisableWifi (void ) -``` - - **Description:** - -Disables the station mode. - -**Returns:** - -Returns [WIFI\_SUCCESS](Wifiservice.md#gga2506c6ad226c4feb1d19248013ff9568ad1c692e09196ec357d0150f1853a758e) if the station mode is disabled; returns an error code defined in [WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) otherwise. - - - -## Disconnect\(\) - -``` -[WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) Disconnect (void ) -``` - - **Description:** - -Disconnects this Wi-Fi connection. - -**Returns:** - -Returns [WIFI\_SUCCESS](Wifiservice.md#gga2506c6ad226c4feb1d19248013ff9568ad1c692e09196ec357d0150f1853a758e) if this Wi-Fi connection is disconnected; returns an error code defined in [WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) otherwise. - - - -## EnableHotspot\(\) - -``` -[WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) EnableHotspot (void ) -``` - - **Description:** - -Enables the hotspot mode. - -Before using this function, you need to invoke [SetHotspotConfig](Wifiservice.md#gafebbb0442cc9334441ff0edc979753ca) and set at least the SSID, security type, and key. - -**Returns:** - -Returns [WIFI\_SUCCESS](Wifiservice.md#gga2506c6ad226c4feb1d19248013ff9568ad1c692e09196ec357d0150f1853a758e) if the hotspot mode is enabled; returns an error code defined in [WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) otherwise. - - - -## EnableWifi\(\) - -``` -[WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) EnableWifi (void ) -``` - - **Description:** - -Enables the station mode. - -**Returns:** - -Returns [WIFI\_SUCCESS](Wifiservice.md#gga2506c6ad226c4feb1d19248013ff9568ad1c692e09196ec357d0150f1853a758e) if the station mode is enabled; returns an error code defined in [WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) otherwise. - - - -## GetBand\(\) - -``` -[WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) GetBand (int * result) -``` - - **Description:** - -Obtains the frequency band of this hotspot. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
resultIndicates the obtained frequency band.
- -**Returns:** - -Returns [WIFI\_SUCCESS](Wifiservice.md#gga2506c6ad226c4feb1d19248013ff9568ad1c692e09196ec357d0150f1853a758e) if the frequency band is obtained; returns an error code defined in [WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) otherwise. - - - -## GetDeviceConfigs\(\) - -``` -[WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) GetDeviceConfigs ([WifiDeviceConfig](WifiDeviceConfig.md) * result, unsigned int * size ) -``` - - **Description:** - -Obtains all hotspot configurations. - -Hotspot configurations were added using [AddDeviceConfig](Wifiservice.md#gaa0a50013ff978d6f82c655403946d8c9). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
resultIndicates the array of all hotspot configurations. The array is requested and released by the caller. The value must be greater than or equal to WIFI_MAX_CONFIG_SIZE.
sizeIndicates the size of the array.
- -**Returns:** - -Returns [WIFI\_SUCCESS](Wifiservice.md#gga2506c6ad226c4feb1d19248013ff9568ad1c692e09196ec357d0150f1853a758e) if all hotspot configurations are obtained; returns an error code defined in [WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) otherwise. - - - -## GetDeviceMacAddress\(\) - -``` -[WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) GetDeviceMacAddress (unsigned char * result) -``` - - **Description:** - -Obtains the MAC address of this device. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
resultIndicates the MAC address of this device. It is a char array whose length is 6.
- -**Returns:** - -Returns [WIFI\_SUCCESS](Wifiservice.md#gga2506c6ad226c4feb1d19248013ff9568ad1c692e09196ec357d0150f1853a758e) if the MAC address of this device is obtained; returns an error code defined in [WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) otherwise. - - - -## GetHotspotConfig\(\) - -``` -[WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) GetHotspotConfig ([HotspotConfig](HotspotConfig.md) * result) -``` - - **Description:** - -Obtains a specified hotspot configuration. - -The hotspot configuration includes the SSID, security type, and key. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
resultIndicates the obtained hotspot configuration.
- -**Returns:** - -Returns [WIFI\_SUCCESS](Wifiservice.md#gga2506c6ad226c4feb1d19248013ff9568ad1c692e09196ec357d0150f1853a758e) if the hotspot configuration is obtained; returns an error code defined in [WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) otherwise. - - - -## GetLinkedInfo\(\) - -``` -[WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) GetLinkedInfo ([WifiLinkedInfo](WifiLinkedInfo.md) * result) -``` - - **Description:** - -Obtains information about the connected hotspot. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
resultIndicates the information about the connected hotspot.
- -**Returns:** - -Returns [WIFI\_SUCCESS](Wifiservice.md#gga2506c6ad226c4feb1d19248013ff9568ad1c692e09196ec357d0150f1853a758e) if the information about the connected hotspot is obtained; returns an error code defined in [WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) otherwise. - - - -## GetScanInfoList\(\) - -``` -[WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) GetScanInfoList ([WifiScanInfo](WifiScanInfo.md) * result, unsigned int * size ) -``` - - **Description:** - -Obtains an array of hotspots detected in a Wi-Fi scan. - -The array of hotspots can be obtained only after the Wi-Fi scan is complete. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
resultIndicates the array of hotspots detected in a Wi-Fi scan. The array is requested and released by the caller. The value must be greater than or equal to WIFI_SCAN_HOTSPOT_LIMIT.
sizeIndicates the size of the array.
- -**Returns:** - -Returns [WIFI\_SUCCESS](Wifiservice.md#gga2506c6ad226c4feb1d19248013ff9568ad1c692e09196ec357d0150f1853a758e) if the array of hotspots detected in the Wi-Fi scan is obtained; returns an error code defined in [WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) otherwise. - - - -## GetSignalLevel\(\) - -``` -int GetSignalLevel (int rssi, int band ) -``` - - **Description:** - -Obtains the signal level indicated by a specified received signal strength indicator \(RSSI\) and frequency band. - -Based on the signal level, you can display the signal strength represented by the number of signal bars. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
rssiIndicates the RSSI.
bandIndicates the frequency band, either HOTSPOT_BAND_TYPE_5G or HOTSPOT_BAND_TYPE_2G.
- -**Returns:** - -Returns the signal level if it is obtained; returns **-1** otherwise. - - - -## GetStationList\(\) - -``` -[WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) GetStationList ([StationInfo](StationInfo.md) * result, unsigned int * size ) -``` - - **Description:** - -Obtains an array of stations connected to this hotspot. - -The station information is defined in [StationInfo](StationInfo.md). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
resultIndicates the array of stations connected to this hotspot. The array is requested and released by the caller. The value must be greater than or equal to WIFI_MAX_STA_NUM.
sizeIndicates the size of the array.
- -**Returns:** - -Returns [WIFI\_SUCCESS](Wifiservice.md#gga2506c6ad226c4feb1d19248013ff9568ad1c692e09196ec357d0150f1853a758e) if the array of stations connected to this hotspot is obtained; returns an error code defined in [WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) otherwise. - - - -## IsHotspotActive\(\) - -``` -int IsHotspotActive (void ) -``` - - **Description:** - -Checks whether the hotspot mode is enabled. - -**Returns:** - -Returns [WIFI\_HOTSPOT\_ACTIVE](Wifiservice.md#gabf45f5779e5e04c8204db6a0d206af11) if the hotspot mode is enabled; returns [WIFI\_HOTSPOT\_NOT\_ACTIVE](Wifiservice.md#ga7dd021b8f69312a304632fd1d0244f02) otherwise. - - - -## IsWifiActive\(\) - -``` -int IsWifiActive (void ) -``` - - **Description:** - -Checks whether the station mode is enabled. - -**Returns:** - -Returns [WIFI\_STA\_ACTIVE](Wifiservice.md#ga9f956732e8e8da52eb25a84a7c42e2bb) if the station mode is enabled; returns [WIFI\_STA\_NOT\_ACTIVE](Wifiservice.md#gaf26289b0fe6ef5ae86395c0556187cf8) otherwise. - - - -## RegisterWifiEvent\(\) - -``` -[WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) RegisterWifiEvent ([WifiEvent](WifiEvent.md) * event) -``` - - **Description:** - -Registers a callback for a specified Wi-Fi event. - -The registered callback will be invoked when the Wi-Fi event defined in [WifiEvent](WifiEvent.md) occurs. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
eventIndicates the event for which the callback is to be registered.
- -**Returns:** - -Returns [WIFI\_SUCCESS](Wifiservice.md#gga2506c6ad226c4feb1d19248013ff9568ad1c692e09196ec357d0150f1853a758e) if the callback is registered successfully; returns an error code defined in [WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) otherwise. - - - -## RemoveDevice\(\) - -``` -[WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) RemoveDevice (int networkId) -``` - - **Description:** - -Removes a hotspot configuration matching a specified **networkId**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
networkIdIndicates the networkId matching the hotspot configuration to remove.
- -**Returns:** - -Returns [WIFI\_SUCCESS](Wifiservice.md#gga2506c6ad226c4feb1d19248013ff9568ad1c692e09196ec357d0150f1853a758e) if the hotspot configuration is removed; returns an error code defined in [WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) otherwise. - - - -## Scan\(\) - -``` -[WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) Scan (void ) -``` - - **Description:** - -Starts a Wi-Fi scan. - -**Returns:** - -Returns [WIFI\_SUCCESS](Wifiservice.md#gga2506c6ad226c4feb1d19248013ff9568ad1c692e09196ec357d0150f1853a758e) if the Wi-Fi scan is started; returns an error code defined in [WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) otherwise. - - - -## SetBand\(\) - -``` -[WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) SetBand (int band) -``` - - **Description:** - -Sets the frequency band for this hotspot. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
bandIndicates the frequency band to set.
- -**Returns:** - -Returns [WIFI\_SUCCESS](Wifiservice.md#gga2506c6ad226c4feb1d19248013ff9568ad1c692e09196ec357d0150f1853a758e) if the frequency band is set; returns an error code defined in [WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) otherwise. - - - -## SetHotspotConfig\(\) - -``` -[WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) SetHotspotConfig (const [HotspotConfig](HotspotConfig.md) * config) -``` - - **Description:** - -Sets a specified hotspot configuration. - -The hotspot configuration includes the SSID, security type, and key. The configuration set overwrites the existing configuration and takes effect after the hotspot mode is re-enabled. Before enabling the hotspot mode for the first time, you must call this function. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
configIndicates the hotspot configuration to set.
- -**Returns:** - -Returns [WIFI\_SUCCESS](Wifiservice.md#gga2506c6ad226c4feb1d19248013ff9568ad1c692e09196ec357d0150f1853a758e) if the hotspot configuration is set; returns an error code defined in [WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) otherwise. - - - -## UnRegisterWifiEvent\(\) - -``` -[WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) UnRegisterWifiEvent (const [WifiEvent](WifiEvent.md) * event) -``` - - **Description:** - -Unregisters a callback previously registered for a specified Wi-Fi event. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
eventIndicates the event for which the callback is to be unregistered.
- -**Returns:** - -Returns [WIFI\_SUCCESS](Wifiservice.md#gga2506c6ad226c4feb1d19248013ff9568ad1c692e09196ec357d0150f1853a758e) if the callback is unregistered successfully; returns an error code defined in [WifiErrorCode](Wifiservice.md#ga2506c6ad226c4feb1d19248013ff9568) otherwise. - - - diff --git a/api/api-LinkIoT/common-h.md b/api/api-LinkIoT/common-h.md deleted file mode 100755 index d66c686abd5f53184cc36ca0d7a71288763fe36a..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/common-h.md +++ /dev/null @@ -1,142 +0,0 @@ -# common.h - -## **Overview** - -**Related Modules:** - -[Samgr](Samgr.md) - -**Description:** - -Provides common objects and functions for Samgr and external modules. - -This file provides simplified vector containers and downcast functions. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

SimpleVector

-

Defines the simplified vector class, which is extended by four elements.

-
- -## Macros - - - - - - - - - - -

Macro Name and Value

-

Description

-

GET_OFFSIZE(T, member)   (long)((char *)&(((T *)(0))->member))

-

Calculates the offset of the member in the T type.

-
- -## Typedefs - - - - - - - - - - -

Typedef Name

-

Description

-

Vector

-

typedef struct SimpleVector 

-

Defines the simplified vector class, which is extended by four elements.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

VECTOR_Make (VECTOR_Key key, VECTOR_Compare compare)

-

Vector 

-

Creates or initializes a vector object.

-

VECTOR_Clear (Vector *vector)

-

void 

-

Destruct a vector object.

-

VECTOR_Add (Vector *vector, void *element)

-

int16 

-

Adds an element to the vector.

-

VECTOR_Size (Vector *vector)

-

int16 

-

Obtains the number of elements in the vector, including elements that have been set to NULL.

-

VECTOR_Num (Vector *vector)

-

int16 

-

Obtains the number of valid elements in the vector, excluding elements that have been set to NULL.

-

VECTOR_At (Vector *vector, int16 index)

-

void * 

-

Obtains the element at a specified position.

-

VECTOR_Swap (Vector *vector, int16 index, void *element)

-

void * 

-

Swaps the element at a specified position in a vector with another element.

-

VECTOR_Find (Vector *vector, const void *element)

-

int16 

-

Checks the position of an element.

-

VECTOR_FindByKey (Vector *vector, const void *key)

-

int16 

-

Checks the position of the element with a specified key.

-
- diff --git a/api/api-LinkIoT/discovery_service-h.md b/api/api-LinkIoT/discovery_service-h.md deleted file mode 100755 index ed2bf4fe6ae80d68d4a4612b1475e9a44ac3ec78..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/discovery_service-h.md +++ /dev/null @@ -1,174 +0,0 @@ -# discovery\_service.h - -## **Overview** - -**Related Modules:** - -[Softbus](Softbus.md) - -**Description:** - -Declares unified device service publishing interfaces. - -This file provides capabilities related to device service publishing, including publishing services, unpublishing services, and setting device parameters. After multiple nearby devices are discovered and networked, these interfaces can be used to perform service publishing-related operations. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

PublishInfo

-

Defines service provisioning information sent to a discovering device.

-

CapabilityMap

-

Defines the mapping between supported capabilities and bitmaps.

-

DeviceMap

-

Defines the mappings between the device type enumerations and device type names.

-

IPublishCallback

-

Defines the callbacks for successful and failed service publishing.

-

CommonDeviceInfo

-

Defines the type and content of a device to set.

-
- -## Typedefs - - - - - - - - - - - - - - - - - - - -

Typedef Name

-

Description

-

PublishInfo

-

typedef struct PublishInfo 

-

Defines service provisioning information sent to a discovering device.

-

DeviceType

-

typedef enum DeviceTypeEnum 

-

Enumerates device types.

-

IPublishCallback

-

typedef struct IPublishCallback 

-

Defines the callbacks for successful and failed service publishing.

-

CommonDeviceInfo

-

typedef struct CommonDeviceInfo 

-

Defines the type and content of a device to set.

-
- -## Enumerations - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

ExchanageMedium { AUTO = 0, BLE = 1, COAP = 2, USB = 3 }

-

Enumerates media, such as Bluetooth, Wi-Fi, and USB, used for publishing services.

-

ExchangeFre { LOW = 0, MID = 1, HIGH = 2, SUPER_HIGH = 3 }

-

Enumerates frequencies for publishing services. This enumeration is involved only in Bluetooth and is not supported currently.

-

DiscoverMode { DISCOVER_MODE_PASSIVE = 0x55, DISCOVER_MODE_ACTIVE = 0xAA }

-

Enumerates the modes in which services are published. The publishing service supports the passive mode. Lite devices support the passive mode only.

-

PublishFailReason { PUBLISH_FAIL_REASON_NOT_SUPPORT_MEDIUM = 1, PUBLISH_FAIL_REASON_PARAMETER_INVALID = 2, PUBLISH_FAIL_REASON_UNKNOWN = 0xFF }

-

Enumerates failure reasons for publishing services.

-

DataBitMap {   HICALL_CAPABILITY_BITMAP = 0, PROFILE_CAPABILITY_BITMAP = 1, HOMEVISIONPIC_CAPABILITY_BITMAP = 2, CASTPLUS_CAPABILITY_BITMAP,   AA_CAPABILITY_BITMAP, DVKIT_CAPABILITY_BITMAP, DDMP_CAPABILITY_BITMAP }

-

Enumerates supported capabilities published by a device.

-

DeviceTypeEnum {   UNKOWN = 0x00, PHONE = 0x0E, PAD = 0x11, TV = 0x9C,   PC = 0x0C, AUDIO = 0x0A, CAR = 0x83, L0 = 0xF1,   L1 = 0xF2 }

-

Enumerates device types.

-

CommonDeviceKey { COMM_DEVICE_KEY_DEVID = 0, COMM_DEVICE_KEY_DEVTYPE = 1, COMM_DEVICE_KEY_DEVNAME = 2, COMM_DEVICE_KEY_MAX }

-

Enumerates device information, such as its ID, type, and name.

-
- -## Functions - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

PublishService (const char *moduleName, const struct PublishInfo *info, const struct IPublishCallback *cb)

-

int 

-

Publishes a service to the discovering device in the LAN.

-

UnPublishService (const char *moduleName, int publishId)

-

int 

-

Unpublishes a service based on the publicId and moduleName.

-

SetCommonDeviceInfo (const struct CommonDeviceInfo *devInfo, unsigned int num)

-

int 

-

Sets common device information, such as its ID, type, and name.

-
- diff --git a/api/api-LinkIoT/feature-h.md b/api/api-LinkIoT/feature-h.md deleted file mode 100755 index aaa97689eb0aa4f77441f17e46c55cf4ccafbf50..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/feature-h.md +++ /dev/null @@ -1,58 +0,0 @@ -# feature.h - -## **Overview** - -**Related Modules:** - -[Samgr](Samgr.md) - -**Description:** - -Defines the base class of a feature. - -This class is used to develop service features. It provides functions for the feature lifecycle of a service. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

Feature

-

Defines the base class of a feature.

-
- -## Macros - - - - - - - - - - -

Macro Name and Value

-

Description

-

INHERIT_FEATURE

-

Inherits from the macro of the feature class.

-
- diff --git a/api/api-LinkIoT/iunknown-h.md b/api/api-LinkIoT/iunknown-h.md deleted file mode 100755 index 3c3cf999504b7bfcb407b677788ebf5a728f6f5d..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/iunknown-h.md +++ /dev/null @@ -1,139 +0,0 @@ -# iunknown.h - -## **Overview** - -**Related Modules:** - -[Samgr](Samgr.md) - -**Description:** - -Provides the base class and default implementation for external functions of system capabilities. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

IUnknown

-

Defines the IUnknown class.

-

IUnknownEntry

-

Defines the IUnknown implementation class.

-
- -## Macros - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

DEFAULT_VERSION   0x20

-

Defines the default IUnknown version. You can customize the version.

-

INHERIT_IUNKNOWN

-

Defines the macro for inheriting the IUnknown interface.

-

INHERIT_IUNKNOWNENTRY(T)

-

Defines the macro for inheriting the classes that implement the IUnknown interface.

-

DEFAULT_IUNKNOWN_IMPL

-

Defines the default marco for initializing the IUnknown interface.

-

IUNKNOWN_ENTRY_BEGIN(version)

-

Defines the macro for initializing the classes that implement the IUnknown interface.

-

IUNKNOWN_ENTRY_END   }

-

IUnknown Defines the end macro for initializing the IUnknown implementation object.

-

GET_IUNKNOWN(T)   (IUnknown *)(&((T).iUnknown))

-

Obtains the pointer of the IUnknown interface object from the subclass object T (generic macro) of the IUnknown implementation class.

-
- -## Typedefs - - - - - - - - - - -

Typedef Name

-

Description

-

IUnknownEntry

-

typedef struct IUnknownEntry 

-

Defines the IUnknown implementation class.

-
- -## Functions - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

IUNKNOWN_AddRef (IUnknown *iUnknown)

-

int 

-

Increments the reference count in this IUnknown interface.

-

IUNKNOWN_QueryInterface (IUnknown *iUnknown, int ver, void **target)

-

int 

-

Queries the IUnknown interfaces of a specified version (downcasting).

-

IUNKNOWN_Release (IUnknown *iUnknown)

-

int 

-

Releases a reference to an IUnknown interface that is no longer used.

-
- diff --git a/api/api-LinkIoT/kal-h.md b/api/api-LinkIoT/kal-h.md deleted file mode 100755 index 27ff2abbbb04732c90fc7dd8fc9667e5a872f333..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/kal-h.md +++ /dev/null @@ -1,161 +0,0 @@ -# kal.h - -## **Overview** - -**Related Modules:** - -[KAL](KAL.md) - -**Description:** - -Defines the kernel adaptation layer \(KAL\), which provides compatible interfaces across different types of OpenHarmony devices. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

ThreadInfo

-

Describes a thread.

-

MemInfo

-

Describes a memory pool.

-
- -## Macros - - - - - - - - - - -

Macro Name and Value

-

Description

-

KAL_TASK_NAME_LEN 32

-

Indicates the maximum length of a thread name.

-
- -## Enumerations - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

KalTimerType { KAL_TIMER_ONCE = 0, KAL_TIMER_PERIODIC = 1 }

-

Enumerates timer types.

-

KalErrCode { KAL_OK = 0, KAL_ERR_PARA = 1, KAL_ERR_INNER = 2, KAL_ERR_TIMER_STATE = 0x100 }

-

Enumerates return values of the KAL function.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

KalThreadGetInfo (unsigned int threadId, ThreadInfo *info)

-

unsigned int

-

Obtains thread information.

-

KalDelayUs (unsigned int us)

-

void

-

Delays a thread.

-

KalTimerCreate (KalTimerProc func, KalTimerType type, void *arg, unsigned int ticks)

-

KalTimerId

-

Creates a timer.

-

KalTimerStart (KalTimerId timerId)

-

KalErrCode

-

Starts a timer.

-

KalTimerChange (KalTimerId timerId, unsigned int ticks)

-

KalErrCode

-

Changes the duration of a timer.

-

KalTimerStop (KalTimerId timerId)

-

KalErrCode

-

Stops a timer.

-

KalTimerDelete (KalTimerId timerId)

-

KalErrCode

-

Deletes a timer.

-

KalTimerIsRunning (KalTimerId timerId)

-

unsigned int

-

Checks whether a timer is running.

-

KalTickToMs (unsigned int ticks)

-

unsigned int

-

Converts system ticks into milliseconds.

-

KalMsToTick (unsigned int millisec)

-

unsigned int

-

Converts milliseconds into system ticks.

-

KalGetMemInfo (MemInfo *pmemInfo)

-

KalErrCode

-

Obtains memory information.

-
- diff --git a/api/api-LinkIoT/kv_store-h.md b/api/api-LinkIoT/kv_store-h.md deleted file mode 100755 index 6b88f7c799d1848356d8d76c53b88d7db54a9b5f..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/kv_store-h.md +++ /dev/null @@ -1,58 +0,0 @@ -# kv\_store.h - -## **Overview** - -**Related Modules:** - -[Kv\_store](Kv_store.md) - -**Description:** - -Provides functions for obtaining, setting, and deleting a key-value pair. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Functions - - - - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

UtilsGetValue (const char *key, char *value, unsigned int len)

-

int 

-

Obtains the value matching a specified key from the file system or cache.

-

UtilsSetValue (const char *key, const char *value)

-

int 

-

Adds or updates the value matching a specified key in the file system or cache.

-

UtilsDeleteValue (const char *key)

-

int 

-

Deletes the value matching a specified key from the file system or cache.

-

ClearKVCache (void)

-

int 

-

Clears all key-value pairs from the cache.

-
- diff --git a/api/api-LinkIoT/lowpower-h.md b/api/api-LinkIoT/lowpower-h.md deleted file mode 100755 index 313f80c06facecf12cb7169a1ebf2be37e03552a..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/lowpower-h.md +++ /dev/null @@ -1,63 +0,0 @@ -# lowpower.h - -## **Overview** - -**Related Modules:** - -[Power](Power.md) - -**Description:** - -Sets low power consumption for the device. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Enumerations - - - - - - - - - - -

Enumeration Name

-

Description

-

LpcType { NO_SLEEP, LIGHT_SLEEP, DEEP_SLEEP }

-

Enumerates low power consumption modes.

-
- -## Functions - - - - - - - - - - - - - -

Function Name

-

Description

-

LpcInit (void)

-

unsigned int 

-

Initializes low power consumption.

-

LpcSetType (LpcType type)

-

unsigned int 

-

Sets low power consumption for the device.

-
- diff --git a/api/api-LinkIoT/message-h.md b/api/api-LinkIoT/message-h.md deleted file mode 100755 index 597b89729fa733753ab0eec461986e6f2e231906..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/message-h.md +++ /dev/null @@ -1,111 +0,0 @@ -# message.h - -## **Overview** - -**Related Modules:** - -[Samgr](Samgr.md) - -**Description:** - -Provides message communication APIs that help you to implement asynchronous functions of [IUnknown](IUnknown.md). - -This API is used to implement asynchronous functions of [IUnknown](IUnknown.md). - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

Identity

-

Identifies a service and feature.

-

Request

-

Defines a request.

-

Response

-

Defines a response.

-
- -## Typedefs - - - - - - - - - - -

Typedef Name

-

Description

-

Handler) (const Request *request, const Response *response)

-

typedef void(* 

-

Handles asynchronous responses.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

SAMGR_SendRequest (const Identity *identity, const Request *request, Handler handler)

-

int32 

-

Sends a request to a service or feature of a specified identity.

-

SAMGR_SendSharedRequest (const Identity *identity, const Request *request, uint32 *token, Handler handler)

-

uint32 * 

-

Sends a request to multiple services or features to save memory.

-

SAMGR_SendSharedDirectRequest (const Identity *id, const Request *req, const Response *resp, uint32 **ref, Handler handler)

-

int32 

-

Sends a request and response of a caller to the feature thread. The handler is directly called to process the request and response without using the message processing functions. (Customized function for the broadcast service)

-

SAMGR_SendResponse (const Request *request, const Response *response)

-

int32 

-

Sends a response after processing a request.

-

SAMGR_SendResponseByIdentity (const Identity *id, const Request *request, const Response *response)

-

int32 

-

Sends a response to a specified service or feature after processing the original request. (Customized function for bootstrap)

-
- diff --git a/api/api-LinkIoT/ohos_init-h.md b/api/api-LinkIoT/ohos_init-h.md deleted file mode 100755 index fe830a56989d3e3f2f9aaf2eac403318edf94bb9..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/ohos_init-h.md +++ /dev/null @@ -1,116 +0,0 @@ -# ohos\_init.h - -## **Overview** - -**Related Modules:** - -[OHOS Init](OHOS-Init.md) - -**Description:** - -Provides the entries for initializing and starting services and features. - -This file provides the entries for initializing services and features during service development. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Macros - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

CORE_INIT(func)   LAYER_INITCALL_DEF(func, core, "core")

-

Identifies the entry for initializing and starting a core phase by the priority 2.

-

CORE_INIT_PRI(func, priority)   LAYER_INITCALL(func, core, "core", priority)

-

Identifies the entry for initializing and starting a core phase by the specified priority.

-

SYS_SERVICE_INIT(func)   LAYER_INITCALL_DEF(func, sys_service, "sys.service")

-

Identifies the entry for initializing and starting a core system service by the priority 2.

-

SYS_SERVICE_INIT_PRI(func, priority)   LAYER_INITCALL(func, sys_service, "sys.service", priority)

-

Identifies the entry for initializing and starting a core system service by the specified priority.

-

SYS_FEATURE_INIT(func)   LAYER_INITCALL_DEF(func, sys_feature, "sys.feature")

-

Identifies the entry for initializing and starting a core system feature by the priority 2.

-

SYS_FEATURE_INIT_PRI(func, priority)   LAYER_INITCALL(func, sys_feature, "sys.feature", priority)

-

Identifies the entry for initializing and starting a core system feature by the specified priority.

-

SYS_RUN(func)   LAYER_INITCALL_DEF(func, run, "run")

-

Identifies the entry for initializing and starting a system running phase by the priority 2.

-

SYS_RUN_PRI(func, priority)   LAYER_INITCALL(func, run, "run", priority)

-

Identifies the entry for initializing and starting a system running phase by the specified priority.

-

SYSEX_SERVICE_INIT(func)   LAYER_INITCALL_DEF(func, app_service, "app.service")

-

Identifies the entry for initializing and starting a system service by the priority 2.

-

SYSEX_SERVICE_INIT_PRI(func, priority)   LAYER_INITCALL(func, app_service, "app.service", priority)

-

Identifies the entry for initializing and starting a system service by the specified priority.

-

SYSEX_FEATURE_INIT(func)   LAYER_INITCALL_DEF(func, app_feature, "app.feature")

-

Identifies the entry for initializing and starting a system feature by the priority 2.

-

SYSEX_FEATURE_INIT_PRI(func, priority)   LAYER_INITCALL(func, app_feature, "app.feature", priority)

-

Identifies the entry for initializing and starting a system feature by the specified priority.

-

APP_SERVICE_INIT(func)   LAYER_INITCALL_DEF(func, app_service, "app.service")

-

Identifies the entry for initializing and starting an application-layer service by the priority 2.

-

APP_SERVICE_INIT_PRI(func, priority)   LAYER_INITCALL(func, app_service, "app.service", priority)

-

Identifies the entry for initializing and starting an application-layer service by the specified priority.

-

APP_FEATURE_INIT(func)   LAYER_INITCALL_DEF(func, app_feature, "app.feature")

-

Identifies the entry for initializing and starting an application-layer feature by the priority 2.

-

APP_FEATURE_INIT_PRI(func, priority)   LAYER_INITCALL(func, app_feature, "app.feature", priority)

-

Identifies the entry for initializing and starting an application-layer feature by the specified priority.

-
- diff --git a/api/api-LinkIoT/osEventFlagsAttr_t.md b/api/api-LinkIoT/osEventFlagsAttr_t.md deleted file mode 100755 index a24e15b13cc2fccafead324ce37b7460cc798fbb..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/osEventFlagsAttr_t.md +++ /dev/null @@ -1,54 +0,0 @@ -# osEventFlagsAttr\_t - -## **Overview** - -**Related Modules:** - -[CMSIS](zh-cn_topic_0000001055075063.md) - -**Description:** - -Describes event attributes. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

name

-

const char * 

-

attr_bits

-

uint32_t 

-

cb_mem

-

void * 

-

cb_size

-

uint32_t 

-
- diff --git a/api/api-LinkIoT/osMessageQueueAttr_t.md b/api/api-LinkIoT/osMessageQueueAttr_t.md deleted file mode 100755 index 5bf2bc42c952e330c41082385ffd28d6b0621131..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/osMessageQueueAttr_t.md +++ /dev/null @@ -1,64 +0,0 @@ -# osMessageQueueAttr\_t - -## **Overview** - -**Related Modules:** - -[CMSIS](zh-cn_topic_0000001055075063.md) - -**Description:** - -Describes message queue attributes. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

name

-

const char * 

-

attr_bits

-

uint32_t 

-

cb_mem

-

void * 

-

cb_size

-

uint32_t 

-

mq_mem

-

void * 

-

mq_size

-

uint32_t 

-
- diff --git a/api/api-LinkIoT/osMutexAttr_t.md b/api/api-LinkIoT/osMutexAttr_t.md deleted file mode 100755 index 0b0d5ca94a330faad3756d606ba76164c8c99db8..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/osMutexAttr_t.md +++ /dev/null @@ -1,54 +0,0 @@ -# osMutexAttr\_t - -## **Overview** - -**Related Modules:** - -[CMSIS](zh-cn_topic_0000001055075063.md) - -**Description:** - -Describes mutex attributes. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

name

-

const char * 

-

attr_bits

-

uint32_t 

-

cb_mem

-

void * 

-

cb_size

-

uint32_t 

-
- diff --git a/api/api-LinkIoT/osSemaphoreAttr_t.md b/api/api-LinkIoT/osSemaphoreAttr_t.md deleted file mode 100755 index fa4f5456aa7e5f1cec631d42b53f88b7f743bc47..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/osSemaphoreAttr_t.md +++ /dev/null @@ -1,54 +0,0 @@ -# osSemaphoreAttr\_t - -## **Overview** - -**Related Modules:** - -[CMSIS](zh-cn_topic_0000001055075063.md) - -**Description:** - -Describes semaphore attributes. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

name

-

const char * 

-

attr_bits

-

uint32_t 

-

cb_mem

-

void * 

-

cb_size

-

uint32_t 

-
- diff --git a/api/api-LinkIoT/osThreadAttr_t.md b/api/api-LinkIoT/osThreadAttr_t.md deleted file mode 100755 index db87dad875a4d7c40b8d7c5e1a8c88f4d872430f..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/osThreadAttr_t.md +++ /dev/null @@ -1,79 +0,0 @@ -# osThreadAttr\_t - -## **Overview** - -**Related Modules:** - -[CMSIS](zh-cn_topic_0000001055075063.md) - -**Description:** - -Describes thread attributes. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

name

-

const char * 

-

attr_bits

-

uint32_t 

-

cb_mem

-

void * 

-

cb_size

-

uint32_t 

-

stack_mem

-

void * 

-

stack_size

-

uint32_t 

-

priority

-

osPriority_t 

-

tz_module

-

TZ_ModuleId_t 

-

reserved

-

uint32_t 

-
- diff --git a/api/api-LinkIoT/osTimerAttr_t.md b/api/api-LinkIoT/osTimerAttr_t.md deleted file mode 100755 index 4bc8f45d8bbea816959100d8fac6fff0819426c6..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/osTimerAttr_t.md +++ /dev/null @@ -1,54 +0,0 @@ -# osTimerAttr\_t - -## **Overview** - -**Related Modules:** - -[CMSIS](zh-cn_topic_0000001055075063.md) - -**Description:** - -Describes timer attributes. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

name

-

const char * 

-

attr_bits

-

uint32_t 

-

cb_mem

-

void * 

-

cb_size

-

uint32_t 

-
- diff --git a/api/api-LinkIoT/osVersion_t.md b/api/api-LinkIoT/osVersion_t.md deleted file mode 100755 index dd65193f4d21b818ff13c7a8c6fe1bb62955f06c..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/osVersion_t.md +++ /dev/null @@ -1,44 +0,0 @@ -# osVersion\_t - -## **Overview** - -**Related Modules:** - -[CMSIS](zh-cn_topic_0000001055075063.md) - -**Description:** - -Describes the system version. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

api

-

uint32_t 

-

kernel

-

uint32_t 

-
- diff --git a/api/api-LinkIoT/parameter-h.md b/api/api-LinkIoT/parameter-h.md deleted file mode 100755 index 908f80f0c9c29dc9926a63c1252eac71f8ae2747..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/parameter-h.md +++ /dev/null @@ -1,192 +0,0 @@ -# parameter.h - -## **Overview** - -**Related Modules:** - -[Parameter](Parameter.md) - -**Description:** - -Declares functions for obtaining system parameters. - -You can use the provided functions to obtain device information such as device type and manufacturer. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

GetParameter (const char *key, const char *def, char *value, unsigned int len)

-

int 

-

Obtains a system parameter matching the specified key.

-

SetParameter (const char *key, const char *value)

-

int 

-

Sets or updates a system parameter.

-

GetProductType (void)

-

char * 

-

Obtains the device type.

-

GetManufacture (void)

-

char * 

-

Obtains the device manufacturer.

-

GetBrand (void)

-

char * 

-

Obtains the device brand.

-

GetMarketName (void)

-

char * 

-

Obtains the device marketing name.

-

GetProductSeries (void)

-

char * 

-

Obtains the device series name.

-

GetProductModel (void)

-

char * 

-

Obtains the device authentication model.

-

GetSoftwareModel (void)

-

char * 

-

Obtains the device software model.

-

GetHardwareModel (void)

-

char * 

-

Obtains the device hardware model.

-

GetHardwareProfile (void)

-

char * 

-

Obtains the device hardware profile.

-

GetSerial (void)

-

char * 

-

Obtains the device serial number (SN).

-

GetOsName (void)

-

char * 

-

Obtains the operating system (OS) name.

-

GetDisplayVersion (void)

-

char * 

-

Obtains the software version visible to users.

-

GetBootloaderVersion (void)

-

char * 

-

Obtains the bootloader version of this device.

-

GetSecurityPatchTag (void)

-

char * 

-

Obtains the security patch tag.

-

GetAbiList (void)

-

char * 

-

Obtains the list of application binary interfaces (ABIs) supported on this device.

-

GetSdkApiLevel (void)

-

char * 

-

Obtains the SDK API level that matches the current system software.

-

GetFirstApiLevel (void)

-

char * 

-

Obtains the first SDK API level of the system software.

-

GetIncrementalVersion (void)

-

char * 

-

Obtains the incremental version.

-

GetVersionId (void)

-

char * 

-

Obtains the version ID.

-

GetBuildType (void)

-

char * 

-

Obtains the build type.

-

GetBuildUser (void)

-

char * 

-

Obtains the build account user name.

-

GetBuildHost (void)

-

char * 

-

Obtains the build host name.

-

GetBuildTime (void)

-

char * 

-

Obtains the version build time.

-

GetBuildRootHash (void)

-

char * 

-

Obtains the buildroot hash value of this version.

-
- diff --git a/api/api-LinkIoT/reset-h.md b/api/api-LinkIoT/reset-h.md deleted file mode 100755 index be85e3ef1ce0e641c20f066cbc75b9f86682779d..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/reset-h.md +++ /dev/null @@ -1,57 +0,0 @@ -# reset.h - -## **Overview** - -**Related Modules:** - -[Power](Power.md) - -**Description:** - -Reboots the device. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Enumerations - - - - - - - - - - -

Enumeration Name

-

Description

-

RebootCause {   SYS_REBOOT_CAUSE_UNKNOWN = 0, SYS_REBOOT_CAUSE_CMD, SYS_REBOOT_CAUSE_UPG, SYS_REBOOT_CAUSE_UPG_B,   SYS_REBOOT_CAUSE_WIFI_MODE, SYS_REBOOT_CAUSE_USR_NORMAL_REBOOT, SYS_REBOOT_CAUSE_USR0, SYS_REBOOT_CAUSE_USR1,   SYS_REBOOT_CAUSE_AT_BUSY, SYS_REBOOT_CAUSE_MAX }

-

Enumerates reboot causes.

-
- -## Functions - - - - - - - - - - -

Function Name

-

Description

-

RebootDevice (RebootCause cause)

-

void 

-

Reboots the device using different causes.

-
- diff --git a/api/api-LinkIoT/samgr_lite-h.md b/api/api-LinkIoT/samgr_lite-h.md deleted file mode 100755 index 53262b66fdd8143672b2a74a9c69181aaeabcae5..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/samgr_lite-h.md +++ /dev/null @@ -1,123 +0,0 @@ -# samgr\_lite.h - -## **Overview** - -**Related Modules:** - -[Samgr](Samgr.md) - -**Description:** - -Manages system capabilities. - -This is used when services, features, and functions are registered with and discovered by Samgr. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

SamgrLite

-

Represents the system ability management class.

-
- -## Macros - - - - - - - - - - -

Macro Name and Value

-

Description

-

BOOTSTRAP_SERVICE   "Bootstrap"

-

Starts a bootstrap service, which is used by samgr and implemented by system service developers.

-
- -## Typedefs - - - - - - - - - - - - - -

Typedef Name

-

Description

-

BootMessage

-

typedef enum BootMessage 

-

Enumerates the IDs of the message to be processed for starting the bootstrap service.

-

SamgrLite

-

typedef struct SamgrLite 

-

Represents the system ability management class.

-
- -## Enumerations - - - - - - - - - - -

Enumeration Name

-

Description

-

BootMessage { BOOT_SYS_COMPLETED, BOOT_APP_COMPLETED, BOOT_REG_SERVICE, BOOTSTRAP_BUTT }

-

Enumerates the IDs of the message to be processed for starting the bootstrap service.

-
- -## Functions - - - - - - - - - - - - - -

Function Name

-

Description

-

SAMGR_GetInstance (void)

-

SamgrLite

-

Obtains the singleton Samgr instance.

-

SAMGR_Bootstrap (void)

-

void 

-

Starts system services and features.

-
- diff --git a/api/api-LinkIoT/service-h.md b/api/api-LinkIoT/service-h.md deleted file mode 100755 index d651ee2d0e6585894a9ba25f322e73748e7ad167..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/service-h.md +++ /dev/null @@ -1,120 +0,0 @@ -# service.h - -## **Overview** - -**Related Modules:** - -[Samgr](Samgr.md) - -**Description:** - -Provides basic types and constants of services. - -This file is mainly used for service development. This file provides basic capabilities such as lifecycle functions of services, inherited macros, and task configuration. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

TaskConfig

-

Defines task configurations for a service.

-

Service

-

Indicates the basic type of a service.

-
- -## Macros - - - - - - - - - - -

Macro Name and Value

-

Description

-

INHERIT_SERVICE

-

Indicates the macro used to inherit the members from the service class.

-
- -## Typedefs - - - - - - - - - - - - - - - - -

Typedef Name

-

Description

-

TaskType

-

typedef enum TaskType 

-

Enumerates task types.

-

SpecifyTag

-

typedef enum SpecifyTag 

-

Specifies the tag for the task shared by multiple services.

-

TaskPriority

-

typedef enum TaskPriority 

-

Enumerates task priority.

-
- -## Enumerations - - - - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

TaskType { SHARED_TASK = 0, SINGLE_TASK = 1, SPECIFIED_TASK = 2, NO_TASK = 0xFF }

-

Enumerates task types.

-

SpecifyTag { LEVEL_HIGH = 0, LEVEL_MIDDLE = 1, LEVEL_LOW = 2, LEVEL_CUSTOM_BEGIN }

-

Specifies the tag for the task shared by multiple services.

-

TaskPriority {   PRI_LOW = 9, PRI_BELOW_NORMAL = 16, PRI_NORMAL = 24, PRI_ABOVE_NORMAL = 32,   PRI_BUTT = 39 }

-

Enumerates task priority.

-
- diff --git a/api/api-LinkIoT/session-h.md b/api/api-LinkIoT/session-h.md deleted file mode 100755 index 340de5e4450b767779fd7f291e79cb86615908da..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/session-h.md +++ /dev/null @@ -1,95 +0,0 @@ -# session.h - -## **Overview** - -**Related Modules:** - -[Softbus](Softbus.md) - -**Description:** - -Declares unified data transmission interfaces. - -This file provides data transmission capabilities, including creating and removing a session server, opening and closing sessions, receiving data, and querying basic session information. After multiple nearby devices are discovered and networked, these interfaces can be used to transmit data across devices. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

ISessionListener

-

Defines session callbacks.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

CreateSessionServer (const char *mouduleName, const char *sessionName, struct ISessionListener *listener)

-

int 

-

Creates a session server based on a module name and session name.

-

RemoveSessionServer (const char *mouduleName, const char *sessionName)

-

int 

-

Removes a session server based on a module name and session name.

-

SendBytes (int sessionId, const void *data, unsigned int len)

-

int 

-

Sends data based on a session ID.

-

GetMySessionName (int sessionId, char *sessionName, unsigned int len)

-

int 

-

Obtains the session name registered by the local device based on the session ID.

-

GetPeerSessionName (int sessionId, char *sessionName, unsigned int len)

-

int 

-

Obtains the session name registered by the peer device based on the session ID.

-

GetPeerDeviceId (int sessionId, char *devId, unsigned int len)

-

int 

-

Obtains the peer device ID based on a session ID.

-

CloseSession (int sessionId)

-

void 

-

Closes a connected session based on a session ID.

-
- diff --git a/api/api-LinkIoT/station_info-h.md b/api/api-LinkIoT/station_info-h.md deleted file mode 100755 index 6e9557a8eb92b1a25e5809da9731ab473833608f..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/station_info-h.md +++ /dev/null @@ -1,41 +0,0 @@ -# station\_info.h - -## **Overview** - -**Related Modules:** - -[Wifiservice](Wifiservice.md) - -**Description:** - -Defines the structure and macro of the station information contained in the event information. - -The station information is passed to **OnHotspotStaJoin** or **OnHotspotStaLeave** invoked when a specified event occurs. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

StationInfo

-

Represents the station information.

-
- diff --git a/api/api-LinkIoT/utils_config-h.md b/api/api-LinkIoT/utils_config-h.md deleted file mode 100755 index 670f01707596d1cb186c2cd0514acbf161e7239a..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/utils_config-h.md +++ /dev/null @@ -1,51 +0,0 @@ -# utils\_config.h - -## **Overview** - -**Related Modules:** - -[Utils\_config](Utils_config.md) - -**Description:** - -Represents the configuration file of the utils subsystem. - -Vendors can set their desired items in the configuration file. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Macros - - - - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

FEATURE_KV_CACHE

-

Specifies whether the KV store supports cache.

-

MAX_CACHE_SIZE   10

-

Indicates the number of data items that can be stored in the KV store cache.

-

MAX_KV_SUM   50

-

Indicates the number of data items that can be stored for each application.

-
- diff --git a/api/api-LinkIoT/utils_file-h.md b/api/api-LinkIoT/utils_file-h.md deleted file mode 100755 index 6073621f771f4b1f8ff35297f2c6c3d9a87d65ca..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/utils_file-h.md +++ /dev/null @@ -1,150 +0,0 @@ -# utils\_file.h - -## **Overview** - -**Related Modules:** - -[Utils\_file](Utils_file.md) - -**Description:** - -Performs operations on a file, including to open, close, write, read, and delete a file. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Macros - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

SEEK_SET_FS   0

-

Defines the offset position used by UtilsFileSeek in a file to start offsetting from the file header.

-

SEEK_CUR_FS   1

-

Defines the offset position used by UtilsFileSeek in a file to start offsetting from the current read and write position.

-

SEEK_END_FS   2

-

Defines the offset position used by UtilsFileSeek in a file to start offsetting from the end of the file.

-

O_RDONLY_FS   00

-

Defines a flag used byUtilsFileOpen to open a file in read-only mode.

-

O_WRONLY_FS   01

-

Defines a flag used by UtilsFileOpen to open a file in write-only mode.

-

O_RDWR_FS   02

-

Defines a flag used by UtilsFileOpen to open a file in read-and-write mode.

-

O_CREAT_FS   0100

-

Defines a flag used by UtilsFileOpen to create a file when the file to open does not exist.

-

O_EXCL_FS   0200

-

Defines a flag used by UtilsFileOpen to check whether the file to open exists when O_CREAT_FS is already set.

-

O_TRUNC_FS   01000

-

Defines a flag used by UtilsFileOpen to clear the file content if the file exists and can be opened in write mode.

-

O_APPEND_FS   02000

-

Defines a flag used by UtilsFileOpen to start reading or writing from the end of a file.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

UtilsFileOpen (const char *path, int oflag, int mode)

-

int 

-

Opens or creates a file.

-

UtilsFileClose (int fd)

-

int 

-

Closes a file with the specified file descriptor.

-

UtilsFileRead (int fd, char *buf, unsigned int len)

-

int 

-

Reads a specified length of data from a file with the specified file descriptor and writes the data into the buffer.

-

UtilsFileWrite (int fd, const char *buf, unsigned int len)

-

int 

-

Writes a specified length of data into a file with the specified file descriptor.

-

UtilsFileDelete (const char *path)

-

int 

-

Deletes a specified file.

-

UtilsFileStat (const char *path, unsigned int *fileSize)

-

int 

-

Obtains the file size.

-

UtilsFileSeek (int fd, int offset, unsigned int whence)

-

int 

-

Adjusts the read and write position offset in a file.

-

UtilsFileCopy (const char *src, const char *dest)

-

int 

-

Copies the source file to a target file.

-

UtilsFileMove (const char *src, const char *dest)

-

int 

-

Moves the source file into a target file.

-
- diff --git a/api/api-LinkIoT/wifi_device-h.md b/api/api-LinkIoT/wifi_device-h.md deleted file mode 100755 index 5ee853e77d6d368f2640492b906fed7e9ea63ba7..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/wifi_device-h.md +++ /dev/null @@ -1,124 +0,0 @@ -# wifi\_device.h - -## **Overview** - -**Related Modules:** - -[Wifiservice](Wifiservice.md) - -**Description:** - -Provides capabilities to enable and disable the station mode, connect to and disconnect from a station, query the station status, and listen for events. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

EnableWifi (void)

-

WifiErrorCode 

-

Enables the station mode.

-

DisableWifi (void)

-

WifiErrorCode 

-

Disables the station mode.

-

IsWifiActive (void)

-

int 

-

Checks whether the station mode is enabled.

-

Scan (void)

-

WifiErrorCode 

-

Starts a Wi-Fi scan.

-

GetScanInfoList (WifiScanInfo *result, unsigned int *size)

-

WifiErrorCode 

-

Obtains an array of hotspots detected in a Wi-Fi scan.

-

AddDeviceConfig (const WifiDeviceConfig *config, int *result)

-

WifiErrorCode 

-

Adds a specified hotspot configuration for connecting to a hotspot.

-

GetDeviceConfigs (WifiDeviceConfig *result, unsigned int *size)

-

WifiErrorCode 

-

Obtains all hotspot configurations.

-

RemoveDevice (int networkId)

-

WifiErrorCode 

-

Removes a hotspot configuration matching a specified networkId.

-

ConnectTo (int networkId)

-

WifiErrorCode 

-

Connects to a hotspot matching a specified networkId.

-

Disconnect (void)

-

WifiErrorCode 

-

Disconnects this Wi-Fi connection.

-

GetLinkedInfo (WifiLinkedInfo *result)

-

WifiErrorCode 

-

Obtains information about the connected hotspot.

-

RegisterWifiEvent (WifiEvent *event)

-

WifiErrorCode 

-

Registers a callback for a specified Wi-Fi event.

-

UnRegisterWifiEvent (const WifiEvent *event)

-

WifiErrorCode 

-

Unregisters a callback previously registered for a specified Wi-Fi event.

-

GetDeviceMacAddress (unsigned char *result)

-

WifiErrorCode 

-

Obtains the MAC address of this device.

-

AdvanceScan (WifiScanParams *params)

-

WifiErrorCode 

-

Starts a Wi-Fi scan based on a specified parameter.

-
- diff --git a/api/api-LinkIoT/wifi_device_config-h.md b/api/api-LinkIoT/wifi_device_config-h.md deleted file mode 100755 index 2ec6947958d95e6f938da68da46c3a9ceb1462a1..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/wifi_device_config-h.md +++ /dev/null @@ -1,133 +0,0 @@ -# wifi\_device\_config.h - -## **Overview** - -**Related Modules:** - -[Wifiservice](Wifiservice.md) - -**Description:** - -Defines the Wi-Fi station configuration. - -The Wi-Fi station configuration includes the security type and data length. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

WifiDeviceConfig

-

Represents the Wi-Fi station configuration used to connect to a specified Wi-Fi device.

-

WifiScanParams

-

Represents the Wi-Fi station configuration used to connect to a specified Wi-Fi device.

-
- -## Macros - - - - - - - - - - - - - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

WIFI_MAX_CONFIG_SIZE   10

-

Indicates the maximum number of Wi-Fi station configurations that can be added using AddDeviceConfig.

-

WIFI_CONFIG_INVALID   (-1)

-

Indicates the value of networkId when the configuration file is unavailable.

-

WIFI_MAX_SSID_LEN   33

-

Indicates the maximum length of a Wi-Fi SSID.

-

WIFI_MAX_KEY_LEN   65

-

Indicates the maximum length of a Wi-Fi key.

-

WIFI_MAC_LEN   6

-

Indicates the maximum length of a Wi-Fi MAC address or a Wi-Fi BSSID.

-

WIFI_PSK_LEN   32

-

Indicates the maximum length of a Wi-Fi PSK.

-
- -## Typedefs - - - - - - - - - - -

Typedef Name

-

Description

-

WifiDeviceConfig

-

typedef struct WifiDeviceConfig 

-

Represents the Wi-Fi station configuration used to connect to a specified Wi-Fi device.

-
- -## Enumerations - - - - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

WifiSecurityType {   WIFI_SEC_TYPE_INVALID = -1, WIFI_SEC_TYPE_OPEN, WIFI_SEC_TYPE_WEP, WIFI_SEC_TYPE_PSK,   WIFI_SEC_TYPE_SAE }

-

Enumerates Wi-Fi security types.

-

WifiPskType { WIFI_PSK_TYPE_ASCII = 0, WIFI_PSK_TYPE_HEX }

-

Enumerates psk encryption types.

-

WifiScanType { WIFI_FREQ_SCAN, WIFI_SSID_SCAN, WIFI_BSSID_SCAN, WIFI_BAND_SCAN }

-

Enumerates Wi-Fi scan types.

-
- diff --git a/api/api-LinkIoT/wifi_error_code-h.md b/api/api-LinkIoT/wifi_error_code-h.md deleted file mode 100755 index 0f8209fca451c08fd50b1d219cc34655f6712829..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/wifi_error_code-h.md +++ /dev/null @@ -1,39 +0,0 @@ -# wifi\_error\_code.h - -## **Overview** - -**Related Modules:** - -[Wifiservice](Wifiservice.md) - -**Description:** - -Defines error codes of the Wi-Fi service. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Enumerations - - - - - - - - - - -

Enumeration Name

-

Description

-

WifiErrorCode {   WIFI_SUCCESS = 0, ERROR_WIFI_INVALID_ARGS = -1, ERROR_WIFI_CHIP_INVALID = -2, ERROR_WIFI_IFACE_INVALID = -3,   ERROR_WIFI_RTT_CONTROLLER_INVALID = -4, ERROR_WIFI_NOT_SUPPORTED = -5, ERROR_WIFI_NOT_AVAILABLE = -6, ERROR_WIFI_NOT_STARTED = -7,   ERROR_WIFI_BUSY = -8, ERROR_WIFI_UNKNOWN = -9 }

-

Enumerates Wi-Fi error codes.

-
- diff --git a/api/api-LinkIoT/wifi_event-h.md b/api/api-LinkIoT/wifi_event-h.md deleted file mode 100755 index 0c0d0ca451cfb003e552a0b899df5e9570dac202..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/wifi_event-h.md +++ /dev/null @@ -1,95 +0,0 @@ -# wifi\_event.h - -## **Overview** - -**Related Modules:** - -[Wifiservice](Wifiservice.md) - -**Description:** - -Defines callbacks and structure of Wi-Fi events. - -[RegisterWifiEvent](Wifiservice.md#ga0e4d452915d1588664b91837b821eada) can be used to listen for Wi-Fi connection, disconnection, and scan events. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

WifiEvent

-

Represents the pointer to a Wi-Fi event callback for station and hotspot connection, disconnection, or scan.

-
- -## Macros - - - - - - - - - - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

WIFI_STA_ACTIVE   1

-

Indicates that the Wi-Fi station mode is enabled.

-

WIFI_STA_NOT_ACTIVE   0

-

Indicates that the Wi-Fi station mode is disabled.

-

WIFI_HOTSPOT_ACTIVE   1

-

Indicates that the Wi-Fi hotspot mode is enabled.

-

WIFI_HOTSPOT_NOT_ACTIVE   0

-

Indicates that the Wi-Fi hotspot mode is disabled.

-

WIFI_MAX_EVENT_SIZE   10

-

Indicates the maximum number of event listeners that can be registered using RegisterWifiEvent.

-
- -## Enumerations - - - - - - - - - - -

Enumeration Name

-

Description

-

WifiEventState { WIFI_STATE_NOT_AVALIABLE = 0, WIFI_STATE_AVALIABLE }

-

Enumerates states in Wi-Fi events.

-
- diff --git a/api/api-LinkIoT/wifi_hotspot-h.md b/api/api-LinkIoT/wifi_hotspot-h.md deleted file mode 100755 index 23707ce9c152fa352ccb75e944d1b75bb270229c..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/wifi_hotspot-h.md +++ /dev/null @@ -1,93 +0,0 @@ -# wifi\_hotspot.h - -## **Overview** - -**Related Modules:** - -[Wifiservice](Wifiservice.md) - -**Description:** - -Provides capabilities to enable and disable the hotspot mode, connect to and disconnect from a hotspot, query the hotspot status, and listen for events. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Macros - - - - - - - - - - -

Macro Name and Value

-

Description

-

HOTSPOT_DEFAULT_CHANNEL   6

-

Defines the default channel of the hotspot mode.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

EnableHotspot (void)

-

WifiErrorCode 

-

Enables the hotspot mode.

-

DisableHotspot (void)

-

WifiErrorCode 

-

Disables the hotspot mode.

-

SetHotspotConfig (const HotspotConfig *config)

-

WifiErrorCode 

-

Sets a specified hotspot configuration.

-

GetHotspotConfig (HotspotConfig *result)

-

WifiErrorCode 

-

Obtains a specified hotspot configuration.

-

IsHotspotActive (void)

-

int 

-

Checks whether the hotspot mode is enabled.

-

GetStationList (StationInfo *result, unsigned int *size)

-

WifiErrorCode 

-

Obtains an array of stations connected to this hotspot.

-

GetSignalLevel (int rssi, int band)

-

int 

-

Obtains the signal level indicated by a specified received signal strength indicator (RSSI) and frequency band.

-
- diff --git a/api/api-LinkIoT/wifi_hotspot_config-h.md b/api/api-LinkIoT/wifi_hotspot_config-h.md deleted file mode 100755 index 414a3357f6c2905dc639b6ffda402085ca41fdcb..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/wifi_hotspot_config-h.md +++ /dev/null @@ -1,102 +0,0 @@ -# wifi\_hotspot\_config.h - -## **Overview** - -**Related Modules:** - -[Wifiservice](Wifiservice.md) - -**Description:** - -Defines the Wi-Fi hotspot configuration. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

HotspotConfig

-

Represents the hotspot configuration.

-
- -## Macros - - - - - - - - - - -

Macro Name and Value

-

Description

-

WIFI_MAX_STA_NUM   6

-

Defines the maximum number of stations connected to a hotspot.

-
- -## Enumerations - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

RssiLevel { RSSI_LEVEL_1 = 1, RSSI_LEVEL_2 = 2, RSSI_LEVEL_3 = 3, RSSI_LEVEL_4 = 4 }

-

Enumerates received signal strength indicator (RSSI) levels.

-

HotspotBandType { HOTSPOT_BAND_TYPE_2G = 1, HOTSPOT_BAND_TYPE_5G = 2 }

-

Enumerates frequency bands supported by the Wi-Fi hotspot mode.

-
- -## Functions - - - - - - - - - - - - - -

Function Name

-

Description

-

SetBand (int band)

-

WifiErrorCode 

-

Sets the frequency band for this hotspot.

-

GetBand (int *result)

-

WifiErrorCode 

-

Obtains the frequency band of this hotspot.

-
- diff --git a/api/api-LinkIoT/wifi_linked_info-h.md b/api/api-LinkIoT/wifi_linked_info-h.md deleted file mode 100755 index dc909ce0072d1b0485b28b30c92ad4db41686b63..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/wifi_linked_info-h.md +++ /dev/null @@ -1,56 +0,0 @@ -# wifi\_linked\_info.h - -## **Overview** - -**Related Modules:** - -[Wifiservice](Wifiservice.md) - -**Description:** - -Defines the data structure and macro of the Wi-Fi connection information. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

WifiLinkedInfo

-

Represents the Wi-Fi connection information.

-
- -## Enumerations - - - - - - - - - - -

Enumeration Name

-

Description

-

WifiConnState { WIFI_DISCONNECTED, WIFI_CONNECTED }

-

Enumerates Wi-Fi connection states.

-
- diff --git a/api/api-LinkIoT/wifi_scan_info-h.md b/api/api-LinkIoT/wifi_scan_info-h.md deleted file mode 100755 index 5b3450b4907bcad117c9dd36b02030f64424a14b..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/wifi_scan_info-h.md +++ /dev/null @@ -1,56 +0,0 @@ -# wifi\_scan\_info.h - -## **Overview** - -**Related Modules:** - -[Wifiservice](Wifiservice.md) - -**Description:** - -Defines the data structure and macro of the Wi-Fi scan result information. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

WifiScanInfo

-

Represents the Wi-Fi scan result information.

-
- -## Macros - - - - - - - - - - -

Macro Name and Value

-

Description

-

WIFI_SCAN_HOTSPOT_LIMIT   64

-

Indicates the maximum number of hotspots that can be detected in a Wi-Fi scan.

-
- diff --git a/api/api-LinkIoT/wifiiot_adc-h.md b/api/api-LinkIoT/wifiiot_adc-h.md deleted file mode 100755 index ddcc40201332b571978fee2c5f8e00e1f545da6f..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/wifiiot_adc-h.md +++ /dev/null @@ -1,67 +0,0 @@ -# wifiiot\_adc.h - -## **Overview** - -**Related Modules:** - -[Wifiiot](Wifiiot.md) - -**Description:** - -Declares the ADC interface functions for you to read data. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Enumerations - - - - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

WifiIotAdcChannelIndex {   WIFI_IOT_ADC_CHANNEL_0, WIFI_IOT_ADC_CHANNEL_1, WIFI_IOT_ADC_CHANNEL_2, WIFI_IOT_ADC_CHANNEL_3,   WIFI_IOT_ADC_CHANNEL_4, WIFI_IOT_ADC_CHANNEL_5, WIFI_IOT_ADC_CHANNEL_6, WIFI_IOT_ADC_CHANNEL_7,   WIFI_IOT_ADC_CHANNEL_BUTT }

-

Enumerates ADC channel indexes.

-

WifiIotAdcCurBais {   WIFI_IOT_ADC_CUR_BAIS_DEFAULT, WIFI_IOT_ADC_CUR_BAIS_AUTO, WIFI_IOT_ADC_CUR_BAIS_1P8V, WIFI_IOT_ADC_CUR_BAIS_3P3V,   WIFI_IOT_ADC_CUR_BAIS_BUTT }

-

Enumerates analog power control modes.

-

WifiIotAdcEquModelSel {   WIFI_IOT_ADC_EQU_MODEL_1, WIFI_IOT_ADC_EQU_MODEL_2, WIFI_IOT_ADC_EQU_MODEL_4, WIFI_IOT_ADC_EQU_MODEL_8,   WIFI_IOT_ADC_EQU_MODEL_BUTT }

-

Enumerates equation models.

-
- -## Functions - - - - - - - - - - -

Function Name

-

Description

-

AdcRead (WifiIotAdcChannelIndex channel, unsigned short *data, WifiIotAdcEquModelSel equModel, WifiIotAdcCurBais curBais, unsigned short rstCnt)

-

unsigned int 

-

Reads a piece of sampled data from a specified ADC channel based on the input parameters.

-
- diff --git a/api/api-LinkIoT/wifiiot_at-h.md b/api/api-LinkIoT/wifiiot_at-h.md deleted file mode 100755 index 57926174394213821d5b74be6e40390d06dac374..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/wifiiot_at-h.md +++ /dev/null @@ -1,83 +0,0 @@ -# wifiiot\_at.h - -## **Overview** - -**Related Modules:** - -[Wifiiot](Wifiiot.md) - -**Description:** - -Declares the AT interface functions. - -These functions are used for AT initialization as well as command line registration and printing. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

AtCmdTbl

-

Defines the AT command registration structure.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

AtRegisterCmd (const AtCmdTbl *cmdTbl, unsigned short cmdNum)

-

unsigned int 

-

Registers a certain number of AT commands.

-

AtSysCmdRegister (void)

-

void 

-

Registers a system AT command.

-

AtPrintf (const char *fmt,...)

-

int 

-

Formats data and outputs it to the AT command terminal.

-

AtInit (void)

-

unsigned int 

-

Initializes an AT command task.

-

AtCheckUartBusy (unsigned char enable)

-

void 

-

Sets whether to check the UART busy status during low-power voting.

-
- diff --git a/api/api-LinkIoT/wifiiot_errno-h.md b/api/api-LinkIoT/wifiiot_errno-h.md deleted file mode 100755 index f1142ad5ade220d53998ff24478530792e7a9d6e..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/wifiiot_errno-h.md +++ /dev/null @@ -1,514 +0,0 @@ -# wifiiot\_errno.h - -## **Overview** - -**Related Modules:** - -[Wifiiot](Wifiiot.md) - -**Description:** - -Defines error codes used by the Wi-Fi module. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Macros - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

WIFI_IOT_SUCCESS   0

-

Defines a module-level return value to indicate a successful operation.

-

WIFI_IOT_FAILURE   (-1)

-

Defines a module-level return value to indicate an operation failure.

-

WIFI_IOT_ERR_UART_INVALID_PARAMETER   0x80001000

-

Defines a UART error code to indicate an invalid parameter.

-

WIFI_IOT_ERR_UART_INVALID_SUSPEND   0x80001001

-

Defines a UART error code to indicate an invalid pause operation.

-

WIFI_IOT_ERR_UART_INVALID_PARITY   0x80001002

-

Defines a UART error code to indicate an invalid parity check.

-

WIFI_IOT_ERR_UART_INVALID_DATA_BITS   0x80001003

-

Defines a UART error code to indicate an invalid data bit.

-

WIFI_IOT_ERR_UART_INVALID_STOP_BITS   0x80001004

-

Defines a UART error code to indicate an invalid stop bit.

-

WIFI_IOT_ERR_UART_INVALID_BAUD   0x80001005

-

Defines a UART error code to indicate an invalid baud rate.

-

WIFI_IOT_ERR_UART_INVALID_COM_PORT   0x80001006

-

Defines a UART error code to indicate an invalid port number.

-

WIFI_IOT_ERR_UART_NOT_SUPPORT_DMA   0x80001007

-

Defines a UART error code to indicate a non-support for DMA.

-

WIFI_IOT_ERR_UART_NOT_BLOCK_MODE   0x80001008

-

Defines a UART error code to indicate the non-block mode.

-

WIFI_IOT_ERR_GPIO_INVALID_PARAMETER   0x80001040

-

Defines a GPIO error code to indicate an invalid parameter.

-

WIFI_IOT_ERR_GPIO_REPEAT_INIT   0x80001041

-

Defines a GPIO error code to indicate repeated initialization.

-

WIFI_IOT_ERR_GPIO_NOT_INIT   0x80001042

-

Defines a GPIO error code to indicate non-initialization.

-

WIFI_IOT_ERR_GPIO_NOT_SUPPORT   0x80001043

-

Defines a GPIO error code to indicate a non-support.

-

WIFI_IOT_ERR_FLASH_NOT_INIT   0x800010C0

-

Defines a flash error code to indicate non-initialization.

-

WIFI_IOT_ERR_FLASH_INVALID_PARAM   0x800010C1

-

Defines a flash error code to indicate an invalid parameter.

-

WIFI_IOT_ERR_FLASH_INVALID_PARAM_BEYOND_ADDR   0x800010C2

-

Defines a flash error code to indicate that the address is out of range.

-

WIFI_IOT_ERR_FLASH_INVALID_PARAM_SIZE_ZERO   0x800010C3

-

Defines a flash error code to indicate that the parameter size is 0

-

WIFI_IOT_ERR_FLASH_INVALID_PARAM_ERASE_NOT_ALIGN   0x800010C4

-

Defines a flash error code to indicate that the erase size is not aligned.

-

WIFI_IOT_ERR_FLASH_INVALID_PARAM_IOCTRL_DATA_NULL   0x800010C5

-

Defines a flash error code to indicate that the data of the I/O controller is empty.

-

WIFI_IOT_ERR_FLASH_INVALID_PARAM_DATA_NULL   0x800010C6

-

Defines a flash error code to indicate empty data.

-

WIFI_IOT_ERR_FLASH_INVALID_PARAM_PAD1   0x800010C7

-

Defines a flash error code to indicate that pad1 is incorrect.

-

WIFI_IOT_ERR_FLASH_INVALID_PARAM_PAD2   0x800010C8

-

Defines a flash error code to indicate that pad2 is incorrect.

-

WIFI_IOT_ERR_FLASH_INVALID_PARAM_PAD3   0x800010C9

-

Defines a flash error code to indicate that pad3 is incorrect.

-

WIFI_IOT_ERR_FLASH_INVALID_PARAM_PAD4   0x800010CA

-

Defines a flash error code to indicate that pad4 is incorrect.

-

WIFI_IOT_ERR_FLASH_TIME_OUT_WAIT_READY   0x800010CB

-

Defines a flash error code to indicate a timeout on waiting for ready.

-

WIFI_IOT_ERR_FLASH_QUAD_MODE_READ_REG1   0x800010CC

-

Defines a flash error code to indicate that an error occurs when reading register 1.

-

WIFI_IOT_ERR_FLASH_QUAD_MODE_READ_REG2   0x800010CD

-

Defines a flash error code to indicate that an error occurs when reading register 2.

-

WIFI_IOT_ERR_FLASH_QUAD_MODE_COMPARE_REG   0x800010CE

-

Defines a flash error code to indicate that an error occurs when comparing registers.

-

WIFI_IOT_ERR_FLASH_NO_MATCH_FLASH   0x800010CF

-

Defines a flash error code to indicate a flash mismatch.

-

WIFI_IOT_ERR_FLASH_WRITE_ENABLE   0x800010D0

-

Defines a flash error code to indicate a failure in enabling write.

-

WIFI_IOT_ERR_FLASH_NO_MATCH_ERASE_SIZE   0x800010D1

-

Defines a flash error code to indicate a mismatch in the size of data to erase.

-

WIFI_IOT_ERR_FLASH_MAX_SPI_OP   0x800010D2

-

Defines a flash error code to indicate the maximum value of the SPI operation.

-

WIFI_IOT_ERR_FLASH_NOT_SUPPORT_IOCTRL_ID   0x800010D3

-

Defines a flash error code to indicate an unsupported IO controller ID..

-

WIFI_IOT_ERR_FLASH_INVALID_CHIP_ID   0x800010D4

-

Defines a flash error code to indicate an invalid chip ID.

-

WIFI_IOT_ERR_FLASH_RE_INIT   0x800010D5

-

Defines a flash error code to indicate repeated initialization.

-

WIFI_IOT_ERR_FLASH_WRITE_NOT_SUPPORT_ERASE   0x800010D6

-

Defines a flash error code to indicate a non-support for data erasure.

-

WIFI_IOT_ERR_FLASH_WRITE_COMPARE_WRONG   0x800010D7

-

Defines a flash error code to indicate that an error occurs when comparing the data written.

-

WIFI_IOT_ERR_FLASH_WAIT_CFG_START_TIME_OUT   0x800010D8

-

Defines a flash error code to indicate a timeout on waiting for a configuration to start.

-

WIFI_IOT_ERR_FLASH_PATITION_INIT_FAIL   0x800010D9

-

Defines a flash error code to indicate a partition initialization failure.

-

WIFI_IOT_ERR_FLASH_INITILIZATION   0x800010DA

-

Defines a flash error code to indicate initialization.

-

WIFI_IOT_ERR_FLASH_ERASE_NOT_4K_ALIGN   0x800010DB

-

Defines a flash error code to indicate that the size of data to erase is not a multiple of 4K bytes.

-

WIFI_IOT_ERR_FLASH_PROTECT_NOT_SUPPORT   0x800010DC

-

Defines a flash error code to indicate a non-support.

-

WIFI_IOT_ERR_FLASH_PROTECT_NOT_INIT   0x800010DD

-

Defines a flash error code to indicate non-initialization.

-

WIFI_IOT_ERR_FLASH_PROTECT_RE_INIT   0x800010DE

-

Defines a flash error code to indicate repeated initialization.

-

WIFI_IOT_ERR_FLASH_PROTECT_NOT_FIND_CHIP   0x800010DF

-

Defines a flash error code to indicate that no chip is found.

-

WIFI_IOT_ERR_FLASH_CRYPTO_INVALID_PARAM   0x800010F0

-

Defines a flash error code to indicate an invalid parameter.

-

WIFI_IOT_ERR_FLASH_CRYPTO_BEYOND_ADDR_SIZE   0x800010F1

-

Defines a flash error code to indicate that the address is out of range.

-

WIFI_IOT_ERR_FLASH_CRYPTO_MALLOC_FAIL   0x800001F2

-

Defines a flash error code to indicate a failure in applying for memory.

-

WIFI_IOT_ERR_FLASH_CRYPTO_DATA_ENCRYPT_ERR   0x800001F3

-

Defines a flash error code to indicate an encryption error.

-

WIFI_IOT_ERR_FLASH_CRYPTO_DATA_DECRYPT_ERR   0x800001F4

-

Defines a flash error code to indicate a decryption error.

-

WIFI_IOT_ERR_FLASH_CRYPTO_KEY_EMPTY_ERR   0x800001F5

-

Defines a flash error code to indicate an empty key value.

-

WIFI_IOT_ERR_FLASH_CRYPTO_MEMCPY_FAIL   0x800001F6

-

Defines a flash error code to indicate a copy failure.

-

WIFI_IOT_ERR_FLASH_CRYPTO_NOT_SUPPORT   0x800001F7

-

Defines a flash error code to indicate a non-support for encryption.

-

WIFI_IOT_ERR_FLASH_CRYPTO_PREPARE_ERR   0x800001F8

-

Defines a flash error code to indicate an incorrect parameter during encryption.

-

WIFI_IOT_ERR_FLASH_CRYPTO_KEY_INVALID_ERR   0x800001F9

-

Defines a flash error code to indicate an invalid key.

-

WIFI_IOT_ERR_FLASH_CRYPTO_KEY_SAVE_ERR   0x800001FA

-

Defines a flash error code to indicate a failure in saving the key.

-

WIFI_IOT_ERR_FLASH_CRYPTO_KERNEL_ADDR_ERR   0x800001FB

-

Defines a flash error code to indicate an incorrect kernel address..

-

WIFI_IOT_ERR_I2C_NOT_INIT   0x80001180

-

Defines an I2C error code to indicate a non-support.

-

WIFI_IOT_ERR_I2C_INVALID_PARAMETER   0x80001181

-

Defines an I2C error code to indicate an invalid parameter.

-

WIFI_IOT_ERR_I2C_TIMEOUT_START   0x80001182

-

Defines an I2C error code to indicate a start timeout.

-

WIFI_IOT_ERR_I2C_TIMEOUT_WAIT   0x80001183

-

Defines an I2C error code to indicate a wait timeout.

-

WIFI_IOT_ERR_I2C_TIMEOUT_STOP   0x80001184

-

Defines an I2C error code to indicate a stop timeout.

-

WIFI_IOT_ERR_I2C_TIMEOUT_RCV_BYTE   0x80001185

-

Defines an I2C error code to indicate a receive timeout.

-

WIFI_IOT_ERR_I2C_TIMEOUT_RCV_BYTE_PROC   0x80001186

-

Defines an I2C error code to indicate a processing timeout.

-

WIFI_IOT_ERR_I2C_WAIT_SEM_FAIL   0x80001187

-

Defines an I2C error code to indicate a waiting failure.

-

WIFI_IOT_ERR_I2C_START_ACK_ERR   0x80001188

-

Defines an I2C error code to indicate a responding failure.

-

WIFI_IOT_ERR_I2C_WAIT_ACK_ERR   0x80001189

-

Defines an I2C error code to indicate a failure in waiting for a response.

-

WIFI_IOT_ERR_SPI_NOT_INIT   0x800011C0

-

Defines an SPI error code to indicate non-initialization.

-

WIFI_IOT_ERR_SPI_REINIT   0x800011C1

-

Defines an SPI error code to indicate repeated initialization.

-

WIFI_IOT_ERR_SPI_PARAMETER_WRONG   0x800011C2

-

Defines an SPI error code to indicate a parameter error.

-

WIFI_IOT_ERR_SPI_BUSY   0x800011C3

-

Defines an SPI error code to indicate the busy state.

-

WIFI_IOT_ERR_SPI_WRITE_TIMEOUT   0x800011C4

-

Defines an SPI error code to indicate a write timeout.

-

WIFI_IOT_ERR_SPI_READ_TIMEOUT   0x800011C5

-

Defines an SPI error code to indicate a read timeout.

-

WIFI_IOT_ERR_SPI_NOT_SUPPORT_DMA   0x800011C6

-

Defines an SPI error code to indicate a non-support for DMA.

-

WIFI_IOT_ERR_SDIO_INVALID_PARAMETER   0x80001280

-

Defines an SDIO error code to indicate an invalid parameter.

-

WIFI_IOT_ERR_ADC_PARAMETER_WRONG   0x80001300

-

Defines an ADC error code to indicate a parameter error.

-

WIFI_IOT_ERR_ADC_INVALID_CHANNEL_ID   0x80001301

-

Defines an ADC error code to indicate an invalid channel.

-

WIFI_IOT_ERR_ADC_TIMEOUT   0x80001302

-

Defines an ADC error code to indicate a timeout.

-

WIFI_IOT_ERR_ADC_NOT_INIT   0x80001303

-

Defines an ADC error code to indicate non-initialization.

-

WIFI_IOT_ERR_PWM_NO_INIT   0x80001340

-

Defines a PWM error code to indicate non-initialization.

-

WIFI_IOT_ERR_PWM_INITILIZATION_ALREADY   0x80001341

-

Defines a PWM error code to indicate an initialization error.

-

WIFI_IOT_ERR_PWM_INVALID_PARAMETER   0x80001342

-

Defines a PWM error code to indicate an invalid parameter.

-

WIFI_IOT_ERR_DMA_INVALID_PARA   0x80001380

-

Defines a DMA error code to indicate an invalid parameter.

-

WIFI_IOT_ERR_DMA_NOT_INIT   0x80001381

-

Defines a DMA error code to indicate non-initialization.

-

WIFI_IOT_ERR_DMA_BUSY   0x80001382

-

Defines a DMA error code to indicate the busy state.

-

WIFI_IOT_ERR_DMA_TRANSFER_FAIL   0x80001383

-

Defines a DMA error code to indicate a transmission failure.

-

WIFI_IOT_ERR_DMA_TRANSFER_TIMEOUT   0x80001384

-

Defines a DMA error code to indicate a transmission timeout.

-

WIFI_IOT_ERR_DMA_GET_NOTE_FAIL   0x80001385

-

Defines a DMA error code to indicate a retrieval failure.

-

WIFI_IOT_ERR_DMA_LLI_NOT_CREATE   0x80001386

-

Defines a DMA error code to indicate that the LLI is not created.

-

WIFI_IOT_ERR_DMA_CH_IRQ_ENABLE_FAIL   0x80001387

-

Defines a DMA error code to indicate a failure in enabling channel interrupt.

-

WIFI_IOT_ERR_I2S_INVALID_PARAMETER   0x80001400

-

Defines an I2S error code to indicate an invalid parameter.

-

WIFI_IOT_ERR_I2S_WRITE_TIMEOUT   0x80001401

-

Defines an I2S error code to indicate a write timeout.

-

WIFI_IOT_ERR_AT_NAME_OR_FUNC_REPEAT_REGISTERED   0x80003280

-

Defines an AT error code to indicate repeated function registration.

-

WIFI_IOT_ERR_AT_INVALID_PARAMETER   0x80003281

-

Defines an AT error code to indicate an invalid parameter.

-
- diff --git a/api/api-LinkIoT/wifiiot_flash-h.md b/api/api-LinkIoT/wifiiot_flash-h.md deleted file mode 100755 index 8e9c8d6c14b3f3fe5da708a18b4a913189d38d81..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/wifiiot_flash-h.md +++ /dev/null @@ -1,66 +0,0 @@ -# wifiiot\_flash.h - -## **Overview** - -**Related Modules:** - -[Wifiiot](Wifiiot.md) - -**Description:** - -Declares the flash interface functions. - -These functions are used to initialize or deinitialize a flash device, and read data from or write data to a flash memory. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Functions - - - - - - - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

FlashRead (const unsigned int flashOffset, const unsigned int size, unsigned char *ramData)

-

unsigned int 

-

Reads data from a flash memory address.

-

FlashWrite (const unsigned int flashOffset, unsigned int size, const unsigned char *ramData, unsigned char doErase)

-

unsigned int 

-

Writes data to a flash memory address.

-

FlashErase (const unsigned int flashOffset, const unsigned int size)

-

unsigned int 

-

Erases data in a specified flash memory address.

-

FlashInit (void)

-

unsigned int 

-

Initializes the flash device.

-

FlashDeinit (void)

-

unsigned int 

-

Deinitializes the flash device.

-
- diff --git a/api/api-LinkIoT/wifiiot_flash_ex-h.md b/api/api-LinkIoT/wifiiot_flash_ex-h.md deleted file mode 100755 index 4c97815b6bcd5a653675e49b885e08cb41672d4f..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/wifiiot_flash_ex-h.md +++ /dev/null @@ -1,40 +0,0 @@ -# wifiiot\_flash\_ex.h - -## **Overview** - -**Related Modules:** - -[Wifiiot](Wifiiot.md) - -**Description:** - -Declares the extended flash interface functions for obtaining flash information. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Functions - - - - - - - - - - -

Function Name

-

Description

-

FlashIoctl (unsigned short cmd, char *data)

-

unsigned int 

-

Obtains flash information based on a specific command.

-
- diff --git a/api/api-LinkIoT/wifiiot_gpio-h.md b/api/api-LinkIoT/wifiiot_gpio-h.md deleted file mode 100755 index 60a5f1f0c8b0ea0d63c8fcea514be0baf52be3a9..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/wifiiot_gpio-h.md +++ /dev/null @@ -1,157 +0,0 @@ -# wifiiot\_gpio.h - -## **Overview** - -**Related Modules:** - -[Wifiiot](Wifiiot.md) - -**Description:** - -Declares the GPIO interface functions. - -These functions are used for GPIO initialization, input/output settings, and level settings. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Typedefs - - - - - - - - - - -

Typedef Name

-

Description

-

GpioIsrCallbackFunc) (char *arg)

-

typedef void(* 

-

Indicates the GPIO interrupt callback.

-
- -## Enumerations - - - - - - - - - - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

WifiIotGpioIdx {   WIFI_IOT_GPIO_IDX_0, WIFI_IOT_GPIO_IDX_1, WIFI_IOT_GPIO_IDX_2, WIFI_IOT_GPIO_IDX_3,   WIFI_IOT_GPIO_IDX_4, WIFI_IOT_GPIO_IDX_5, WIFI_IOT_GPIO_IDX_6, WIFI_IOT_GPIO_IDX_7,   WIFI_IOT_GPIO_IDX_8, WIFI_IOT_GPIO_IDX_9, WIFI_IOT_GPIO_IDX_10, WIFI_IOT_GPIO_IDX_11,   WIFI_IOT_GPIO_IDX_12, WIFI_IOT_GPIO_IDX_13, WIFI_IOT_GPIO_IDX_14, WIFI_IOT_GPIO_IDX_MAX }

-

Enumerates GPIO pin IDs.

-

WifiIotGpioValue { WIFI_IOT_GPIO_VALUE0 = 0, WIFI_IOT_GPIO_VALUE1 }

-

Enumerates GPIO level values.

-

WifiIotGpioDir { WIFI_IOT_GPIO_DIR_IN = 0, WIFI_IOT_GPIO_DIR_OUT }

-

Enumerates GPIO directions.

-

WifiIotGpioIntType { WIFI_IOT_INT_TYPE_LEVEL = 0, WIFI_IOT_INT_TYPE_EDGE }

-

Enumerates GPIO interrupt trigger modes.

-

WifiIotGpioIntPolarity { WIFI_IOT_GPIO_EDGE_FALL_LEVEL_LOW = 0, WIFI_IOT_GPIO_EDGE_RISE_LEVEL_HIGH }

-

Enumerates I/O interrupt polarities.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

GpioInit (void)

-

unsigned int 

-

Initializes the GPIO device.

-

GpioDeinit (void)

-

unsigned int 

-

Deinitializes the GPIO device.

-

GpioSetDir (WifiIotGpioIdx id, WifiIotGpioDir dir)

-

unsigned int 

-

Sets the direction for a GPIO pin.

-

GpioGetDir (WifiIotGpioIdx id, WifiIotGpioDir *dir)

-

unsigned int 

-

Obtains the direction for a GPIO pin.

-

GpioSetOutputVal (WifiIotGpioIdx id, WifiIotGpioValue val)

-

unsigned int 

-

Sets the output level value for a GPIO pin.

-

GpioGetOutputVal (WifiIotGpioIdx id, WifiIotGpioValue *val)

-

unsigned int 

-

Obtains the output level value of a GPIO pin.

-

GpioGetInputVal (WifiIotGpioIdx id, WifiIotGpioValue *val)

-

unsigned int 

-

Obtains the input level value of a GPIO pin.

-

GpioRegisterIsrFunc (WifiIotGpioIdx id, WifiIotGpioIntType intType, WifiIotGpioIntPolarity intPolarity, GpioIsrCallbackFunc func, char *arg)

-

unsigned int 

-

Enables the interrupt function for a GPIO pin.

-

GpioUnregisterIsrFunc (WifiIotGpioIdx id)

-

unsigned int 

-

Disables the interrupt function for a GPIO pin.

-

GpioSetIsrMask (WifiIotGpioIdx id, unsigned char mask)

-

unsigned int 

-

Masks the interrupt function for a GPIO pin.

-

GpioSetIsrMode (WifiIotGpioIdx id, WifiIotGpioIntType intType, WifiIotGpioIntPolarity intPolarity)

-

unsigned int 

-

Sets the interrupt trigger mode of a GPIO pin.

-
- diff --git a/api/api-LinkIoT/wifiiot_gpio_ex-h.md b/api/api-LinkIoT/wifiiot_gpio_ex-h.md deleted file mode 100755 index 7b8584e62b4ceea3f8d4b7cad022aecd16fc9f9e..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/wifiiot_gpio_ex-h.md +++ /dev/null @@ -1,174 +0,0 @@ -# wifiiot\_gpio\_ex.h - -## **Overview** - -**Related Modules:** - -[Wifiiot](Wifiiot.md) - -**Description:** - -Declares the extended GPIO interface functions. - -These functions are used for settings GPIO pulls and driver strength. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Enumerations - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

WifiIotIoName {   WIFI_IOT_IO_NAME_GPIO_0, WIFI_IOT_IO_NAME_GPIO_1, WIFI_IOT_IO_NAME_GPIO_2, WIFI_IOT_IO_NAME_GPIO_3,   WIFI_IOT_IO_NAME_GPIO_4, WIFI_IOT_IO_NAME_GPIO_5, WIFI_IOT_IO_NAME_GPIO_6, WIFI_IOT_IO_NAME_GPIO_7,   WIFI_IOT_IO_NAME_GPIO_8, WIFI_IOT_IO_NAME_GPIO_9, WIFI_IOT_IO_NAME_GPIO_10, WIFI_IOT_IO_NAME_GPIO_11,   WIFI_IOT_IO_NAME_GPIO_12, WIFI_IOT_IO_NAME_GPIO_13, WIFI_IOT_IO_NAME_GPIO_14, WIFI_IOT_IO_NAME_MAX }

-

Enumerates GPIO hardware pin IDs.

-

WifiIotIoFuncGpio0 {   WIFI_IOT_IO_FUNC_GPIO_0_GPIO, WIFI_IOT_IO_FUNC_GPIO_0_UART1_TXD = 2, WIFI_IOT_IO_FUNC_GPIO_0_SPI1_CK, WIFI_IOT_IO_FUNC_GPIO_0_JTAG_TDO,   WIFI_IOT_IO_FUNC_GPIO_0_PWM3_OUT, WIFI_IOT_IO_FUNC_GPIO_0_I2C1_SDA }

-

Enumerates the functions of GPIO hardware pin 0.

-

WifiiIotIoFuncGpio1 { WIFI_IOT_IO_FUNC_GPIO_1_GPIO }

-

Enumerates the functions of GPIO hardware pin 1.

-

WifiIotIoFuncGpio2 {   WIFI_IOT_IO_FUNC_GPIO_2_GPIO, WIFI_IOT_IO_FUNC_GPIO_2_UART1_RTS_N = 2, WIFI_IOT_IO_FUNC_GPIO_2_SPI1_TXD, WIFI_IOT_IO_FUNC_GPIO_2_JTAG_TRSTN,   WIFI_IOT_IO_FUNC_GPIO_2_PWM2_OUT, WIFI_IOT_IO_FUNC_GPIO_2_SSI_CLK = 7 }

-

Enumerates the functions of GPIO hardware pin 2.

-

WifiIotIoFuncGpio3 {   WIFI_IOT_IO_FUNC_GPIO_3_GPIO, WIFI_IOT_IO_FUNC_GPIO_3_UART0_TXD, WIFI_IOT_IO_FUNC_GPIO_3_UART1_CTS_N, WIFI_IOT_IO_FUNC_GPIO_3_SPI1_CSN,   WIFI_IOT_IO_FUNC_GPIO_3_JTAG_TDI, WIFI_IOT_IO_FUNC_GPIO_3_PWM5_OUT, WIFI_IOT_IO_FUNC_GPIO_3_I2C1_SDA, WIFI_IOT_IO_FUNC_GPIO_3_SSI_DATA }

-

Enumerates the functions of GPIO hardware pin 3.

-

WifiIotIoFuncGpio4 {   WIFI_IOT_IO_FUNC_GPIO_4_GPIO, WIFI_IOT_IO_FUNC_GPIO_4_UART0_RXD = 2, WIFI_IOT_IO_FUNC_GPIO_4_JTAG_TMS = 4, WIFI_IOT_IO_FUNC_GPIO_4_PWM1_OUT,   WIFI_IOT_IO_FUNC_GPIO_4_I2C1_SCL }

-

Enumerates the functions of GPIO hardware pin 4.

-

WifiIotIoFuncGpio5 {   WIFI_IOT_IO_FUNC_GPIO_5_GPIO, WIFI_IOT_IO_FUNC_GPIO_5_UART1_RXD = 2, WIFI_IOT_IO_FUNC_GPIO_5_SPI0_CSN, WIFI_IOT_IO_FUNC_GPIO_5_PWM2_OUT = 5,   WIFI_IOT_IO_FUNC_GPIO_5_I2S0_MCLK, WIFI_IOT_IO_FUNC_GPIO_5_BT_STATUS }

-

Enumerates the functions of GPIO hardware pin 5.

-

WifiIotIoFuncGpio6 {   WIFI_IOT_IO_FUNC_GPIO_6_GPIO, WIFI_IOT_IO_FUNC_GPIO_6_UART1_TXD = 2, WIFI_IOT_IO_FUNC_GPIO_6_SPI0_CK, WIFI_IOT_IO_FUNC_GPIO_6_PWM3_OUT = 5,   WIFI_IOT_IO_FUNC_GPIO_6_I2S0_TX, WIFI_IOT_IO_FUNC_GPIO_6_COEX_SWITCH }

-

Enumerates the functions of GPIO hardware pin 6.

-

WifiIotIoFuncGpio7 {   WIFI_IOT_IO_FUNC_GPIO_7_GPIO, WIFI_IOT_IO_FUNC_GPIO_7_UART1_CTS_N = 2, WIFI_IOT_IO_FUNC_GPIO_7_SPI0_RXD, WIFI_IOT_IO_FUNC_GPIO_7_PWM0_OUT = 5,   WIFI_IOT_IO_FUNC_GPIO_7_I2S0_BCLK, WIFI_IOT_IO_FUNC_GPIO_7_BT_ACTIVE }

-

Enumerates the functions of GPIO hardware pin 7.

-

WifiIotIoFuncGpio8 {   WIFI_IOT_IO_FUNC_GPIO_8_GPIO, WIFI_IOT_IO_FUNC_GPIO_8_UART1_RTS_N = 2, WIFI_IOT_IO_FUNC_GPIO_8_SPI0_TXD, WIFI_IOT_IO_FUNC_GPIO_8_PWM1_OUT = 5,   WIFI_IOT_IO_FUNC_GPIO_8_I2S0_WS, WIFI_IOT_IO_FUNC_GPIO_8_WLAN_ACTIVE }

-

Enumerates the functions of GPIO hardware pin 8.

-

WifiIotIoFuncGpio9 {   WIFI_IOT_IO_FUNC_GPIO_9_GPIO, WIFI_IOT_IO_FUNC_GPIO_9_I2C0_SCL, WIFI_IOT_IO_FUNC_GPIO_9_UART2_RTS_N, WIFI_IOT_IO_FUNC_GPIO_9_SDIO_D2,   WIFI_IOT_IO_FUNC_GPIO_9_SPI0_TXD, WIFI_IOT_IO_FUNC_GPIO_9_PWM0_OUT, WIFI_IOT_IO_FUNC_GPIO_9_I2S0_MCLK = 7 }

-

Enumerates the functions of GPIO hardware pin 9.

-

WifiIotIoFuncGpio10 {   WIFI_IOT_IO_FUNC_GPIO_10_GPIO, WIFI_IOT_IO_FUNC_GPIO_10_I2C0_SDA, WIFI_IOT_IO_FUNC_GPIO_10_UART2_CTS_N, WIFI_IOT_IO_FUNC_GPIO_10_SDIO_D3,   WIFI_IOT_IO_FUNC_GPIO_10_SPI0_CK, WIFI_IOT_IO_FUNC_GPIO_10_PWM1_OUT, WIFI_IOT_IO_FUNC_GPIO_10_I2S0_TX = 7 }

-

Enumerates the functions of GPIO hardware pin 10.

-

WifiIotIoFuncGpio11 {   WIFI_IOT_IO_FUNC_GPIO_11_GPIO, WIFI_IOT_IO_FUNC_GPIO_11_UART2_TXD = 2, WIFI_IOT_IO_FUNC_GPIO_11_SDIO_CMD, WIFI_IOT_IO_FUNC_GPIO_11_SPI0_RXD,   WIFI_IOT_IO_FUNC_GPIO_11_PWM2_OUT, WIFI_IOT_IO_FUNC_GPIO_11_RF_TX_EN_EXT, WIFI_IOT_IO_FUNC_GPIO_11_I2S0_RX }

-

Enumerates the functions of GPIO hardware pin 11.

-

WifiIotIoFuncGpio12 {   WIFI_IOT_IO_FUNC_GPIO_12_GPIO, WIFI_IOT_IO_FUNC_GPIO_12_UART2_RXD = 2, WIFI_IOT_IO_FUNC_GPIO_12_SDIO_CLK, WIFI_IOT_IO_FUNC_GPIO_12_SPI0_CSN,   WIFI_IOT_IO_FUNC_GPIO_12_PWM3_OUT, WIFI_IOT_IO_FUNC_GPIO_12_RF_RX_EN_EXT, WIFI_IOT_IO_FUNC_GPIO_12_I2S0_BCLK }

-

Enumerates the functions of GPIO hardware pin 12.

-

WifiIotIoFuncGpio13 {   WIFI_IOT_IO_FUNC_GPIO_13_SSI_DATA, WIFI_IOT_IO_FUNC_GPIO_13_UART0_TXD, WIFI_IOT_IO_FUNC_GPIO_13_UART2_RTS_N, WIFI_IOT_IO_FUNC_GPIO_13_SDIO_D0,   WIFI_IOT_IO_FUNC_GPIO_13_GPIO, WIFI_IOT_IO_FUNC_GPIO_13_PWM4_OUT, WIFI_IOT_IO_FUNC_GPIO_13_I2C0_SDA, WIFI_IOT_IO_FUNC_GPIO_13_I2S0_WS }

-

Enumerates the functions of GPIO hardware pin 13.

-

WifiIotIoFuncGpio14 {   WIFI_IOT_IO_FUNC_GPIO_14_SSI_CLK, WIFI_IOT_IO_FUNC_GPIO_14_UART0_RXD, WIFI_IOT_IO_FUNC_GPIO_14_UART2_CTS_N, WIFI_IOT_IO_FUNC_GPIO_14_SDIO_D1,   WIFI_IOT_IO_FUNC_GPIO_14_GPIO, WIFI_IOT_IO_FUNC_GPIO_14_PWM5_OUT, WIFI_IOT_IO_FUNC_GPIO_14_I2C0_SCL }

-

Enumerates the functions of GPIO hardware pin 14.

-

WifiIotIoDriverStrength {   WIFI_IOT_IO_DRIVER_STRENGTH_0 = 0, WIFI_IOT_IO_DRIVER_STRENGTH_1, WIFI_IOT_IO_DRIVER_STRENGTH_2, WIFI_IOT_IO_DRIVER_STRENGTH_3,   WIFI_IOT_IO_DRIVER_STRENGTH_4, WIFI_IOT_IO_DRIVER_STRENGTH_5, WIFI_IOT_IO_DRIVER_STRENGTH_6, WIFI_IOT_IO_DRIVER_STRENGTH_7,   WIFI_IOT_IO_DRIVER_STRENGTH_MAX }

-

Enumerates I/O driver strength levels.

-

WifiIotIoPull { WIFI_IOT_IO_PULL_NONE, WIFI_IOT_IO_PULL_UP, WIFI_IOT_IO_PULL_DOWN, WIFI_IOT_IO_PULL_MAX }

-

Enumerates GPIO pull-up or pull-down settings.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

IoSetPull (WifiIotIoName id, WifiIotIoPull val)

-

unsigned int 

-

Sets the pull for a GPIO pin.

-

IoSetFunc (WifiIotIoName id, unsigned char val)

-

unsigned int 

-

Sets the multiplexing function for a GPIO pin.

-

IoGetPull (WifiIotIoName id, WifiIotIoPull *val)

-

unsigned int 

-

Obtains the pull type of a GPIO pin.

-

IoGetFunc (WifiIotIoName id, unsigned char *val)

-

unsigned int 

-

Obtains the multiplexing function for a GPIO pin.

-

IOGetDriverStrength (WifiIotIoName id, WifiIotIoDriverStrength *val)

-

unsigned int 

-

Obtains the driver strength of a GPIO pin.

-

IOSetDriverStrength (WifiIotIoName id, WifiIotIoDriverStrength val)

-

unsigned int 

-

Sets the driver strength of a GPIO pin.

-
- diff --git a/api/api-LinkIoT/wifiiot_i2c-h.md b/api/api-LinkIoT/wifiiot_i2c-h.md deleted file mode 100755 index 420c5ef3aa88292b926b427090bfd19d715345bb..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/wifiiot_i2c-h.md +++ /dev/null @@ -1,94 +0,0 @@ -# wifiiot\_i2c.h - -## **Overview** - -**Related Modules:** - -[Wifiiot](Wifiiot.md) - -**Description:** - -Declares the I2C interface functions. - -These functions are used for I2C initialization and data transmission. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

WifiIotI2cData

-

Defines I2C data transmission attributes.

-
- -## Enumerations - - - - - - - - - - -

Enumeration Name

-

Description

-

WifiIotI2cIdx { WIFI_IOT_I2C_IDX_0, WIFI_IOT_I2C_IDX_1 }

-

Enumerates I2C hardware indexes.

-
- -## Functions - - - - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

I2cInit (WifiIotI2cIdx id, unsigned int baudrate)

-

unsigned int 

-

Initializes an I2C device with a specified baud rate.

-

I2cDeinit (WifiIotI2cIdx id)

-

unsigned int 

-

Deinitializes an I2C device.

-

I2cWrite (WifiIotI2cIdx id, unsigned short deviceAddr, const WifiIotI2cData *i2cData)

-

unsigned int 

-

Writes data to an I2C device.

-

I2cRead (WifiIotI2cIdx id, unsigned short deviceAddr, const WifiIotI2cData *i2cData)

-

unsigned int 

-

Reads data from an I2C device.

-
- diff --git a/api/api-LinkIoT/wifiiot_i2c_ex-h.md b/api/api-LinkIoT/wifiiot_i2c_ex-h.md deleted file mode 100755 index 4a702f607b39f83263f4e2a43a4a7c3ccaf9c341..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/wifiiot_i2c_ex-h.md +++ /dev/null @@ -1,101 +0,0 @@ -# wifiiot\_i2c\_ex.h - -## **Overview** - -**Related Modules:** - -[Wifiiot](Wifiiot.md) - -**Description:** - -Declares the extended I2C interface functions. - -These functions are used for I2C baud rate setting and device exception callback. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

WifiIotI2cFunc

-

Defines I2C callbacks.

-
- -## Typedefs - - - - - - - - - - - - - - - - -

Typedef Name

-

Description

-

I2CResetFunc) (void)

-

typedef void(* 

-

Indicates the callback invoked when a device exception occurs.

-

I2cPrepareFunc) (void)

-

typedef void(* 

-

Indicates the callback invoked for device preparation.

-

I2cRestoreFunc) (void)

-

typedef void(* 

-

Indicates the callback invoked for device recovery.

-
- -## Functions - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

I2cWriteread (WifiIotI2cIdx id, unsigned short deviceAddr, const WifiIotI2cData *i2cData)

-

unsigned int 

-

Sends data to and receives data responses from an I2C device.

-

I2cRegisterResetBusFunc (WifiIotI2cIdx id, WifiIotI2cFunc pfn)

-

void 

-

Registers an I2C callback.

-

I2cSetBaudrate (WifiIotI2cIdx id, unsigned int baudrate)

-

unsigned int 

-

Sets the baud rate for an I2C device.

-
- diff --git a/api/api-LinkIoT/wifiiot_i2s-h.md b/api/api-LinkIoT/wifiiot_i2s-h.md deleted file mode 100755 index c830c0004b0e2ee181fb417f182396ee30b6f1b0..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/wifiiot_i2s-h.md +++ /dev/null @@ -1,99 +0,0 @@ -# wifiiot\_i2s.h - -## **Overview** - -**Related Modules:** - -[Wifiiot](Wifiiot.md) - -**Description:** - -Declares the I2S interface functions. - -These functions are used for I2S initialization and data transmission. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

WifiIotI2sAttribute

-

Defines I2S attributes.

-
- -## Enumerations - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

WifiIotI2sSampleRate { WIFI_IOT_I2S_SAMPLE_RATE_8K = 8, WIFI_IOT_I2S_SAMPLE_RATE_16K = 16, WIFI_IOT_I2S_SAMPLE_RATE_32K = 32, WIFI_IOT_I2S_SAMPLE_RATE_48K = 48 }

-

Enumerates I2S sampling rates.

-

WifiIotI2sResolution { WIFI_IOT_I2S_RESOLUTION_16BIT = 16, WIFI_IOT_I2S_RESOLUTION_24BIT = 24 }

-

Enumerates I2S resolution.

-
- -## Functions - - - - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

I2sInit (const WifiIotI2sAttribute *i2sAttribute)

-

unsigned int 

-

Initializes the I2S device.

-

I2sDeinit (void)

-

unsigned int 

-

Deinitializes the I2S device.

-

I2sWrite (unsigned char *wrData, unsigned int wrLen, unsigned int timeOutMs)

-

unsigned int 

-

Writes data to the I2S device.

-

I2sRead (unsigned char *rdData, unsigned int rdLen, unsigned int timeOutMs)

-

unsigned int 

-

Reads data from the I2S device.

-
- diff --git a/api/api-LinkIoT/wifiiot_kal-h.md b/api/api-LinkIoT/wifiiot_kal-h.md deleted file mode 100755 index 19333e0e3a8c9275cd3544efc17b870920fbee97..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/wifiiot_kal-h.md +++ /dev/null @@ -1,66 +0,0 @@ -# wifiiot\_kal.h - -## **Overview** - -**Related Modules:** - -[Wifiiot](Wifiiot.md) - -**Description:** - -Declares the KAL interface functions. - -These functions are used to register the idle task and CPU tick callbacks. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Typedefs - - - - - - - - - - -

Typedef Name

-

Description

-

TickIdleKalCallback) (void)

-

typedef void(* 

-

Indicates the idle task and CPU tick callbacks.

-
- -## Functions - - - - - - - - - - - - - -

Function Name

-

Description

-

KalTickRegisterCallback (TickIdleKalCallback cb)

-

void 

-

Registers the CPU tick callback.

-

KalThreadRegisterIdleCallback (TickIdleKalCallback cb)

-

void 

-

Registers the idle task callback.

-
- diff --git a/api/api-LinkIoT/wifiiot_partition-h.md b/api/api-LinkIoT/wifiiot_partition-h.md deleted file mode 100755 index b3e2bb242b4518c2773df527fd02417e57fbfc73..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/wifiiot_partition-h.md +++ /dev/null @@ -1,104 +0,0 @@ -# wifiiot\_partition.h - -## **Overview** - -**Related Modules:** - -[Wifiiot](Wifiiot.md) - -**Description:** - -Declares the partition interface functions. - -These functions are used to initialize partitions and obtain partition tables. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

WifiIotFlashPartitionInfo

-

Describes an entry in a flash partition table.

-

WifiIotFlashPartitionTable

-

Describes a flash partition table.

-
- -## Macros - - - - - - - - - - -

Macro Name and Value

-

Description

-

WIFI_IOT_FLASH_PARTITON_MAX   12

-

Indicates the maximum number of partition tables.

-
- -## Enumerations - - - - - - - - - - -

Enumeration Name

-

Description

-

WifiIotFlashPartitionTableId {   WIFI_IOT_FLASH_PARTITON_BOOT = 0, WIFI_IOT_FLASH_PARTITON_FACTORY_NV, WIFI_IOT_FLASH_PARTITON_NORMAL_NV, WIFI_IOT_FLASH_PARTITON_NORMAL_NV_BACKUP,   WIFI_IOT_FLASH_PARTITON_KERNEL_A, WIFI_IOT_FLASH_PARTITON_KERNEL_B, WIFI_IOT_FLASH_PARTITON_HILINK, WIFI_IOT_FLASH_PARTITON_FILE_SYSTEM,   WIFI_IOT_FLASH_PARTITON_USR_RESERVE, WIFI_IOT_FLASH_PARTITON_HILINK_PKI, WIFI_IOT_FLASH_PARTITON_CRASH_INFO, WIFI_IOT_FLASH_PARTITON_BOOT_BACK }

-

Indicates the partition table ID.

-
- -## Functions - - - - - - - - - - - - - -

Function Name

-

Description

-

FlashPartitionInit (void)

-

unsigned int 

-

Initializes a flash partition.

-

GetPartitionTable (void)

-

WifiIotFlashPartitionTable

-

Obtains a flash partition table.

-
- diff --git a/api/api-LinkIoT/wifiiot_pwm-h.md b/api/api-LinkIoT/wifiiot_pwm-h.md deleted file mode 100755 index 0be202b6e3623a487498adfea21df0b0847d07f9..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/wifiiot_pwm-h.md +++ /dev/null @@ -1,82 +0,0 @@ -# wifiiot\_pwm.h - -## **Overview** - -**Related Modules:** - -[Wifiiot](Wifiiot.md) - -**Description:** - -Declares the PWM interface functions. - -These functions are used for PWM initialization, deinitialization, and signal output. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Enumerations - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

WifiIotPwmClkSource { WIFI_IOT_PWM_CLK_160M, WIFI_IOT_PWM_CLK_XTAL, WIFI_IOT_PWM_CLK_MAX }

-

Enumerates PWM clock sources.

-

WifiIotPwmPort {   WIFI_IOT_PWM_PORT_PWM0 = 0, WIFI_IOT_PWM_PORT_PWM1 = 1, WIFI_IOT_PWM_PORT_PWM2 = 2, WIFI_IOT_PWM_PORT_PWM3 = 3,   WIFI_IOT_PWM_PORT_PWM4 = 4, WIFI_IOT_PWM_PORT_PWM5 = 5, WIFI_IOT_PWM_PORT_MAX }

-

Enumerates PWM ports.

-
- -## Functions - - - - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

PwmInit (WifiIotPwmPort port)

-

unsigned int 

-

Initializes a PWM device.

-

PwmDeinit (WifiIotPwmPort port)

-

unsigned int 

-

Deinitializes a PWM device.

-

PwmStart (WifiIotPwmPort port, unsigned short duty, unsigned short freq)

-

unsigned int 

-

Outputs PWM signals based on the input parameters.

-

PwmStop (WifiIotPwmPort port)

-

unsigned int 

-

Stops the PWM signal output.

-
- diff --git a/api/api-LinkIoT/wifiiot_sdio-h.md b/api/api-LinkIoT/wifiiot_sdio-h.md deleted file mode 100755 index 74e8a4d2a137e447c56007dac5dedc5f10dea862..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/wifiiot_sdio-h.md +++ /dev/null @@ -1,206 +0,0 @@ -# wifiiot\_sdio.h - -## **Overview** - -**Related Modules:** - -[Wifiiot](Wifiiot.md) - -**Description:** - -Declares the SDIO interface functions. - -These functions are used for SDIO initialization and data transmission. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

WifiIotSdioExtendFunc

-

Provides extended SDIO attributes.

-

WifiIotSdioAdmatable

-

Defines attributes of an SDIO ADMA table.

-

WifiIotSdioIntcallback

-

SDIO interrupt callback structure.

-
- -## Macros - - - - - - - - - - -

Macro Name and Value

-

Description

-

WIFI_IOT_SDIO_EXTENDREG_COUNT   64

-

Indicates the number of extended registers on an SDIO device.

-
- -## Typedefs - - - - - - - - - - -

Typedef Name

-

Description

-

NotifyHostMessageEvent) (void)

-

typedef void(* 

-

Indicates the callback invoked upon a message event on the host.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

SdioInit (void)

-

unsigned int 

-

Initializes the SDIO device.

-

SdioReinit (void)

-

unsigned int 

-

Reinitializes the SDIO device.

-

SdioSoftReset (void)

-

void 

-

Resets the SDIO device.

-

SdioRegisterCallback (const WifiIotSdioIntcallback *callbackFunc)

-

unsigned int 

-

Registers an interrupt callback for the SDIO device.

-

SdioCompleteSend (unsigned char *admaTable, unsigned int admaIndex)

-

unsigned int 

-

Completes data sending on the SDIO device.

-

SdioSetPadAdmatab (unsigned int padlen, unsigned char *admatable, unsigned int admaIndex)

-

unsigned int 

-

Sets the ADMA table that requires data padding.

-

SdioWriteExtinfo (WifiIotSdioExtendFunc *extFunc)

-

unsigned int 

-

Sets the extended SDIO attributes.

-

SdioSendData (unsigned int xferBytes)

-

void 

-

Starts to send data.

-

SdioSetAdmatable (unsigned char *admatable, unsigned int admaIndex, const unsigned int *dataAddr, unsigned int dataLen)

-

unsigned int 

-

Sets an SDIO ADMA.

-

SdioSchedMsg (void)

-

unsigned int 

-

Sends a suspended SDIO message.

-

SdioSendSyncMsg (unsigned int msg)

-

unsigned int 

-

Adds a message to a message queue and sends the message.

-

SdioSendMsgAck (unsigned int msg)

-

unsigned int 

-

Sends a specified message.

-

SdioProcessMsg (unsigned int sendMsg, unsigned int clearMsg)

-

unsigned int 

-

Clears a specified suspended message in the message queue, adds a new message to it, and sends the new message.

-

SdioIsPendingMsg (unsigned int msg)

-

unsigned int 

-

Checks whether a specified message is suspended.

-

SdioIsSendingMsg (unsigned int msg)

-

unsigned int 

-

Checks whether a specified message is being sent.

-

SdioGetExtendInfo (void)

-

WifiIotSdioExtendFunc

-

Obtains the extended configuration.

-

SdioRegisterNotifyMessageCallback (NotifyHostMessageEvent msgEventCallback)

-

void 

-

Registers the callback that will be invoked when the host sends a message or data.

-

SdioSetPowerdownWhenDeepSleep (unsigned char powerDown)

-

void 

-

Sets whether the SDIO device is powered off in deep sleep mode.

-
- diff --git a/api/api-LinkIoT/wifiiot_spi-h.md b/api/api-LinkIoT/wifiiot_spi-h.md deleted file mode 100755 index b16d6a26f733a832e1dc600364118d600a598f16..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/wifiiot_spi-h.md +++ /dev/null @@ -1,190 +0,0 @@ -# wifiiot\_spi.h - -## **Overview** - -**Related Modules:** - -[Wifiiot](Wifiiot.md) - -**Description:** - -Declares the SPI interface functions. - -These functions are used for SPI initialization, deinitialization, and data transmission. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

WifiIotSpiCfgBasicInfo

-

Defines data communication parameters.

-

WifiIotSpiCfgInitParam

-

Specifies whether a device is a master or slave device.

-
- -## Typedefs - - - - - - - - - - -

Typedef Name

-

Description

-

SpiIsrFunc) (void)

-

typedef void(* 

-

Indicates the SPI callback, which is used in SpiRegisterUsrFunc.

-
- -## Enumerations - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

WifiIotSpiIdx { WIFI_IOT_SPI_ID_0 = 0, WIFI_IOT_SPI_ID_1 }

-

Enumerates SPI channel IDs.

-

WifiIotSpiCfgClockCpol { WIFI_IOT_SPI_CFG_CLOCK_CPOL_0, WIFI_IOT_SPI_CFG_CLOCK_CPOL_1 }

-

Enumerates communication polarities.

-

WifiIotSpiCfgClockCpha { WIFI_IOT_SPI_CFG_CLOCK_CPHA_0, WIFI_IOT_SPI_CFG_CLOCK_CPHA_1 }

-

Enumerates communication phases.

-

WifiIotSpiCfgFramMode { WIFI_IOT_SPI_CFG_FRAM_MODE_MOTOROLA, WIFI_IOT_SPI_CFG_FRAM_MODE_TI, WIFI_IOT_SPI_CFG_FRAM_MODE_MICROWIRE }

-

Enumerates communication protocols.

-

WifiIotSpiCfgDataWidth {   WIFI_IOT_SPI_CFG_DATA_WIDTH_E_4BIT = 0x3, WIFI_IOT_SPI_CFG_DATA_WIDTH_E_5BIT, WIFI_IOT_SPI_CFG_DATA_WIDTH_E_6BIT, WIFI_IOT_SPI_CFG_DATA_WIDTH_E_7BIT,   WIFI_IOT_SPI_CFG_DATA_WIDTH_E_8BIT, WIFI_IOT_SPI_CFG_DATA_WIDTH_E_9BIT, WIFI_IOT_SPI_CFG_DATA_WIDTH_E_10BIT, WIFI_IOT_SPI_CFG_DATA_WIDTH_E_11BIT,   WIFI_IOT_SPI_CFG_DATA_WIDTH_E_12BIT, WIFI_IOT_SPI_CFG_DATA_WIDTH_E_13BIT, WIFI_IOT_SPI_CFG_DATA_WIDTH_E_14BIT, WIFI_IOT_SPI_CFG_DATA_WIDTH_E_15BIT,   WIFI_IOT_SPI_CFG_DATA_WIDTH_E_16BIT }

-

Enumerates the communication data width, that is, the number of valid bits in each frame.

-

WifiIotSpiCfgEndian { WIFI_IOT_SPI_CFG_ENDIAN_LITTLE, WIFI_IOT_SPI_CFG_ENDIAN_BIG }

-

Enumerates the endian mode of each frame.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

SpiSlaveWrite (WifiIotSpiIdx spiId, char *writeData, unsigned int byteLen, unsigned int timeOutMs)

-

unsigned int 

-

Sends data in SPI slave mode.

-

SpiSlaveRead (WifiIotSpiIdx spiId, char *readData, unsigned int byteLen, unsigned int timeOutMs)

-

unsigned int 

-

Reads data in SPI slave mode.

-

SpiHostWrite (WifiIotSpiIdx spiId, char *writeData, unsigned int byteLen)

-

unsigned int 

-

Sends data in half-duplex SPI master mode.

-

SpiHostRead (WifiIotSpiIdx spiId, char *readData, unsigned int byteLen)

-

unsigned int 

-

Reads data in half-duplex SPI master mode.

-

SpiHostWriteread (WifiIotSpiIdx spiId, char *writeData, char *readData, unsigned int byteLen)

-

unsigned int 

-

Sends and reads data in full-duplex SPI master mode.

-

SpiSetBasicInfo (WifiIotSpiIdx spiId, const WifiIotSpiCfgBasicInfo *param)

-

unsigned int 

-

Sets the SPI channel parameter.

-

SpiInit (WifiIotSpiIdx spiId, WifiIotSpiCfgInitParam initParam, const WifiIotSpiCfgBasicInfo *param)

-

unsigned int 

-

Initializes an SPI device.

-

SpiDeinit (WifiIotSpiIdx spiId)

-

unsigned int 

-

Deinitializes an SPI device.

-

SpiSetIrqMode (WifiIotSpiIdx spiId, unsigned char irqEn)

-

unsigned int 

-

Sets whether to enable the interrupt request (IRQ) mode for an SPI device.

-

SpiSetDmaMode (WifiIotSpiIdx spiId, unsigned char dmaEn)

-

unsigned int 

-

Sets whether to enable DMA to transfer data for an SPI device in slave mode.

-

SpiRegisterUsrFunc (WifiIotSpiIdx spiId, SpiIsrFunc prepareF, SpiIsrFunc restoreF)

-

unsigned int 

-

Registers the data TX preparation/recovery function.

-

SpiSetLoopBackMode (WifiIotSpiIdx spiId, unsigned char lbEn)

-

unsigned int 

-

Sets whether to enable loopback test for an SPI device.

-
- diff --git a/api/api-LinkIoT/wifiiot_uart-h.md b/api/api-LinkIoT/wifiiot_uart-h.md deleted file mode 100755 index 29408283473f85ec1fd3df1d99ab7ade86685f2c..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/wifiiot_uart-h.md +++ /dev/null @@ -1,140 +0,0 @@ -# wifiiot\_uart.h - -## **Overview** - -**Related Modules:** - -[Wifiiot](Wifiiot.md) - -**Description:** - -Declares the UART interface functions. - -These functions are used for UART initialization, data input/output, and data flow control. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

WifiIotUartAttribute

-

Defines the basic attributes of a UART device.

-

WifiIotUartExtraAttr

-

Defines the extended attributes of a UART device.

-
- -## Enumerations - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

WifiIotUartIdx { WIFI_IOT_UART_IDX_0, WIFI_IOT_UART_IDX_1, WIFI_IOT_UART_IDX_2, WIFI_IOT_UART_IDX_MAX }

-

Enumerates the UART serial number.

-

WifiIotUartIdxDataBit { WIFI_IOT_UART_DATA_BIT_5 = 5, WIFI_IOT_UART_DATA_BIT_6, WIFI_IOT_UART_DATA_BIT_7, WIFI_IOT_UART_DATA_BIT_8 }

-

Enumerates the number of UART data bits.

-

WifiIotUartStopBit { WIFI_IOT_UART_STOP_BIT_1 = 1, WIFI_IOT_UART_STOP_BIT_2 = 2 }

-

Enumerates the number of UART stop bits.

-

WifiIotUartParity { WIFI_IOT_UART_PARITY_NONE = 0, WIFI_IOT_UART_PARITY_ODD = 1, WIFI_IOT_UART_PARITY_EVEN = 2 }

-

Enumerates the UART parity bit.

-

WifiIotUartFifoLine {   WIFI_IOT_FIFO_LINE_ONE_EIGHT = 1, WIFI_IOT_FIFO_LINE_ONE_QUARTER, WIFI_IOT_FIFO_LINE_HALF, WIFI_IOT_FIFO_LINE_THREE_QUARTERS,   WIFI_IOT_FIFO_LINE_SEVEN_EIGHTS }

-

Enumerates UART FIFO interrupt thresholds.

-

WifiIotUartBlockState { WIFI_IOT_UART_BLOCK_STATE_NONE_BLOCK = 1, WIFI_IOT_UART_BLOCK_STATE_BLOCK }

-

Enumerates UART block states.

-

WifiIotUartDmaState { WIFI_IOT_UART_NONE_DMA = 1, WIFI_IOT_UART_USE_DMA }

-

Enumerates UART DMA states.

-

WifiIotFlowCtrl { WIFI_IOT_FLOW_CTRL_NONE, WIFI_IOT_FLOW_CTRL_RTS_CTS, WIFI_IOT_FLOW_CTRL_RTS_ONLY, WIFI_IOT_FLOW_CTRL_CTS_ONLY }

-

Enumerates hardware flow control modes.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

UartInit (WifiIotUartIdx id, const WifiIotUartAttribute *param, const WifiIotUartExtraAttr *extraAttr)

-

unsigned int 

-

Configures a UART device.

-

UartRead (WifiIotUartIdx id, unsigned char *data, unsigned int dataLen)

-

int 

-

Reads data from a UART device.

-

UartWrite (WifiIotUartIdx id, const unsigned char *data, unsigned int dataLen)

-

int 

-

Writes data to a UART device.

-

UartDeinit (WifiIotUartIdx id)

-

unsigned int 

-

Deinitializes a UART device.

-

UartSetFlowCtrl (WifiIotUartIdx id, WifiIotFlowCtrl flowCtrl)

-

unsigned int 

-

Sets UART hardware flow control.

-
- diff --git a/api/api-LinkIoT/wifiiot_uart_ex-h.md b/api/api-LinkIoT/wifiiot_uart_ex-h.md deleted file mode 100755 index 10303a49db176aa12ca06e561aa9c6b528354eb1..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/wifiiot_uart_ex-h.md +++ /dev/null @@ -1,60 +0,0 @@ -# wifiiot\_uart\_ex.h - -## **Overview** - -**Related Modules:** - -[Wifiiot](Wifiiot.md) - -**Description:** - -Declares the extended UART interface functions. - -These functions are used to obtain UART attributes and check the busy status. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Functions - - - - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

UartIsBufEmpty (WifiIotUartIdx id, unsigned char *empty)

-

unsigned int 

-

Checks whether the buffer on a UART device is empty.

-

UartWriteImmediately (WifiIotUartIdx id, const unsigned char *data, unsigned int dataLen)

-

int 

-

Writes data to be sent to a UART device in polling mode.

-

UartGetAttribute (WifiIotUartIdx id, WifiIotUartAttribute *attr, WifiIotUartExtraAttr *extraAttr)

-

unsigned int 

-

Obtains UART attributes.

-

UartIsBusy (WifiIotUartIdx id, unsigned char *busy)

-

unsigned int 

-

Checks whether the buffer on a UART device is busy.

-
- diff --git a/api/api-LinkIoT/wifiiot_watchdog-h.md b/api/api-LinkIoT/wifiiot_watchdog-h.md deleted file mode 100755 index 2f970a62a25782fdc7e291fec3e1bb12b717bc46..0000000000000000000000000000000000000000 --- a/api/api-LinkIoT/wifiiot_watchdog-h.md +++ /dev/null @@ -1,54 +0,0 @@ -# wifiiot\_watchdog.h - -## **Overview** - -**Related Modules:** - -[Wifiiot](Wifiiot.md) - -**Description:** - -Declares the watchdog interface functions. - -These functions are used to enable, disable, and feed the watchdog. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Functions - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

WatchDogEnable (void)

-

void 

-

Enables the watchdog.

-

WatchDogKick (void)

-

void 

-

Feeds the watchdog.

-

WatchDogDisable (void)

-

void 

-

Disables the watchdog.

-
- diff --git "a/api/api-LinkIoT/\345\205\254\345\205\261\345\237\272\347\241\200\345\272\223.md" "b/api/api-LinkIoT/\345\205\254\345\205\261\345\237\272\347\241\200\345\272\223.md" deleted file mode 100755 index 4621f673523c71716db15204665c7e88e5bb70ca..0000000000000000000000000000000000000000 --- "a/api/api-LinkIoT/\345\205\254\345\205\261\345\237\272\347\241\200\345\272\223.md" +++ /dev/null @@ -1,5 +0,0 @@ -# 公共基础库 - -- **[Utils子系统](Utils子系统.md)** - - diff --git "a/api/api-LinkIoT/\345\205\254\345\205\261\351\200\232\344\277\241\345\255\220\347\263\273\347\273\237.md" "b/api/api-LinkIoT/\345\205\254\345\205\261\351\200\232\344\277\241\345\255\220\347\263\273\347\273\237.md" deleted file mode 100755 index a5ac6f216d72d93b94e8d641cdc8f3845f243f3e..0000000000000000000000000000000000000000 --- "a/api/api-LinkIoT/\345\205\254\345\205\261\351\200\232\344\277\241\345\255\220\347\263\273\347\273\237.md" +++ /dev/null @@ -1,7 +0,0 @@ -# 公共通信子系统 - -- **[Wifiservice](Wifiservice.md)** - -- **[Softbus](Softbus.md)** - - diff --git "a/api/api-LinkIoT/\345\206\205\346\240\270\345\255\220\347\263\273\347\273\237.md" "b/api/api-LinkIoT/\345\206\205\346\240\270\345\255\220\347\263\273\347\273\237.md" deleted file mode 100755 index 7545c387694b4f6c13ab68f5f84c32ef568fe359..0000000000000000000000000000000000000000 --- "a/api/api-LinkIoT/\345\206\205\346\240\270\345\255\220\347\263\273\347\273\237.md" +++ /dev/null @@ -1,7 +0,0 @@ -# 内核子系统 - -- **[CMSIS](CMSIS.md)** - -- **[KAL](KAL.md)** - - diff --git "a/api/api-LinkIoT/\345\237\272\347\241\200\350\275\257\344\273\266\346\234\215\345\212\241\345\255\220\347\263\273\347\273\237\351\233\206\345\217\212\347\241\254\344\273\266\346\234\215\345\212\241\345\255\220\347\263\273\347\273\237\351\233\206.md" "b/api/api-LinkIoT/\345\237\272\347\241\200\350\275\257\344\273\266\346\234\215\345\212\241\345\255\220\347\263\273\347\273\237\351\233\206\345\217\212\347\241\254\344\273\266\346\234\215\345\212\241\345\255\220\347\263\273\347\273\237\351\233\206.md" deleted file mode 100755 index 56c3b474570a43971ff631c072263d35ae6dc853..0000000000000000000000000000000000000000 --- "a/api/api-LinkIoT/\345\237\272\347\241\200\350\275\257\344\273\266\346\234\215\345\212\241\345\255\220\347\263\273\347\273\237\351\233\206\345\217\212\347\241\254\344\273\266\346\234\215\345\212\241\345\255\220\347\263\273\347\273\237\351\233\206.md" +++ /dev/null @@ -1,5 +0,0 @@ -# 基础软件服务子系统集及硬件服务子系统集 - -- **[电源管理子系统](电源管理子系统.md)** - - diff --git "a/api/api-LinkIoT/\345\244\264\346\226\207\344\273\266.md" "b/api/api-LinkIoT/\345\244\264\346\226\207\344\273\266.md" deleted file mode 100755 index 2c3215ff4cfbf88bf1280bfdbfa4aaaeb55246ab..0000000000000000000000000000000000000000 --- "a/api/api-LinkIoT/\345\244\264\346\226\207\344\273\266.md" +++ /dev/null @@ -1,89 +0,0 @@ -# 头文件 - -- **[common.h](common-h.md)** - -- **[discovery\_service.h](discovery_service-h.md)** - -- **[feature.h](feature-h.md)** - -- **[iunknown.h](iunknown-h.md)** - -- **[kal.h](kal-h.md)** - -- **[kv\_store.h](kv_store-h.md)** - -- **[lowpower.h](lowpower-h.md)** - -- **[message.h](message-h.md)** - -- **[ohos\_init.h](ohos_init-h.md)** - -- **[parameter.h](parameter-h.md)** - -- **[reset.h](reset-h.md)** - -- **[session.h](session-h.md)** - -- **[station\_info.h](station_info-h.md)** - -- **[samgr\_lite.h](samgr_lite-h.md)** - -- **[service.h](service-h.md)** - -- **[utils\_config.h](utils_config-h.md)** - -- **[utils\_file.h](utils_file-h.md)** - -- **[wifi\_device.h](wifi_device-h.md)** - -- **[wifi\_device\_config.h](wifi_device_config-h.md)** - -- **[wifi\_error\_code.h](wifi_error_code-h.md)** - -- **[wifi\_event.h](wifi_event-h.md)** - -- **[wifi\_hotspot.h](wifi_hotspot-h.md)** - -- **[wifi\_hotspot\_config.h](wifi_hotspot_config-h.md)** - -- **[wifi\_linked\_info.h](wifi_linked_info-h.md)** - -- **[wifi\_scan\_info.h](wifi_scan_info-h.md)** - -- **[wifiiot\_adc.h](wifiiot_adc-h.md)** - -- **[wifiiot\_at.h](wifiiot_at-h.md)** - -- **[wifiiot\_errno.h](wifiiot_errno-h.md)** - -- **[wifiiot\_flash.h](wifiiot_flash-h.md)** - -- **[wifiiot\_flash\_ex.h](wifiiot_flash_ex-h.md)** - -- **[wifiiot\_gpio.h](wifiiot_gpio-h.md)** - -- **[wifiiot\_gpio\_ex.h](wifiiot_gpio_ex-h.md)** - -- **[wifiiot\_i2c.h](wifiiot_i2c-h.md)** - -- **[wifiiot\_i2c\_ex.h](wifiiot_i2c_ex-h.md)** - -- **[wifiiot\_i2s.h](wifiiot_i2s-h.md)** - -- **[wifiiot\_kal.h](wifiiot_kal-h.md)** - -- **[wifiiot\_partition.h](wifiiot_partition-h.md)** - -- **[wifiiot\_pwm.h](wifiiot_pwm-h.md)** - -- **[wifiiot\_sdio.h](wifiiot_sdio-h.md)** - -- **[wifiiot\_spi.h](wifiiot_spi-h.md)** - -- **[wifiiot\_uart.h](wifiiot_uart-h.md)** - -- **[wifiiot\_uart\_ex.h](wifiiot_uart_ex-h.md)** - -- **[wifiiot\_watchdog.h](wifiiot_watchdog-h.md)** - - diff --git "a/api/api-LinkIoT/\345\244\264\346\226\207\344\273\266\345\222\214\347\273\223\346\236\204\344\275\223.md" "b/api/api-LinkIoT/\345\244\264\346\226\207\344\273\266\345\222\214\347\273\223\346\236\204\344\275\223.md" deleted file mode 100755 index b0f4110dcb5752934268f85556935f2abe34c653..0000000000000000000000000000000000000000 --- "a/api/api-LinkIoT/\345\244\264\346\226\207\344\273\266\345\222\214\347\273\223\346\236\204\344\275\223.md" +++ /dev/null @@ -1,7 +0,0 @@ -# 头文件和结构体 - -- **[头文件](头文件.md)** - -- **[结构体](结构体.md)** - - diff --git "a/api/api-LinkIoT/\346\234\215\345\212\241\346\241\206\346\236\266\345\255\220\347\263\273\347\273\237.md" "b/api/api-LinkIoT/\346\234\215\345\212\241\346\241\206\346\236\266\345\255\220\347\263\273\347\273\237.md" deleted file mode 100755 index 309d019a9e4856c6e2d611c5a5d1965c5689a88f..0000000000000000000000000000000000000000 --- "a/api/api-LinkIoT/\346\234\215\345\212\241\346\241\206\346\236\266\345\255\220\347\263\273\347\273\237.md" +++ /dev/null @@ -1,9 +0,0 @@ -# 服务框架子系统 - -- **[Broadcast](Broadcast.md)** - -- **[Samgr](Samgr.md)** - -- **[OHOS Init](OHOS-Init.md)** - - diff --git "a/api/api-LinkIoT/\346\240\207\345\207\206\345\272\223.md" "b/api/api-LinkIoT/\346\240\207\345\207\206\345\272\223.md" deleted file mode 100755 index 5639820d4c1ab386e25e5f9f323cc26457c26a74..0000000000000000000000000000000000000000 --- "a/api/api-LinkIoT/\346\240\207\345\207\206\345\272\223.md" +++ /dev/null @@ -1,7 +0,0 @@ -# 标准库 - -- **[CMSIS](CMSIS.md)** - -- **[KAL](KAL.md)** - - diff --git "a/api/api-LinkIoT/\347\224\265\346\272\220\347\256\241\347\220\206\345\255\220\347\263\273\347\273\237.md" "b/api/api-LinkIoT/\347\224\265\346\272\220\347\256\241\347\220\206\345\255\220\347\263\273\347\273\237.md" deleted file mode 100755 index b4c6109a214cf70d06cd0b4552e53d295028ad82..0000000000000000000000000000000000000000 --- "a/api/api-LinkIoT/\347\224\265\346\272\220\347\256\241\347\220\206\345\255\220\347\263\273\347\273\237.md" +++ /dev/null @@ -1,5 +0,0 @@ -# 电源管理子系统 - -- **[Power](Power.md)** - - diff --git "a/api/api-LinkIoT/\347\263\273\347\273\237\345\237\272\347\241\200\350\203\275\345\212\233\345\255\220\347\263\273\347\273\237\351\233\206.md" "b/api/api-LinkIoT/\347\263\273\347\273\237\345\237\272\347\241\200\350\203\275\345\212\233\345\255\220\347\263\273\347\273\237\351\233\206.md" deleted file mode 100755 index 4962d4c98e6ef29a53865c4e9170ed2d7402c043..0000000000000000000000000000000000000000 --- "a/api/api-LinkIoT/\347\263\273\347\273\237\345\237\272\347\241\200\350\203\275\345\212\233\345\255\220\347\263\273\347\273\237\351\233\206.md" +++ /dev/null @@ -1,7 +0,0 @@ -# 系统基础能力子系统集 - -- **[公共通信子系统](公共通信子系统.md)** - -- **[服务框架子系统](服务框架子系统.md)** - - diff --git "a/api/api-LinkIoT/\347\273\223\346\236\204\344\275\223.md" "b/api/api-LinkIoT/\347\273\223\346\236\204\344\275\223.md" deleted file mode 100755 index f92e731cb46ffa58cfa67aa6fe18815089d58c50..0000000000000000000000000000000000000000 --- "a/api/api-LinkIoT/\347\273\223\346\236\204\344\275\223.md" +++ /dev/null @@ -1,99 +0,0 @@ -# 结构体 - -- **[AtCmdTbl](AtCmdTbl.md)** - -- **[Consumer](Consumer.md)** - -- **[CapabilityMap](CapabilityMap.md)** - -- **[CommonDeviceInfo](CommonDeviceInfo.md)** - -- **[DeviceMap](DeviceMap.md)** - -- **[Feature](Feature.md)** - -- **[HotspotConfig](HotspotConfig.md)** - -- **[IPublishCallback](IPublishCallback.md)** - -- **[ISessionListener](ISessionListener.md)** - -- **[IUnknown](IUnknown.md)** - -- **[IUnknownEntry](IUnknownEntry.md)** - -- **[Identity](Identity.md)** - -- **[MemInfo](MemInfo.md)** - -- **[Provider](Provider.md)** - -- **[PublishInfo](PublishInfo.md)** - -- **[Request](Request.md)** - -- **[Response](Response.md)** - -- **[Subscriber](Subscriber.md)** - -- **[StationInfo](StationInfo.md)** - -- **[SimpleVector](SimpleVector.md)** - -- **[SamgrLite](SamgrLite.md)** - -- **[Service](Service.md)** - -- **[ThreadInfo](ThreadInfo.md)** - -- **[TaskConfig](TaskConfig.md)** - -- **[WifiDeviceConfig](WifiDeviceConfig.md)** - -- **[WifiScanParams](WifiScanParams.md)** - -- **[WifiEvent](WifiEvent.md)** - -- **[WifiLinkedInfo](WifiLinkedInfo.md)** - -- **[WifiScanInfo](WifiScanInfo.md)** - -- **[WifiIotI2cData](WifiIotI2cData.md)** - -- **[WifiIotI2cFunc](WifiIotI2cFunc.md)** - -- **[WifiIotI2sAttribute](WifiIotI2sAttribute.md)** - -- **[WifiIotFlashPartitionInfo](WifiIotFlashPartitionInfo.md)** - -- **[WifiIotFlashPartitionTable](WifiIotFlashPartitionTable.md)** - -- **[WifiIotSdioExtendFunc](WifiIotSdioExtendFunc.md)** - -- **[WifiIotSdioAdmatable](WifiIotSdioAdmatable.md)** - -- **[WifiIotSdioIntcallback](WifiIotSdioIntcallback.md)** - -- **[WifiIotSpiCfgBasicInfo](WifiIotSpiCfgBasicInfo.md)** - -- **[WifiIotSpiCfgInitParam](WifiIotSpiCfgInitParam.md)** - -- **[WifiIotUartAttribute](WifiIotUartAttribute.md)** - -- **[WifiIotUartExtraAttr](WifiIotUartExtraAttr.md)** - -- **[osVersion\_t](osVersion_t.md)** - -- **[osThreadAttr\_t](osThreadAttr_t.md)** - -- **[osTimerAttr\_t](osTimerAttr_t.md)** - -- **[osEventFlagsAttr\_t](osEventFlagsAttr_t.md)** - -- **[osMutexAttr\_t](osMutexAttr_t.md)** - -- **[osSemaphoreAttr\_t](osSemaphoreAttr_t.md)** - -- **[osMessageQueueAttr\_t](osMessageQueueAttr_t.md)** - - diff --git a/api/api-SmartVision-Devices/AbilityInfo.md b/api/api-SmartVision-Devices/AbilityInfo.md deleted file mode 100755 index 267ec0820f9f56d64e9b8905b7615f0b2ab85fed..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/AbilityInfo.md +++ /dev/null @@ -1,196 +0,0 @@ -# AbilityInfo - -- [Overview](#section882073317165630) -- [Summary](#section1526513014165630) -- [Data Fields](#pub-attribs) -- [Details](#section1783701407165630) -- [Field](#section1478988012165630) -- [abilityType](#a893eba71c44fd9c08e8733b20edf4fa9) -- [bundleName](#a071361f43e3973bce0c86d8d28e41692) -- [description](#a2c4a58f6468c279b53d3edbf28bc28c6) -- [deviceId](#a6c5163afaa860ee12ea029ed5968f710) -- [iconPath](#a50d5d440688f11d83bd10046261c6a2c) -- [isVisible](#abe0dd3ffd96d9b74b19548814ba79796) -- [label](#ad3141a1bb211abe573af09a4941e822a) -- [launchMode](#ad8ed168cd50b2a1bba57271d6d930ed5) -- [moduleName](#a1a85f8b50cbf756c4eeddaef5b83dc85) -- [name](#a6d005fd16f726a6800637853e46e7c24) - -## **Overview** - -**Related Modules:** - -[BundleManager](BundleManager.md) - -**Description:** - -Defines the ability information. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

isVisible

-

bool

-

abilityType

-

AbilityType

-

launchMode

-

LaunchMode

-

moduleName

-

char *

-

name

-

char *

-

description

-

char *

-

iconPath

-

char *

-

deviceId

-

char *

-

label

-

char *

-

bundleName

-

char *

-
- -## **Details** - -## **Field ** - -## abilityType - -``` -[AbilityType](BundleManager.md#ga44b675d687acff3d739404c1227b4259) AbilityInfo::abilityType -``` - - **Description:** - -Template used by the ability - -## bundleName - -``` -char* AbilityInfo::bundleName -``` - - **Description:** - -Pointer to the application bundle name - -## description - -``` -char* AbilityInfo::description -``` - - **Description:** - -Pointer to the description of the ability - -## deviceId - -``` -char* AbilityInfo::deviceId -``` - - **Description:** - -Pointer to the device ID - -## iconPath - -``` -char* AbilityInfo::iconPath -``` - - **Description:** - -Pointer to the icon path of the ability - -## isVisible - -``` -bool AbilityInfo::isVisible -``` - - **Description:** - -Whether the ability is visible - -## label - -``` -char* AbilityInfo::label -``` - - **Description:** - -Pointer to the ability name visible to users - -## launchMode - -``` -[LaunchMode](BundleManager.md#ga605d46d860e356a74db6842e66522854) AbilityInfo::launchMode -``` - - **Description:** - -Startup mode of the ability - -## moduleName - -``` -char* AbilityInfo::moduleName -``` - - **Description:** - -Pointer to the name of the HAP package to which the ability belongs. The HAP information is encapsulated in a [ModuleInfo](ModuleInfo.md) object. - -## name - -``` -char* AbilityInfo::name -``` - - **Description:** - -Pointer to the class name of the ability - diff --git a/api/api-SmartVision-Devices/AbilityKit.md b/api/api-SmartVision-Devices/AbilityKit.md deleted file mode 100755 index 41d1609c49a2e33a9be1f60b63893b6b2b21c3f3..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/AbilityKit.md +++ /dev/null @@ -1,1700 +0,0 @@ -# AbilityKit - -- [Overview](#section2113005606165623) -- [Summary](#section50038972165623) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Macros](#define-members) -- [Enumerations](#enum-members) -- [Functions](#func-members) -- [Details](#section268415259165623) -- [Macro Definition](#section1597786070165623) -- [REGISTER\_AA](#ga2c5bd891b502a92f937ae4bff3f80cad) -- [REGISTER\_AS](#ga8e811999b2b7780e67cb746d045ab5b8) -- [Enumeration Type](#section1266264770165623) -- [anonymous enum](#ga99fb83031ce9923c84392b4e92f956b5) -- [State](#ga5d74787dedbc4e11c1ab15bf487e61f8) -- [Function](#section1829026629165623) -- [ClearWant\(\)](#ga62ca448e092c81497ffdd1f0b1c56938) -- [ConnectAbility\(\) \[1/2\]](#ga4da460ac085a8da1c665f317fcde2ba1) -- [ConnectAbility\(\) \[2/2\]](#gaae6c2bbb6ab0df92e39c1daad2bd901f) -- [DisconnectAbility\(\) \[1/2\]](#ga1d9023597a9889dbb4015565a10f3470) -- [DisconnectAbility\(\) \[2/2\]](#ga2769216a4c2654d3297a2fdb4011ea7a) -- [Dump\(\)](#ga5330624843c776ebe61366540d32eb92) -- [GetBundleName\(\)](#gac893d7c01fabee34f80294e3e026c37d) -- [GetCurrentHandler\(\)](#gad26d144aaecd3185be6902e6d7399b9e) -- [GetDataPath\(\)](#ga9be6a002714f3fb61b2335dd13ed9787) -- [GetSrcPath\(\)](#ga7cead123e67bea6db8a34c8ae100e6c5) -- [MsgHandle\(\)](#gab2d208621c7236c3608afb77d8a02966) -- [OnActive\(\) \[1/2\]](#ga1a588eb6635e42979e18ac8013f9ea61) -- [OnActive\(\) \[2/2\]](#ga3135bfa435f5aaa185f21014a9e86e59) -- [OnBackground\(\) \[1/2\]](#ga19217479f8468b525460be156827a524) -- [OnBackground\(\) \[2/2\]](#ga8185ad517d94ca99a00917d3d1f10620) -- [OnConnect\(\)](#ga88e9dbaaa083be9f06adeea27680ef76) -- [OnDisconnect\(\)](#gac17d2b81d661134b63ee74b0212eace6) -- [OnInactive\(\) \[1/2\]](#gae050b00aa885765bb6808374be772615) -- [OnInactive\(\) \[2/2\]](#gae251a38aa7c0aebd7498eef86deab7c1) -- [OnStart\(\) \[1/2\]](#gad3ffda54b710b0b86e54bd6c13efae98) -- [OnStart\(\) \[2/2\]](#ga4d016d42397f33c7710db8544581c757) -- [OnStop\(\) \[1/2\]](#ga4e1556b780a1271e61328e659fc30eb9) -- [OnStop\(\) \[2/2\]](#gaa4145b360bbe5cdb5d267b17ac12af6a) -- [PostTask\(\)](#gad4d0911a8bccd5aca32464bad867cb13) -- [Present\(\)](#gab2ec8b885edd0d5818b4c60541c1875f) -- [SetMainRoute\(\)](#gac83a9af046458b7f6bfaf85071b093f4) -- [SetUIContent\(\) \[1/2\]](#ga050a81cda49edb471594447f8f4cdaac) -- [SetUIContent\(\) \[2/2\]](#ga9b734c2ad8ad52f906d676f0c897a4aa) -- [SetWantData\(\)](#ga89a719b5f730bc5fde9f637a5ed630c9) -- [SetWantElement\(\)](#ga65f4d2eab99497e496dcd493bd0d047e) -- [SetWantSvcIdentity\(\)](#gab8e5fac952fc6407f20cd9b7185d3a65) -- [StartAbility\(\) \[1/2\]](#gab11d708d5eaa1eca54828fa88625681a) -- [StartAbility\(\) \[2/2\]](#gae79800c4077afdc2851d5a74d8964111) -- [StopAbility\(\) \[1/2\]](#gadc670d5f6df0d485ee3062b70b3ffe99) -- [StopAbility\(\) \[2/2\]](#gaba99bbd4ff6da4fb072338f5ce95e6ae) -- [Terminate\(\)](#gaf424e47c7980ff92093c6b7b75888639) -- [TerminateAbility\(\)](#gac4a36f03c60fcbeca3b47192ccab1d24) -- [WantParseUri\(\)](#ga43226d0858faa92e83bea33aaf4b614c) -- [WantToUri\(\)](#ga31adc60981c10b22d0e9bbdc7126d17c) -- [Variable](#section1912686851165623) -- [OnAbilityConnectDone](#ga3b9bfacbcf1564c83cffbfff7889998a) -- [OnAbilityDisconnectDone](#gaba7cf0abb517890ef1a3949e398aaf1d) - -## **Overview** - -**Description:** - -Provides ability-related functions, including ability lifecycle callbacks and functions for connecting to or disconnecting from Particle Abilities. - -Abilities are classified into [Feature](Feature.md) Abilities and Particle Abilities. [Feature](Feature.md) Abilities support the Page template, and Particle Abilities support the [Service](Service.md) template. An ability using the Page template is called a Page ability for short and that using the [Service](Service.md) template is called a [Service](Service.md) ability. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Name

-

Description

-

ability.h

-

Declares ability-related functions, including ability lifecycle callbacks and functions for connecting to or disconnecting from Particle Abilities.

-

ability_connection.h

-

Declares callbacks to be invoked when a remote Service ability is connected or disconnected.

-

ability_context.h

-

Declares functions for starting and stopping an ability.

-

ability_env.h

-

Declares functions for obtaining information about the runtime environment of the application to which the ability belongs, including the bundle name, source code path, and data path.

-

ability_errors.h

-

Declares error codes returned by ability management functions.

-

ability_event_handler.h

-

Declares functions for performing operations during inter-thread communication, including running and quitting the event loop of the current thread and posting tasks to an asynchronous thread.

-

ability_loader.h

-

Declares functions for registering the class names of Ability and AbilitySlice with the ability management framework.

-

ability_manager.h

-

Declares ability-related functions, including functions for starting, stopping, connecting to, and disconnecting from an ability, registering a callback, and unregistering a callback.

-

ability_slice.h

-

Declares ability slice-related functions, including ability slice lifecycle callbacks and functions for connecting to or disconnecting from ability slices.

-

ability_state.h

-

Declares ability-related functions, including ability lifecycle callbacks and functions for connecting to or disconnecting from Particle Abilities. As the fundamental unit of OpenHarmony applications, abilities are classified into Feature Abilities and Particle Abilities. Feature Abilities support the Page template, and Particle Abilities support the Service template. An ability using the Page template is called a Page ability for short and that using the Service template is called a Service ability.

-

want.h

-

Declares the structure that provides abstract description of the operation to be performed, including the ability information and the carried data, and functions for setting data in the structure.

-
- -## Data Structures - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

OHOS::Ability

-

Declares ability-related functions, including ability lifecycle callbacks and functions for connecting to or disconnecting from Particle Abilities.

-

IAbilityConnection

-

Provides callbacks to be invoked when a remote Service ability is connected or disconnected.

-

OHOS::AbilityContext

-

Provides functions for starting and stopping an ability.

-

OHOS::AbilityEventHandler

-

Declares functions for performing operations during inter-thread communication, including running and quitting the event loop of the current thread and posting tasks to an asynchronous thread.

-

OHOS::AbilityLoader

-

Declares functions for registering the class names of Ability and AbilitySlice with the ability management framework.

-

OHOS::AbilitySlice

-

Provides ability slice-related functions, including ability slice lifecycle callbacks and functions for connecting to or disconnecting from ability slices.

-

Want

-

Defines the abstract description of an operation, including information about the ability and the extra data to carry.

-
- -## Macros - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

REGISTER_AA(className)

-

Registers the class name of an Ability child class.

-

REGISTER_AS(className)

-

Registers the class name of an AbilitySlice child class.

-
- -## Enumerations - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

{ ERR_OK = 0, PARAM_NULL_ERROR, MEMORY_MALLOC_ERROR, DUMP_ABILITIES_ERROR, IPC_REQUEST_ERROR, SERIALIZE_ERROR, COMMAND_ERROR = 0x7fff }

-

Declares error codes returned by ability management functions.

-

State { STATE_UNINITIALIZED, STATE_INITIAL, STATE_INACTIVE, STATE_ACTIVE, STATE_BACKGROUND }

-

Enumerates all lifecycle states that an ability will go through over the course of its lifetime.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

OHOS::Ability::OnStart (const Want &want)

-

virtual void

-

Called when this ability is started. You must override this function if you want to perform some initialization operations during ability startup.

-

OHOS::Ability::OnInactive ()

-

virtual void

-

Called when this ability enters the STATE_INACTIVE state.

-

OHOS::Ability::OnActive (const Want &want)

-

virtual void

-

Called when this ability enters the STATE_ACTIVE state.

-

OHOS::Ability::OnBackground ()

-

virtual void

-

Called when this ability enters the STATE_BACKGROUND state.

-

OHOS::Ability::OnStop ()

-

virtual void

-

Called when this ability enters the STATE_STOP state.

-

OHOS::Ability::OnConnect (const Want &want)

-

virtual const SvcIdentity *

-

Called when this Service ability is connected for the first time.

-

OHOS::Ability::OnDisconnect (const Want &want)

-

virtual void

-

Called when all abilities connected to this Service ability are disconnected.

-

OHOS::Ability::SetMainRoute (const std::string &entry)

-

void

-

Sets the main route for this ability.

-

OHOS::Ability::SetUIContent (RootView *rootView)

-

void

-

Sets the UI layout for this ability. You can call GetWindowRootView() to create a layout and add controls.

-

OHOS::Ability::MsgHandle (uint32_t funcId, IpcIo *request, IpcIo *reply)

-

virtual void

-

Handles a message sent by the client to this Service ability.

-

OHOS::Ability::Dump (const std::string &extra)

-

virtual void

-

Prints ability information to the console.

-

OHOS::AbilityContext::StartAbility (const Want &want)

-

int

-

Starts an Ability based on the specified Want information.

-

OHOS::AbilityContext::StopAbility (const Want &want)

-

int

-

Stops an Ability based on the specified Want information.

-

OHOS::AbilityContext::TerminateAbility ()

-

int

-

Destroys this Ability.

-

OHOS::AbilityContext::ConnectAbility (const Want &want, const IAbilityConnection &conn, void *data)

-

int

-

Connects to a Service ability based on the specified Want information.

-

OHOS::AbilityContext::DisconnectAbility (const IAbilityConnection &conn)

-

int

-

Disconnects from a Service ability.

-

GetBundleName ()

-

const char *

-

Obtains the bundle name of the application to which this ability belongs.

-

GetSrcPath ()

-

const char *

-

Obtains the source code path of this ability.

-

GetDataPath ()

-

const char *

-

Obtains the data path of this ability.

-

OHOS::AbilityEventHandler::Run ()

-

void

-

Starts running the event loop of the current thread.

-

OHOS::AbilityEventHandler::PostTask (const Task &task)

-

void

-

Posts a task to an asynchronous thread.

-

OHOS::AbilityEventHandler::PostQuit ()

-

void

-

Quits the event loop of the current thread.

-

OHOS::AbilityEventHandler::GetCurrentHandler ()

-

static AbilityEventHandler *

-

Obtains the event handler of the current thread.

-

StartAbility (const Want *want)

-

int

-

Starts an ability based on the specified Want information.

-

StopAbility (const Want *want)

-

int

-

Stops an ability based on the specified Want information.

-

ConnectAbility (const Want *want, const IAbilityConnection *conn, void *data)

-

int

-

Connects to a Service ability based on the specified Want information.

-

DisconnectAbility (const IAbilityConnection *conn)

-

int

-

Disconnects from a Service ability.

-

OHOS::AbilitySlice::OnStart (const Want &want)

-

virtual void

-

Called when this ability slice is started. You must override this function if you want to perform some initialization operations during ability slice startup.

-

OHOS::AbilitySlice::OnInactive ()

-

virtual void

-

Called when this ability slice enters the STATE_INACTIVE state.

-

OHOS::AbilitySlice::OnActive (const Want &want)

-

virtual void

-

Called when this ability slice enters the STATE_ACTIVE state.

-

OHOS::AbilitySlice::OnBackground ()

-

virtual void

-

Called when this ability slice enters the STATE_BACKGROUND state.

-

OHOS::AbilitySlice::OnStop ()

-

virtual void

-

Called when this ability slice enters the STATE_STOP state.

-

OHOS::AbilitySlice::Present (AbilitySlice &abilitySlice, const Want &want)

-

void

-

Presents another ability slice, which can be an ability slice that is not started or an existing ability slice in the host ability.

-

OHOS::AbilitySlice::Terminate ()

-

void

-

Destroys this ability slice.

-

OHOS::AbilitySlice::SetUIContent (RootView *rootView)

-

void

-

Sets the UI layout for the host ability of this ability slice.

-

ClearWant (Want *want)

-

void

-

Clears the memory of a specified Want object.

-

SetWantElement (Want *want, ElementName element)

-

bool

-

Sets the element variable for a specified Want object.

-

SetWantData (Want *want, const void *data, uint16_t dataLength)

-

bool

-

Sets data to carry in a specified Want object for starting a particular ability.

-

SetWantSvcIdentity (Want *want, SvcIdentity sid)

-

bool

-

Sets the sid member variable for a specified Want object.

-

WantToUri (Want want)

-

const char *

-

Converts a specified Want object into a character string.

-

WantParseUri (const char *uri)

-

Want *

-

Converts a specified character string into a Want object.

-
- -## **Details** - -## **Macro Definition ** - -## REGISTER\_AA - -``` -#define REGISTER_AA( className) -``` - -``` -Values: __attribute__((constructor)) void RegisterAA##className() { \ - - AbilityLoader::GetInstance().RegisterAbility(#className, []()->Ability* { \ - - return new className; \ - - }); \ - - } - - -``` - - **Description:** - -Registers the class name of an **Ability** child class. - -After implementing your own **Ability** class, you should call this function so that the ability management framework can create **Ability** instances when loading your **Ability** class. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
classNameIndicates the Ability class name to register.
- -## REGISTER\_AS - -``` -#define REGISTER_AS( className) -``` - -``` -Values: __attribute__((constructor)) void RegisterAS##className() { \ - - AbilityLoader::GetInstance().RegisterAbilitySlice(#className, []()->AbilitySlice* { \ - - return new className; \ - - }); \ - - } - - -``` - - **Description:** - -Registers the class name of an **AbilitySlice** child class. - -After implementing your own **AbilitySlice** class, you should call this function so that the ability management framework can create **AbilitySlice** instances when loading your **AbilitySlice** class. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
classNameIndicates the AbilitySlice class name to register.
- -## **Enumeration Type ** - -## anonymous enum - -``` -anonymous enum -``` - - **Description:** - -Declares error codes returned by ability management functions. - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
ERR_OK

The function is successfully called.

-
PARAM_NULL_ERROR

The parameter is null.

-
MEMORY_MALLOC_ERROR

Memory allocation error.

-
DUMP_ABILITIES_ERROR

An error occurred during the execution of the Dump function.

-
IPC_REQUEST_ERROR

IPC request error.

-
SERIALIZE_ERROR

Serialization error.

-
COMMAND_ERROR

Command error.

-
- -## State - -``` -enum [State](AbilityKit.md#ga5d74787dedbc4e11c1ab15bf487e61f8) -``` - - **Description:** - -Enumerates all lifecycle states that an ability will go through over the course of its lifetime. - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
STATE_UNINITIALIZED

Uninitialized state: An ability is in this state when it has not been initialized after being created.

-
STATE_INITIAL

Initial state: An ability is in this state after it is initialized or stopped.

-
STATE_INACTIVE

Inactive state: An ability is in this state when it is switched to the foreground but is not interactive.

-
STATE_ACTIVE

Active state: An ability is in this state when it is switched to the foreground and is interactive.

-
STATE_BACKGROUND

Background state: An ability is in this state after it returns to the background.

-
- -## **Function ** - -## ClearWant\(\) - -``` -void ClearWant ([Want](Want.md) * want) -``` - - **Description:** - -Clears the memory of a specified **[Want](Want.md)** object. - -After calling functions such as [SetWantElement](AbilityKit.md#ga65f4d2eab99497e496dcd493bd0d047e), you should call this function to clear the memory. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
wantIndicates the pointer to the Want object whose memory is to be released.
- -## ConnectAbility\(\) \[1/2\] - -``` -int OHOS::AbilityContext::ConnectAbility (const [Want](Want.md) & want, const [IAbilityConnection](IAbilityConnection.md) & conn, void * data ) -``` - - **Description:** - -Connects to a [Service](Service.md) ability based on the specified [Want](Want.md) information. - -After the [Service](Service.md) ability is connected, the [Ability](OHOS-Ability.md) Manager [Service](Service.md) invokes a particular callback and returns the ID of the [Service](Service.md) ability. The client can use this ID to communicate with the connected [Service](Service.md) ability. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
wantIndicates the pointer to the Want structure containing information about the Service ability to connect.
connIndicates the callback to be invoked when the connection is successful.
dataIndicates the pointer to the data to be passed to the callback.
- -**Returns:** - -Returns **0** if this function is successfully called; returns another value otherwise. - -## ConnectAbility\(\) \[2/2\] - -``` -int ConnectAbility (const [Want](Want.md) * want, const [IAbilityConnection](IAbilityConnection.md) * conn, void * data ) -``` - - **Description:** - -Connects to a [Service](Service.md) ability based on the specified [Want](Want.md) information. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
wantIndicates the pointer to the Want structure containing information about the Service ability to connect.
connIndicates the callback object when the Service ability is connected.
dataIndicates the pointer to the data to be passed to the callback.
- -**Returns:** - -Returns **0** if this function is successfully called; returns another value otherwise. - -## DisconnectAbility\(\) \[1/2\] - -``` -int OHOS::AbilityContext::DisconnectAbility (const [IAbilityConnection](IAbilityConnection.md) & conn) -``` - - **Description:** - -Disconnects from a [Service](Service.md) ability. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
connIndicates the callback to be invoked when the connection is successful.
- -**Returns:** - -Returns **0** if this function is successfully called; returns another value otherwise. - -## DisconnectAbility\(\) \[2/2\] - -``` -int DisconnectAbility (const [IAbilityConnection](IAbilityConnection.md) * conn) -``` - - **Description:** - -Disconnects from a [Service](Service.md) ability. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
connIndicates the callback object when the Service ability is connected.
- -**Returns:** - -Returns **0** if this function is successfully called; returns another value otherwise. - -## Dump\(\) - -``` -virtual void OHOS::Ability::Dump (const std::string & extra) -``` - - **Description:** - -Prints ability information to the console. - -You can override this function to obtain or print extra parameters. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
extraIndicates the extra parameter to be obtained or printed to the console.
- -## GetBundleName\(\) - -``` -const char* GetBundleName () -``` - - **Description:** - -Obtains the bundle name of the application to which this ability belongs. - -**Returns:** - -Returns the pointer to the bundle name if the operation is successful; returns a null pointer otherwise. - -## GetCurrentHandler\(\) - -``` -static [AbilityEventHandler](OHOS-AbilityEventHandler.md)* OHOS::AbilityEventHandler::GetCurrentHandler () -``` - - **Description:** - -Obtains the event handler of the current thread. - -**Returns:** - -Returns the pointer to the [AbilityEventHandler](OHOS-AbilityEventHandler.md) object of the current thread. - -## GetDataPath\(\) - -``` -const char* GetDataPath () -``` - - **Description:** - -Obtains the data path of this ability. - -**Returns:** - -Returns the pointer to the data path of this ability. - -## GetSrcPath\(\) - -``` -const char* GetSrcPath () -``` - - **Description:** - -Obtains the source code path of this ability. - -**Returns:** - -Returns the pointer to the source code path of this ability. - -## MsgHandle\(\) - -``` -virtual void OHOS::Ability::MsgHandle (uint32_t funcId, IpcIo * request, IpcIo * reply ) -``` - - **Description:** - -Handles a message sent by the client to this [Service](Service.md) ability. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
funcIdIndicates the type of the message sent by the client.
requestIndicates the pointer to the serialized request parameters sent by the client.
replyIndicates the pointer to the serialized result returned to the client.
- -## OnActive\(\) \[1/2\] - -``` -virtual void OHOS::AbilitySlice::OnActive (const [Want](Want.md) & want) -``` - - **Description:** - -Called when this ability slice enters the **STATE\_ACTIVE** state. - -The ability slice in the **STATE\_ACTIVE** state is visible and has focus. You can override this function to implement your own processing logic. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
wantIndicates the Want structure containing activation information about the ability slice.
- -## OnActive\(\) \[2/2\] - -``` -virtual void OHOS::Ability::OnActive (const [Want](Want.md) & want) -``` - - **Description:** - -Called when this ability enters the **STATE\_ACTIVE** state. - -The ability in the **STATE\_ACTIVE** state is visible and has focus. You can override this function to implement your own processing logic. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
wantIndicates the Want structure containing activation information about the ability.
- -## OnBackground\(\) \[1/2\] - -``` -virtual void OHOS::AbilitySlice::OnBackground () -``` - - **Description:** - -Called when this ability slice enters the **STATE\_BACKGROUND** state. - -The ability slice in the **STATE\_BACKGROUND** state is invisible. You can override this function to implement your own processing logic. - -## OnBackground\(\) \[2/2\] - -``` -virtual void OHOS::Ability::OnBackground () -``` - - **Description:** - -Called when this ability enters the **STATE\_BACKGROUND** state. - -The ability in the **STATE\_BACKGROUND** state is invisible. You can override this function to implement your own processing logic. - -## OnConnect\(\) - -``` -virtual const SvcIdentity* OHOS::Ability::OnConnect (const [Want](Want.md) & want) -``` - - **Description:** - -Called when this [Service](Service.md) ability is connected for the first time. - -You can override this function to implement your own processing logic. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
wantIndicates the Want structure containing connection information about the Service ability.
- -**Returns:** - -Returns a pointer to the **sid** of the connected [Service](Service.md) ability. - -## OnDisconnect\(\) - -``` -virtual void OHOS::Ability::OnDisconnect (const [Want](Want.md) & want) -``` - - **Description:** - -Called when all abilities connected to this [Service](Service.md) ability are disconnected. - -You can override this function to implement your own processing logic. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
wantIndicates the Want structure containing disconnection information about the Service ability.
- -## OnInactive\(\) \[1/2\] - -``` -virtual void OHOS::AbilitySlice::OnInactive () -``` - - **Description:** - -Called when this ability slice enters the **STATE\_INACTIVE** state. - -**STATE\_INACTIVE** is an instantaneous state. The ability slice in this state may be visible but does not have focus. You can override this function to implement your own processing logic. - -## OnInactive\(\) \[2/2\] - -``` -virtual void OHOS::Ability::OnInactive () -``` - - **Description:** - -Called when this ability enters the **STATE\_INACTIVE** state. - -**STATE\_INACTIVE** is an instantaneous state. The ability in this state may be visible but does not have focus. You can override this function to implement your own processing logic. - -## OnStart\(\) \[1/2\] - -``` -virtual void OHOS::AbilitySlice::OnStart (const [Want](Want.md) & want) -``` - - **Description:** - -Called when this ability slice is started. You must override this function if you want to perform some initialization operations during ability slice startup. - -This function can be called only once in the entire lifecycle of an ability slice. You can override this function to implement your own processing logic. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
wantIndicates the Want structure containing startup information about the ability slice.
- -## OnStart\(\) \[2/2\] - -``` -virtual void OHOS::Ability::OnStart (const [Want](Want.md) & want) -``` - - **Description:** - -Called when this ability is started. You must override this function if you want to perform some initialization operations during ability startup. - -This function can be called only once in the entire lifecycle of an ability. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
wantIndicates the Want structure containing startup information about the ability.
- -## OnStop\(\) \[1/2\] - -``` -virtual void OHOS::AbilitySlice::OnStop () -``` - - **Description:** - -Called when this ability slice enters the **STATE\_STOP** state. - -The ability slice in the **STATE\_STOP** state is being destroyed. You can override this function to implement your own processing logic. - -## OnStop\(\) \[2/2\] - -``` -virtual void OHOS::Ability::OnStop () -``` - - **Description:** - -Called when this ability enters the **STATE\_STOP** state. - -The ability in the **STATE\_STOP** is being destroyed. You can override this function to implement your own processing logic. - -## PostTask\(\) - -``` -void OHOS::AbilityEventHandler::PostTask (const Task & task) -``` - - **Description:** - -Posts a task to an asynchronous thread. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
taskIndicates the task to post.
- -## Present\(\) - -``` -void OHOS::AbilitySlice::Present ([AbilitySlice](OHOS-AbilitySlice.md) & abilitySlice, const [Want](Want.md) & want ) -``` - - **Description:** - -Presents another ability slice, which can be an ability slice that is not started or an existing ability slice in the host ability. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
abilitySliceIndicates the target ability slice. This parameter cannot be null.
wantIndicates the Want structure containing startup information about the target ability slice.
- -**Attention:** - -This function can be called only when both of the following conditions are met: - -- The host ability is in the **STATE\_ACTIVE** state. -- The target ability slice is not started or destroyed. - -## SetMainRoute\(\) - -``` -void OHOS::Ability::SetMainRoute (const std::string & entry) -``` - - **Description:** - -Sets the main route for this ability. - -The main route, also called main entry, refers to the default **[AbilitySlice](OHOS-AbilitySlice.md)** to present for this ability. This function should be called only on [Feature](Feature.md) Abilities. If this function is not called in the [OnStart\(const Want &want\)](AbilityKit.md#ga4d016d42397f33c7710db8544581c757) function for a [Feature](Feature.md) [Ability](OHOS-Ability.md), the [Feature](Feature.md) [Ability](OHOS-Ability.md) will fail to start. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
entryIndicates the main entry, which is the class name of the AbilitySlice instance to start.
- -## SetUIContent\(\) \[1/2\] - -``` -void OHOS::AbilitySlice::SetUIContent ([RootView](OHOS-RootView.md) * rootView) -``` - - **Description:** - -Sets the UI layout for the host ability of this ability slice. - -You can call **GetWindowRootView\(\)** to create a layout and add controls. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
rootViewIndicates the pointer to the custom layout view you have created.
- -## SetUIContent\(\) \[2/2\] - -``` -void OHOS::Ability::SetUIContent ([RootView](OHOS-RootView.md) * rootView) -``` - - **Description:** - -Sets the UI layout for this ability. You can call **GetWindowRootView\(\)** to create a layout and add controls. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
rootViewIndicates the pointer to the custom layout view you have created.
- -## SetWantData\(\) - -``` -bool SetWantData ([Want](Want.md) * want, const void * data, uint16_t dataLength ) -``` - - **Description:** - -Sets data to carry in a specified **[Want](Want.md)** object for starting a particular ability. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
wantIndicates the pointer to the Want object to set.
dataIndicates the pointer to the data to set.
dataLengthIndicates the data length to set. The length must be the same as that of the data specified in data.
- -**Returns:** - -Returns **true** if the setting is successful; returns **false** otherwise. - -## SetWantElement\(\) - -``` -bool SetWantElement ([Want](Want.md) * want, [ElementName](ElementName.md) element ) -``` - - **Description:** - -Sets the **element** variable for a specified **[Want](Want.md)** object. - -To start a specified ability, you should call this function to set the [ElementName](ElementName.md) required for starting the ability. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
wantIndicates the pointer to the Want object to set.
elementIndicates the ElementName containing information required for starting the ability.
- -**Returns:** - -Returns **true** if the setting is successful; returns **false** otherwise. - -## SetWantSvcIdentity\(\) - -``` -bool SetWantSvcIdentity ([Want](Want.md) * want, SvcIdentity sid ) -``` - - **Description:** - -Sets the **sid** member variable for a specified **[Want](Want.md)** object. - -When starting an ability, you should call this function to set an **SvcIdentity** object if a callback needs to be invoked after the ability is started successfully. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
wantIndicates the pointer to the Want object to set.
sidIndicates the SvcIdentity object to set.
- -**Returns:** - -Returns **true** if the setting is successful; returns **false** otherwise. - -## StartAbility\(\) \[1/2\] - -``` -int OHOS::AbilityContext::StartAbility (const [Want](Want.md) & want) -``` - - **Description:** - -Starts an [Ability](OHOS-Ability.md) based on the specified [Want](Want.md) information. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
wantIndicates the pointer to the Want structure containing information about the ability to start.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## StartAbility\(\) \[2/2\] - -``` -int StartAbility (const [Want](Want.md) * want) -``` - - **Description:** - -Starts an ability based on the specified [Want](Want.md) information. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
wantIndicates the pointer to the Want structure containing information about the ability to start.
- -**Returns:** - -Returns **0** if this function is successfully called; returns another value otherwise. - -## StopAbility\(\) \[1/2\] - -``` -int OHOS::AbilityContext::StopAbility (const [Want](Want.md) & want) -``` - - **Description:** - -Stops an [Ability](OHOS-Ability.md) based on the specified [Want](Want.md) information. - -This function takes effect only on [Service](Service.md) abilities. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
wantIndicates the pointer to the Want structure containing information about the ability to stop.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## StopAbility\(\) \[2/2\] - -``` -int StopAbility (const [Want](Want.md) * want) -``` - - **Description:** - -Stops an ability based on the specified [Want](Want.md) information. - -This function takes effect only on [Service](Service.md) abilities. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
wantIndicates the pointer to the Want structure containing information about the ability to stop.
- -**Returns:** - -Returns **0** if this function is successfully called; returns another value otherwise. - -## Terminate\(\) - -``` -void OHOS::AbilitySlice::Terminate () -``` - - **Description:** - -Destroys this ability slice. - -This ability slice can call this function to destroy itself. If the ability slice to destroy is the only running one in the host ability, the host ability will also be destroyed. Otherwise, the host ability will not be affected. - -## TerminateAbility\(\) - -``` -int OHOS::AbilityContext::TerminateAbility () -``` - - **Description:** - -Destroys this [Ability](OHOS-Ability.md). - -This function can be called only by this ability. - -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - -## WantParseUri\(\) - -``` -[Want](Want.md)* WantParseUri (const char * uri) -``` - - **Description:** - -Converts a specified character string into a **[Want](Want.md)** object. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
uriIndicates the pointer to the character string to convert.
- -**Returns:** - -Returns the pointer to the converted **[Want](Want.md)** object if the operation is successful; returns **nullptr** otherwise. - -## WantToUri\(\) - -``` -const char* WantToUri ([Want](Want.md) want) -``` - - **Description:** - -Converts a specified **[Want](Want.md)** object into a character string. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
wantIndicates the Want object to convert.
- -**Returns:** - -Returns the converted character string if the operation is successful; returns **nullptr** otherwise. - -## **Variable ** - -## OnAbilityConnectDone - -``` -void(* IAbilityConnection::OnAbilityConnectDone) ([ElementName](ElementName.md) *elementName, SvcIdentity *serviceSid, int resultCode, void *data) -``` - - **Description:** - -Called when a client is connected to a [Service](Service.md) ability. - -This callback is invoked to receive the connection result after a client is connected to a [Service](Service.md) ability. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
elementNameIndicates the pointer to the information about the connected Service ability.
serviceSidIndicates the pointer to the remote proxy object of the Service ability.
resultCodeIndicates the connection result code. The value 0 indicates a successful connection, and any other value indicates a connection failure.
dataIndicates the pointer to the data stored during the connection.
- -## OnAbilityDisconnectDone - -``` -void(* IAbilityConnection::OnAbilityDisconnectDone) ([ElementName](ElementName.md) *elementName, int resultCode, void *data) -``` - - **Description:** - -Called after all connections to a [Service](Service.md) ability are disconnected. - -This callback is invoked to receive the disconnection result after the connected [Service](Service.md) ability crashes or is killed. If the [Service](Service.md) ability exits unexpectedly, all its connections are disconnected, and each ability previously connected to it will call **OnAbilityDisconnectDone\(ElementName \*elementName, int resultCode, void \*data\)**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
elementNameIndicates the pointer to the information about the disconnected Service ability.
resultCodeIndicates the disconnection result code. The value 0 indicates a successful disconnection, and any other value indicates a disconnection failure.
dataIndicates the pointer to the data stored during the connection.
- diff --git a/api/api-SmartVision-Devices/AbilitySlice.md b/api/api-SmartVision-Devices/AbilitySlice.md deleted file mode 100755 index 7a39f6d5b0a4577c0a6e2860c1641edca810e823..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/AbilitySlice.md +++ /dev/null @@ -1,113 +0,0 @@ -# AbilitySlice - -## **Overview** - -**Related Modules:** - -[AbilityKit](AbilityKit.md) - -**Description:** - -Provides ability slice-related functions, including ability slice lifecycle callbacks and functions for connecting to or disconnecting from ability slices. - -**[AbilitySlice](AbilitySlice.md)** instances, which are specific to FAs \(abilities using the Page template\), are used to present different screens on an application's user interface. An FA can have multiple ability slices. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Member Function Name

-

Description

-

OnStart (const Want &want)

-

virtual void 

-

Called when this ability slice is started. You must override this function if you want to perform some initialization operations during ability slice startup.

-

OnInactive ()

-

virtual void 

-

Called when this ability slice enters the STATE_INACTIVE state.

-

OnActive (const Want &want)

-

virtual void 

-

Called when this ability slice enters the STATE_ACTIVE state.

-

OnBackground ()

-

virtual void 

-

Called when this ability slice enters the STATE_BACKGROUND state.

-

OnStop ()

-

virtual void 

-

Called when this ability slice enters the STATE_STOP state.

-

Present (AbilitySlice &abilitySlice, const Want &want)

-

void 

-

Presents another ability slice, which can be an ability slice that is not started or an existing ability slice in the host ability.

-

Terminate ()

-

void 

-

Destroys this ability slice.

-

SetUIContent (RootView *rootView)

-

void 

-

Sets the UI layout for the host ability of this ability slice.

-

StartAbility (const Want &want)

-

int 

-

Starts an Ability based on the specified Want information.

-

StopAbility (const Want &want)

-

int 

-

Stops an Ability based on the specified Want information.

-

TerminateAbility ()

-

int 

-

Destroys this Ability.

-

ConnectAbility (const Want &want, const IAbilityConnection &conn, void *data)

-

int 

-

Connects to a Service ability based on the specified Want information.

-

DisconnectAbility (const IAbilityConnection &conn)

-

int 

-

Disconnects from a Service ability.

-
- diff --git a/api/api-SmartVision-Devices/Alginment.md b/api/api-SmartVision-Devices/Alginment.md deleted file mode 100755 index 924571e583a34ec03af23feb4c02b70bb408ac9e..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Alginment.md +++ /dev/null @@ -1,68 +0,0 @@ -# Alginment - -- [Overview](#section2127420286165630) -- [Summary](#section159979445165630) -- [Data Fields](#pub-attribs) -- [Details](#section1572219862165630) -- [Field](#section1550298865165630) -- [heightAlginment](#a19a3dec86a720b9fdd46aa7ac257c09d) -- [widthAlginment](#a22ffb57296d6535418e3b5c0a20c2e5e) - -## **Overview** - -**Related Modules:** - -[Codec](Codec.md) - -**Description:** - -Defines the alignment. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

widthAlginment

-

int

-

heightAlginment

-

int

-
- -## **Details** - -## **Field ** - -## heightAlginment - -``` -int Alginment::heightAlginment -``` - - **Description:** - -Value to align with the height - -## widthAlginment - -``` -int Alginment::widthAlginment -``` - - **Description:** - -Value to align with the width - diff --git a/api/api-SmartVision-Devices/AssocReq.md b/api/api-SmartVision-Devices/AssocReq.md deleted file mode 100755 index f99e936328a6046f582f960e47aaddfcb7b4c02b..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/AssocReq.md +++ /dev/null @@ -1,49 +0,0 @@ -# AssocReq - -- [Overview](#section1132547489165630) -- [Summary](#section1641482555165630) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Defines station association request. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

capabInfo

-

uint16_t

-

listenInterval

-

uint16_t

-

variable [0]

-

uint8_t

-
- diff --git a/api/api-SmartVision-Devices/AssocResp.md b/api/api-SmartVision-Devices/AssocResp.md deleted file mode 100755 index 201584b20f5532bd389efedf6b56466a06fa788a..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/AssocResp.md +++ /dev/null @@ -1,54 +0,0 @@ -# AssocResp - -- [Overview](#section720427208165630) -- [Summary](#section411736737165630) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Defines station association response. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

capabInfo

-

uint16_t

-

statusCode

-

uint16_t

-

aid

-

uint16_t

-

variable [0]

-

uint8_t

-
- diff --git a/api/api-SmartVision-Devices/Audio.md b/api/api-SmartVision-Devices/Audio.md deleted file mode 100755 index d22536bddc5f7b19618a9b4cd99d61b8020c7a4a..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Audio.md +++ /dev/null @@ -1,1036 +0,0 @@ -# Audio - -- [Overview](#section1599351033165623) -- [Summary](#section1361003411165623) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Typedefs](#typedef-members) -- [Enumerations](#enum-members) -- [Functions](#func-members) -- [Details](#section1693660607165623) -- [Enumeration Type](#section1289870715165623) -- [AudioCategory](#gaf210d41d152890f3aaf2aaac99bd28d5) -- [AudioChannelMask](#ga137eb03027d5947ea294b32f5095b83c) -- [AudioChannelMode](#ga78aab1fafb9657451804e42b42897123) -- [AudioFormat](#ga98d5d077cca088ddf77314871474fe59) -- [AudioPortDirection](#ga68ff7140b15790debbac4bbc62f8e9f8) -- [AudioPortPassthroughMode](#ga186d2d4f9a2ecacb80cd2cce2bd26f0e) -- [AudioPortPin](#gaa7114aeeccf3ac4f5f7e1d880bcfa835) -- [AudioSampleRatesMask](#ga7053fcaa56d1dc47d2fcd83ee131fe4c) -- [Function](#section521503694165623) -- [GetAudioManagerFuncs\(\)](#ga0c7824f4fe89625d3c9b1d0534ad0151) -- [Variable](#section1960727737165623) -- [adapterName](#gadbe46bc7d9b4c20c409e30942ad794cf) -- [channelCount \[1/2\]](#ga9c629d8ad8f0119d9b0acae3f2ed9b78) -- [channelCount \[2/2\]](#ga48253c4fbc171f241bb0494524891bb1) -- [channelMasks](#ga357e90ee8116e04144f57e6f7d3d9efb) -- [desc \[1/4\]](#ga560700ce0e6f047a617e21b41e0425b9) -- [desc \[2/4\]](#gab855beab3a08e8c9a7f814cce53e2001) -- [desc \[3/4\]](#ga81e44604a869f47c88c3f9503b9287e1) -- [desc \[4/4\]](#gafe579a4229429c8665d1c3d95fc1f964) -- [deviceId](#ga0485197a750c63938602b339a3b9c77f) -- [deviceType](#ga00860eb6de81efe5b1654b45617fb902) -- [dir](#ga144336f0f64927730a184c16d8c27698) -- [format](#ga441305acec64ee1ed840c8920e167c9e) -- [formatNum](#gaca895984cf53ddd8769d33c8298b0c6d) -- [formats](#gad01bfa329a21628287ee21df5000e34d) -- [hardwareMode](#ga377ecdaf229087a7d17c220a65a7162f) -- [id](#ga3e54db28a854f634bd847919e7ae8e32) -- [interleaved](#gab00c777b594436a4fae1a4bcdad70c6d) -- [mask](#ga958a6104e7ab64f75618015bfb097a32) -- [pins](#gab2e66ca83a7ef39211b53d4afe7b7b73) -- [portId \[1/3\]](#gaa534605f1ef1993f47063c3f7fbccbde) -- [portId \[2/3\]](#gabc4bdf3c11cada00cfebbd9b1218ab3a) -- [portId \[3/3\]](#ga4b35c30d09b716f0bd2c7c22587e3f7a) -- [portName](#ga6cbf88ceff4bcd03b125d45873e654a1) -- [portNum](#ga2bef8f9b5ea3c1e30639fcb3ec8dd717) -- [ports](#ga64d0c55b881fb0a3bc15b2fecea86f24) -- [sampleRate](#gaa322b72a4cdf9007c75814853e7ad4af) -- [sampleRateMasks](#ga30c8a08e5d939c0e9844d6d9a165c681) -- [scene](#ga3246105a88851b68c71e16a511ea6b47) -- [subPorts](#gaccd18b70e7d121169f3df5e53fe055f9) -- [subPortsNum](#gab784694fd6a60a3d5a3ae404cd6fe6fd) -- [tvNSec](#gadae6151a2f7e0432dbaf6e89e743de9c) -- [tvSec](#gaa6205cc4d86425bc23f2d860f44644ce) -- [type](#ga658c38c76290ea6c8b9e0a2ddf7d1db4) - -## **Overview** - -**Description:** - -Defines audio-related APIs, including custom data types and functions for loading drivers, accessing a driver adapter, and rendering and capturing audios. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Name

-

Description

-

audio_adapter.h

-

Declares APIs for operations related to the audio adapter.

-

audio_attribute.h

-

Declares APIs for audio attributes.

-

audio_capture.h

-

Declares APIs for audio capturing.

-

audio_control.h

-

Declares APIs for audio control.

-

audio_manager.h

-

Declares APIs for audio adapter management and loading.

-

audio_render.h

-

Declares APIs for audio rendering.

-

audio_scene.h

-

Declares APIs for audio scenes.

-

audio_types.h

-

Defines custom data types used in API declarations for the audio module, including audio ports, adapter descriptors, device descriptors, scene descriptors, sampling attributes, and timestamp.

-

audio_volume.h

-

Declares APIs for audio volume.

-
- -## Data Structures - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

AudioAdapter

-

Provides audio adapter capabilities, including initializing ports, creating rendering and capturing tasks, and obtaining the port capability set.

-

AudioAttribute

-

Provides attribute-related APIs for audio rendering or capturing, including functions to obtain frame information and set audio sampling attributes.

-

AudioCapture

-

Provides capabilities for audio capturing, including controlling the capturing, setting audio attributes, scenes, and volume, and capturing audio frames.

-

AudioControl

-

Provides control-related APIs for audio rendering or capturing, including functions to start, stop, pause, and resume audio rendering or capturing, and flush data in the audio buffer.

-

AudioManager

-

Manages audio adapters through a specific adapter driver program loaded based on the given audio adapter descriptor.

-

AudioRender

-

Provides capabilities for audio rendering, including controlling the rendering, setting audio attributes, scenes, and volume, obtaining hardware latency, and rendering audio frames.

-

AudioScene

-

Provides scene-related APIs for audio rendering or capturing, including functions to select an audio scene and check whether the configuration of an audio scene is supported.

-

AudioPort

-

Defines the audio port.

-

AudioAdapterDescriptor

-

Defines the audio adapter descriptor.

-

AudioDeviceDescriptor

-

Defines the audio device descriptor.

-

AudioSceneDescriptor

-

Defines the audio scene descriptor.

-

AudioSceneDescriptor::SceneDesc

-

Describes the audio scene.

-

AudioSampleAttributes

-

Defines audio sampling attributes.

-

AudioTimeStamp

-

Defines the audio timestamp, which is a substitute for POSIX timespec.

-

AudioSubPortCapability

-

Defines the sub-port capability.

-

AudioPortCapability

-

Defines the audio port capability.

-

AudioVolume

-

Provides volume-related APIs for audio rendering or capturing, including functions to set the mute operation, volume, and gain.

-
- -## Typedefs - - - - - - - - - - -

Typedef Name

-

Description

-

AudioHandle

-

typedef void *

-

Defines the audio handle.

-
- -## Enumerations - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

AudioPortDirection { PORT_OUT = 0x1u, PORT_IN = 0x2u, PORT_OUT_IN = 0x3u }

-

Enumerates the audio port type.

-

AudioPortPin { PIN_NONE = 0x0u, PIN_OUT_SPEAKER = 0x1u, PIN_OUT_HEADSET = 0x2u, PIN_OUT_LINEOUT = 0x4u, PIN_OUT_HDMI = 0x8u, PIN_IN_MIC = 0x8000001u, PIN_IN_HS_MIC = 0x8000002u, PIN_IN_LINEIN = 0x8000004u }

-

Enumerates the pin of an audio adapter.

-

AudioCategory { AUDIO_IN_MEDIA = 0, AUDIO_IN_COMMUNICATION }

-

Enumerates the audio category.

-

AudioFormat { AUDIO_FORMAT_PCM_8_BIT = 0x1u, AUDIO_FORMAT_PCM_16_BIT = 0x2u, AUDIO_FORMAT_PCM_24_BIT = 0x3u, AUDIO_FORMAT_PCM_32_BIT = 0x4u, AUDIO_FORMAT_AAC_MAIN = 0x1000001u, AUDIO_FORMAT_AAC_LC = 0x1000002u, AUDIO_FORMAT_AAC_LD = 0x1000003u, AUDIO_FORMAT_AAC_ELD = 0x1000004u, AUDIO_FORMAT_AAC_HE_V1 = 0x1000005u, AUDIO_FORMAT_AAC_HE_V2 = 0x1000006u }

-

Enumerates the audio format.

-

AudioChannelMask { AUDIO_CHANNEL_FRONT_LEFT = 0x1, AUDIO_CHANNEL_FRONT_RIGHT = 0x2, AUDIO_CHANNEL_MONO = 0x1u, AUDIO_CHANNEL_STEREO = 0x3u }

-

Enumerates the audio channel mask.

-

AudioSampleRatesMask { AUDIO_SAMPLE_RATE_MASK_8000 = 0x1u, AUDIO_SAMPLE_RATE_MASK_12000 = 0x2u, AUDIO_SAMPLE_RATE_MASK_11025 = 0x4u, AUDIO_SAMPLE_RATE_MASK_16000 = 0x8u, AUDIO_SAMPLE_RATE_MASK_22050 = 0x10u, AUDIO_SAMPLE_RATE_MASK_24000 = 0x20u, AUDIO_SAMPLE_RATE_MASK_32000 = 0x40u, AUDIO_SAMPLE_RATE_MASK_44100 = 0x80u, AUDIO_SAMPLE_RATE_MASK_48000 = 0x100u, AUDIO_SAMPLE_RATE_MASK_64000 = 0x200u, AUDIO_SAMPLE_RATE_MASK_96000 = 0x400u, AUDIO_SAMPLE_RATE_MASK_INVALID = 0xFFFFFFFFu }

-

Enumerates masks of audio sampling rates.

-

AudioPortPassthroughMode { PORT_PASSTHROUGH_LPCM = 0x1, PORT_PASSTHROUGH_RAW = 0x2, PORT_PASSTHROUGH_HBR2LBR = 0x4, PORT_PASSTHROUGH_AUTO = 0x8 }

-

Enumerates the passthrough data transmission mode of an audio port.

-

AudioChannelMode { AUDIO_CHANNEL_NORMAL = 0, AUDIO_CHANNEL_BOTH_LEFT, AUDIO_CHANNEL_BOTH_RIGHT, AUDIO_CHANNEL_EXCHANGE, AUDIO_CHANNEL_MIX, AUDIO_CHANNEL_LEFT_MUTE, AUDIO_CHANNEL_RIGHT_MUTE, AUDIO_CHANNEL_BOTH_MUTE }

-

Enumerates channel modes for audio rendering.

-
- -## Functions - - - - - - - - - - -

Function

-

Description

-

GetAudioManagerFuncs (void)

-

struct AudioManager *

-

Obtains the operation function list of the AudioManager class.

-
- -## **Details** - -## **Enumeration Type ** - -## AudioCategory - -``` -enum [AudioCategory](Audio.md#gaf210d41d152890f3aaf2aaac99bd28d5) -``` - - **Description:** - -Enumerates the audio category. - - - - - - - - - - - - - -

Enumerator

-

Description

-
AUDIO_IN_MEDIA

Media

-
AUDIO_IN_COMMUNICATION

Communications

-
- -## AudioChannelMask - -``` -enum [AudioChannelMask](Audio.md#ga137eb03027d5947ea294b32f5095b83c) -``` - - **Description:** - -Enumerates the audio channel mask. - -A mask describes an audio channel position. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
AUDIO_CHANNEL_FRONT_LEFT

Front left channel

-
AUDIO_CHANNEL_FRONT_RIGHT

Front right channel

-
AUDIO_CHANNEL_MONO

Mono channel

-
AUDIO_CHANNEL_STEREO

Stereo channel, consisting of front left and front right channels

-
- -## AudioChannelMode - -``` -enum [AudioChannelMode](Audio.md#ga78aab1fafb9657451804e42b42897123) -``` - - **Description:** - -Enumerates channel modes for audio rendering. - -**Attention:** - -The following modes are set for rendering dual-channel audios. Others are not supported. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
AUDIO_CHANNEL_NORMAL

Normal mode. No processing is required.

-
AUDIO_CHANNEL_BOTH_LEFT

Two left channels

-
AUDIO_CHANNEL_BOTH_RIGHT

Two right channels

-
AUDIO_CHANNEL_EXCHANGE

Data exchange between the left and right channels. The left channel takes the audio stream of the right channel, and the right channel takes that of the left channel.

-
AUDIO_CHANNEL_MIX

Mix of streams of the left and right channels

-
AUDIO_CHANNEL_LEFT_MUTE

Left channel muted. The stream of the right channel is output.

-
AUDIO_CHANNEL_RIGHT_MUTE

Right channel muted. The stream of the left channel is output.

-
AUDIO_CHANNEL_BOTH_MUTE

Both left and right channels muted

-
- -## AudioFormat - -``` -enum [AudioFormat](Audio.md#ga98d5d077cca088ddf77314871474fe59) -``` - - **Description:** - -Enumerates the audio format. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
AUDIO_FORMAT_PCM_8_BIT

8-bit PCM

-
AUDIO_FORMAT_PCM_16_BIT

16-bit PCM

-
AUDIO_FORMAT_PCM_24_BIT

24-bit PCM

-
AUDIO_FORMAT_PCM_32_BIT

32-bit PCM

-
AUDIO_FORMAT_AAC_MAIN

AAC main

-
AUDIO_FORMAT_AAC_LC

AAC LC

-
AUDIO_FORMAT_AAC_LD

AAC LD

-
AUDIO_FORMAT_AAC_ELD

AAC ELD

-
AUDIO_FORMAT_AAC_HE_V1

AAC HE_V1

-
AUDIO_FORMAT_AAC_HE_V2

AAC HE_V2

-
- -## AudioPortDirection - -``` -enum [AudioPortDirection](Audio.md#ga68ff7140b15790debbac4bbc62f8e9f8) -``` - - **Description:** - -Enumerates the audio port type. - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
PORT_OUT

Output port

-
PORT_IN

Input port

-
PORT_OUT_IN

Input/output port, supporting both audio input and output

-
- -## AudioPortPassthroughMode - -``` -enum [AudioPortPassthroughMode](Audio.md#ga186d2d4f9a2ecacb80cd2cce2bd26f0e) -``` - - **Description:** - -Enumerates the passthrough data transmission mode of an audio port. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
PORT_PASSTHROUGH_LPCM

Stereo PCM

-
PORT_PASSTHROUGH_RAW

HDMI passthrough

-
PORT_PASSTHROUGH_HBR2LBR

Blu-ray next-generation audio output with reduced specifications

-
PORT_PASSTHROUGH_AUTO

Mode automatically matched based on the HDMI EDID

-
- -## AudioPortPin - -``` -enum [AudioPortPin](Audio.md#gaa7114aeeccf3ac4f5f7e1d880bcfa835) -``` - - **Description:** - -Enumerates the pin of an audio adapter. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
PIN_NONE

Invalid pin

-
PIN_OUT_SPEAKER

Speaker output pin

-
PIN_OUT_HEADSET

Wired headset pin for output

-
PIN_OUT_LINEOUT

Line-out pin

-
PIN_OUT_HDMI

HDMI output pin

-
PIN_IN_MIC

Microphone input pin

-
PIN_IN_HS_MIC

Wired headset microphone pin for input

-
PIN_IN_LINEIN

Line-in pin

-
- -## AudioSampleRatesMask - -``` -enum [AudioSampleRatesMask](Audio.md#ga7053fcaa56d1dc47d2fcd83ee131fe4c) -``` - - **Description:** - -Enumerates masks of audio sampling rates. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
AUDIO_SAMPLE_RATE_MASK_8000

8 kHz

-
AUDIO_SAMPLE_RATE_MASK_12000

12 kHz

-
AUDIO_SAMPLE_RATE_MASK_11025

11.025 kHz

-
AUDIO_SAMPLE_RATE_MASK_16000

16 kHz

-
AUDIO_SAMPLE_RATE_MASK_22050

22.050 kHz

-
AUDIO_SAMPLE_RATE_MASK_24000

24 kHz

-
AUDIO_SAMPLE_RATE_MASK_32000

32 kHz

-
AUDIO_SAMPLE_RATE_MASK_44100

44.1 kHz

-
AUDIO_SAMPLE_RATE_MASK_48000

48 kHz

-
AUDIO_SAMPLE_RATE_MASK_64000

64 kHz

-
AUDIO_SAMPLE_RATE_MASK_96000

96 kHz

-
AUDIO_SAMPLE_RATE_MASK_INVALID

Invalid sampling rate

-
- -## **Function ** - -## GetAudioManagerFuncs\(\) - -``` -struct [AudioManager](AudioManager.md)* GetAudioManagerFuncs (void ) -``` - - **Description:** - -Obtains the operation function list of the [AudioManager](AudioManager.md) class. - -**Returns:** - -Returns the pointer to the **[AudioManager](AudioManager.md)** object if the list is obtained; returns **NULL** otherwise. - -## **Variable ** - -## adapterName - -``` -const char* AudioAdapterDescriptor::adapterName -``` - - **Description:** - -Name of the audio adapter - -## channelCount \[1/2\] - -``` -uint32_t AudioSampleAttributes::channelCount -``` - - **Description:** - -Number of audio channels. For example, for the mono channel, the value is 1, and for the stereo channel, the value is 2. - -## channelCount \[2/2\] - -``` -uint32_t AudioPortCapability::channelCount -``` - - **Description:** - -Supported maximum number of audio channels - -## channelMasks - -``` -enum [AudioChannelMask](Audio.md#ga137eb03027d5947ea294b32f5095b83c) AudioPortCapability::channelMasks -``` - - **Description:** - -Audio channel layout mask of the device. For details, see [AudioChannelMask](Audio.md#ga137eb03027d5947ea294b32f5095b83c). - -## desc \[1/4\] - -``` -const char* AudioDeviceDescriptor::desc -``` - - **Description:** - -Audio device name - -## desc \[2/4\] - -``` -struct [AudioDeviceDescriptor](AudioDeviceDescriptor.md) AudioSceneDescriptor::desc -``` - - **Description:** - -Audio device descriptor - -## desc \[3/4\] - -``` -const char* AudioSceneDescriptor::SceneDesc::desc -``` - - **Description:** - -Name of the audio scene - -## desc \[4/4\] - -``` -const char* AudioSubPortCapability::desc -``` - - **Description:** - -Sub-port name - -## deviceId - -``` -uint32_t AudioPortCapability::deviceId -``` - - **Description:** - -Device ID used for device binding - -## deviceType - -``` -uint32_t AudioPortCapability::deviceType -``` - - **Description:** - -Device type \(output or input\) - -## dir - -``` -enum [AudioPortDirection](Audio.md#ga68ff7140b15790debbac4bbc62f8e9f8) AudioPort::dir -``` - - **Description:** - -Audio port type. For details, see [AudioPortDirection](Audio.md#ga68ff7140b15790debbac4bbc62f8e9f8) - -## format - -``` -enum [AudioFormat](Audio.md#ga98d5d077cca088ddf77314871474fe59) AudioSampleAttributes::format -``` - - **Description:** - -Audio data format. For details, see [AudioFormat](Audio.md#ga98d5d077cca088ddf77314871474fe59). - -## formatNum - -``` -uint32_t AudioPortCapability::formatNum -``` - - **Description:** - -Number of the supported audio formats - -## formats - -``` -enum [AudioFormat](Audio.md#ga98d5d077cca088ddf77314871474fe59)* AudioPortCapability::formats -``` - - **Description:** - -Supported audio formats. For details, see [AudioFormat](Audio.md#ga98d5d077cca088ddf77314871474fe59). - -## hardwareMode - -``` -bool AudioPortCapability::hardwareMode -``` - - **Description:** - -Whether to support device binding - -## id - -``` -uint32_t AudioSceneDescriptor::SceneDesc::id -``` - - **Description:** - -Audio scene ID - -## interleaved - -``` -bool AudioSampleAttributes::interleaved -``` - - **Description:** - -Interleaving flag of audio data - -## mask - -``` -enum [AudioPortPassthroughMode](Audio.md#ga186d2d4f9a2ecacb80cd2cce2bd26f0e) AudioSubPortCapability::mask -``` - - **Description:** - -Passthrough mode of data transmission. For details, see [AudioPortPassthroughMode](Audio.md#ga186d2d4f9a2ecacb80cd2cce2bd26f0e). - -## pins - -``` -enum [AudioPortPin](Audio.md#gaa7114aeeccf3ac4f5f7e1d880bcfa835) AudioDeviceDescriptor::pins -``` - - **Description:** - -Pins of audio ports \(input and output\). For details, see [AudioPortPin](Audio.md#gaa7114aeeccf3ac4f5f7e1d880bcfa835). - -## portId \[1/3\] - -``` -uint32_t AudioPort::portId -``` - - **Description:** - -Audio port ID - -## portId \[2/3\] - -``` -uint32_t AudioDeviceDescriptor::portId -``` - - **Description:** - -Audio port ID - -## portId \[3/3\] - -``` -uint32_t AudioSubPortCapability::portId -``` - - **Description:** - -Sub-port ID - -## portName - -``` -const char* AudioPort::portName -``` - - **Description:** - -Audio port name - -## portNum - -``` -uint32_t AudioAdapterDescriptor::portNum -``` - - **Description:** - -Number of ports supported by an audio adapter - -## ports - -``` -struct [AudioPort](AudioPort.md)* AudioAdapterDescriptor::ports -``` - - **Description:** - -List of ports supported by an audio adapter - -## sampleRate - -``` -uint32_t AudioSampleAttributes::sampleRate -``` - - **Description:** - -Audio sampling rate - -## sampleRateMasks - -``` -uint32_t AudioPortCapability::sampleRateMasks -``` - - **Description:** - -Supported audio sampling rates \(8 kHz, 16 kHz, 32 kHz, and 48 kHz\) - -## scene - -``` -union [AudioSceneDescriptor::SceneDesc](AudioSceneDescriptor-SceneDesc.md) AudioSceneDescriptor::scene -``` - - **Description:** - -The **scene** object - -## subPorts - -``` -struct [AudioSubPortCapability](AudioSubPortCapability.md)* AudioPortCapability::subPorts -``` - - **Description:** - -List of supported sub-ports - -## subPortsNum - -``` -uint32_t AudioPortCapability::subPortsNum -``` - - **Description:** - -Number of supported sub-ports \(for output devices only\) - -## tvNSec - -``` -int64_t AudioTimeStamp::tvNSec -``` - - **Description:** - -Nanoseconds - -## tvSec - -``` -int64_t AudioTimeStamp::tvSec -``` - - **Description:** - -Seconds - -## type - -``` -enum [AudioCategory](Audio.md#gaf210d41d152890f3aaf2aaac99bd28d5) AudioSampleAttributes::type -``` - - **Description:** - -Audio type. For details, see [AudioCategory](Audio.md#gaf210d41d152890f3aaf2aaac99bd28d5) - diff --git a/api/api-SmartVision-Devices/AudioAdapter.md b/api/api-SmartVision-Devices/AudioAdapter.md deleted file mode 100755 index bd58e828e689e334bf7d9981dd3e294d7bf19458..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/AudioAdapter.md +++ /dev/null @@ -1,417 +0,0 @@ -# AudioAdapter - -- [Overview](#section611392098165630) -- [Summary](#section1187227500165630) -- [Data Fields](#pub-attribs) -- [Details](#section2025801532165630) -- [Field](#section1769083627165630) -- [CreateCapture](#a8a46358cdad8e0a9d15ac079713535f2) -- [CreateRender](#a284ea2ad18ebac562ca7283652e61b50) -- [DestroyCapture](#a1175a27c5273dab1acf8f8f3c4967637) -- [DestroyRender](#a070a8d60f88134c58c4439d4419af913) -- [GetPassthroughMode](#ad4c41f3193c5ec3da254f33e24241ea6) -- [GetPortCapability](#a525ec7f3f3bb9975790e27f75145d0f6) -- [InitAllPorts](#a3c46c9291d4c08d489454ffd78d4a1ee) -- [SetPassthroughMode](#ac4e77085cdcc853de832a2b16b8dc69a) - -## **Overview** - -**Related Modules:** - -[Audio](Audio.md) - -**Description:** - -Provides audio adapter capabilities, including initializing ports, creating rendering and capturing tasks, and obtaining the port capability set. - -See also -: [AudioRender](AudioRender.md) - -: [AudioCapture](AudioCapture.md) - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

InitAllPorts )(struct AudioAdapter *adapter)

-

int32_t(*

-

Initializes all ports of an audio adapter.

-

CreateRender )(struct AudioAdapter *adapter, const struct AudioDeviceDescriptor *desc, const struct AudioSampleAttributes *attrs, struct AudioRender **render)

-

int32_t(*

-

Creates an AudioRender object.

-

DestroyRender )(struct AudioAdapter *adapter, struct AudioRender *render)

-

int32_t(*

-

Destroys an AudioRender object.

-

CreateCapture )(struct AudioAdapter *adapter, const struct AudioDeviceDescriptor *desc, const struct AudioSampleAttributes *attrs, struct AudioCapture **capture)

-

int32_t(*

-

Creates an AudioCapture object.

-

DestroyCapture )(struct AudioAdapter *adapter, struct AudioCapture *capture)

-

int32_t(*

-

Destroys an AudioCapture object.

-

GetPortCapability )(struct AudioAdapter *adapter, const struct AudioPort *port, struct AudioPortCapability *capability)

-

int32_t(*

-

Obtains the capability set of the port driver for the audio adapter.

-

SetPassthroughMode )(struct AudioAdapter *adapter, const struct AudioPort *port, enum AudioPortPassthroughMode mode)

-

int32_t(*

-

Sets the passthrough data transmission mode of the audio port driver.

-

GetPassthroughMode )(struct AudioAdapter *adapter, const struct AudioPort *port, enum AudioPortPassthroughMode *mode)

-

int32_t(*

-

Obtains the passthrough data transmission mode of the audio port driver.

-
- -## **Details** - -## **Field ** - -## CreateCapture - -``` -int32_t(* AudioAdapter::CreateCapture) (struct [AudioAdapter](AudioAdapter.md) *adapter, const struct [AudioDeviceDescriptor](AudioDeviceDescriptor.md) *desc, const struct [AudioSampleAttributes](AudioSampleAttributes.md) *attrs, struct [AudioCapture](AudioCapture.md) **capture) -``` - - **Description:** - -Creates an **[AudioCapture](AudioCapture.md)** object. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
adapterIndicates the pointer to the audio adapter to operate.
descIndicates the pointer to the descriptor of the audio adapter to start.
attrsIndicates the pointer to the audio sampling attributes to open.
captureIndicates the double pointer to the AudioCapture object.
- -**Returns:** - -Returns **0** if the **[AudioCapture](AudioCapture.md)** object is created successfully; returns a negative value otherwise. - -**See also:** - -[GetPortCapability](AudioAdapter.md#a525ec7f3f3bb9975790e27f75145d0f6) - - [DestroyCapture](AudioAdapter.md#a1175a27c5273dab1acf8f8f3c4967637) - -## CreateRender - -``` -int32_t(* AudioAdapter::CreateRender) (struct [AudioAdapter](AudioAdapter.md) *adapter, const struct [AudioDeviceDescriptor](AudioDeviceDescriptor.md) *desc, const struct [AudioSampleAttributes](AudioSampleAttributes.md) *attrs, struct [AudioRender](AudioRender.md) **render) -``` - - **Description:** - -Creates an **[AudioRender](AudioRender.md)** object. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
adapterIndicates the pointer to the audio adapter to operate.
descIndicates the pointer to the descriptor of the audio adapter to start.
attrsIndicates the pointer to the audio sampling attributes to open.
renderIndicates the double pointer to the AudioRender object.
- -**Returns:** - -Returns **0** if the **[AudioRender](AudioRender.md)** object is created successfully; returns a negative value otherwise. - -**See also:** - -[GetPortCapability](AudioAdapter.md#a525ec7f3f3bb9975790e27f75145d0f6) - - [DestroyRender](AudioAdapter.md#a070a8d60f88134c58c4439d4419af913) - -## DestroyCapture - -``` -int32_t(* AudioAdapter::DestroyCapture) (struct [AudioAdapter](AudioAdapter.md) *adapter, struct [AudioCapture](AudioCapture.md) *capture) -``` - - **Description:** - -Destroys an **[AudioCapture](AudioCapture.md)** object. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
adapterIndicates the pointer to the audio adapter to operate.
captureIndicates the pointer to the AudioCapture object to operate.
- -**Attention:** - -Do not destroy the object during audio capturing. - -**Returns:** - -Returns **0** if the **[AudioCapture](AudioCapture.md)** object is destroyed; returns a negative value otherwise. - -**See also:** - -[CreateCapture](AudioAdapter.md#a8a46358cdad8e0a9d15ac079713535f2) - -## DestroyRender - -``` -int32_t(* AudioAdapter::DestroyRender) (struct [AudioAdapter](AudioAdapter.md) *adapter, struct [AudioRender](AudioRender.md) *render) -``` - - **Description:** - -Destroys an **[AudioRender](AudioRender.md)** object. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
adapterIndicates the pointer to the audio adapter to operate.
renderIndicates the pointer to the AudioRender object to operate.
- -**Attention:** - -Do not destroy the object during audio rendering. - -**Returns:** - -Returns **0** if the **[AudioRender](AudioRender.md)** object is destroyed; returns a negative value otherwise. - -**See also:** - -[CreateRender](AudioAdapter.md#a284ea2ad18ebac562ca7283652e61b50) - -## GetPassthroughMode - -``` -int32_t(* AudioAdapter::GetPassthroughMode) (struct [AudioAdapter](AudioAdapter.md) *adapter, const struct [AudioPort](AudioPort.md) *port, enum [AudioPortPassthroughMode](Audio.md#ga186d2d4f9a2ecacb80cd2cce2bd26f0e) *mode) -``` - - **Description:** - -Obtains the passthrough data transmission mode of the audio port driver. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
adapterIndicates the pointer to the audio adapter to operate.
portIndicates the pointer to the port.
modeIndicates the pointer to the passthrough transmission mode to obtain.
- -**Returns:** - -Returns **0** if the mode is successfully obtained; returns a negative value otherwise. - -**See also:** - -[SetPassthroughMode](AudioAdapter.md#ac4e77085cdcc853de832a2b16b8dc69a) - -## GetPortCapability - -``` -int32_t(* AudioAdapter::GetPortCapability) (struct [AudioAdapter](AudioAdapter.md) *adapter, const struct [AudioPort](AudioPort.md) *port, struct [AudioPortCapability](AudioPortCapability.md) *capability) -``` - - **Description:** - -Obtains the capability set of the port driver for the audio adapter. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
adapterIndicates the pointer to the audio adapter to operate.
portIndicates the pointer to the port.
capabilityIndicates the pointer to the capability set to obtain.
- -**Returns:** - -Returns **0** if the capability set is successfully obtained; returns a negative value otherwise. - -## InitAllPorts - -``` -int32_t(* AudioAdapter::InitAllPorts) (struct [AudioAdapter](AudioAdapter.md) *adapter) -``` - - **Description:** - -Initializes all ports of an audio adapter. - -Call this function before calling other driver functions to check whether the initialization is complete. If the initialization is not complete, wait for a while \(for example, 100 ms\) and perform the check again until the port initialization is complete. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
adapterIndicates the pointer to the audio adapter to operate.
- -**Returns:** - -Returns **0** if the initialization is successful; returns a negative value otherwise. - -## SetPassthroughMode - -``` -int32_t(* AudioAdapter::SetPassthroughMode) (struct [AudioAdapter](AudioAdapter.md) *adapter, const struct [AudioPort](AudioPort.md) *port, enum [AudioPortPassthroughMode](Audio.md#ga186d2d4f9a2ecacb80cd2cce2bd26f0e) mode) -``` - - **Description:** - -Sets the passthrough data transmission mode of the audio port driver. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
adapterIndicates the pointer to the audio adapter to operate.
portIndicates the pointer to the port.
modeIndicates the passthrough transmission mode to set.
- -**Returns:** - -Returns **0** if the setting is successful; returns a negative value otherwise. - -**See also:** - -[GetPassthroughMode](AudioAdapter.md#ad4c41f3193c5ec3da254f33e24241ea6) - diff --git a/api/api-SmartVision-Devices/AudioAdapterDescriptor.md b/api/api-SmartVision-Devices/AudioAdapterDescriptor.md deleted file mode 100755 index 77d04230675bff71e5f04957d46f8b749e5a5630..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/AudioAdapterDescriptor.md +++ /dev/null @@ -1,47 +0,0 @@ -# AudioAdapterDescriptor - -- [Overview](#section893230250165630) -- [Summary](#section1226914997165630) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[Audio](Audio.md) - -**Description:** - -Defines the audio adapter descriptor. - -An audio adapter is a set of port drivers for a sound card, including the output and input ports. One port corresponds to multiple pins, and each pin belongs to a physical component \(such as a speaker or a wired headset\). - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

adapterName

-

const char *

-

portNum

-

uint32_t

-

ports

-

struct AudioPort *

-
- diff --git a/api/api-SmartVision-Devices/AudioAttribute.md b/api/api-SmartVision-Devices/AudioAttribute.md deleted file mode 100755 index 33f5af88f40fec6b7e46904b80836aadc86e2282..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/AudioAttribute.md +++ /dev/null @@ -1,247 +0,0 @@ -# AudioAttribute - -- [Overview](#section1896801825165630) -- [Summary](#section1215842888165630) -- [Data Fields](#pub-attribs) -- [Details](#section424170924165630) -- [Field](#section109559353165630) -- [GetCurrentChannelId](#ad070369ffa9d88df541aaf0ffbbcfbfd) -- [GetFrameCount](#ab31fee582dc33b9320e0a0e5d16ae0e6) -- [GetFrameSize](#a74a23f0544ac688223e61fa71a307851) -- [GetSampleAttributes](#a2f92d8704ef677a07d664c33342e4318) -- [SetSampleAttributes](#a502fe4e4b97cd253244debcc67d45c4d) - -## **Overview** - -**Related Modules:** - -[Audio](Audio.md) - -**Description:** - -Provides attribute-related APIs for audio rendering or capturing, including functions to obtain frame information and set audio sampling attributes. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

GetFrameSize )(AudioHandle handle, uint64_t *size)

-

int32_t(*

-

Obtains the audio frame size, that is, the length (in bytes) of a frame.

-

GetFrameCount )(AudioHandle handle, uint64_t *count)

-

int32_t(*

-

Obtains the number of audio frames in the audio buffer.

-

SetSampleAttributes )(AudioHandle handle, const struct AudioSampleAttributes *attrs)

-

int32_t(*

-

Sets audio sampling attributes.

-

GetSampleAttributes )(AudioHandle handle, struct AudioSampleAttributes *attrs)

-

int32_t(*

-

Obtains audio sampling attributes.

-

GetCurrentChannelId )(AudioHandle handle, uint32_t *channelId)

-

int32_t(*

-

Obtains the data channel ID of the audio.

-
- -## **Details** - -## **Field ** - -## GetCurrentChannelId - -``` -int32_t(* AudioAttribute::GetCurrentChannelId) ([AudioHandle](Audio.md#ga18675ddb073465fdeac33a897f675d79) handle, uint32_t *channelId) -``` - - **Description:** - -Obtains the data channel ID of the audio. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the audio handle.
channelIdIndicates the pointer to the data channel ID.
- -**Returns:** - -Returns **0** if the data channel ID is obtained; returns a negative value otherwise. - -## GetFrameCount - -``` -int32_t(* AudioAttribute::GetFrameCount) ([AudioHandle](Audio.md#ga18675ddb073465fdeac33a897f675d79) handle, uint64_t *count) -``` - - **Description:** - -Obtains the number of audio frames in the audio buffer. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the audio handle.
countIndicates the pointer to the number of audio frames in the audio buffer.
- -**Returns:** - -Returns **0** if the number of audio frames is obtained; returns a negative value otherwise. - -## GetFrameSize - -``` -int32_t(* AudioAttribute::GetFrameSize) ([AudioHandle](Audio.md#ga18675ddb073465fdeac33a897f675d79) handle, uint64_t *size) -``` - - **Description:** - -Obtains the audio frame size, that is, the length \(in bytes\) of a frame. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the audio handle.
sizeIndicates the pointer to the audio frame size (in bytes).
- -**Returns:** - -Returns **0** if the audio frame size is obtained; returns a negative value otherwise. - -## GetSampleAttributes - -``` -int32_t(* AudioAttribute::GetSampleAttributes) ([AudioHandle](Audio.md#ga18675ddb073465fdeac33a897f675d79) handle, struct [AudioSampleAttributes](AudioSampleAttributes.md) *attrs) -``` - - **Description:** - -Obtains audio sampling attributes. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the audio handle.
attrsIndicates the pointer to the audio sampling attributes, such as the sampling rate, sampling precision, and channel.
- -**Returns:** - -Returns **0** if audio sampling attributes are obtained; returns a negative value otherwise. - -**See also:** - -[SetSampleAttributes](AudioAttribute.md#a502fe4e4b97cd253244debcc67d45c4d) - -## SetSampleAttributes - -``` -int32_t(* AudioAttribute::SetSampleAttributes) ([AudioHandle](Audio.md#ga18675ddb073465fdeac33a897f675d79) handle, const struct [AudioSampleAttributes](AudioSampleAttributes.md) *attrs) -``` - - **Description:** - -Sets audio sampling attributes. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the audio handle.
attrsIndicates the pointer to the audio sampling attributes to set, such as the sampling rate, sampling precision, and channel.
- -**Returns:** - -Returns **0** if the setting is successful; returns a negative value otherwise. - -**See also:** - -[GetSampleAttributes](AudioAttribute.md#a2f92d8704ef677a07d664c33342e4318) - diff --git a/api/api-SmartVision-Devices/AudioCapture.md b/api/api-SmartVision-Devices/AudioCapture.md deleted file mode 100755 index db21314b2ebec0f4aaf68b4b21ac516a18f755cd..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/AudioCapture.md +++ /dev/null @@ -1,168 +0,0 @@ -# AudioCapture - -- [Overview](#section1508227372165630) -- [Summary](#section1685488375165630) -- [Data Fields](#pub-attribs) -- [Details](#section2098671874165630) -- [Field](#section655888037165630) -- [CaptureFrame](#a89f1baf4b6177f91b9135e86cc8681da) -- [GetCapturePosition](#ad307fd1eca38f257f865c1316db6e5d5) - -## **Overview** - -**Related Modules:** - -[Audio](Audio.md) - -**Description:** - -Provides capabilities for audio capturing, including controlling the capturing, setting audio attributes, scenes, and volume, and capturing audio frames. - -See also -: [AudioControl](AudioControl.md) - -: [AudioAttribute](AudioAttribute.md) - -: [AudioScene](AudioScene.md) - -: [AudioVolume](AudioVolume.md) - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

control

-

struct AudioControl

-

Defines the audio control. For details, see AudioControl.

-

attr

-

struct AudioAttribute

-

Defines the audio attribute. For details, see AudioAttribute.

-

scene

-

struct AudioScene

-

Defines the audio scene. For details, see AudioScene.

-

volume

-

struct AudioVolume

-

Defines audio volume. For details, see AudioVolume.

-

CaptureFrame )(struct AudioCapture *capture, void *frame, uint64_t requestBytes, uint64_t *replyBytes)

-

int32_t(*

-

Reads a frame of input data (uplink data) from the audio driver for capturing.

-

GetCapturePosition )(struct AudioCapture *capture, uint64_t *frames, struct AudioTimeStamp *time)

-

int32_t(*

-

Obtains the last number of input audio frames.

-
- -## **Details** - -## **Field ** - -## CaptureFrame - -``` -int32_t(* AudioCapture::CaptureFrame) (struct [AudioCapture](AudioCapture.md) *capture, void *frame, uint64_t requestBytes, uint64_t *replyBytes) -``` - - **Description:** - -Reads a frame of input data \(uplink data\) from the audio driver for capturing. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
captureIndicates the pointer to the AudioCapture object to operate.
frameIndicates the pointer to the input data to read.
requestBytesIndicates the size of the input data, in bytes.
replyBytesIndicates the pointer to the actual length (in bytes) of the audio data to read.
- -**Returns:** - -Returns **0** if the input data is read successfully; returns a negative value otherwise. - -## GetCapturePosition - -``` -int32_t(* AudioCapture::GetCapturePosition) (struct [AudioCapture](AudioCapture.md) *capture, uint64_t *frames, struct [AudioTimeStamp](AudioTimeStamp.md) *[time](TIME.md#gae7841e681c8c9d59818568d39553642c)) -``` - - **Description:** - -Obtains the last number of input audio frames. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
captureIndicates the pointer to the AudioCapture object to operate.
framesIndicates the pointer to the last number of input audio frames.
timeIndicates the pointer to the timestamp associated with the frame.
- -**Returns:** - -Returns **0** if the last number is obtained; returns a negative value otherwise. - -**See also:** - -[CaptureFrame](AudioCapture.md#a89f1baf4b6177f91b9135e86cc8681da) - diff --git a/api/api-SmartVision-Devices/AudioControl.md b/api/api-SmartVision-Devices/AudioControl.md deleted file mode 100755 index a1f1e474dc73fb02c4a6d10972b36e404cb81b25..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/AudioControl.md +++ /dev/null @@ -1,240 +0,0 @@ -# AudioControl - -- [Overview](#section1915690746165630) -- [Summary](#section471008123165630) -- [Data Fields](#pub-attribs) -- [Details](#section1829845227165630) -- [Field](#section1736957898165630) -- [Flush](#acebc54c385b91ddc52b6b7849ddf12d0) -- [Pause](#a16a26deffa17b9f143f602763a260908) -- [Resume](#ac59c3e9a5ff9041989871f67253a1e8d) -- [Start](#a80ddae13819bb1eb348ad4b57597e930) -- [Stop](#a62e385e391ba1efed35021ee67ab9449) - -## **Overview** - -**Related Modules:** - -[Audio](Audio.md) - -**Description:** - -Provides control-related APIs for audio rendering or capturing, including functions to start, stop, pause, and resume audio rendering or capturing, and flush data in the audio buffer. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

Start )(AudioHandle handle)

-

int32_t(*

-

Starts audio rendering or capturing.

-

Stop )(AudioHandle handle)

-

int32_t(*

-

Stops audio rendering or capturing.

-

Pause )(AudioHandle handle)

-

int32_t(*

-

Pauses audio rendering or capturing.

-

Resume )(AudioHandle handle)

-

int32_t(*

-

Resumes audio rendering or capturing.

-

Flush )(AudioHandle handle)

-

int32_t(*

-

Flushes data in the audio buffer.

-
- -## **Details** - -## **Field ** - -## Flush - -``` -int32_t(* AudioControl::Flush) ([AudioHandle](Audio.md#ga18675ddb073465fdeac33a897f675d79) handle) -``` - - **Description:** - -Flushes data in the audio buffer. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
handleIndicates the audio handle.
- -**Returns:** - -Returns **0** if the flush is successful; returns a negative value otherwise. - -## Pause - -``` -int32_t(* AudioControl::Pause) ([AudioHandle](Audio.md#ga18675ddb073465fdeac33a897f675d79) handle) -``` - - **Description:** - -Pauses audio rendering or capturing. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
handleIndicates the audio handle.
- -**Returns:** - -Returns **0** if the rendering or capturing is successfully paused; returns a negative value otherwise. - -**See also:** - -[Resume](AudioControl.md#ac59c3e9a5ff9041989871f67253a1e8d) - -## Resume - -``` -int32_t(* AudioControl::Resume) ([AudioHandle](Audio.md#ga18675ddb073465fdeac33a897f675d79) handle) -``` - - **Description:** - -Resumes audio rendering or capturing. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
handleIndicates the audio handle.
- -**Returns:** - -Returns **0** if the rendering or capturing is successfully resumed; returns a negative value otherwise. - -**See also:** - -[Pause](AudioControl.md#a16a26deffa17b9f143f602763a260908) - -## Start - -``` -int32_t(* AudioControl::Start) ([AudioHandle](Audio.md#ga18675ddb073465fdeac33a897f675d79) handle) -``` - - **Description:** - -Starts audio rendering or capturing. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
handleIndicates the audio handle.
- -**Returns:** - -Returns **0** if the rendering or capturing is successfully started; returns a negative value otherwise. - -**See also:** - -[Stop](AudioControl.md#a62e385e391ba1efed35021ee67ab9449) - -## Stop - -``` -int32_t(* AudioControl::Stop) ([AudioHandle](Audio.md#ga18675ddb073465fdeac33a897f675d79) handle) -``` - - **Description:** - -Stops audio rendering or capturing. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
handleIndicates the audio handle.
- -**Returns:** - -Returns **0** if the rendering or capturing is successfully stopped; returns a negative value otherwise. - -**See also:** - -[Start](AudioControl.md#a80ddae13819bb1eb348ad4b57597e930) - diff --git a/api/api-SmartVision-Devices/AudioDeviceDesc.md b/api/api-SmartVision-Devices/AudioDeviceDesc.md deleted file mode 100755 index 6c554c3f7bab392dfcccb00b54032200fc35040f..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/AudioDeviceDesc.md +++ /dev/null @@ -1,53 +0,0 @@ -# AudioDeviceDesc - -- [Overview](#section427099239165630) -- [Summary](#section1880410929165630) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[MultiMedia\_MediaCommon](MultiMedia_MediaCommon.md) - -**Description:** - -Defines the audio Device Descriptor. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

deviceName

-

std::string

-

inputSourceType

-

AudioSourceType

-

deviceId

-

uint32_t

-
- diff --git a/api/api-SmartVision-Devices/AudioDeviceDescriptor.md b/api/api-SmartVision-Devices/AudioDeviceDescriptor.md deleted file mode 100755 index f34ccb3bed0a4cbafdec5909cd2ccb13f24967f0..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/AudioDeviceDescriptor.md +++ /dev/null @@ -1,45 +0,0 @@ -# AudioDeviceDescriptor - -- [Overview](#section1264689688165630) -- [Summary](#section120702975165630) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[Audio](Audio.md) - -**Description:** - -Defines the audio device descriptor. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

portId

-

uint32_t

-

pins

-

enum AudioPortPin

-

desc

-

const char *

-
- diff --git a/api/api-SmartVision-Devices/AudioManager.md b/api/api-SmartVision-Devices/AudioManager.md deleted file mode 100755 index 3f3839da26c0bfbcccfec4872e5b648e07304ab3..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/AudioManager.md +++ /dev/null @@ -1,182 +0,0 @@ -# AudioManager - -- [Overview](#section92245219165630) -- [Summary](#section1284654492165630) -- [Data Fields](#pub-attribs) -- [Details](#section1307104535165630) -- [Field](#section435920409165630) -- [GetAllAdapters](#a93a0ffb0df907fabcfca827d31dadf39) -- [LoadAdapter](#ab090e9c760a2888b55acc7baa4222ccb) -- [UnloadAdapter](#a556137764c5bf784972ba79303720fc3) - -## **Overview** - -**Related Modules:** - -[Audio](Audio.md) - -**Description:** - -Manages audio adapters through a specific adapter driver program loaded based on the given audio adapter descriptor. - -See also -: [AudioAdapter](AudioAdapter.md) - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

GetAllAdapters )(struct AudioManager *manager, struct AudioAdapterDescriptor **descs, int32_t *size)

-

int32_t(*

-

Obtains the list of all adapters supported by an audio driver.

-

LoadAdapter )(struct AudioManager *manager, const struct AudioAdapterDescriptor *desc, struct AudioAdapter **adapter)

-

int32_t(*

-

Loads the driver for an audio adapter.

-

UnloadAdapter )(struct AudioManager *manager, struct AudioAdapter *adapter)

-

void(*

-

Unloads the driver of an audio adapter.

-
- -## **Details** - -## **Field ** - -## GetAllAdapters - -``` -int32_t(* AudioManager::GetAllAdapters) (struct [AudioManager](AudioManager.md) *manager, struct [AudioAdapterDescriptor](AudioAdapterDescriptor.md) **descs, int32_t *size) -``` - - **Description:** - -Obtains the list of all adapters supported by an audio driver. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
managerIndicates the pointer to the audio adapter manager to operate.
descsIndicates the double pointer to the audio adapter list.
sizeIndicates the pointer to the length of the list.
- -**Returns:** - -Returns **0** if the list is obtained successfully; returns a negative value otherwise. - -**See also:** - -[LoadAdapter](AudioManager.md#ab090e9c760a2888b55acc7baa4222ccb) - -## LoadAdapter - -``` -int32_t(* AudioManager::LoadAdapter) (struct [AudioManager](AudioManager.md) *manager, const struct [AudioAdapterDescriptor](AudioAdapterDescriptor.md) *desc, struct [AudioAdapter](AudioAdapter.md) **adapter) -``` - - **Description:** - -Loads the driver for an audio adapter. - -For example, to load a USB driver, you may need to load a dynamic-link library \(\*.so\) in specific implementation. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
managerIndicates the pointer to the audio adapter manager to operate.
descIndicates the pointer to the descriptor of the audio adapter.
adapterIndicates the double pointer to the audio adapter.
- -**Returns:** - -Returns **0** if the driver is loaded successfully; returns a negative value otherwise. - -**See also:** - -[GetAllAdapters](AudioManager.md#a93a0ffb0df907fabcfca827d31dadf39) - - [UnloadAdapter](AudioManager.md#a556137764c5bf784972ba79303720fc3) - -## UnloadAdapter - -``` -void(* AudioManager::UnloadAdapter) (struct [AudioManager](AudioManager.md) *manager, struct [AudioAdapter](AudioAdapter.md) *adapter) -``` - - **Description:** - -Unloads the driver of an audio adapter. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
managerIndicates the pointer to the audio adapter manager to operate.
adapterIndicates the pointer to the audio adapter whose driver will be unloaded.
- -**See also:** - -[LoadAdapter](AudioManager.md#ab090e9c760a2888b55acc7baa4222ccb) - diff --git a/api/api-SmartVision-Devices/AudioPort.md b/api/api-SmartVision-Devices/AudioPort.md deleted file mode 100755 index 30a4595301369c882db2fec119836e0dcbe7c19c..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/AudioPort.md +++ /dev/null @@ -1,45 +0,0 @@ -# AudioPort - -- [Overview](#section1499167585165630) -- [Summary](#section1187606563165630) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[Audio](Audio.md) - -**Description:** - -Defines the audio port. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

dir

-

enum AudioPortDirection

-

portId

-

uint32_t

-

portName

-

const char *

-
- diff --git a/api/api-SmartVision-Devices/AudioPortCapability.md b/api/api-SmartVision-Devices/AudioPortCapability.md deleted file mode 100755 index 16513c7dad6ee8897da673116357a1ec25ec728a..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/AudioPortCapability.md +++ /dev/null @@ -1,80 +0,0 @@ -# AudioPortCapability - -- [Overview](#section1031146899165630) -- [Summary](#section1554321728165630) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[Audio](Audio.md) - -**Description:** - -Defines the audio port capability. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

deviceType

-

uint32_t

-

deviceId

-

uint32_t

-

hardwareMode

-

bool

-

formatNum

-

uint32_t

-

formats

-

enum AudioFormat *

-

sampleRateMasks

-

uint32_t

-

channelMasks

-

enum AudioChannelMask

-

channelCount

-

uint32_t

-

subPortsNum

-

uint32_t

-

subPorts

-

struct AudioSubPortCapability *

-
- diff --git a/api/api-SmartVision-Devices/AudioRender.md b/api/api-SmartVision-Devices/AudioRender.md deleted file mode 100755 index 5f6e1156b7e0878b294fc75090e5479a65ba4a6a..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/AudioRender.md +++ /dev/null @@ -1,379 +0,0 @@ -# AudioRender - -- [Overview](#section1801946826165630) -- [Summary](#section1078987041165630) -- [Data Fields](#pub-attribs) -- [Details](#section422181551165630) -- [Field](#section202261737165630) -- [GetChannelMode](#aad3d5e4104167620eacb2ba23edce50e) -- [GetLatency](#a56dff6bbe1c5ac8361b2e3238ab09563) -- [GetRenderPosition](#a24072bec0e2cd75727b57ec3e14f7ccb) -- [GetRenderSpeed](#af0a19dacb293d3fbe600902b93af1ee9) -- [RenderFrame](#a463cab04d0805a5c7b3ba5884c468246) -- [SetChannelMode](#ae5aad5b26ccdd65ba501620851c5ecec) -- [SetRenderSpeed](#a5589427ae5a4ba6a8d2a19dd8eddbcd8) - -## **Overview** - -**Related Modules:** - -[Audio](Audio.md) - -**Description:** - -Provides capabilities for audio rendering, including controlling the rendering, setting audio attributes, scenes, and volume, obtaining hardware latency, and rendering audio frames. - -See also -: [AudioControl](AudioControl.md) - -: [AudioAttribute](AudioAttribute.md) - -: [AudioScene](AudioScene.md) - -: [AudioVolume](AudioVolume.md) - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

control

-

struct AudioControl

-

Defines the audio control. For details, see AudioControl.

-

attr

-

struct AudioAttribute

-

Defines the audio attribute. For details, see AudioAttribute.

-

scene

-

struct AudioScene

-

Defines the audio scene. For details, see AudioScene.

-

volume

-

struct AudioVolume

-

Defines audio volume. For details, see AudioVolume.

-

GetLatency )(struct AudioRender *render, uint32_t *ms)

-

int32_t(*

-

Obtains the estimated latency of the audio device driver.

-

RenderFrame )(struct AudioRender *render, const void *frame, uint64_t requestBytes, uint64_t *replyBytes)

-

int32_t(*

-

Writes a frame of output data (downlink data) into the audio driver for rendering.

-

GetRenderPosition )(struct AudioRender *render, uint64_t *frames, struct AudioTimeStamp *time)

-

int32_t(*

-

Obtains the last number of output audio frames.

-

SetRenderSpeed )(struct AudioRender *render, float speed)

-

int32_t(*

-

Sets the audio rendering speed.

-

GetRenderSpeed )(struct AudioRender *render, float *speed)

-

int32_t(*

-

Obtains the current audio rendering speed.

-

SetChannelMode )(struct AudioRender *render, enum AudioChannelMode mode)

-

int32_t(*

-

Sets the channel mode for audio rendering.

-

GetChannelMode )(struct AudioRender *render, enum AudioChannelMode *mode)

-

int32_t(*

-

Obtains the current channel mode for audio rendering.

-
- -## **Details** - -## **Field ** - -## GetChannelMode - -``` -int32_t(* AudioRender::GetChannelMode) (struct [AudioRender](AudioRender.md) *render, enum [AudioChannelMode](Audio.md#ga78aab1fafb9657451804e42b42897123) *mode) -``` - - **Description:** - -Obtains the current channel mode for audio rendering. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
renderIndicates the pointer to the AudioRender object to operate.
modeIndicates the pointer to the channel mode to obtain.
- -**Returns:** - -Returns **0** if the mode is successfully obtained; returns a negative value otherwise. - -**See also:** - -[SetChannelMode](AudioRender.md#ae5aad5b26ccdd65ba501620851c5ecec) - -## GetLatency - -``` -int32_t(* AudioRender::GetLatency) (struct [AudioRender](AudioRender.md) *render, uint32_t *ms) -``` - - **Description:** - -Obtains the estimated latency of the audio device driver. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
renderIndicates the pointer to the AudioRender object to operate.
msIndicates the pointer to the latency (in milliseconds) to be obtained.
- -**Returns:** - -Returns **0** if the latency is obtained; returns a negative value otherwise. - -## GetRenderPosition - -``` -int32_t(* AudioRender::GetRenderPosition) (struct [AudioRender](AudioRender.md) *render, uint64_t *frames, struct [AudioTimeStamp](AudioTimeStamp.md) *[time](TIME.md#gae7841e681c8c9d59818568d39553642c)) -``` - - **Description:** - -Obtains the last number of output audio frames. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
renderIndicates the pointer to the AudioRender object to operate.
framesIndicates the pointer to the last number of output audio frames.
timeIndicates the pointer to the timestamp associated with the frame.
- -**Returns:** - -Returns **0** if the last number is obtained; returns a negative value otherwise. - -**See also:** - -[RenderFrame](AudioRender.md#a463cab04d0805a5c7b3ba5884c468246) - -## GetRenderSpeed - -``` -int32_t(* AudioRender::GetRenderSpeed) (struct [AudioRender](AudioRender.md) *render, float *speed) -``` - - **Description:** - -Obtains the current audio rendering speed. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
renderIndicates the pointer to the AudioRender object to operate.
speedIndicates the pointer to the current rendering speed to obtain.
- -**Returns:** - -Returns **0** if the speed is successfully obtained; returns a negative value otherwise. - -**See also:** - -[SetRenderSpeed](AudioRender.md#a5589427ae5a4ba6a8d2a19dd8eddbcd8) - -## RenderFrame - -``` -int32_t(* AudioRender::RenderFrame) (struct [AudioRender](AudioRender.md) *render, const void *frame, uint64_t requestBytes, uint64_t *replyBytes) -``` - - **Description:** - -Writes a frame of output data \(downlink data\) into the audio driver for rendering. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
renderIndicates the pointer to the AudioRender object to operate.
frameIndicates the pointer to the frame to write.
requestBytesIndicates the size of the frame, in bytes.
replyBytesIndicates the pointer to the actual length (in bytes) of the audio data to write.
- -**Returns:** - -Returns **0** if the data is written successfully; returns a negative value otherwise. - -## SetChannelMode - -``` -int32_t(* AudioRender::SetChannelMode) (struct [AudioRender](AudioRender.md) *render, enum [AudioChannelMode](Audio.md#ga78aab1fafb9657451804e42b42897123) mode) -``` - - **Description:** - -Sets the channel mode for audio rendering. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
renderIndicates the pointer to the AudioRender object to operate.
modeIndicates the channel mode to set.
- -**Returns:** - -Returns **0** if the setting is successful; returns a negative value otherwise. - -**See also:** - -[GetChannelMode](AudioRender.md#aad3d5e4104167620eacb2ba23edce50e) - -## SetRenderSpeed - -``` -int32_t(* AudioRender::SetRenderSpeed) (struct [AudioRender](AudioRender.md) *render, float speed) -``` - - **Description:** - -Sets the audio rendering speed. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
renderIndicates the pointer to the AudioRender object to operate.
speedIndicates the rendering speed to set.
- -**Returns:** - -Returns **0** if the setting is successful; returns a negative value otherwise. - -**See also:** - -[GetRenderSpeed](AudioRender.md#af0a19dacb293d3fbe600902b93af1ee9) - diff --git a/api/api-SmartVision-Devices/AudioSampleAttributes.md b/api/api-SmartVision-Devices/AudioSampleAttributes.md deleted file mode 100755 index bf1ab1afefbeb91faa50acbdc0be1b56ccde22a1..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/AudioSampleAttributes.md +++ /dev/null @@ -1,55 +0,0 @@ -# AudioSampleAttributes - -- [Overview](#section55678551165630) -- [Summary](#section1305932239165630) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[Audio](Audio.md) - -**Description:** - -Defines audio sampling attributes. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

type

-

enum AudioCategory

-

interleaved

-

bool

-

format

-

enum AudioFormat

-

sampleRate

-

uint32_t

-

channelCount

-

uint32_t

-
- diff --git a/api/api-SmartVision-Devices/AudioScene.md b/api/api-SmartVision-Devices/AudioScene.md deleted file mode 100755 index b164d1dd1224440a1dce088a458491d1f8d5bc15..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/AudioScene.md +++ /dev/null @@ -1,133 +0,0 @@ -# AudioScene - -- [Overview](#section363513269165630) -- [Summary](#section868572158165630) -- [Data Fields](#pub-attribs) -- [Details](#section396807424165630) -- [Field](#section649234473165630) -- [CheckSceneCapability](#a9b485404b2ec3b8bc2b8d1b73401d45c) -- [SelectScene](#aacdbf3a9f488a7e71f3a5a23c68c0068) - -## **Overview** - -**Related Modules:** - -[Audio](Audio.md) - -**Description:** - -Provides scene-related APIs for audio rendering or capturing, including functions to select an audio scene and check whether the configuration of an audio scene is supported. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

CheckSceneCapability )(AudioHandle handle, const struct AudioSceneDescriptor *scene, bool *supported)

-

int32_t(*

-

Checks whether the configuration of an audio scene is supported.

-

SelectScene )(AudioHandle handle, const struct AudioSceneDescriptor *scene)

-

int32_t(*

-

Selects an audio scene.

-
- -## **Details** - -## **Field ** - -## CheckSceneCapability - -``` -int32_t(* AudioScene::CheckSceneCapability) ([AudioHandle](Audio.md#ga18675ddb073465fdeac33a897f675d79) handle, const struct [AudioSceneDescriptor](AudioSceneDescriptor.md) *scene, bool *supported) -``` - - **Description:** - -Checks whether the configuration of an audio scene is supported. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the audio handle.
sceneIndicates the pointer to the descriptor of the audio scene.
supportedIndicates the pointer to the variable specifying whether the configuration is supported. Value true means that the configuration is supported, and false means the opposite.
- -**Returns:** - -Returns **0** if the result is obtained; returns a negative value otherwise. - -**See also:** - -[SelectScene](AudioScene.md#aacdbf3a9f488a7e71f3a5a23c68c0068) - -## SelectScene - -``` -int32_t(* AudioScene::SelectScene) ([AudioHandle](Audio.md#ga18675ddb073465fdeac33a897f675d79) handle, const struct [AudioSceneDescriptor](AudioSceneDescriptor.md) *scene) -``` - - **Description:** - -Selects an audio scene. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the audio handle.
sceneIndicates the pointer to the descriptor of the audio scene to select.
- -**Returns:** - -Returns **0** if the scene is selected successfully; returns a negative value otherwise. - -**See also:** - -[CheckSceneCapability](AudioScene.md#a9b485404b2ec3b8bc2b8d1b73401d45c) - diff --git a/api/api-SmartVision-Devices/AudioSceneDescriptor-SceneDesc.md b/api/api-SmartVision-Devices/AudioSceneDescriptor-SceneDesc.md deleted file mode 100755 index 9a40a6aaec70a5286738e49ff81ba2a14e57d2c3..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/AudioSceneDescriptor-SceneDesc.md +++ /dev/null @@ -1,40 +0,0 @@ -# AudioSceneDescriptor::SceneDesc - -- [Overview](#section2055010144165630) -- [Summary](#section1057848350165630) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[Audio](Audio.md) - -**Description:** - -Describes the audio scene. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

id

-

uint32_t

-

desc

-

const char *

-
- diff --git a/api/api-SmartVision-Devices/AudioSceneDescriptor.md b/api/api-SmartVision-Devices/AudioSceneDescriptor.md deleted file mode 100755 index aef0d5d2b02653e083dce735cbe5706979b5e097..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/AudioSceneDescriptor.md +++ /dev/null @@ -1,58 +0,0 @@ -# AudioSceneDescriptor - -- [Overview](#section1100893356165630) -- [Summary](#section1630143329165630) -- [Data Structures](#nested-classes) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[Audio](Audio.md) - -**Description:** - -Defines the audio scene descriptor. - -## **Summary** - -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

SceneDesc

-

Describes the audio scene.

-
- -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

scene

-

union AudioSceneDescriptor::SceneDesc

-

desc

-

struct AudioDeviceDescriptor

-
- diff --git a/api/api-SmartVision-Devices/AudioSubPortCapability.md b/api/api-SmartVision-Devices/AudioSubPortCapability.md deleted file mode 100755 index 738e5506ef3e1b6cb088986e968798e1a074cb92..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/AudioSubPortCapability.md +++ /dev/null @@ -1,45 +0,0 @@ -# AudioSubPortCapability - -- [Overview](#section236366782165630) -- [Summary](#section156433704165630) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[Audio](Audio.md) - -**Description:** - -Defines the sub-port capability. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

portId

-

uint32_t

-

desc

-

const char *

-

mask

-

enum AudioPortPassthroughMode

-
- diff --git a/api/api-SmartVision-Devices/AudioTimeStamp.md b/api/api-SmartVision-Devices/AudioTimeStamp.md deleted file mode 100755 index 03607154df9380683a648ade379fbda43b86b42b..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/AudioTimeStamp.md +++ /dev/null @@ -1,40 +0,0 @@ -# AudioTimeStamp - -- [Overview](#section239589251165630) -- [Summary](#section1963997057165630) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[Audio](Audio.md) - -**Description:** - -Defines the audio timestamp, which is a substitute for POSIX **timespec**. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

tvSec

-

int64_t

-

tvNSec

-

int64_t

-
- diff --git a/api/api-SmartVision-Devices/AudioTrackInfo.md b/api/api-SmartVision-Devices/AudioTrackInfo.md deleted file mode 100755 index aad254e9b7e9f05e8785bb1a13859c15a13e9c96..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/AudioTrackInfo.md +++ /dev/null @@ -1,188 +0,0 @@ -# AudioTrackInfo - -- [Overview](#section383083123165630) -- [Summary](#section550070999165630) -- [Data Fields](#pub-attribs) -- [Details](#section160263714165630) -- [Field](#section1710969037165630) -- [bitrate](#a5e5683087b9272d3ee346180ca199afa) -- [channels](#a4468c447f3ad0673c6d06590ff764099) -- [durationMs](#a67862089989d0fae5fd35312ed5287fe) -- [format](#ae7b9c8bf17575184f4027cbe55b7c0a9) -- [language](#ac7d6fb077c4ef6f2c14737fef8f92ba7) -- [profile](#a87acdd081cb338b01364e1ced4c132aa) -- [sampleFmt](#a5a4778ebb70d50bc91f250ae6254ab26) -- [sampleRate](#a7504ddf6a446c7e157eeb015194e2db8) -- [subStreamID](#a682193c30bd99445980e3a8d591bb0ae) - -## **Overview** - -**Related Modules:** - -[Format](Format.md) - -**Description:** - -Defines audio track information. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

format

-

CodecFormat

-

profile

-

uint32_t

-

sampleRate

-

uint32_t

-

sampleFmt

-

uint16_t

-

channels

-

uint16_t

-

subStreamID

-

int32_t

-

bitrate

-

uint32_t

-

language [FORMAT_LANGUAGE_LEN]

-

char

-

durationMs

-

int64_t

-
- -## **Details** - -## **Field ** - -## bitrate - -``` -uint32_t AudioTrackInfo::bitrate -``` - - **Description:** - -Audio and video bit rate - -## channels - -``` -uint16_t AudioTrackInfo::channels -``` - - **Description:** - -Number of audio channels - -## durationMs - -``` -int64_t AudioTrackInfo::durationMs -``` - - **Description:** - -Stream duration, in milliseconds - -## format - -``` -[CodecFormat](Format.md#gaf7ed135f15d4b218d41705bac0122ba7) AudioTrackInfo::format -``` - - **Description:** - -Audio encoding format. For details, see [CodecFormat](Format.md#gaf7ed135f15d4b218d41705bac0122ba7). - -## language - -``` -char AudioTrackInfo::language[[FORMAT_LANGUAGE_LEN](Format.md#gaa70508bb1089c99f9aa3d59fcbdfa8eb)] -``` - - **Description:** - -Audio track language - -## profile - -``` -uint32_t AudioTrackInfo::profile -``` - - **Description:** - -Audio encoding profile, for example, **0x160\(WMAV1\)** and **0x161 \(WMAV2\)**. - -## sampleFmt - -``` -uint16_t AudioTrackInfo::sampleFmt -``` - - **Description:** - -Data storage format of one sample in an audio channel. For details, see [AudioSampleFmt](Format.md#gadf0700999998f587f0017c4d02977b22). - -## sampleRate - -``` -uint32_t AudioTrackInfo::sampleRate -``` - - **Description:** - -Audio sampling rate, for example, **8000**, **16000**, **24000**, **32000**, **11025**, **22050**, **441000**, and **48000** - -## subStreamID - -``` -int32_t AudioTrackInfo::subStreamID -``` - - **Description:** - -ID of the subsidiary audio stream, which is used when the encoding or decoding format of the primary stream is not supported for audio rendering. - diff --git a/api/api-SmartVision-Devices/AudioTrackSourceInfo.md b/api/api-SmartVision-Devices/AudioTrackSourceInfo.md deleted file mode 100755 index 9061108e2a01bd1da40e7958d74150983bd54d50..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/AudioTrackSourceInfo.md +++ /dev/null @@ -1,140 +0,0 @@ -# AudioTrackSourceInfo - -- [Overview](#section857880338165630) -- [Summary](#section570326748165630) -- [Data Fields](#pub-attribs) -- [Details](#section1608966908165630) -- [Field](#section1553039920165630) -- [avgBytesPerSec](#aca750f7a7165a35cfa92a6af0c23d771) -- [channelCount](#a9102735a0ca74b965f1946b5a282ce49) -- [codecType](#abb7f5e09a8cc552aa558d8da6d45a2b7) -- [sampleBitWidth](#a4d17b98a1cb944d9e401fb5ea158c72e) -- [sampleRate](#a1853d9a135862a487c7c612862871b33) -- [samplesPerFrame](#ab1878c9d95c3f20395d219c662e2ae6f) - -## **Overview** - -**Related Modules:** - -[Format](Format.md) - -**Description:** - -Defines information about the muxer audio source. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

codecType

-

CodecFormat

-

sampleRate

-

uint32_t

-

channelCount

-

uint32_t

-

sampleBitWidth

-

AudioSampleFmt

-

samplesPerFrame

-

uint32_t

-

avgBytesPerSec

-

uint32_t

-
- -## **Details** - -## **Field ** - -## avgBytesPerSec - -``` -uint32_t AudioTrackSourceInfo::avgBytesPerSec -``` - - **Description:** - -Average bit rate, in byte/s - -## channelCount - -``` -uint32_t AudioTrackSourceInfo::channelCount -``` - - **Description:** - -Number of audio channels - -## codecType - -``` -[CodecFormat](Format.md#gaf7ed135f15d4b218d41705bac0122ba7) AudioTrackSourceInfo::codecType -``` - - **Description:** - -Audio encoding type, for details, see [CodecFormat](Format.md#gaf7ed135f15d4b218d41705bac0122ba7). - -## sampleBitWidth - -``` -[AudioSampleFmt](Format.md#gadf0700999998f587f0017c4d02977b22) AudioTrackSourceInfo::sampleBitWidth -``` - - **Description:** - -Bit width - -## sampleRate - -``` -uint32_t AudioTrackSourceInfo::sampleRate -``` - - **Description:** - -Sampling rate - -## samplesPerFrame - -``` -uint32_t AudioTrackSourceInfo::samplesPerFrame -``` - - **Description:** - -Number of samples per frame - diff --git a/api/api-SmartVision-Devices/AudioVolume.md b/api/api-SmartVision-Devices/AudioVolume.md deleted file mode 100755 index b0d165b75f39c43479d9a5d9acfa5e39c4b57965..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/AudioVolume.md +++ /dev/null @@ -1,358 +0,0 @@ -# AudioVolume - -- [Overview](#section1226262637165630) -- [Summary](#section1494919611165630) -- [Data Fields](#pub-attribs) -- [Details](#section816896005165630) -- [Field](#section916202426165630) -- [GetGain](#a5ff7f9e5b763d20822a1fadecc5a8db7) -- [GetGainThreshold](#aa42ff18fa2b7e6780acf120ea49054ed) -- [GetMute](#a75fcb5bda7e0ca9b823187f6056ad1d4) -- [GetVolume](#a649524ce280ecdb62ddacb78e1a63439) -- [SetGain](#ab667c5f8754d0b10121451a57abbe429) -- [SetMute](#a79c127fa37eb2dbf8dc5fe9f0ed4421e) -- [SetVolume](#aebf67caf924cba5f3be9d0f395390908) - -## **Overview** - -**Related Modules:** - -[Audio](Audio.md) - -**Description:** - -Provides volume-related APIs for audio rendering or capturing, including functions to set the mute operation, volume, and gain. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

SetMute )(AudioHandle handle, bool mute)

-

int32_t(*

-

Sets the mute operation for the audio.

-

GetMute )(AudioHandle handle, bool *mute)

-

int32_t(*

-

Obtains the mute operation set for the audio.

-

SetVolume )(AudioHandle handle, float volume)

-

int32_t(*

-

Sets the audio volume.

-

GetVolume )(AudioHandle handle, float *volume)

-

int32_t(*

-

Obtains the audio volume.

-

GetGainThreshold )(AudioHandle handle, float *min, float *max)

-

int32_t(*

-

Obtains the range of the audio gain.

-

GetGain )(AudioHandle handle, float *gain)

-

int32_t(*

-

Obtains the audio gain.

-

SetGain )(AudioHandle handle, float gain)

-

int32_t(*

-

Sets the audio gain.

-
- -## **Details** - -## **Field ** - -## GetGain - -``` -int32_t(* AudioVolume::GetGain) ([AudioHandle](Audio.md#ga18675ddb073465fdeac33a897f675d79) handle, float *gain) -``` - - **Description:** - -Obtains the audio gain. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the audio handle.
gainIndicates the pointer to the audio gain.
- -**Returns:** - -Returns **0** if the audio gain is obtained; returns a negative value otherwise. - -**See also:** - -[GetGainThreshold](AudioVolume.md#aa42ff18fa2b7e6780acf120ea49054ed) - - [SetGain](AudioVolume.md#ab667c5f8754d0b10121451a57abbe429) - -## GetGainThreshold - -``` -int32_t(* AudioVolume::GetGainThreshold) ([AudioHandle](Audio.md#ga18675ddb073465fdeac33a897f675d79) handle, float *min, float *max) -``` - - **Description:** - -Obtains the range of the audio gain. - -The audio gain can be expressed in one of the following two ways \(depending on the chip platform\), corresponding to two types of value ranges: - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the audio handle.
minIndicates the pointer to the minimum value of the range.
maxIndicates the pointer to the maximum value of the range.
- -**Returns:** - -Returns **0** if the range is obtained; returns a negative value otherwise. - -**See also:** - -[GetGain](AudioVolume.md#a5ff7f9e5b763d20822a1fadecc5a8db7) - - [SetGain](AudioVolume.md#ab667c5f8754d0b10121451a57abbe429) - -## GetMute - -``` -int32_t(* AudioVolume::GetMute) ([AudioHandle](Audio.md#ga18675ddb073465fdeac33a897f675d79) handle, bool *mute) -``` - - **Description:** - -Obtains the mute operation set for the audio. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the audio handle.
muteIndicates the pointer to the mute operation set for the audio. Value true means that the audio is muted, and false means the opposite.
- -**Returns:** - -Returns **0** if the mute operation is obtained; returns a negative value otherwise. - -**See also:** - -[SetMute](AudioVolume.md#a79c127fa37eb2dbf8dc5fe9f0ed4421e) - -## GetVolume - -``` -int32_t(* AudioVolume::GetVolume) ([AudioHandle](Audio.md#ga18675ddb073465fdeac33a897f675d79) handle, float *volume) -``` - - **Description:** - -Obtains the audio volume. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the audio handle.
volumeIndicates the pointer to the volume to obtain. The value ranges from 0.0 to 1.0.
- -**Returns:** - -Returns **0** if the volume is obtained; returns a negative value otherwise. - -**See also:** - -[SetVolume](AudioVolume.md#aebf67caf924cba5f3be9d0f395390908) - -## SetGain - -``` -int32_t(* AudioVolume::SetGain) ([AudioHandle](Audio.md#ga18675ddb073465fdeac33a897f675d79) handle, float gain) -``` - - **Description:** - -Sets the audio gain. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the audio handle.
gainIndicates the audio gain to set.
- -**Returns:** - -Returns **0** if the setting is successful; returns a negative value otherwise. - -**See also:** - -[GetGainThreshold](AudioVolume.md#aa42ff18fa2b7e6780acf120ea49054ed) - - [GetGain](AudioVolume.md#a5ff7f9e5b763d20822a1fadecc5a8db7) - -## SetMute - -``` -int32_t(* AudioVolume::SetMute) ([AudioHandle](Audio.md#ga18675ddb073465fdeac33a897f675d79) handle, bool mute) -``` - - **Description:** - -Sets the mute operation for the audio. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the audio handle.
muteSpecifies whether to mute the audio. Value true means to mute the audio, and false means the opposite.
- -**Returns:** - -Returns **0** if the setting is successful; returns a negative value otherwise. - -**See also:** - -[GetMute](AudioVolume.md#a75fcb5bda7e0ca9b823187f6056ad1d4) - -## SetVolume - -``` -int32_t(* AudioVolume::SetVolume) ([AudioHandle](Audio.md#ga18675ddb073465fdeac33a897f675d79) handle, float volume) -``` - - **Description:** - -Sets the audio volume. - -The volume ranges from 0.0 to 1.0. If the volume level in an audio service ranges from 0 to 15, **0.0** indicates that the audio is muted, and **1.0** indicates the maximum volume level \(15\). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the audio handle.
volumeIndicates the volume to set. The value ranges from 0.0 to 1.0.
- -**Returns:** - -Returns **0** if the setting is successful; returns a negative value otherwise. - -**See also:** - -[GetVolume](AudioVolume.md#a649524ce280ecdb62ddacb78e1a63439) - diff --git a/api/api-SmartVision-Devices/Auth.md b/api/api-SmartVision-Devices/Auth.md deleted file mode 100755 index 4ebab05c686e30dfc89db8f19f94546bafbf0272..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Auth.md +++ /dev/null @@ -1,54 +0,0 @@ -# Auth - -- [Overview](#section455183535165630) -- [Summary](#section815292471165630) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Defines authentication information. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

authAlg

-

uint16_t

-

authTransaction

-

uint16_t

-

statusCode

-

uint16_t

-

variable [0]

-

uint8_t

-
- diff --git a/api/api-SmartVision-Devices/Beacon.md b/api/api-SmartVision-Devices/Beacon.md deleted file mode 100755 index 230b9fac76bcbdf967691f1973abbf899d74501d..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Beacon.md +++ /dev/null @@ -1,54 +0,0 @@ -# Beacon - -- [Overview](#section1399948673165630) -- [Summary](#section1126989561165630) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Defines the update of the **Sta** flag. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

timestamp

-

uint64_t

-

beaconInt

-

uint16_t

-

capabInfo

-

uint16_t

-

variable [0]

-

uint8_t

-
- diff --git a/api/api-SmartVision-Devices/Broadcast.md b/api/api-SmartVision-Devices/Broadcast.md deleted file mode 100755 index b68167541972f5c688f5e1adc8d67cbc4ba6316a..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Broadcast.md +++ /dev/null @@ -1,133 +0,0 @@ -# Broadcast - -- [Overview](#section1713724700165625) -- [Summary](#section1229551294165625) -- [Data Structures](#nested-classes) -- [Typedefs](#typedef-members) -- [Enumerations](#enum-members) -- [Details](#section2073864747165625) -- [Typedef](#section1755526484165625) -- [Topic](#gaf03f5bc94cad32ab628a6cdee09b0542) -- [Enumeration Type](#section520045311165625) -- [BroadcastErrCode](#ga98f7a28020aa045ad049d116e1ca666d) - -## **Overview** - -**Description:** - -Provides data subscription and data push for services. - -With this module, the [Service](Service.md), [Feature](Feature.md), or other modules can broadcast events or data. All services that listen to these events or data can receive these broadcasts. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

Consumer

-

Defines the topic consumer used to receive events and push data. You need to implement this struct for your application.

-

Provider

-

Defines the provider of events and data of a topic.

-

Subscriber

-

Defines the subscriber for external interfaces to subscribe to events and data of a topic.

-
- -## Typedefs - - - - - - - - - - -

Typedef Name

-

Description

-

Topic

-

typedef uint32

-

Indicates the topic of an event or data, which is used to distinguish different types of events or data.

-
- -## Enumerations - - - - - - - - - - -

Enumeration Name

-

Description

-

BroadcastErrCode { EC_ALREADY_SUBSCRIBED = EC_SUCCESS + 1 }

-

Enumerates error codes unique to the Broadcast service.

-
- -## **Details** - -## **Typedef ** - -## Topic - -``` -typedef uint32 [Topic](Broadcast.md#gaf03f5bc94cad32ab628a6cdee09b0542) -``` - - **Description:** - -Indicates the topic of an event or data, which is used to distinguish different types of events or data. - -## **Enumeration Type ** - -## BroadcastErrCode - -``` -enum [BroadcastErrCode](Broadcast.md#ga98f7a28020aa045ad049d116e1ca666d) -``` - - **Description:** - -Enumerates error codes unique to the Broadcast service. - - - - - - - - - - -

Enumerator

-

Description

-
EC_ALREADY_SUBSCRIBED

Error code showing that a topic has been subscribed to

-
- diff --git a/api/api-SmartVision-Devices/BufferData.md b/api/api-SmartVision-Devices/BufferData.md deleted file mode 100755 index a0c4a1f8e1c82f06795bd480f697ff78b96d7fdb..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/BufferData.md +++ /dev/null @@ -1,68 +0,0 @@ -# BufferData - -- [Overview](#section1963151255165630) -- [Summary](#section2094519256165630) -- [Data Fields](#pub-attribs) -- [Details](#section1799966536165630) -- [Field](#section804052206165630) -- [phyAddr](#a6e2adcd036df26d903bb8d464ac8f79d) -- [virAddr](#a1deeebc7e7c016ff350f6fdf6e054901) - -## **Overview** - -**Related Modules:** - -[Display](Display.md) - -**Description:** - -Defines buffer data of a layer, including the virtual and physical memory addresses. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

phyAddr

-

uint64_t

-

virAddr

-

void *

-
- -## **Details** - -## **Field ** - -## phyAddr - -``` -uint64_t BufferData::phyAddr -``` - - **Description:** - -Physical memory address - -## virAddr - -``` -void* BufferData::virAddr -``` - - **Description:** - -Virtual memory address - diff --git a/api/api-SmartVision-Devices/BufferHandle.md b/api/api-SmartVision-Devices/BufferHandle.md deleted file mode 100755 index 5be4eca7b68b7f82813a5a1ffff12ad9e25ee473..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/BufferHandle.md +++ /dev/null @@ -1,118 +0,0 @@ -# BufferHandle - -- [Overview](#section1685523299165630) -- [Summary](#section1513332779165630) -- [Data Fields](#pub-attribs) -- [Details](#section617981076165630) -- [Field](#section1936812515165630) -- [handle](#a28ebaf90f9e4e04a8fa5bae04dbf8851) -- [key](#a9bc55ed9347418af6092399549ee0ff2) -- [phyAddr](#a0c8b61e872a3565f4e9e68ea8de6a669) -- [shmid](#acef4311b898b393d4473cc77d9ba0c63) -- [virAddr](#ad6dd19ba3f81e8a71607a62da61eee94) - -## **Overview** - -**Related Modules:** - -[Codec](Codec.md) | [Display](Display.md) - -**Description:** - -Defines the buffer handle type. The virtual address of a handle maps to its physical address. - -Defines the buffer handle, including the shared memory key, shared memory ID, and physical memory address. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

virAddr

-

uint8_t *

-

handle

-

uintptr_t

-

key

-

int32_t

-

shmid

-

int32_t

-

phyAddr

-

uint64_t

-
- -## **Details** - -## **Field ** - -## handle - -``` -uintptr_t BufferHandle::handle -``` - - **Description:** - -Physical address - -## key - -``` -int32_t BufferHandle::key -``` - - **Description:** - -Shared memory key - -## phyAddr - -``` -uint64_t BufferHandle::phyAddr -``` - - **Description:** - -Physical address - -## shmid - -``` -int32_t BufferHandle::shmid -``` - - **Description:** - -Unique ID of the shared memory - -## virAddr - -``` -uint8_t* BufferHandle::virAddr -``` - - **Description:** - -Virtual address - diff --git a/api/api-SmartVision-Devices/BufferStream.md b/api/api-SmartVision-Devices/BufferStream.md deleted file mode 100755 index 9717742bbb89067c624ad9cfd0807ac833f4f0cf..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/BufferStream.md +++ /dev/null @@ -1,146 +0,0 @@ -# BufferStream - -- [Overview](#section939158420165630) -- [Summary](#section1466875558165630) -- [Data Fields](#pub-attribs) -- [Details](#section498541529165630) -- [Field](#section151440637165630) -- [GetReadableSize](#a24e47ffeb7e9c2a8e01f83ffb3a16407) -- [handle](#ae2019a77aba73fa96d5a716155c7fb7f) -- [ReadData](#af0c4387f21bba2c1f02a5310daa95a00) - -## **Overview** - -**Related Modules:** - -[Format](Format.md) - -**Description:** - -Defines the function for reading stream data. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

ReadData )(void *handle, uint8_t *data, int32_t size, int32_t timeOutMs, DataFlags *flags)

-

int32_t(*

-

Reads data from streams, save the data to the buffer pointed by data with the specified size, and returns the size of the read data and type.

-

GetReadableSize )(const void *handle)

-

int32_t(*

-

Obtains the size of data that can be read.

-

handle

-

void *

-
- -## **Details** - -## **Field ** - -## GetReadableSize - -``` -int32_t(* BufferStream::GetReadableSize) (const void *[handle](BufferStream.md#ae2019a77aba73fa96d5a716155c7fb7f)) -``` - - **Description:** - -Obtains the size of data that can be read. - -Before reading data, you should call this function to check whether there is data to read. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the context handle.
- -**Returns:** - -Returns the size of the read data. - -## handle - -``` -void* BufferStream::handle -``` - - **Description:** - -Context handle - -## ReadData - -``` -int32_t(* BufferStream::ReadData) (void *[handle](BufferStream.md#ae2019a77aba73fa96d5a716155c7fb7f), uint8_t *data, int32_t size, int32_t timeOutMs, [DataFlags](Format.md#gacff079fdf8427c743f9197ea5be33a7f) *flags) -``` - - **Description:** - -Reads data from streams, save the data to the buffer pointed by **data** with the specified **size**, and returns the size of the read data and type. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the context handle.
dataIndicates the pointer to the buffer to store the read data. The memory is allocated by the caller.
sizeIndicates the size of the available buffer memory.
timeOutMsIndicates read operation wait time. The value 0 means no wait time.
flagsIndicates the pointer to the type of the read data, see DataFlags.
- -**Returns:** - -Returns the size of the read data. - diff --git a/api/api-SmartVision-Devices/BundleInfo.md b/api/api-SmartVision-Devices/BundleInfo.md deleted file mode 100755 index 8edab52ed7389e70cf12627025a58aa8f13d9b31..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/BundleInfo.md +++ /dev/null @@ -1,356 +0,0 @@ -# BundleInfo - -- [Overview](#section1282840164165630) -- [Summary](#section607899683165630) -- [Data Fields](#pub-attribs) -- [Details](#section402726232165630) -- [Field](#section472693729165630) -- [abilityInfos](#a3ada4a71ec78f2f2d6c78b8db9406d40) -- [appId](#ad0eff56be21d5023221ce20da5ab9efb) -- [bigIconPath](#a8e34521fed8544d56fe744e895504940) -- [bundleName](#aec3498345b5e999424348aff0a723db7) -- [codePath](#a48870c542ef26637af24b6e424af9e66) -- [compatibleApi](#af672c11317ab2608732ebfadf0bfdc94) -- [dataPath](#ac4fcbb75da508f66f815c275d3e53888) -- [gid](#a9d43b35b1e8310173e75a3fd3e9e2e5d) -- [isKeepAlive](#a6f953f1be6da55f3b0afb292ae36d30f) -- [isNativeApp](#a4c9154f98628fff6b2016d9fe3e6bc23) -- [isSystemApp](#ae4572da0f7c456734c7fcc6158e5a5f1) -- [label](#a008c2aab5a80d72a283ebb033f3a00e9) -- [moduleInfos](#a7f558b993f8ffd70264b490ea079e178) -- [numOfAbility](#a0691b2c2822bc661f6618b7d376010b9) -- [numOfModule](#ae6d0d5a10be24006397e1436a757f899) -- [targetApi](#a7cbe4debddb5d278af13ca09e55409c9) -- [uid](#a4c469e7cb5dbea185de3a70f18adeeb4) -- [vendor](#aa82cb2180789691e20e75d0371dec7cd) -- [versionCode](#a10ebbd5523a9f9f7b38b04ac365fa9ee) -- [versionName](#a5381cbf05a30ee5cb5bc1a7daa18084e) - -## **Overview** - -**Related Modules:** - -[BundleManager](BundleManager.md) - -**Description:** - -Defines the bundle information. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

isKeepAlive

-

bool

-

isNativeApp

-

bool

-

uid

-

int32_t

-

gid

-

int32_t

-

isSystemApp

-

bool

-

compatibleApi

-

int32_t

-

targetApi

-

int32_t

-

versionCode

-

int32_t

-

versionName

-

char *

-

bundleName

-

char *

-

label

-

char *

-

bigIconPath

-

char *

-

codePath

-

char *

-

dataPath

-

char *

-

vendor

-

char *

-

moduleInfos

-

ModuleInfo *

-

numOfModule

-

int32_t

-

appId

-

char *

-

abilityInfos

-

AbilityInfo *

-

numOfAbility

-

int32_t

-
- -## **Details** - -## **Field ** - -## abilityInfos - -``` -[AbilityInfo](AbilityInfo.md)* BundleInfo::abilityInfos -``` - - **Description:** - -Pointer to the ability information about the application. The ability information is encapsulated in [AbilityInfo](AbilityInfo.md) objects. - -## appId - -``` -char* BundleInfo::appId -``` - - **Description:** - -Application ID, which uniquely identifies an application. It is a combination of the bundle name and signature of the application. - -## bigIconPath - -``` -char* BundleInfo::bigIconPath -``` - - **Description:** - -Pointer to the big icon of the application - -## bundleName - -``` -char* BundleInfo::bundleName -``` - - **Description:** - -Pointer to the bundle name of the application - -## codePath - -``` -char* BundleInfo::codePath -``` - - **Description:** - -Pointer to the installation path of the application, which is in the **/app/run/bundle name** format - -## compatibleApi - -``` -int32_t BundleInfo::compatibleApi -``` - - **Description:** - -Minimum API version required - -## dataPath - -``` -char* BundleInfo::dataPath -``` - - **Description:** - -Pointer to the path for storing data files of the application. The data path is **/app/data**. - -## gid - -``` -int32_t BundleInfo::gid -``` - - **Description:** - -Application group ID allocated during application installation - -## isKeepAlive - -``` -bool BundleInfo::isKeepAlive -``` - - **Description:** - -Whether the application is kept alive - -## isNativeApp - -``` -bool BundleInfo::isNativeApp -``` - - **Description:** - -Whether the application is a local application. A local application refers to an application developed using C++ in the system. The value **true** indicates a local application, and **false** indicates a non-local application. - -## isSystemApp - -``` -bool BundleInfo::isSystemApp -``` - - **Description:** - -Whether the application is a system application. System applications cannot be uninstalled. The value **true** indicates a system application, and **false** indicates a non-system application. - -## label - -``` -char* BundleInfo::label -``` - - **Description:** - -Pointer to the application name visible to users - -## moduleInfos - -``` -[ModuleInfo](ModuleInfo.md)* BundleInfo::moduleInfos -``` - - **Description:** - -Pointer to the HAP package information about the application. The HAP information is encapsulated in [ModuleInfo](ModuleInfo.md) objects. - -## numOfAbility - -``` -int32_t BundleInfo::numOfAbility -``` - - **Description:** - -Number of [AbilityInfo](AbilityInfo.md) objects in the application - -## numOfModule - -``` -int32_t BundleInfo::numOfModule -``` - - **Description:** - -Number of [ModuleInfo](ModuleInfo.md) objects included in the application - -## targetApi - -``` -int32_t BundleInfo::targetApi -``` - - **Description:** - -Target API version - -## uid - -``` -int32_t BundleInfo::uid -``` - - **Description:** - -UID allocated during application installation - -## vendor - -``` -char* BundleInfo::vendor -``` - - **Description:** - -Pointer to the vendor name of the application - -## versionCode - -``` -int32_t BundleInfo::versionCode -``` - - **Description:** - -Version code of the application, which is the internal version number - -## versionName - -``` -char* BundleInfo::versionName -``` - - **Description:** - -Pointer to the version name visible to users - diff --git a/api/api-SmartVision-Devices/BundleManager.md b/api/api-SmartVision-Devices/BundleManager.md deleted file mode 100755 index a9e1cebc9be1064cd6cc49f68f8e719723da719b..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/BundleManager.md +++ /dev/null @@ -1,1461 +0,0 @@ -# BundleManager - -- [Overview](#section931510718165623) -- [Summary](#section1517998658165623) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Typedefs](#typedef-members) -- [Enumerations](#enum-members) -- [Functions](#func-members) -- [Details](#section165948216165623) -- [Typedef](#section160203913165623) -- [BundleStateCallback](#gad7ea6d0bf78db2d59e6d339c31819885) -- [InstallerCallback](#ga00f021e76d728d2d44e1a28887ccc3af) -- [Enumeration Type](#section76133345165623) -- [AbilityType](#ga44b675d687acff3d739404c1227b4259) -- [AppexecfwkErrors](#gac318d4f4dc0125e2367ea8c539770ed1) -- [InstallLocation](#ga4907fd26df42a0abdfd6ade10ac44efb) -- [LaunchMode](#ga605d46d860e356a74db6842e66522854) -- [Function](#section1955086544165623) -- [ClearAbilityInfo\(\)](#ga7377545918725f75645b59b1b7a319fa) -- [ClearBundleInfo\(\)](#ga78829b21273aefd65844eba4549162ca) -- [ClearBundleStatusCallback\(\)](#gae5e0593438f073199bf6d69e47a84975) -- [ClearElement\(\)](#ga3abe15ac14571de84ca72c98f4009724) -- [ClearModuleInfo\(\)](#ga6c2242cc10f135d129b95444faacb345) -- [GetBundleInfo\(\)](#ga5e81134e037911654e34cc8a7ba01a2f) -- [GetBundleInfos\(\)](#ga2469dafbc61ba8e98b69041c13044cad) -- [GetBundleInfosByMetaData\(\)](#ga711965038390aef4fa0a6b6a98f6998b) -- [GetBundleNameForUid\(\)](#ga4afdc08ba78506fce95a066e137ac46d) -- [Install\(\)](#gaf1f1521a64cc98f076b0082df6c0abdd) -- [QueryAbilityInfo\(\)](#ga4360375d15224d89632f59ee110b74c9) -- [QueryKeepAliveBundleInfos\(\)](#ga0c1cb00194993ecba7337fdf0a203314) -- [RegisterCallback\(\)](#ga5c49620ca8b752cd6f43fabc5d5c7416) -- [SetElementAbilityName\(\)](#ga93a575cc428cb96526ae02b3997f1f3b) -- [SetElementBundleName\(\)](#ga60692e66a3a204a2f16f70c5cd452c1d) -- [SetElementDeviceID\(\)](#ga90e16f159ee8e7f1a9385feebb3dbc0c) -- [Uninstall\(\)](#gaa117e44378315a61b4e71fd252b2e496) -- [UnregisterCallback\(\)](#ga095eee592eff6ce71a2a67a1a0e3e344) - -## **Overview** - -**Description:** - -Provides structures and functions for managing application bundles and obtaining application information. - -You can use functions provided by this module to install, update, or uninstall an application, obtain [AbilityInfo](AbilityInfo.md) and [BundleInfo](BundleInfo.md) about an application, and obtain the bundle name of an application based on the application's user ID \(UID\). - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Name

-

Description

-

ability_info.h

-

Declares structures and functions for managing ability information.

-

appexecfwk_errors.h

-

Declares error codes returned by bundle management functions.

-

bundle_info.h

-

Declares structures and functions for managing application bundle information.

-

bundle_manager.h

-

Declares functions used for managing application bundles and obtaining bundle information.

-

bundle_status_callback.h

-

Declares the callback invoked upon state changes of an application and the structure defining the callback information.

-

element_name.h

-

Declares the structure that defines the required information for querying AbilityInfo, including the device ID, bundle name, and class name, and functions for setting such information.

-

module_info.h

-

Declares structures and functions for managing HAP package information.

-
- -## Data Structures - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

AbilityInfo

-

Defines the ability information.

-

BundleInfo

-

Defines the bundle information.

-

BundleStatusCallback

-

Defines the application state callback information.

-

ElementName

-

Defines the ability information.

-

InstallParam

-

Defines parameters used for application installation, update, or uninstallation.

-

MetaData

-

Defines the metadata information in a ModuleInfo object.

-

ModuleInfo

-

Defines the HAP information.

-
- -## Typedefs - - - - - - - - - - - - - -

Typedef Name

-

Description

-

InstallerCallback) (const uint8_t resultCode, const void *resultMessage)

-

typedef void(*

-

Called when an application is installed, updated, or uninstalled.

-

BundleStateCallback) (const uint8_t installType, const uint8_t resultCode, const void *resultMessage, const char *bundleName, void *data)

-

typedef void(*

-

Called when the installation, update, or uninstallation state of an application changes.

-
- -## Enumerations - - - - - - - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

AbilityType { UNKNOWN = 0, PAGE, SERVICE }

-

Enumerates types of templates used by an ability.

-

LaunchMode { SINGLETON = 0, STANDARD }

-

Enumerates startup modes of an ability.

-

AppexecfwkErrors { ERR_OK = 0, ERR_APPEXECFWK_QUERY_PARAMETER_ERROR, ERR_APPEXECFWK_QUERY_NO_INFOS, ERR_APPEXECFWK_QUERY_INFOS_INIT_ERROR, ERR_APPEXECFWK_OBJECT_NULL, ERR_APPEXECFWK_INSTALL_FAILED_INTERNAL_ERROR = 10, ERR_APPEXECFWK_INSTALL_FAILED_PARAM_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_FILE_PATH_INVALID, ERR_APPEXECFWK_INSTALL_FAILED_FILE_NOT_EXISTS, ERR_APPEXECFWK_INSTALL_FAILED_INVALID_FILE_NAME, ERR_APPEXECFWK_INSTALL_FAILED_BAD_FILE, ERR_APPEXECFWK_INSTALL_FAILED_CREATE_FILE_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_CREATE_PERMISSIONS_DIR_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_RENAME_DIR_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_RENAME_FILE_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_CREATE_DATA_DIR_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_RECORD_INFO_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_UID_AND_GID_BACKUP_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_VERSION_DOWNGRADE, ERR_APPEXECFWK_INSTALL_FAILED_EXCEED_MAX_BUNDLE_NUMBER, ERR_APPEXECFWK_INSTALL_FAILED_STORE_PERMISSIONS_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_FILE_DATA_INVALID, ERR_APPEXECFWK_INSTALL_FAILED_INCOMPATIBLE_SIGNATURE, ERR_APPEXECFWK_INSTALL_FAILED_INVALID_PROVISIONINFO, ERR_APPEXECFWK_INSTALL_FAILED_OPERATE_SIGNED_FILE_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_PARSE_APP_SIGNATURE_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_PARSE_PROFILE_SIGNATURE_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_INTERNAL_SIGNATURE_ERROR , ERR_APPEXECFWK_SET_DEBUG_MODE_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_PARSE_PROFILE_ERROR = 40, ERR_APPEXECFWK_INSTALL_FAILED_PARSE_BUNDLENAME_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_PARSE_INVALID_BUNDLENAME, ERR_APPEXECFWK_INSTALL_FAILED_PARSE_VENDOR_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_PARSE_VERSIONCODE_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_PARSE_VERSIONNAME_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_PARSE_PERMISSIONS_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_PARSE_API_VERSION_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_PARSE_DEVICE_CONFIG_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_PARSE_KEEPALIVE_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_PARSE_MODULENAME_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_PARSE_INVALID_MODULENAME, ERR_APPEXECFWK_INSTALL_FAILED_PARSE_MODULE_DESCRIPTION_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_PARSE_DEVICETYPE_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_PARSE_DISTRO_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_PARSE_DISTRO_MODULENAME_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_PARSE_DISTRO_MODULETYPE_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_PARSE_DISTRO_DELIVERY_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_PARSE_METADATA_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_PARSE_ABILITIES_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_PARSE_ABILITY_NAME_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_PARSE_ABILITY_TYPE_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_PARSE_ABILITY_ICONPATH_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_PARSE_ABILITY_LABEL_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_PARSE_ABILITY_DESCRIPTION_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_PARSE_ABILITY_LAUNCHTYPE_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_PARSE_ABILITY_VISIBLE_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_PARSE_INVALID_BUNDLENAME_LENGTH, ERR_APPEXECFWK_INSTALL_FAILED_EXCEED_MAX_LABEL_LENGTH_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_EXCEED_MAX_VERSIONNAME_LENGTH_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_EXCEED_MAX_METADATA_NAME_LENGTH_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_EXCEED_MAX_METADATA_VALUE_LENGTH_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_EXCEED_MAX_VENDOR_LENGTH_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_EXCEED_MAX_MODULENAME_LENGTH_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_EXCEED_MAX_ABILITYNAME_LENGTH_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_EXCEED_MAX_ABILITY_DESCRIPTION_LENGTH_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_EXCEED_MAX_ABILITY_LABEL_LENGTH_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_EXTRACTOR_NOT_INIT, ERR_APPEXECFWK_INSTALL_FAILED_EXTRACT_HAP_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_PARSE_JS_DIR_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_RESOURCE_INDEX_NOT_EXISTS, ERR_APPEXECFWK_INSTALL_FAILED_PARSE_LABEL_RES_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_PARSE_ICON_RES_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_PARSE_DESCRIPTION_RES_ERROR, ERR_APPEXECFWK_INSTALL_FAILED_SEND_REQUEST_ERROR, ERR_APPEXECFWK_UNINSTALL_FAILED_INTERNAL_ERROR = 90, ERR_APPEXECFWK_UNINSTALL_FAILED_PARAM_ERROR, ERR_APPEXECFWK_UNINSTALL_FAILED_BUNDLE_NOT_EXISTS, ERR_APPEXECFWK_UNINSTALL_FAILED_DELETE_DIRS_ERROR, ERR_APPEXECFWK_UNINSTALL_FAILED_DELETE_RECORD_INFO_ERROR, ERR_APPEXECFWK_UNINSTALL_FAILED_DELETE_PERMISSIONS_ERROR, ERR_APPEXECFWK_UNINSTALL_FAILED_BUNDLE_NOT_UNINSTALLABLE, ERR_APPEXECFWK_UNINSTALL_FAILED_DELETE_UID_INFO_ERROR, ERR_APPEXECFWK_UNINSTALL_FAILED_SEND_REQUEST_ERROR, ERR_APPEXECFWK_DUMP_ERROR = 100, ERR_APPEXECFWK_COMMAND_ERROR, ERR_APPEXECFWK_CALLBACK_REGISTER_FAILED, ERR_APPEXECFWK_CALLBACK_UNREGISTER_FAILED, ERR_APPEXECFWK_CALLBACK_GENERATE_LOCAL_SERVICEID_FAILED, ERR_APPEXECFWK_CALLBACK_SERVICEID_TRANSMITTED_FAILED, ERR_APPEXECFWK_CALLBACK_NEVER_REGISTERED, ERR_APPEXECFWK_CALLBACK_OBTAIN_ALL_BUNDLE_FAILED, ERR_APPEXECFWK_CALLBACK_NULL_CORRESPONDING_CALLBACK, ERR_APPEXECFWK_CALLBACK_GET_INSTALLTYPE_FAILED, ERR_APPEXECFWK_CALLBACK_GET_ERROR_INSTALLTYPE, ERR_APPEXECFWK_SERIALIZATION_FAILED, ERR_APPEXECFWK_DESERIALIZATION_FAILED, ERR_APPEXECFWK_SYSTEM_INTERNAL_ERROR, ERR_APPEXECFWK_NO_BUNDLENAME_FOR_UID, ERR_APPEXECFWK_IPCIO_UNAVAILABLED, ERR_APPEXECFWK_INVOKE_ERROR, ERR_APPEXECFWK_PERMISSION_DENIED }

-

Enumerates error codes provided by the Bundle Manager Service.

-

InstallLocation { INSTALL_LOCATION_INTERNAL_ONLY = 1, INSTALL_LOCATION_PREFER_EXTERNAL = 2 }

-
 
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

ClearAbilityInfo (AbilityInfo *abilityInfo)

-

void

-

Clears an AbilityInfo object.

-

ClearBundleInfo (BundleInfo *bundleInfo)

-

void

-

Clears a BundleInfo object.

-

RegisterCallback (BundleStatusCallback *BundleStatusCallback)

-

int32_t

-

Registers a callback to monitor the installation, update, and uninstallation state changes of an application.

-

UnregisterCallback ()

-

int32_t

-

Unregisters a callback previously registered for monitoring the installation, update, and uninstallation stat changes of an application.

-

Install (const char *hapPath, const InstallParam *installParam, InstallerCallback installerCallback)

-

bool

-

Installs or updates an application.

-

Uninstall (const char *bundleName, const InstallParam *installParam, InstallerCallback installerCallback)

-

bool

-

Uninstalls an application.

-

QueryAbilityInfo (const Want *want, AbilityInfo *abilityInfo)

-

uint8_t

-

Queries the AbilityInfo of an ability based on the information carried in the Want structure.

-

GetBundleInfo (const char *bundleName, int32_t flags, BundleInfo *bundleInfo)

-

uint8_t

-

Obtains the BundleInfo of an application based on the specified bundle name.

-

GetBundleInfos (const int flags, BundleInfo **bundleInfos, int32_t *len)

-

uint8_t

-

Obtains the BundleInfo of all bundles in the system.

-

QueryKeepAliveBundleInfos (BundleInfo **bundleInfos, int32_t *len)

-

uint8_t

-

Obtains the BundleInfo of all keep-alive applications in the system.

-

GetBundleInfosByMetaData (const char *metaDataKey, BundleInfo **bundleInfos, int32_t *len)

-

uint8_t

-

Obtains the BundleInfo of application bundles based on the specified MetaData.

-

GetBundleNameForUid (int32_t uid, char **bundleName)

-

uint8_t

-

Obtains the bundle name of an application based on the specified UID.

-

ClearBundleStatusCallback (BundleStatusCallback *bundleStatusCallback)

-

void

-

Clears and releases the memory occupied by the BundleStatusCallback structure.

-

ClearElement (ElementName *element)

-

void

-

Clears the internal data of a specified ElementName.

-

SetElementDeviceID (ElementName *element, const char *deviceId)

-

bool

-

Sets the device ID used to query AbilityInfo.

-

SetElementBundleName (ElementName *element, const char *bundleName)

-

bool

-

Sets the bundle name used to query AbilityInfo.

-

SetElementAbilityName (ElementName *element, const char *abilityName)

-

bool

-

Sets the class name of the ability used to query AbilityInfo.

-

ClearModuleInfo (ModuleInfo *moduleInfo)

-

void

-

Clears a ModuleInfo object.

-
- -## **Details** - -## **Typedef ** - -## BundleStateCallback - -``` -typedef void(* BundleStateCallback) (const uint8_t installType, const uint8_t resultCode, const void *resultMessage, const char *bundleName, void *data) -``` - - **Description:** - -Called when the installation, update, or uninstallation state of an application changes. - -This callback is used to listen for state change results of applications in the system. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
installTypeIndicates the installation, update, or uninstallation state. The value 0 indicates that the application is being installed or updated, and 1 indicates that the application is being uninstalled.
resultCodeIndicates the status code returned for the application installation, update, or uninstallation result. For details, see AppexecfwkErrors.
resultMessageIndicates the pointer to the result message returned with the status code.
bundleNameIndicates the pointer to the name of the bundle whose state has changed.
dataIndicates the pointer to the data that will be used by the callback upon a state change. The data is passed through BundleStatusCallback during callback registration.
- -## InstallerCallback - -``` -typedef void(* InstallerCallback) (const uint8_t resultCode, const void *resultMessage) -``` - - **Description:** - -Called when an application is installed, updated, or uninstalled. - -This function can be registered through [Install](BundleManager.md#gaf1f1521a64cc98f076b0082df6c0abdd) and [Uninstall](BundleManager.md#gaa117e44378315a61b4e71fd252b2e496) to receive the installation, update, and uninstallation result. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
resultCodeIndicates the status code returned for the application installation, update, or uninstallation result. For details, see AppexecfwkErrors.
resultMessageIndicates the result message returned with the status code.
- -## **Enumeration Type ** - -## AbilityType - -``` -enum [AbilityType](BundleManager.md#ga44b675d687acff3d739404c1227b4259) -``` - - **Description:** - -Enumerates types of templates used by an ability. - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
UNKNOWN

Unknown

-
PAGE

Page

-
SERVICE

Service

-
- -## AppexecfwkErrors - -``` -enum [AppexecfwkErrors](BundleManager.md#gac318d4f4dc0125e2367ea8c539770ed1) -``` - - **Description:** - -Enumerates error codes provided by the Bundle Manager [Service](Service.md). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
ERR_OK

The function is successfully called.

-
ERR_APPEXECFWK_QUERY_PARAMETER_ERROR

Incorrect parameter for querying AbilityInfo or BundleInfo.

-
ERR_APPEXECFWK_QUERY_NO_INFOS

No AbilityInfo or BundleInfo is found.

-
ERR_APPEXECFWK_QUERY_INFOS_INIT_ERROR

An error occurred when initializing BundleInfo or AbilityInfo during information query.

-
ERR_APPEXECFWK_OBJECT_NULL

The object or pointer is null.

-
ERR_APPEXECFWK_INSTALL_FAILED_INTERNAL_ERROR

Failed to install the application due to an internal logic error.

-
ERR_APPEXECFWK_INSTALL_FAILED_PARAM_ERROR

Failed to install the application due to incorrect parameters.

-
ERR_APPEXECFWK_INSTALL_FAILED_FILE_PATH_INVALID

Failed to install the application because the installation file path is invalid.

-
ERR_APPEXECFWK_INSTALL_FAILED_FILE_NOT_EXISTS

Failed to install the application because the installation file does not exist.

-
ERR_APPEXECFWK_INSTALL_FAILED_INVALID_FILE_NAME

Failed to install the application because the installation file name is invalid.

-
ERR_APPEXECFWK_INSTALL_FAILED_BAD_FILE

Failed to install the application due to incorrect file content.

-
ERR_APPEXECFWK_INSTALL_FAILED_CREATE_FILE_ERROR

Failed to install the application due to a file creation error.

-
ERR_APPEXECFWK_INSTALL_FAILED_CREATE_PERMISSIONS_DIR_ERROR

Failed to install the application because an error occurred when creating the permission file directory.

-
ERR_APPEXECFWK_INSTALL_FAILED_RENAME_DIR_ERROR

Failed to install the application due to a path renaming error.

-
ERR_APPEXECFWK_INSTALL_FAILED_RENAME_FILE_ERROR

Failed to install the application due to a file renaming error.

-
ERR_APPEXECFWK_INSTALL_FAILED_CREATE_DATA_DIR_ERROR

Failed to install the application due to an error occurred when creating the data path.

-
ERR_APPEXECFWK_INSTALL_FAILED_RECORD_INFO_ERROR

Failed to install the application due to an error occurred when recording installation information.

-
ERR_APPEXECFWK_INSTALL_FAILED_UID_AND_GID_BACKUP_ERROR

Failed to install the application due to an error occurred when backing up the UID and GID.

-
ERR_APPEXECFWK_INSTALL_FAILED_VERSION_DOWNGRADE

Failed to install the application because an application of a later version has been installed.

-
ERR_APPEXECFWK_INSTALL_FAILED_EXCEED_MAX_BUNDLE_NUMBER

Failed to install the application because the number of installed applications exceeds the maximum (30). This error code is available only to basic watches.

-
ERR_APPEXECFWK_INSTALL_FAILED_STORE_PERMISSIONS_ERROR

Failed to install the application due to an error occurred when storing permission information.

-
ERR_APPEXECFWK_INSTALL_FAILED_FILE_DATA_INVALID

Failed to install the application due to invalid file data. This error code is available only to basic watches.

-
ERR_APPEXECFWK_INSTALL_FAILED_INCOMPATIBLE_SIGNATURE

Failed to install the application due to unmatched signature used for version update.

-
ERR_APPEXECFWK_INSTALL_FAILED_INVALID_PROVISIONINFO

Failed to install the application due to unmatched provisioning information during signature verification.

-
ERR_APPEXECFWK_INSTALL_FAILED_OPERATE_SIGNED_FILE_ERROR

Failed to install the application due to an error occurred when processing the signature file.

-
ERR_APPEXECFWK_INSTALL_FAILED_PARSE_APP_SIGNATURE_ERROR

Failed to install the application due to an error occurred when parsing the application signature.

-
ERR_APPEXECFWK_INSTALL_FAILED_PARSE_PROFILE_SIGNATURE_ERROR

Failed to install the application due to an error occurred when parsing the file signature.

-
ERR_APPEXECFWK_INSTALL_FAILED_INTERNAL_SIGNATURE_ERROR

Failed to install the application due to an internal error during signature verification.

-
ERR_APPEXECFWK_SET_DEBUG_MODE_ERROR

Failed to install the application due to an error occurred when setting the signature verification mode.

-
ERR_APPEXECFWK_INSTALL_FAILED_PARSE_PROFILE_ERROR

Failed to parse the file.

-
ERR_APPEXECFWK_INSTALL_FAILED_PARSE_BUNDLENAME_ERROR

Failed to parse the bundle name.

-
ERR_APPEXECFWK_INSTALL_FAILED_PARSE_INVALID_BUNDLENAME

Invalid bundle name.

-
ERR_APPEXECFWK_INSTALL_FAILED_PARSE_VENDOR_ERROR

Failed to parse the vendor information.

-
ERR_APPEXECFWK_INSTALL_FAILED_PARSE_VERSIONCODE_ERROR

Failed to parse the version code.

-
ERR_APPEXECFWK_INSTALL_FAILED_PARSE_VERSIONNAME_ERROR

Failed to parse the version name.

-
ERR_APPEXECFWK_INSTALL_FAILED_PARSE_PERMISSIONS_ERROR

Failed to parse the installation permission information.

-
ERR_APPEXECFWK_INSTALL_FAILED_PARSE_API_VERSION_ERROR

Failed to parse the API version.

-
ERR_APPEXECFWK_INSTALL_FAILED_PARSE_DEVICE_CONFIG_ERROR

Failed to parse the device configuration.

-
ERR_APPEXECFWK_INSTALL_FAILED_PARSE_KEEPALIVE_ERROR

Failed to parse the isKeepAlive field of the application.

-
ERR_APPEXECFWK_INSTALL_FAILED_PARSE_MODULENAME_ERROR

Failed to parse the name field of the application's HAP package. The HAP information is encapsulated in a ModuleInfo object.

-
ERR_APPEXECFWK_INSTALL_FAILED_PARSE_INVALID_MODULENAME

Invalid HAP name.

-
ERR_APPEXECFWK_INSTALL_FAILED_PARSE_MODULE_DESCRIPTION_ERROR

Failed to parse the HAP description information.

-
ERR_APPEXECFWK_INSTALL_FAILED_PARSE_DEVICETYPE_ERROR

Failed to parse the deviceType field of the application's HAP package.

-
ERR_APPEXECFWK_INSTALL_FAILED_PARSE_DISTRO_ERROR

Failed to parse the HAP information.

-
ERR_APPEXECFWK_INSTALL_FAILED_PARSE_DISTRO_MODULENAME_ERROR

Failed to parse the moduleName field of the application's HAP package.

-
ERR_APPEXECFWK_INSTALL_FAILED_PARSE_DISTRO_MODULETYPE_ERROR

Invalid HAP type.

-
ERR_APPEXECFWK_INSTALL_FAILED_PARSE_DISTRO_DELIVERY_ERROR

Failed to parse the isDeliveryInstall field of the application's HAP package.

-
ERR_APPEXECFWK_INSTALL_FAILED_PARSE_METADATA_ERROR

Failed to parse the MetaData information.

-
ERR_APPEXECFWK_INSTALL_FAILED_PARSE_ABILITIES_ERROR

Failed to parse the AbilityInfo.

-
ERR_APPEXECFWK_INSTALL_FAILED_PARSE_ABILITY_NAME_ERROR

Failed to parse the class name of the ability.

-
ERR_APPEXECFWK_INSTALL_FAILED_PARSE_ABILITY_TYPE_ERROR

Failed to parse the template used by the ability.

-
ERR_APPEXECFWK_INSTALL_FAILED_PARSE_ABILITY_ICONPATH_ERROR

Failed to parse the icon path of the ability.

-
ERR_APPEXECFWK_INSTALL_FAILED_PARSE_ABILITY_LABEL_ERROR

Failed to parse the label of the ability.

-
ERR_APPEXECFWK_INSTALL_FAILED_PARSE_ABILITY_DESCRIPTION_ERROR

Failed to parse the description of the ability.

-
ERR_APPEXECFWK_INSTALL_FAILED_PARSE_ABILITY_LAUNCHTYPE_ERROR

Failed to parse the startup mode of the ability.

-
ERR_APPEXECFWK_INSTALL_FAILED_PARSE_ABILITY_VISIBLE_ERROR

Failed to parse the isVisible field of the ability.

-
ERR_APPEXECFWK_INSTALL_FAILED_PARSE_INVALID_BUNDLENAME_LENGTH

Invalid length of the bundle name.

-
ERR_APPEXECFWK_INSTALL_FAILED_EXCEED_MAX_LABEL_LENGTH_ERROR

The parsed application label exceeds the maximum length (255 bytes).

-
ERR_APPEXECFWK_INSTALL_FAILED_EXCEED_MAX_VERSIONNAME_LENGTH_ERROR

The parsed application version name exceeds the maximum length (127 bytes).

-
ERR_APPEXECFWK_INSTALL_FAILED_EXCEED_MAX_METADATA_NAME_LENGTH_ERROR

The parsed application metadata name exceeds the maximum length (255 bytes).

-
ERR_APPEXECFWK_INSTALL_FAILED_EXCEED_MAX_METADATA_VALUE_LENGTH_ERROR

The parsed application metadata value exceeds the maximum length (255 bytes).

-
ERR_APPEXECFWK_INSTALL_FAILED_EXCEED_MAX_VENDOR_LENGTH_ERROR

The parsed application vendor name exceeds the maximum length (255 bytes).

-
ERR_APPEXECFWK_INSTALL_FAILED_EXCEED_MAX_MODULENAME_LENGTH_ERROR

The parsed HAP name exceeds the maximum length (31 bytes).

-
ERR_APPEXECFWK_INSTALL_FAILED_EXCEED_MAX_ABILITYNAME_LENGTH_ERROR

The parsed ability class name exceeds the maximum length (127 bytes).

-
ERR_APPEXECFWK_INSTALL_FAILED_EXCEED_MAX_ABILITY_DESCRIPTION_LENGTH_ERROR

The parsed ability description exceeds the maximum length (255 bytes).

-
ERR_APPEXECFWK_INSTALL_FAILED_EXCEED_MAX_ABILITY_LABEL_LENGTH_ERROR

The parsed ability label exceeds the maximum length (255 bytes).

-
ERR_APPEXECFWK_INSTALL_FAILED_EXTRACTOR_NOT_INIT

Failed to initialize the extractor.

-
ERR_APPEXECFWK_INSTALL_FAILED_EXTRACT_HAP_ERROR

Failed to extract information from the HAP package.

-
ERR_APPEXECFWK_INSTALL_FAILED_PARSE_JS_DIR_ERROR

Failed to parse the JavaScript path. This error code is available only to basic watches.

-
ERR_APPEXECFWK_INSTALL_FAILED_RESOURCE_INDEX_NOT_EXISTS

The resource index does not exist.

-
ERR_APPEXECFWK_INSTALL_FAILED_PARSE_LABEL_RES_ERROR

Failed to parse the label resource.

-
ERR_APPEXECFWK_INSTALL_FAILED_PARSE_ICON_RES_ERROR

Failed to parse the icon resource.

-
ERR_APPEXECFWK_INSTALL_FAILED_PARSE_DESCRIPTION_RES_ERROR

Failed to parse the description resource.

-
ERR_APPEXECFWK_INSTALL_FAILED_SEND_REQUEST_ERROR

Failed to install the application due to a request sending error.

-
ERR_APPEXECFWK_UNINSTALL_FAILED_INTERNAL_ERROR

Failed to uninstall the application due to an internal error.

-
ERR_APPEXECFWK_UNINSTALL_FAILED_PARAM_ERROR

Failed to uninstall the application due to incorrect input parameters.

-
ERR_APPEXECFWK_UNINSTALL_FAILED_BUNDLE_NOT_EXISTS

Failed to uninstall the application because it does not exist.

-
ERR_APPEXECFWK_UNINSTALL_FAILED_DELETE_DIRS_ERROR

Failed to uninstall the application due to an error occurred when deleting the path.

-
ERR_APPEXECFWK_UNINSTALL_FAILED_DELETE_RECORD_INFO_ERROR

Failed to uninstall the application due to an error occurred when deleting the installation record.

-
ERR_APPEXECFWK_UNINSTALL_FAILED_DELETE_PERMISSIONS_ERROR

Failed to uninstall the application due to an error occurred when deleting the permission information.

-
ERR_APPEXECFWK_UNINSTALL_FAILED_BUNDLE_NOT_UNINSTALLABLE

Failed to uninstall the application because the application cannot be uninstalled.

-
ERR_APPEXECFWK_UNINSTALL_FAILED_DELETE_UID_INFO_ERROR

Failed to uninstall the application due to an error occurred when deleting the UID information.

-
ERR_APPEXECFWK_UNINSTALL_FAILED_SEND_REQUEST_ERROR

Failed to uninstall the application due to a request sending error.

-
ERR_APPEXECFWK_DUMP_ERROR

Incorrect dump information.

-
ERR_APPEXECFWK_COMMAND_ERROR

Incorrect command.

-
ERR_APPEXECFWK_CALLBACK_REGISTER_FAILED

Failed to register the callback.

-
ERR_APPEXECFWK_CALLBACK_UNREGISTER_FAILED

Failed to unregister the callback.

-
ERR_APPEXECFWK_CALLBACK_GENERATE_LOCAL_SERVICEID_FAILED

Failed to generate a service ID for the current process.

-
ERR_APPEXECFWK_CALLBACK_SERVICEID_TRANSMITTED_FAILED

Failed to transmit the service ID of the current process.

-
ERR_APPEXECFWK_CALLBACK_NEVER_REGISTERED

The callback is never registered.

-
ERR_APPEXECFWK_CALLBACK_OBTAIN_ALL_BUNDLE_FAILED

Failed to obtain the bundle names of all applications in the system.

-
ERR_APPEXECFWK_CALLBACK_NULL_CORRESPONDING_CALLBACK

The required callback is unavailable.

-
ERR_APPEXECFWK_CALLBACK_GET_INSTALLTYPE_FAILED

Failed to obtain the installation type (installation or uninstallation).

-
ERR_APPEXECFWK_CALLBACK_GET_ERROR_INSTALLTYPE

Incorrect installation type.

-
ERR_APPEXECFWK_SERIALIZATION_FAILED

Serialization failed.

-
ERR_APPEXECFWK_DESERIALIZATION_FAILED

Deserialization failed.

-
ERR_APPEXECFWK_SYSTEM_INTERNAL_ERROR

Internal system error.

-
ERR_APPEXECFWK_NO_BUNDLENAME_FOR_UID

No bundle name associated with the UID is found.

-
ERR_APPEXECFWK_IPCIO_UNAVAILABLED

The IpcIo structure is unavailable.

-
ERR_APPEXECFWK_INVOKE_ERROR

An error occurred when calling the invoke function of the Bundle Manager Service.

-
ERR_APPEXECFWK_PERMISSION_DENIED

The server that invokes the Bundle Manager Service does not have required permission.

-
- -## InstallLocation - -``` -enum [InstallLocation](BundleManager.md#ga4907fd26df42a0abdfd6ade10ac44efb) -``` - - - - - - - - - - - - - -

Enumerator

-

Description

-
INSTALL_LOCATION_INTERNAL_ONLY

The installation or update path is storage/app when installLocation is set to 1.

-
INSTALL_LOCATION_PREFER_EXTERNAL

The installation or update path is sdcard/app when installLocation is set to 2.

-
- -## LaunchMode - -``` -enum [LaunchMode](BundleManager.md#ga605d46d860e356a74db6842e66522854) -``` - - **Description:** - -Enumerates startup modes of an ability. - - - - - - - - - - - - - -

Enumerator

-

Description

-
SINGLETON

Singleton mode, allowing only one instance

-
STANDARD

Standard mode, allowing multiple instances

-
- -## **Function ** - -## ClearAbilityInfo\(\) - -``` -void ClearAbilityInfo ([AbilityInfo](AbilityInfo.md) * abilityInfo) -``` - - **Description:** - -Clears an [AbilityInfo](AbilityInfo.md) object. - -This function clears and releases the memory occupied by the fields of the pointer type included in the specified [AbilityInfo](AbilityInfo.md) object. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
abilityInfoIndicates the pointer to the AbilityInfo object to clear.
- -## ClearBundleInfo\(\) - -``` -void ClearBundleInfo ([BundleInfo](BundleInfo.md) * bundleInfo) -``` - - **Description:** - -Clears a [BundleInfo](BundleInfo.md) object. - -This function clears and releases the memory occupied by the fields of the pointer type included in the specified [BundleInfo](BundleInfo.md) object. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
bundleInfoIndicates the pointer to the BundleInfo object to clear.
- -## ClearBundleStatusCallback\(\) - -``` -void ClearBundleStatusCallback ([BundleStatusCallback](BundleStatusCallback.md) * bundleStatusCallback) -``` - - **Description:** - -Clears and releases the memory occupied by the [BundleStatusCallback](BundleStatusCallback.md) structure. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
bundleStatusCallbackIndicates the pointer to the BundleStatusCallback structure to clear.
- -## ClearElement\(\) - -``` -void ClearElement ([ElementName](ElementName.md) * element) -``` - - **Description:** - -Clears the internal data of a specified **[ElementName](ElementName.md)**. - -After [AbilityInfo](AbilityInfo.md) is queried, clear the internal data of an **[ElementName](ElementName.md)** if it is no longer required. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
elementIndicates the pointer to the ElementName to clear.
- -## ClearModuleInfo\(\) - -``` -void ClearModuleInfo ([ModuleInfo](ModuleInfo.md) * moduleInfo) -``` - - **Description:** - -Clears a [ModuleInfo](ModuleInfo.md) object. - -This function clears and releases the memory occupied by the fields of the pointer type included in the specified [ModuleInfo](ModuleInfo.md) object. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
moduleInfoIndicates the pointer to the ModuleInfo object to clear.
- -## GetBundleInfo\(\) - -``` -uint8_t GetBundleInfo (const char * bundleName, int32_t flags, [BundleInfo](BundleInfo.md) * bundleInfo ) -``` - - **Description:** - -Obtains the [BundleInfo](BundleInfo.md) of an application based on the specified bundle name. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
bundleNameIndicates the pointer to the name of the application bundle to query.
flagsSpecifies whether the obtained BundleInfo object can contain AbilityInfo. The value 1 indicates that it can contain AbilityInfo, and 0 indicates that it cannot.
bundleInfoIndicates the pointer to the obtained BundleInfo object.
- -**Attention:** - -Before querying a [BundleInfo](BundleInfo.md) object, you should first call **memset** on the constructed [BundleInfo](BundleInfo.md) object so that each field in it can be properly initialized for carrying the obtained information. - -**Returns:** - -Returns [ERR\_OK](BundleManager.md#ggac318d4f4dc0125e2367ea8c539770ed1aa26c163b80b1f6786ca81dadc14b00fb) if this function is successfully called; returns another error code defined in [AppexecfwkErrors](BundleManager.md#gac318d4f4dc0125e2367ea8c539770ed1) otherwise. - -## GetBundleInfos\(\) - -``` -uint8_t GetBundleInfos (const int flags, [BundleInfo](BundleInfo.md) ** bundleInfos, int32_t * len ) -``` - - **Description:** - -Obtains the [BundleInfo](BundleInfo.md) of all bundles in the system. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
flagsSpecifies whether each of the obtained BundleInfo objects can contain AbilityInfo. The value 1 indicates that it can contain AbilityInfo, and 0 indicates that it cannot.
bundleInfosIndicates the double pointer to the obtained BundleInfo objects.
lenIndicates the pointer to the number of BundleInfo objects obtained.
- -**Returns:** - -Returns [ERR\_OK](BundleManager.md#ggac318d4f4dc0125e2367ea8c539770ed1aa26c163b80b1f6786ca81dadc14b00fb) if this function is successfully called; returns another error code defined in [AppexecfwkErrors](BundleManager.md#gac318d4f4dc0125e2367ea8c539770ed1) otherwise. - -## GetBundleInfosByMetaData\(\) - -``` -uint8_t GetBundleInfosByMetaData (const char * metaDataKey, [BundleInfo](BundleInfo.md) ** bundleInfos, int32_t * len ) -``` - - **Description:** - -Obtains the [BundleInfo](BundleInfo.md) of application bundles based on the specified [MetaData](MetaData.md). - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
metaDataKeyIndicates the pointer to the metadata name in the MetaData.
bundleInfosIndicates the double pointer to the obtained BundleInfo objects.
lenIndicates the pointer to the number of BundleInfo objects obtained.
- -**Returns:** - -Returns [ERR\_OK](BundleManager.md#ggac318d4f4dc0125e2367ea8c539770ed1aa26c163b80b1f6786ca81dadc14b00fb) if this function is successfully called; returns another error code defined in [AppexecfwkErrors](BundleManager.md#gac318d4f4dc0125e2367ea8c539770ed1) otherwise. - -## GetBundleNameForUid\(\) - -``` -uint8_t GetBundleNameForUid (int32_t uid, char ** bundleName ) -``` - - **Description:** - -Obtains the bundle name of an application based on the specified UID. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
uidIndicates the UID of the application to query.
bundleNameIndicates the double pointer to the bundle name of the application.
- -**Returns:** - -Returns [ERR\_OK](BundleManager.md#ggac318d4f4dc0125e2367ea8c539770ed1aa26c163b80b1f6786ca81dadc14b00fb) if this function is successfully called; returns another error code defined in [AppexecfwkErrors](BundleManager.md#gac318d4f4dc0125e2367ea8c539770ed1) otherwise. - -## Install\(\) - -``` -bool Install (const char * hapPath, const [InstallParam](InstallParam.md) * installParam, [InstallerCallback](BundleManager.md#ga00f021e76d728d2d44e1a28887ccc3af) installerCallback ) -``` - - **Description:** - -Installs or updates an application. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
hapPathIndicates the pointer to the path for storing the OpenHarmony Ability Package (HAP) of the application to install or update.
installParamIndicates the pointer to the parameters used for application installation or update.
installerCallbackIndicates the callback to be invoked for notifying the installation or update result.
- -**Returns:** - -Returns **true** if this function is successfully called; returns **false** otherwise. - -## QueryAbilityInfo\(\) - -``` -uint8_t QueryAbilityInfo (const [Want](Want.md) * want, [AbilityInfo](AbilityInfo.md) * abilityInfo ) -``` - - **Description:** - -Queries the [AbilityInfo](AbilityInfo.md) of an ability based on the information carried in the [Want](Want.md) structure. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
wantIndicates the pointer to the Want structure used for querying the specified ability.
abilityInfoIndicates the pointer to the obtained AbilityInfo object.
- -**Attention:** - -Before querying an [AbilityInfo](AbilityInfo.md) object, you should first call **memset** on the constructed [AbilityInfo](AbilityInfo.md) object so that each field in it can be properly initialized for carrying the obtained information. - -**Returns:** - -Returns [ERR\_OK](BundleManager.md#ggac318d4f4dc0125e2367ea8c539770ed1aa26c163b80b1f6786ca81dadc14b00fb) if this function is successfully called; returns another error code defined in [AppexecfwkErrors](BundleManager.md#gac318d4f4dc0125e2367ea8c539770ed1) otherwise. - -## QueryKeepAliveBundleInfos\(\) - -``` -uint8_t QueryKeepAliveBundleInfos ([BundleInfo](BundleInfo.md) ** bundleInfos, int32_t * len ) -``` - - **Description:** - -Obtains the [BundleInfo](BundleInfo.md) of all keep-alive applications in the system. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
bundleInfosIndicates the double pointer to the obtained BundleInfo objects.
lenIndicates the pointer to the number of BundleInfo objects obtained.
- -**Returns:** - -Returns [ERR\_OK](BundleManager.md#ggac318d4f4dc0125e2367ea8c539770ed1aa26c163b80b1f6786ca81dadc14b00fb) if this function is successfully called; returns another error code defined in [AppexecfwkErrors](BundleManager.md#gac318d4f4dc0125e2367ea8c539770ed1) otherwise. - -## RegisterCallback\(\) - -``` -int32_t RegisterCallback ([BundleStatusCallback](BundleStatusCallback.md) * BundleStatusCallback) -``` - - **Description:** - -Registers a callback to monitor the installation, update, and uninstallation state changes of an application. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
BundleStatusCallbackIndicates the pointer to the callback to be invoked when the installation, update, or uninstallation state of the monitored application changes.
- -**Returns:** - -Returns [ERR\_OK](BundleManager.md#ggac318d4f4dc0125e2367ea8c539770ed1aa26c163b80b1f6786ca81dadc14b00fb) if this function is successfully called; returns another error code defined in [AppexecfwkErrors](BundleManager.md#gac318d4f4dc0125e2367ea8c539770ed1) otherwise. - -## SetElementAbilityName\(\) - -``` -bool SetElementAbilityName ([ElementName](ElementName.md) * element, const char * abilityName ) -``` - - **Description:** - -Sets the class name of the ability used to query [AbilityInfo](AbilityInfo.md). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
elementIndicates the pointer to the ElementName to set.
abilityNameIndicates the pointer to the class name to set.
- -**Returns:** - -Returns **true** if the setting is successful; returns **false** otherwise. - -## SetElementBundleName\(\) - -``` -bool SetElementBundleName ([ElementName](ElementName.md) * element, const char * bundleName ) -``` - - **Description:** - -Sets the bundle name used to query [AbilityInfo](AbilityInfo.md). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
elementIndicates the pointer to the ElementName to set.
bundleNameIndicates the pointer to the bundle name to set.
- -**Returns:** - -Returns **true** if the setting is successful; returns **false** otherwise. - -## SetElementDeviceID\(\) - -``` -bool SetElementDeviceID ([ElementName](ElementName.md) * element, const char * deviceId ) -``` - - **Description:** - -Sets the device ID used to query [AbilityInfo](AbilityInfo.md). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
elementIndicates the pointer to the ElementName to set.
deviceIdIndicates the pointer to the device ID to set.
- -**Returns:** - -Returns **true** if the setting is successful; returns **false** otherwise. - -## Uninstall\(\) - -``` -bool Uninstall (const char * bundleName, const [InstallParam](InstallParam.md) * installParam, [InstallerCallback](BundleManager.md#ga00f021e76d728d2d44e1a28887ccc3af) installerCallback ) -``` - - **Description:** - -Uninstalls an application. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
bundleNameIndicates the pointer to the bundle name of the application to uninstall.
installParamIndicates the pointer to the parameters used for application uninstallation.
installerCallbackIndicates the callback to be invoked for notifying the uninstallation result.
- -**Returns:** - -Returns **true** if this function is successfully called; returns **false** otherwise. - -## UnregisterCallback\(\) - -``` -int32_t UnregisterCallback () -``` - - **Description:** - -Unregisters a callback previously registered for monitoring the installation, update, and uninstallation stat changes of an application. - -**Returns:** - -Returns [ERR\_OK](BundleManager.md#ggac318d4f4dc0125e2367ea8c539770ed1aa26c163b80b1f6786ca81dadc14b00fb) if this function is successfully called; returns another error code defined in [AppexecfwkErrors](BundleManager.md#gac318d4f4dc0125e2367ea8c539770ed1) otherwise. - diff --git a/api/api-SmartVision-Devices/BundleStatusCallback.md b/api/api-SmartVision-Devices/BundleStatusCallback.md deleted file mode 100755 index c2771e8dfdd88bcb0f391fa114e66577b123eb51..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/BundleStatusCallback.md +++ /dev/null @@ -1,84 +0,0 @@ -# BundleStatusCallback - -- [Overview](#section1138901815165630) -- [Summary](#section1984981971165630) -- [Data Fields](#pub-attribs) -- [Details](#section335321196165630) -- [Field](#section91076479165630) -- [bundleName](#ad92bee444c17e378809065e23d6d796a) -- [callBack](#a5e6bccc1fb386a428ae77271e5b21354) -- [data](#ae6bd742d12d3c9034471299d69ba374a) - -## **Overview** - -**Related Modules:** - -[BundleManager](BundleManager.md) - -**Description:** - -Defines the application state callback information. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

bundleName

-

char *

-

data

-

void *

-

callBack

-

BundleStateCallback

-
- -## **Details** - -## **Field ** - -## bundleName - -``` -char* BundleStatusCallback::bundleName -``` - - **Description:** - -Pointer to the bundle name of the application that the callback listens to. If this parameter is set to **nullptr**, the callback listens to all applications in the system. - -## callBack - -``` -[BundleStateCallback](BundleManager.md#gad7ea6d0bf78db2d59e6d339c31819885) BundleStatusCallback::callBack -``` - - **Description:** - -Callback to be invoked upon application state changes. - -## data - -``` -void* BundleStatusCallback::data -``` - - **Description:** - -Pointer to the registered data that will be used by [BundleStateCallback](BundleManager.md#gad7ea6d0bf78db2d59e6d339c31819885). - diff --git a/api/api-SmartVision-Devices/COMMON.md b/api/api-SmartVision-Devices/COMMON.md deleted file mode 100755 index 2abf68041c412a254014cce959b4f364c65955d7..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/COMMON.md +++ /dev/null @@ -1,75 +0,0 @@ -# COMMON - -- [Overview](#section1730551614165623) -- [Summary](#section1213833944165623) -- [Files](#files) -- [Typedefs](#typedef-members) -- [Details](#section1237214918165623) -- [Typedef](#section197799551165623) -- [DevHandle](#gab8c2d38e46eec50bd097a27d3d8bf041) - -## **Overview** - -**Description:** - -Provides common APIs of the platform driver. - -This module also provides **DevHandle**, which represents the common data structure of the platform driver. - -**Since:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - -

File Name

-

Description

-

hdf_platform.h

-

Declares common APIs of the platform driver.

-
- -## Typedefs - - - - - - - - - - -

Typedef Name

-

Description

-

DevHandle

-

typedef void *

-

Defines the common device handle of the platform driver.

-
- -## **Details** - -## **Typedef ** - -## DevHandle - -``` -typedef void* [DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) -``` - - **Description:** - -Defines the common device handle of the platform driver. - -The handle is associated with a specific platform device and is used as the first input parameter for all APIs of the platform driver. - diff --git a/api/api-SmartVision-Devices/Camera.md b/api/api-SmartVision-Devices/Camera.md deleted file mode 100755 index 931bc8c3da312a569c000eb30ffc4fb78749381e..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Camera.md +++ /dev/null @@ -1,104 +0,0 @@ -# Camera - -## **Overview** - -**Related Modules:** - -[MultiMedia\_Camera](MultiMedia_Camera.md) - -**Description:** - -Declares functions in the **[Camera](Camera.md)** class to implement camera operations. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Member Function Name

-

Description

-

~Camera ()=default

-

virtual 

-

destructor function.

-

GetCameraId ()

-

virtual std::string 

-

Obtains the camera ID.

-

GetCameraConfig () const

-

virtual const CameraConfig * 

-

Obtains the camera configuration. You can use the obtained CameraConfig object to configure the camera.

-

GetFrameConfig (int32_t type)

-

virtual FrameConfig

-

Obtains the frame configuration.

-

Configure (CameraConfig &config)

-

virtual void 

-

Configures the camera using the CameraConfig object.

-

TriggerLoopingCapture (FrameConfig &frameConfig)

-

virtual int32_t 

-

Triggers looping-frame capture.

-

StopLoopingCapture ()

-

virtual void 

-

Stops looping-frame capture.

-

TriggerSingleCapture (FrameConfig &frameConfig)

-

virtual int32_t 

-

Starts single-frame capture. The frame parameters are set through the FrameConfig object, and the captured image data is stored in the surface of the FrameConfig object.

-

Release ()

-

virtual void 

-

Releases the Camera object and associated resources.

-
- -## Protected Member Functions - - - - - - - - - -

Protected Member Function Name

-

Description

-

Camera ()=default

-

 

-

constructed function.

-
- diff --git a/api/api-SmartVision-Devices/CameraAbility.md b/api/api-SmartVision-Devices/CameraAbility.md deleted file mode 100755 index 4f1a4bc624a14026001dcf694d047e894d49121c..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/CameraAbility.md +++ /dev/null @@ -1,91 +0,0 @@ -# CameraAbility - -## **Overview** - -**Related Modules:** - -[MultiMedia\_CameraAbility](MultiMedia_CameraAbility.md) - -**Description:** - -Declares functions of the **[CameraAbility](CameraAbility.md)** class. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Member Function Name

-

Description

-

CameraAbility ()

-

 

-

constructed function.

-

~CameraAbility ()

-

virtual 

-

destructor function.

-

GetSupportedSizes (int format) const

-

std::list< CameraPicSize > 

-

Obtains the supported image sizes for a specified image format.

-

GetSupportedAeMode () const

-

std::list< int32_t > 

-

Obtains the supported auto exposure modes.

-

GetSupportedParameters () const

-

std::list< uint32_t > 

-

Obtains the parameters supported by the camera.

-
    
  

-

Obtains the parameter value range based on a specified parameter key.

-

GetSupportedResults () const

-

std::list< uint32_t > 

-

Obtains the keys of returnable results related to the parameter settings supported by the camera.

-

GetSupportedProperties () const

-

std::list< uint32_t > 

-

Obtains the properties supported by the camera.

-
    
  

-

Obtains the value of a specified property key.

-
- diff --git a/api/api-SmartVision-Devices/CameraStateCallback.md b/api/api-SmartVision-Devices/CameraStateCallback.md deleted file mode 100755 index b1f58b37695f66a687ad8d0d6c84a333f60ce4ca..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/CameraStateCallback.md +++ /dev/null @@ -1,75 +0,0 @@ -# CameraStateCallback - -## **Overview** - -**Related Modules:** - -[MultiMedia\_CameraStateCallback](MultiMedia_CameraStateCallback.md) - -**Description:** - -Declares functions in the **[CameraStateCallback](CameraStateCallback.md)** class. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Member Function Name

-

Description

-

CameraStateCallback ()=default

-

 

-

constructed function.

-

~CameraStateCallback ()

-

virtual 

-

destructor function.

-

OnCreated (Camera &c)

-

virtual void 

-

Called when the camera is successfully created.

-

OnCreateFailed (const std::string cameraId, int32_t errorCode)

-

virtual void 

-

Called when the camera fails to be created.

-

OnReleased (Camera &c)

-

virtual void 

-

Called when the camera is released.

-

OnConfigured (Camera &c)

-

virtual void 

-

Called when the camera is configured.

-

OnConfigureFailed (const std::string cameraId, int32_t errorCode)

-

virtual void 

-

Called when the camera fails to be configured.

-
- diff --git a/api/api-SmartVision-Devices/CapabilityMap.md b/api/api-SmartVision-Devices/CapabilityMap.md deleted file mode 100755 index f09d05caaf03b3ec4ebd052adc0c9c01bcbf88ad..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/CapabilityMap.md +++ /dev/null @@ -1,40 +0,0 @@ -# CapabilityMap - -- [Overview](#section1216290626165631) -- [Summary](#section427463901165631) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[Softbus](Softbus.md) - -**Description:** - -Defines the mapping between supported capabilities and bitmaps. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

bitmap

-

DataBitMap

-

capability

-

char *

-
- diff --git a/api/api-SmartVision-Devices/Capbility.md b/api/api-SmartVision-Devices/Capbility.md deleted file mode 100755 index ac6a94d963206c981ad8142855fa8b1bb919f7e7..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Capbility.md +++ /dev/null @@ -1,260 +0,0 @@ -# Capbility - -- [Overview](#section749981014165631) -- [Summary](#section1164889656165631) -- [Data Fields](#pub-attribs) -- [Details](#section1024502433165631) -- [Field](#section483310989165631) -- [allocateMask](#aed3e8869cfc5842e22d445588c493622) -- [capsMask](#a8bde7a8bbe0a8acbc134dd51521cfbdf) -- [maxBitRate](#af0abc05742fc15f22960641bc32b274b) -- [maxSize](#a1781db5047e1c552a5983b039121ee9f) -- [mime](#a7828502f8ef57adf7822b65f72f496be) -- [minBitRate](#aee07db6d7bd5b0d68accea81be6bc4f2) -- [minInputBufferNum](#a53d07b315a98736d45fc94bae43343eb) -- [minOutputBufferNum](#ac6ddc30ed893bc43980392027d96b689) -- [minSize](#a48f8a48ef6ddd6304ce137b11a33cf8c) -- [supportLevels](#aa1c3910c3552de9ac2c39907f679cbf7) -- [supportPixelFormats](#a059387b07149edb590b3174510296662) -- [supportProfiles](#ab20f0a14b1d43e3a694f350e1a069811) -- [type](#a21fa5ad7f3b8c3a9e625e4a6e26b56b8) -- [whAlignment](#aeccf15947ba85e01429d350c724be846) - -## **Overview** - -**Related Modules:** - -[Codec](Codec.md) - -**Description:** - -Defines the codec capability. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

mime

-

AvCodecMime

-

type

-

CodecType

-

whAlignment

-

Alginment

-

minSize

-

Rect

-

maxSize

-

Rect

-

minBitRate

-

uint64_t

-

maxBitRate

-

uint64_t

-

supportProfiles

-

ResizableArray

-

supportLevels

-

ResizableArray

-

supportPixelFormats

-

ResizableArray

-

minInputBufferNum

-

uint32_t

-

minOutputBufferNum

-

uint32_t

-

allocateMask

-

uint32_t

-

capsMask

-

uint32_t

-
- -## **Details** - -## **Field ** - -## allocateMask - -``` -uint32_t Capbility::allocateMask -``` - - **Description:** - -Buffer allocation mode. For details, see [AllocateBufferMode](Codec.md#gaf59a3505491b6f0b5dff5d62372a9679). - -## capsMask - -``` -uint32_t Capbility::capsMask -``` - - **Description:** - -Capability mask. For details, see [CapsMask](Codec.md#ga09af5b0a9d5134ad4d44cbe8cbe7b887). - -## maxBitRate - -``` -uint64_t Capbility::maxBitRate -``` - - **Description:** - -Maximum bit rate supported - -## maxSize - -``` -[Rect](Rect.md) Capbility::maxSize -``` - - **Description:** - -Maximum resolution supported - -## mime - -``` -[AvCodecMime](Codec.md#ga1bee586eafa91dfb60f94ba40fc95faa) Capbility::mime -``` - - **Description:** - -MIME type - -## minBitRate - -``` -uint64_t Capbility::minBitRate -``` - - **Description:** - -Minimum bit rate supported - -## minInputBufferNum - -``` -uint32_t Capbility::minInputBufferNum -``` - - **Description:** - -Minimum number of input buffers required for running - -## minOutputBufferNum - -``` -uint32_t Capbility::minOutputBufferNum -``` - - **Description:** - -Minimum number of output buffers required for running - -## minSize - -``` -[Rect](Rect.md) Capbility::minSize -``` - - **Description:** - -Minimum resolution supported - -## supportLevels - -``` -[ResizableArray](ResizableArray.md) Capbility::supportLevels -``` - - **Description:** - -Supported levels - -## supportPixelFormats - -``` -[ResizableArray](ResizableArray.md) Capbility::supportPixelFormats -``` - - **Description:** - -Supported pixel formats - -## supportProfiles - -``` -[ResizableArray](ResizableArray.md) Capbility::supportProfiles -``` - - **Description:** - -Supported profiles - -## type - -``` -[CodecType](Codec.md#ga03b4b6ae5fb82af68d46aaea3d3e4d79) Capbility::type -``` - - **Description:** - -Codec type - -## whAlignment - -``` -[Alginment](Alginment.md) Capbility::whAlignment -``` - - **Description:** - -Value to align with the width and height - diff --git a/api/api-SmartVision-Devices/ChannelDef.md b/api/api-SmartVision-Devices/ChannelDef.md deleted file mode 100755 index 2d009f4802b8830e81f63e48901ca7c648f912be..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/ChannelDef.md +++ /dev/null @@ -1,54 +0,0 @@ -# ChannelDef - -- [Overview](#section80321562165631) -- [Summary](#section1232192410165631) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Describes a communication channel. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

chan

-

struct Ieee80211Channel *

-

width

-

enum WifiChannelType

-

centerFreq1

-

int32_t

-

centerFreq2

-

int32_t

-
- diff --git a/api/api-SmartVision-Devices/Codec.md b/api/api-SmartVision-Devices/Codec.md deleted file mode 100755 index 65b8445dfc9afd9917a946d7f9d765382a91d9aa..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Codec.md +++ /dev/null @@ -1,2360 +0,0 @@ -# Codec - -- [Overview](#section1786836669165623) -- [Summary](#section399828542165623) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Macros](#define-members) -- [Typedefs](#typedef-members) -- [Enumerations](#enum-members) -- [Functions](#func-members) -- [Details](#section794294671165623) -- [Enumeration Type](#section1038214150165623) -- [anonymous enum](#ga6b7b47dd702d9e331586d485013fd1ea) -- [AllocateBufferMode](#gaeae808d52153b2e33c6815162bbd11e0) -- [AudioBitRate](#gac8cc627a9912e6a338396a6f19bbba5d) -- [AudioSampleRate](#gaa0280074adafe6d2581d31f71512b842) -- [AudioSoundMode](#gacecb40e35c431a27385f7b439fc7a76c) -- [AvCodecMime](#ga1bee586eafa91dfb60f94ba40fc95faa) -- [BufferMode](#gacc0fd55192fd9f663121b037b06f41e8) -- [BufferType](#gadf8e136713c0691010d2bec6ba63e9cf) -- [CapsMask](#gae5751aa8514dcaf2217df12db5ef57a1) -- [CodecType](#ga03b4b6ae5fb82af68d46aaea3d3e4d79) -- [DirectionType](#ga8ef30fa9c08e08c8706653571f9f5b81) -- [EventType](#ga2628ea8d12e8b2563c32f05dc7fff6fa) -- [Level](#ga221b779e6bb7b8d40677d7642bfefac5) -- [ParamKey](#ga575c56a2d6b42c48881cf47b0008d5a6) -- [PicSize](#ga94981b885085085ed5f9dea406519b48) -- [PixelFormat](#ga60883d4958a60b91661e97027a85072a) -- [Profile](#ga85b10143618f300ff4f5bc6d45c72c01) -- [StreamFlagType](#ga8a15793172118d64d8adeba0c8544e84) -- [VenCodeGopMode](#ga9532f651a003219a262c440f5621d129) -- [VenCodeRcMode](#ga94267d7ba495136561e1c65686b240f7) -- [VideoField](#ga1420ddfb066b941fb55a153b869d9ccf) -- [Function](#section106240538165623) -- [CodecCreate\(\)](#ga74aa0395a51f004390f7a92fb68faddd) -- [CodecDeinit\(\)](#ga2d6eb231ca7766990cfa8c1841637245) -- [CodecDequeInput\(\)](#ga91d7e1566c90d7cb9ac846eecad0024f) -- [CodecDequeueOutput\(\)](#gab575752467517eb8e6766773c1e3fb23) -- [CodecDestroy\(\)](#ga1bc0592b05e4f687e2bef2ffb83102b8) -- [CodecEnumerateCapbility\(\)](#gaf0bb69d2f8c5ad0fec6959b353ee1acd) -- [CodecFlush\(\)](#gaa6ed6c24e29f8fdfbbb0a3d562260a6a) -- [CodecGetCapbility\(\)](#ga1a6fbf6e84e01fdc1af59caa4203ce8e) -- [CodecGetParameter\(\)](#ga1d812eac032e3e05cf5bf71b03e93f65) -- [CodecInit\(\)](#gadb2714f1e7a69419cefd38a2ad1f9829) -- [CodecQueueInput\(\)](#ga0daece8dbf22da84f926761c994819bc) -- [CodecQueueOutput\(\)](#gac98f3505082c3cb2413d9e95eef9c804) -- [CodecSetCallback\(\)](#ga28ec6149d05765ee75f4836e0b092406) -- [CodecSetParameter\(\)](#gaa080cf23aa5f77b30f3b90a026d97cc0) -- [CodecSetPortMode\(\)](#ga36a994c5f9f4d104aad0c24b5e8cbd37) -- [CodecStart\(\)](#ga38c1744b0b4be5817ef49556ae665d18) -- [CodecStop\(\)](#ga8e7913c052c2e45e193fb0aab3f5c7fd) - -## **Overview** - -**Description:** - -Defines codec-related APIs. - -including custom data types and functions for initializing audio and video codecs, setting parameters, and controlling and transferring data. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - - - - -

File Name

-

Description

-

codec_interface.h

-

Declares codec-related APIs, including functions for initializing audio and video codecs, setting parameters, and controlling and transferring data.

-

codec_type.h

-

Declares custom data types used in API declarations for the Codec module, including the codec types, audio and video parameters, input and output data, and callbacks.

-
- -## Data Structures - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

Param

-

Describes the dynamic parameter structure, which is mainly used by CodecCreate and CodecSetParameter.

-

BufferHandle

-

Defines the buffer handle type. The virtual address of a handle maps to its physical address.

-

CodecBufferInfo

-

Describes buffer information.

-

InputInfo

-

Describes input information.

-

OutputInfo

-

Describes output information.

-

ResizableArray

-

Defines a variable-length queue.

-

Alginment

-

Defines the alignment.

-

Rect

-

Defines a rectangle.

-

Capbility

-

Defines the codec capability.

-

CodecCallback

-

Defines callbacks and their parameters.

-
- -## Macros - - - - - - - - - - -

Macro Name and Value

-

Description

-

ELEMENT_MAX_LEN 50

-

Indicates the maximum number of reserved parameters in the array.

-
- -## Typedefs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Typedef Name

-

Description

-

CODEC_HANDLETYPE

-

typedef void *

-

Defines the pointer to the codec handle, which is the context information for function calls.

-

ValueType

-

typedef void *

-

Defines the pointer to the type of the dynamic parameter value.

-

BufferHandle

-

typedef struct BufferHandle

-

Defines the buffer handle type. The virtual address of a handle maps to its physical address.

-

BufferType

-

typedef enum BufferType

-

Enumerates buffer types.

-

OutputInfo

-

typedef struct OutputInfo

-

Describes output information.

-

AllocateBufferMode

-

typedef enum AllocateBufferMode

-

Enumerates allocation modes of input and output buffers.

-

CapsMask

-

typedef enum CapsMask

-

Enumerates playback capabilities.

-

CodecCapbility

-

typedef struct Capbility

-

Defines the codec capability.

-

UINTPTR

-

typedef uintptr_t

-

Redefines the unsigned pointer type, which is used for pointer conversion.

-
- -## Enumerations - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

CodecType { VIDEO_DECODER, VIDEO_ENCODER, AUDIO_DECODER, AUDIO_ENCODER, INVALID_TYPE }

-

Enumerates codec types.

-

ParamKey { KEY_MIMETYPE = 0x01, KEY_BUFFERSIZE, KEY_LEFT_STREAM_FRAMES, KEY_CODEC_TYPE, KEY_DIRECTION_TYPE, KEY_BITRATE = 0x500, KEY_WIDTH = 0x1000, KEY_HEIGHT, KEY_STRIDE, KEY_VIDEO_FIELD, KEY_PIXEL_FORMAT, KEY_VIDEO_RC_MODE, KEY_VIDEO_GOP_MODE, KEY_VIDEO_PIC_SIZE, KEY_VIDEO_PROFILE, KEY_VIDEO_FRAME_RATE, KEY_IMAGE_Q_FACTOR, KEY_SAMPLE_RATE = 0x1500, KEY_AUDIO_PROFILE, KEY_CHANNEL_COUNT, KEY_BITWITH, KEY_SOUND_MODE, KEY_POINT_NUM_PER_FRAME, KEY_DEVICE_ID }

-

Enumerates indexes of parameter types.

-

VenCodeRcMode { VENCOD_RC_CBR = 0, VENCOD_RC_VBR, VENCOD_RC_AVBR, VENCOD_RC_QVBR, VENCOD_RC_CVBR, VENCOD_RC_QPMAP, VENCOD_RC_FIXQP }

-

Enumerates control modes of the channel encoding rate.

-

PicSize { Resolution_CIF, Resolution_360P, Resolution_D1_PAL, Resolution_D1_NTSC, Resolution_720P, Resolution_1080P, Resolution_INVALID }

-

Enumerates resolutions.

-

VenCodeGopMode { VENCOD_GOPMODE_NORMALP = 0, VENCOD_GOPMODE_DUALP = 1, VENCOD_GOPMODE_SMARTP = 2, VENCOD_GOPMODE_ADVSMARTP = 3, VENCOD_GOPMODE_BIPREDB = 4, VENCOD_GOPMODE_LOWDELAYB = 5, VENCOD_GOPMODE_INVALID }

-

Enumerates types of group of pictures (GOP).

-

VideoField { VID_FIELD_TOP = 0x1, VID_FIELD_BOTTOM = 0x2, VID_FIELD_INTERLACED = 0x3, VID_FIELD_FRAME = 0x4, VID_FIELD_INVALID }

-

Enumerates video frame fields.

-

PixelFormat { YVU_SEMIPLANAR_420 = 0, YVU_SEMIPLANAR_420_TILE, PIX_FORMAT_INVALID }

-

Enumerates pixel formats.

-

AudioSoundMode { AUD_SOUND_MODE_MONO = 0, AUD_SOUND_MODE_STEREO = 1, AUD_SOUND_MODE_INVALID }

-

Enumerates audio channel modes.

-

AudioSampleRate { AUD_SAMPLE_RATE_8000 = 8000, AUD_SAMPLE_RATE_12000 = 12000, AUD_SAMPLE_RATE_11025 = 11025, AUD_SAMPLE_RATE_16000 = 16000, AUD_SAMPLE_RATE_22050 = 22050, AUD_SAMPLE_RATE_24000 = 24000, AUD_SAMPLE_RATE_32000 = 32000, AUD_SAMPLE_RATE_44100 = 44100, AUD_SAMPLE_RATE_48000 = 48000, AUD_SAMPLE_RATE_64000 = 64000, AUD_SAMPLE_RATE_96000 = 96000, AUD_SAMPLE_RATE_INVALID }

-

Enumerates audio sampling rates.

-

AudioBitRate { AUD_AAC_BPS_8K = 8000, AUD_AAC_BPS_16K = 16000, AUD_AAC_BPS_22K = 22000, AUD_AAC_BPS_24K = 24000, AUD_AAC_BPS_32K = 32000, AUD_AAC_BPS_48K = 48000, AUD_AAC_BPS_64K = 64000, AUD_AAC_BPS_96K = 96000, AUD_AAC_BPS_128K = 128000, AUD_AAC_BPS_256K = 256000, AUD_AAC_BPS_320K = 320000 }

-

Enumerates audio bit rates.

-

StreamFlagType { STREAM_FLAG_KEYFRAME = 1, STREAM_FLAG_CODEC_SPECIFIC_INF = 2, STREAM_FLAG_EOS = 4, STREAM_FLAG_PART_OF_FRAME = 8, STREAM_FLAG_END_OF_FRAME = 16 }

-

Enumerates stream flags.

-

BufferType { BUFFER_TYPE_VIRTUAL = 0, BUFFER_TYPE_FD, BUFFER_TYPE_HANDLE }

-

Enumerates buffer types.

-

AvCodecMime { MEDIA_MIMETYPE_IMAGE_JPEG = 0, MEDIA_MIMETYPE_VIDEO_AVC, MEDIA_MIMETYPE_VIDEO_HEVC, MEDIA_MIMETYPE_AUDIO_AAC, MEDIA_MIMETYPE_INVALID }

-

Enumerates MIME types.

-

Profile { INVALID_PROFILE = 0, AAC_LC_PROFILE = 0x1000, AAC_MAIN_PROFILE, AAC_HE_V1_PROFILE, AAC_HE_V2_PROFILE, AAC_LD_PROFILE, AAC_ELD_PROFILE, AVC_BASELINE_PROFILE = 0x2000, AVC_MAIN_PROFILE, AVC_HIGH_PROFILE, HEVC_MAIN_PROFILE = 0x3000, HEVC_MAIN_10_PROFILE }

-

Enumerates codec profiles.

-

Level { INVALID_LEVEL = 0, AVC_LEVEL_1 = 0x1000, HEVC_LEVEL_MAIN_1 = 0x2000, HEVC_LEVEL_MAIN_2 }

-

Enumerates codec levels.

-

AllocateBufferMode { ALLOCATE_INPUT_BUFFER_CODEC = 0x1, ALLOCATE_INPUT_BUFFER_USER = 0x2, ALLOCATE_OUTPUT_BUFFER_CODEC = 0x4, ALLOCATE_OUTPUT_BUFFER_USER = 0x8 }

-

Enumerates allocation modes of input and output buffers.

-

CapsMask { ADAPTIVE_PLAYBACK = 0x1, SECURE_PLAYBACK = 0x2 }

-

Enumerates playback capabilities.

-

EventType { EventError, EventFlushCompelte, EventStopCompelte, EventOutFormatChanged, EventMax = 0x1FFFFFFF }

-

Enumerates event types.

-

DirectionType { INPUT_TYPE, OUTPUT_TYPE, ALL_TYPE }

-

Enumerates input and output types.

-

BufferMode { INTERNAL, EXTERNAL }

-

Enumerates allocation types.

-

{ CODEC_ERR_STREAM_BUF_FULL = 100, CODEC_ERR_FRAME_BUF_EMPTY, CODEC_RECEIVE_EOS, CODEC_ERR_INVALID_OP }

-

Enumerates codec error types.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

CodecInit ()

-

int32_t

-

Initializes the internal audio and video submodules of the codec.

-

CodecDeinit ()

-

int32_t

-

Deinitializes the internal audio and video submodules of the codec.

-

CodecEnumerateCapbility (uint32_t index, CodecCapbility *cap)

-

int32_t

-

Obtains the capabilities of a specified media type based on an index.

-

CodecGetCapbility (AvCodecMime mime, CodecType type, uint32_t flags, CodecCapbility *cap)

-

int32_t

-

Obtains the capabilities of a specified media type.

-

CodecCreate (const char *name, const Param *attr, int len, CODEC_HANDLETYPE *handle)

-

int32_t

-

Creates a specific codec component and returns the component context through a handle.

-

CodecDestroy (CODEC_HANDLETYPE handle)

-

int32_t

-

Destroys a codec component.

-

CodecSetPortMode (CODEC_HANDLETYPE handle, DirectionType type, BufferMode mode)

-

int32_t

-

Sets the input or output buffer mode.

-

CodecSetParameter (CODEC_HANDLETYPE handle, const Param *params, int paramCnt)

-

int32_t

-

Sets parameters required by a codec component.

-

CodecGetParameter (CODEC_HANDLETYPE handle, Param *params, int paramCnt)

-

int32_t

-

Obtains parameters from a codec component.

-

CodecStart (CODEC_HANDLETYPE handle)

-

int32_t

-

Starts a codec component.

-

CodecStop (CODEC_HANDLETYPE handle)

-

int32_t

-

Stops a codec component.

-

CodecFlush (CODEC_HANDLETYPE handle, DirectionType directType)

-

int32_t

-

Clears the cache when the codec component is the running state.

-

CodecQueueInput (CODEC_HANDLETYPE handle, const InputInfo *inputData, uint32_t timeoutMs)

-

int32_t

-

Queues input data.

-

CodecDequeInput (CODEC_HANDLETYPE handle, uint32_t timeoutMs, InputInfo *inputData)

-

int32_t

-

Dequeues input data that has been used.

-

CodecQueueOutput (CODEC_HANDLETYPE handle, OutputInfo *outInfo, uint32_t timeoutMs, int releaseFenceFd)

-

int32_t

-

Queues output data.

-

CodecDequeueOutput (CODEC_HANDLETYPE handle, uint32_t timeoutMs, int *acquireFd, OutputInfo *outInfo)

-

int32_t

-

Dequeues output data.

-

CodecSetCallback (CODEC_HANDLETYPE handle, const CodecCallback *cb, UINTPTR instance)

-

int32_t

-

Sets the callback function.

-
- -## **Details** - -## **Enumeration Type** - -## anonymous enum - -``` -anonymous enum -``` - -**Description:** - -Enumerates codec error types. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-

CODEC_ERR_STREAM_BUF_FULL

-

Elementary stream buffer queue is full.

-

-

CODEC_ERR_FRAME_BUF_EMPTY

-

Frame buffer queue is empty.

-

-

CODEC_RECEIVE_EOS

-

End of streams

-

-

CODEC_ERR_INVALID_OP

-

Invalid operation

-

-
- -## AllocateBufferMode - -``` -enum [AllocateBufferMode](Codec.md#gaeae808d52153b2e33c6815162bbd11e0) -``` - -**Description:** - -Enumerates allocation modes of input and output buffers. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-

ALLOCATE_INPUT_BUFFER_CODEC

-

Input buffer allocated within the Codec module

-

-

ALLOCATE_INPUT_BUFFER_USER

-

Input buffer allocated by an external user

-

-

ALLOCATE_OUTPUT_BUFFER_CODEC

-

Output buffer allocated within the Codec module

-

-

ALLOCATE_OUTPUT_BUFFER_USER

-

Output buffer allocated by an external user

-

-
- -## AudioBitRate - -``` -enum [AudioBitRate](Codec.md#gac8cc627a9912e6a338396a6f19bbba5d) -``` - -**Description:** - -Enumerates audio bit rates. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-

AUD_AAC_BPS_8K

-

8 kbit/s

-

-

AUD_AAC_BPS_16K

-

16 kbit/s

-

-

AUD_AAC_BPS_22K

-

22 kbit/s

-

-

AUD_AAC_BPS_24K

-

24 kbit/s

-

-

AUD_AAC_BPS_32K

-

32 kbit/s

-

-

AUD_AAC_BPS_48K

-

48 kbit/s

-

-

AUD_AAC_BPS_64K

-

64 kbit/s

-

-

AUD_AAC_BPS_96K

-

96 kbit/s

-

-

AUD_AAC_BPS_128K

-

128 kbit/s

-

-

AUD_AAC_BPS_256K

-

256 kbit/s

-

-

AUD_AAC_BPS_320K

-

320 kbit/s

-

-
- -## AudioSampleRate - -``` -enum [AudioSampleRate](Codec.md#gaa0280074adafe6d2581d31f71512b842) -``` - -**Description:** - -Enumerates audio sampling rates. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-

AUD_SAMPLE_RATE_8000

-

8 KHz

-

-

AUD_SAMPLE_RATE_12000

-

12 KHz

-

-

AUD_SAMPLE_RATE_11025

-

11.025 KHz

-

-

AUD_SAMPLE_RATE_16000

-

16 KHz

-

-

AUD_SAMPLE_RATE_22050

-

22.050 KHz

-

-

AUD_SAMPLE_RATE_24000

-

24 KHz

-

-

AUD_SAMPLE_RATE_32000

-

32 KHz

-

-

AUD_SAMPLE_RATE_44100

-

44.1 KHz

-

-

AUD_SAMPLE_RATE_48000

-

48 KHz

-

-

AUD_SAMPLE_RATE_64000

-

64 KHz

-

-

AUD_SAMPLE_RATE_96000

-

96 KHz

-

-

AUD_SAMPLE_RATE_INVALID

-

Invalid sampling rate

-

-
- -## AudioSoundMode - -``` -enum [AudioSoundMode](Codec.md#gacecb40e35c431a27385f7b439fc7a76c) -``` - -**Description:** - -Enumerates audio channel modes. - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-

AUD_SOUND_MODE_MONO

-

Mono channel

-

-

AUD_SOUND_MODE_STEREO

-

Stereo mode

-

-

AUD_SOUND_MODE_INVALID

-

Invalid mode

-

-
- -## AvCodecMime - -``` -enum [AvCodecMime](Codec.md#ga1bee586eafa91dfb60f94ba40fc95faa) -``` - -**Description:** - -Enumerates MIME types. - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-

MEDIA_MIMETYPE_IMAGE_JPEG

-

JPEG image

-

-

MEDIA_MIMETYPE_VIDEO_AVC

-

H.264 video

-

-

MEDIA_MIMETYPE_VIDEO_HEVC

-

H.265 video

-

-

MEDIA_MIMETYPE_AUDIO_AAC

-

AAC audio

-

-

MEDIA_MIMETYPE_INVALID

-

Invalid MIME type

-

-
- -## BufferMode - -``` -enum [BufferMode](Codec.md#gacc0fd55192fd9f663121b037b06f41e8) -``` - -**Description:** - -Enumerates allocation types. - - - - - - - - - - - - - -

Enumerator

-

Description

-

INTERNAL

-

Internal

-

-

EXTERNAL

-

External

-

-
- -## BufferType - -``` -enum [BufferType](Codec.md#gadf8e136713c0691010d2bec6ba63e9cf) -``` - -**Description:** - -Enumerates buffer types. - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-

BUFFER_TYPE_VIRTUAL

-

Virtual memory

-

-

BUFFER_TYPE_FD

-

File descriptor, which can be used cross processes

-

-

BUFFER_TYPE_HANDLE

-

Handle, which can be used cross processes

-

-
- -## CapsMask - -``` -enum [CapsMask](Codec.md#gae5751aa8514dcaf2217df12db5ef57a1) -``` - -**Description:** - -Enumerates playback capabilities. - - - - - - - - - - - - - -

Enumerator

-

Description

-

ADAPTIVE_PLAYBACK

-

Adaptive playback

-

-

SECURE_PLAYBACK

-

Secure playback

-

-
- -## CodecType - -``` -enum [CodecType](Codec.md#ga03b4b6ae5fb82af68d46aaea3d3e4d79) -``` - -**Description:** - -Enumerates codec types. - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-

VIDEO_DECODER

-

Video decoding

-

-

VIDEO_ENCODER

-

Video encoding

-

-

AUDIO_DECODER

-

Audio decoding

-

-

AUDIO_ENCODER

-

Audio encoding

-

-

INVALID_TYPE

-

Invalid type

-

-
- -## DirectionType - -``` -enum [DirectionType](Codec.md#ga8ef30fa9c08e08c8706653571f9f5b81) -``` - -**Description:** - -Enumerates input and output types. - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-

INPUT_TYPE

-

Input

-

-

OUTPUT_TYPE

-

Output

-

-

ALL_TYPE

-

Input and output

-

-
- -## EventType - -``` -enum [EventType](Codec.md#ga2628ea8d12e8b2563c32f05dc7fff6fa) -``` - -**Description:** - -Enumerates event types. - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-

EventError

-

Event error

-

-

EventFlushCompelte

-

Buffer flush completed

-

-

EventStopCompelte

-

Codec stopped

-

-

EventOutFormatChanged

-

Output format changed

-

-

EventMax

-

Maximum event value

-

-
- -## Level - -``` -enum [Level](Codec.md#ga221b779e6bb7b8d40677d7642bfefac5) -``` - -**Description:** - -Enumerates codec levels. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-

INVALID_LEVEL

-

Invalid level

-

-

AVC_LEVEL_1

-

H.264 level 1

-

-

HEVC_LEVEL_MAIN_1

-

H.265 Main level 1

-

-

HEVC_LEVEL_MAIN_2

-

H.265 Main level 2

-

-
- -## ParamKey - -``` -enum [ParamKey](Codec.md#ga575c56a2d6b42c48881cf47b0008d5a6) -``` - -**Description:** - -Enumerates indexes of parameter types. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-

KEY_MIMETYPE

-

MIME type. For the value type, see AvCodecMime.

-

-

KEY_BUFFERSIZE

-

Buffer size. The value type is uint32_t.

-

-

KEY_LEFT_STREAM_FRAMES

-

Number of frames in the remaining data streams. The value type is uint32_t.

-

-

KEY_CODEC_TYPE

-

Codec type. For the value type, see CodecType.

-

-

KEY_DIRECTION_TYPE

-

Input/Output type. For the value type, see DirectionType.

-

-

KEY_BITRATE

-

Bit rate. The value type is uint32_t.

-

-

KEY_WIDTH

-

Width. The value type is uint32_t.

-

-

KEY_HEIGHT

-

Hight. The value type is uint32_t.

-

-

KEY_STRIDE

-

Stride. The value type is uint32_t.

-

-

KEY_VIDEO_FIELD

-

Video field. For the value type, see VideoField.

-

-

KEY_PIXEL_FORMAT

-

Pixel format. For the value type, see PixelFormat.

-

-

KEY_VIDEO_RC_MODE

-

Rate control mode. For the value type, see VenCodeRcMode.

-

-

KEY_VIDEO_GOP_MODE

-

GOP mode. For the value type, see VenCodeGopMode.

-

-

KEY_VIDEO_PIC_SIZE

-

Image resolution. For the value type, see PicSize.

-

-

KEY_VIDEO_PROFILE

-

Codec profile. The value type is uint32_t.

-

-

KEY_VIDEO_FRAME_RATE

-

Frame rate. The value type is uint32_t.

-

-

KEY_IMAGE_Q_FACTOR

-

Quality factor, range is [1, 99]. The value type is uint32_t

-

-

KEY_SAMPLE_RATE

-

Sampling rate. The value type is uint32_t.

-

-

KEY_AUDIO_PROFILE

-

Audio encoding profile. The value type is uint32_t.

-

-

KEY_CHANNEL_COUNT

-

Number of channels. The value type is uint32_t.

-

-

KEY_BITWITH

-

Bit width. For the value type, see AudioBitWidth.

-

-

KEY_SOUND_MODE

-

Audio channel mode. For the value type, see AudioSoundMode.

-

-

KEY_POINT_NUM_PER_FRAME

-

Number of sampling points per frame. The value type is uint32_t.

-

-

KEY_DEVICE_ID

-

Device ID. The value type is uint32_t.

-

-
- -## PicSize - -``` -enum [PicSize](Codec.md#ga94981b885085085ed5f9dea406519b48) -``` - -**Description:** - -Enumerates resolutions. - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-

Resolution_CIF

-

352x288

-

-

Resolution_360P

-

640x360

-

-

Resolution_D1_PAL

-

720x576

-

-

Resolution_D1_NTSC

-

720x480

-

-

Resolution_720P

-

1280x720

-

-

Resolution_1080P

-

1920x1080

-

-

Resolution_INVALID

-

Invalid resolution

-

-
- -## PixelFormat - -``` -enum [PixelFormat](Codec.md#ga60883d4958a60b91661e97027a85072a) -``` - -**Description:** - -Enumerates pixel formats. - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-

YVU_SEMIPLANAR_420

-

YUV 420 SP

-

-

YVU_SEMIPLANAR_420_TILE

-

YUV SP 420 TILE

-

-

PIX_FORMAT_INVALID

-

Invalid format

-

-
- -## Profile - -``` -enum [Profile](Codec.md#ga85b10143618f300ff4f5bc6d45c72c01) -``` - -**Description:** - -Enumerates codec profiles. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-

INVALID_PROFILE

-

Invalid profile

-

-

AAC_LC_PROFILE

-

AAC-Low Complex

-

-

AAC_MAIN_PROFILE

-

AAC-Main

-

-

AAC_HE_V1_PROFILE

-

HEAAC, AAC+, or AACPlusV1

-

-

AAC_HE_V2_PROFILE

-

AAC++ or AACPlusV2

-

-

AAC_LD_PROFILE

-

AAC-Low Delay

-

-

AAC_ELD_PROFILE

-

AAC-Enhanced Low Delay

-

-

AVC_BASELINE_PROFILE

-

H.264 Baseline

-

-

AVC_MAIN_PROFILE

-

H.264 Main

-

-

AVC_HIGH_PROFILE

-

H.264 High

-

-

HEVC_MAIN_PROFILE

-

H.265 Main

-

-

HEVC_MAIN_10_PROFILE

-

H.265 Main 10

-

-
- -## StreamFlagType - -``` -enum [StreamFlagType](Codec.md#ga8a15793172118d64d8adeba0c8544e84) -``` - -**Description:** - -Enumerates stream flags. - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-

STREAM_FLAG_KEYFRAME

-

Keyframe

-

-

STREAM_FLAG_CODEC_SPECIFIC_INF

-

Codec specifications

-

-

STREAM_FLAG_EOS

-

End of streams

-

-

STREAM_FLAG_PART_OF_FRAME

-

Partial frame

-

-

STREAM_FLAG_END_OF_FRAME

-

End of frames, used in pair with STREAM_FLAG_PART_OF_FRAME

-

-
- -## VenCodeGopMode - -``` -enum [VenCodeGopMode](Codec.md#ga9532f651a003219a262c440f5621d129) -``` - -**Description:** - -Enumerates types of group of pictures \(GOP\). - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-

VENCOD_GOPMODE_NORMALP

-

P-frames using only one reference frame during encoding

-

-

VENCOD_GOPMODE_DUALP

-

P-frames using two reference frames during encoding

-

-

VENCOD_GOPMODE_SMARTP

-

Smart P-frames for encoding

-

-

VENCOD_GOPMODE_ADVSMARTP

-

Advanced smart P-frames for encoding

-

-

VENCOD_GOPMODE_BIPREDB

-

B-frames for encoding

-

-

VENCOD_GOPMODE_LOWDELAYB

-

B-frames using only previous frames as references during encoding.

-

-

VENCOD_GOPMODE_INVALID

-

Invalid type

-

-
- -## VenCodeRcMode - -``` -enum [VenCodeRcMode](Codec.md#ga94267d7ba495136561e1c65686b240f7) -``` - -**Description:** - -Enumerates control modes of the channel encoding rate. - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-

VENCOD_RC_CBR

-

Fixed bit rate

-

-

VENCOD_RC_VBR

-

Variable bit rate

-

-

VENCOD_RC_AVBR

-

Adaptive variable bit rate

-

-

VENCOD_RC_QVBR

-

Quality-defined variable bit rate

-

-

VENCOD_RC_CVBR

-

Constrained variable bit rate

-

-

VENCOD_RC_QPMAP

-

Configuration-mapped quantization parameters

-

-

VENCOD_RC_FIXQP

-

Fixed quantization parameters

-

-
- -## VideoField - -``` -enum [VideoField](Codec.md#ga1420ddfb066b941fb55a153b869d9ccf) -``` - -**Description:** - -Enumerates video frame fields. - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-

VID_FIELD_TOP

-

Top fields on even-number lines

-

-

VID_FIELD_BOTTOM

-

Bottom fields on odd-number lines

-

-

VID_FIELD_INTERLACED

-

Interlaced fields

-

-

VID_FIELD_FRAME

-

Non-interlaced frames

-

-

VID_FIELD_INVALID

-

Invalid fields

-

-
- -## **Function** - -## CodecCreate\(\) - -``` -int32_t CodecCreate (const char * name, const [Param](Param.md) * attr, int len, [CODEC_HANDLETYPE](Codec.md#ga9381a619f36ac8d5d7f467d2f0404183) * handle ) -``` - -**Description:** - -Creates a specific codec component and returns the component context through a handle. - -You can adjust the parameters required for creating a component based on service requirements. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-

name

-

Indicates the pointer to the unique name of the component, for example, codec.avc.hardware.decoder.

-

attr

-

Indicates the pointer to the parameters in the array required for creating the component.

-

len

-

Indicates the number of elements in the parameter array.

-

handle

-

Indicates the pointer to the codec handle returned.

-
- -**Returns:** - -Returns **0** if the codec component is created and the handle is available; returns a non-zero value otherwise. - -## CodecDeinit\(\) - -``` -int32_t CodecDeinit () -``` - -**Description:** - -Deinitializes the internal audio and video submodules of the codec. - -This function needs to be called only once in a process. - -**Returns:** - -Returns **0** if the deinitialization is successful; returns a non-zero value otherwise. - -**See also:** - -[CodecInit](Codec.md#gadb2714f1e7a69419cefd38a2ad1f9829) - -## CodecDequeInput\(\) - -``` -int32_t CodecDequeInput ([CODEC_HANDLETYPE](Codec.md#ga9381a619f36ac8d5d7f467d2f0404183) handle, uint32_t timeoutMs, [InputInfo](InputInfo.md) * inputData ) -``` - -**Description:** - -Dequeues input data that has been used. - -This function works with [CodecQueueInput](Codec.md#ga0daece8dbf22da84f926761c994819bc) to implement input data transmission. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-

handle

-

Indicates the handle of the codec component.

-

timeoutMs

-

Indicates the timeout duration. Generally, the value is less than or equal to 3 seconds.

-

inputData

-

Indicates the pointer to the input data that is used.

-
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## CodecDequeueOutput\(\) - -``` -int32_t CodecDequeueOutput ([CODEC_HANDLETYPE](Codec.md#ga9381a619f36ac8d5d7f467d2f0404183) handle, uint32_t timeoutMs, int * acquireFd, [OutputInfo](OutputInfo.md) * outInfo ) -``` - -**Description:** - -Dequeues output data. - -This function works with [CodecQueueOutput](Codec.md#gac98f3505082c3cb2413d9e95eef9c804) to implement output data transmission. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-

handle

-

Indicates the handle of the codec component.

-

timeoutMs

-

Indicates the timeout duration.

-

acquireFd

-

Indicates that this parameter is derived from the codec mode. The output data can be used only after waiting for acquireFd is successful. The value -1 indicates that acquireFd is invalid.

-

outInfo

-

Indicates the pointer to the output data.

-
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## CodecDestroy\(\) - -``` -int32_t CodecDestroy ([CODEC_HANDLETYPE](Codec.md#ga9381a619f36ac8d5d7f467d2f0404183) handle) -``` - -**Description:** - -Destroys a codec component. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-

handle

-

Indicates the handle of the codec component.

-
- -**Returns:** - -Returns **0** if the codec component is destroyed; returns a non-zero value otherwise. - -**See also:** - -[CodecCreate](Codec.md#ga74aa0395a51f004390f7a92fb68faddd) - -## CodecEnumerateCapbility\(\) - -``` -int32_t CodecEnumerateCapbility (uint32_t index, [CodecCapbility](Codec.md#ga1876710b1f2fe1d80e8b9de9ff28e0e3) * cap ) -``` - -**Description:** - -Obtains the capabilities of a specified media type based on an index. - -You can call this function repeatedly to obtain the codec capabilities until **CODEC\_END** is returned. The corresponding capabilities are described in the **Capability** structure, including the maximum and minimum resolutions, maximum and minimum bit rates, and supported profiles and levels. After obtaining the capabilities, determine whether they can meet your requirements, for example, whether specific media files can be played and whether audio and video frames can be compressed. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-

index

-

Indicates the index of the capabilities.

-

cap

-

Indicates the pointer to the capabilities.

-
- -**Returns:** - -Returns **CODEC\_SUCCESS** if the capabilities corresponding to the index are available; returns **CODEC\_END** otherwise. - -## CodecFlush\(\) - -``` -int32_t CodecFlush ([CODEC_HANDLETYPE](Codec.md#ga9381a619f36ac8d5d7f467d2f0404183) handle, [DirectionType](Codec.md#ga8ef30fa9c08e08c8706653571f9f5b81) directType ) -``` - -**Description:** - -Clears the cache when the codec component is the running state. - -Generally, this function is called when the seek operation is performed during playback. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-

handle

-

Indicates the handle of the codec component.

-
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## CodecGetCapbility\(\) - -``` -int32_t CodecGetCapbility ([AvCodecMime](Codec.md#ga1bee586eafa91dfb60f94ba40fc95faa) mime, [CodecType](Codec.md#ga03b4b6ae5fb82af68d46aaea3d3e4d79) type, uint32_t flags, [CodecCapbility](Codec.md#ga1876710b1f2fe1d80e8b9de9ff28e0e3) * cap ) -``` - -**Description:** - -Obtains the capabilities of a specified media type. - -You can call this function to obtain the codec capabilities. The corresponding capabilities are described in the **Capability** structure, including the maximum and minimum resolutions, maximum and minimum bit rates, and supported profiles and levels. After obtaining the capabilities, determine whether they can meet your requirements, for example, whether specific media files can be played and whether audio and video frames can be compressed. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-

mime

-

Indicates the media type. For details, see AvCodecMime.

-

type

-

Indicates the audio and video codec types. For details, see CodecType.

-

flags

-

Indicates the audio and video codec flags. 0 indicates hardware codec, and 1 indicates software codec.

-

cap

-

Indicates the pointer to the capabilities.

-
- -**Returns:** - -Returns **0** if the codec is supported and capabilities are available; returns a non-zero value if the codec is not supported or the capabilities are unavailable. - -## CodecGetParameter\(\) - -``` -int32_t CodecGetParameter ([CODEC_HANDLETYPE](Codec.md#ga9381a619f36ac8d5d7f467d2f0404183) handle, [Param](Param.md) * params, int paramCnt ) -``` - -**Description:** - -Obtains parameters from a codec component. - -This function must be called after [CodecCreate](Codec.md#ga74aa0395a51f004390f7a92fb68faddd). - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-

handle

-

Indicates the handle of the codec component.

-

params

-

Indicates the pointer to the parameters in the array used when the component is created.

-

paramCnt

-

Indicates the number of elements in the parameter array.

-
- -**Returns:** - -Returns **0** if all parameters to obtain are supported; returns a non-zero value otherwise. - -**See also:** - -[CodecSetParameter](Codec.md#gaa080cf23aa5f77b30f3b90a026d97cc0) - -## CodecInit\(\) - -``` -int32_t CodecInit () -``` - -**Description:** - -Initializes the internal audio and video submodules of the codec. - -This function needs to be called only once in a process. - -**Returns:** - -Returns **0** if the initialization is successful; returns a non-zero value otherwise. - -**See also:** - -[CodecDeinit](Codec.md#ga2d6eb231ca7766990cfa8c1841637245) - -## CodecQueueInput\(\) - -``` -int32_t CodecQueueInput ([CODEC_HANDLETYPE](Codec.md#ga9381a619f36ac8d5d7f467d2f0404183) handle, const [InputInfo](InputInfo.md) * inputData, uint32_t timeoutMs ) -``` - -**Description:** - -Queues input data. - -This function works with [CodecDequeInput](Codec.md#ga91d7e1566c90d7cb9ac846eecad0024f) to implement input data transmission. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-

handle

-

Indicates the handle of the codec component.

-

inputData

-

Indicates the pointer to the input data.

-

timeoutMs

-

Indicates the timeout duration.

-
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## CodecQueueOutput\(\) - -``` -int32_t CodecQueueOutput ([CODEC_HANDLETYPE](Codec.md#ga9381a619f36ac8d5d7f467d2f0404183) handle, [OutputInfo](OutputInfo.md) * outInfo, uint32_t timeoutMs, int releaseFenceFd ) -``` - -**Description:** - -Queues output data. - -This function works with [CodecDequeueOutput](Codec.md#gab575752467517eb8e6766773c1e3fb23) to implement output data transmission. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-

handle

-

Indicates the handle of the codec component.

-

outInfo

-

Indicates the pointer to the output data.

-

timeoutMs

-

Indicates the timeout duration.

-

releaseFenceFd

-

Indicates that the descriptor comes from a buffer consumer. The output data can be used only after waiting for releaseFenceFd is successful. The value -1 indicates that releaseFenceFd is invalid.

-
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## CodecSetCallback\(\) - -``` -int32_t CodecSetCallback ([CODEC_HANDLETYPE](Codec.md#ga9381a619f36ac8d5d7f467d2f0404183) handle, const [CodecCallback](CodecCallback.md) * cb, [UINTPTR](Codec.md#ga58d2f4a8d12daa1dcf4eb297f3ebaabc) instance ) -``` - -**Description:** - -Sets the callback function. - -The codec uses the callback function to notify the upper layer of events and asynchronously report available input/output information. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-

handle

-

Indicates the handle of the codec component.

-

cb

-

Indicates the pointer to the callback function. For details, see CodecCallback.

-

instance

-

Indicates the upper-layer instance to be notified.

-
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## CodecSetParameter\(\) - -``` -int32_t CodecSetParameter ([CODEC_HANDLETYPE](Codec.md#ga9381a619f36ac8d5d7f467d2f0404183) handle, const [Param](Param.md) * params, int paramCnt ) -``` - -**Description:** - -Sets parameters required by a codec component. - -You should call this function to set parameters after [CodecCreate](Codec.md#ga74aa0395a51f004390f7a92fb68faddd) is called but before [CodecStart](Codec.md#ga38c1744b0b4be5817ef49556ae665d18) is called. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-

handle

-

Indicates the handle of the codec component.

-

params

-

Indicates the pointer to the parameters to set in the array.

-

paramCnt

-

Indicates the number of elements in the parameter array.

-
- -**Returns:** - -Returns **0** if the setting is successful; returns a non-zero value otherwise. - -**See also:** - -[CodecGetParameter](Codec.md#ga1d812eac032e3e05cf5bf71b03e93f65) - -## CodecSetPortMode\(\) - -``` -int32_t CodecSetPortMode ([CODEC_HANDLETYPE](Codec.md#ga9381a619f36ac8d5d7f467d2f0404183) handle, [DirectionType](Codec.md#ga8ef30fa9c08e08c8706653571f9f5b81) type, [BufferMode](Codec.md#gacc0fd55192fd9f663121b037b06f41e8) mode ) -``` - -**Description:** - -Sets the input or output buffer mode. - -You can learn about the support of the codec input/output buffer for internal and external buffer modes by calling [CodecGetCapbility](Codec.md#ga1a6fbf6e84e01fdc1af59caa4203ce8e). In this way, you can determine whether to use an internal or external buffer mode. If the current codec can use only the specific buffer mode, you do not need to set it. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-

handle

-

Indicates the handle of the codec component.

-

type

-

Specifies whether the buffer type is an input type or an output type.

-

mode

-

Specifies whether to use an internal or external buffer mode.

-
- -**Returns:** - -Returns **0** if the setting is successful; returns a non-zero value otherwise. - -## CodecStart\(\) - -``` -int32_t CodecStart ([CODEC_HANDLETYPE](Codec.md#ga9381a619f36ac8d5d7f467d2f0404183) handle) -``` - -**Description:** - -Starts a codec component. - -You can restart a component after it is stopped. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-

handle

-

Indicates the handle of the codec component.

-
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## CodecStop\(\) - -``` -int32_t CodecStop ([CODEC_HANDLETYPE](Codec.md#ga9381a619f36ac8d5d7f467d2f0404183) handle) -``` - -**Description:** - -Stops a codec component. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-

handle

-

Indicates the handle of the codec component.

-
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - diff --git a/api/api-SmartVision-Devices/CodecBufferInfo.md b/api/api-SmartVision-Devices/CodecBufferInfo.md deleted file mode 100755 index 0369e5d32fd19354053b0d12ff19fe5bac8c70b6..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/CodecBufferInfo.md +++ /dev/null @@ -1,154 +0,0 @@ -# CodecBufferInfo - -- [Overview](#section299982411165630) -- [Summary](#section1801142375165630) -- [Data Fields](#pub-attribs) -- [Details](#section1041610524165630) -- [Field](#section1222816335165630) -- [addr](#ac41289afc743bdc85b266166d612e244) -- [fd](#a8cad2128f76788aed9de86e69e78dd15) -- [handle](#a11122e64c16864ce1d8129102905982a) -- [length](#ac179611206a69c89d7c638e221ea159d) -- [offset](#a6c0b23a5f242d80924f2e8689c83b3ae) -- [size](#a9f02e97d2724dd93324d8e70793357b4) -- [type](#a9b30909c247d03dfc94e4cfdcb69b13a) - -## **Overview** - -**Related Modules:** - -[Codec](Codec.md) - -**Description:** - -Describes buffer information. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

type

-

BufferType

-
  

union {

-
  

uint8_t * addr

-
  

int32_t fd

-
  

BufferHandle handle

-
  

};

-

Describes the buffer address.

-

offset

-

uint32_t

-

length

-

uint32_t

-

size

-

uint32_t

-
- -## **Details** - -## **Field ** - -## addr - -``` -uint8_t* CodecBufferInfo::addr -``` - - **Description:** - -Virtual address - -## fd - -``` -int32_t CodecBufferInfo::fd -``` - - **Description:** - -File descriptor - -## handle - -``` -[BufferHandle](BufferHandle.md) CodecBufferInfo::handle -``` - - **Description:** - -Data handle. For details, see [BufferHandle](BufferHandle.md) - -## length - -``` -uint32_t CodecBufferInfo::length -``` - - **Description:** - -Length of valid data - -## offset - -``` -uint32_t CodecBufferInfo::offset -``` - - **Description:** - -Buffer offset - -## size - -``` -uint32_t CodecBufferInfo::size -``` - - **Description:** - -Total size of buffer blocks - -## type - -``` -[BufferType](Codec.md#gadf8e136713c0691010d2bec6ba63e9cf) CodecBufferInfo::type -``` - - **Description:** - -Buffer type - diff --git a/api/api-SmartVision-Devices/CodecCallback.md b/api/api-SmartVision-Devices/CodecCallback.md deleted file mode 100755 index 93f462ae47b440f3f3a4640e5b12bc340b678810..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/CodecCallback.md +++ /dev/null @@ -1,177 +0,0 @@ -# CodecCallback - -- [Overview](#section1117951861165631) -- [Summary](#section1269918023165631) -- [Data Fields](#pub-attribs) -- [Details](#section1278003397165631) -- [Field](#section1513699407165631) -- [InputBufferAvailable](#a97ba05617547d79b459bfed6172b4d75) -- [OnEvent](#a039d0a4af8c4e3d10f49426d46f0b0f3) -- [OutputBufferAvailable](#ad99eedd9953bdf22e426a181b08b8d0d) - -## **Overview** - -**Related Modules:** - -[Codec](Codec.md) - -**Description:** - -Defines callbacks and their parameters. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

OnEvent )(UINTPTR comp, UINTPTR appData, EventType event, uint32_t data1, uint32_t data2, UINTPTR eventData)

-

int(*

-

Reports an event.

-

InputBufferAvailable )(UINTPTR comp, UINTPTR appData, InputInfo *inBuf)

-

int(*

-

Reports that the input data has been used.

-

OutputBufferAvailable )(UINTPTR comp, UINTPTR appData, OutputInfo *outBuf)

-

int(*

-

Reports that the output is complete.

-
- -## **Details** - -## **Field ** - -## InputBufferAvailable - -``` -int(* CodecCallback::InputBufferAvailable) ([UINTPTR](Codec.md#ga58d2f4a8d12daa1dcf4eb297f3ebaabc) comp, [UINTPTR](Codec.md#ga58d2f4a8d12daa1dcf4eb297f3ebaabc) appData, [InputInfo](InputInfo.md) *inBuf) -``` - - **Description:** - -Reports that the input data has been used. - -This callback is invoked in asynchronous mode. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
hComponentIndicates the handle of the codec component.
pAppDataIndicates upper-layer data, which is generally an upper-layer instance passed when this callback is set.
pBufferIndicates the pointer to the input data that has been used.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## OnEvent - -``` -int(* CodecCallback::OnEvent) ([UINTPTR](Codec.md#ga58d2f4a8d12daa1dcf4eb297f3ebaabc) comp, [UINTPTR](Codec.md#ga58d2f4a8d12daa1dcf4eb297f3ebaabc) appData, [EventType](Codec.md#ga2628ea8d12e8b2563c32f05dc7fff6fa) event, uint32_t data1, uint32_t data2, [UINTPTR](Codec.md#ga58d2f4a8d12daa1dcf4eb297f3ebaabc) eventData) -``` - - **Description:** - -Reports an event. - -Reports event errors and output format changes. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
hComponentIndicates the handle of the codec component.
pAppDataIndicates upper-layer data, which is generally an upper-layer instance passed when this callback is set.
EVENTTYPEIndicates the event type.
nData1Indicates the first value contained in the reported event. This parameter is optional.
nData2Indicates the second value contained in the reported event. This parameter is optional.
pEventDataIndicates the pointer to data contained in the reported event. This parameter is optional.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## OutputBufferAvailable - -``` -int(* CodecCallback::OutputBufferAvailable) ([UINTPTR](Codec.md#ga58d2f4a8d12daa1dcf4eb297f3ebaabc) comp, [UINTPTR](Codec.md#ga58d2f4a8d12daa1dcf4eb297f3ebaabc) appData, [OutputInfo](OutputInfo.md) *outBuf) -``` - - **Description:** - -Reports that the output is complete. - -This callback is invoked in asynchronous mode. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
hComponentIndicates the handle of the codec component.
pAppDataIndicates upper-layer data, which is generally an upper-layer instance passed when this callback is registered.
pBufferIndicates the pointer to the output data that has been generated.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - diff --git a/api/api-SmartVision-Devices/CommonDeviceInfo.md b/api/api-SmartVision-Devices/CommonDeviceInfo.md deleted file mode 100755 index 09b1ef1d56fedbc073dfb7a807509beb44c2a475..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/CommonDeviceInfo.md +++ /dev/null @@ -1,40 +0,0 @@ -# CommonDeviceInfo - -- [Overview](#section1323230286165631) -- [Summary](#section398798430165631) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[Softbus](Softbus.md) - -**Description:** - -Defines the type and content of a device to set. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

key

-

CommonDeviceKey

-

value

-

const char *

-
- diff --git a/api/api-SmartVision-Devices/ConnetResult.md b/api/api-SmartVision-Devices/ConnetResult.md deleted file mode 100755 index eeaf6a5bda421a12de137e8bc9b76acb31d1744b..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/ConnetResult.md +++ /dev/null @@ -1,74 +0,0 @@ -# ConnetResult - -- [Overview](#section116830627165631) -- [Summary](#section1318708684165631) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Defines association results. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

bssid [ETH_ADDR_LEN]

-

uint8_t

-

statusCode

-

uint16_t

-

rspIe

-

uint8_t *

-

reqIe

-

uint8_t *

-

reqIeLen

-

uint32_t

-

rspIeLen

-

uint32_t

-

connectStatus

-

uint16_t

-

freq

-

uint16_t

-
- diff --git a/api/api-SmartVision-Devices/Consumer.md b/api/api-SmartVision-Devices/Consumer.md deleted file mode 100755 index cf9dbce1c8564d255f109b19122da0a66d70044e..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Consumer.md +++ /dev/null @@ -1,133 +0,0 @@ -# Consumer - -- [Overview](#section232136428165631) -- [Summary](#section430934111165631) -- [Data Fields](#pub-attribs) -- [Details](#section304163631165631) -- [Field](#section1026643206165631) -- [Equal](#a38ab45549e981dc8c8c0a90883a6bac8) -- [identity](#ac6e98b3361e6be922804e8c459fe303b) -- [Notify](#a57b8ea7ff05c30832af06804a0526765) - -## **Overview** - -**Related Modules:** - -[Broadcast](Broadcast.md) - -**Description:** - -Defines the topic consumer used to receive events and push data. You need to implement this struct for your application. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

identity

-

const Identity *

-

Notify )(Consumer *consumer, const Topic *topic, const Request *origin)

-

void(*

-

Defines how the consumer will process the events or data of a released topic.

-

Equal )(const Consumer *current, const Consumer *other)

-

BOOL(*

-

Checks whether two consumers are equal.

-
- -## **Details** - -## **Field ** - -## Equal - -``` -BOOL(* Consumer::Equal) (const [Consumer](Consumer.md) *current, const [Consumer](Consumer.md) *other) -``` - - **Description:** - -Checks whether two consumers are equal. - -You need to implement this function to prevent repeated topic subscription. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
currentIndicates the pointer to the current consumer.
otherIndicates the pointer to the target consumer to compare.
- -**Returns:** - -Returns **TRUE** if the two consumers are equal; returns **FALSE** otherwise. - -## identity - -``` -const [Identity](Identity.md)* Consumer::identity -``` - - **Description:** - -[Consumer](Consumer.md) ID - -## Notify - -``` -void(* Consumer::Notify) ([Consumer](Consumer.md) *consumer, const [Topic](Broadcast.md#gaf03f5bc94cad32ab628a6cdee09b0542) *topic, const [Request](Request.md) *origin) -``` - - **Description:** - -Defines how the consumer will process the events or data of a released topic. - -You can implement this function for consumers to process topics associated with the them. Note that the passed topic must have been subscribed by the consumer. Otherwise, the function does nothing. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
consumerIndicates this pointer of the consumer.
topicIndicates the pointer to the topic to be processed.
originIndicates the pointer to the data to be processed.
- diff --git a/api/api-SmartVision-Devices/Core.md b/api/api-SmartVision-Devices/Core.md deleted file mode 100755 index 7b39462bc0a3d3ccf897c49b3d7b9a78ac8af986..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Core.md +++ /dev/null @@ -1,1868 +0,0 @@ -# Core - -- [Overview](#section1091526830165623) -- [Summary](#section1644000024165623) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Macros](#define-members) -- [Typedefs](#typedef-members) -- [Enumerations](#enum-members) -- [Functions](#func-members) -- [Details](#section642258245165623) -- [Macro Definition](#section917737689165623) -- [HDF\_INIT](#ga99831072fdca13e3c423a14fa6a83c34) -- [Typedef](#section1250679194165623) -- [OnEventReceived](#gae314b850ba4b0927007038cf8cc32580) -- [Enumeration Type](#section1155043563165623) -- [DevicePreload](#ga0f3d81b5ff5d3896f7d8cf15f76b451e) -- [ServicePolicy](#ga172844da8a6908bf7226eee703ad9f80) -- [Function](#section692951378165623) -- [DevSvcManagerClntGetService\(\)](#gab28c6481fc79bd055e2551abebb841bf) -- [HdfDeviceGetServiceName\(\)](#gac899589dfa47b45f43b8dd027b65b5d9) -- [HdfDeviceRegisterEventListener\(\)](#gaa7855b3930b5378954927548e5623663) -- [HdfDeviceSendEvent\(\)](#gac9670df1316b5ddd651a50ebee0b6557) -- [HdfDeviceSendEventToClient\(\)](#ga9c47da8d82820bce2d32051324480f45) -- [HdfDeviceSubscribeService\(\)](#ga224908f55daa1b9553841735e5f1f65c) -- [HdfDeviceUnregisterEventListener\(\)](#gab95668359f0b6a47f48c47541caed7fd) -- [HdfIoServiceBind\(\)](#ga31198b68423805193274d3973c178ab5) -- [HdfIoServiceRecycle\(\)](#gada2867af690aac9e6c3b2c8812b3037c) -- [HdfSBufBind\(\)](#gabcc9a442a3b2615828d60a1d4664b4a9) -- [HdfSBufCopy\(\)](#ga406275df686ff556fd5bdb20349e4972) -- [HdfSbufFlush\(\)](#ga2b7a5750bf42151edd7bd686fb11a39d) -- [HdfSbufGetCapacity\(\)](#ga74941de5883ae39cb6103591f67dbea0) -- [HdfSbufGetData\(\)](#ga3f4f5fdb03f64c23f318ecf7c602ac59) -- [HdfSbufGetDataSize\(\)](#gaf983c174acfb5b1f8f9dc5b6c2f52e0d) -- [HdfSBufMove\(\)](#ga22d4a953c89a941337e593647ebe2f5b) -- [HdfSBufObtain\(\)](#ga5e3dee8b1a2128da70cc5718b631c8ba) -- [HdfSBufObtainDefaultSize\(\)](#ga479315c09d0d927aa211de829388122d) -- [HdfSbufReadBuffer\(\)](#ga345e8524a6cea44a0424e23b8f659792) -- [HdfSbufReadInt16\(\)](#ga3fce62cbc34a70259d21399d5ff91b32) -- [HdfSbufReadInt32\(\)](#ga22e7b97735f54e57c0d3bed2fa3a47c4) -- [HdfSbufReadInt64\(\)](#ga7fb121b4351f85e1735c6e63a5c951cc) -- [HdfSbufReadInt8\(\)](#gafff778f76f9142602ef25e8afff47c83) -- [HdfSbufReadString\(\)](#gab03aa25c90fda50138496b0f874a664e) -- [HdfSbufReadUint16\(\)](#gabc151ad38bdecd5589623a6298c31930) -- [HdfSbufReadUint32\(\)](#gac953788575b0c22947f18fa9f19a5bf5) -- [HdfSbufReadUint64\(\)](#gabb10a71c031d3633c5745ba6fd62b0a4) -- [HdfSbufReadUint8\(\)](#ga07d93e6bcd8a6a8646067783d6f46e74) -- [HdfSBufRecycle\(\)](#gaa0041d238cfc7cf00779191aa58e7ee0) -- [HdfSbufTransDataOwnership\(\)](#gaf391e9f47cc668daf3150c00f369bf1f) -- [HdfSbufWriteBuffer\(\)](#ga567eb533aa53051d0beec43f08e72dd8) -- [HdfSbufWriteInt16\(\)](#gaaa278bf9aa182a4c65c390c6c9ff06d2) -- [HdfSbufWriteInt32\(\)](#ga3913510d670da2f8ffa3103b5ff293f1) -- [HdfSbufWriteInt64\(\)](#ga7c63eb006b19e2aac43c23318c4ebe3b) -- [HdfSbufWriteInt8\(\)](#gac514c3debd605043ad1bfa9c05a115a0) -- [HdfSbufWriteString\(\)](#gaf782f8a08dcd81f4038ab9d9bbc1cf9b) -- [HdfSbufWriteUint16\(\)](#ga31c9edfd9b20d6e44d34839efa0e08f7) -- [HdfSbufWriteUint32\(\)](#ga23f2331cdfb0bf91a29f47f20ffd50df) -- [HdfSbufWriteUint64\(\)](#ga164de95ad00302b599290bdb476a032f) -- [HdfSbufWriteUint8\(\)](#gafb4fe74246f85a158c140bf4c4951256) - -## **Overview** - -**Description:** - -Provides OpenHarmony Driver Foundation \(HDF\) APIs. - -The HDF implements driver framework capabilities such as driver loading, service management, and driver message model. You can develop drivers based on the HDF. - -**Since:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - - - - - - - - - - -

File Name

-

Description

-

hdf_device_desc.h

-

Declares functions related to driver loading, service obtaining, and power management.

-

hdf_io_service_if.h

-

Declares the structures defining driver service objects and event listeners, as well as the functions for obtaining a driver service object, dispatching a driver service call, and registering or unregistering an event listener.

-

hdf_object.h

-

Declares the base object provided by the HDF for the driver.

-

hdf_sbuf.h

-

Defines functions related to a HdfSBuf. The HDF provides data serialization and deserialization capabilities for data transmission between user-mode applications and kernel-mode drivers.

-
- -## Data Structures - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

HdfDeviceObject

-

Defines the device object.

-

HdfDeviceIoClient

-

Defines the client object structure of the I/O service.

-

IDeviceIoService

-

Defines the driver service.

-

SubscriberCallback

-

Called when the driver subscribes to other driver services.

-

IPowerEventListener

-

Defines the power management functions provided by the HDF for the driver.

-

HdfDriverEntry

-

Defines the entry structure of the driver in the HDF.

-

HdfDevEventlistener

-

Defines a driver event listener object.

-

HdfIoDispatcher

-

Defines a driver service call dispatcher.

-

HdfIoService

-

Defines a driver service object.

-

HdfObject

-

Describes base class objects defined by the HDF.

-

HdfSBuf

-

Defines a HdfSBuf.

-
- -## Macros - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

MAX_PRIORITY_NUM 200

-

The maximum priority for loading the host and device.

-

HDF_INIT(module) HDF_DRIVER_INIT(module)

-

Registers the driver with the HDF.

-
- -## Typedefs - - - - - - - - - - -

Typedef Name

-

Description

-

OnEventReceived) (void *priv, uint32_t id, struct HdfSBuf *data)

-

typedef int(*

-

Called when a driver event occurs.

-
- -## Enumerations - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

ServicePolicy { SERVICE_POLICY_NONE = 0, SERVICE_POLICY_PUBLIC, SERVICE_POLICY_CAPACITY, SERVICE_POLICY_FRIENDLY, SERVICE_POLICY_PRIVATE, SERVICE_POLICY_INVALID }

-

Enumerates policies for releasing driver services developed based on the HDF.

-

DevicePreload { DEVICE_PRELOAD_ENABLE = 0, DEVICE_PRELOAD_DISABLE, DEVICE_PRELOAD_INVALID }

-

Enumerates driver loading policies.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

DevSvcManagerClntGetService (const char *svcName)

-

const struct HdfObject *

-

Obtains the driver service object based on a driver service name.

-

HdfDeviceGetServiceName (const struct HdfDeviceObject *deviceObject)

-

const char *

-

Obtains the service name of a driver.

-

HdfDeviceSubscribeService (struct HdfDeviceObject *deviceObject, const char *serviceName, struct SubscriberCallback callback)

-

int32_t

-

Subscribes to a driver service.

-

HdfDeviceSendEvent (const struct HdfDeviceObject *deviceObject, uint32_t id, const struct HdfSBuf *data)

-

int32_t

-

Sends event messages.

-

HdfDeviceSendEventToClient (const struct HdfDeviceIoClient *client, uint32_t id, const struct HdfSBuf *data)

-

int32_t

-

Sends an event message to a specified client object.

-

HdfIoServiceBind (const char *serviceName)

-

struct HdfIoService *

-

Obtains a driver service object.

-

HdfIoServiceRecycle (struct HdfIoService *service)

-

void

-

Destroys a specified driver service object to release resources if it is no longer required.

-

HdfDeviceRegisterEventListener (struct HdfIoService *target, struct HdfDevEventlistener *listener)

-

int

-

Registers a custom HdfDevEventlistener for listening for events reported by a specified driver service object.

-

HdfDeviceUnregisterEventListener (struct HdfIoService *target, struct HdfDevEventlistener *listener)

-

int

-

Unregisters a previously registered HdfDevEventlistener to release resources if it is no longer required.

-

HdfSbufWriteBuffer (struct HdfSBuf *sbuf, const void *data, uint32_t writeSize)

-

bool

-

Writes a data segment to a SBuf.

-

HdfSbufWriteUint64 (struct HdfSBuf *sbuf, uint64_t value)

-

bool

-

Writes a 64-bit unsigned integer to a SBuf.

-

HdfSbufWriteUint32 (struct HdfSBuf *sbuf, uint32_t value)

-

bool

-

Writes a 32-bit unsigned integer to a SBuf.

-

HdfSbufWriteUint16 (struct HdfSBuf *sbuf, uint16_t value)

-

bool

-

Writes a 16-bit unsigned integer to a SBuf.

-

HdfSbufWriteUint8 (struct HdfSBuf *sbuf, uint8_t value)

-

bool

-

Writes an 8-bit unsigned integer to a SBuf.

-

HdfSbufWriteInt64 (struct HdfSBuf *sbuf, int64_t value)

-

bool

-

Writes a 64-bit signed integer to a SBuf.

-

HdfSbufWriteInt32 (struct HdfSBuf *sbuf, int32_t value)

-

bool

-

Writes a 32-bit signed integer to a SBuf.

-

HdfSbufWriteInt16 (struct HdfSBuf *sbuf, int16_t value)

-

bool

-

Writes a 16-bit signed integer to a SBuf.

-

HdfSbufWriteInt8 (struct HdfSBuf *sbuf, int8_t value)

-

bool

-

Writes an 8-bit signed integer to a SBuf.

-

HdfSbufWriteString (struct HdfSBuf *sbuf, const char *value)

-

bool

-

Writes a string to a SBuf.

-

HdfSbufReadBuffer (struct HdfSBuf *sbuf, const void **data, uint32_t *readSize)

-

bool

-

Reads a data segment from a SBuf.

-

HdfSbufReadUint64 (struct HdfSBuf *sbuf, uint64_t *value)

-

bool

-

Reads a 64-bit unsigned integer from a SBuf.

-

HdfSbufReadUint32 (struct HdfSBuf *sbuf, uint32_t *value)

-

bool

-

Reads a 32-bit unsigned integer from a SBuf.

-

HdfSbufReadUint16 (struct HdfSBuf *sbuf, uint16_t *value)

-

bool

-

Reads a 16-bit unsigned integer from a SBuf.

-

HdfSbufReadUint8 (struct HdfSBuf *sbuf, uint8_t *value)

-

bool

-

Reads an 8-bit unsigned integer from a SBuf.

-

HdfSbufReadInt64 (struct HdfSBuf *sbuf, int64_t *value)

-

bool

-

Reads a 64-bit signed integer from a SBuf.

-

HdfSbufReadInt32 (struct HdfSBuf *sbuf, int32_t *value)

-

bool

-

Reads a 32-bit signed integer from a SBuf.

-

HdfSbufReadInt16 (struct HdfSBuf *sbuf, int16_t *value)

-

bool

-

Reads a 16-bit signed integer from a SBuf.

-

HdfSbufReadInt8 (struct HdfSBuf *sbuf, int8_t *value)

-

bool

-

Reads an 8-bit signed integer from a SBuf.

-

HdfSbufReadString (struct HdfSBuf *sbuf)

-

const char *

-

Reads a string from a SBuf.

-

HdfSbufGetData (const struct HdfSBuf *sbuf)

-

uint8_t *

-

Obtains the pointer to the data stored in aSBuf.

-

HdfSbufFlush (struct HdfSBuf *sbuf)

-

void

-

Clears the data stored in a SBuf.

-

HdfSbufGetCapacity (const struct HdfSBuf *sbuf)

-

size_t

-

Obtains the capacity of a SBuf.

-

HdfSbufGetDataSize (const struct HdfSBuf *sbuf)

-

size_t

-

Obtains the size of the data stored in a SBuf.

-

HdfSBufObtain (size_t capacity)

-

struct HdfSBuf *

-

Obtains a SBuf instance.

-

HdfSBufObtainDefaultSize (void)

-

struct HdfSBuf *

-

Obtains a SBuf instance of the default capacity (256 bytes).

-

HdfSBufBind (uintptr_t base, size_t size)

-

struct HdfSBuf *

-

Creates a SBuf instance with the specified data and size. The pointer to the data stored in the SBuf is released by the caller, and the written data size should not exceed the specified value of size.

-

HdfSBufRecycle (struct HdfSBuf *sbuf)

-

void

-

Releases a SBuf .

-

HdfSBufMove (struct HdfSBuf *sbuf)

-

struct HdfSBuf *

-

Creates a SBuf instance with an original SBuf. This function moves the data stored in the original SBuf to the new one without memory copy.

-

HdfSBufCopy (const struct HdfSBuf *sbuf)

-

struct HdfSBuf *

-

Creates a SBuf instance with an original SBuf. This function copies the data stored in the original SBuf to the new one.

-

HdfSbufTransDataOwnership (struct HdfSBuf *sbuf)

-

void

-

Transfers the data ownership to a SBuf. Once the SBuf is released, the bound data memory is also released. This function is used together with HdfSBufBind.

-
- -## **Details** - -## **Macro Definition ** - -## HDF\_INIT - -``` -#define HDF_INIT( module) HDF_DRIVER_INIT(module) -``` - - **Description:** - -Registers the driver with the HDF. - -For a driver developed based on the HDF, [HDF\_INIT](Core.md#ga99831072fdca13e3c423a14fa6a83c34) must be used to register an entry with the HDF, and the registered object must be of the [HdfDriverEntry](HdfDriverEntry.md) type. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
moduleIndicates the global variable of the HdfDriverEntry type
- -## **Typedef ** - -## OnEventReceived - -``` -typedef int(* OnEventReceived) (void *priv, uint32_t id, struct [HdfSBuf](HdfSBuf.md) *data) -``` - - **Description:** - -Called when a driver event occurs. - -You can implement this function and bind it to the custom [HdfDevEventlistener](HdfDevEventlistener.md) object. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
privIndicates the pointer to the private data bound to this listener.
idIndicates the serial number of the driver event occurred.
dataIndicates the pointer to the content data of the driver event.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value otherwise. - -## **Enumeration Type ** - -## DevicePreload - -``` -enum [DevicePreload](Core.md#ga0f3d81b5ff5d3896f7d8cf15f76b451e) -``` - - **Description:** - -Enumerates driver loading policies. - -If a driver developed based on the HDF needs to use the on-demand loading mechanism in the HDF, the **PRELOAD** field must be correctly set in the driver configuration information to control the driver loading mode. - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
DEVICE_PRELOAD_ENABLE

The driver is loaded during system startup by default.

-
DEVICE_PRELOAD_DISABLE

The driver is not loaded during system startup by default.

-
DEVICE_PRELOAD_INVALID

The loading policy is incorrect.

-
- -## ServicePolicy - -``` -enum [ServicePolicy](Core.md#ga172844da8a6908bf7226eee703ad9f80) -``` - - **Description:** - -Enumerates policies for releasing driver services developed based on the HDF. - -If a driver is developed based on the HDF and uses the service management feature of the HDF, you need to configure the policy for releasing services to external systems. - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
SERVICE_POLICY_NONE

The driver does not provide services externally.

-
SERVICE_POLICY_PUBLIC

The driver provides services for kernel-level applications.

-
SERVICE_POLICY_CAPACITY

The driver provides services for both kernel- and user-level applications.

-
SERVICE_POLICY_FRIENDLY

Driver services are not released externally but can be subscribed to.

-
SERVICE_POLICY_PRIVATE

Driver services are only internally available. They are not released externally and cannot be subscribed to by external users.

-
SERVICE_POLICY_INVALID

The service policy is incorrect.

-
- -## **Function ** - -## DevSvcManagerClntGetService\(\) - -``` -const struct [HdfObject](HdfObject.md)* DevSvcManagerClntGetService (const char * svcName) -``` - - **Description:** - -Obtains the driver service object based on a driver service name. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
serviceNameIndicates the pointer to the released driver service name.
- -**Returns:** - -Returns the driver service object if the operation is successful; returns **NULL** otherwise. - -## HdfDeviceGetServiceName\(\) - -``` -const char* HdfDeviceGetServiceName (const struct [HdfDeviceObject](HdfDeviceObject.md) * deviceObject) -``` - - **Description:** - -Obtains the service name of a driver. - -If a driver does not save its service name, it can use this function to obtain the service name. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
deviceObjectIndicates the pointer to the driver device object.
- -**Returns:** - -Returns the service name if the operation is successful; returns **NULL** otherwise. - -## HdfDeviceRegisterEventListener\(\) - -``` -int HdfDeviceRegisterEventListener (struct [HdfIoService](HdfIoService.md) * target, struct [HdfDevEventlistener](HdfDevEventlistener.md) * listener ) -``` - - **Description:** - -Registers a custom [HdfDevEventlistener](HdfDevEventlistener.md) for listening for events reported by a specified driver service object. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
targetIndicates the pointer to the driver service object to listen, which is obtained through the HdfIoServiceBind function.
listenerIndicates the pointer to the listener to register.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value otherwise. - -## HdfDeviceSendEvent\(\) - -``` -int32_t HdfDeviceSendEvent (const struct [HdfDeviceObject](HdfDeviceObject.md) * deviceObject, uint32_t id, const struct [HdfSBuf](HdfSBuf.md) * data ) -``` - - **Description:** - -Sends event messages. - -When the driver service invokes this function to send a message, all user-level applications that have registered listeners through [HdfDeviceRegisterEventListener](Core.md#gaa7855b3930b5378954927548e5623663) will receive the message. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
deviceObjectIndicates the pointer to the driver device object.
idIndicates the ID of the message sending event.
dataIndicates the pointer to the message content sent by the driver.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## HdfDeviceSendEventToClient\(\) - -``` -int32_t HdfDeviceSendEventToClient (const struct [HdfDeviceIoClient](HdfDeviceIoClient.md) * client, uint32_t id, const struct [HdfSBuf](HdfSBuf.md) * data ) -``` - - **Description:** - -Sends an event message to a specified client object. - -When the driver service invokes this function to send a message, the user-level applications that have registered listeners through [HdfDeviceRegisterEventListener](Core.md#gaa7855b3930b5378954927548e5623663) and correspond to this client object will receive the message. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
clientIndicates the pointer to the client object of the driver service.
idIndicates the ID of the message sending event.
dataIndicates the pointer to the message content sent by the driver.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## HdfDeviceSubscribeService\(\) - -``` -int32_t HdfDeviceSubscribeService (struct [HdfDeviceObject](HdfDeviceObject.md) * deviceObject, const char * serviceName, struct [SubscriberCallback](SubscriberCallback.md) callback ) -``` - - **Description:** - -Subscribes to a driver service. - -If the driver loading time is not perceived, this function can be used to subscribe to the driver service. \(The driver service and the subscriber must be on the same host.\) After the subscribed-to driver service is loaded by the HDF, the framework proactively releases the service interface to the subscriber. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
deviceObjectIndicates the pointer to the driver device object of the subscriber.
serviceNameIndicates the pointer to the driver service name.
callbackIndicates the callback invoked by the HDF after the subscribed-to driver service is loaded.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## HdfDeviceUnregisterEventListener\(\) - -``` -int HdfDeviceUnregisterEventListener (struct [HdfIoService](HdfIoService.md) * target, struct [HdfDevEventlistener](HdfDevEventlistener.md) * listener ) -``` - - **Description:** - -Unregisters a previously registered [HdfDevEventlistener](HdfDevEventlistener.md) to release resources if it is no longer required. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
targetIndicates the pointer to the driver service object that has been listened.
listenerIndicates the listener object registered by HdfDeviceRegisterEventListener.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value otherwise. - -## HdfIoServiceBind\(\) - -``` -struct [HdfIoService](HdfIoService.md)* HdfIoServiceBind (const char * serviceName) -``` - - **Description:** - -Obtains a driver service object. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
serviceNameIndicates the pointer to the name of the service to obtain.
- -**Returns:** - -Returns the pointer to the driver service object if the operation is successful; returns **NULL** otherwise. - -## HdfIoServiceRecycle\(\) - -``` -void HdfIoServiceRecycle (struct [HdfIoService](HdfIoService.md) * service) -``` - - **Description:** - -Destroys a specified driver service object to release resources if it is no longer required. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
serviceIndicates the pointer to the driver service object to destroy.
- -## HdfSBufBind\(\) - -``` -struct [HdfSBuf](HdfSBuf.md)* HdfSBufBind (uintptr_t base, size_t size ) -``` - - **Description:** - -Creates a **SBuf** instance with the specified data and size. The pointer to the data stored in the **SBuf** is released by the caller, and the written data size should not exceed the specified value of **size**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
baseIndicates the base of the data to use.
sizeIndicates the size of the data to use.
- -**Returns:** - -Returns the **SBuf** instance. - -## HdfSBufCopy\(\) - -``` -struct [HdfSBuf](HdfSBuf.md)* HdfSBufCopy (const struct [HdfSBuf](HdfSBuf.md) * sbuf) -``` - - **Description:** - -Creates a **SBuf** instance with an original **SBuf**. This function copies the data stored in the original **SBuf** to the new one. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sbufIndicates the pointer to the original SBuf.
- -**Returns:** - -Returns the new **SBuf** instance. - -## HdfSbufFlush\(\) - -``` -void HdfSbufFlush (struct [HdfSBuf](HdfSBuf.md) * sbuf) -``` - - **Description:** - -Clears the data stored in a **SBuf**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sbufIndicates the pointer to the target SBuf.
- -## HdfSbufGetCapacity\(\) - -``` -size_t HdfSbufGetCapacity (const struct [HdfSBuf](HdfSBuf.md) * sbuf) -``` - - **Description:** - -Obtains the capacity of a **SBuf**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sbufIndicates the pointer to the target SBuf.
- -**Returns:** - -Returns the **SBuf** capacity. - -## HdfSbufGetData\(\) - -``` -uint8_t* HdfSbufGetData (const struct [HdfSBuf](HdfSBuf.md) * sbuf) -``` - - **Description:** - -Obtains the pointer to the data stored in a**SBuf**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sbufIndicates the pointer to the target SBuf.
- -**Returns:** - -Returns the pointer to the data stored in the target **SBuf**. - -## HdfSbufGetDataSize\(\) - -``` -size_t HdfSbufGetDataSize (const struct [HdfSBuf](HdfSBuf.md) * sbuf) -``` - - **Description:** - -Obtains the size of the data stored in a **SBuf**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sbufIndicates the pointer to the target SBuf.
- -**Returns:** - -Returns the data size. - -## HdfSBufMove\(\) - -``` -struct [HdfSBuf](HdfSBuf.md)* HdfSBufMove (struct [HdfSBuf](HdfSBuf.md) * sbuf) -``` - - **Description:** - -Creates a **SBuf** instance with an original **SBuf**. This function moves the data stored in the original **SBuf** to the new one without memory copy. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sbufIndicates the pointer to the original SBuf.
- -**Returns:** - -Returns the new **SBuf** instance. - -## HdfSBufObtain\(\) - -``` -struct [HdfSBuf](HdfSBuf.md)* HdfSBufObtain (size_t capacity) -``` - - **Description:** - -Obtains a **SBuf** instance. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
capacityIndicates the initial capacity of theSBuf.
- -**Returns:** - -Returns the **SBuf** instance. - -## HdfSBufObtainDefaultSize\(\) - -``` -struct [HdfSBuf](HdfSBuf.md)* HdfSBufObtainDefaultSize (void ) -``` - - **Description:** - -Obtains a **SBuf** instance of the default capacity \(256 bytes\). - -**Returns:** - -Returns the **SBuf** instance. - -## HdfSbufReadBuffer\(\) - -``` -bool HdfSbufReadBuffer (struct [HdfSBuf](HdfSBuf.md) * sbuf, const void ** data, uint32_t * readSize ) -``` - - **Description:** - -Reads a data segment from a **SBuf**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
sbufIndicates the pointer to the target SBuf.
dataIndicates the double pointer to the data read. The data read is stored in *data, which is requested by the caller. The memory pointed to by *data is managed by the SBuf and they share the same lifecycle.
readSizeIndicates the pointer to the size of the data read.
- -**Returns:** - -Returns **true** if the operation is successful; returns **false** otherwise. - -## HdfSbufReadInt16\(\) - -``` -bool HdfSbufReadInt16 (struct [HdfSBuf](HdfSBuf.md) * sbuf, int16_t * value ) -``` - - **Description:** - -Reads a 16-bit signed integer from a **SBuf**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sbufIndicates the pointer to the target SBuf.
valueIndicates the pointer to the 16-bit signed integer read, which is requested by the caller.
- -**Returns:** - -Returns **true** if the operation is successful; returns **false** otherwise. - -## HdfSbufReadInt32\(\) - -``` -bool HdfSbufReadInt32 (struct [HdfSBuf](HdfSBuf.md) * sbuf, int32_t * value ) -``` - - **Description:** - -Reads a 32-bit signed integer from a **SBuf**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sbufIndicates the pointer to the target SBuf.
valueIndicates the pointer to the 32-bit signed integer read, which is requested by the caller.
- -**Returns:** - -Returns **true** if the operation is successful; returns **false** otherwise. - -## HdfSbufReadInt64\(\) - -``` -bool HdfSbufReadInt64 (struct [HdfSBuf](HdfSBuf.md) * sbuf, int64_t * value ) -``` - - **Description:** - -Reads a 64-bit signed integer from a **SBuf**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sbufIndicates the pointer to the target SBuf.
valueIndicates the pointer to the 64-bit signed integer read, which is requested by the caller.
- -**Returns:** - -Returns **true** if the operation is successful; returns **false** otherwise. - -## HdfSbufReadInt8\(\) - -``` -bool HdfSbufReadInt8 (struct [HdfSBuf](HdfSBuf.md) * sbuf, int8_t * value ) -``` - - **Description:** - -Reads an 8-bit signed integer from a **SBuf**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sbufIndicates the pointer to the target SBuf.
valueIndicates the pointer to the 8-bit signed integer read, which is requested by the caller.
- -**Returns:** - -Returns **true** if the operation is successful; returns **false** otherwise. - -## HdfSbufReadString\(\) - -``` -const char* HdfSbufReadString (struct [HdfSBuf](HdfSBuf.md) * sbuf) -``` - - **Description:** - -Reads a string from a **SBuf**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sbufIndicates the pointer to the target SBuf.
- -**Returns:** - -Returns the pointer to the string read if the operation is successful; returns **NULL** otherwise. The memory pointed to by this pointer is managed by the **SBuf** and they share the same lifecycle. - -## HdfSbufReadUint16\(\) - -``` -bool HdfSbufReadUint16 (struct [HdfSBuf](HdfSBuf.md) * sbuf, uint16_t * value ) -``` - - **Description:** - -Reads a 16-bit unsigned integer from a **SBuf**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sbufIndicates the pointer to the target SBuf.
valueIndicates the pointer to the 16-bit unsigned integer read, which is requested by the caller.
- -**Returns:** - -Returns **true** if the operation is successful; returns **false** otherwise. - -## HdfSbufReadUint32\(\) - -``` -bool HdfSbufReadUint32 (struct [HdfSBuf](HdfSBuf.md) * sbuf, uint32_t * value ) -``` - - **Description:** - -Reads a 32-bit unsigned integer from a **SBuf**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sbufIndicates the pointer to the target SBuf.
valueIndicates the pointer to the 32-bit unsigned integer read, which is requested by the caller.
- -**Returns:** - -Returns **true** if the operation is successful; returns **false** otherwise. - -## HdfSbufReadUint64\(\) - -``` -bool HdfSbufReadUint64 (struct [HdfSBuf](HdfSBuf.md) * sbuf, uint64_t * value ) -``` - - **Description:** - -Reads a 64-bit unsigned integer from a **SBuf**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sbufIndicates the pointer to the target SBuf.
valueIndicates the pointer to the 64-bit unsigned integer read, which is requested by the caller.
- -**Returns:** - -Returns **true** if the operation is successful; returns **false** otherwise. - -## HdfSbufReadUint8\(\) - -``` -bool HdfSbufReadUint8 (struct [HdfSBuf](HdfSBuf.md) * sbuf, uint8_t * value ) -``` - - **Description:** - -Reads an 8-bit unsigned integer from a **SBuf**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sbufIndicates the pointer to the target SBuf.
valueIndicates the pointer to the 8-bit unsigned integer read, which is requested by the caller.
- -**Returns:** - -Returns **true** if the operation is successful; returns **false** otherwise. - -## HdfSBufRecycle\(\) - -``` -void HdfSBufRecycle (struct [HdfSBuf](HdfSBuf.md) * sbuf) -``` - - **Description:** - -Releases a **SBuf **. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sbufIndicates the pointer to the SBuf to release.
- -## HdfSbufTransDataOwnership\(\) - -``` -void HdfSbufTransDataOwnership (struct [HdfSBuf](HdfSBuf.md) * sbuf) -``` - - **Description:** - -Transfers the data ownership to a **SBuf**. Once the **SBuf** is released, the bound data memory is also released. This function is used together with [HdfSBufBind](Core.md#gabcc9a442a3b2615828d60a1d4664b4a9). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sbufIndicates the pointer to the target SBuf.
- -## HdfSbufWriteBuffer\(\) - -``` -bool HdfSbufWriteBuffer (struct [HdfSBuf](HdfSBuf.md) * sbuf, const void * data, uint32_t writeSize ) -``` - - **Description:** - -Writes a data segment to a **SBuf**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
sbufIndicates the pointer to the target SBuf.
dataIndicates the pointer to the data segment to write.
writeSizeIndicates the size of the data segment to write. The maximum value is 512 KB.
- -**Returns:** - -Returns **true** if the operation is successful; returns **false** otherwise. - -## HdfSbufWriteInt16\(\) - -``` -bool HdfSbufWriteInt16 (struct [HdfSBuf](HdfSBuf.md) * sbuf, int16_t value ) -``` - - **Description:** - -Writes a 16-bit signed integer to a **SBuf**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sbufIndicates the pointer to the target SBuf.
valueIndicates the 16-bit signed integer to write.
- -**Returns:** - -Returns **true** if the operation is successful; returns **false** otherwise. - -## HdfSbufWriteInt32\(\) - -``` -bool HdfSbufWriteInt32 (struct [HdfSBuf](HdfSBuf.md) * sbuf, int32_t value ) -``` - - **Description:** - -Writes a 32-bit signed integer to a **SBuf**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sbufIndicates the pointer to the target SBuf.
valueIndicates the 32-bit signed integer to write.
- -**Returns:** - -Returns **true** if the operation is successful; returns **false** otherwise. - -## HdfSbufWriteInt64\(\) - -``` -bool HdfSbufWriteInt64 (struct [HdfSBuf](HdfSBuf.md) * sbuf, int64_t value ) -``` - - **Description:** - -Writes a 64-bit signed integer to a **SBuf**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sbufIndicates the pointer to the target SBuf.
valueIndicates the 64-bit signed integer to write.
- -**Returns:** - -Returns **true** if the operation is successful; returns **false** otherwise. - -## HdfSbufWriteInt8\(\) - -``` -bool HdfSbufWriteInt8 (struct [HdfSBuf](HdfSBuf.md) * sbuf, int8_t value ) -``` - - **Description:** - -Writes an 8-bit signed integer to a **SBuf**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sbufIndicates the pointer to the target SBuf.
valueIndicates the 8-bit signed integer to write.
- -**Returns:** - -Returns **true** if the operation is successful; returns **false** otherwise. - -## HdfSbufWriteString\(\) - -``` -bool HdfSbufWriteString (struct [HdfSBuf](HdfSBuf.md) * sbuf, const char * value ) -``` - - **Description:** - -Writes a string to a **SBuf**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sbufIndicates the pointer to the target SBuf.
valueIndicates the pointer to the string to write.
- -**Returns:** - -Returns **true** if the operation is successful; returns **false** otherwise. - -## HdfSbufWriteUint16\(\) - -``` -bool HdfSbufWriteUint16 (struct [HdfSBuf](HdfSBuf.md) * sbuf, uint16_t value ) -``` - - **Description:** - -Writes a 16-bit unsigned integer to a **SBuf**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sbufIndicates the pointer to the target SBuf.
valueIndicates the 16-bit unsigned integer to write.
- -**Returns:** - -Returns **true** if the operation is successful; returns **false** otherwise. - -## HdfSbufWriteUint32\(\) - -``` -bool HdfSbufWriteUint32 (struct [HdfSBuf](HdfSBuf.md) * sbuf, uint32_t value ) -``` - - **Description:** - -Writes a 32-bit unsigned integer to a **SBuf**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sbufIndicates the pointer to the target SBuf.
valueIndicates the 32-bit unsigned integer to write.
- -**Returns:** - -Returns **true** if the operation is successful; returns **false** otherwise. - -## HdfSbufWriteUint64\(\) - -``` -bool HdfSbufWriteUint64 (struct [HdfSBuf](HdfSBuf.md) * sbuf, uint64_t value ) -``` - - **Description:** - -Writes a 64-bit unsigned integer to a **SBuf**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sbufIndicates the pointer to the target SBuf.
valueIndicates the 64-bit unsigned integer to write.
- -**Returns:** - -Returns **true** if the operation is successful; returns **false** otherwise. - -## HdfSbufWriteUint8\(\) - -``` -bool HdfSbufWriteUint8 (struct [HdfSBuf](HdfSBuf.md) * sbuf, uint8_t value ) -``` - - **Description:** - -Writes an 8-bit unsigned integer to a **SBuf**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sbufIndicates the pointer to the target SBuf.
valueIndicates the 8-bit unsigned integer to write.
- -**Returns:** - -Returns **true** if the operation is successful; returns **false** otherwise. - diff --git a/api/api-SmartVision-Devices/CryptoSettings.md b/api/api-SmartVision-Devices/CryptoSettings.md deleted file mode 100755 index 4747c59715d6c17c67df457317cdd3d8c697bdfd..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/CryptoSettings.md +++ /dev/null @@ -1,79 +0,0 @@ -# CryptoSettings - -- [Overview](#section1206504114165631) -- [Summary](#section969690503165631) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Describes cryptography settings. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

wpaVersions

-

uint32_t

-

cipherGroup

-

uint32_t

-

n_ciphersPairwise

-

int32_t

-

ciphersPairwise [NL80211_MAX_NR_CIPHER_SUITES]

-

uint32_t

-

n_akmSuites

-

int32_t

-

akmSuites [NL80211_MAX_NR_AKM_SUITES]

-

uint32_t

-

controlPortEthertype

-

uint16_t

-

controlPort

-

int8_t

-

controlPortNoEncrypt

-

int8_t

-
- diff --git "a/api/api-SmartVision-Devices/DFX\345\255\220\347\263\273\347\273\237.md" "b/api/api-SmartVision-Devices/DFX\345\255\220\347\263\273\347\273\237.md" deleted file mode 100755 index 735b63427c35fbe580ea866fe49647dc0c96b22f..0000000000000000000000000000000000000000 --- "a/api/api-SmartVision-Devices/DFX\345\255\220\347\263\273\347\273\237.md" +++ /dev/null @@ -1,5 +0,0 @@ -# DFX子系统 - -- **[HiLog](HiLog.md)** - - diff --git a/api/api-SmartVision-Devices/DListHead.md b/api/api-SmartVision-Devices/DListHead.md deleted file mode 100755 index d970f0a91e33c42c1d32b8ba2bb3482a36e79475..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/DListHead.md +++ /dev/null @@ -1,68 +0,0 @@ -# DListHead - -- [Overview](#section1140084055165631) -- [Summary](#section268215777165631) -- [Data Fields](#pub-attribs) -- [Details](#section1584466514165631) -- [Field](#section1296602454165631) -- [next](#af7070eed646e13e51c9fd05ccc2a848c) -- [prev](#a710f250657bad3dc283472e1252f5f20) - -## **Overview** - -**Related Modules:** - -[DriverUtils](DriverUtils.md) - -**Description:** - -Describes a doubly linked list. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

next

-

struct DListHead *

-

prev

-

struct DListHead *

-
- -## **Details** - -## **Field ** - -## next - -``` -struct [DListHead](DListHead.md)* DListHead::next -``` - - **Description:** - -Pointer to the next node - -## prev - -``` -struct [DListHead](DListHead.md)* DListHead::prev -``` - - **Description:** - -Pointer to the previous node - diff --git a/api/api-SmartVision-Devices/DataTrackSourceInfo.md b/api/api-SmartVision-Devices/DataTrackSourceInfo.md deleted file mode 100755 index b2d8f4ac106a33789408eb44f8f541742e42f52c..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/DataTrackSourceInfo.md +++ /dev/null @@ -1,76 +0,0 @@ -# DataTrackSourceInfo - -- [Overview](#section1633216618165631) -- [Summary](#section1000460764165631) -- [Data Fields](#pub-attribs) -- [Details](#section1189249564165631) -- [Field](#section2141516366165631) -- [bitRate](#ab0ea21bc9777d1d6d10b804c1d5335bf) -- [frameRate](#a6875f7fb2784b0afecd4e2f867fd2c72) - -## **Overview** - -**Related Modules:** - -[Format](Format.md) - -**Description:** - -Defines information about the muxer data source. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

frameRate

-

uint32_t

-

bitRate

-

uint32_t

-
- -## **Details** - -## **Field ** - -## bitRate - -``` -uint32_t DataTrackSourceInfo::bitRate -``` - - **Description:** - -Bit rate - -## frameRate - -``` -uint32_t DataTrackSourceInfo::frameRate -``` - - **Description:** - -Frame rate - diff --git a/api/api-SmartVision-Devices/Deauth.md b/api/api-SmartVision-Devices/Deauth.md deleted file mode 100755 index 8ab45939829d89fb943cb4fac454a371c51725d8..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Deauth.md +++ /dev/null @@ -1,39 +0,0 @@ -# Deauth - -- [Overview](#section988638138165631) -- [Summary](#section1539992355165631) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Defines deauthentication information. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - -

Variable Name

-

Description

-

reasonCode

-

uint16_t

-
- diff --git a/api/api-SmartVision-Devices/DevHandle.md b/api/api-SmartVision-Devices/DevHandle.md deleted file mode 100755 index 76e5dfc02dec8f8911763436a93e5a3d3eb21e79..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/DevHandle.md +++ /dev/null @@ -1,51 +0,0 @@ -# DevHandle - -## **Overview** - -**Related Modules:** - -[COMMON](COMMON.md) - -**Description:** - -Defines the common device handle of the platform driver. - -The handle is associated with a specific platform device and is used as the first input parameter for all APIs of the platform driver. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - -

Variable Name

-

Description

-

object

-

void * 

-
- -## **Details** - -## **Field Documentation** - -## object - -``` -void* DevHandle::object -``` - - **Description:** - -Pointer to a specific platform device - diff --git a/api/api-SmartVision-Devices/DeviceInfo.md b/api/api-SmartVision-Devices/DeviceInfo.md deleted file mode 100755 index 943d41fe274f11f79f5e0424c851a0ec3a1ade06..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/DeviceInfo.md +++ /dev/null @@ -1,212 +0,0 @@ -# DeviceInfo - -- [Overview](#section1817258413165631) -- [Summary](#section402734126165631) -- [Data Fields](#pub-attribs) -- [Details](#section1024585535165631) -- [Field](#section1981473937165631) -- [callback](#a90b6d7e07aa21e507a7b16f380df4fb8) -- [chipInfo](#a39b8ad5d23fb776ec333adbd64025691) -- [chipName](#ad6458f297131a4f3a9dba820e069d525) -- [devIndex](#a1582f8d7e63ac2a2c1a1511bb73aeafd) -- [devNodePath](#a47e7d5536f061f3e11934fd1ff4cf61b) -- [devType](#aec5bff7e9a51ba2fc149156d83154448) -- [fd](#a8be40a9da438bed3c2f13bf2bf07217b) -- [powerStatus](#adcedf378ddac2489b2a6abc1970807df) -- [solutionX](#aba81fb331433f16cfcf435dd05c6e3c3) -- [solutionY](#a90174e4a421db368c2d179ab1bbb0f96) -- [vendorName](#a24b2b30666e776c0637d7c3f2805bb04) - -## **Overview** - -**Related Modules:** - -[Input](Input.md) - -**Description:** - -Describes basic device information of the input device. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

devIndex

-

uint32_t

-

fd

-

int32_t

-

devType

-

uint32_t

-

powerStatus

-

uint32_t

-

chipInfo [CHIP_INFO_LEN]

-

char

-

vendorName [VENDOR_NAME_LEN]

-

char

-

chipName [CHIP_NAME_LEN]

-

char

-

devNodePath [DEV_NODE_PATH]

-

char

-

solutionX

-

uint32_t

-

solutionY

-

uint32_t

-

callback

-

InputReportEventCb *

-
- -## **Details** - -## **Field ** - -## callback - -``` -[InputReportEventCb](InputReportEventCb.md)* DeviceInfo::callback -``` - - **Description:** - -Callback [InputReportEventCb](InputReportEventCb.md) for reporting data - -## chipInfo - -``` -char DeviceInfo::chipInfo[CHIP_INFO_LEN] -``` - - **Description:** - -Driver chip information - -## chipName - -``` -char DeviceInfo::chipName[CHIP_NAME_LEN] -``` - - **Description:** - -Driver chip name - -## devIndex - -``` -uint32_t DeviceInfo::devIndex -``` - - **Description:** - -Device index - -## devNodePath - -``` -char DeviceInfo::devNodePath[DEV_NODE_PATH] -``` - - **Description:** - -Device file path - -## devType - -``` -uint32_t DeviceInfo::devType -``` - - **Description:** - -Device type - -## fd - -``` -int32_t DeviceInfo::fd -``` - - **Description:** - -File descriptor of the device - -## powerStatus - -``` -uint32_t DeviceInfo::powerStatus -``` - - **Description:** - -Power status - -## solutionX - -``` -uint32_t DeviceInfo::solutionX -``` - - **Description:** - -Resolution in the X axis - -## solutionY - -``` -uint32_t DeviceInfo::solutionY -``` - - **Description:** - -Resolution in the Y axis - -## vendorName - -``` -char DeviceInfo::vendorName[VENDOR_NAME_LEN] -``` - - **Description:** - -Module vendor name - diff --git a/api/api-SmartVision-Devices/DeviceMap.md b/api/api-SmartVision-Devices/DeviceMap.md deleted file mode 100755 index ba19b1d991a3a76431c8f6eb9653f9acc9f5e356..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/DeviceMap.md +++ /dev/null @@ -1,40 +0,0 @@ -# DeviceMap - -- [Overview](#section1224111958165631) -- [Summary](#section29442521165631) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[Softbus](Softbus.md) - -**Description:** - -Defines the mappings between the device type enumerations and device type names. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

value

-

char *

-

devType

-

DeviceType

-
- diff --git a/api/api-SmartVision-Devices/DeviceResourceAttr.md b/api/api-SmartVision-Devices/DeviceResourceAttr.md deleted file mode 100755 index 8b9a713e8fbf8a97f87c6901786782b9833a6554..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/DeviceResourceAttr.md +++ /dev/null @@ -1,86 +0,0 @@ -# DeviceResourceAttr - -- [Overview](#section986637668165631) -- [Summary](#section81282211165631) -- [Data Fields](#pub-attribs) -- [Details](#section1600458448165631) -- [Field](#section819926947165631) -- [name](#aadf17a5e450feda1a2ccb043fc94f907) -- [next](#ac806f1957696cfecba92937d8b25409f) -- [value](#a2a9e9a433e8197aaf4863efe468ffdd2) - -## **Overview** - -**Related Modules:** - -[DriverConfig](DriverConfig.md) - -**Description:** - -Defines the attributes of a tree node in the configuration tree. - -The tree node attributes are saved in a linked list. The information about each node in the linked list contains the attribute name, attribute value, and pointer that points to the next attribute. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

name

-

const char *

-

value

-

const char *

-

next

-

struct DeviceResourceAttr *

-
- -## **Details** - -## **Field ** - -## name - -``` -const char* DeviceResourceAttr::name -``` - - **Description:** - -Pointer to the attribute name - -## next - -``` -struct [DeviceResourceAttr](DeviceResourceAttr.md)* DeviceResourceAttr::next -``` - - **Description:** - -Pointer to the next attribute of the node in the configuration tree. - -## value - -``` -const char* DeviceResourceAttr::value -``` - - **Description:** - -Pointer to the attribute value - diff --git a/api/api-SmartVision-Devices/DeviceResourceIface.md b/api/api-SmartVision-Devices/DeviceResourceIface.md deleted file mode 100755 index 8a89d430ec4755dc0e9910aaa2857322c32d1f81..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/DeviceResourceIface.md +++ /dev/null @@ -1,925 +0,0 @@ -# DeviceResourceIface - -- [Overview](#section793276185165631) -- [Summary](#section1215722636165631) -- [Data Fields](#pub-attribs) -- [Details](#section156908930165631) -- [Field](#section1644935392165631) -- [GetBool](#a0a3446a50f3644a29cf812af0c915f8a) -- [GetChildNode](#a70d5844ef0f0c35b9eb3bbba177bccc0) -- [GetElemNum](#a0fafd4d32592ce2fbe951807995c5ab3) -- [GetNodeByMatchAttr](#a8d7c819ee3d00ded8eef01b0594f3571) -- [GetNodeByRefAttr](#a8066548056633048c008e7a29aac8c8f) -- [GetRootNode](#adc489c2c907ebf9a098c91ba110a2c37) -- [GetString](#a1989a47b8d61401e57ee523e01bc25ee) -- [GetStringArrayElem](#a787eb71963c16c96bca913729078dd9d) -- [GetUint16](#a1d3191febf1c9a0731a1614295a1529b) -- [GetUint16Array](#a54977ca0fd60515bad5e33adf830fc64) -- [GetUint16ArrayElem](#a27abcf7cdca0b25b6e620b75590e0a2d) -- [GetUint32](#a87cf305ff9cabdbeb5011e6c04106b9e) -- [GetUint32Array](#a2ed5d24a45946e270b4416c400839966) -- [GetUint32ArrayElem](#a942b67fcd814a37d92e33f3de33c2ff5) -- [GetUint64](#a3c364db9381da16449bb96d6be86aed8) -- [GetUint64Array](#ab378caa47c5b01c31ca602d4eaa3046f) -- [GetUint64ArrayElem](#aac32428eb3762de48514bd14348fd230) -- [GetUint8](#a5610a62186ad18320dadcad7077fb3bb) -- [GetUint8Array](#a067d741f2c3938ca08be2282e741b0a4) -- [GetUint8ArrayElem](#a0973933ace2447ec38a82e7995e2c5af) - -## **Overview** - -**Related Modules:** - -[DriverConfig](DriverConfig.md) - -**Description:** - -Provides functions for obtaining information about the device resource configuration tree. - -This structure provides functions for obtaining information about the device resource configuration tree, including the root node, the **unit** attribute data, and the **String** attribute data. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

GetRootNode )(void)

-

const struct DeviceResourceNode *(*

-

Obtains the root node of the configuration tree.

-

GetBool )(const struct DeviceResourceNode *node, const char *attrName)

-

bool(*

-

Obtains the value of a BOOL attribute of a configuration tree node.

-

GetUint8 )(const struct DeviceResourceNode *node, const char *attrName, uint8_t *value, uint8_t def)

-

int32_t(*

-

Obtains the value of a Uint8 attribute of a configuration tree node.

-

GetUint8ArrayElem )(const struct DeviceResourceNode *node, const char *attrName, uint32_t index, uint8_t *value, uint8_t def)

-

int32_t(*

-

Obtains the value of a Unit8 array attribute numbered index of a configuration tree node.

-

GetUint8Array )(const struct DeviceResourceNode *node, const char *attrName, uint8_t *value, uint32_t len, uint8_t def)

-

int32_t(*

-

Obtains the values of a Uint8 array attribute of a configuration tree node.

-

GetUint16 )(const struct DeviceResourceNode *node, const char *attrName, uint16_t *value, uint16_t def)

-

int32_t(*

-

Obtains the value of a Uint16 attribute of a configuration tree node.

-

GetUint16ArrayElem )(const struct DeviceResourceNode *node, const char *attrName, uint32_t index, uint16_t *value, uint16_t def)

-

int32_t(*

-

Obtains the value of a Uint16 array attribute numbered index of a configuration tree node.

-

GetUint16Array )(const struct DeviceResourceNode *node, const char *attrName, uint16_t *value, uint32_t len, uint16_t def)

-

int32_t(*

-

Obtains the values of a Uint16 array attribute of a configuration tree node.

-

GetUint32 )(const struct DeviceResourceNode *node, const char *attrName, uint32_t *value, uint32_t def)

-

int32_t(*

-

Obtains the value of a Uint32 attribute of a configuration tree node.

-

GetUint32ArrayElem )(const struct DeviceResourceNode *node, const char *attrName, uint32_t index, uint32_t *value, uint32_t def)

-

int32_t(*

-

Obtains the value of a Uint32 array attribute numbered index of a configuration tree node.

-

GetUint32Array )(const struct DeviceResourceNode *node, const char *attrName, uint32_t *value, uint32_t len, uint32_t def)

-

int32_t(*

-

Obtains the values of a Uint32 array attribute of a configuration tree node.

-

GetUint64 )(const struct DeviceResourceNode *node, const char *attrName, uint64_t *value, uint64_t def)

-

int32_t(*

-

Obtains the value of a Uint64 attribute of a configuration tree node.

-

GetUint64ArrayElem )(const struct DeviceResourceNode *node, const char *attrName, uint32_t index, uint64_t *value, uint64_t def)

-

int32_t(*

-

Obtains the value of a Uint64 array attribute numbered index of a configuration tree node.

-

GetUint64Array )(const struct DeviceResourceNode *node, const char *attrName, uint64_t *value, uint32_t len, uint64_t def)

-

int32_t(*

-

Obtains the values of a Uint64 array attribute of a configuration tree node.

-

GetString )(const struct DeviceResourceNode *node, const char *attrName, const char **value, const char *def)

-

int32_t(*

-

Obtains the value of a String attribute of a configuration tree node.

-

GetStringArrayElem )(const struct DeviceResourceNode *node, const char *attrName, uint32_t index, const char **value, const char *def)

-

int32_t(*

-

Obtains the value of a String array attribute numbered index of a configuration tree node.

-

GetElemNum )(const struct DeviceResourceNode *node, const char *attrName)

-

int32_t(*

-

Obtains the number of values for an array attribute of a configuration tree node.

-

GetNodeByMatchAttr )(const struct DeviceResourceNode *node, const char *attrValue)

-

const struct DeviceResourceNode *(*

-

Obtains a specified child node of the current tree node based on the value of a specific reserved attribute (for example, the reserved attribute of the HCS is match_attr).

-

GetChildNode )(const struct DeviceResourceNode *node, const char *nodeName)

-

const struct DeviceResourceNode *(*

-

Obtains the child node with a specified node name from a parent node.

-

GetNodeByRefAttr )(const struct DeviceResourceNode *node, const char *attrName)

-

const struct DeviceResourceNode *(*

-

Obtains the node that is specified by a node-type attribute of a configuration tree node.

-
- -## **Details** - -## **Field ** - -## GetBool - -``` -bool(* DeviceResourceIface::GetBool) (const struct [DeviceResourceNode](DeviceResourceNode.md) *node, const char *attrName) -``` - - **Description:** - -Obtains the value of a **BOOL** attribute of a configuration tree node. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
nodeIndicates the pointer to the configuration tree node.
attrNameIndicates the pointer to the name of the attribute.
- -**Returns:** - -Returns **true** if the operation is successful and the value of the **BOOL** attribute is **true**; returns **false** otherwise. - -## GetChildNode - -``` -const struct [DeviceResourceNode](DeviceResourceNode.md)*(* DeviceResourceIface::GetChildNode) (const struct [DeviceResourceNode](DeviceResourceNode.md) *node, const char *nodeName) -``` - - **Description:** - -Obtains the child node with a specified node name from a parent node. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
nodeIndicates the pointer to the parent node.
nodeNameIndicates the pointer to the name of the child node to obtain.
- -**Returns:** - -Returns the child nodes if the operation is successful; returns **NULL** otherwise. - -## GetElemNum - -``` -int32_t(* DeviceResourceIface::GetElemNum) (const struct [DeviceResourceNode](DeviceResourceNode.md) *node, const char *attrName) -``` - - **Description:** - -Obtains the number of values for an array attribute of a configuration tree node. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
nodeIndicates the pointer to the configuration tree node.
attrNameIndicates the pointer to the name of the array attribute.
- -**Returns:** - -Returns the number of values for an array attribute if the operation is successful; return a negative value otherwise. - -## GetNodeByMatchAttr - -``` -const struct [DeviceResourceNode](DeviceResourceNode.md)*(* DeviceResourceIface::GetNodeByMatchAttr) (const struct [DeviceResourceNode](DeviceResourceNode.md) *node, const char *attrValue) -``` - - **Description:** - -Obtains a specified child node of the current tree node based on the value of a specific reserved attribute \(for example, the reserved attribute of the HCS is **match\_attr**\). - -There is a specific reserved attribute in the syntax of the device resource configuration source file. If this attribute is set for a tree node, you can obtain the node based on the attribute value. Users can set the attribute value based on the usage of their own nodes, but they must ensure that the attribute values are unique. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
nodeIndicates the pointer to the node for whom a child node is to be obtained. The node can be the child node's parent node or grandparent node.
attrValueIndicates the pointer to the value of the reserved attribute configured for the child node.
- -**Returns:** - -Returns the target node if the operation is successful; returns **NULL** otherwise. - -## GetNodeByRefAttr - -``` -const struct [DeviceResourceNode](DeviceResourceNode.md)*(* DeviceResourceIface::GetNodeByRefAttr) (const struct [DeviceResourceNode](DeviceResourceNode.md) *node, const char *attrName) -``` - - **Description:** - -Obtains the node that is specified by a node-type attribute of a configuration tree node. - -If the attribute value is a configuration tree node, the path of the node is converted to a globally unique **hashValue** when the device resource source file is compiled \(for example, the compilation tool of the HCS source file is hc-gen\). For details about the **hashValue**, see **DeviceResourceNode**. When you obtain a tree node using the node-type attribute, you obtain the **hashValue** through the node-type attribute first, and then traverse the tree to obtain the tree node corresponding to the **hashValue**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
nodeIndicates the pointer to the tree node whose attribute is to obtain.
attrNameIndicates the pointer to the name of attribute whose value is a node path.
- -**Returns:** - -Returns the target node if the operation is successful; returns **NULL** otherwise. - -## GetRootNode - -``` -const struct [DeviceResourceNode](DeviceResourceNode.md)*(* DeviceResourceIface::GetRootNode) (void) -``` - - **Description:** - -Obtains the root node of the configuration tree. - -When the driver framework is started, a configuration tree is created. You can use this function to obtain the root node of the configuration tree. - -**Returns:** - -Returns the root node of the configuration tree if the operation is successful; returns **NULL** otherwise. - -## GetString - -``` -int32_t(* DeviceResourceIface::GetString) (const struct [DeviceResourceNode](DeviceResourceNode.md) *node, const char *attrName, const char **value, const char *def) -``` - - **Description:** - -Obtains the value of a **String** attribute of a configuration tree node. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
nodeIndicates the pointer to the configuration tree node.
attrNameIndicates the pointer to the name of the attribute.
valueIndicates the double pointer to the memory where the obtained data is stored. The string memory is provided by the function implementer. Users only need to transfer the double pointer. The memory cannot be released after being used.
defIndicates the value to be passed to value if the operation fails.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value otherwise. - -## GetStringArrayElem - -``` -int32_t(* DeviceResourceIface::GetStringArrayElem) (const struct [DeviceResourceNode](DeviceResourceNode.md) *node, const char *attrName, uint32_t [index](UTILS.md#ga1d3748ca570dcb09a2fb28e8015107dd), const char **value, const char *def) -``` - - **Description:** - -Obtains the value of a **String** array attribute numbered **index** of a configuration tree node. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
nodeIndicates the pointer to the configuration tree node.
attrNameIndicates the pointer to the name of the array attribute.
indexIndicates the number of the index (counting from 0) where the value is to obtain.
valueIndicates the double pointer to the memory where the obtained data is stored. The string memory is provided by the function implementer. Users only need to transfer the double pointer. The memory cannot be released after being used.
defdef Indicates the value to be passed to value if the operation fails.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value otherwise. - -## GetUint16 - -``` -int32_t(* DeviceResourceIface::GetUint16) (const struct [DeviceResourceNode](DeviceResourceNode.md) *node, const char *attrName, uint16_t *value, uint16_t def) -``` - - **Description:** - -Obtains the value of a **Uint16** attribute of a configuration tree node. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
nodeIndicates the pointer to the configuration tree node.
attrNameIndicates the pointer to the name of the attribute.
valueIndicates the pointer to the memory that stores the obtained data. The memory is applied by the user.
defIndicates the value to fill into the memory pointed by value if the operation fails.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value otherwise. - -## GetUint16Array - -``` -int32_t(* DeviceResourceIface::GetUint16Array) (const struct [DeviceResourceNode](DeviceResourceNode.md) *node, const char *attrName, uint16_t *value, uint32_t len, uint16_t def) -``` - - **Description:** - -Obtains the values of a **Uint16** array attribute of a configuration tree node. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
nodeIndicates the pointer to the configuration tree node.
attrNameIndicates the pointer to the name of the array attribute.
valueIndicates the pointer to the array that stores the obtained data. The memory of the array is applied by the user.
lenIndicates the length of the array.
defIndicates the value to fill into value if the operation fails. If the obtained attribute value contains 32-bit or 64-bit data, the element corresponding to the 32-bit or 64-bit data in the array is filled using the value of def, and the other elements are filled with the actual value obtained. If the failure is caused by other exceptions, the first element in the array is filled using the value of def.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value otherwise. - -## GetUint16ArrayElem - -``` -int32_t(* DeviceResourceIface::GetUint16ArrayElem) (const struct [DeviceResourceNode](DeviceResourceNode.md) *node, const char *attrName, uint32_t [index](UTILS.md#ga1d3748ca570dcb09a2fb28e8015107dd), uint16_t *value, uint16_t def) -``` - - **Description:** - -Obtains the value of a **Uint16** array attribute numbered **index** of a configuration tree node. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
nodeIndicates the pointer to the configuration tree node.
attrNameIndicates the pointer to the name of the array attribute.
indexIndicates the number of the index (counting from 0) where the value is to obtain.
valueIndicates the pointer to the memory that stores the obtained data. The memory is applied by the user.
defIndicates the value to fill into the memory pointed by value if the operation fails.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value otherwise. - -## GetUint32 - -``` -int32_t(* DeviceResourceIface::GetUint32) (const struct [DeviceResourceNode](DeviceResourceNode.md) *node, const char *attrName, uint32_t *value, uint32_t def) -``` - - **Description:** - -Obtains the value of a **Uint32** attribute of a configuration tree node. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
nodeIndicates the pointer to the configuration tree node.
attrNameIndicates the pointer to the name of the attribute.
valueIndicates the pointer to the memory that stores the obtained data. The memory is applied by the user.
defIndicates the value to fill into the memory pointed by value if the operation fails.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value otherwise. - -## GetUint32Array - -``` -int32_t(* DeviceResourceIface::GetUint32Array) (const struct [DeviceResourceNode](DeviceResourceNode.md) *node, const char *attrName, uint32_t *value, uint32_t len, uint32_t def) -``` - - **Description:** - -Obtains the values of a **Uint32** array attribute of a configuration tree node. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
nodeIndicates the pointer to the configuration tree node.
attrNameIndicates the pointer to the name of the array attribute.
valueIndicates the pointer to an array that stores the obtained data.
lenIndicates the pointer to the array that stores the obtained data. The memory of the array is applied by the user.
defIndicates the value to fill into value if the operation fails. If the obtained attribute value contains 64-bit data, the element corresponding to the 64-bit data in the array is filled using the value of def, and the other elements are filled with the actual value obtained. If the failure is caused by other exceptions, the first element in the array is filled using the value of def.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value otherwise. - -## GetUint32ArrayElem - -``` -int32_t(* DeviceResourceIface::GetUint32ArrayElem) (const struct [DeviceResourceNode](DeviceResourceNode.md) *node, const char *attrName, uint32_t [index](UTILS.md#ga1d3748ca570dcb09a2fb28e8015107dd), uint32_t *value, uint32_t def) -``` - - **Description:** - -Obtains the value of a **Uint32** array attribute numbered **index** of a configuration tree node. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
nodeIndicates the pointer to the configuration tree node.
attrNameIndicates the pointer to the name of the array attribute.
indexIndicates the number of the index (counting from 0) where the value is to obtain.
valueIndicates the pointer to the memory that stores the obtained data. The memory is applied by the user.
defIndicates the value to fill into the memory pointed by value if the operation fails.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value otherwise. - -## GetUint64 - -``` -int32_t(* DeviceResourceIface::GetUint64) (const struct [DeviceResourceNode](DeviceResourceNode.md) *node, const char *attrName, uint64_t *value, uint64_t def) -``` - - **Description:** - -Obtains the value of a **Uint64** attribute of a configuration tree node. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
nodeIndicates the pointer to the configuration tree node.
attrNameIndicates the pointer to the name of the attribute.
valueIndicates the pointer to the memory that stores the obtained data. The memory is applied by the user.
defIndicates the value to fill into the memory pointed by value if the operation fails.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value otherwise. - -## GetUint64Array - -``` -int32_t(* DeviceResourceIface::GetUint64Array) (const struct [DeviceResourceNode](DeviceResourceNode.md) *node, const char *attrName, uint64_t *value, uint32_t len, uint64_t def) -``` - - **Description:** - -Obtains the values of a **Uint64** array attribute of a configuration tree node. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
nodeIndicates the pointer to the configuration tree node.
attrNameIndicates the pointer to the name of the array attribute.
valueIndicates the pointer to the array that stores the obtained data. The memory of the array is applied by the user.
lenIndicates the length of the array.
defIndicates the value to fill into the first element in the value array if the operation fails.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value otherwise. - -## GetUint64ArrayElem - -``` -int32_t(* DeviceResourceIface::GetUint64ArrayElem) (const struct [DeviceResourceNode](DeviceResourceNode.md) *node, const char *attrName, uint32_t [index](UTILS.md#ga1d3748ca570dcb09a2fb28e8015107dd), uint64_t *value, uint64_t def) -``` - - **Description:** - -Obtains the value of a **Uint64** array attribute numbered **index** of a configuration tree node. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
nodeIndicates the pointer to the configuration tree node.
attrNameIndicates the pointer to the name of the array attribute.
indexIndicates the number of the index (counting from 0) where the value is to obtain.
valueIndicates the pointer to the memory that stores the obtained data. The memory is applied by the user.
defIndicates the value to fill into the memory pointed by value if the operation fails.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value otherwise. - -## GetUint8 - -``` -int32_t(* DeviceResourceIface::GetUint8) (const struct [DeviceResourceNode](DeviceResourceNode.md) *node, const char *attrName, uint8_t *value, uint8_t def) -``` - - **Description:** - -Obtains the value of a **Uint8** attribute of a configuration tree node. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
nodeIndicates the pointer to the configuration tree node.
attrNameIndicates the pointer to the name of the attribute.
valueIndicates the pointer to the memory that stores the obtained data. The memory is applied by the user.
defIndicates the value to fill into the memory pointed by value if the operation fails.
- -**Returns:** - -Returns **0** if the attribute value is obtained successfully; returns a negative value otherwise. - -## GetUint8Array - -``` -int32_t(* DeviceResourceIface::GetUint8Array) (const struct [DeviceResourceNode](DeviceResourceNode.md) *node, const char *attrName, uint8_t *value, uint32_t len, uint8_t def) -``` - - **Description:** - -Obtains the values of a **Uint8** array attribute of a configuration tree node. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
nodeIndicates the pointer to the configuration tree node.
attrNameIndicates the pointer to the name of the array attribute.
valueIndicates the pointer to the array that stores the obtained data. The memory of the array is applied by the user.
lenIndicates the length of the array.
defIndicates the value to fill into value if the operation fails. If the obtained attribute value contains 16-bit, 32-bit, or 64-bit data, the element corresponding to the 16-bit, 32-bit, or 64-bit data in the array is filled using the value of def, and the other elements are filled with the actual value obtained. If the failure is caused by other exceptions, the first element in the array is filled using the value of def.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value otherwise. - -## GetUint8ArrayElem - -``` -int32_t(* DeviceResourceIface::GetUint8ArrayElem) (const struct [DeviceResourceNode](DeviceResourceNode.md) *node, const char *attrName, uint32_t [index](UTILS.md#ga1d3748ca570dcb09a2fb28e8015107dd), uint8_t *value, uint8_t def) -``` - - **Description:** - -Obtains the value of a **Unit8** array attribute numbered **index** of a configuration tree node. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
nodeIndicates the pointer to the configuration tree node.
attrNameIndicates the pointer to the name of the array attribute.
indexIndicates the number of the index (counting from 0) where the value is to obtain.
valueIndicates the pointer to the memory that stores the obtained data. The memory is applied by the user.
defIndicates the value to fill into the memory pointed by value if the operation fails.
- -**Returns:** - -Returns **0** if the array attribute value is obtained successfully; returns a negative value otherwise. - diff --git a/api/api-SmartVision-Devices/DeviceResourceNode.md b/api/api-SmartVision-Devices/DeviceResourceNode.md deleted file mode 100755 index 872960776905fa92be0e22b09b8b79c7681ecdb1..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/DeviceResourceNode.md +++ /dev/null @@ -1,134 +0,0 @@ -# DeviceResourceNode - -- [Overview](#section165277185165631) -- [Summary](#section813009472165631) -- [Data Fields](#pub-attribs) -- [Details](#section1825251284165631) -- [Field](#section1057845482165631) -- [attrData](#a7da5b6d00ceb2cd33d881a678bdb262b) -- [child](#ae6104929f3cd35e811975ada3005fca9) -- [hashValue](#a133894c208928b8ade08efb53beca314) -- [name](#a991fdfa13e2af8b63c2506d9ed31fc0b) -- [parent](#a765c15b3be1bfb1178173e1ed0df4062) -- [sibling](#a484324bd4df5f2f9998ed0d58222e5ba) - -## **Overview** - -**Related Modules:** - -[DriverConfig](DriverConfig.md) - -**Description:** - -Defines a tree node in the configuration tree. - -The tree node information includes the node name, unique node ID, node attributes, parent node, child nodes, and sibling nodes. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

name

-

const char *

-

hashValue

-

uint32_t

-

attrData

-

struct DeviceResourceAttr *

-

parent

-

struct DeviceResourceNode *

-

child

-

struct DeviceResourceNode *

-

sibling

-

struct DeviceResourceNode *

-
- -## **Details** - -## **Field ** - -## attrData - -``` -struct [DeviceResourceAttr](DeviceResourceAttr.md)* DeviceResourceNode::attrData -``` - - **Description:** - -Pointer to the node attributes - -## child - -``` -struct [DeviceResourceNode](DeviceResourceNode.md)* DeviceResourceNode::child -``` - - **Description:** - -Pointer to a child node - -## hashValue - -``` -uint32_t DeviceResourceNode::hashValue -``` - - **Description:** - -Unique ID of a node - -## name - -``` -const char* DeviceResourceNode::name -``` - - **Description:** - -Pointer to the node name - -## parent - -``` -struct [DeviceResourceNode](DeviceResourceNode.md)* DeviceResourceNode::parent -``` - - **Description:** - -Pointer to the parent node - -## sibling - -``` -struct [DeviceResourceNode](DeviceResourceNode.md)* DeviceResourceNode::sibling -``` - - **Description:** - -Pointer to a sibling node - diff --git a/api/api-SmartVision-Devices/Disassoc.md b/api/api-SmartVision-Devices/Disassoc.md deleted file mode 100755 index 8d083dac9ea153bb7978b487cf06ce337f2ff8d0..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Disassoc.md +++ /dev/null @@ -1,39 +0,0 @@ -# Disassoc - -- [Overview](#section367771406165631) -- [Summary](#section732229435165631) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Defines station disconnection. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - -

Variable Name

-

Description

-

reasonCode

-

uint16_t

-
- diff --git a/api/api-SmartVision-Devices/Display.md b/api/api-SmartVision-Devices/Display.md deleted file mode 100755 index 549b2e3cbec2a59fd7953c219e8ba840222a18d2..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Display.md +++ /dev/null @@ -1,1300 +0,0 @@ -# Display - -- [Overview](#section716806483165623) -- [Summary](#section501188316165623) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Enumerations](#enum-members) -- [Functions](#func-members) -- [Details](#section1742640738165623) -- [Enumeration Type](#section1053702718165623) -- [BlendType](#gaab1839ed4aab1030dfda801a51e68817) -- [ColorKey](#ga4fe6fb05c7ba0048b1739d88f4d4878e) -- [Connection](#gab0845c0c8d309ee865c78b095b00e671) -- [DispErrCode](#ga12a925dadef7573cd74d63d06824f9b0) -- [LayerType](#ga56943a0946e5f15e5e58054b8e7a04a4) -- [MemType](#gabd31f838aefffa46191d0d7dc36a96b2) -- [MirrorType](#ga08d32376574b541d162d8534adb78fd0) -- [PixelFormat](#ga60883d4958a60b91661e97027a85072a) -- [RopType](#ga24265f7618fbdba53d3da4806d3097c4) -- [TransformType](#gaa65f3b21a9a92ff022e435a7304126d2) -- [Function](#section2073407938165623) -- [GfxInitialize\(\)](#ga251580eb0614b601ef2c901c722a59d3) -- [GfxUninitialize\(\)](#ga32595139adb26cfaacf709661b29b347) -- [GrallocInitialize\(\)](#ga304347c32a67bf7b20ef5d2b5714e5fa) -- [GrallocUninitialize\(\)](#ga8842b25f91c247606048ab2d5cdb338f) -- [LayerInitialize\(\)](#ga061e587306a5d0367ff228d64434c05d) -- [LayerUninitialize\(\)](#ga4e32b1a65cf243a9ac015b632a4eea0b) - -## **Overview** - -**Description:** - -Defines driver functions of the display module. - -The driver functions provided for the GUI include the layer, hardware acceleration, memory, and callback functions. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - - - - - - - - - - -

File Name

-

Description

-

display_gfx.h

-

Declares the driver functions for implementing hardware acceleration.

-

display_gralloc.h

-

Declares the driver functions for memory.

-

display_layer.h

-

Declares the driver functions for implementing layer operations.

-

display_type.h

-

Declares the types used by the display driver functions.

-
- -## Data Structures - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

GfxFuncs

-

Defines pointers to the hardware acceleration driver functions.

-

GrallocFuncs

-

Defines pointers to the memory driver functions.

-

LayerFuncs

-

Defines pointers to the layer driver functions.

-

DisplayInfo

-

Defines display information.

-

LayerInfo

-

Defines layer information.

-

LayerAlpha

-

Defines alpha operations on a layer.

-

BufferHandle

-

Defines the buffer handle type. The virtual address of a handle maps to its physical address.

-

GrallocBuffer

-

Defines the memory buffer, including the buffer handle, memory type, memory size, and virtual memory address.

-

BufferData

-

Defines buffer data of a layer, including the virtual and physical memory addresses.

-

LayerBuffer

-

Defines the buffer, which is used to store layer data.

-

IRect

-

Defines the coordinates of the upper left corner of a rectangle as well as its width and height to describe a rectangular area for an image.

-

ISurface

-

Stores surface information for hardware acceleration, such as draw image, and bit blit.

-

ILine

-

Describes a line to help draw lines in hardware acceleration.

-

ICircle

-

Describes a circle to help draw circles in hardware acceleration.

-

Rectangle

-

Describes a rectangle to help draw rectangles in hardware acceleration.

-

GfxOpt

-

Defines hardware acceleration options.

-
- -## Enumerations - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

DispErrCode { DISPLAY_SUCCESS = 0, DISPLAY_FAILURE = -1, DISPLAY_FD_ERR = -2, DISPLAY_PARAM_ERR = -3, DISPLAY_NULL_PTR = -4, DISPLAY_NOT_SUPPORT = -5, DISPLAY_NOMEM = -6, DISPLAY_SYS_BUSY = -7, DISPLAY_NOT_PERM = -8 }

-

Enumerates return values of the functions.

-

LayerType { LAYER_TYPE_GRAPHIC, LAYER_TYPE_OVERLAY, LAYER_TYPE_SDIEBAND, LAYER_TYPE_BUTT }

-

Enumerates layer types.

-

PixelFormat { PIXEL_FMT_CLUT8 = 0, PIXEL_FMT_CLUT1, PIXEL_FMT_CLUT4, PIXEL_FMT_RGB_565, PIXEL_FMT_RGBA_5658, PIXEL_FMT_RGBX_4444, PIXEL_FMT_RGBA_4444, PIXEL_FMT_RGB_444, PIXEL_FMT_RGBX_5551, PIXEL_FMT_RGBA_5551, PIXEL_FMT_RGB_555, PIXEL_FMT_RGBX_8888, PIXEL_FMT_RGBA_8888, PIXEL_FMT_RGB_888, PIXEL_FMT_BGR_565, PIXEL_FMT_BGRX_4444, PIXEL_FMT_BGRA_4444, PIXEL_FMT_BGRX_5551, PIXEL_FMT_BGRA_5551, PIXEL_FMT_BGRX_8888, PIXEL_FMT_BGRA_8888, PIXEL_FMT_YUV_422_I, PIXEL_FMT_YCBCR_422_SP, PIXEL_FMT_YCRCB_422_SP, PIXEL_FMT_YCBCR_420_SP, PIXEL_FMT_YCRCB_420_SP, PIXEL_FMT_YCBCR_422_P, PIXEL_FMT_YCRCB_422_P, PIXEL_FMT_YCBCR_420_P, PIXEL_FMT_YCRCB_420_P, PIXEL_FMT_YUYV_422_PKG, PIXEL_FMT_UYVY_422_PKG, PIXEL_FMT_YVYU_422_PKG, PIXEL_FMT_VYUY_422_PKG, PIXEL_FMT_BUTT }

-

Enumerates pixel formats.

-

TransformType { ROTATE_NONE = 0, ROTATE_90, ROTATE_180, ROTATE_270, ROTATE_BUTT }

-

Enumerates transform types of images.

-

MemType { NORMAL_MEM = 0, CACHE_MEM, SHM_MEM }

-

Enumerates memory types.

-

BlendType { BLEND_NONE = 0, BLEND_CLEAR, BLEND_SRC, BLEND_SRCOVER, BLEND_DSTOVER, BLEND_SRCIN, BLEND_DSTIN, BLEND_SRCOUT, BLEND_DSTOUT, BLEND_SRCATOP, BLEND_DSTATOP, BLEND_ADD, BLEND_XOR, BLEND_DST, BLEND_AKS, BLEND_AKD, BLEND_BUTT }

-

Enumerates image blending types.

-

RopType { ROP_BLACK = 0, ROP_NOTMERGEPEN, ROP_MASKNOTPEN, ROP_NOTCOPYPEN, ROP_MASKPENNOT, ROP_NOT, ROP_XORPEN, ROP_NOTMASKPEN, ROP_MASKPEN, ROP_NOTXORPEN, ROP_NOP, ROP_MERGENOTPEN, ROP_COPYPE, ROP_MERGEPENNOT, ROP_MERGEPEN, ROP_WHITE, ROP_BUTT }

-

Enumerates ROP types supported by hardware acceleration.

-

ColorKey { CKEY_NONE = 0, CKEY_SRC, CKEY_DST, CKEY_BUTT }

-

Enumerates color key types supported by hardware acceleration.

-

MirrorType { MIRROR_NONE = 0, MIRROR_LR, MIRROR_TB, MIRROR_BUTT }

-

Enumerates mirror types supported by hardware acceleration.

-

Connection { INVALID = 0, CONNECTED, DISCONNECTED }

-

Enumerates connection types of hot plugging.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

GfxInitialize (GfxFuncs **funcs)

-

int32_t

-

Initializes the hardware acceleration module to obtain the pointer to functions for hardware acceleration operations.

-

GfxUninitialize (GfxFuncs *funcs)

-

int32_t

-

Deinitializes the hardware acceleration module to release the memory allocated to the pointer to functions for hardware acceleration operations.

-

GrallocInitialize (GrallocFuncs **funcs)

-

int32_t

-

Initializes the memory module to obtain the pointer to functions for memory operations.

-

GrallocUninitialize (GrallocFuncs *funcs)

-

int32_t

-

Deinitializes the memory module to release the memory allocated to the pointer to functions for memory operations.

-

LayerInitialize (LayerFuncs **funcs)

-

int32_t

-

Initializes the layer to apply for resources used by the layer and obtain the pointer to functions for layer operations.

-

LayerUninitialize (LayerFuncs *funcs)

-

int32_t

-

Deinitializes the layer module to release the memory allocated to the pointer to functions for layer operations.

-
- -## **Details** - -## **Enumeration Type** - -## BlendType - -``` -enum [BlendType](Display.md#gaab1839ed4aab1030dfda801a51e68817) -``` - -**Description:** - -Enumerates image blending types. - -The system combines images based on a specified blending type during hardware acceleration. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-

BLEND_NONE

-

No blending

-

-

BLEND_CLEAR

-

CLEAR blending

-

-

BLEND_SRC

-

SRC blending

-

-

BLEND_SRCOVER

-

SRC_OVER blending

-

-

BLEND_DSTOVER

-

DST_OVER blending

-

-

BLEND_SRCIN

-

SRC_IN blending

-

-

BLEND_DSTIN

-

DST_IN blending

-

-

BLEND_SRCOUT

-

SRC_OUT blending

-

-

BLEND_DSTOUT

-

DST_OUT blending

-

-

BLEND_SRCATOP

-

SRC_ATOP blending

-

-

BLEND_DSTATOP

-

DST_ATOP blending

-

-

BLEND_ADD

-

ADD blending

-

-

BLEND_XOR

-

XOR blending

-

-

BLEND_DST

-

DST blending

-

-

BLEND_AKS

-

AKS blending

-

-

BLEND_AKD

-

AKD blending

-

-

BLEND_BUTT

-

Null operation

-

-
- -## ColorKey - -``` -enum [ColorKey](Display.md#ga4fe6fb05c7ba0048b1739d88f4d4878e) -``` - -**Description:** - -Enumerates color key types supported by hardware acceleration. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-

CKEY_NONE

-

No color key

-

-

CKEY_SRC

-

Source color key

-

-

CKEY_DST

-

Destination color key

-

-

CKEY_BUTT

-

Null operation

-

-
- -## Connection - -``` -enum [Connection](Display.md#gab0845c0c8d309ee865c78b095b00e671) -``` - -**Description:** - -Enumerates connection types of hot plugging. - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-

INVALID

-

Invalid connection

-

-

CONNECTED

-

Connected

-

-

DISCONNECTED

-

Disconnected

-

-
- -## DispErrCode - -``` -enum [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) -``` - -**Description:** - -Enumerates return values of the functions. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-

DISPLAY_SUCCESS

-

Success

-

-

DISPLAY_FAILURE

-

Failure

-

-

DISPLAY_FD_ERR

-

File handle (FD) error

-

-

DISPLAY_PARAM_ERR

-

Parameter error

-

-

DISPLAY_NULL_PTR

-

Null pointer

-

-

DISPLAY_NOT_SUPPORT

-

Unsupported feature

-

-

DISPLAY_NOMEM

-

Insufficient memory

-

-

DISPLAY_SYS_BUSY

-

System busy

-

-

DISPLAY_NOT_PERM

-

Forbidden operation

-

-
- -## LayerType - -``` -enum [LayerType](Display.md#ga56943a0946e5f15e5e58054b8e7a04a4) -``` - -**Description:** - -Enumerates layer types. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-

LAYER_TYPE_GRAPHIC

-

Graphic layer

-

-

LAYER_TYPE_OVERLAY

-

Overlay layer

-

-

LAYER_TYPE_SDIEBAND

-

Sideband layer

-

-

LAYER_TYPE_BUTT

-

Empty layer

-

-
- -## MemType - -``` -enum [MemType](Display.md#gabd31f838aefffa46191d0d7dc36a96b2) -``` - -**Description:** - -Enumerates memory types. - -Memory is allocated based on the type specified by the GUI. - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-

NORMAL_MEM

-

Memory without cache

-

-

CACHE_MEM

-

Memory with cache

-

-

SHM_MEM

-

Shared memory

-

-
- -## MirrorType - -``` -enum [MirrorType](Display.md#ga08d32376574b541d162d8534adb78fd0) -``` - -**Description:** - -Enumerates mirror types supported by hardware acceleration. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-

MIRROR_NONE

-

No mirror

-

-

MIRROR_LR

-

Left and right mirrors

-

-

MIRROR_TB

-

Top and bottom mirrors

-

-

MIRROR_BUTT

-

Null operation

-

-
- -## PixelFormat - -``` -enum [PixelFormat](Codec.md#ga60883d4958a60b91661e97027a85072a) -``` - -**Description:** - -Enumerates pixel formats. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-

PIXEL_FMT_CLUT8

-

CLUT8 format

-

-

PIXEL_FMT_CLUT1

-

CLUT1 format

-

-

PIXEL_FMT_CLUT4

-

CLUT4 format

-

-

PIXEL_FMT_RGB_565

-

RGB565 format

-

-

PIXEL_FMT_RGBA_5658

-

RGBA5658 format

-

-

PIXEL_FMT_RGBX_4444

-

RGBX4444 format

-

-

PIXEL_FMT_RGBA_4444

-

RGBA4444 format

-

-

PIXEL_FMT_RGB_444

-

RGB444 format

-

-

PIXEL_FMT_RGBX_5551

-

RGBX5551 format

-

-

PIXEL_FMT_RGBA_5551

-

RGBA5551 format

-

-

PIXEL_FMT_RGB_555

-

RGB555 format

-

-

PIXEL_FMT_RGBX_8888

-

RGBX8888 format

-

-

PIXEL_FMT_RGBA_8888

-

RGBA8888 format

-

-

PIXEL_FMT_RGB_888

-

RGB888 format

-

-

PIXEL_FMT_BGR_565

-

BGR565 format

-

-

PIXEL_FMT_BGRX_4444

-

BGRX4444 format

-

-

PIXEL_FMT_BGRA_4444

-

BGRA4444 format

-

-

PIXEL_FMT_BGRX_5551

-

BGRX5551 format

-

-

PIXEL_FMT_BGRA_5551

-

BGRA5551 format

-

-

PIXEL_FMT_BGRX_8888

-

BGRX8888 format

-

-

PIXEL_FMT_BGRA_8888

-

BGRA8888 format

-

-

PIXEL_FMT_YUV_422_I

-

YUV422 interleaved format

-

-

PIXEL_FMT_YCBCR_422_SP

-

YCBCR422 semi-planar format

-

-

PIXEL_FMT_YCRCB_422_SP

-

YCRCB422 semi-planar format

-

-

PIXEL_FMT_YCBCR_420_SP

-

YCBCR420 semi-planar format

-

-

PIXEL_FMT_YCRCB_420_SP

-

YCRCB420 semi-planar format

-

-

PIXEL_FMT_YCBCR_422_P

-

YCBCR422 planar format

-

-

PIXEL_FMT_YCRCB_422_P

-

YCRCB422 planar format

-

-

PIXEL_FMT_YCBCR_420_P

-

YCBCR420 planar format

-

-

PIXEL_FMT_YCRCB_420_P

-

YCRCB420 planar format

-

-

PIXEL_FMT_YUYV_422_PKG

-

YUYV422 packed format

-

-

PIXEL_FMT_UYVY_422_PKG

-

UYVY422 packed format

-

-

PIXEL_FMT_YVYU_422_PKG

-

YVYU422 packed format

-

-

PIXEL_FMT_VYUY_422_PKG

-

VYUY422 packed format

-

-

PIXEL_FMT_BUTT

-

Invalid pixel format

-

-
- -## RopType - -``` -enum [RopType](Display.md#ga24265f7618fbdba53d3da4806d3097c4) -``` - -**Description:** - -Enumerates ROP types supported by hardware acceleration. - -ROP performs bitwise Boolean operations \(including bitwise AND and bitwise OR\) on the RGB color and alpha values of the foreground bitmap with those of the background bitmap, and then outputs the result. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-

ROP_BLACK

-

Blackness

-

-

ROP_NOTMERGEPEN

-

~(S2+S1)

-

-

ROP_MASKNOTPEN

-

~S2&S1

-

-

ROP_NOTCOPYPEN

-

~S2

-

-

ROP_MASKPENNOT

-

S2&~S1

-

-

ROP_NOT

-

~S1

-

-

ROP_XORPEN

-

S2^S1

-

-

ROP_NOTMASKPEN

-

~(S2&S1)

-

-

ROP_MASKPEN

-

S2&S1

-

-

ROP_NOTXORPEN

-

~(S2^S1)

-

-

ROP_NOP

-

S1

-

-

ROP_MERGENOTPEN

-

~S2+S1

-

-

ROP_COPYPE

-

S2

-

-

ROP_MERGEPENNOT

-

S2+~S1

-

-

ROP_MERGEPEN

-

S2+S1

-

-

ROP_WHITE

-

Whiteness

-

-

ROP_BUTT

-

Invalid ROP type

-

-
- -## TransformType - -``` -enum [TransformType](Display.md#gaa65f3b21a9a92ff022e435a7304126d2) -``` - -**Description:** - -Enumerates transform types of images. - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-

ROTATE_NONE

-

No rotation

-

-

ROTATE_90

-

Rotation by 90 degrees

-

-

ROTATE_180

-

Rotation by 180 degrees

-

-

ROTATE_270

-

Rotation by 270 degrees

-

-

ROTATE_BUTT

-

Invalid operation

-

-
- -## **Function** - -## GfxInitialize\(\) - -``` -int32_t GfxInitialize ([GfxFuncs](GfxFuncs.md) ** funcs) -``` - -**Description:** - -Initializes the hardware acceleration module to obtain the pointer to functions for hardware acceleration operations. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-

funcs

-

Indicates the double pointer to functions for hardware acceleration operations. Memory is allocated automatically when you initiate the hardware acceleration module, so you can simply use the pointer to gain access to the functions.

-
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -**See also:** - -[GfxUninitialize](Display.md#ga32595139adb26cfaacf709661b29b347) - -## GfxUninitialize\(\) - -``` -int32_t GfxUninitialize ([GfxFuncs](GfxFuncs.md) * funcs) -``` - -**Description:** - -Deinitializes the hardware acceleration module to release the memory allocated to the pointer to functions for hardware acceleration operations. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-

funcs

-

Indicates the pointer to functions for hardware acceleration operations.

-
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -**See also:** - -[GfxInitialize](Display.md#ga251580eb0614b601ef2c901c722a59d3) - -## GrallocInitialize\(\) - -``` -int32_t GrallocInitialize ([GrallocFuncs](GrallocFuncs.md) ** funcs) -``` - -**Description:** - -Initializes the memory module to obtain the pointer to functions for memory operations. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-

funcs

-

Indicates the double pointer to functions for memory operations. Memory is allocated automatically when you initiate the memory module initialization, so you can simply use the pointer to gain access to the functions.

-
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -## GrallocUninitialize\(\) - -``` -int32_t GrallocUninitialize ([GrallocFuncs](GrallocFuncs.md) * funcs) -``` - -**Description:** - -Deinitializes the memory module to release the memory allocated to the pointer to functions for memory operations. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-

funcs

-

Indicates the pointer to functions for memory operations.

-
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -## LayerInitialize\(\) - -``` -int32_t LayerInitialize ([LayerFuncs](LayerFuncs.md) ** funcs) -``` - -**Description:** - -Initializes the layer to apply for resources used by the layer and obtain the pointer to functions for layer operations. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-

funcs

-

Indicates the double pointer to functions for layer operations. Memory is allocated automatically when you initiate the layer module, so you can simply use the pointer to gain access to the functions.

-
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -**See also:** - -[LayerUninitialize](Display.md#ga4e32b1a65cf243a9ac015b632a4eea0b) - -## LayerUninitialize\(\) - -``` -int32_t LayerUninitialize ([LayerFuncs](LayerFuncs.md) * funcs) -``` - -**Description:** - -Deinitializes the layer module to release the memory allocated to the pointer to functions for layer operations. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-

funcs

-

Indicates the pointer to functions for layer operations.

-
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -**See also:** - -[LayerInitialize](Display.md#ga061e587306a5d0367ff228d64434c05d) - diff --git a/api/api-SmartVision-Devices/DisplayInfo.md b/api/api-SmartVision-Devices/DisplayInfo.md deleted file mode 100755 index 7922c8e65ec980cd20f935e4aa4f8818bb7926d7..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/DisplayInfo.md +++ /dev/null @@ -1,84 +0,0 @@ -# DisplayInfo - -- [Overview](#section570796902165631) -- [Summary](#section1124241944165631) -- [Data Fields](#pub-attribs) -- [Details](#section1616287825165631) -- [Field](#section504531338165631) -- [height](#a63e718a4026c73b63dd5bbcf0bbf02d7) -- [rotAngle](#ae7f140e9556a9a8ac4c0f496a66ac51f) -- [width](#a5149132f442cfad8374d6cde23973d11) - -## **Overview** - -**Related Modules:** - -[Display](Display.md) - -**Description:** - -Defines display information. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

width

-

uint32_t

-

height

-

uint32_t

-

rotAngle

-

int32_t

-
- -## **Details** - -## **Field ** - -## height - -``` -uint32_t DisplayInfo::height -``` - - **Description:** - -Display height - -## rotAngle - -``` -int32_t DisplayInfo::rotAngle -``` - - **Description:** - -Rotation angle of the display - -## width - -``` -uint32_t DisplayInfo::width -``` - - **Description:** - -Display width - diff --git a/api/api-SmartVision-Devices/DriverConfig.md b/api/api-SmartVision-Devices/DriverConfig.md deleted file mode 100755 index 9e902ca6ccf1e3d70ecbf6b466c501fd0577f5af..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/DriverConfig.md +++ /dev/null @@ -1,264 +0,0 @@ -# DriverConfig - -- [Overview](#section343659875165623) -- [Summary](#section758624607165623) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Macros](#define-members) -- [Enumerations](#enum-members) -- [Functions](#func-members) -- [Details](#section1336663313165623) -- [Macro Definition](#section1194593549165623) -- [DEV\_RES\_NODE\_FOR\_EACH\_ATTR](#gaea582d01be42ff534e33b0484094af9b) -- [DEV\_RES\_NODE\_FOR\_EACH\_CHILD\_NODE](#ga1b848db724617a3cf0e5b3f2453b8846) -- [Enumeration Type](#section1597354189165623) -- [DeviceResourceType](#ga09c9585a5d95c79fd5ee4bd8863ba66a) -- [Function](#section240152397165623) -- [DeviceResourceGetIfaceInstance\(\)](#gabfbfb1ffec32f04e8f3660eadb7677a0) - -## **Overview** - -**Description:** - -Defines an API for HDF driver developers to read driver configuration information. - -During version compilation of the device resource source file defined by developers, the compilation tool \(for example, the compilation tool of the HCS file is hc-gen\) generates bytecodes. When the HDF starts, it transfers the bytecode memory to the **DriverConfig** module. The **DriverConfig** module converts the bytecodes into a configuration tree and provides an API for developers to query the tree. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - -

File Name

-

Description

-

device_resource_if.h

-

Declares the API for querying the configuration tree.

-
- -## Data Structures - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

DeviceResourceAttr

-

Defines the attributes of a tree node in the configuration tree.

-

DeviceResourceNode

-

Defines a tree node in the configuration tree.

-

DeviceResourceIface

-

Provides functions for obtaining information about the device resource configuration tree.

-
- -## Macros - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

DEV_RES_NODE_FOR_EACH_ATTR(node, attr) for ((attr) = (node)->attrData; (attr) != NULL; (attr) = (attr)->next)

-

Traverses the attributes of the current configuration tree node.

-

DEV_RES_NODE_FOR_EACH_CHILD_NODE(node, childNode) for ((childNode) = (node)->child; (childNode) != NULL; (childNode) = (childNode)->sibling)

-

Traverses the child nodes of the current configuration tree node.

-
- -## Enumerations - - - - - - - - - - -

Enumeration Name

-

Description

-

DeviceResourceType { HDF_CONFIG_SOURCE = 0, INVALID }

-

Enumerates configuration file types.

-
- -## Functions - - - - - - - - - - -

Function

-

Description

-

DeviceResourceGetIfaceInstance (DeviceResourceType type)

-

struct DeviceResourceIface *

-

Obtains the device resource interface handle of the corresponding configuration tree type.

-
- -## **Details** - -## **Macro Definition ** - -## DEV\_RES\_NODE\_FOR\_EACH\_ATTR - -``` -#define DEV_RES_NODE_FOR_EACH_ATTR( node, attr ) for ((attr) = (node)->attrData; (attr) != [NULL](UTILS.md#ga070d2ce7b6bb7e5c05602aa8c308d0c4); (attr) = (attr)->next) -``` - - **Description:** - -Traverses the attributes of the current configuration tree node. - -This operation is a **for** loop in essence. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
nodeIndicates the configuration tree node to traverse.
attrIndicates the traversed attributes.
- -## DEV\_RES\_NODE\_FOR\_EACH\_CHILD\_NODE - -``` -#define DEV_RES_NODE_FOR_EACH_CHILD_NODE( node, childNode ) for ((childNode) = (node)->child; (childNode) != [NULL](UTILS.md#ga070d2ce7b6bb7e5c05602aa8c308d0c4); (childNode) = (childNode)->sibling) -``` - - **Description:** - -Traverses the child nodes of the current configuration tree node. - -This operation is a **for** loop in essence. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
nodeIndicates the configuration tree node to traverse.
childNodeIndicates the traversed child nodes.
- -## **Enumeration Type ** - -## DeviceResourceType - -``` -enum [DeviceResourceType](DriverConfig.md#ga09c9585a5d95c79fd5ee4bd8863ba66a) -``` - - **Description:** - -Enumerates configuration file types. - - - - - - - - - - - - - -

Enumerator

-

Description

-
HDF_CONFIG_SOURCE

HDF configuration file

-
INVALID

Invalid configuration file type

-
- -## **Function ** - -## DeviceResourceGetIfaceInstance\(\) - -``` -struct [DeviceResourceIface](DeviceResourceIface.md)* DeviceResourceGetIfaceInstance ([DeviceResourceType](DriverConfig.md#ga09c9585a5d95c79fd5ee4bd8863ba66a) type) -``` - - **Description:** - -Obtains the device resource interface handle of the corresponding configuration tree type. - -You can use the obtained handle to use the device resource interface. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
typeIndicates the type of the device resource interface handle to obtain.
- -**Returns:** - -Returns the device resource interface handle if the operation is successful; returns **NULL** otherwise. - diff --git a/api/api-SmartVision-Devices/DriverUtils.md b/api/api-SmartVision-Devices/DriverUtils.md deleted file mode 100755 index 2a67b26ae3bdbe31828de594a6c8a707117ba49c..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/DriverUtils.md +++ /dev/null @@ -1,1357 +0,0 @@ -# DriverUtils - -- [Overview](#section955198948165623) -- [Summary](#section1440107053165623) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Macros](#define-members) -- [Typedefs](#typedef-members) -- [Enumerations](#enum-members) -- [Functions](#func-members) -- [Details](#section1185566655165623) -- [Macro Definition](#section2134126864165623) -- [CONTAINER\_OF](#ga818b9cca761fe7bc18e4e417da772976) -- [DLIST\_FIRST\_ENTRY](#ga203de9c01fefc8bbbae746685794cfcc) -- [DLIST\_FOR\_EACH\_ENTRY](#ga2b53b2bcf35b8cfb32e429cacbcc0a8d) -- [DLIST\_FOR\_EACH\_ENTRY\_SAFE](#ga8e6f49c1fed85c031f29e8acce377ea0) -- [DLIST\_LAST\_ENTRY](#ga25ac08cc864bd59050f7e2ca77df1f23) -- [HDF\_LOGD](#gaa0411582f697619cdb045ae61ac42539) -- [HDF\_LOGE](#gaacd0eb778948960a7f97af155287ce8c) -- [HDF\_LOGI](#ga369d56841d17e6908fc6885fcb814b80) -- [HDF\_LOGV](#ga4abebfca1aaeb8125f85800425caf304) -- [HDF\_LOGW](#ga72f232dade88b85aff2d8c0e42b82df0) -- [LOG\_TAG\_MARK\_EXTEND](#ga7e862bda9f0b95d1628f6f62598f1f42) -- [Typedef](#section1521632851165623) -- [HdfWorkFunc](#ga30665d61b03fae4a2ebc778c3d775ce5) -- [Enumeration Type](#section758644115165623) -- [anonymous enum](#gac205be2172292384dd687b5471a87edd) -- [HDF\_STATUS](#ga7e01536ecbe9b17563dd3fe256202a67) -- [Function](#section636459406165623) -- [DListHeadInit\(\)](#ga0a86a18ad591f485663834799dd38dea) -- [DListInsertHead\(\)](#ga60e796c868630dd403ef4fdcc60c12e8) -- [DListInsertTail\(\)](#gaa1d386162f8f6401fe8ac6d70d237517) -- [DListIsEmpty\(\)](#ga9b4053294ad63f0bdacb4841a14ba208) -- [DListMerge\(\)](#gac4acad10a7c49cc4b2d773aedbfa1e11) -- [DListRemove\(\)](#ga42d23fa1f55097bae91664c5e4a78e1e) -- [HdfAddDelayedWork\(\)](#gaef781ccc1579db3070745088da47b2c5) -- [HdfAddWork\(\)](#ga82cc68d656aa17317634b07d49dae160) -- [HdfCancelDelayedWorkSync\(\)](#gad53e46938809200db3caafdc85decc5a) -- [HdfCancelWorkSync\(\)](#gaab300487bdb9f3496bb823c657275dd3) -- [HdfDelayedWorkDestroy\(\)](#gaaaced5c0365d1a1232167b738f08b5ce) -- [HdfDelayedWorkInit\(\)](#ga55bf669dc6740c65e4d45a4f641db2f1) -- [HdfWorkBusy\(\)](#ga37595ed36b8ce7be84c914aebfd99d00) -- [HdfWorkDestroy\(\)](#gae6166caaf1b114e17834c50414b2d52e) -- [HdfWorkInit\(\)](#gad171adc8eda320fd01049a2b87ea62fb) -- [HdfWorkQueueDestroy\(\)](#ga04ec328639aefd71683175e4c214fb80) -- [HdfWorkQueueInit\(\)](#gad7afae1dc691818c513094c873decabd) - -## **Overview** - -**Description:** - -Defines common macros and interfaces of the driver module. - -This module provides interfaces such as log printing, doubly linked list operations, and work queues. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - - - - - - - - - - -

File Name

-

Description

-

hdf_base.h

-

Declares driver common types, including the enumerated values returned by the function and the macro for obtaining the array size.

-

hdf_dlist.h

-

Declares doubly linked list structures and interfaces.

-

hdf_log.h

-

Declares log printing functions of the driver module. This module provides functions for printing logs at the verbose, debug, information, warning, and error levels.

-

hdf_workqueue.h

-

Declares work queue structures and interfaces.

-
- -## Data Structures - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

DListHead

-

Describes a doubly linked list.

-

HdfWork

-

Describes a work item and a delayed work item. This structure defines the work and delayed work items, and then calls the initialization function HdfWorkInit or HdfDelayedWorkInit to perform initialization. The HdfAddWork() function is to add a work item to a work queue immediately, and the HdfAddDelayedWork() function is to add a work item to a work queue after the configured delayed time.

-

HdfWorkQueue

-

Describes a work queue.

-
- -## Macros - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

HDF_WAIT_FOREVER 0xFFFFFFFF

-

Indicates that the function keeps waiting to obtain a semaphore or mutex.

-

HDF_ARRAY_SIZE (a) (sizeof(a) / sizeof((a)[0]))

-

Defines the array size.

-

HDF_KILO_UNIT 1000

-

Defines a time conversion unit, for example, the unit for converting from second to millisecond.

-

CONTAINER_OF(ptr, type, member) (type *)((char *)(ptr) - (char *)&((type *)0)->member)

-

Obtains the address of a structure variable from its member address.

-

DLIST_FIRST_ENTRY(ptr, type, member) CONTAINER_OF((ptr)->next, type, member)

-

Obtains the first node of a doubly linked list.

-

DLIST_LAST_ENTRY(ptr, type, member) CONTAINER_OF((ptr)->prev, type, member)

-

Obtains the last node of a doubly linked list.

-

DLIST_FOR_EACH_ENTRY(pos, head, type, member)

-

Traverses all nodes in a doubly linked list.

-

DLIST_FOR_EACH_ENTRY_SAFE(pos, tmp, head, type, member)

-

Traverses all nodes in a doubly linked list. This function is used to delete the nodes pointed to by pos during traversal.

-

LOG_TAG_MARK_EXTEND(HDF_TAG) #HDF_TAG

-
 

HDF_LOGV(fmt, arg...) printf("[HDF:V/" LOG_TAG "]" fmt "\r\n", ##arg)

-

Prints logs at the verbose level.

-

HDF_LOGD(fmt, arg...) printf("[HDF:D/" LOG_TAG "]" fmt "\r\n", ##arg)

-

Prints logs at the debug level.

-

HDF_LOGI(fmt, arg...) printf("[HDF:I/" LOG_TAG "]" fmt "\r\n", ##arg)

-

Prints logs at the information level.

-

HDF_LOGW(fmt, arg...) printf("[HDF:W/" LOG_TAG "]" fmt "\r\n", ##arg)

-

Prints logs at the warning level.

-

HDF_LOGE(fmt, arg...) printf("[HDF:E/" LOG_TAG "]" fmt "\r\n", ##arg)

-

Prints logs at the error level.

-
- -## Typedefs - - - - - - - - - - -

Typedef Name

-

Description

-

HdfWorkFunc) (void *)

-

typedef void(*

-

Describes a work execution function type.

-
- -## Enumerations - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

HDF_STATUS { HDF_SUCCESS = 0, HDF_FAILURE = -1, HDF_ERR_NOT_SUPPORT = -2, HDF_ERR_INVALID_PARAM = -3, HDF_ERR_INVALID_OBJECT = -4, HDF_ERR_MALLOC_FAIL = -6, HDF_ERR_TIMEOUT = -7, HDF_ERR_THREAD_CREATE_FAIL = -10, HDF_ERR_QUEUE_FULL = -15, HDF_ERR_DEVICE_BUSY = -16, HDF_ERR_IO = -17, HDF_ERR_BAD_FD = -18, HDF_BSP_ERR_OP = HDF_BSP_ERR_NUM(-1), HDF_ERR_BSP_PLT_API_ERR = HDF_BSP_ERR_NUM(-2), HDF_PAL_ERR_DEV_CREATE = HDF_BSP_ERR_NUM(-3), HDF_PAL_ERR_INNER = HDF_BSP_ERR_NUM(-4), HDF_DEV_ERR_NO_MEMORY = HDF_DEV_ERR_NUM(-1), HDF_DEV_ERR_NO_DEVICE = HDF_DEV_ERR_NUM(-2), HDF_DEV_ERR_NO_DEVICE_SERVICE = HDF_DEV_ERR_NUM(-3), HDF_DEV_ERR_DEV_INIT_FAIL = HDF_DEV_ERR_NUM(-4), HDF_DEV_ERR_PUBLISH_FAIL = HDF_DEV_ERR_NUM(-5), HDF_DEV_ERR_ATTACHDEV_FAIL = HDF_DEV_ERR_NUM(-6), HDF_DEV_ERR_NODATA = HDF_DEV_ERR_NUM(-7), HDF_DEV_ERR_NORANGE = HDF_DEV_ERR_NUM(-8), HDF_DEV_ERR_OP = HDF_DEV_ERR_NUM(-10) }

-

Enumerates HDF return value types.

-

{ HDF_WORK_BUSY_PENDING = 1 << 0, HDF_WORK_BUSY_RUNNING = 1 << 1 }

-

Enumerates statuses of a work item or a delayed work item.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

DListHeadInit (struct DListHead *head)

-

static void

-

Initializes a doubly linked list.

-

DListIsEmpty (const struct DListHead *head)

-

static bool

-

Checks whether a doubly linked list is empty.

-

DListRemove (struct DListHead *entry)

-

static void

-

Removes a node from a doubly linked list.

-

DListInsertHead (struct DListHead *entry, struct DListHead *head)

-

static void

-

Inserts a node from the head of a doubly linked list.

-

DListInsertTail (struct DListHead *entry, struct DListHead *head)

-

static void

-

Inserts a node from the tail of a doubly linked list.

-

DListMerge (struct DListHead *list, struct DListHead *head)

-

static void

-

Merges two linked lists by adding the list specified by list to the head of the list specified by head and initializes the merged list.

-

HdfWorkQueueInit (HdfWorkQueue *queue, char *name)

-

int32_t

-

Initializes a work queue.

-

HdfWorkInit (HdfWork *work, HdfWorkFunc func, void *arg)

-

int32_t

-

Initializes a work item.

-

HdfDelayedWorkInit (HdfWork *work, HdfWorkFunc func, void *arg)

-

int32_t

-

Initializes a delayed work item.

-

HdfWorkDestroy (HdfWork *work)

-

void

-

Destroys a work item.

-

HdfWorkQueueDestroy (HdfWorkQueue *queue)

-

void

-

Destroys a work queue.

-

HdfDelayedWorkDestroy (HdfWork *work)

-

void

-

Destroys a delayed work item.

-

HdfAddWork (HdfWorkQueue *queue, HdfWork *work)

-

bool

-

Adds a work item to a work queue.

-

HdfAddDelayedWork (HdfWorkQueue *queue, HdfWork *work, unsigned long ms)

-

bool

-

Adds a delayed work item to a work queue.

-

HdfWorkBusy (HdfWork *work)

-

unsigned int

-

Obtains the status of a work item or delayed work item.

-

HdfCancelWorkSync (HdfWork *work)

-

bool

-

Cancels a work item. This function waits until the work item is complete.

-

HdfCancelDelayedWorkSync (HdfWork *work)

-

bool

-

Cancels a delayed work item.

-
- -## **Details** - -## **Macro Definition ** - -## CONTAINER\_OF - -``` -#define CONTAINER_OF( ptr, type, member ) (type *)((char *)(ptr) - (char *)&((type *)0)->member) -``` - - **Description:** - -Obtains the address of a structure variable from its member address. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
ptrIndicates the structure member address.
typeIndicates the structure type.
memberIndicates the structure member.
- -## DLIST\_FIRST\_ENTRY - -``` -#define DLIST_FIRST_ENTRY( ptr, type, member ) [CONTAINER_OF](DriverUtils.md#ga818b9cca761fe7bc18e4e417da772976)((ptr)->next, type, member) -``` - - **Description:** - -Obtains the first node of a doubly linked list. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
ptrIndicates the structure member address.
typeIndicates the structure type.
memberIndicates the structure member.
- -## DLIST\_FOR\_EACH\_ENTRY - -``` -#define DLIST_FOR_EACH_ENTRY( pos, head, type, member ) -``` - -``` -Values: for ((pos) = [CONTAINER_OF](DriverUtils.md#ga818b9cca761fe7bc18e4e417da772976)((head)->next, type, member); \ - - &(pos)->member != (head); \ - - (pos) = [CONTAINER_OF](DriverUtils.md#ga818b9cca761fe7bc18e4e417da772976)((pos)->member.next, type, member)) - - -``` - - **Description:** - -Traverses all nodes in a doubly linked list. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
posIndicates the pointer to the structure variable.
headIndicates the pointer to the linked list head.
typeIndicates the structure type.
memberIndicates the member type of the structure.
- -## DLIST\_FOR\_EACH\_ENTRY\_SAFE - -``` -#define DLIST_FOR_EACH_ENTRY_SAFE( pos, tmp, head, type, member ) -``` - -``` -Values: for ((pos) = [CONTAINER_OF](DriverUtils.md#ga818b9cca761fe7bc18e4e417da772976)((head)->next, type, member), \ - - (tmp) = [CONTAINER_OF](DriverUtils.md#ga818b9cca761fe7bc18e4e417da772976)((pos)->member.next, type, member); \ - - &(pos)->member != (head); \ - - (pos) = (tmp), (tmp) = [CONTAINER_OF](DriverUtils.md#ga818b9cca761fe7bc18e4e417da772976)((pos)->member.next, type, member)) - - -``` - - **Description:** - -Traverses all nodes in a doubly linked list. This function is used to delete the nodes pointed to by **pos** during traversal. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
posIndicates the pointer to the structure variable.
tmpIndicates the pointer to the structure variable, pointing to the next node of pos.
headIndicates the pointer to the linked list head.
typeIndicates the structure type.
memberIndicates the member type of the structure.
- -## DLIST\_LAST\_ENTRY - -``` -#define DLIST_LAST_ENTRY( ptr, type, member ) [CONTAINER_OF](DriverUtils.md#ga818b9cca761fe7bc18e4e417da772976)((ptr)->prev, type, member) -``` - - **Description:** - -Obtains the last node of a doubly linked list. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
ptrIndicates the structure member address.
typeIndicates the structure type.
memberIndicates the structure member.
- -## HDF\_LOGD - -``` -#define HDF_LOGD( fmt, arg... ) [printf](IO.md#ga98631211a4a8aee62f572375d5b637be)("[HDF:D/" LOG_TAG "]" fmt "\r\n", ##arg) -``` - - **Description:** - -Prints logs at the debug level. - -To use this function, you must define **HDF\_LOG\_TAG**, for example, \#define HDF\_LOG\_TAG evt. - -## HDF\_LOGE - -``` -#define HDF_LOGE( fmt, arg... ) [printf](IO.md#ga98631211a4a8aee62f572375d5b637be)("[HDF:E/" LOG_TAG "]" fmt "\r\n", ##arg) -``` - - **Description:** - -Prints logs at the error level. - -To use this function, you must define **HDF\_LOG\_TAG**, for example, \#define HDF\_LOG\_TAG evt. - -## HDF\_LOGI - -``` -#define HDF_LOGI( fmt, arg... ) [printf](IO.md#ga98631211a4a8aee62f572375d5b637be)("[HDF:I/" LOG_TAG "]" fmt "\r\n", ##arg) -``` - - **Description:** - -Prints logs at the information level. - -To use this function, you must define **HDF\_LOG\_TAG**, for example, \#define HDF\_LOG\_TAG evt. - -## HDF\_LOGV - -``` -#define HDF_LOGV( fmt, arg... ) [printf](IO.md#ga98631211a4a8aee62f572375d5b637be)("[HDF:V/" LOG_TAG "]" fmt "\r\n", ##arg) -``` - - **Description:** - -Prints logs at the verbose level. - -To use this function, you must define **HDF\_LOG\_TAG**, for example, \#define HDF\_LOG\_TAG evt. - -## HDF\_LOGW - -``` -#define HDF_LOGW( fmt, arg... ) [printf](IO.md#ga98631211a4a8aee62f572375d5b637be)("[HDF:W/" LOG_TAG "]" fmt "\r\n", ##arg) -``` - - **Description:** - -Prints logs at the warning level. - -To use this function, you must define **HDF\_LOG\_TAG**, for example, \#define HDF\_LOG\_TAG evt. - -## LOG\_TAG\_MARK\_EXTEND - -``` -#define LOG_TAG_MARK_EXTEND( HDF_TAG) #HDF_TAG -``` - - **Description:** - -Add quotation mark - -## **Typedef ** - -## HdfWorkFunc - -``` -typedef void(* HdfWorkFunc) (void *) -``` - - **Description:** - -Describes a work execution function type. - -The thread of the work queue executes this function after the work item is added to the work queue. - -## **Enumeration Type ** - -## anonymous enum - -``` -anonymous enum -``` - - **Description:** - -Enumerates statuses of a work item or a delayed work item. - - - - - - - - - - - - - -

Enumerator

-

Description

-
HDF_WORK_BUSY_PENDING

The work item or delayed work item is pending.

-
HDF_WORK_BUSY_RUNNING

The work item or delayed work item is running.

-
- -## HDF\_STATUS - -``` -enum [HDF_STATUS](DriverUtils.md#ga7e01536ecbe9b17563dd3fe256202a67) -``` - - **Description:** - -Enumerates HDF return value types. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
HDF_SUCCESS

The operation is successful.

-
HDF_FAILURE

Failed to invoke the OS underlying function.

-
HDF_ERR_NOT_SUPPORT

Not supported.

-
HDF_ERR_INVALID_PARAM

Invalid parameter.

-
HDF_ERR_INVALID_OBJECT

Invalid object.

-
HDF_ERR_MALLOC_FAIL

Memory allocation fails.

-
HDF_ERR_TIMEOUT

Timeout occurs.

-
HDF_ERR_THREAD_CREATE_FAIL

Failed to create a thread.

-
HDF_ERR_QUEUE_FULL

The queue is full.

-
HDF_ERR_DEVICE_BUSY

The device is busy.

-
HDF_ERR_IO

I/O error.

-
HDF_ERR_BAD_FD

Incorrect file descriptor.

-
HDF_BSP_ERR_OP

Failed to operate a BSP module.

-
HDF_ERR_BSP_PLT_API_ERR

The platform API of the BSP module is incorrect.

-
HDF_PAL_ERR_DEV_CREATE

Failed to create a BSP module device.

-
HDF_PAL_ERR_INNER

Internal error codes of the BSP module.

-
HDF_DEV_ERR_NO_MEMORY

Failed to allocate memory to the device module.

-
HDF_DEV_ERR_NO_DEVICE

The device module has no device.

-
HDF_DEV_ERR_NO_DEVICE_SERVICE

The device module has no device service.

-
HDF_DEV_ERR_DEV_INIT_FAIL

Failed to initialize a device module.

-
HDF_DEV_ERR_PUBLISH_FAIL

The device module failed to release a service.

-
HDF_DEV_ERR_ATTACHDEV_FAIL

Failed to attach a device to a device module.

-
HDF_DEV_ERR_NODATA

Failed to read data from a device module.

-
HDF_DEV_ERR_NORANGE

The device module data is out of range.

-
HDF_DEV_ERR_OP

Failed to operate a device module.

-
- -## **Function ** - -## DListHeadInit\(\) - -``` -static void DListHeadInit (struct [DListHead](DListHead.md) * head) -``` - - **Description:** - -Initializes a doubly linked list. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
headIndicates the pointer to the linked list DListHead. The parameter cannot be empty.
- -## DListInsertHead\(\) - -``` -static void DListInsertHead (struct [DListHead](DListHead.md) * entry, struct [DListHead](DListHead.md) * head ) -``` - - **Description:** - -Inserts a node from the head of a doubly linked list. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
entryIndicates the pointer to the node to insert. For details, see DListHead. The parameter cannot be empty.
headIndicates the pointer to the linked list DListHead. The parameter cannot be empty.
- -## DListInsertTail\(\) - -``` -static void DListInsertTail (struct [DListHead](DListHead.md) * entry, struct [DListHead](DListHead.md) * head ) -``` - - **Description:** - -Inserts a node from the tail of a doubly linked list. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
entryIndicates the pointer to the node to insert. For details, see DListHead. The parameter cannot be empty.
headIndicates the pointer to the linked list DListHead. The parameter cannot be empty.
- -## DListIsEmpty\(\) - -``` -static bool DListIsEmpty (const struct [DListHead](DListHead.md) * head) -``` - - **Description:** - -Checks whether a doubly linked list is empty. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
headIndicates the pointer to the linked list DListHead. The parameter cannot be empty.
- -## DListMerge\(\) - -``` -static void DListMerge (struct [DListHead](DListHead.md) * list, struct [DListHead](DListHead.md) * head ) -``` - - **Description:** - -Merges two linked lists by adding the list specified by **list** to the head of the list specified by **head** and initializes the merged list. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
listIndicates the pointer to the linked list DListHead. The parameter cannot be empty.
headIndicates the pointer to the linked list DListHead. The parameter cannot be empty.
- -## DListRemove\(\) - -``` -static void DListRemove (struct [DListHead](DListHead.md) * entry) -``` - - **Description:** - -Removes a node from a doubly linked list. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
entryIndicates the pointer to the node to remove. For details, see DListHead. The parameter cannot be empty.
- -## HdfAddDelayedWork\(\) - -``` -bool HdfAddDelayedWork ([HdfWorkQueue](HdfWorkQueue.md) * queue, [HdfWork](HdfWork.md) * work, unsigned long ms ) -``` - - **Description:** - -Adds a delayed work item to a work queue. - -A delayed work item is added to a work queue after the configured delayed time \(ms\), and the thread of the work queue executes the work function. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
queueIndicates the pointer to the work queue HdfWorkQueue.
workIndicates the pointer to the delayed work item HdfWork.
- -**Returns:** - -Returns **true** if the operation is successful; returns **false** otherwise. - -## HdfAddWork\(\) - -``` -bool HdfAddWork ([HdfWorkQueue](HdfWorkQueue.md) * queue, [HdfWork](HdfWork.md) * work ) -``` - - **Description:** - -Adds a work item to a work queue. - -After a work item is added to a work queue, the thread of the work queue executes the function of the work item. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
queueIndicates the pointer to the work queue HdfWorkQueue.
workIndicates the pointer to the work item HdfWork.
- -**Returns:** - -Returns **true** if the operation is successful; returns **false** otherwise. - -## HdfCancelDelayedWorkSync\(\) - -``` -bool HdfCancelDelayedWorkSync ([HdfWork](HdfWork.md) * work) -``` - - **Description:** - -Cancels a delayed work item. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
workIndicates the pointer to the delayed work item HdfWork.
- -**Returns:** - -Returns **true** if the operation is successful; returns **false** otherwise. - -## HdfCancelWorkSync\(\) - -``` -bool HdfCancelWorkSync ([HdfWork](HdfWork.md) * work) -``` - - **Description:** - -Cancels a work item. This function waits until the work item is complete. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
workIndicates the pointer to the work item HdfWork.
- -**Returns:** - -Returns **true** if the operation is successful; returns **false** otherwise. - -## HdfDelayedWorkDestroy\(\) - -``` -void HdfDelayedWorkDestroy ([HdfWork](HdfWork.md) * work) -``` - - **Description:** - -Destroys a delayed work item. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
workIndicates the pointer to the delayed work item HdfWork.
- -## HdfDelayedWorkInit\(\) - -``` -int32_t HdfDelayedWorkInit ([HdfWork](HdfWork.md) * work, [HdfWorkFunc](DriverUtils.md#ga30665d61b03fae4a2ebc778c3d775ce5) func, void * arg ) -``` - - **Description:** - -Initializes a delayed work item. - -This function uses **func** and **arg** to initialize a work item. The work item is added to a work queue after the configured delayed time. The thread of the work queue executes this function, and **arg** is passed to **func**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
workIndicates the pointer to the delayed work item HdfWork.
funcIndicates the work execution function.
argIndicates the pointer to the argument of the work execution function.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-

HDF_ERR_MALLOC_FAIL

-

Memory allocation fails.

-
- -## HdfWorkBusy\(\) - -``` -unsigned int HdfWorkBusy ([HdfWork](HdfWork.md) * work) -``` - - **Description:** - -Obtains the status of a work item or delayed work item. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
workIndicates the pointer to the work item or delayed work item HdfWork.
- -**Returns:** - -Returns **HDF\_WORK\_BUSY\_PENDING** if the work item is pending; returns **HDF\_WORK\_BUSY\_RUNNING** if the work item is running. - -## HdfWorkDestroy\(\) - -``` -void HdfWorkDestroy ([HdfWork](HdfWork.md) * work) -``` - - **Description:** - -Destroys a work item. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
workIndicates the pointer to the work item HdfWork.
- -## HdfWorkInit\(\) - -``` -int32_t HdfWorkInit ([HdfWork](HdfWork.md) * work, [HdfWorkFunc](DriverUtils.md#ga30665d61b03fae4a2ebc778c3d775ce5) func, void * arg ) -``` - - **Description:** - -Initializes a work item. - -This function uses **func** and **arg** to initialize a work item. After the work item is added to a work queue, the thread of the work queue executes this function, and **arg** is passed to **func**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
workIndicates the pointer to the work item HdfWork.
funcIndicates the work execution function.
argIndicates the pointer to the argument of the work execution function.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-

HDF_ERR_MALLOC_FAIL

-

Memory allocation fails.

-
- -## HdfWorkQueueDestroy\(\) - -``` -void HdfWorkQueueDestroy ([HdfWorkQueue](HdfWorkQueue.md) * queue) -``` - - **Description:** - -Destroys a work queue. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
queueIndicates the pointer to the work queue HdfWorkQueue.
- -## HdfWorkQueueInit\(\) - -``` -int32_t HdfWorkQueueInit ([HdfWorkQueue](HdfWorkQueue.md) * queue, char * name ) -``` - - **Description:** - -Initializes a work queue. - -When a work queue is initialized, a thread is created. The thread cyclically executes the work items in the work queue, that is, executes their functions. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
queueIndicates the pointer to the work queue OsalWorkQueue.
nameIndicates the pointer to the work queue name.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-

HDF_ERR_MALLOC_FAIL

-

Memory allocation fails.

-
- diff --git a/api/api-SmartVision-Devices/ElementName.md b/api/api-SmartVision-Devices/ElementName.md deleted file mode 100755 index d53914f89bc3c70b8a9bb6d60b68718693edf822..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/ElementName.md +++ /dev/null @@ -1,84 +0,0 @@ -# ElementName - -- [Overview](#section1787351165631) -- [Summary](#section1715050882165631) -- [Data Fields](#pub-attribs) -- [Details](#section431137398165631) -- [Field](#section375384055165631) -- [abilityName](#a22d29ceba2daf19f799164aa4a92e849) -- [bundleName](#a5438d65fdb356f6ff52bffc452025f93) -- [deviceId](#a41e1f2d783d827efe86272c607a8524f) - -## **Overview** - -**Related Modules:** - -[BundleManager](BundleManager.md) - -**Description:** - -Defines the ability information. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

deviceId

-

char *

-

bundleName

-

char *

-

abilityName

-

char *

-
- -## **Details** - -## **Field ** - -## abilityName - -``` -char* ElementName::abilityName -``` - - **Description:** - -Pointer to the class name of the ability - -## bundleName - -``` -char* ElementName::bundleName -``` - - **Description:** - -Pointer to the bundle name of the application - -## deviceId - -``` -char* ElementName::deviceId -``` - - **Description:** - -Pointer to the ID of the device running the application - diff --git a/api/api-SmartVision-Devices/EtherHeader.md b/api/api-SmartVision-Devices/EtherHeader.md deleted file mode 100755 index 2841d12c027169c12e286fc9c0089b7565644250..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/EtherHeader.md +++ /dev/null @@ -1,49 +0,0 @@ -# EtherHeader - -- [Overview](#section238594087165631) -- [Summary](#section1047773173165631) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Defines the Ethernet header information of a data frame, including the destination address, source address, and Ethernet type. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

etherDhost [MAC_ADDR_SIZE]

-

uint8_t

-

etherShost [MAC_ADDR_SIZE]

-

uint8_t

-

etherType

-

uint16_t

-
- diff --git a/api/api-SmartVision-Devices/FS.md b/api/api-SmartVision-Devices/FS.md deleted file mode 100755 index 1454b89c097b97767fe2909b2ea262dc6cea4193..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/FS.md +++ /dev/null @@ -1,3364 +0,0 @@ -# FS - -- [Overview](#section1062091515165621) -- [Summary](#section1685696024165621) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Macros](#define-members) -- [Typedefs](#typedef-members) -- [Functions](#func-members) -- [Details](#section1643023632165621) -- [Macro Definition](#section292839151165621) -- [FTW\_DP](#ga8b34563aa640cd03e2ddf054b0b99e49) -- [Function](#section1726533183165621) -- [alphasort\(\)](#ga8a52fd9a3ded793b8200ac0a5a1f10d2) -- [basename\(\)](#gaa14fc3333d84f41eacc023626687aebd) -- [chmod\(\)](#ga1b893413bc424887bbe61f8d0952a0ee) -- [closedir\(\)](#gaaeac2b41e8c2c3a5f91c9bd511a8c0a6) -- [creat\(\)](#gafddc24a65767ae35f275be8ccf53e036) -- [dirname\(\)](#gab1b6028f4625caec30c1020e737216e2) -- [fallocate\(\)](#ga26ba05fc43886db02fe169b35e04bfdf) -- [fcntl\(\)](#gad39ebe4c4767eaa9a680777400cfaafe) -- [fstat\(\)](#ga198a57e185e8a036ad06345623b84521) -- [ftw\(\)](#ga8dda75835c2b90f305d96e908dc0f84d) -- [glob\(\)](#gae98601409da7fd3c85a9c219e1a9020c) -- [globfree\(\)](#gaa43d417234c8572d6e98fb1dc12a4794) -- [ioctl\(\)](#ga28db05c84676b387c2d8cfdd317bb9bd) -- [lstat\(\)](#ga879b7c433a19b6b07b42edcf3871c40f) -- [mkdir\(\)](#gaee98bbe743c2d14dbaa67f01c3fb9ed5) -- [mkdirat\(\)](#gae0b68526355956a8e3298fcb6a72e3bc) -- [mkfifo\(\)](#ga6b0f61de936f648da290c92ed36192c4) -- [mount\(\)](#gadaaf1ec8aa37137233fa25d2b3af9fc8) -- [nftw\(\)](#ga3fb6324259c86bfee53d3354798cfd43) -- [open\(\)](#ga219205a58e244a5acd35b767ac50ef9c) -- [opendir\(\)](#gad09dd96447776d2bc5d8321e4b499591) -- [readdir\(\)](#ga58257faf8b13b3f14558613c632b2373) -- [readdir\_r\(\)](#ga9f1bc61c37394eda9e74e0c79afec872) -- [rewinddir\(\)](#gad4fcb58b9194b1a3c1699654de963719) -- [scandir\(\)](#gaca6df630e382cf13bac90ed6e5c4141c) -- [seekdir\(\)](#gacf0a74ce364760e330619edb38eadfff) -- [stat\(\)](#gad2e0bcbe40344116102877f6268ee6ea) -- [statfs\(\)](#gae7af18cc5fa39f42a3be1bf1eb24119d) -- [statvfs\(\)](#ga41058769ad8ea7d7d467799f651b8b1a) -- [telldir\(\)](#ga4c2cd02bd612ae655782632c9f5227ec) -- [umask\(\)](#ga556063623e479c26c64544024a046024) -- [umount\(\)](#ga44634cfa8bcc732c29bcdf5822095422) -- [umount2\(\)](#ga2125a021d10f7a28a66cbc9335ad826f) -- [utime\(\)](#ga1299674b4b1934ebf0441388d07981a6) - -## **Overview** - -**Description:** - -Provides functions for file system, include file operations, directory operations and so on. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Name

-

Description

-

dirent.h

-

Provides functions and structures used for performing file system operations, including file read/write, directory traversal, and file system mounting.

-

fcntl.h

-

Declares structures and functions used for file and directory operations such as opening a file, creating a file, and allocating space.

-

ftw.h

-

Provides functions and structures related to file tree traversal.

-

glob.h

-

Provides functions and structures used to find path names matching a pattern and release the memory that was applied for during the search.

-

libgen.h

-

Provides functions related to file management, for example, obtaining directory and file names.

-

ioctl.h

-

Manipulates a device.

-

mount.h

-

Provides functions for mounting and unmounting a file system.

-

stat.h

-

Provides functions for file and directory operations.

-

statfs.h

-

Provides a function to obtain information about a file system.

-

statvfs.h

-

Provides a function and structure related to file system information operation, for example, viewing file system information.

-

utime.h

-

Provides the function and structure used for setting file access time and modification time.

-
- -## Data Structures - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

dirent

-

Defines the content of the directory.

-

FTW

-

Defines the file tree walker (FTW).

-

glob_t

-

Defines the search information.

-

stat

-

Defines the file information structure.

-

statvfs

-

Describes file system information.

-

utimbuf

-

Defines the file access time and modification time.

-
- -## Macros - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

O_ACCMODE (03|O_SEARCH)

-

Access mode.

-

O_RDONLY 00

-

Read-only.

-

O_WRONLY 01

-

Write-only.

-

O_RDWR 02

-

Read and write.

-

fallocate64 fallocate

-

Pre-allocates space to a file. See fallocate.

-

FTW_F 1

-

Regular file.

-

FTW_D 2

-

Directory.

-

FTW_DNR 3

-

Unreadable directory. Its subdirectories will not be traversed.

-

FTW_NS 4

-

The data of the stat structure cannot be obtained. The possible cause is that the permission is incorrect.

-

FTW_SL 5

-

Symbolic link.

-

FTW_DP 6

-
 

FTW_SLN 7

-

Symbolic link that names a non-existent file.

-

FTW_PHYS 1

-

Symbolic links that are not traversed. If not set, symbolic links are traversed by default.

-

FTW_MOUNT 2

-

Stay within the same file system.

-

FTW_CHDIR 4

-

chdir is called to go to the directory before reading the directory.

-

FTW_DEPTH 8

-

All subdirectories will be traversed before the directory itself.

-

GLOB_ERR 0x01

-

Return upon a read error.

-

GLOB_MARK 0x02

-

Append a slash (/) to each path, which corresponds to a directory.

-

GLOB_NOSORT 0x04

-

Do not sort the returned path names.

-

GLOB_DOOFFS 0x08

-

In the pglob parameter of the glob() function, reserve a string that has a length of pglob->gl_offs and ends with \0 at the beginning of the string list in pglob->pathv. That is, the newly matched string is appended to a position where the distance from the beginning of pglob->pathv is the length of pglob->gl_offs.

-

GLOB_NOCHECK 0x10

-

If no pattern matches, return the original pattern.

-

GLOB_APPEND 0x20

-

Append the results of this call to the results returned by a previous call to glob().

-

GLOB_NOESCAPE 0x40

-

Do not use a backslash () as an escape character.

-

GLOB_PERIOD 0x80

-

Allow a leading period to be matched by metacharacters.

-

GLOB_TILDE 0x1000

-

Carry out tilde expansion. If a tilde (~) is the only character in the pattern, or an initial tilde is followed immediately by a slash (/), then the home directory of the caller is substituted for the tilde.

-

GLOB_TILDE_CHECK 0x4000

-

Similar to GLOB_TILDE. The difference is that if the username is invalid, or the home directory cannot be determined, glob() returns GLOB_NOMATCH to indicate an error.

-

GLOB_NOSPACE 1

-

Memory insufficient.

-

GLOB_ABORTED 2

-

Read error.

-

GLOB_NOMATCH 3

-

No matching item is found.

-

GLOB_NOSYS 4

-

The function is not supported.

-
- -## Typedefs - - - - - - - - - - -

Typedef Name

-

Description

-

DIR

-

typedef struct __dirstream

-

Opens the handle of the folder directory.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

closedir (DIR *dirp)

-

int

-

Closes a specified directory.

-

opendir (const char *dirname)

-

DIR *

-

Opens a specified directory.

-

readdir (DIR *dirp)

-

struct dirent *

-

Reads a specified directory.

-

readdir_r (DIR *__restrict dirp, struct dirent *__restrict entry, struct dirent **__restrict result)

-

int

-

Reads a specified directory (thread-safe version).

-

rewinddir (DIR *dirp)

-

void

-

Resets a directory stream read position.

-

alphasort (const struct dirent **a, const struct dirent **b)

-

int

-

Sorts the directory entries in alphabetical order.

-

scandir (const char *dir, struct dirent ***namelist, int(*sel)(const struct dirent *), int(*compar)(const struct dirent **, const struct dirent **))

-

int

-

Scans directory to find the target entries.

-

seekdir (DIR *dirp, long offset)

-

void

-

Sets the position of the next readdir call in the directory stream.

-

telldir (DIR *dirp)

-

long

-

Obtains the current position in the specified directory stream.

-

creat (const char *path, mode_t mode)

-

int

-

Creates a file or rewrites an existing file.

-

open (const char *path, int oflags,...)

-

int

-

Opens a file.

-

fallocate (int fd, int mode, off_t offset, off_t len)

-

int

-

Pre-allocates space to a file.

-

fcntl (int fd, int cmd,...)

-

int

-

Manipulates a specified file descriptor.

-

ftw (const char *path, int(*fn)(const char *file, const struct stat *sb, int flag), int depth)

-

int

-

Traverses a file tree.

-

nftw (const char *path, int(*fn)(const char *file, const struct stat *sb, int flag, struct FTW *s), int fd_limit, int flags)

-

int

-

Traverses a file tree.

-

glob (const char *__restrict pattern, int flags, int(*errfunc)(const char *, int), glob_t *__restrict pglob)

-

int

-

Searches for path names that meet a specified pattern.

-

globfree (glob_t *pglob)

-

void

-

Frees allocated memory from a call to glob().

-

dirname (char *path)

-

char *

-

Obtains a directory name in a specified path.

-

basename (char *path)

-

char *

-

Obtains a file name (excluding the directory) in a specified path.

-

ioctl (int fd, int cmd,...)

-

int

-

Manipulates a device.

-

mount (const char *source, const char *target, const char *filesystemtype, unsigned long mountflags, const void *data)

-

int

-

Mounts a file system.

-

umount (const char *target)

-

int

-

Unmounts a file system.

-

umount2 (const char *target, int flags)

-

int

-

Unmounts a file system.

-

stat (const char *__restrict path, struct stat *__restrict buf)

-

int

-

Obtains file information.

-

fstat (int fd, struct stat *buf)

-

int

-

Obtains file status information.

-

lstat (const char *__restrict path, struct stat *__restrict buf)

-

int

-

Obtains file information.

-

mkdir (const char *pathname, mode_t mode)

-

int

-

Creates a directory.

-

mkfifo (const char *name, mode_t mode)

-

int

-

Creates a named pipe to implement inter-process communication.

-

mkdirat (int fd, const char *pathname, mode_t mode)

-

int

-

Creates a directory.

-

chmod (const char *pathname, mode_t mode)

-

int

-

Modifies permissions for a file.

-

umask (mode_t mode)

-

mode_t

-

Sets umask for a process.

-

statfs (const char *path, struct statfs *buf)

-

int

-

Obtains file system information of a file in a specified path.

-

statvfs (const char *__restrict path, struct statvfs *__restrict buf)

-

int

-

Obtains the file system information.

-

utime (const char *filename, const struct utimbuf *times)

-

int

-

Sets the access time and modification time of a file.

-
- -## **Details** - -## **Macro Definition ** - -## FTW\_DP - -``` -#define FTW_DP 6 -``` - - **Description:** - -@briefDirectory. All subdirectories in this directory have been traversed. - -## **Function ** - -## alphasort\(\) - -``` -int alphasort (const struct [dirent](dirent.md) ** a, const struct [dirent](dirent.md) ** b ) -``` - - **Description:** - -Sorts the directory entries in alphabetical order. - -This function is used to sort the two directory entries passed through the input parameters in alphabetical order. Generally, these parameters are passed in [scandir](FS.md#gaca6df630e382cf13bac90ed6e5c4141c) as its last parameter. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
aIndicates the pointer to directory entry a.
aIndicates the pointer to directory entry b.
- -**Returns:** - -Returns an integer greater than, equal to, or less than **0**, respectively, based on whether the name of the directory entry to which **a** points is lexically greater than, equal to, or less than the directory. - -## basename\(\) - -``` -char* basename (char * path) -``` - - **Description:** - -Obtains a file name \(excluding the directory\) in a specified path. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
pathIndicates the pointer to the path.
- -**Returns:** - -Returns the file name if the operation is successful; returns **NULL** otherwise. - -## chmod\(\) - -``` -int chmod (const char * pathname, mode_t mode ) -``` - - **Description:** - -Modifies permissions for a file. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
pathnameIndicates the pointer to the path of the file.
modeIndicates the new file permission.
- -**Attention:** - -This function can be used only in the JFFS2 file system. - -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table otherwise. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

The pathname is a null pointer or an empty string.

-

EACCES

-

The permission bit of the file mode does not allow the requested access, or the search permission is denied on the path prefix directory.

-

EFAULT

-

Incorrect IP address.

-

ENAMETOOLONG

-

The path name length is greater than the value of NAME_MAX.

-

ENOENT

-

The directory component in the path name does not exist.

-

ENOMEM

-

Insufficient memory.

-

ENOTDIR

-

A component of the path prefix is the name of an existing file. The file is neither a directory nor a symbolic link of a directory.

-

EPERM

-

Operation not permitted or access denied because the access is prohibited or the directory is full.

-

EROFS

-

The physical drive is write-protected.

-

EEXIST

-

The file or directory already exists.

-

ENOSYS

-

The function is not supported.

-
- -## closedir\(\) - -``` -int closedir ([DIR](FS.md#ga0ebe68390948c14bb9d82987adbfc849) * dirp) -``` - - **Description:** - -Closes a specified directory. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
dirpIndicates the pointer to the structure representing the directory to close.
- -**Returns:** - -Returns **0** if the directory is successfully closed; returns **-1** and sets **errno** to the following value otherwise. - - - - - - - - - - -

errno

-

Description

-

EBADF

-

dirp is not a valid opened directory stream.

-
- -## creat\(\) - -``` -int creat (const char * path, mode_t mode ) -``` - - **Description:** - -Creates a file or rewrites an existing file. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
pathIndicates the pointer to the name of the file to create or rewrite.
modeIndicates permissions on the file.
- -**Returns:** - -Returns **0** if the file is created or rewritten successfully; returns **-1** and sets **errno** to a value in the following table otherwise. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

path points to an invalid path.

-

ENAMETOOLONG

-

The length of path is greater than the value of NAME_MAX.

-

ENXIO

-

Invalid inode or the inode is not a mount point.

-

EMFILE

-

All file descriptors that can be used by the process are opened.

-

EPERM

-

The file structure corresponding to the file descriptor cannot be obtained.

-

EACCES

-

Access denied by the permission bit of file mode

-

ENOMEM

-

The memory is insufficient.

-

ENODEV

-

The device does not exist.

-

EEXIST

-

O_CREAT and O_EXCL are set.

-

EIO

-

A hardware error occurs at the low-level disk I/O layer. As a result, the physical drive cannot work.

-

ENFILE

-

The number of opened files in the system has reached the maximum.

-

ENOTDIR

-

A component of the path prefix is the name of an existing file and is not a directory.

-

EBUSY

-

The operation is rejected according to the file sharing policy.

-

ENOTEMPTY

-

The directory is not empty.

-

ELOOP

-

Too many symbolic links are encountered.

-

EFAULT

-

The IP address is incorrect.

-
- -## dirname\(\) - -``` -char* dirname (char * path) -``` - - **Description:** - -Obtains a directory name in a specified path. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
pathIndicates the pointer to the path.
- -**Returns:** - -Returns the directory name if the operation is successful; returns **NULL** otherwise. - -## fallocate\(\) - -``` -int fallocate (int fd, int mode, off_t offset, off_t len ) -``` - - **Description:** - -Pre-allocates space to a file. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
fdIndicates the file descriptor.
modeIndicates the operation mode. Only FALLOC_FL_KEEP_SIZE is supported.
offsetIndicates the offset of the file to allocate.
lenIndicates the size of the disk space to be allocated to the file.
- -**Attention:** - -This function can be used only in the FAT file system. - -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table otherwise. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

The value of len or offset is less than 0 or greater than that of INT_MAX, or the value of mode is not FALLOC_FL_KEEP_SIZE.

-

EBADF

-

fd is not a valid file descriptor, or the basic file system does not support this operation.

-

EAGAIN

-

The file list is null.

-

EACCES

-

Access denied by the authority bit of file mode

-

EIO

-

An I/O error occurs when data is read from or written to the file system.

-

EROFS

-

The physical drive is write-protected.

-

EPERM

-

The operation is not allowed or the access is rejected.

-

EBUSY

-

The operation is rejected according to the file sharing policy.

-
- -## fcntl\(\) - -``` -int fcntl (int fd, int cmd, ... ) -``` - - **Description:** - -Manipulates a specified file descriptor. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
fdIndicates the file descriptor.
cmdIndicates the command used to manipulate the file descriptor.
- - - - - - - - - - - - - - - - -

cmd

-

Description

-

F_DUPFD

-

Copy a new file descriptor (fd is a file).

-

F_GETFL

-

Obtain the status of the file specified by fd. (fd is a file or sockets are available.)

-

F_SETFL

-

Set the file descriptor status. (fd is a file or sockets are available.)

-
- -**Returns:** - -Returns the value depending on **cmd** if the operation is successful; returns **-1** and sets **errno** to a value in the following table otherwise. - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EAGAIN

-

The operation is prohibited.

-

EBADF

-

fd is an invalid file descriptor.

-

EFAULT

-

Beyond the accessible address space.

-

EINVAL

-

The command specified by cmd cannot be recognized.

-

ENOLCK

-

Too many segment locks open, lock table is full, or a remote locking protocol failed.

-

EPERM

-

Attempt to clear the O_APPEND flag on a file that has the append-only attribute set.

-
- -## fstat\(\) - -``` -int fstat (int fd, struct [stat](stat.md) * buf ) -``` - - **Description:** - -Obtains file status information. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
fdIndicates the file descriptor.
bufIndicates the pointer to a stat structure into which file information is placed.
- -**Returns:** - -Returns **0** if file information is obtained successfully; returns **-1** and sets **errno** to a value in the following table otherwise. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EBADF

-

fd is an invalid file descriptor.

-

EAGAIN

-

The file list is null.

-

EINVAL

-

Invalid parameter.

-

ENOENT

-

A component of path does not name an existing file or path is an empty string.

-

ENAMETOOLONG

-

The path name length is greater than the value of NAME_MAX.

-

ENOMEM

-

Insufficient memory.

-

ENOSYS

-

The function is not supported.

-

EACCES

-

Search permission is denied on a component of the path prefix.

-

EIO

-

An I/O error occurs when data is read from or written to the file system.

-

EROFS

-

The physical drive is write-protected.

-

ENOSPC

-

No available space on the device.

-

EISDIR

-

The named file is a directory.

-

EPERM

-

Operation not permitted or access denied because the access is prohibited or the directory is full.

-

EBUSY

-

The operation is rejected according to the file sharing policy.

-

EPROTO

-

The protocol in NFS is incorrect.

-

ENODEV

-

No such device.

-

EFAULT

-

Incorrect IP address.

-
- -## ftw\(\) - -``` -int ftw (const char * path, int(*)(const char *file, const struct [stat](stat.md) *sb, int flag) fn, int depth ) -``` - - **Description:** - -Traverses a file tree. - -This function is used to traverse a file tree for search. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
pathIndicates the pointer to the file directory to traverse.
fnIndicates the pointer to the function to be called for the found entry. For the fn function, file identifies the path of the file relative to path, and sb indicates the pointer to the stat structure. flag indicates the flag. The values of flag are as follows:
depthIndicates the number of files that can be opened during traversal.
- - - - - - - - - - - - - - - - - - - - - - -

value

-

Description

-

FTW_F

-

Regular file

-

FTW_D

-

Directory

-

FTW_DNR

-

Unreadable directory. Its subdirectories will not be traversed.

-

FTW_SL

-

Symbolic link

-

FTW_NS

-

The data of the stat structure cannot be obtained. The possible cause is that the permission is incorrect.

-
- -**Returns:** - -Returns **0** if the tree is traversed; returns the value that is returned by the **fn\(\)** function if the traversal is interrupted; returns **-1** if an error occurs. - -## glob\(\) - -``` -int glob (const char *__restrict pattern, int flags, int(*)(const char *, int) errfunc, [glob_t](glob_t.md) *__restrict pglob ) -``` - - **Description:** - -Searches for path names that meet a specified pattern. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
patternIndicates the pattern you want to match.
flagsIndicates the matching mode.
errfuncIndicates the pointer to the error processing callback function. If errfunc is not a null pointer, errfunc() is called when an error occurs (opendir(), readdir(), or stat() fails) during the search. If the function returns a non-zero value or GLOB_ERR is set, glob() terminates the entire search process.
pglobIndicates the pointer to the address storing the matched path names.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

flags

-

Description

-

GLOB_ERR

-

GLOB_ERR

-

GLOB_MARK

-

GLOB_MARK

-

GLOB_NOSORT

-

GLOB_NOSORT

-

GLOB_DOOFFS

-

GLOB_DOOFFS

-

GLOB_NOCHECK

-

GLOB_NOCHECK

-

GLOB_APPEND

-

GLOB_APPEND

-

GLOB_NOESCAPE

-

GLOB_NOESCAPE

-

GLOB_PERIOD

-

GLOB_PERIOD

-

GLOB_TILDE

-

GLOB_TILDE

-

GLOB_TILDE_CHECK

-

GLOB_TILDE_CHECK

-
- -**Returns:** - -Returns **0** on successful completion; returns [GLOB\_NOSPACE](FS.md#gab53de39e075e6fb9a11678341772930b) for running out of memory; returns [GLOB\_ABORTED](FS.md#gab5de50cedafa21283878657d05fb2ba8) for a read error; returns [GLOB\_NOMATCH](FS.md#gaed760cf90fd4398067cdb679ebe60312) for no match found. - -## globfree\(\) - -``` -void globfree ([glob_t](glob_t.md) * pglob) -``` - - **Description:** - -Frees allocated memory from a call to **[glob\(\)](FS.md#gae98601409da7fd3c85a9c219e1a9020c)**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
pglobIndicates the pointer to the address of memory dynamically allocated for a glob call.
- -## ioctl\(\) - -``` -int ioctl (int fd, int cmd, ... ) -``` - - **Description:** - -Manipulates a device. - -This function is used to perform specified operations on an input device file descriptor. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
fdIndicates the file descriptor of the device (file-related file descriptors are not supported).
cmdIndicates the operation instruction for the device. You can define it based on the specific device.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table otherwise. - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EBADF

-

fd is an invalid file descriptor.

-

EFAULT

-

An inaccessible memory area is referenced.

-

EINVAL

-

The command request is invalid.

-

ENOTTY

-

fd is not associated with a character special device.

-
- -## lstat\(\) - -``` -int lstat (const char *__restrict path, struct [stat](stat.md) *__restrict buf ) -``` - - **Description:** - -Obtains file information. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
pathIndicates the file path.
bufIndicates the pointer to a stat structure into which file information is placed.
- -**Returns:** - -Returns **0** if file information is obtained successfully; returns **-1** and sets **errno** to a value in the following table otherwise. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid parameter.

-

ENOENT

-

A component of path does not name an existing file or path is an empty string.

-

ENAMETOOLONG

-

The path name length is greater than the value of NAME_MAX.

-

ENOMEM

-

Insufficient memory.

-

ENOSYS

-

The function is not supported.

-

EAGAIN

-

The file list is null.

-

EACCES

-

The permission bit of the file mode does not allow the requested access, or the search permission is denied on the path prefix component.

-

EEXIST

-

The file or directory already exists.

-

EIO

-

An I/O error occurs when data is read from or written to the file system.

-

EROFS

-

The physical drive is write-protected.

-

ENOSPC

-

No available space on the device.

-

ENFILE

-

The number of opened files in the system has reached the maximum.

-

ENOTEMPTY

-

The directory is not empty.

-

EISDIR

-

The named file is a directory.

-

ENOTDIR

-

A component of the path prefix is the name of an existing file. The file is neither a directory nor a symbolic link of a directory.

-

EPERM

-

Operation not permitted or access denied because the access is prohibited or the directory is full.

-

EBUSY

-

The operation is rejected according to the file sharing policy.

-

EPROTO

-

The protocol in NFS is incorrect.

-

ENODEV

-

No such device.

-

EFAULT

-

Incorrect IP address.

-
- -## mkdir\(\) - -``` -int mkdir (const char * pathname, mode_t mode ) -``` - - **Description:** - -Creates a directory. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
pathnameIndicates the pointer to the name of the directory to create.
modeIndicates the directory permission.
- -**Attention:** - -This function can NOT be used in the PROC file system. - -**Returns:** - -Returns **0** if the directory is created successfully; returns **-1** and sets **errno** to a value in the following table otherwise. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

The pathname is a null pointer or an empty string.

-

EACCES

-

The permission bit of the file mode does not allow the requested access, or the search permission is denied on the path prefix directory.

-

ENAMETOOLONG

-

The path name length is greater than the value of NAME_MAX.

-

ENOENT

-

The directory component in the path name does not exist.

-

EEXIST

-

The file or directory already exists.

-

EIO

-

An I/O error occurs when data is read from or written to the file system.

-

EROFS

-

The physical drive is write-protected.

-

ENOSPC

-

No available space on the device.

-

EPERM

-

Operation not permitted or access denied because the access is prohibited or the directory is full.

-

EBUSY

-

The operation is rejected according to the file sharing policy.

-

ENOSYS

-

The function is not supported.

-

EPROTO

-

The protocol in NFS is incorrect.

-

EFAULT

-

Incorrect IP address.

-
- -## mkdirat\(\) - -``` -int mkdirat (int fd, const char * pathname, mode_t mode ) -``` - - **Description:** - -Creates a directory. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
fdIndicates the file descriptor of the target directory. (Currently, only AT_FDCWD is supported.)
pathnameIndicates the pointer to the name of the directory to create.
modeIndicates the directory permission.
- -**Attention:** - -This function can NOT be used in the PROC file system. - - Currently, the relative path is not supported. \(**fd** must be **AT\_FDCWD**, and the **pathname** argument is an absolute path.\) - -**Returns:** - -Returns **0** if the directory is created successfully; returns **-1** and sets **errno** to a value in the following table otherwise. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

The pathname is a null pointer or an empty string.

-

EACCES

-

The permission bit of the file mode does not allow the requested access, or the search permission is denied on the path prefix directory.

-

ENAMETOOLONG

-

The path name length is greater than the value of NAME_MAX.

-

ENOENT

-

The directory component in the path name does not exist.

-

EEXIST

-

The file or directory already exists.

-

EIO

-

An I/O error occurs when data is read from or written to the file system.

-

EROFS

-

The physical drive is write-protected.

-

ENOSPC

-

No available space on the device.

-

EPERM

-

Operation not permitted or access denied because the access is prohibited or the directory is full.

-

EBUSY

-

The operation is rejected according to the file sharing policy.

-

ENOSYS

-

The function is not supported.

-

EPROTO

-

The protocol in NFS is incorrect.

-

EFAULT

-

Incorrect IP address.

-
- -## mkfifo\(\) - -``` -int mkfifo (const char * name, mode_t mode ) -``` - - **Description:** - -Creates a named pipe to implement inter-process communication. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
nameIndicates the pointer to the name of the pipe to create.
modeNot supported.
- -**Attention:** - -Permission control is not supported. The number of pipes that can be created is not limited. Pipes can be created only in the **/dev** directory. - -**Returns:** - -Returns **0** if the pipe is created successfully; returns **-1** and sets **errno** to a value in the following table otherwise. - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid input parameter (for example, empty address, file name too long or the file is not in the /dev directory).

-

EEXIST

-

The file already exists.

-

ENOMEM

-

Insufficient memory.

-
- -## mount\(\) - -``` -int mount (const char * source, const char * target, const char * filesystemtype, unsigned long mountflags, const void * data ) -``` - - **Description:** - -Mounts a file system. - -Mounts a device \(referenced by a file system name\) to a specified directory. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
sourceIndicates the pointer to the device to mount.
targetIndicates the pointer to the path of the mount point.
filesystemtypeIndicates the pointer to the file system type.
mountflagsIndicates the mounting flag.
dataIndicates the pointer to the mounting data.
- -**Returns:** - -Returns **0** if the mounting is successful; returns **-1** and sets **errno** to a value in the following table otherwise. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EACCES

-

A component of the path was not searchable.

-

EBUSY

-

source is already mounted.

-

EFAULT

-

One of the pointer parameters points outside the user address space.

-

EINVAL

-

source cannot be mounted.

-

ELOOP

-

Too many links encountered during path name resolution.

-

EMFILE

-

(Non-block device) Virtual device table is full.

-

ENAMETOOLONG

-

The path name length is greater than the value of MAXPATHLEN.

-

ENODEV

-

No such file system type is configured in the kernel.

-

ENOENT

-

A path name is null or has a nonexistent component.

-

ENOMEM

-

Insufficient memory.

-

ENOTBLK

-

source is not a block device.

-

ENOTDIR

-

target or the prefix of source is not a directory.

-

ENGIO

-

No such device.

-

EPERM

-

No permission.

-
- -## nftw\(\) - -``` -int nftw (const char * path, int(*)(const char *file, const struct [stat](stat.md) *sb, int flag, struct [FTW](FTW.md) *s) fn, int fd_limit, int flags ) -``` - - **Description:** - -Traverses a file tree. - -This function is used to traverse a file tree. It has a similar effect to [ftw](FS.md#ga8dda75835c2b90f305d96e908dc0f84d) except that it takes an additional parameter **flags**. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
pathIndicates the pointer to the file directory to traverse.
fnIndicates the pointer to the function to be called for the found entry. For the fn function, file identifies the path of the file relative to path, and sb indicates the pointer to the stat structure. flag indicates the flag. The values of flag are as follows: The fourth argument of fn() is a pointer to a FTW structure.
fd_limitIndicates the number of files that can be opened during traversal.
flagsIndicates the traversal action. It is a bitwise inclusive-OR of zero or more of the following flags:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

value

-

Description

-

FTW_F

-

Regular file

-

FTW_D

-

Directory

-

FTW_DNR

-

Unreadable directory. Its subdirectories will not be traversed.

-

FTW_SL

-

Symbolic link

-

FTW_NS

-

The data of the stat structure cannot be obtained. The possible cause is that the permission is incorrect.

-

FTW_DP

-

Directory. All subdirectories have been traversed.

-

FTW_SLN

-

Symbolic link that names a non-existent file

-
- - - - - - - - - - - - - - - - - - - -

value

-

Description

-

FTW_CHDIR

-

Go to the directory through chdir before reading the directory.

-

FTW_DEPTH

-

All subdirectories will be traversed before the directory itself.

-

FTW_MOUNT

-

Stay within the same file system.

-

FTW_PHYS

-

Symbolic links that are not traversed. If not set, symbolic links are traversed by default.

-
- -**Returns:** - -Returns **0** if the tree is traversed; returns the value that is returned by the **fn\(\)** function if the traversal is interrupted; returns **-1** if an error occurs. - -## open\(\) - -``` -int open (const char * path, int oflags, ... ) -``` - - **Description:** - -Opens a file. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
pathIndicates the pointer to the name of the file to open.
oflagsIndicates the file access mode. Available values are as follows:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

oflags

-

Description

-

O_RDONLY

-

Read-only

-

O_WRONLY

-

Write-only

-

O_RDWR

-

Read and write

-

O_APPEND

-

If set, the file offset will be set to the end of the file prior to each write.

-

O_CREAT

-

If the file does not exist, it will be created.

-

O_LARGEFILE

-

A file exceeding 2 GB can be created.

-

O_TRUNC

-

If the file is opened successfully with O_WRONLY or O_RDWR, its length is truncated to 0.

-

O_EXCL

-

Used together with O_CREAT. This function fails if the file exists.

-

O_DIRECTORY

-

This flag must be added for opening a directory. Otherwise, the directory fails to be opened.

-
- -**Attention:** - -This function can NOT be used in the PROC file system to create a file. This function is used to open a file. If the file does not exist, this function creates a file and opens it. - -**Returns:** - -Returns the file descriptor if the file is opened successfully; returns **-1** and sets **errno** to a value in the following table otherwise. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EACCES

-

Search permission is denied on a component of the path prefix.

-

EINVAL

-

The path name format is invalid.

-

ENAMETOOLONG

-

The length of path is greater than the value of NAME_MAX.

-

ENOENT

-

The O_CREAT flag is not set and the named file does not exist.

-

ENXIO

-

Inode is invalid, not a normal character driver, or not a mount point.

-

EMFILE

-

All available file descriptors of the process are opened.

-

EPERM

-

The file structure corresponding to the file descriptor cannot be obtained.

-

EEXIST

-

O_CREAT and O_EXCL are set.

-

EIO

-

A hardware error occurs at the low-level disk I/O layer. As a result, the physical drive cannot work.

-

EROFS

-

The named file resides on a read-only file system, and either O_WRONLY, O_RDWR, O_CREAT (if file does not exist), or O_TRUNC is set in the oflags parameter.

-

ENOSPC

-

The directory or file system that would contain the new file cannot be expanded, the file does not exist, and O_CREAT is specified.

-

ENFILE

-

The number of opened files in the system has reached the maximum.

-

EISDIR

-

The named file is a directory, and oflags includes O_WRONLY, O_RDWR, or O_CREAT without O_DIRECTORY.

-

ENOTDIR

-

A component of the path prefix names an existing file that is not a directory.

-

EBUSY

-

The operation is rejected according to the file sharing policy.

-

ENODEV

-

The device does not exist.

-

ENOTEMPTY

-

The directory is not empty.

-

ELOOP

-

Too many symbolic links are encountered.

-

EFAULT

-

The IP address is incorrect.

-
- -## opendir\(\) - -``` -[DIR](FS.md#ga0ebe68390948c14bb9d82987adbfc849)* opendir (const char * dirname) -``` - - **Description:** - -Opens a specified directory. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
dirnameIndicates the pointer to the name of directory to open.
- -**Returns:** - -Returns the pointer to the **DIR** structure representing the directory if it is opened successfully; returns **NULL** and sets **errno** to a value in the following table otherwise. - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

The dirname is empty.

-

ENAMETOOLONG

-

The length of the path name string is longer than the value of NAME_MAX.

-

ENOENT

-

The path component does not exist.

-

ENOMEM

-

The storage memory is insufficient.

-

ENOTDIR

-

dirname is not a directory.

-
- -## readdir\(\) - -``` -struct [dirent](dirent.md)* readdir ([DIR](FS.md#ga0ebe68390948c14bb9d82987adbfc849) * dirp) -``` - - **Description:** - -Reads a specified directory. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
dirpIndicates the pointer to the directory structure.
- -**Returns:** - -Returns the pointer to the **dirent** structure representing the directory if it is read successfully; returns **NULL** if reaching the end of the directory stream or the directory fails to be read. If the directory fails to be read, the corresponding error code is returned. - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EACCES

-

This feature is not supported by the file system.

-

ENAMETOOLONG

-

The path name length is greater than the value of NAME_MAX.

-

ENOENT

-

The current position in the directory stream is invalid.

-

EBADF

-

dirp is not an opened directory stream.

-
- -## readdir\_r\(\) - -``` -int readdir_r ([DIR](FS.md#ga0ebe68390948c14bb9d82987adbfc849) *__restrict dirp, struct [dirent](dirent.md) *__restrict entry, struct [dirent](dirent.md) **__restrict result ) -``` - - **Description:** - -Reads a specified directory \(thread-safe version\). - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
dirpIndicates the pointer to the directory structure.
entryIndicates the entry read from the dirp stream.
resultIndicates the pointer to the returned buffer.
- -**Returns:** - -Returns **0**. If the directory fails to be read, **errno** is sets to a value in the following table. - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EACCES

-

This feature is not supported by the file system.

-

ENAMETOOLONG

-

The path name length is greater than the value of NAME_MAX.

-

ENOENT

-

The current position in the directory stream is invalid.

-

EBADF

-

dirp is not an opened directory stream.

-
- -## rewinddir\(\) - -``` -void rewinddir ([DIR](FS.md#ga0ebe68390948c14bb9d82987adbfc849) * dirp) -``` - - **Description:** - -Resets a directory stream read position. - -This function is used to change the current read position of the specified directory stream to the original read position \(that is, the start position after the directory stream is opened by [opendir](FS.md#gad09dd96447776d2bc5d8321e4b499591)\). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
dirpIndicates the pointer to the directory stream whose read position needs to be reset.
- - - - - - - - - - -

errno

-

Description

-

EBADF

-

dirp is not an opened directory stream.

-
- -## scandir\(\) - -``` -int scandir (const char * dir, struct [dirent](dirent.md) *** namelist, int(*)(const struct [dirent](dirent.md) *) sel, int(*)(const struct [dirent](dirent.md) **, const struct [dirent](dirent.md) **) compar ) -``` - - **Description:** - -Scans directory to find the target entries. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
dirIndicates the pointer to the directory to scan.
namelistIndicates the array storing the directory entries filtered by the function referenced by the sel parameter.
selIndicates the filtering condition. You can customize the function referenced by this parameter. Value 0 is returned if the filtering condition is not met; a non-zero value is returned otherwise.
comparIndicates the pointer to the function for sorting the directory entries.
- -**Returns:** - -Returns the number of entries copied to the **namelist** array if the scanning is successful; returns **-1** and sets **errno** to a value in the following table otherwise. - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

dir is empty.

-

ENAMETOOLONG

-

The length of the path name string is greater than the value of NAME_MAX.

-

ENOENT

-

The directory component does not exist.

-

ENOMEM

-

The storage memory is insufficient.

-

ENOTDIR

-

dir is not a directory.

-

EACCES

-

This feature is not supported by the file system.

-
- -## seekdir\(\) - -``` -void seekdir ([DIR](FS.md#ga0ebe68390948c14bb9d82987adbfc849) * dirp, long offset ) -``` - - **Description:** - -Sets the position of the next [readdir](FS.md#ga58257faf8b13b3f14558613c632b2373) call in the directory stream. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
dirpIndicates the pointer to the directory stream in which the position of the next readdir call needs to be set.
offsetIndicates the offset of the position relative to the current position.
- -## stat\(\) - -``` -int [stat](stat.md) (const char *__restrict path, struct [stat](stat.md) *__restrict buf ) -``` - - **Description:** - -Obtains file information. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
pathIndicates the file path.
bufIndicates the pointer to a stat structure into which file information is placed.
- -**Returns:** - -Returns **0** if file information is obtained successfully; returns **-1** and sets **errno** to a value in the following table otherwise. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid parameter.

-

ENOENT

-

A component of path does not name an existing file or path is an empty string.

-

ENAMETOOLONG

-

The path name length is greater than the value of NAME_MAX.

-

ENOMEM

-

Insufficient memory.

-

ENOSYS

-

The function is not supported.

-

EAGAIN

-

The file list is null.

-

EACCES

-

The permission bit of the file mode does not allow the requested access, or the search permission is denied on the path prefix component.

-

EEXIST

-

The file or directory already exists.

-

EIO

-

An I/O error occurs when data is read from or written to the file system.

-

EROFS

-

The physical drive is write-protected.

-

ENOSPC

-

No available space on the device.

-

ENFILE

-

The number of opened files in the system has reached the maximum.

-

ENOTEMPTY

-

The directory is not empty.

-

EISDIR

-

The named file is a directory.

-

ENOTDIR

-

A component of the path prefix is the name of an existing file. The file is neither a directory nor a symbolic link of a directory.

-

EPERM

-

Operation not permitted or access denied because the access is prohibited or the directory is full.

-

EBUSY

-

The operation is rejected according to the file sharing policy.

-

EPROTO

-

The protocol in NFS is incorrect.

-

ENODEV

-

No such device.

-

EFAULT

-

Incorrect IP address.

-
- -## statfs\(\) - -``` -int statfs (const char * path, struct statfs * buf ) -``` - - **Description:** - -Obtains file system information of a file in a specified path. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
pathIndicates the pointer to the name of the target file.
bufIndicates the pointer to a statfs structure that stores the information about the file system.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EACCES

-

Search permission is denied on a component of the path prefix.

-

EFAULT

-

buf or path points to an invalid address.

-

EINTR

-

The function call was interrupted by a signal.

-

EIO

-

An I/O error occurred while reading from the file system.

-

ELOOP

-

Too many symbolic links were found.

-

ENAMETOOLONG

-

path is too long.

-

ENOENT

-

The file referred to by path does not exist.

-

ENOMEM

-

Insufficient memory.

-

ENOSYS

-

The operation is not supported.

-

ENOTDIR

-

A component of the path prefix of path is not a directory.

-

EOVERFLOW

-

Information overflow

-
- -## statvfs\(\) - -``` -int [statvfs](statvfs.md) (const char *__restrict path, struct [statvfs](statvfs.md) *__restrict buf ) -``` - - **Description:** - -Obtains the file system information. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
pathIndicates the pointer to the path name of the file.
bufIndicates the pointer to the statvfs structure that stores the obtained file system information.
- -**Returns:** - -Returns **0** if the file system information is obtained successfully; returns **-1** and sets **errno** to a value in the following table otherwise. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EACCES

-

Search permission is denied on a component of the path prefix.

-

EFAULT

-

buf or path points to an invalid address.

-

EINTR

-

This call was interrupted by a signal.

-

EIO

-

An I/O error occurred while reading from the file system.

-

ELOOP

-

Too many symbolic links were found.

-

ENAMETOOLONG

-

path is too long.

-

ENOENT

-

The file specified by path does not exist.

-

ENOMEM

-

Insufficient memory.

-

ENOSYS

-

The file system does not support this call.

-

ENOTDIR

-

A component of the path prefix of path is not a directory.

-

EOVERFLOW

-

Information overflows.

-
- -## telldir\(\) - -``` -long telldir ([DIR](FS.md#ga0ebe68390948c14bb9d82987adbfc849) * dirp) -``` - - **Description:** - -Obtains the current position in the specified directory stream. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
dirpIndicates the pointer to the directory stream.
- -**Returns:** - -Returns the current position in the directory stream if the operation is successful; returns **-1** and sets **errno** to the value in the following table otherwise. - - - - - - - - - - -

errno

-

Description

-

EBADF

-

drip is not an opened directory stream.

-
- -## umask\(\) - -``` -mode_t umask (mode_t mode) -``` - - **Description:** - -Sets umask for a process. - -This function sets the umask of the current process file and returns the previous value of the umask. umask is used to turn off permission bits corresponding to in the **mode** parameter. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
modeUsed to specify the umask value of a process.
- -**Returns:** - -Returns the previous value of the umask. This function call always succeeds. - -## umount\(\) - -``` -int umount (const char * target) -``` - - **Description:** - -Unmounts a file system. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
targetIndicates the pointer to the path of the file system to unmount.
- -**Returns:** - -Returns **0** if the file system is unmounted successfully; returns **-1** and sets **errno** to a value in the following table otherwise. - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EBUSY

-

target could not be unmounted because it is busy.

-

EFAULT

-

target points outside the user address space.

-

EINVAL

-

target is not a mount point.

-

ENAMETOOLONG

-

The path length is greater than the value of MAXPATHLEN.

-

ENOENT

-

A path name is null or has a nonexistent component.

-

ENOMEM

-

Insufficient memory.

-

EPERM

-

No permission.

-
- -## umount2\(\) - -``` -int umount2 (const char * target, int flags ) -``` - - **Description:** - -Unmounts a file system. - -This function is used to unmount a file system. Currently, the value of **flags** can only be **0**. In this case, this function is the same as **[umount\(\)](FS.md#ga44634cfa8bcc732c29bcdf5822095422)**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
targetIndicates the pointer to the path of the file system to unmount.
flagsIndicates the control flag. (Currently, the value of flags can only be 0. In this case, this function is the same as umount().)
- -**Returns:** - -Returns **0** if the file system is unmounted successfully; returns **-1** and sets **errno** to a value in the following table otherwise. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EBUSY

-

target could not be unmounted because it is busy.

-

EFAULT

-

target points outside the user address space.

-

EINVAL

-

target is not a mount point or flags value is not 0.

-

ENAMETOOLONG

-

The path length is greater than the value of MAXPATHLEN.

-

ENOENT

-

A path name is null or has a nonexistent component.

-

ENOMEM

-

Insufficient memory.

-

EPERM

-

No permission.

-

ENOSYS

-

The function call is not supported. (flags value is not 0.)

-
- -## utime\(\) - -``` -int utime (const char * filename, const struct [utimbuf](utimbuf.md) * times ) -``` - - **Description:** - -Sets the access time and modification time of a file. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
filenameIndicates the pointer to the name of the file whose access time and modification time need to be set.
timesIndicates the pointer to the time to which the access time and modification time are set. If times is a null pointer, then the access time and modification time are set to the current time.
- -**Returns:** - -Returns **0** if the access time and modification time are set successfully; returns **-1** and sets **errno** to a value in the following table otherwise. - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

filename is null or times is invalid.

-

ENAMETOOLONG

-

The length of the component in the path name is greater than the value of NAME_MAX.

-

ENOENT

-

Some paths do not exist.

-

ENOSYS

-

This function is not supported.

-

EACCES

-

The file system is read-only.

-

ENOMEM

-

Insufficient memory.

-

EIO

-

A hardware error occurs at the underlying disk I/O layer.

-
- diff --git a/api/api-SmartVision-Devices/FTW.md b/api/api-SmartVision-Devices/FTW.md deleted file mode 100755 index cd71f430c0372b6a46860ada8ddfb68c6617f3ed..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/FTW.md +++ /dev/null @@ -1,70 +0,0 @@ -# FTW - -- [Overview](#section2113894244165631) -- [Summary](#section719265223165631) -- [Data Fields](#pub-attribs) -- [Details](#section2063003499165631) -- [Field](#section956008264165631) -- [base](#adc64b6d8f0f13269fdb026b67c1a6b11) -- [level](#af3d03dada9fed0c37d2cb30ff742c130) - -## **Overview** - -**Related Modules:** - -[FS](FS.md) - -**Description:** - -Defines the file tree walker \([FTW](FTW.md)\). - -**[ftw.h](ftw-h.md)** describes the **[FTW](FTW.md)** structure. The file location can be determined based on the offset and the depth relative to the root node. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

base

-

int

-

level

-

int

-
- -## **Details** - -## **Field ** - -## base - -``` -int FTW::base -``` - - **Description:** - -Offset of the file name in the path name - -## level - -``` -int FTW::level -``` - - **Description:** - -Depth of the file name, relative to the root node of the tree - diff --git a/api/api-SmartVision-Devices/Feature.md b/api/api-SmartVision-Devices/Feature.md deleted file mode 100755 index cd28bfcb4b460d03dd62a1e9e5c7e0b5483f3800..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Feature.md +++ /dev/null @@ -1,202 +0,0 @@ -# Feature - -- [Overview](#section416481894165631) -- [Summary](#section1825669683165631) -- [Data Fields](#pub-attribs) -- [Details](#section2084409850165631) -- [Field](#section589332272165631) -- [GetName](#ab30dc9677abd4aaa18ec88254e90b139) -- [OnInitialize](#adb3f9401f41e2309006568ef6e78fd43) -- [OnMessage](#adf249c7a1b07eb47d51f046c5c8a5f6b) -- [OnStop](#ab0a4b92d867106b10f3fd3c4761338ba) - -## **Overview** - -**Related Modules:** - -[Samgr](Samgr.md) - -**Description:** - -Defines the base class of a feature. - -You need to implement the pointer to the feature. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

GetName )(Feature *feature)

-

const char *(*

-

Obtains a feature name.

-

OnInitialize )(Feature *feature, Service *parent, Identity identity)

-

void(*

-

Initializes a feature.

-

OnStop )(Feature *feature, Identity identity)

-

void(*

-

Stops a feature.

-

OnMessage )(Feature *feature, Request *request)

-

BOOL(*

-

Processes a feature message.

-
- -## **Details** - -## **Field ** - -## GetName - -``` -const char*(* Feature::GetName) ([Feature](Feature.md) *feature) -``` - - **Description:** - -Obtains a feature name. - -This function is implemented by developers and called by Samgr during feature registration and startup. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
featureIndicates the pointer to the feature.
- -**Returns:** - -Returns a constant character string less than 16 bytes if the operation is successful; returns **NULL** if the operation fails. - -## OnInitialize - -``` -void(* Feature::OnInitialize) ([Feature](Feature.md) *feature, [Service](Service.md) *parent, [Identity](Identity.md) identity) -``` - - **Description:** - -Initializes a feature. - -This function is implemented by developers. After Samgr dispatches tasks to a service, the service calls this function in its own tasks. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
featureIndicates the pointer to the feature.
parentIndicates the pointer to the Service to which the feature belongs.
identityIndicates the identity of a feature dispatched by the system.
- -## OnMessage - -``` -BOOL(* Feature::OnMessage) ([Feature](Feature.md) *feature, [Request](Request.md) *request) -``` - - **Description:** - -Processes a feature message. - -This function is implemented by developers to process requests sent by callers through [IUnknown](IUnknown.md). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
featureIndicates the pointer to the feature.
requestIndicates the request message.
- -**Returns:** - -Returns **TRUE** if the processing is successful; returns **FALSE** if the processing fails. - -## OnStop - -``` -void(* Feature::OnStop) ([Feature](Feature.md) *feature, [Identity](Identity.md) identity) -``` - - **Description:** - -Stops a feature. - -This function is implemented by developers and is called by Samgr when a feature is deregistered to stop running services. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
featureIndicates the pointer to the feature.
identityIndicates the Identity of the feature to be stopped.
- diff --git a/api/api-SmartVision-Devices/FileInfo.md b/api/api-SmartVision-Devices/FileInfo.md deleted file mode 100755 index 87c7f165e4e0e531d03d46218d0e55520747a497..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/FileInfo.md +++ /dev/null @@ -1,108 +0,0 @@ -# FileInfo - -- [Overview](#section1402189407165631) -- [Summary](#section964552924165631) -- [Data Fields](#pub-attribs) -- [Details](#section86417929165631) -- [Field](#section1265510319165631) -- [bitrate](#ac6afb3ba1891e7fd02c3b2c942d2525f) -- [formatName](#a38797d4349538f098d6f14b94446bee7) -- [programInfo](#aeb2b662b1dd525c9b56f2ddca1013058) -- [programNum](#a1373e3d2662f2112eb58078c7ef7e2a2) - -## **Overview** - -**Related Modules:** - -[Format](Format.md) - -**Description:** - -Defines movie file information. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

formatName

-

char *

-

bitrate

-

uint32_t

-

programNum

-

uint32_t

-

programInfo

-

ProgramInfo *

-
- -## **Details** - -## **Field ** - -## bitrate - -``` -uint32_t FileInfo::bitrate -``` - - **Description:** - -Bit rate of the movie file - -## formatName - -``` -char* FileInfo::formatName -``` - - **Description:** - -Pointer to the name of the movie file container format - -## programInfo - -``` -[ProgramInfo](ProgramInfo.md)* FileInfo::programInfo -``` - - **Description:** - -Pointer to the array of information about the movie file program - -## programNum - -``` -uint32_t FileInfo::programNum -``` - - **Description:** - -Number of programs - diff --git a/api/api-SmartVision-Devices/Format.md b/api/api-SmartVision-Devices/Format.md deleted file mode 100755 index 984dd07ee23f5a44b36fd6ce87f00b020c1a5686..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Format.md +++ /dev/null @@ -1,2464 +0,0 @@ -# Format - -- [Overview](#section343241842165623) -- [Summary](#section394624958165623) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Macros](#define-members) -- [Typedefs](#typedef-members) -- [Enumerations](#enum-members) -- [Functions](#func-members) -- [Details](#section1693197691165623) -- [Macro Definition](#section935031532165623) -- [FORMAT\_INVALID\_PROGRAM\_ID](#gab4007b017f1edad143959af034e32bf7) -- [FORMAT\_INVALID\_TRACK\_ID](#ga62037bb16334896e1bb6d35a71618881) -- [FORMAT\_LANGUAGE\_LEN](#gaa70508bb1089c99f9aa3d59fcbdfa8eb) -- [FORMAT\_MAX\_LANGUAGE\_NUM](#gac2d2d077edb8e9bb9f85ab6350015c5b) -- [FORMAT\_TITLE\_LEN](#gadb635fac84a9d62e99c69e75d4de85c3) -- [URL\_LEN](#ga1ac54dd3b9b49c1800b5f502a87650be) -- [Typedef](#section545940743165623) -- [CALLBACK\_HANDLE](#gab928f39c359734527bda3fd160f89331) -- [Enumeration Type](#section1904403459165623) -- [AudioSampleFmt](#gadf0700999998f587f0017c4d02977b22) -- [CodecFormat](#gaf7ed135f15d4b218d41705bac0122ba7) -- [DataFlags](#gacff079fdf8427c743f9197ea5be33a7f) -- [FormatErrorType](#ga31e7fcf42722fa15e4e5489c2fef9092) -- [FormatInfoType](#ga6f00342925d3d5e586c76f8695985cad) -- [FormatSeekMode](#ga14aa9d18a71eff4a0b70f748f0377c94) -- [FrameType](#gad495a9f61af7fff07d7e97979d1ab854) -- [KeyType](#gaab0feaba617470cb4aa830dc5935238c) -- [ManualSplitType](#ga10d9833450f29129d249c41d9acb4bc4) -- [OutputFormat](#gaeb712c6c6c0a8af0dfd79f451ecb9277) -- [OutputType](#ga4e0517338e6c4a31a2addafc06d4f3a3) -- [SourceType](#ga3ae727773c367ac1041d72ac770a0ab1) -- [SubtitleFormat](#gadac45ce4731516c262292c15433439b3) -- [SubtitleFrameType](#ga43b7f046e365a89697272d850b0517b7) -- [TrackSourceType](#ga953bc46f95d7b2d8866838d792f8f6aa) -- [TrackType](#gad80740dd555f7d3688d2c4d9f44d3b04) -- [Function](#section1772238272165623) -- [FormatDeInit\(\)](#gabb574933ebb4f3d1d2ed299e79aeee2c) -- [FormatDemuxerCreate\(\)](#ga183fbc31f2c9877ef56464abcccef374) -- [FormatDemuxerDestory\(\)](#ga98fd9a5a5d1ffd275fc46f898ca08413) -- [FormatDemuxerFreeFrame\(\)](#ga291b805de194c695b72eb5ad721103d5) -- [FormatDemuxerGetBufferConfig\(\)](#ga565cbb52c95a95aab4dcc957fe998b5f) -- [FormatDemuxerGetFileInfo\(\)](#gad807d61c65e89629c7eed8f97426fd5a) -- [FormatDemuxerGetParameter\(\)](#ga6c2a1aa9fdf1db8e2f14a3a92ffa23d5) -- [FormatDemuxerGetSelectedTrack\(\)](#gab6ef68051ee2ed0015e721bedb1af61c) -- [FormatDemuxerPrepare\(\)](#gacfcf40d869a48125bd67d17f8a4fc3ce) -- [FormatDemuxerReadFrame\(\)](#ga7b20e1b88413d20a348d7f796917cd94) -- [FormatDemuxerSeek\(\)](#gad53f1e848f3c2e0c8fa056a312b2ed6c) -- [FormatDemuxerSelectTrack\(\)](#ga1d9cb94614e207def34f13eaa16ef2b7) -- [FormatDemuxerSetBufferConfig\(\)](#gad2a15f3fa640f3f9e8e684d71b3a12cb) -- [FormatDemuxerSetCallBack\(\)](#ga9ef126fc3132b556d49a275799e7753b) -- [FormatDemuxerSetParameter\(\)](#ga92d859ba4745ce26b94595daaa40462d) -- [FormatDemuxerStart\(\)](#ga08544b1ba3373bf5cb211586e8195673) -- [FormatDemuxerStop\(\)](#ga8a693d8be0b4b688d99e513608884e91) -- [FormatDemuxerUnselectTrack\(\)](#gaf5fd5bab9613d133827054f157d5520e) -- [FormatInit\(\)](#gae10a50c8f3de6e54ee0dc3937f755920) -- [FormatMuxerAddTrack\(\)](#ga94e9ab3e534b69a358b7cc16e4f79b78) -- [FormatMuxerCreate\(\)](#ga9c390276cb90f4753c32af5aa5c600ad) -- [FormatMuxerDestory\(\)](#gaa41d46cef6d5e81c85614edbf824d803) -- [FormatMuxerGetParameter\(\)](#ga67dd7361dedf335496afef19d54e4138) -- [FormatMuxerSetCallBack\(\)](#ga108cd7e319ade568f71890d57585f153) -- [FormatMuxerSetFileSplitDuration\(\)](#ga6eed6b5e7522e102f2d79d0dd33fd2a9) -- [FormatMuxerSetLocation\(\)](#ga967ba14fa1231eed2942b87a09deb953) -- [FormatMuxerSetMaxFileDuration\(\)](#gae931061d822c4ffe447e9ba40a991597) -- [FormatMuxerSetMaxFileSize\(\)](#ga6f3ba422c9bbca4c1d5a7a3fe85dd9b9) -- [FormatMuxerSetNextOutputFile\(\)](#gaa936b56996294d76977537267fef058c) -- [FormatMuxerSetOrientation\(\)](#ga96fc57913c3202d2d23704c69d660be5) -- [FormatMuxerSetParameter\(\)](#gad4335ebaa7c165b885a00fe61aae0cd9) -- [FormatMuxerStart\(\)](#ga9a2af831a6f4a63dc85d2c23b5c7c81b) -- [FormatMuxerStop\(\)](#ga66a3a5a1ec6d01fcbd6339f7eee1151b) -- [FormatMuxerWriteFrame\(\)](#ga82037d271e77da206e16582e774ee048) - -## **Overview** - -**Description:** - -Defines format-related APIs. - -For example, you use this module to define custom data types and to initialize, create, destroy the muxer and demuxer, and set their parameters. Also, you can read demuxer data frames, select demuxer tracks, add muxer tracks, and write data frames into a container. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - - - - - - - -

File Name

-

Description

-

format_interface.h

-

Declares format-related APIs.

-

format_type.h

-

Declares format-related structures and enumerations, including custom data types for file information, programs, information about audio and video subtitle tracks, source data types, output data types, split types, and data frames.

-

parameter_item.h

-

Defines format-related structures and enumerations used to configure and obtain dynamic parameters.

-
- -## Data Structures - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

FormatBufferSetting

-

Defines the buffer configuration.

-

FormatFrame

-

Defines the data frame, which is used for data transferring.

-

AudioTrackInfo

-

Defines audio track information.

-

VideoTrackInfo

-

Defines video track information.

-

SubImageInfo

-

Defines image information.

-

ImageTrackInfo

-

Defines image stream information.

-

SubtitleTrackInfo

-

Defines subtitle stream information.

-

TrackInfo

-

Defines track information.

-

ProgramInfo

-

Defines program information.

-

FileInfo

-

Defines movie file information.

-

BufferStream

-

Defines the function for reading stream data.

-

FormatSource

-

Defines the demuxer data source.

-

FormatOutputConfig

-

Defines the muxer output configuration.

-

VideoTrackSourceInfo

-

Defines information about the muxer video source.

-

AudioTrackSourceInfo

-

Defines information about the muxer audio source.

-

DataTrackSourceInfo

-

Defines information about the muxer data source.

-

TrackSource

-

Defines information about the muxer source.

-

FormatCallback

-

Defines listener callbacks for the format.

-

ParameterItem

-

Defines a structure for configuring and obtaining dynamic parameters.

-
- -## Macros - - - - - - - - - - - - - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

FORMAT_MAX_LANGUAGE_NUM 4

-
 

FORMAT_LANGUAGE_LEN 4

-
 

FORMAT_TITLE_LEN 64

-
 

FORMAT_INVALID_TRACK_ID -1

-
 

FORMAT_INVALID_PROGRAM_ID -1

-
 

URL_LEN 4096

-
 
- -## Typedefs - - - - - - - - - - -

Typedef Name

-

Description

-

CALLBACK_HANDLE

-

typedef void *

-

Indicates the pointer to the callback handle for listening the muxer.

-
- -## Enumerations - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

FrameType { FRAME_TYPE_NONE, FRAME_TYPE_AUDIO, FRAME_TYPE_VIDEO, FRAME_TYPE_IMAGE, FRAME_TYPE_SUB, FRAME_TYPE_DATA, FRAME_TYPE_BUT }

-

Enumerates data frame types.

-

FormatSeekMode { FORMAT_SEEK_MODE_FORWARD_KEY, FORMAT_SEEK_MODE_BACKWARD_KEY, FORMAT_SEEK_MODE_CLOSEST_KEY, SEEK_MODE_BUT }

-

Enumerates seek modes.

-

CodecFormat { CODEC_H264 = 0, CODEC_H265, CODEC_JPEG, CODEC_AAC, CODEC_G711A, CODEC_G711U, CODEC_PCM, CODEC_MP3, CODEC_BUT }

-

Enumerates audio, video, and image encoding formats.

-

AudioSampleFmt { AUDIO_SAMPLE_FMT_S8 = 0, AUDIO_SAMPLE_FMT_S16, AUDIO_SAMPLE_FMT_S24, AUDIO_SAMPLE_FMT_S32, AUDIO_SAMPLE_FMT_FLOAT }

-

Enumerates audio sampling formats.

-

SubtitleFrameType { HI_SVR_SUBTITLE_BITMAP = 0x0, HI_SVR_SUBTITLE_TEXT }

-

Enumerates subtitle frame types.

-

SubtitleFormat { FORMAT_SUB_ASS = 0x0, FORMAT_SUB_LRC, FORMAT_SUB_SRT, FORMAT_SUB_SMI, FORMAT_SUB_SUB, FORMAT_SUB_TXT, FORMAT_SUB_HDMV_PGS, FORMAT_SUB_DVB_SUB, FORMAT_SUB_DVD_SUB, FORMAT_SUB_TTML, FORMAT_SUB_WEBVTT, FORMAT_SUB_BUTT }

-

Enumerates subtitle file formats.

-

TrackType { TRACK_TYPE_VIDEO, TRACK_TYPE_AUDIO, TRACK_TYPE_IMAGE, TRACK_TYPE_SUB, TRACK_TYPE_DATA, TRACK_TYPE_BUT }

-

Enumerates track types.

-

DataFlags { DATA_FLAG_NONE = 0, DATA_FLAG_SYNCFRAME = 1, DATA_FLAG_CODECCONFIG = 2, DATA_FLAG_EOS = 4, DATA_FLAG_PARTIAL_FRAME = 8, DATA_FLAG_ENDOFFRAME = 16, DATA_FLAG_MUXER_DATA = 32 }

-

Enumerates flags of raw stream data.

-

SourceType { SOURCE_TYPE_FD = 0, SOURCE_TYPE_URI, SOURCE_TYPE_STREAM, SOURCE_TYPE_BUT }

-

Enumerates types of the demuxer data source.

-

OutputFormat { OUTPUT_FORMAT_MPEG_4 = 0, OUTPUT_FORMAT_TS = 1, OUTPUT_FORMAT_THREE_GPP = 2, OUTPUT_FORMAT_HEIF = 3, OUTPUT_FORMAT_OGG = 4, OUTPUT_FORMAT_INVALID }

-

Enumerates output file formats.

-

FormatInfoType { MUXER_INFO_MAX_DURATION_APPROACHING = 0, MUXER_INFO_MAX_FILESIZE_APPROACHING, MUXER_INFO_MAX_DURATION_REACHED, MUXER_INFO_MAX_FILESIZE_REACHED, MUXER_INFO_NEXT_OUTPUT_FILE_STARTED, MUXER_INFO_FILE_SPLIT_FINISHED, MUXER_INFO_FILE_START_TIME_MS, DEMUXER_INFO_PREPARED = 10000, DEMUXER_INFO_SEEK_COMPLETE, DEMUXER_INFO_NETWORK_DISCONNECTED, DEMUXER_INFO_NETWORK_RECONNECTED }

-

Enumerates types of callback information.

-

FormatErrorType

-

Enumerates callback error types.

-

OutputType { OUTPUT_TYPE_FD = 0, OUTPUT_TYPE_URI, OUTPUT_TYPE_INVALID }

-

Enumerates muxer output types.

-

ManualSplitType { MANUAL_SPLIT_POST = 0, MANUAL_SPLIT_PRE, MANUAL_SPLIT_NORMAL }

-

Enumerates manual split types for the muxer.

-

TrackSourceType { TRACK_SOURCE_TYPE_VIDEO = 0, TRACK_SOURCE_TYPE_AUDIO, TRACK_SOURCE_TYPE_DATA, TRACK_SOURCE_TYPE_INVALID }

-

Enumerates types of the muxer source track.

-

KeyType { KEY_TYPE_MIME = 0x6d696d65, KEY_TYPE_HTTP_HEADERS = 0x68706864, KEY_TYPE_LANGUAGE = 0x6c616e67, KEY_TYPE_PRE_CACHE = 0x70726361 }

-

Enumerates key types used for setting and obtaining parameters.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

FormatInit (void)

-

void

-

Initializes the format.

-

FormatDeInit (void)

-

void

-

Deinitializes the format.

-

FormatDemuxerCreate (const FormatSource *source, void **handle)

-

int32_t

-

Creates a demuxer component and returns its context handle.

-

FormatDemuxerSetParameter (const void *handle, int32_t trackId, const ParameterItem *metaData, int32_t metaDataCnt)

-

int32_t

-

Sets demuxer attributes.

-

FormatDemuxerGetParameter (const void *handle, int32_t trackId, ParameterItem *metaData)

-

int32_t

-

Obtains demuxer attributes.

-

FormatDemuxerSetCallBack (void *handle, const FormatCallback *callBack)

-

int32_t

-

Sets a callback for the demuxer.

-

FormatDemuxerSetBufferConfig (void *handle, const FormatBufferSetting *setting)

-

int32_t

-

Sets buffer information for the demuxer.

-

FormatDemuxerGetBufferConfig (const void *handle, FormatBufferSetting *setting)

-

int32_t

-

Obtains the buffer information of the demuxer.

-

FormatDemuxerPrepare (void *handle)

-

int32_t

-

Makes preparations for the demuxer.

-

FormatDemuxerGetFileInfo (void *handle, FileInfo *info)

-

int32_t

-

Obtains the attributes of a media file.

-

FormatDemuxerSelectTrack (const void *handle, int32_t programId, int32_t trackId)

-

int32_t

-

Selects a specified media track.

-

FormatDemuxerUnselectTrack (const void *handle, int32_t programId, int32_t trackId)

-

int32_t

-

Unselects a specified media track from which the demuxer reads data frames.

-

FormatDemuxerStart (void *handle)

-

int32_t

-

Starts the demuxer.

-

FormatDemuxerGetSelectedTrack (const void *handle, int32_t *programId, int32_t trackId[], int32_t *nums)

-

int32_t

-

Obtains the ID of the media track selected by the demuxer for output.

-

FormatDemuxerReadFrame (const void *handle, FormatFrame *frame, int32_t timeOutMs)

-

int32_t

-

Reads data frames.

-

FormatDemuxerFreeFrame (void *handle, FormatFrame *frame)

-

int32_t

-

Frees data frames.

-

FormatDemuxerSeek (const void *handle, int32_t streamIndex, int64_t timeStampUs, FormatSeekMode mode)

-

int32_t

-

Seeks for a specified position for the demuxer.

-

FormatDemuxerStop (void *handle)

-

int32_t

-

Stops the demuxer from working.

-

FormatDemuxerDestory (void *handle)

-

int32_t

-

Destroys demuxer resources.

-

FormatMuxerCreate (void **handle, FormatOutputConfig *outputConfig)

-

int32_t

-

Creates a muxer and returns its context handle.

-

FormatMuxerDestory (const void *handle)

-

int32_t

-

Destroys a muxer and release its resources created by calling FormatMuxerCreate.

-

FormatMuxerAddTrack (void *handle, const TrackSource *trackSource)

-

int32_t

-

Adds a media track source for the muxer. For details about track sources, see TrackSource.

-

FormatMuxerSetCallBack (void *handle, const FormatCallback *callBack)

-

int32_t

-

Sets a callback for the muxer. For details about the callback, see FormatCallback.

-

FormatMuxerSetOrientation (void *handle, int degrees)

-

int32_t

-

Sets the orientation of the video track for the muxer.

-

FormatMuxerSetLocation (const void *handle, int latitude, int longitude)

-

int32_t

-

Sets the geographical information for the output file of the muxer.

-

FormatMuxerSetMaxFileSize (void *handle, int64_t bytes)

-

int32_t

-

Sets the maximum size (in bytes) for the output file of the muxer.

-

FormatMuxerSetMaxFileDuration (void *handle, int64_t durationUs)

-

int32_t

-

Sets the maximum duration (in seconds) for the output file.

-

FormatMuxerSetFileSplitDuration (const void *handle, ManualSplitType type, int64_t timestampUs, uint32_t durationUs)

-

int32_t

-

Manually splits a file.

-

FormatMuxerStart (void *handle)

-

int32_t

-

Starts the muxer.

-

FormatMuxerWriteFrame (const void *handle, const FormatFrame *frameData)

-

int32_t

-

Writes data frames into the muxer.

-

FormatMuxerSetNextOutputFile (const void *handle, int32_t fd)

-

int32_t

-

Sets the descriptor for the next output file.

-

FormatMuxerStop (const void *handle, bool block)

-

int32_t

-

Stops the muxer that was started by calling FormatMuxerStart.

-

FormatMuxerSetParameter (void *handle, int32_t trackId, const ParameterItem *item, int32_t itemNum)

-

int32_t

-

Sets muxer attributes.

-

FormatMuxerGetParameter (void *handle, int32_t trackId, ParameterItem *item, int32_t itemNum)

-

int32_t

-

Obtains muxer attributes.

-
- -## **Details** - -## **Macro Definition ** - -## FORMAT\_INVALID\_PROGRAM\_ID - -``` -#define FORMAT_INVALID_PROGRAM_ID -1 -``` - - **Description:** - -Indicates an invalid program ID. - -## FORMAT\_INVALID\_TRACK\_ID - -``` -#define FORMAT_INVALID_TRACK_ID -1 -``` - - **Description:** - -Indicates an invalid track ID. - -## FORMAT\_LANGUAGE\_LEN - -``` -#define FORMAT_LANGUAGE_LEN 4 -``` - - **Description:** - -Indicates the number of characters contained in the language description. - -## FORMAT\_MAX\_LANGUAGE\_NUM - -``` -#define FORMAT_MAX_LANGUAGE_NUM 4 -``` - - **Description:** - -Indicates the number of languages in the subtitle file. - -## FORMAT\_TITLE\_LEN - -``` -#define FORMAT_TITLE_LEN 64 -``` - - **Description:** - -Indicates the number of title characters. - -## URL\_LEN - -``` -#define URL_LEN 4096 -``` - - **Description:** - -Indicates the URL length. - -## **Typedef ** - -## CALLBACK\_HANDLE - -``` -typedef void* [CALLBACK_HANDLE](Format.md#gab928f39c359734527bda3fd160f89331) -``` - - **Description:** - -Indicates the pointer to the callback handle for listening the muxer. - -## **Enumeration Type ** - -## AudioSampleFmt - -``` -enum [AudioSampleFmt](Format.md#gadf0700999998f587f0017c4d02977b22) -``` - - **Description:** - -Enumerates audio sampling formats. - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
AUDIO_SAMPLE_FMT_S8

8-bit integer for a single sample

-
AUDIO_SAMPLE_FMT_S16

16-bit integer for a single sample

-
AUDIO_SAMPLE_FMT_S24

24-bit integer for a single sample

-
AUDIO_SAMPLE_FMT_S32

32-bit integer for a single sample

-
AUDIO_SAMPLE_FMT_FLOAT

Single-precision floating point number for a single sample

-
- -## CodecFormat - -``` -enum [CodecFormat](Format.md#gaf7ed135f15d4b218d41705bac0122ba7) -``` - - **Description:** - -Enumerates audio, video, and image encoding formats. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
CODEC_H264

H264 or AVC

-
CODEC_H265

H265 or HEVC

-
CODEC_JPEG

JPEG

-
CODEC_AAC

AAC

-
CODEC_G711A

G711A

-
CODEC_G711U

G711u

-
CODEC_PCM

PCM

-
CODEC_MP3

MP3

-
CODEC_BUT

Undefined format

-
- -## DataFlags - -``` -enum [DataFlags](Format.md#gacff079fdf8427c743f9197ea5be33a7f) -``` - - **Description:** - -Enumerates flags of raw stream data. - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
DATA_FLAG_NONE

None

-
DATA_FLAG_SYNCFRAME

Synchronization frame

-
DATA_FLAG_CODECCONFIG

Codec configuration information

-
DATA_FLAG_EOS

End of a single stream

-
DATA_FLAG_PARTIAL_FRAME

Partial synchronization frame. This flag is used for multiple segments (except for the last one) into which a single frame is divided.

-
DATA_FLAG_ENDOFFRAME

End of a frame. This flag is used in pair with DATA_FLAG_PARTIAL_FRAME for the last segment of the frame.

-
DATA_FLAG_MUXER_DATA

Encapsulated data with its container

-
- -## FormatErrorType - -``` -enum [FormatErrorType](Format.md#ga31e7fcf42722fa15e4e5489c2fef9092) -``` - - **Description:** - -Enumerates callback error types. - -## FormatInfoType - -``` -enum [FormatInfoType](Format.md#ga6f00342925d3d5e586c76f8695985cad) -``` - - **Description:** - -Enumerates types of callback information. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
MUXER_INFO_MAX_DURATION_APPROACHING

The capturing duration is reaching the threshold specified by FormatMuxerSetMaxFileDuration. This information is reported when only one second or 10% is left to reach the allowed duration.

-
MUXER_INFO_MAX_FILESIZE_APPROACHING

The captured file size is reaching the threshold specified by FormatMuxerSetMaxFileSize. This information is reported when only 100 KB or 10% is left to reach the allowed size.

-
MUXER_INFO_MAX_DURATION_REACHED

The capturing duration reached the threshold specified by FormatMuxerSetMaxFileDuration, and the capturing is ended. If the file is set by a file descriptor, the caller needs to close the file.

-
MUXER_INFO_MAX_FILESIZE_REACHED

The captured file size reached the threshold specified by FormatMuxerSetMaxFileSize, and the capturing is ended. If the file is set by a file descriptor, the caller needs to close the file.

-
MUXER_INFO_NEXT_OUTPUT_FILE_STARTED

The capturing started for the next output file.

-
MUXER_INFO_FILE_SPLIT_FINISHED

Manual file split is completed.

-
MUXER_INFO_FILE_START_TIME_MS

Start time of the captured file

-
DEMUXER_INFO_PREPARED

The prepare function is asynchronously executed. This information is reported after the execution is complete.

-
DEMUXER_INFO_SEEK_COMPLETE

The seek function is asynchronously executed. This information is reported after the execution is complete.

-
DEMUXER_INFO_NETWORK_DISCONNECTED

The network is disconnected during network playback.

-
DEMUXER_INFO_NETWORK_RECONNECTED

The network is automatically reconnected during network playback.

-
- -## FormatSeekMode - -``` -enum [FormatSeekMode](Format.md#ga14aa9d18a71eff4a0b70f748f0377c94) -``` - - **Description:** - -Enumerates seek modes. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
FORMAT_SEEK_MODE_FORWARD_KEY

Seeks forwards for the keyframe closest to specified position.

-
FORMAT_SEEK_MODE_BACKWARD_KEY

Seeks backwards for the keyframe closest to specified position.

-
FORMAT_SEEK_MODE_CLOSEST_KEY

Seeks for the keyframe closest to specified position.

-
SEEK_MODE_BUT

Undefined mode

-
- -## FrameType - -``` -enum [FrameType](Format.md#gad495a9f61af7fff07d7e97979d1ab854) -``` - - **Description:** - -Enumerates data frame types. - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
FRAME_TYPE_NONE

Unknown type, which can be used for transport stream (TS) packets

-
FRAME_TYPE_AUDIO

Audio frame

-
FRAME_TYPE_VIDEO

Video frame

-
FRAME_TYPE_IMAGE

Image frame

-
FRAME_TYPE_SUB

Subtitle frame

-
FRAME_TYPE_DATA

Data

-
FRAME_TYPE_BUT

Undefined type

-
- -## KeyType - -``` -enum [KeyType](Format.md#gaab0feaba617470cb4aa830dc5935238c) -``` - - **Description:** - -Enumerates key types used for setting and obtaining parameters. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
KEY_TYPE_MIME

MIME type. The value type is cstring.

-
KEY_TYPE_HTTP_HEADERS

HTTP header. The value type is cstring.

-
KEY_TYPE_LANGUAGE

Track language, which is usually the language of audio and subtitles. The value type is cstring.

-
KEY_TYPE_PRE_CACHE

Precapture cache size. The value type is int

-
- -## ManualSplitType - -``` -enum [ManualSplitType](Format.md#ga10d9833450f29129d249c41d9acb4bc4) -``` - - **Description:** - -Enumerates manual split types for the muxer. - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
MANUAL_SPLIT_POST

Search forwards from the current I-frame and split the file at the closest I-frame.

-
MANUAL_SPLIT_PRE

Search backwards from the current I-frame and split the file at the closest I-frame.

-
MANUAL_SPLIT_NORMAL

Normal split

-
- -## OutputFormat - -``` -enum [OutputFormat](Format.md#gaeb712c6c6c0a8af0dfd79f451ecb9277) -``` - - **Description:** - -Enumerates output file formats. - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
OUTPUT_FORMAT_MPEG_4

MP4

-
OUTPUT_FORMAT_TS

TS

-
OUTPUT_FORMAT_THREE_GPP

3GPP

-
OUTPUT_FORMAT_HEIF

HEIF

-
OUTPUT_FORMAT_OGG

Ogg

-
OUTPUT_FORMAT_INVALID

Invalid format

-
- -## OutputType - -``` -enum [OutputType](Format.md#ga4e0517338e6c4a31a2addafc06d4f3a3) -``` - - **Description:** - -Enumerates muxer output types. - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
OUTPUT_TYPE_FD

File descriptor

-
OUTPUT_TYPE_URI

Local file URI

-
OUTPUT_TYPE_INVALID

Undefined type

-
- -## SourceType - -``` -enum [SourceType](Format.md#ga3ae727773c367ac1041d72ac770a0ab1) -``` - - **Description:** - -Enumerates types of the demuxer data source. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
SOURCE_TYPE_FD

File descriptor

-
SOURCE_TYPE_URI

URI, which can be a network address or a local file path

-
SOURCE_TYPE_STREAM

Streams

-
SOURCE_TYPE_BUT

Undefined source

-
- -## SubtitleFormat - -``` -enum [SubtitleFormat](Format.md#gadac45ce4731516c262292c15433439b3) -``` - - **Description:** - -Enumerates subtitle file formats. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
FORMAT_SUB_ASS

ASS

-
FORMAT_SUB_LRC

LRC

-
FORMAT_SUB_SRT

SRT

-
FORMAT_SUB_SMI

SMI

-
FORMAT_SUB_SUB

SUB

-
FORMAT_SUB_TXT

RAW UTF-8

-
FORMAT_SUB_HDMV_PGS

HDMV PGS

-
FORMAT_SUB_DVB_SUB

DVB

-
FORMAT_SUB_DVD_SUB

DVD

-
FORMAT_SUB_TTML

TTML

-
FORMAT_SUB_WEBVTT

WebVTT

-
FORMAT_SUB_BUTT

Undefined format

-
- -## SubtitleFrameType - -``` -enum [SubtitleFrameType](Format.md#ga43b7f046e365a89697272d850b0517b7) -``` - - **Description:** - -Enumerates subtitle frame types. - - - - - - - - - - - - - -

Enumerator

-

Description

-
HI_SVR_SUBTITLE_BITMAP

Bitmap (BMP)

-
HI_SVR_SUBTITLE_TEXT

Text

-
- -## TrackSourceType - -``` -enum [TrackSourceType](Format.md#ga953bc46f95d7b2d8866838d792f8f6aa) -``` - - **Description:** - -Enumerates types of the muxer source track. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
TRACK_SOURCE_TYPE_VIDEO

Video track

-
TRACK_SOURCE_TYPE_AUDIO

Audio track

-
TRACK_SOURCE_TYPE_DATA

Data track

-
TRACK_SOURCE_TYPE_INVALID

Invalid type

-
- -## TrackType - -``` -enum [TrackType](Format.md#gad80740dd555f7d3688d2c4d9f44d3b04) -``` - - **Description:** - -Enumerates track types. - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
TRACK_TYPE_VIDEO

Video track

-
TRACK_TYPE_AUDIO

Audio track

-
TRACK_TYPE_IMAGE

Image track

-
TRACK_TYPE_SUB

Subtitle track

-
TRACK_TYPE_DATA

Data track

-
TRACK_TYPE_BUT

Undefined track

-
- -## **Function ** - -## FormatDeInit\(\) - -``` -void FormatDeInit (void ) -``` - - **Description:** - -Deinitializes the format. - -You can call this function to deinitialize the demuxer and muxer. This function works in pair with [FormatInit](Format.md#gae10a50c8f3de6e54ee0dc3937f755920). - -## FormatDemuxerCreate\(\) - -``` -int32_t FormatDemuxerCreate (const [FormatSource](FormatSource.md) * source, void ** handle ) -``` - - **Description:** - -Creates a demuxer component and returns its context handle. - -This function returns the demuxer context handle without probing the container format or obtaining stream information. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sourceIndicates the pointer to the format source of the demuxer. For details, see FormatSource.
handleIndicates the double pointer to the demuxer context handle.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## FormatDemuxerDestory\(\) - -``` -int32_t FormatDemuxerDestory (void * handle) -``` - - **Description:** - -Destroys demuxer resources. - -This function works in pair with [FormatDemuxerCreate](Format.md#ga183fbc31f2c9877ef56464abcccef374). If you do not call this function, resource leakage may occur. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the demuxer context handle.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## FormatDemuxerFreeFrame\(\) - -``` -int32_t FormatDemuxerFreeFrame (void * handle, [FormatFrame](FormatFrame.md) * frame ) -``` - - **Description:** - -Frees data frames. - -You can call this function to free the data frames obtained by calling [FormatDemuxerReadFrame](Format.md#ga7b20e1b88413d20a348d7f796917cd94). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the demuxer context handle.
frameIndicates the pointer to the data structure FormatFrame.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## FormatDemuxerGetBufferConfig\(\) - -``` -int32_t FormatDemuxerGetBufferConfig (const void * handle, [FormatBufferSetting](FormatBufferSetting.md) * setting ) -``` - - **Description:** - -Obtains the buffer information of the demuxer. - -If there is a buffer mechanism in the demuxer, you can call this function to obtain the maximum buffer size and time. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the demuxer context handle.
settingIndicates the pointer to the maximum demuxer buffer size and time, as defined in FormatBufferSetting.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## FormatDemuxerGetFileInfo\(\) - -``` -int32_t FormatDemuxerGetFileInfo (void * handle, [FileInfo](FileInfo.md) * info ) -``` - - **Description:** - -Obtains the attributes of a media file. - -The attributes contain file, program, and stream attributes. This function should be called after [FormatDemuxerPrepare](Format.md#gacfcf40d869a48125bd67d17f8a4fc3ce) is called. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the demuxer context handle.
infoIndicates the pointer to the source attributes, as defined in FileInfo.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## FormatDemuxerGetParameter\(\) - -``` -int32_t FormatDemuxerGetParameter (const void * handle, int32_t trackId, [ParameterItem](ParameterItem.md) * metaData ) -``` - - **Description:** - -Obtains demuxer attributes. - -You can call this function to obtain the HTTP header, HTTP referer, and other extension items for the demuxer after [FormatDemuxerCreate](Format.md#ga183fbc31f2c9877ef56464abcccef374) is called. The demuxer will store the value in the **metaData** based on the key.If the demuxer has allocated memory for the **metaData** to store the value, the caller should manually free the memory. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the demuxer context handle.
trackIdIdentifies the track. If the value is an invalid value (-1), this parameter identifies the file or program.
metaDataIndicates the pointer to the buffer for storing the parameters values that the demuxer has searched for based on the input key. For details, see ParameterItem.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## FormatDemuxerGetSelectedTrack\(\) - -``` -int32_t FormatDemuxerGetSelectedTrack (const void * handle, int32_t * programId, int32_t trackId[], int32_t * nums ) -``` - - **Description:** - -Obtains the ID of the media track selected by the demuxer for output. - -The demuxer automatically selects the default program and its media tracks. However, if the program and media tracks have changed after [FormatDemuxerSelectTrack](Format.md#ga1d9cb94614e207def34f13eaa16ef2b7) and [FormatDemuxerUnselectTrack](Format.md#gaf5fd5bab9613d133827054f157d5520e) are called, you can obtain the currently selected program and media tracks by calling this function \(**FormatDemuxerGetSelectedTrack**. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the demuxer context handle.
programIdIdentifies the pointer to the program.
trackIdIdentifies the array of selected media tracks. This parameter works in pair with nums.
numsIndicates the pointer to the total number of selected media tracks. This parameter works in pair with trackId.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## FormatDemuxerPrepare\(\) - -``` -int32_t FormatDemuxerPrepare (void * handle) -``` - - **Description:** - -Makes preparations for the demuxer. - -This function triggers the demuxer to probe the media file container format and parse stream information. You can obtain media file attributes only after this function is called. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the demuxer context handle.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## FormatDemuxerReadFrame\(\) - -``` -int32_t FormatDemuxerReadFrame (const void * handle, [FormatFrame](FormatFrame.md) * frame, int32_t timeOutMs ) -``` - - **Description:** - -Reads data frames. - -After the data frames are read, you need to call **FormatDemuxerFreeFame** to free them. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the demuxer context handle.
frameIndicates the pointer to the data structure FormatFrame.
timeOutMsIndicates the time required for waiting data frame read. The value 0 indicates that data frames are immediately read without any wait.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## FormatDemuxerSeek\(\) - -``` -int32_t FormatDemuxerSeek (const void * handle, int32_t streamIndex, int64_t timeStampUs, [FormatSeekMode](Format.md#ga14aa9d18a71eff4a0b70f748f0377c94) mode ) -``` - - **Description:** - -Seeks for a specified position for the demuxer. - -After being started, the demuxer seeks for a specified position to read data frames. You can specify the position close to the time specified by **streamIndex**. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the demuxer context handle.
streamIndexIdentifies the stream in the media file.
timeStampUsIndicates the target position, in microseconds.
modeIndicates the seek mode, as defined in FormatSeekMode.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## FormatDemuxerSelectTrack\(\) - -``` -int32_t FormatDemuxerSelectTrack (const void * handle, int32_t programId, int32_t trackId ) -``` - - **Description:** - -Selects a specified media track. - -The media tracks to select must belong to the same program. If you do not call this function, the default media tracks of the default program are selected. If **programId** is valid but **trackId** is invalid, the default media track of the specified program is used. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the demuxer context handle.
programIdIdentifies the program.
trackIdIdentifies the media track. If a valid value is passed, the media track must belong to the specified program. If an invalid value is passed, the default media track of the specified program is used. If multiple audio tracks are specified, the player determines which audio track to use.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## FormatDemuxerSetBufferConfig\(\) - -``` -int32_t FormatDemuxerSetBufferConfig (void * handle, const [FormatBufferSetting](FormatBufferSetting.md) * setting ) -``` - - **Description:** - -Sets buffer information for the demuxer. - -If there is a buffer mechanism in the demuxer, you can call this function to set the maximum buffer size and time. Alternatively, you can disable the buffer mechanism by setting the buffer size and time to **0** in the **setting** parameter. If there is no buffer mechanism or the default setting is retained, you can skip this function. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the demuxer context handle.
settingIndicates the pointer to the maximum demuxer buffer size and time, as defined in FormatBufferSetting.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## FormatDemuxerSetCallBack\(\) - -``` -int32_t FormatDemuxerSetCallBack (void * handle, const [FormatCallback](FormatCallback.md) * callBack ) -``` - - **Description:** - -Sets a callback for the demuxer. - -The callback will be invoked to notify the upper layer of internal events of the demuxer. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the demuxer context handle.
callBackIndicates the pointer to the callback, as defined in FormatCallback.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## FormatDemuxerSetParameter\(\) - -``` -int32_t FormatDemuxerSetParameter (const void * handle, int32_t trackId, const [ParameterItem](ParameterItem.md) * metaData, int32_t metaDataCnt ) -``` - - **Description:** - -Sets demuxer attributes. - -You can call this function to set the HTTP header, HTTP referer, and other extension items for the demuxer after [FormatDemuxerCreate](Format.md#ga183fbc31f2c9877ef56464abcccef374) is called. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the demuxer context handle.
trackIdIdentifies the track. If the value is an invalid value (-1), this parameter identifies the file or program.
metaDataIndicates the pointer to an array of key-value pairs representing parameter names and values. For details, see ParameterItem.
metaDataCntIndicates the number of key-value pairs in the array. This parameter works in pair with metaData.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## FormatDemuxerStart\(\) - -``` -int32_t FormatDemuxerStart (void * handle) -``` - - **Description:** - -Starts the demuxer. - -After being started, the caller can read data frames from the demuxer. This function should be called after [FormatDemuxerPrepare](Format.md#gacfcf40d869a48125bd67d17f8a4fc3ce) is called. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the demuxer context handle.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## FormatDemuxerStop\(\) - -``` -int32_t FormatDemuxerStop (void * handle) -``` - - **Description:** - -Stops the demuxer from working. - -After this function is called, the demuxer cannot resume decapsulation. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the demuxer context handle.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## FormatDemuxerUnselectTrack\(\) - -``` -int32_t FormatDemuxerUnselectTrack (const void * handle, int32_t programId, int32_t trackId ) -``` - - **Description:** - -Unselects a specified media track from which the demuxer reads data frames. - -The demuxer can read all media tracks of the default program. You can call this function to unselect all or certain tracks of a specified program that the demuxer is expected not to read. If **trackId** is invalid, the demuxer will read none of the tracks of the specified program. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the demuxer context handle.
programIdIdentifies the program.
trackIdIdentifies the media track that the demuxer will unselect. This parameter works in pair with programId. If a valid value is passed, the media track must belong to the program specified by programId. If an invalid value is passed, and all media tracks of the specified program are unselected.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## FormatInit\(\) - -``` -void FormatInit (void ) -``` - - **Description:** - -Initializes the format. - -You can call this function to initialize the demuxer and muxer. This function should always be called before other format-specific functions, and it can be called only once within a process. - -## FormatMuxerAddTrack\(\) - -``` -int32_t FormatMuxerAddTrack (void * handle, const [TrackSource](TrackSource.md) * trackSource ) -``` - - **Description:** - -Adds a media track source for the muxer. For details about track sources, see [TrackSource](TrackSource.md). - -This function must be called after [FormatMuxerCreate](Format.md#ga9c390276cb90f4753c32af5aa5c600ad) is successfully called and before [FormatMuxerStart](Format.md#ga9a2af831a6f4a63dc85d2c23b5c7c81b) is called. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the muxer context handle.
trackSourceIndicates the pointer to the track source.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## FormatMuxerCreate\(\) - -``` -int32_t FormatMuxerCreate (void ** handle, [FormatOutputConfig](FormatOutputConfig.md) * outputConfig ) -``` - - **Description:** - -Creates a muxer and returns its context handle. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the double pointer to the muxer context handle.
outputConfigIndicates the pointer to the muxer output configuration, as defined in FormatOutputConfig.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## FormatMuxerDestory\(\) - -``` -int32_t FormatMuxerDestory (const void * handle) -``` - - **Description:** - -Destroys a muxer and release its resources created by calling [FormatMuxerCreate](Format.md#ga9c390276cb90f4753c32af5aa5c600ad). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the muxer context handle.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## FormatMuxerGetParameter\(\) - -``` -int32_t FormatMuxerGetParameter (void * handle, int32_t trackId, [ParameterItem](ParameterItem.md) * item, int32_t itemNum ) -``` - - **Description:** - -Obtains muxer attributes. - -This is an extended function that can be used to obtain muxer or track attributes. The demuxer then obtains the muxer attributes based on the key contained in **item**. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the muxer context handle.
trackIdIdentifies the media track. If the value is FORMAT_INVALID_TRACK_ID, this function obtains the muxer attributes.
itemIndicates the pointer to the items carrying muxer attributes. You can specify multiple items at a time in this parameter, which works in pair with itemNum.
itemNumIndicates the number of attributes set at a time.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value if any requested attribute fails to be obtained or is not found. - -## FormatMuxerSetCallBack\(\) - -``` -int32_t FormatMuxerSetCallBack (void * handle, const [FormatCallback](FormatCallback.md) * callBack ) -``` - - **Description:** - -Sets a callback for the muxer. For details about the callback, see [FormatCallback](FormatCallback.md). - -This function should be called after [FormatMuxerCreate](Format.md#ga9c390276cb90f4753c32af5aa5c600ad) is successfully called. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the muxer context handle.
FormatCallbackIndicates the pointer to the muxer callback to set.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## FormatMuxerSetFileSplitDuration\(\) - -``` -int32_t FormatMuxerSetFileSplitDuration (const void * handle, [ManualSplitType](Format.md#ga10d9833450f29129d249c41d9acb4bc4) type, int64_t timestampUs, uint32_t durationUs ) -``` - - **Description:** - -Manually splits a file. - -This function can be called after [FormatMuxerStart](Format.md#ga9a2af831a6f4a63dc85d2c23b5c7c81b) is called. Once this function is called, the file is split based on the manual split type. After manual split is complete, file split will proceed to use the initially set split type. You can call this function again only after the [MUXER\_INFO\_FILE\_SPLIT\_FINISHED](Format.md#gga6f00342925d3d5e586c76f8695985cada3cf56a06f5990ab657d61bd7e57c1783) event is reported. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the muxer context handle.
typeIndicates the file split type, as defined in FileSplitType.
timestampIndicates the file split timestamp. This parameter is not supported currently. The value �C1 indicates that the file is split at the time this function is called.
durationIndicates the period from the file split time to the time the next output file starts.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## FormatMuxerSetLocation\(\) - -``` -int32_t FormatMuxerSetLocation (const void * handle, int latitude, int longitude ) -``` - - **Description:** - -Sets the geographical information for the output file of the muxer. - -This function should be called after [FormatMuxerCreate](Format.md#ga9c390276cb90f4753c32af5aa5c600ad) is successfully called. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the muxer context handle.
latitudeIndicates the latitude, within the range [-90,90].
longitudeIndicates the longitude, within the range [-180,180].
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## FormatMuxerSetMaxFileDuration\(\) - -``` -int32_t FormatMuxerSetMaxFileDuration (void * handle, int64_t durationUs ) -``` - - **Description:** - -Sets the maximum duration \(in seconds\) for the output file. - -You need to call this function before calling [FormatMuxerStart](Format.md#ga9a2af831a6f4a63dc85d2c23b5c7c81b). If the maximum duration you set is valid and capturing is approaching 90% of that duration or the remaining duration is 1s, the message [MUXER\_INFO\_MAX\_DURATION\_APPROACHING](Format.md#gga6f00342925d3d5e586c76f8695985cadaf6214216fd62faa4fc5e20d0d0ba60bf) is reported via **OnInfo** of [FormatCallback](FormatCallback.md). If the output file has been set by calling [FormatMuxerCreate](Format.md#ga9c390276cb90f4753c32af5aa5c600ad), you need to call [FormatMuxerSetNextOutputFile](Format.md#gaa936b56996294d76977537267fef058c) to set the next output file. Otherwise, the current output file will be overwritten when the capturing reaches the maximum duration you set. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the muxer context handle.
durationIndicates the maximum duration to set, in seconds. If the value is 0 or negative, the operation fails. In this case, the default duration (60 seconds) will be used.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## FormatMuxerSetMaxFileSize\(\) - -``` -int32_t FormatMuxerSetMaxFileSize (void * handle, int64_t bytes ) -``` - - **Description:** - -Sets the maximum size \(in bytes\) for the output file of the muxer. - -This function should be called after [FormatMuxerCreate](Format.md#ga9c390276cb90f4753c32af5aa5c600ad) is successfully called. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the muxer context handle.
bytesIndicates the maximum size of a file, in bytes. If the value is 0 or negative, the operation fails and the maximum size does not take effect. In this case, the maximum size of a single file supported by the current file system is used as the value of this parameter.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## FormatMuxerSetNextOutputFile\(\) - -``` -int32_t FormatMuxerSetNextOutputFile (const void * handle, int32_t fd ) -``` - - **Description:** - -Sets the descriptor for the next output file. - -If [FormatMuxerCreate](Format.md#ga9c390276cb90f4753c32af5aa5c600ad) is successfully called and the file descriptor involved is valid, you can call this function \(**FormatMuxerSetNextOutputFile**\) upon receiving the message [MUXER\_INFO\_MAX\_FILESIZE\_APPROACHING](Format.md#gga6f00342925d3d5e586c76f8695985cadafc74f41e73f13a29a83b3a13ea6e66e1) or [MUXER\_INFO\_MAX\_DURATION\_APPROACHING](Format.md#gga6f00342925d3d5e586c76f8695985cadaf6214216fd62faa4fc5e20d0d0ba60bf). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the muxer context handle.
fdIndicates the file descriptor to set.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## FormatMuxerSetOrientation\(\) - -``` -int32_t FormatMuxerSetOrientation (void * handle, int degrees ) -``` - - **Description:** - -Sets the orientation of the video track for the muxer. - -This function should be called after [FormatMuxerAddTrack](Format.md#ga94e9ab3e534b69a358b7cc16e4f79b78) is successfully called. The following degrees are supported: 0, 90, 180, and 270. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the muxer context handle.
degreesIndicates the clockwise angle of the video track.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## FormatMuxerSetParameter\(\) - -``` -int32_t FormatMuxerSetParameter (void * handle, int32_t trackId, const [ParameterItem](ParameterItem.md) * item, int32_t itemNum ) -``` - - **Description:** - -Sets muxer attributes. - -This is an extended function that can be used to add MP4-dedicated boxes and tags \(such as **exif**\). - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the muxer context handle.
trackIdIdentifies the media track. If the value is FORMAT_INVALID_TRACK_ID, this function sets the muxer attributes.
itemIndicates the pointer to the items carrying muxer attributes. You can specify multiple items at a time in this parameter, which works in pair with itemNum.
itemNumIndicates the number of attributes set at a time.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## FormatMuxerStart\(\) - -``` -int32_t FormatMuxerStart (void * handle) -``` - - **Description:** - -Starts the muxer. - -You can call this function to encapsulate media data after the muxer is created, media tracks are added, and related parameters are set. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the muxer context handle.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## FormatMuxerStop\(\) - -``` -int32_t FormatMuxerStop (const void * handle, bool block ) -``` - - **Description:** - -Stops the muxer that was started by calling [FormatMuxerStart](Format.md#ga9a2af831a6f4a63dc85d2c23b5c7c81b). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the muxer context handle.
blockIndicates how to stop the muxer. The value true indicates that the muxer is stopped after all buffered data is processed, and false indicates that the buffered data is discarded and the muxer is immediately stopped.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## FormatMuxerWriteFrame\(\) - -``` -int32_t FormatMuxerWriteFrame (const void * handle, const [FormatFrame](FormatFrame.md) * frameData ) -``` - - **Description:** - -Writes data frames into the muxer. - -This function should be called after [FormatMuxerCreate](Format.md#ga9c390276cb90f4753c32af5aa5c600ad) is successfully called. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the muxer context handle.
frameDataIndicates the pointer to the data structure FormatFrame.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - diff --git a/api/api-SmartVision-Devices/FormatBufferSetting.md b/api/api-SmartVision-Devices/FormatBufferSetting.md deleted file mode 100755 index 33194e762b93de796c41a3aab12dcf336cadcfee..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/FormatBufferSetting.md +++ /dev/null @@ -1,78 +0,0 @@ -# FormatBufferSetting - -- [Overview](#section1979688351165631) -- [Summary](#section1007372768165631) -- [Data Fields](#pub-attribs) -- [Details](#section486372543165631) -- [Field](#section1457047107165631) -- [maxDurationMs](#a6cf1da1ecc6506d134027d3a057cf968) -- [maxSize](#a9f23c583e5dd21894f4ffce0589ed179) - -## **Overview** - -**Related Modules:** - -[Format](Format.md) - -**Description:** - -Defines the buffer configuration. - -If **maxSize** and **maxDurationMs** are valid at the same time, the smaller value is used as the upper limit for the buffer. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

maxSize

-

int64_t

-

maxDurationMs

-

int64_t

-
- -## **Details** - -## **Field ** - -## maxDurationMs - -``` -int64_t FormatBufferSetting::maxDurationMs -``` - - **Description:** - -Maximum duration of a media file - -## maxSize - -``` -int64_t FormatBufferSetting::maxSize -``` - - **Description:** - -Maximum buffer size - diff --git a/api/api-SmartVision-Devices/FormatCallback.md b/api/api-SmartVision-Devices/FormatCallback.md deleted file mode 100755 index 1752a8c6b3ae1f772ba3e835e0af0204f730849a..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/FormatCallback.md +++ /dev/null @@ -1,136 +0,0 @@ -# FormatCallback - -- [Overview](#section2025395648165631) -- [Summary](#section1628089547165631) -- [Data Fields](#pub-attribs) -- [Details](#section516987346165631) -- [Field](#section160156636165631) -- [OnError](#a47f30ebe4db3087e01c4259c0a983588) -- [OnInfo](#a24b3d9a290f39522c4a733d141772cb1) -- [privateDataHandle](#a4e4c7c6789cbf8bfc1aa0444dcd106b5) - -## **Overview** - -**Related Modules:** - -[Format](Format.md) - -**Description:** - -Defines listener callbacks for the format. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

privateDataHandle

-

CALLBACK_HANDLE

-

OnError )(CALLBACK_HANDLE privateDataHandle, int32_t errorType, int32_t errorCode)

-

int32_t(*

-

Called when a format error occurs during capturing. This callback is used to report the errors.

-

OnInfo )(CALLBACK_HANDLE privateDataHandle, int32_t type, int32_t extra)

-

int32_t(*

-

Called when an information event occurs during capturing. This callback is used to report capturing information.

-
- -## **Details** - -## **Field ** - -## OnError - -``` -int32_t(* FormatCallback::OnError) ([CALLBACK_HANDLE](Format.md#gab928f39c359734527bda3fd160f89331) [privateDataHandle](FormatCallback.md#a4e4c7c6789cbf8bfc1aa0444dcd106b5), int32_t errorType, int32_t errorCode) -``` - - **Description:** - -Called when a format error occurs during capturing. This callback is used to report the errors. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
privateDataHandleIndicates the private data handle.
errorTypeIndicates the error type. For details, see FormatErrorType.
errorCodeIndicates the error code.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## OnInfo - -``` -int32_t(* FormatCallback::OnInfo) ([CALLBACK_HANDLE](Format.md#gab928f39c359734527bda3fd160f89331) [privateDataHandle](FormatCallback.md#a4e4c7c6789cbf8bfc1aa0444dcd106b5), int32_t type, int32_t extra) -``` - - **Description:** - -Called when an information event occurs during capturing. This callback is used to report capturing information. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
privateDataHandleIndicates the private data handle.
typeIndicates the information type. For details, see FormatInfoType.
extraIndicates other information, for example, the start time position of the captured file.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## privateDataHandle - -``` -[CALLBACK_HANDLE](Format.md#gab928f39c359734527bda3fd160f89331) FormatCallback::privateDataHandle -``` - - **Description:** - -Private data handle - diff --git a/api/api-SmartVision-Devices/FormatFrame.md b/api/api-SmartVision-Devices/FormatFrame.md deleted file mode 100755 index 48e3ed80b6da4ab5f1fc34947fea96b2489aae7c..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/FormatFrame.md +++ /dev/null @@ -1,220 +0,0 @@ -# FormatFrame - -- [Overview](#section1358808790165631) -- [Summary](#section204336603165631) -- [Data Fields](#pub-attribs) -- [Details](#section1167159755165631) -- [Field](#section1590948647165631) -- [data](#a632575f46669a67c78ab28049e5654c6) -- [durationUs](#ab342d9f6536876e5d0a5952a9043ca2d) -- [frameIndex](#a1a966266639de3b0b8db994232c71687) -- [frameType](#a9cb91c927687f9875efa0d5600e04d1a) -- [isKeyFrame](#a6a1cd875ac96a43d01524249a7f32026) -- [item](#a9739fdfe949e2464d14a0a2c56f3fff6) -- [itemCnt](#ace44c0b0dfc642c8a296e69b6a3e7d9d) -- [len](#aa8bb4e843e90b0f4a7dd95d23faee65f) -- [position](#a8d0f0f738cab6d389423afd66dddcab2) -- [timestampUs](#a290ab46c3660d73cde08b268bf36c323) -- [trackId](#a36d27cb02e6d06479354618e959a429a) - -## **Overview** - -**Related Modules:** - -[Format](Format.md) - -**Description:** - -Defines the data frame, which is used for data transferring. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

frameType

-

FrameType

-

trackId

-

uint32_t

-

isKeyFrame

-

bool

-

timestampUs

-

int64_t

-

durationUs

-

int64_t

-

data

-

uint8_t *

-

len

-

uint32_t

-

frameIndex

-

uint32_t

-

position

-

int64_t

-

itemCnt

-

int32_t

-

item

-

ParameterItem *

-
- -## **Details** - -## **Field ** - -## data - -``` -uint8_t* FormatFrame::data -``` - - **Description:** - -Address of the data frame buffer - -## durationUs - -``` -int64_t FormatFrame::durationUs -``` - - **Description:** - -Data frame duration, in us - -## frameIndex - -``` -uint32_t FormatFrame::frameIndex -``` - - **Description:** - -Data frame index. For the MPF container, the value indicates the index of the sub-image frame. - -## frameType - -``` -[FrameType](Format.md#gad495a9f61af7fff07d7e97979d1ab854) FormatFrame::frameType -``` - - **Description:** - -Data frame type. For details, see [FrameType](Format.md#gad495a9f61af7fff07d7e97979d1ab854). - -## isKeyFrame - -``` -bool FormatFrame::isKeyFrame -``` - - **Description:** - -Keyframe flag. **false**: The data frame is not a keyframe. **true**: The data frame is a keyframe. - -## item - -``` -[ParameterItem](ParameterItem.md)* FormatFrame::item -``` - - **Description:** - -Pointer to the parameter array - -## itemCnt - -``` -int32_t FormatFrame::itemCnt -``` - - **Description:** - -Number of parameters, which can be used for information such as side data, PSSH, DRM, and HDR. - -## len - -``` -uint32_t FormatFrame::len -``` - - **Description:** - -Data frame length - -## position - -``` -int64_t FormatFrame::position -``` - - **Description:** - -Position of the data frame in the file - -## timestampUs - -``` -int64_t FormatFrame::timestampUs -``` - - **Description:** - -Timestamp of a data frame, in us - -## trackId - -``` -uint32_t FormatFrame::trackId -``` - - **Description:** - -Index of the track where the data frame is located - diff --git a/api/api-SmartVision-Devices/FormatOutputConfig.md b/api/api-SmartVision-Devices/FormatOutputConfig.md deleted file mode 100755 index 3b0951f57855e9772167f3e91419d34179989649..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/FormatOutputConfig.md +++ /dev/null @@ -1,108 +0,0 @@ -# FormatOutputConfig - -- [Overview](#section1927231751165631) -- [Summary](#section1120045599165631) -- [Data Fields](#pub-attribs) -- [Details](#section754144248165631) -- [Field](#section280343797165631) -- [fd](#a06757484a244827b91183a40f636b2de) -- [format](#a594a547d286a447681e983582c671a6a) -- [type](#afdd8b72dc265610db88ed9893f673bb4) -- [url](#a9ce729405e9489d021713689ed1ca17b) - -## **Overview** - -**Related Modules:** - -[Format](Format.md) - -**Description:** - -Defines the muxer output configuration. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

type

-

OutputType

-

format

-

OutputFormat

-

fd

-

int32_t

-

url [URL_LEN]

-

char

-
- -## **Details** - -## **Field ** - -## fd - -``` -int32_t FormatOutputConfig::fd -``` - - **Description:** - -File descriptor - -## format - -``` -[OutputFormat](Format.md#gaeb712c6c6c0a8af0dfd79f451ecb9277) FormatOutputConfig::format -``` - - **Description:** - -File format - -## type - -``` -[OutputType](Format.md#ga4e0517338e6c4a31a2addafc06d4f3a3) FormatOutputConfig::type -``` - - **Description:** - -Output type. For details, see [OutputType](Format.md#ga4e0517338e6c4a31a2addafc06d4f3a3). - -## url - -``` -char FormatOutputConfig::url[[URL_LEN](Format.md#ga1ac54dd3b9b49c1800b5f502a87650be)] -``` - - **Description:** - -File path. For details, see [URL\_LEN](Format.md#ga1ac54dd3b9b49c1800b5f502a87650be). - diff --git a/api/api-SmartVision-Devices/FormatSource.md b/api/api-SmartVision-Devices/FormatSource.md deleted file mode 100755 index a7f66d92b7269d8f8ce0181e2c642bf1343d3feb..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/FormatSource.md +++ /dev/null @@ -1,114 +0,0 @@ -# FormatSource - -- [Overview](#section1977746972165631) -- [Summary](#section1154583350165631) -- [Data Fields](#pub-attribs) -- [Details](#section1037039597165631) -- [Field](#section1175359571165631) -- [fd](#adc25d5e97f531f36d7f129136abb483d) -- [stream](#a33f6a121891b692ef246011e0415f3fe) -- [type](#abdb0407f672c5e9af53eae7726c2e7b2) -- [url](#adc0405c090069d6bbf2017995710a0f8) - -## **Overview** - -**Related Modules:** - -[Format](Format.md) - -**Description:** - -Defines the demuxer data source. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

type

-

SourceType

-
  

union {

-
  

int fd

-
  

char url [URL_LEN]

-
  

BufferStream * stream

-
  

};

-

Defines information about different types of data sources.

-
- -## **Details** - -## **Field ** - -## fd - -``` -int FormatSource::fd -``` - - **Description:** - -Local file descriptor - -## stream - -``` -[BufferStream](BufferStream.md)* FormatSource::stream -``` - - **Description:** - -Pointer to the function for reading buffer stream data - -## type - -``` -[SourceType](Format.md#ga3ae727773c367ac1041d72ac770a0ab1) FormatSource::type -``` - - **Description:** - -Data source type. For details, see [SourceType](Format.md#ga3ae727773c367ac1041d72ac770a0ab1). - -## url - -``` -char FormatSource::url[[URL_LEN](Format.md#ga1ac54dd3b9b49c1800b5f502a87650be)] -``` - - **Description:** - -Network URI or local file path. The maximum length is specified by **URL\_LEN**. - diff --git a/api/api-SmartVision-Devices/FrameConfig.md b/api/api-SmartVision-Devices/FrameConfig.md deleted file mode 100755 index 65c97149a66a07f538db398d453fa888ac3dc0cc..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/FrameConfig.md +++ /dev/null @@ -1,127 +0,0 @@ -# FrameConfig - -## **Overview** - -**Related Modules:** - -[MultiMedia\_FrameConfig](MultiMedia_FrameConfig.md) - -**Description:** - -Declares APIs of the **[FrameConfig](FrameConfig.md)** class. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Member Function Name

-

Description

-

FrameConfig ()=delete

-

 

-

constructed function;

-

FrameConfig (int32_t type)

-

 

-

constructed function by a param

-

~FrameConfig ()

-

 

-

destructor function.

-

GetFrameConfigType ()

-

int32_t 

-

Obtains the frame configuration type.

-

GetSurfaces ()

-

std::list< Surface * > 

-

Obtains a list of shared memories (surface objects).

-

GetAeMode ()

-

int32_t 

-

Obtains the auto exposure mode.

-

GetAeRect ()

-

CameraRect 

-

Obtains the auto exposure region.

-

GetImageRotation ()

-

int32_t 

-

Obtains the image rotation mode.

-

GetKeys ()

-

std::list< uint32_t > 

-

Obtains keys of parameters that can be configured.

-

AddSurface (Surface &surface)

-

void 

-

Adds a surface (an object of shared memory).

-

RemoveSurface (Surface &surface)

-

void 

-

Removes a surface (an object of shared memory). You can call this function to release the surface when your application does not need to obtain data.

-

SetAeMode (int32_t aeMode, CameraRect &rect)

-

void 

-

Sets the auto exposure mode and exposure region.

-

SetImageRotation (int32_t degrees)

-

void 

-

Sets the image rotation angle.

-
    
  

-

Sets the common parameter.

-
    
  

-

Obtains the value of a common parameter based on its key. For details, see CAMERA_FUC_KEY.

-
- diff --git a/api/api-SmartVision-Devices/FrameStateCallback.md b/api/api-SmartVision-Devices/FrameStateCallback.md deleted file mode 100755 index 04881465788f2baef2dc4dccbe6df401b9b2eb5a..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/FrameStateCallback.md +++ /dev/null @@ -1,69 +0,0 @@ -# FrameStateCallback - -## **Overview** - -**Related Modules:** - -[MultiMedia\_FrameStateCallback](MultiMedia_FrameStateCallback.md) - -**Description:** - -Declares functions in the **[FrameStateCallback](FrameStateCallback.md)** class. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - -

Public Member Function Name

-

Description

-

FrameStateCallback ()=default

-

 

-

constructed function;

-

~FrameStateCallback ()=default

-

 

-

destructor function;

-

OnFrameFinished (Camera &camera, FrameConfig &frameConfig, FrameResult &frameResult)

-

virtual void 

-

Called when the frame capture is finished.

-

OnFrameError (Camera &camera, FrameConfig &frameConfig, int32_t errorCode, FrameResult &frameResult)

-

virtual void 

-

Called when the frame capture fails.

-

OnFrameProgressed (Camera &camera, FrameConfig &frameConfig, FrameResult &frameResult)

-

virtual void 

-

Called when the frame capture is in process.

-

OnFrameStarted (Camera &camera, FrameConfig &frameConfig, int32_t frameNumber, int32_t timestamp)

-

virtual void 

-

Called when the frame capture starts.

-
- diff --git a/api/api-SmartVision-Devices/GPIO.md b/api/api-SmartVision-Devices/GPIO.md deleted file mode 100755 index 61a09c5c907884c513197abcf59706734486b03c..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/GPIO.md +++ /dev/null @@ -1,582 +0,0 @@ -# GPIO - -- [Overview](#section1158330629165623) -- [Summary](#section1514023225165623) -- [Files](#files) -- [Typedefs](#typedef-members) -- [Enumerations](#enum-members) -- [Functions](#func-members) -- [Details](#section600064076165623) -- [Typedef](#section550945231165623) -- [GpioIrqFunc](#ga8f3b7d0f0aaa1da8117781efe4b1670e) -- [Enumeration Type](#section1554549735165623) -- [GpioDirType](#ga71f27d3ba7ca04d9448199fca38ae19d) -- [GpioIrqType](#ga55c74906cd839809c65a2291ce19e71a) -- [GpioValue](#ga6a25a3efddf2301c7b01a7f0af44fb11) -- [Function](#section821997884165623) -- [GpioDisableIrq\(\)](#gafa01dc510f26d5aff102d72679920929) -- [GpioEnableIrq\(\)](#gafcf00796a949245d665e672ae0294aee) -- [GpioGetDir\(\)](#ga6eb1536930b7ec5e263667ba30dfc6fb) -- [GpioRead\(\)](#ga267cb09db1f12ac3f08f847e4141f3c5) -- [GpioSetDir\(\)](#ga5c628216d209fa76c69eca69856bc0ae) -- [GpioSetIrq\(\)](#ga6ea5d16b8d73cb74e36d367f05cb7f6e) -- [GpioUnSetIrq\(\)](#ga0e417971d72956f64a3160525c2be19f) -- [GpioWrite\(\)](#ga7dee8242ba9335b3217635ba64764bc4) - -## **Overview** - -**Description:** - -Provides standard general-purpose input/output \(GPIO\) interfaces for driver development. - -You can use this module to perform operations on a GPIO pin, including setting the input/output direction, reading/writing the level value, and setting the interrupt service routine \(ISR\) function. - -**Since:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - -

File Name

-

Description

-

gpio_if.h

-

Declares the standard GPIO interface functions.

-
- -## Typedefs - - - - - - - - - - -

Typedef Name

-

Description

-

GpioIrqFunc) (uint16_t gpio, void *data)

-

typedef int32_t(*

-

Defines the function type of a GPIO interrupt service routine (ISR).

-
- -## Enumerations - - - - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

GpioValue { GPIO_VAL_LOW = 0, GPIO_VAL_HIGH = 1, GPIO_VAL_ERR }

-

Enumerates GPIO level values.

-

GpioDirType { GPIO_DIR_IN = 0, GPIO_DIR_OUT = 1, GPIO_DIR_ERR }

-

Enumerates GPIO directions.

-

GpioIrqType { GPIO_IRQ_TRIGGER_NONE = OSAL_IRQF_TRIGGER_NONE, GPIO_IRQ_TRIGGER_RISING = OSAL_IRQF_TRIGGER_RISING, GPIO_IRQ_TRIGGER_FALLING = OSAL_IRQF_TRIGGER_FALLING, GPIO_IRQ_TRIGGER_HIGH = OSAL_IRQF_TRIGGER_HIGH, GPIO_IRQ_TRIGGER_LOW = OSAL_IRQF_TRIGGER_LOW, GPIO_IRQ_USING_THREAD = (0x1 << 8) }

-

Enumerates GPIO irq types.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

GpioRead (uint16_t gpio, uint16_t *val)

-

int32_t

-

Reads the level value of a GPIO pin.

-

GpioWrite (uint16_t gpio, uint16_t val)

-

int32_t

-

Writes the level value for a GPIO pin.

-

GpioSetDir (uint16_t gpio, uint16_t dir)

-

int32_t

-

Sets the input/output direction for a GPIO pin.

-

GpioGetDir (uint16_t gpio, uint16_t *dir)

-

int32_t

-

Obtains the input/output direction of a GPIO pin.

-

GpioSetIrq (uint16_t gpio, uint16_t mode, GpioIrqFunc func, void *arg)

-

int32_t

-

Sets the ISR function for a GPIO pin.

-

GpioUnSetIrq (uint16_t gpio)

-

int32_t

-

Cancels the setting of the ISR function for a GPIO pin.

-

GpioEnableIrq (uint16_t gpio)

-

int32_t

-

Enables a GPIO pin interrupt.

-

GpioDisableIrq (uint16_t gpio)

-

int32_t

-

Disables a GPIO pin interrupt.

-
- -## **Details** - -## **Typedef ** - -## GpioIrqFunc - -``` -typedef int32_t(* GpioIrqFunc) (uint16_t gpio, void *data) -``` - - **Description:** - -Defines the function type of a GPIO interrupt service routine \(ISR\). - -This function is used when you call [GpioSetIrq](GPIO.md#ga6ea5d16b8d73cb74e36d367f05cb7f6e) to register the ISR for a GPIO pin. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
gpioIndicates the GPIO number of the ISR.
dataIndicates the pointer to the private data passed to this ISR (The data is specified when the ISR is registered).
- -**Returns:** - -Returns **0** if the ISR function type is successfully defined; returns a negative value otherwise. - -**See also:** - -[GpioSetIrq](GPIO.md#ga6ea5d16b8d73cb74e36d367f05cb7f6e) - -## **Enumeration Type ** - -## GpioDirType - -``` -enum [GpioDirType](GPIO.md#ga71f27d3ba7ca04d9448199fca38ae19d) -``` - - **Description:** - -Enumerates GPIO directions. - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
GPIO_DIR_IN

Input direction

-
GPIO_DIR_OUT

Output direction

-
GPIO_DIR_ERR

Invalid direction

-
- -## GpioIrqType - -``` -enum [GpioIrqType](GPIO.md#ga55c74906cd839809c65a2291ce19e71a) -``` - - **Description:** - -Enumerates GPIO irq types. - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
GPIO_IRQ_TRIGGER_NONE

Trigger is not set

-
GPIO_IRQ_TRIGGER_RISING

Rising edge triggered

-
GPIO_IRQ_TRIGGER_FALLING

Falling edge triggered

-
GPIO_IRQ_TRIGGER_HIGH

High-level triggered

-
GPIO_IRQ_TRIGGER_LOW

Low-level triggered

-
GPIO_IRQ_USING_THREAD

execute interrupt service routine in thread context

-
- -## GpioValue - -``` -enum [GpioValue](GPIO.md#ga6a25a3efddf2301c7b01a7f0af44fb11) -``` - - **Description:** - -Enumerates GPIO level values. - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
GPIO_VAL_LOW

Low GPIO level

-
GPIO_VAL_HIGH

High GPIO level

-
GPIO_VAL_ERR

Invalid GPIO level

-
- -## **Function ** - -## GpioDisableIrq\(\) - -``` -int32_t GpioDisableIrq (uint16_t gpio) -``` - - **Description:** - -Disables a GPIO pin interrupt. - -You can call this function when you need to temporarily mask a GPIO pin interrupt or cancel an ISR function. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
gpioIndicates the GPIO pin number.
- -**Returns:** - -Returns **0** if the GPIO pin interrupt is successfully disabled; returns a negative value otherwise. - -## GpioEnableIrq\(\) - -``` -int32_t GpioEnableIrq (uint16_t gpio) -``` - - **Description:** - -Enables a GPIO pin interrupt. - -Before enabling the interrupt, you must call [GpioSetIrq](GPIO.md#ga6ea5d16b8d73cb74e36d367f05cb7f6e) to set the ISR function for the GPIO pin. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
gpioIndicates the GPIO pin number.
- -**Returns:** - -Returns **0** if the GPIO pin interrupt is successfully enabled; returns a negative value otherwise. - -## GpioGetDir\(\) - -``` -int32_t GpioGetDir (uint16_t gpio, uint16_t * dir ) -``` - - **Description:** - -Obtains the input/output direction of a GPIO pin. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
gpioIndicates the GPIO pin number.
dirIndicates the pointer to the obtained input/output direction. For details, see GpioDirType.
- -**Returns:** - -Returns **0** if the GPIO pin direction is successfully obtained; returns a negative value otherwise. - -## GpioRead\(\) - -``` -int32_t GpioRead (uint16_t gpio, uint16_t * val ) -``` - - **Description:** - -Reads the level value of a GPIO pin. - -Before using this function, you need to call [GpioSetDir](GPIO.md#ga5c628216d209fa76c69eca69856bc0ae) to set the GPIO pin direction to input. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
gpioIndicates the GPIO pin number.
valIndicates the pointer to the read level value. For details, see GpioValue.
- -**Returns:** - -Returns **0** if the GPIO pin level value is successfully read; returns a negative value otherwise. - -## GpioSetDir\(\) - -``` -int32_t GpioSetDir (uint16_t gpio, uint16_t dir ) -``` - - **Description:** - -Sets the input/output direction for a GPIO pin. - -Generally, you can set the direction to input when external level signals need to be read, and set the direction to output when the level signals need to be sent externally. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
gpioIndicates the GPIO pin number.
dirIndicates the direction to set. For details, see GpioDirType.
- -**Returns:** - -Returns **0** if the GPIO pin direction is successfully set; returns a negative value otherwise. - -## GpioSetIrq\(\) - -``` -int32_t GpioSetIrq (uint16_t gpio, uint16_t mode, [GpioIrqFunc](GPIO.md#ga8f3b7d0f0aaa1da8117781efe4b1670e) func, void * arg ) -``` - - **Description:** - -Sets the ISR function for a GPIO pin. - -Before using a GPIO pin as an interrupt, you must call this function to set an ISR function for this GPIO pin, including the ISR parameters and the interrupt trigger mode. After the setting is successful, you also need to call [GpioEnableIrq](GPIO.md#gafcf00796a949245d665e672ae0294aee) to enable the interrupt, so that the ISR function can respond correctly. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
gpioIndicates the GPIO pin number.
modeIndicates the interrupt trigger mode. For details, see OSAL_IRQF_TRIGGER_RISING.
funcIndicates the ISR function to set, which is specified by GpioIrqFunc.
argIndicates the pointer to the parameters passed to the ISR function.
- -**Returns:** - -Returns **0** if the ISR function of the GPIO pin is successfully set; returns a negative value otherwise. - -## GpioUnSetIrq\(\) - -``` -int32_t GpioUnSetIrq (uint16_t gpio) -``` - - **Description:** - -Cancels the setting of the ISR function for a GPIO pin. - -If you do not need the GPIO pin as an interrupt, call this function to cancel the ISR function set via [GpioSetIrq](GPIO.md#ga6ea5d16b8d73cb74e36d367f05cb7f6e). Since this ISR function is no longer valid, you are advised to use [GpioDisableIrq](GPIO.md#gafa01dc510f26d5aff102d72679920929) to disable the GPIO pin interrupt. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
gpioIndicates the GPIO pin number.
- -**Returns:** - -Returns **0** if the ISR function of the GPIO pin is successfully cancelled; returns a negative value otherwise. - -## GpioWrite\(\) - -``` -int32_t GpioWrite (uint16_t gpio, uint16_t val ) -``` - - **Description:** - -Writes the level value for a GPIO pin. - -Before using this function, you need to call [GpioSetDir](GPIO.md#ga5c628216d209fa76c69eca69856bc0ae) to set the GPIO pin direction to output. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
gpioIndicates the GPIO pin number.
valIndicates the level value to be written. For details, see GpioValue.
- -**Returns:** - -Returns **0** if the GPIO pin level value is successfully written; returns a negative value otherwise. - diff --git a/api/api-SmartVision-Devices/GfxFuncs.md b/api/api-SmartVision-Devices/GfxFuncs.md deleted file mode 100755 index d8a1d0113f5c4b2bcbd067a5148610c4c3f5d586..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/GfxFuncs.md +++ /dev/null @@ -1,353 +0,0 @@ -# GfxFuncs - -- [Overview](#section1836335825165631) -- [Summary](#section2026088827165631) -- [Data Fields](#pub-attribs) -- [Details](#section2110107619165631) -- [Field](#section1301358906165631) -- [Blit](#ab5bf93f23b73413e7aa7618a202364d7) -- [DeinitGfx](#ad86b127aad2a6e7f01e07b77054d42b3) -- [DrawCircle](#acac8893b6bf7ab9abdad1b563c4ab6f2) -- [DrawLine](#a5715347b14918e0dca51a9fd7b3d1a47) -- [DrawRectangle](#a96785cdbc636179fc51026fc589cac17) -- [FillRect](#a12cf050a4c0d76f9816008fb102c7330) -- [InitGfx](#a3ec8ed6a467ed0c88e4dd723723c0f41) -- [Sync](#aa1d93d9b5bc48cf48acb358ef531998a) - -## **Overview** - -**Related Modules:** - -[Display](Display.md) - -**Description:** - -Defines pointers to the hardware acceleration driver functions. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

InitGfx )(void)

-

int32_t(*

-

Initializes hardware acceleration.

-

DeinitGfx )(void)

-

int32_t(*

-

Deinitializes hardware acceleration.

-

FillRect )(ISurface *surface, IRect *rect, uint32_t color, GfxOpt *opt)

-

int32_t(*

-

Fills a rectangle with a given color on the canvas.

-

DrawRectangle )(ISurface *surface, Rectangle *rect, uint32_t color, GfxOpt *opt)

-

int32_t(*

-

Draws a rectangle with a given color on the canvas.

-

DrawLine )(ISurface *surface, ILine *line, GfxOpt *opt)

-

int32_t(*

-

Draws a straight line with a given color on the canvas.

-

DrawCircle )(ISurface *surface, ICircle *circle, GfxOpt *opt)

-

int32_t(*

-

Draws a circle with a specified center and radius on the canvas using a given color.

-

Blit )(ISurface *srcSurface, IRect *srcRect, ISurface *dstSurface, IRect *dstRect)

-

int32_t(*

-

Blits bitmaps.

-

Sync )(void)

-

int32_t(*

-

Synchronizes hardware acceleration.

-
- -## **Details** - -## **Field ** - -## Blit - -``` -int32_t(* GfxFuncs::Blit) ([ISurface](ISurface.md) *srcSurface, [IRect](IRect.md) *srcRect, [ISurface](ISurface.md) *dstSurface, [IRect](IRect.md) *dstRect) -``` - - **Description:** - -Blits bitmaps. - -During bit blit, color space conversion \(CSC\), scaling, and rotation can be implemented. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
srcSurfaceIndicates the pointer to the source bitmap.
srcRectIndicates the pointer to the rectangle of the source bitmap.
dstSurfaceIndicates the pointer to the destination bitmap.
dstRectIndicates the pointer to the rectangle of the destination bitmap.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -**See also:** - -Blit3 - -## DeinitGfx - -``` -int32_t(* GfxFuncs::DeinitGfx) (void) -``` - - **Description:** - -Deinitializes hardware acceleration. - -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -**See also:** - -[InitGfx](GfxFuncs.md#a3ec8ed6a467ed0c88e4dd723723c0f41) - -## DrawCircle - -``` -int32_t(* GfxFuncs::DrawCircle) ([ISurface](ISurface.md) *surface, [ICircle](ICircle.md) *circle, [GfxOpt](GfxOpt.md) *opt) -``` - - **Description:** - -Draws a circle with a specified center and radius on the canvas using a given color. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
surfaceIndicates the pointer to the canvas.
circleIndicates the pointer to the circle to draw.
optIndicates the pointer to the hardware acceleration option.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -## DrawLine - -``` -int32_t(* GfxFuncs::DrawLine) ([ISurface](ISurface.md) *surface, [ILine](ILine.md) *line, [GfxOpt](GfxOpt.md) *opt) -``` - - **Description:** - -Draws a straight line with a given color on the canvas. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
surfaceIndicates the pointer to the canvas.
lineIndicates the pointer to the line to draw.
optIndicates the pointer to the hardware acceleration option.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -## DrawRectangle - -``` -int32_t(* GfxFuncs::DrawRectangle) ([ISurface](ISurface.md) *surface, [Rectangle](Rectangle.md) *rect, uint32_t color, [GfxOpt](GfxOpt.md) *opt) -``` - - **Description:** - -Draws a rectangle with a given color on the canvas. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
surfaceIndicates the pointer to the canvas.
rectIndicates the pointer to the rectangle to draw.
colorIndicates the color to draw.
optIndicates the pointer to the hardware acceleration option.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -**See also:** - -[FillRect](GfxFuncs.md#a12cf050a4c0d76f9816008fb102c7330) - -## FillRect - -``` -int32_t(* GfxFuncs::FillRect) ([ISurface](ISurface.md) *surface, [IRect](IRect.md) *rect, uint32_t color, [GfxOpt](GfxOpt.md) *opt) -``` - - **Description:** - -Fills a rectangle with a given color on the canvas. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
surfaceIndicates the pointer to the canvas.
rectIndicates the pointer to the rectangle to fill.
colorIndicates the color to fill.
optIndicates the pointer to the hardware acceleration option.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -## InitGfx - -``` -int32_t(* GfxFuncs::InitGfx) (void) -``` - - **Description:** - -Initializes hardware acceleration. - -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -**See also:** - -[DeinitGfx](GfxFuncs.md#ad86b127aad2a6e7f01e07b77054d42b3) - -## Sync - -``` -int32_t(* GfxFuncs::Sync) (void) -``` - - **Description:** - -Synchronizes hardware acceleration. - -Use this function for hardware acceleration synchronization when hardware acceleration is used to draw and blit bitmaps. This function blocks the process until hardware acceleration is complete. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
timeOutIndicates the timeout duration for hardware acceleration synchronization. The value 0 indicates no timeout, so the process waits until hardware acceleration is complete.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - diff --git a/api/api-SmartVision-Devices/GfxOpt.md b/api/api-SmartVision-Devices/GfxOpt.md deleted file mode 100755 index f0c4c14d532188dac7562080c153216411c963d9..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/GfxOpt.md +++ /dev/null @@ -1,180 +0,0 @@ -# GfxOpt - -- [Overview](#section1817863845165631) -- [Summary](#section994812616165631) -- [Data Fields](#pub-attribs) -- [Details](#section1254484134165631) -- [Field](#section1185676163165631) -- [blendType](#ae1496544d54cd7a1f065bf8b061c6930) -- [colorKeyFrom](#a6258754e9250402e52478d29eb2cf070) -- [enableRop](#aa370e2a38a91f0762ddb48bdacf996c4) -- [enableScale](#adc64f89952efe8c45ef77f3512190e2d) -- [enAlpha](#a29ec54f7ca3a87aed83c4621979c6c0a) -- [globalAlpha](#a812b71a7c6e8190e17307c726c31fc23) -- [mirrorType](#a16e6d186004487eda4d78c5f8295cd64) -- [ropType](#a171646d484843b2cc5c92cec8742766f) -- [rotateType](#a3cf19bc3feeb0d286f526133cc0e027e) - -## **Overview** - -**Related Modules:** - -[Display](Display.md) - -**Description:** - -Defines hardware acceleration options. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

enAlpha

-

bool

-

globalAlpha

-

uint32_t

-

blendType

-

BlendType

-

colorKeyFrom

-

ColorKey

-

enableRop

-

bool

-

ropType

-

RopType

-

enableScale

-

bool

-

rotateType

-

TransformType

-

mirrorType

-

MirrorType

-
- -## **Details** - -## **Field ** - -## blendType - -``` -[BlendType](Display.md#gaab1839ed4aab1030dfda801a51e68817) GfxOpt::blendType -``` - - **Description:** - -Blending type - -## colorKeyFrom - -``` -[ColorKey](Display.md#ga4fe6fb05c7ba0048b1739d88f4d4878e) GfxOpt::colorKeyFrom -``` - - **Description:** - -Color key mode - -## enableRop - -``` -bool GfxOpt::enableRop -``` - - **Description:** - -Raster operations pipeline \(ROP\) enable bit - -## enableScale - -``` -bool GfxOpt::enableScale -``` - - **Description:** - -Scaling enable bit - -## enAlpha - -``` -bool GfxOpt::enAlpha -``` - - **Description:** - -Alpha enable bit - -## globalAlpha - -``` -uint32_t GfxOpt::globalAlpha -``` - - **Description:** - -Global alpha value - -## mirrorType - -``` -[MirrorType](Display.md#ga08d32376574b541d162d8534adb78fd0) GfxOpt::mirrorType -``` - - **Description:** - -Mirror type - -## ropType - -``` -[RopType](Display.md#ga24265f7618fbdba53d3da4806d3097c4) GfxOpt::ropType -``` - - **Description:** - -ROP type - -## rotateType - -``` -[TransformType](Display.md#gaa65f3b21a9a92ff022e435a7304126d2) GfxOpt::rotateType -``` - - **Description:** - -Rotation type - diff --git a/api/api-SmartVision-Devices/GrallocBuffer.md b/api/api-SmartVision-Devices/GrallocBuffer.md deleted file mode 100755 index 3395e5026002eea42f0792d48b300f34edc8319e..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/GrallocBuffer.md +++ /dev/null @@ -1,100 +0,0 @@ -# GrallocBuffer - -- [Overview](#section1994522661165631) -- [Summary](#section197328879165631) -- [Data Fields](#pub-attribs) -- [Details](#section694221750165631) -- [Field](#section924837173165631) -- [hdl](#a6bdce5004be0cb1c41326c0621581fff) -- [size](#a756f3d9e23d7e97a28a5228765cb8cf3) -- [type](#ad66bdf06909350cd1a4e5c45349e72ae) -- [virAddr](#a3196376b8b938cf96e008152f1ddceee) - -## **Overview** - -**Related Modules:** - -[Display](Display.md) - -**Description:** - -Defines the memory buffer, including the buffer handle, memory type, memory size, and virtual memory address. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

hdl

-

BufferHandle

-

type

-

MemType

-

size

-

uint32_t

-

virAddr

-

void *

-
- -## **Details** - -## **Field ** - -## hdl - -``` -[BufferHandle](BufferHandle.md) GrallocBuffer::hdl -``` - - **Description:** - -Buffer handle - -## size - -``` -uint32_t GrallocBuffer::size -``` - - **Description:** - -Size of the requested memory - -## type - -``` -[MemType](Display.md#gabd31f838aefffa46191d0d7dc36a96b2) GrallocBuffer::type -``` - - **Description:** - -Type of the requested memory - -## virAddr - -``` -void* GrallocBuffer::virAddr -``` - - **Description:** - -Virtual address of the requested memory - diff --git a/api/api-SmartVision-Devices/GrallocFuncs.md b/api/api-SmartVision-Devices/GrallocFuncs.md deleted file mode 100755 index 3042b8c7bb50ec8e85c644d0d03d3ba871cf3748..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/GrallocFuncs.md +++ /dev/null @@ -1,286 +0,0 @@ -# GrallocFuncs - -- [Overview](#section859227232165631) -- [Summary](#section1937256718165631) -- [Data Fields](#pub-attribs) -- [Details](#section386149568165631) -- [Field](#section419891595165631) -- [AllocMem](#a48c1f21c086ead11bcb1a53bbec2d285) -- [FlushCache](#ad56665aa0ff48995b5ec72a8095416d8) -- [FlushMCache](#aceac1511a490c2ade1e33723d0e20960) -- [FreeMem](#af80e6c92c5ba7e2419da27cafe19bcff) -- [Mmap](#ab64438d785bc59050cd4f0a759bd531b) -- [MmapCache](#a25005370b14ff2a0c860b2272b354e3f) -- [Unmap](#a55864e4912348f40dd77584e96ad4647) - -## **Overview** - -**Related Modules:** - -[Display](Display.md) - -**Description:** - -Defines pointers to the memory driver functions. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

AllocMem )(GrallocBuffer *buffer)

-

int32_t(*

-

Allocates memory based on the parameters passed by the GUI.

-

FreeMem )(GrallocBuffer *buffer)

-

void(*

-

Releases memory.

-

Mmap )(GrallocBuffer *buffer)

-

void *(*

-

Maps memory to memory without cache in the process's address space.

-

MmapCache )(GrallocBuffer *buffer)

-

void *(*

-

Maps memory to memory with cache in the process's address space.

-

Unmap )(GrallocBuffer *buffer)

-

int32_t(*

-

Unmaps memory, that is, removes any mappings in the process's address space.

-

FlushCache )(GrallocBuffer *buffer)

-

int32_t(*

-

Flushes data from the cache to memory and invalidates the data in the cache.

-

FlushMCache )(GrallocBuffer *buffer)

-

int32_t(*

-

Flushes data from the cache mapped via Mmap to memory and invalidates the data in the cache.

-
- -## **Details** - -## **Field ** - -## AllocMem - -``` -int32_t(* GrallocFuncs::AllocMem) ([GrallocBuffer](GrallocBuffer.md) *buffer) -``` - - **Description:** - -Allocates memory based on the parameters passed by the GUI. - -The allocated memory can be classified into shared memory, memory with cache, and memory without cache. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
bufferIndicates the pointer to the buffer of the memory to allocate.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -## FlushCache - -``` -int32_t(* GrallocFuncs::FlushCache) ([GrallocBuffer](GrallocBuffer.md) *buffer) -``` - - **Description:** - -Flushes data from the cache to memory and invalidates the data in the cache. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
bufferIndicates the pointer to the buffer of the cache to flush.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -## FlushMCache - -``` -int32_t(* GrallocFuncs::FlushMCache) ([GrallocBuffer](GrallocBuffer.md) *buffer) -``` - - **Description:** - -Flushes data from the cache mapped via [Mmap](GrallocFuncs.md#ab64438d785bc59050cd4f0a759bd531b) to memory and invalidates the data in the cache. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
bufferIndicates the pointer to the buffer of the cache to flush.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -## FreeMem - -``` -void(* GrallocFuncs::FreeMem) ([GrallocBuffer](GrallocBuffer.md) *buffer) -``` - - **Description:** - -Releases memory. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
bufferIndicates the pointer to the buffer of the memory to release.
- -## Mmap - -``` -void*(* GrallocFuncs::Mmap) ([GrallocBuffer](GrallocBuffer.md) *buffer) -``` - - **Description:** - -Maps memory to memory without cache in the process's address space. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
bufferIndicates the pointer to the buffer of the memory to map.
- -**Returns:** - -Returns the pointer to a valid address if the operation is successful; returns **NULL** otherwise. - -## MmapCache - -``` -void*(* GrallocFuncs::MmapCache) ([GrallocBuffer](GrallocBuffer.md) *buffer) -``` - - **Description:** - -Maps memory to memory with cache in the process's address space. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
bufferIndicates the pointer to the buffer of the memory to map.
- -**Returns:** - -Returns the pointer to a valid address if the operation is successful; returns **NULL** otherwise. - -## Unmap - -``` -int32_t(* GrallocFuncs::Unmap) ([GrallocBuffer](GrallocBuffer.md) *buffer) -``` - - **Description:** - -Unmaps memory, that is, removes any mappings in the process's address space. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
bufferIndicates the pointer to the buffer of the memory to unmap.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - diff --git a/api/api-SmartVision-Devices/Graphic.md b/api/api-SmartVision-Devices/Graphic.md deleted file mode 100755 index 24a8ae39074d2a3b7dc576ff83148d6005370dea..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Graphic.md +++ /dev/null @@ -1,31435 +0,0 @@ -# Graphic - -- [Overview](#section140617786165625) -- [Summary](#section564382509165625) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Macros](#define-members) -- [Typedefs](#typedef-members) -- [Enumerations](#enum-members) -- [Functions](#func-members) -- [Details](#section1255390680165625) -- [Macro Definition](#section380634492165625) -- [VERSION\_STANDARD](#ga2017774de578acba5afd77793c00205b) -- [Typedef](#section296750289165625) -- [EasingFunc](#gaf04c41bb7b151a6e8be2012cc9e6475b) -- [Enumeration Type](#section1693383239165625) -- [anonymous enum](#ga771fc52d017036dfa9c9625b16c20650) -- [anonymous enum](#ga979211736072132173839ea26b661aee) -- [anonymous enum](#ga09c8113cdfa22135dbe310a32a6a88ad) -- [ButtonImageSrc](#gaf9f6c0c373f090e79b9e8d847e186e92) -- [ButtonState](#ga188dd55c17ee44be27fa80543f13f729) -- [CapType](#ga2db3928cdf793f4950245a6841dd43d6) -- [ColorMode](#ga3a3fb04ed2cda4017e6771c66b692141) -- [DeviceType](#gaf8133740d5a3cb2f88a7f33cb11c6dbd) -- [DialogButtonType](#ga1bfefa0b46fd5a79a28d0c9a75114295) -- [Direction](#ga4a7a2c192206c8b18379f42a5fd176eb) -- [DisplayMode](#gabe3b64b11e5bf5d7b54e1039e40f306b) -- [DrawType](#ga0a595eeb50ce4e7dfff9ede16098d2db) -- [FPSCalculateType](#ga75d850e3abff6c2f617b689a0cb9a3d1) -- [HandType](#ga13cf64ea5bd39550976aaf65b1381edf) -- [LineBreakMode](#gaf2ba9acac6cafffc549781ace0475cd5) -- [PaintStyle](#ga548320a469b7862fa416af062cad5d7a) -- [TextOrientation](#ga0778527bee4a7ddd8d46395585a5cfb9) -- [TimeElement](#gaa6aacc9ecbf5e20f22e50e542a69f472) -- [UICheckBoxState](#ga15a3f0302aded0e4d1584ddc6002335d) -- [UITextLanguageAlignment](#ga3f99b58f731a37cacde72d5e0c934593) -- [UITextLanguageDirect](#ga0c108f97781843f67c101b47b6c00cf0) -- [WorkMode](#ga19db90932bc71e6bbced6ccf2935ac98) -- [Function](#section439526353165625) -- [AbstractAdapter\(\)](#gab60e1c77fb98352bd62e56b550d75d88) -- [Add\(\) \[1/3\]](#ga8b60ed045dc2a3370498a3e6922d5400) -- [Add\(\) \[2/3\]](#gacf5db120308ac7783c493f5437f06cee) -- [Add\(\) \[3/3\]](#ga1cdc37a33412d6134ed7214300bc1c87) -- [AddDataSerial\(\)](#gafc510047aac4e7eebd5b229e726ef762) -- [AddPoints\(\)](#ga88d554725405cf9c501f145a25448238) -- [AlignBottomToSibling\(\)](#ga7607c3f9661932c495d080e9d92fb1a3) -- [AlignHorCenterToSibling\(\)](#gac23776dbc2fce7ff30d57438abfa5230) -- [AlignLeftToSibling\(\)](#gac7f5f2584c716a56fee3783f8dea6246) -- [AlignRightToSibling\(\)](#gabb1ac454cdf95593c1e387d5e272433c) -- [AlignTopToSibling\(\)](#ga903d7cbc59bac06d728b7f6435c9a504) -- [AlignVerCenterToSibling\(\)](#gad3caa27aa0cb73ec4656e7d23aa222de) -- [Animator\(\) \[1/2\]](#gabcc3afbe99010e70e3e6dbd780cb5974) -- [Animator\(\) \[2/2\]](#ga79be500c40ba8743dd58dc633a732b53) -- [Aqua\(\)](#ga24da6b938c938b3defeb56ff79a4c4f5) -- [Back\(\)](#gae5c3f6272b58c45f458c475a79ebfe3d) -- [BackEaseIn\(\)](#ga4598524b16a33de497fa9321d887d3b1) -- [BackEaseInOut\(\)](#gac7c2a9a1dfce384438a3bd9d6c0c2525) -- [BackEaseOut\(\)](#ga7399f01f7abc33413bf25aa17a99c2f2) -- [Begin\(\)](#ga8fe8647f764773c29d3fa70c9b70eb2a) -- [Black\(\)](#gac821c879969c94ec048117738e4bbef2) -- [Blue\(\)](#ga3b02160a068039d3801580c8e35008b4) -- [Callback\(\)](#gace3debcfa4200de1951a8eae6421e5aa) -- [Cancel\(\)](#gac838ad321786766c6d4020504b07b93b) -- [CancelEvent\(\)](#gaf3b75ee84a33ffcbc640328b2747b0a1) -- [CircEaseIn\(\)](#ga446c958f14b3d6de24e2c1bab171bba2) -- [CircEaseInOut\(\)](#ga68c392dad14e1bef192b085aeec6ca9b) -- [CircEaseOut\(\)](#gaab8fad8664d648df7e5e224b68ee54ad) -- [Clear\(\) \[1/2\]](#ga2292866786c9f888bc722ffcebc7c831) -- [Clear\(\) \[2/2\]](#ga7e20822a6c448bee724f20afad1c69d4) -- [ClearData\(\)](#ga148d9b3933a733433a96a48b95cff844) -- [ClearDataSerial\(\)](#gae2752857fbcb9f1541cd811321bfc2c6) -- [ClearOnKeyActListener\(\)](#ga00303597af333088c06a45346f4a77f2) -- [ClearOnVirtualDeviceEventListener\(\)](#ga0b550a305c0cda1dc510b2446c56ed82) -- [ClearValues\(\)](#ga81e69c460191bbe3606ac540433178a1) -- [ClickEvent\(\)](#gaeb51d39715cc72b383ba6059bd0d1053) -- [Clip\(\) \[1/2\]](#ga22219a4351530d5a6914bdc5dcf406d0) -- [Clip\(\) \[2/2\]](#ga0001387a136a87fb2c2e2b5eb3363c72) -- [ColorTo16\(\)](#ga2a6a0bd067a05ee35793fefc8f9f4d1e) -- [ColorTo32\(\) \[1/2\]](#gaaca42d51bc5f28d5dbd5b1635be50224) -- [ColorTo32\(\) \[2/2\]](#ga461b46dd76842ad4b0ffdc88202223a7) -- [Cross\(\)](#gac1c8e01fd488d5f8aea6bddad1dec206) -- [CubicEaseIn\(\)](#ga5c91a83cc424fb7e4e1f40cae6b3be66) -- [CubicEaseInOut\(\)](#gad99ea4ed828f274f111f492eea123cb4) -- [CubicEaseOut\(\)](#ga529a948d9f6711a5f2726af5f10d7a48) -- [Cyan\(\)](#ga9d6b730a0799da3254543613acb0a3fa) -- [DeleteDataSerial\(\)](#ga2af81fbcd6a17ef250bf07e2d7606b8d) -- [Determinant\(\)](#ga5464ffd57d0abbd0381b2a6cf3a7d2fb) -- [Disable\(\)](#ga283131701e907e586964189818d04411) -- [DisplayLeadingZero\(\)](#gaf45e9196d307551e693807cae2f8b4d2) -- [Dot\(\)](#gae45c198b5bcb73ecac8d654c281bc21a) -- [DragEvent\(\)](#gae9af79f667fc1324739d2a07fdd5d94e) -- [DrawArc\(\)](#ga620028da5c71f96416becc877331ba6c) -- [DrawCircle\(\)](#ga974544e34560d0f9d6e162c528fcd7af) -- [DrawCurve\(\) \[1/2\]](#gab6557ddb74b721e4eba6cdabab954a3b) -- [DrawCurve\(\) \[2/2\]](#gad186e8eab51e97a4854d3a757a3becfb) -- [DrawImage\(\)](#gad5810166b3e02f41319dd4f4229c516c) -- [DrawLabel\(\)](#ga32d815e5a459b4a866217a7c5c4bb425) -- [DrawLine\(\) \[1/2\]](#gac97d9d39484e5a1e36273510ae47327e) -- [DrawLine\(\) \[2/2\]](#ga0c5e94526dab6a62d6db0a67385104db) -- [DrawRect\(\)](#ga1cc0bc88810cdd5554e2b1b14e68c279) -- [DrawSector\(\)](#gaf14bc2633c51a16097c3ad35e8bcb314) -- [DumpDomNode\(\)](#ga812e123f85aa3ff687908e19d23fc54f) -- [DumpDomTree\(\) \[1/2\]](#ga25384e441719c58d5cfdc3c67f1e8625) -- [DumpDomTree\(\) \[2/2\]](#ga04fbff1f92851a2ac55c4575cbc132e9) -- [Enable\(\)](#ga3185df8b60a609564f978ed9576fb813) -- [EnableAutoAlign\(\)](#ga034799920648552008146a0d9aca3424) -- [EnableBackground\(\)](#gacb680c1ddc9135371676df504dc6c8f2) -- [EnableBottomPoint\(\)](#ga2c0d693d31efd256cc6529255699ddd3) -- [EnableGradient\(\)](#gaa4635e5332809fc7a275c4077f9d140d) -- [EnableHeadPoint\(\)](#gaa90973e2315035570ffae0d4c3c2e976) -- [EnableReverse\(\)](#ga7c99edd3adfb60796be92e98fd71a705) -- [EnableSecond\(\)](#gaa2402a0538f08fb4d6857c356be7699c) -- [EnableSmooth\(\)](#ga9a3d5d81adbef7f847b631d03a472fbd) -- [EnableTopPoint\(\)](#gab97d84ead6aa301d2ae23fc68aa98a9f) -- [End\(\)](#ga839de65540644c9725b31959367355c5) -- [Event\(\) \[1/2\]](#ga89cd09ced5537a3479b7901ba8abc6da) -- [Event\(\) \[2/2\]](#ga57a9f07c8203c6a60f3b25c4edb526a0) -- [FindSubView\(\)](#gabb3c193eea516b09f9ed6932b298ab9a) -- [FlexLayout\(\)](#gac06da499194705b22e31a8a78022ceab) -- [Format\(\)](#ga183cac282667493fa2a008f9a7f4f9d2) -- [Front\(\)](#ga5e52d77c60c7710ca70ba3720b260c6a) -- [GetAlign\(\)](#ga94001af31d34b575be3678f06b77f432) -- [GetAllChildRelativeRect\(\)](#ga34fe81b667a13b06a579600827e0531b) -- [GetArcTextCenter\(\)](#ga761fd2ed6abed4489c5dff744c03c8e7) -- [GetArcTextEndAngle\(\)](#ga3ed7572ec5135e169ae1b6230dcfe7d2) -- [GetArcTextOrientation\(\)](#ga34fe8930d4ff654327e45c0abaafc037) -- [GetArcTextRadius\(\)](#ga19ef3f705a2a486b8da7688ccff6f09d) -- [GetArcTextStartAngle\(\)](#ga6f60f48c3fe4571d09bfa74cb46837fa) -- [GetBackgroundFontId\(\)](#gaaf111e4de815c455ddc35d200c1de7af) -- [GetBackgroundStyle\(\) \[1/2\]](#gac2ca1212c23c11405b12ae0a46c7eff1) -- [GetBackgroundStyle\(\) \[2/2\]](#ga946d3f2c39a79d45149118536b2557a9) -- [GetBackgroundTextColor\(\)](#ga2acbf79147239f60aafa2c78ccc2ff6d) -- [GetBackgroundTransparentStyle\(\)](#ga726fa9b4839e4a37712addd93bc91c9c) -- [GetBezierInterpolation\(\)](#ga9d6eaf28db711bc05e1cd03c5df293eb) -- [GetBlurLevel\(\)](#ga8c891ce7719b97f6d49b0554caa371cb) -- [GetBottom\(\)](#ga6c2f9cf035a36c605e20ccc76de8fbea) -- [GetBottomPointStyle\(\)](#gaca803ecb139a0dae90825748bdbbf12b) -- [GetBoxRect\(\)](#gaa2d8a5d822e40757f98c2a2820efed99) -- [GetBrightColorStyle\(\)](#ga1b8645b79268358000db1cc1af2f26b9) -- [GetBrightStyle\(\)](#ga1463772d745bb998846daad09b11df58) -- [GetButtonInactivedStyle\(\)](#ga42f393499cc83304a2a1cfa1cacc4003) -- [GetButtonPressedStyle\(\)](#gaa2096a167e0ea9de4450ae516f88ce31) -- [GetButtonReleasedStyle\(\)](#ga694e90d027391fd114481ea91ad39011) -- [GetButtonStyle\(\)](#ga0b1ce70a05042464e32e5bbddbc8f715) -- [GetCenterPosition\(\)](#ga706ac374a1383cef01dfc59c5257e480) -- [GetChildById\(\) \[1/2\]](#ga0573aa25307c22319db4629781b5cad2) -- [GetChildById\(\) \[2/2\]](#gae9f6ddb5819392546463d6371147c486) -- [GetChildrenHead\(\)](#ga6fed8238b89b013552c5a247aa2471df) -- [GetChildrenTail\(\)](#ga1361baa76fbabd2fc81cc249c6868691) -- [GetClockWise\(\)](#ga6a50a29fe85e89c6d4445822c7a2946b) -- [GetColorFromRGB\(\)](#ga0c3bb99c625896eeab6eb0acbe14f437) -- [GetColorFromRGBA\(\)](#ga0a7e632d54e39d1d46e64c6cf20690cc) -- [GetContentRect\(\) \[1/2\]](#ga9db88eae712676359d02a92be14fa316) -- [GetContentRect\(\) \[2/2\]](#ga93994f4d735e4f9a7d3e7d737e2c620c) -- [GetCount\(\) \[1/2\]](#gaa8d1098628c391a687b08f4ccdba0a4d) -- [GetCount\(\) \[2/2\]](#ga67021b360d4097c475d5e24519b5276d) -- [GetCurImageSrc\(\)](#gaf6496e4858473ab2acb80a2be6264a01) -- [GetCurrent\(\)](#ga6aeed87ecd925de4262763f20cd940d5) -- [GetCurrentHour\(\)](#ga8cf863dfcd63410f2f20572a51f2516b) -- [GetCurrentMinute\(\)](#ga5f0eea09577104d9126a07bfbc0b780a) -- [GetCurrentPage\(\)](#gaea0c52e94714dff049117227a1fd1849) -- [GetCurrentPos\(\)](#gaea811c661ad416d7f70912ad6fcce269) -- [GetCurrentSecond\(\)](#ga7bd4d2d4631d9ea373d008ec7a5d18ff) -- [GetCurrentView\(\)](#ga9b91ece1e4492afd3e4705e49bc511f3) -- [GetData\(\)](#ga8fd60ee68cc3a51d8c7ea9d3d665323c) -- [GetDataCount\(\)](#ga42b69b4725ed1d61bb8da019562c3fb2) -- [GetDefaultStyle\(\)](#gae8f75aba900bbc7119228cdc8e97e40b) -- [GetDeltaX\(\)](#ga4e504ef2c5ef58bb0c79bbfdb0168d0d) -- [GetDeltaY\(\)](#ga13e3996546917d71612b34285f8b9dd7) -- [GetDirect\(\) \[1/4\]](#ga337ba2ef9996c1b55a99408e63f0153e) -- [GetDirect\(\) \[2/4\]](#gacd469d16b0f3a8e7406d736f5e857996) -- [GetDirect\(\) \[3/4\]](#gac39c029ba83cc256fded96108e299ff5) -- [GetDirect\(\) \[4/4\]](#gab7bbf711b9cd21935a29c4183c249d80) -- [GetDirection\(\) \[1/3\]](#ga443783170697bea9a933843ad2a92283) -- [GetDirection\(\) \[2/3\]](#gad84dab74af54c23e6e724bdebb8b7df9) -- [GetDirection\(\) \[3/3\]](#ga493699e8d0e934d7fb3d5502529a1c5e) -- [GetDisplayMode\(\)](#ga14a5b4ca3e2eda9ff0f6a7ad2bc11f48) -- [GetDragACCLevel\(\)](#ga29e68195b56783f265d85506f130c664) -- [GetDragDirection\(\)](#gaf0ab47609e2dc46109f889847d9d7f9d) -- [GetEllipsisIndex\(\)](#ga302dc8ff172b67c104363710f4b53cb0) -- [GetEndAngle\(\)](#gacab2327bfc24ee985818a95d468af181) -- [GetFillColor\(\) \[1/2\]](#gadc1b88c39670f103e0c84a089e2178cf) -- [GetFillColor\(\) \[2/2\]](#ga3b20df3a339aa0f41d404eb3dc1d12ca) -- [GetFontId\(\) \[1/5\]](#ga077ac9bece7019abc2a755031ddc5575) -- [GetFontId\(\) \[2/5\]](#ga32ba629806e9d8553bbcd441b4e66d55) -- [GetFontId\(\) \[3/5\]](#gadbd5e4fae21ad3fb7dedf16b414c149d) -- [GetFontId\(\) \[4/5\]](#ga826c13b3721c17ea43a7ca386a03253c) -- [GetFontId\(\) \[5/5\]](#ga8484c4167b7638b2bbaa10ba447c9a2f) -- [GetForegroundStyle\(\) \[1/2\]](#gac77f945f375f333f80bd70254b5c1f96) -- [GetForegroundStyle\(\) \[2/2\]](#ga74cd121dd1794d7e8d905b233bd98217) -- [GetFPS\(\)](#gaa028189de9bf2968948578c8e09a9101) -- [GetFPSCalculateType\(\)](#gaf7c8d9a4d44cee2001ad0cd40c827c47) -- [GetHandCurrentAngle\(\)](#ga4092ecd3068a58937b750d308e8eca5f) -- [GetHandInitAngle\(\)](#ga3fdfc7872768c5f5cea6627958f53ff8) -- [GetHandPosition\(\)](#ga56b260401694fce13dc5f744cb8bf471) -- [GetHandRotateCenter\(\)](#ga4943396addd8f88fb131aa03319e3d8a) -- [GetHeader\(\)](#gadf426b0d958898df8ef2f9b7b1d278f1) -- [GetHeadPointStyle\(\)](#ga37a267a68383b41ce1d5c9072c2f7e83) -- [GetHeight\(\) \[1/7\]](#ga65e3a923208b28f5a5f3a4be57d12996) -- [GetHeight\(\) \[2/7\]](#ga9b35f4603a561c7a9a29b023a022ac97) -- [GetHeight\(\) \[3/7\]](#ga9a1b7ee8eee0d5fa96739fd0a0bac638) -- [GetHeight\(\) \[4/7\]](#gaddc6e68c67782eaad40977c6c2256cdd) -- [GetHeight\(\) \[5/7\]](#ga37dbe21b6a8206460136b18a2d0e3f65) -- [GetHeight\(\) \[6/7\]](#ga148f6d32ed06364dbee0190f6ff77b59) -- [GetHeight\(\) \[7/7\]](#ga1f8015706cfc73728696bf2bbd3e833b) -- [GetHideCount\(\)](#ga736907dd9f33b5335f0df5599f5cb006) -- [GetHideIndex\(\)](#ga607716e734fba2eef917fdee372e43b1) -- [GetHighlightFontId\(\)](#ga3a03222a252380aa738186e9c004dc1a) -- [GetHighlightTextColor\(\)](#gaf51c8e0d1defb52191bc5f0b2c960695) -- [GetHorAlign\(\) \[1/3\]](#ga81db66fbe12615d85c68971e58201939) -- [GetHorAlign\(\) \[2/3\]](#ga3c17868fb06a77f43587c67de4ca5ab6) -- [GetHorAlign\(\) \[3/3\]](#ga97a9af1537884de541336633edc54c72) -- [GetHorizontalScrollState\(\)](#ga0549786419ae52253f832a44cad91afe) -- [GetImageAnimatorImageNum\(\)](#ga1da191cab1e6b4ffb3a87b50fbe4f7ed) -- [GetImageAnimatorSrc\(\)](#gadc1064a27f9b95a2797c33793b2110ee) -- [GetImageInfo\(\) \[1/2\]](#ga592cbeb359a9d13274a6f4972aad3d79) -- [GetImageInfo\(\) \[2/2\]](#gaa9fbde27be3e3ea2fc6b4dabbf588af8) -- [GetImageX\(\)](#ga4d8abf189ddcbf325c60402084d7e3c3) -- [GetImageY\(\)](#ga25a02afb52cc15212084fb6bc8f27afd) -- [GetInstance\(\) \[1/5\]](#ga25c8efee1241f371b5d30df9817830a6) -- [GetInstance\(\) \[2/5\]](#gaf98c321c61e63bdfdc1a0eed3735084b) -- [GetInstance\(\) \[3/5\]](#ga924ce70adcad92d852ba1d1faa441ac8) -- [GetInstance\(\) \[4/5\]](#ga9f1bc7dc04063baeb71a3d3106be2b51) -- [GetInstance\(\) \[5/5\]](#ga3ed818079b3501922f422b150f891d13) -- [GetInterval\(\)](#gad772c84a309dbaa150b66f697e5b8ed8) -- [GetKeyId\(\)](#gae2b2b83cc3a562b3173f69c95722db99) -- [GetKnobStyle\(\) \[1/2\]](#gaecf92fe00a7565d034937e89fe2cf1e6) -- [GetKnobStyle\(\) \[2/2\]](#ga1fef57bd5d9a11a9c1946e8efec71b61) -- [GetKnobWidth\(\)](#ga9bac904abdf8b097778fea5febc1ec00) -- [GetLabelPosition\(\)](#gaf98616000ecd2cbb458d59fa77b7fe60) -- [GetLabelStyle\(\) \[1/4\]](#ga1d56911596bb1b1480a412ac9c3ff0ed) -- [GetLabelStyle\(\) \[2/4\]](#ga3f4f513b6dff5e245f2341890dae5ee1) -- [GetLabelStyle\(\) \[3/4\]](#gaefaa6ceaa04329594f1539d48fa121f2) -- [GetLabelStyle\(\) \[4/4\]](#ga21c71c654974ddb388a1890576966524) -- [GetLastPoint\(\)](#ga2b5a66f36249b23e69cccfc2859847c1) -- [GetLastRun\(\)](#ga2d4c9fbb026686623ff4d6e0b19d4960) -- [GetLatestIndex\(\)](#ga390d7cfb4e3ced676ec6c7ac22c1ccc5) -- [GetLeft\(\)](#ga2f4bd954929225e2f124db4c9d2c62ec) -- [GetLibDsc\(\)](#ga29d7531162c23d230c617280c5c4acf2) -- [GetLineBreakMode\(\)](#gab8924e40668b2c882d5dac624b49c6e8) -- [GetLineColor\(\)](#gaa35d69c841a74505735d1acb60476f13) -- [GetLoopState\(\)](#ga78d73f33cc63d0121342f52a818881d5) -- [GetMainStyle\(\)](#ga141064843f4b5524b91f3f7c3cb21d11) -- [GetMaskedRect\(\)](#gab3f8993b3953f27bfc61d53429916cba) -- [GetMaxScrollDistance\(\)](#ga71a2b17d4145479ed2e2ca000eb7e86e) -- [GetMixColor\(\)](#gae12573eec4d4db025e96b5d9679e4b3f) -- [GetName\(\)](#ga7d2125ee509f1555888549277f31a7a7) -- [GetNextSibling\(\)](#gab0030977b30ddc9f2e15dbc2f58937e6) -- [GetOnClickListener\(\)](#ga35e885cb380c37245fa4305bba10cd4a) -- [GetOnDragListener\(\)](#ga45a02cba4887c5c0b8e243941bcdc5cb) -- [GetOnLongPressListener\(\)](#gaafd4d354f5f111e758d046109fd7f656) -- [GetOnSwipeListener\(\)](#ga4c33414b3a828d1750deed3cceb86daf) -- [GetOpacity\(\) \[1/2\]](#ga713ec508a94eb05eab0aa5ab1c7f41ca) -- [GetOpacity\(\) \[2/2\]](#ga3a47fccd734ec0e79af89bedacdd4357) -- [GetOrigRect\(\)](#ga64cf308a09999def1192f9c4e0f17f0a) -- [GetParent\(\)](#ga706530e4a38108615d5e0c918685ec96) -- [GetPath\(\) \[1/2\]](#gaa1552ae9813d324260a580c4ef5b0c9c) -- [GetPath\(\) \[2/2\]](#ga3824befafd4f4dda003195ca2bbef399) -- [GetPeakData\(\)](#gaf6c796fbd08cab47cf4fc0d41185a591) -- [GetPeakIndex\(\)](#ga60c2b77e89d616a416a05f18b5c5c055) -- [GetPeriod\(\)](#gabd53b86c63b41172af155b8a7f86b84c) -- [GetPickerBackgroundStyle\(\) \[1/2\]](#ga17e000653498ceec378b79a1f25cf490) -- [GetPickerBackgroundStyle\(\) \[2/2\]](#ga39a41c86eba9feaa5a8130da6e7c8014) -- [GetPickerHighlightStyle\(\) \[1/2\]](#ga40c28c8cf0f19f8507b34e8c3af88c6b) -- [GetPickerHighlightStyle\(\) \[2/2\]](#gace2f6b055a11b93b1fc632c4e135043d) -- [GetPivot\(\)](#ga8a44fb7a813f5f183307191e96e18670) -- [GetPoint\(\)](#ga32f85e7d3d9c67d491caa4105c6fa379) -- [GetPolygon\(\)](#ga84f8d315da89e7aae7bf29478dbb51df) -- [GetPreLastPoint\(\)](#ga7a7198c95326af4ad0d2e2a85fb99ef6) -- [GetProgressBackgroundStyle\(\) \[1/2\]](#gafbc7c3ae50f322fbb9c12d06eb50b9bf) -- [GetProgressBackgroundStyle\(\) \[2/2\]](#gaa4c13964a439e472d5a41edfa2e5dd4f) -- [GetProgressForegroundStyle\(\) \[1/2\]](#ga0366f405bc2221944783a96c14f89b8a) -- [GetProgressForegroundStyle\(\) \[2/2\]](#ga6ce583a8cce5527ee812cea6fb6a6113) -- [GetRadius\(\)](#gabb2869e683ccd799891a8869613ec8c7) -- [GetRangeMax\(\)](#ga1840199f22d5d3e4ef58e41ac8f4febc) -- [GetRangeMin\(\)](#ga68ab733afcf4224a799ccad2092d1d23) -- [GetRect\(\)](#ga86cb8d364f18494d67636c55babced5c) -- [GetRelativeRect\(\)](#gae9b96837fa1d45648a2a6fbbfcc5eb4a) -- [GetRepeatTimes\(\)](#gae900ab627983fb255dc0d1672c1f3a03) -- [GetRight\(\)](#gab7695173ebb2f4b8e9aa58947786a379) -- [GetRollStartPos\(\)](#gaa2bb611ed34bcb9fc5eb2d208409ab7a) -- [GetRunTime\(\)](#ga18a8b8b9ceb344e6660a5c0de5a9ce1f) -- [GetScrollState\(\) \[1/2\]](#ga15a8abaeb958bfa972b541b59fabd8a7) -- [GetScrollState\(\) \[2/2\]](#ga3710c81b7fe02708da391d23cf08ddad) -- [GetSelected\(\)](#ga7c9d757790dfaae67fad110577b57ee9) -- [GetSelectHour\(\)](#gac6475a538bb4e0e839dd8f9b0e3ae200) -- [GetSelectMinute\(\)](#ga0ccecc8d45fdda042ea0667ab9cc1181) -- [GetSelectSecond\(\)](#ga2e02f298f9b9bcf0520ebd2d0ef40677) -- [GetSelectValue\(\)](#gac8c1732e78fa64af294694b2bbb35366) -- [GetSelectView\(\)](#ga199fdcf3ef797e5f61073a4be3b06642) -- [GetSize\(\)](#ga37f61dc21e0acc2ae877687f06d11e50) -- [GetSliderKnobStyle\(\) \[1/2\]](#gad528fd10d4b9bcec9d1951c1c54674ee) -- [GetSliderKnobStyle\(\) \[2/2\]](#ga9102687741cde90b659ebdc3eb773895) -- [GetSrcType\(\) \[1/2\]](#ga7dc8490594e2bc7c9cf50c1237507239) -- [GetSrcType\(\) \[2/2\]](#ga07da08c8507a3dbee5c21ea0de170a16) -- [GetStartAngle\(\)](#ga37a3e63da7a8658e48a25ae9ec73abea) -- [GetStartIndex\(\)](#ga0ce3080df2c5226d20d446bc9c28b694) -- [GetStartPoint\(\)](#gadeada49639b81e405b8b54e2629361ee) -- [GetStartPosition\(\)](#gad23f7db18bfa5f91e3cb814193e6932d) -- [GetState\(\) \[1/6\]](#gaf93661e10da4b4df75c04d8fd199a5e8) -- [GetState\(\) \[2/6\]](#gae0619e7f8b3c97548f763f281bdd8261) -- [GetState\(\) \[3/6\]](#gad46154853ea44173988a82fa366f16db) -- [GetState\(\) \[4/6\]](#gafd0166df63bed582022ed93175dd3179) -- [GetState\(\) \[5/6\]](#gab3cddc176a6834fabc7c53912c97237c) -- [GetState\(\) \[6/6\]](#gaad46659a26146d0edccad42f45f85d6c) -- [GetStep\(\)](#ga9c1678604605a54c2e338d283c46866d) -- [GetStrokeColor\(\)](#gaf9dba05cf9c9f91853a523d961e76fb1) -- [GetStrokeWidth\(\)](#gaf8420a460f4a21c9208674e07893c3f0) -- [GetStyle\(\) \[1/5\]](#gacba8806f0f63a2b0436dbe4ec1b4d01c) -- [GetStyle\(\) \[2/5\]](#ga18429dcf1a0dfbe0bf3e5718efa65128) -- [GetStyle\(\) \[3/5\]](#ga2b4b818f26822ad6a020473e6a5e5214) -- [GetStyle\(\) \[4/5\]](#ga4ea19bc9f4b487946c9e29e63b54a0e6) -- [GetStyle\(\) \[5/5\]](#ga37736a82bec6a01bc5a880e1d01ccccd) -- [GetStyleConst\(\)](#ga1b28213d4c2cd0f8324bce3fe56eb7bb) -- [GetStyleForState\(\)](#gaa3f74af93c91a24e58fdd06ad7d0bdf9) -- [GetSurface\(\)](#ga0d19e491e590bdfeeb2a6b3fa1a6b090) -- [GetSwipeACCLevel\(\)](#ga25dad3242949f0fbeff47d6df06053f6) -- [GetTargetView\(\) \[1/2\]](#gaea9f334f2481e1c03a2cd8f3078d7c72) -- [GetTargetView\(\) \[2/2\]](#ga7ea54fc6ef3a8b7dec1bf88ab189f7c7) -- [GetText\(\) \[1/4\]](#ga8d04dd052b36017d89e52be905b50d62) -- [GetText\(\) \[2/4\]](#gafcc64349913763e8d7feaf7bd9cbd639) -- [GetText\(\) \[3/4\]](#gaf6541786a44218c7561a9e0f38dea985) -- [GetText\(\) \[4/4\]](#gafa76232f16f5aad2a84fedbb31c4f0f7) -- [GetTextColor\(\)](#ga963236ec609ea50610f7ef2bf85ea6df) -- [GetTextHeight\(\)](#gaecbce6ea5599f99b1a2b150608cfc9e3) -- [GetTextRotateDegree\(\) \[1/2\]](#gae36f3e226f23d8d7dff174054f60a741) -- [GetTextRotateDegree\(\) \[2/2\]](#gaef9e2e7f3a8849875e2a29e961a7e590) -- [GetTextRotation\(\) \[1/2\]](#ga2dcc364f56ffa8bada573c7f96c92b0e) -- [GetTextRotation\(\) \[2/2\]](#ga610cb09fe19aafbb65899b060ee3cac7) -- [GetTextSize\(\)](#ga7e3e2deccb36992428d7984681329f09) -- [GetTextWidth\(\)](#gaff1afb0c1079bbab70c0f012ba62ea88) -- [GetTime\(\)](#gac05ba70bafa9887dc23ea4ba69da632d) -- [GetTimeOfPause\(\)](#ga8bd6ba744209193fd1f3e630e6cf1c5a) -- [GetTimeOfUpdate\(\)](#ga24411b0b4d9f619532aa879ee6ee7af1) -- [GetTimeStamp\(\)](#ga7d56c2a99ab2c98eec9ebc03f67b7777) -- [GetTop\(\)](#ga9ab9c7eda50b517e55d608270360f0a0) -- [GetTopPointStyle\(\)](#ga215f5c5f8de923f0aa399a6bbdf78e18) -- [GetTouchListener\(\)](#gae7c65c68653103dae85acdcef78777a6) -- [GetTransformAlgorithm\(\)](#gac7b75c6fa653d3ac0c8bc9062939d293) -- [GetTransformMap\(\)](#gab8cee5a7052a88722768c8ed1324abc1) -- [GetType\(\)](#ga47a12f474dd7351a303e4959a05b17d1) -- [GetValidHeight\(\)](#ga1e6c92b20c4931a058c0b7775bf180c9) -- [GetValidWidth\(\)](#ga6577d38d85234e08f709dd0ae131b255) -- [GetValleyData\(\)](#gae75c525df3451cb5e863d15fd36db07e) -- [GetValleyIndex\(\)](#ga630a7356e3dbcb212a2e88ef0c6b857d) -- [GetValue\(\)](#ga6face76aa7972efeb6cbb8f525f23135) -- [GetVerAlign\(\) \[1/2\]](#gac312f642e12cfad8d974f8159984864e) -- [GetVerAlign\(\) \[2/2\]](#gaf4acdd488481fe6ce0e79eb6a9d35d78) -- [GetVersion\(\)](#ga45704f59419f34aa75868387bf74b160) -- [GetVertexNum\(\)](#gaca0240aa7a65b24365064f296ff38a63) -- [GetVerticalScrollState\(\)](#gac2095a64edba0fe0483a5475b11b45b2) -- [GetView\(\) \[1/2\]](#ga733211ca13eccff628bb2712c27b885e) -- [GetView\(\) \[2/2\]](#gab155b2f4a6d8fd97755dcd1e6d3d8361) -- [GetViewByIndex\(\)](#ga3c58441c4b07cf575b96b85df5e3a3bf) -- [GetViewId\(\)](#gad6c7644bd2abfa3c92d80776b0bd1936) -- [GetViewIndex\(\)](#ga62f51715b6d420a296ebe0296717b906) -- [GetViewType\(\) \[1/31\]](#ga6d23780da1faa1071197b716bca365e0) -- [GetViewType\(\) \[2/31\]](#gaf4770cfad2f6368b22e9ea581b12aefa) -- [GetViewType\(\) \[3/31\]](#ga5dc99855271c582e960e0952cca8227c) -- [GetViewType\(\) \[4/31\]](#ga926337be55785de0b32ad57d7ee85c5c) -- [GetViewType\(\) \[5/31\]](#ga79885b87d1935947f6980ae56f139083) -- [GetViewType\(\) \[6/31\]](#ga567a8195e8520b74b682de697cfe1d90) -- [GetViewType\(\) \[7/31\]](#ga2f46b702f1543c5076a8957a94a780d3) -- [GetViewType\(\) \[8/31\]](#gaeb9e84901b38ef75fa650fc5a27ffc65) -- [GetViewType\(\) \[9/31\]](#ga5cb1566d1fdd815004a37349dc458203) -- [GetViewType\(\) \[10/31\]](#gab1d8fc06d4a73db344efd271d68a62e6) -- [GetViewType\(\) \[11/31\]](#gad5756764839a844ee9bee0c186798029) -- [GetViewType\(\) \[12/31\]](#gac391336aedd68659b7f76bee59eba521) -- [GetViewType\(\) \[13/31\]](#gac2070526833718284148689678c542a9) -- [GetViewType\(\) \[14/31\]](#gaeb2bf2bfa7b5f229a151bec4fd046b40) -- [GetViewType\(\) \[15/31\]](#ga7064f161dbf0e539bd089db62339cad8) -- [GetViewType\(\) \[16/31\]](#ga2ebe9b09e69cd04b00db686dbec8c32c) -- [GetViewType\(\) \[17/31\]](#ga2efe6a87345903726c721fc7a9ed4365) -- [GetViewType\(\) \[18/31\]](#gad19f55fb0de64f3f39485292d0629dc7) -- [GetViewType\(\) \[19/31\]](#ga831167c9f5000af808638eac56d6ec19) -- [GetViewType\(\) \[20/31\]](#gaa2d380d48776748583f51297715af0b5) -- [GetViewType\(\) \[21/31\]](#gac0b18fe28ee4ad44814d3897d3cd5c05) -- [GetViewType\(\) \[22/31\]](#ga71ae0dd892d8d9b8d277ba2b5572182d) -- [GetViewType\(\) \[23/31\]](#ga8f7edc9e099688b4fd2b3ed3171eac58) -- [GetViewType\(\) \[24/31\]](#gaebb514dc68a761c444af0e0e89dfcb6f) -- [GetViewType\(\) \[25/31\]](#ga6820cef1fb685db5796670ca56b6aace) -- [GetViewType\(\) \[26/31\]](#ga7b96c15cdbe0edd5045e479b3b2fe1eb) -- [GetViewType\(\) \[27/31\]](#ga1feefd393c568a12ec4e877e207d598c) -- [GetViewType\(\) \[28/31\]](#ga6e11e5de67f87ed6cf6c44f60b7d4096) -- [GetViewType\(\) \[29/31\]](#ga2f5123df8cbcc4f55c5192acbe30ba0d) -- [GetViewType\(\) \[30/31\]](#ga467faebb78b4c4a753eaa44b772f0905) -- [GetViewType\(\) \[31/31\]](#gaea65298b6e4a71a2de65c13e1b14ed7b) -- [GetVisibleRect\(\)](#ga06e79704a19f2a238982076cac3d059b) -- [GetWidth\(\) \[1/7\]](#ga2ce903f605e04f8d42d561b72944b30b) -- [GetWidth\(\) \[2/7\]](#ga90cf8cffb98d71c30d6fc1d118442dbd) -- [GetWidth\(\) \[3/7\]](#ga2f8315ea6e574aec99210950feef1b55) -- [GetWidth\(\) \[4/7\]](#ga20ea7dd2d8ddb16cf9750ccdcc2a2803) -- [GetWidth\(\) \[5/7\]](#gae2348ef2f06893325ca3366856657199) -- [GetWidth\(\) \[6/7\]](#ga95bc777cda044ada4401d9c5900226c6) -- [GetWidth\(\) \[7/7\]](#ga8cb74b23f740091e59ad350a8dea436b) -- [GetWorkMode\(\)](#gad2d78422d212ef1e93bb4a23e1ee3859) -- [GetX\(\) \[1/2\]](#gad0410528e93dcf552129e207dfe37aba) -- [GetX\(\) \[2/2\]](#ga89dc5f8fb1cb4b2259dc0439185359f1) -- [GetXAxis\(\)](#ga010c178e2c1dec79e4af10cbf4545257) -- [GetY\(\) \[1/2\]](#gaa3b94d5228cabba6341039e8f28fda74) -- [GetY\(\) \[2/2\]](#ga193619d649204b0e9bb854d3b30275c3) -- [GetYAxis\(\)](#ga696227300be45585be102f6a7f66b7b1) -- [Gray\(\)](#ga920421d6dc1d9fbc21d5002948eb43c6) -- [Green\(\)](#ga672e4e015f76e7cef0a4b819ee95f082) -- [GridLayout\(\)](#ga9c612ad9265b7031ed95844277608b3e) -- [Hand\(\)](#gac075169429f99f60ed660a44db7f4031) -- [Head\(\)](#ga74dcfe1a4b37d6fabbcdb5f8049fb578) -- [HidePoint\(\)](#ga02cb658da66c73863ac2a49849e23b24) -- [Image\(\)](#ga17210a2d5bb0be6d4b58efe249563d1b) -- [ImageCacheFree\(\)](#ga71fe0f3eb82083006b51fec59ad11088) -- [ImageCacheMalloc\(\)](#gab96b8c174b4a83369c8c7b10d9dadc3c) -- [IncOneSecond\(\)](#gaf4c05e6acf6700d7edb69dc49cd6fef8) -- [Insert\(\) \[1/3\]](#ga3bdd5d105c9e7d7e18456dfb55ba8b45) -- [Insert\(\) \[2/3\]](#ga84195a993bfe50d8302435ababb63966) -- [Insert\(\) \[3/3\]](#ga154efaf952ba1db65e53efdd29f0027b) -- [Intersect\(\) \[1/2\]](#ga1779d4dd0671282d297f1693252ca9d9) -- [Intersect\(\) \[2/2\]](#ga1af82c2a558d4003d5d3b19302325a73) -- [Invalidate\(\)](#ga2a9a38b8450fbb196277238a51fbbf99) -- [InvalidateRect\(\)](#gaf0e6b65ced8b931642f2a80c195962d2) -- [Inverse\(\)](#gabf1edc9a01bace13596de01615ae20a2) -- [IsContains\(\) \[1/3\]](#ga5f3cb137429e00b2e7fe1e39f7e9faad) -- [IsContains\(\) \[2/3\]](#ga3e17c74e6eaf3b01b5e009db582da498) -- [IsContains\(\) \[3/3\]](#ga1a810eb98134027556294620821c2548) -- [IsDraggable\(\)](#ga25bb796ff400c767d622cbed280fc500) -- [IsDragParentInstead\(\)](#gaf0c462bc31e779b1898ad4cdfdad6faf) -- [IsEmpty\(\)](#ga48f81f9faa9f4057ae8f84e437d90442) -- [IsExpandHeight\(\)](#ga09475a9cd4e86b19d4c3d4206ea5ffc6) -- [IsExpandWidth\(\)](#gaab55ac2d3f8e45b4bfb5fd5ae07d1edd) -- [IsExtends\(\)](#ga808a2b486872f5d1dc1f3e944352bcfb) -- [IsGradient\(\)](#ga6188c14ea249a34db4819499f4e38133) -- [IsIntersect\(\) \[1/2\]](#gace8a8524c6f91aa2f0f9be73a628da20) -- [IsIntersect\(\) \[2/2\]](#gacc346d49f3a8ee42662d34140afcbc9e) -- [IsInvalid\(\)](#ga84ec8032b9c8a4121c7464e6c14c7d01) -- [IsRepeat\(\) \[1/2\]](#ga5e3700fe3d572ed6329237480bd4b5d2) -- [IsRepeat\(\) \[2/2\]](#gacd3c360c8a3f6b5aeffcf10c1a1588da) -- [IsReverse\(\)](#ga35b508048046b7adf938de5cc4004724) -- [IsSizeFixed\(\)](#gabf4bad201ee9ef8aa484677b1daa3ba4) -- [IsSmooth\(\)](#ga5d9211f3eaee4e1c9455709a228087fe) -- [IsTouchable\(\)](#ga502a53fb77b260fa36b5b3adf82e2340) -- [IsViewGroup\(\)](#gab2ce8c11abbd55f40687f38a52511b11) -- [IsVisible\(\)](#gaee178fc0a86ac03a6bdf2ade0c1914c8) -- [Join\(\)](#ga6269289055eab8876cc3b3c946ddd4a4) -- [KeyEvent\(\)](#ga3a52d91ac5d8fd7779baafae6ec92f9b) -- [Layout\(\)](#gaba1ca0f86a85d3c5636ca543b0ed08d8) -- [LayoutBottomOfParent\(\)](#ga809aeee4792ae58218a0bcfcb94d5cdc) -- [LayoutBottomToSibling\(\)](#gaa23a68e8ef0fb13b362218e71cf67ace) -- [LayoutCenterOfParent\(\)](#ga443b86ee9275b0421b37a47bad3264dc) -- [LayoutChildren\(\) \[1/3\]](#ga449c17a9fa3898aac9ac68a2c48363a3) -- [LayoutChildren\(\) \[2/3\]](#ga976abe5b006bef9018dd0d8ee2380526) -- [LayoutChildren\(\) \[3/3\]](#gaca871fa2f8219e7ea9388e212d1f1e69) -- [LayoutLeftOfParent\(\)](#ga94999b271f27cd5d6bfaf303f7d5c708) -- [LayoutLeftToSibling\(\)](#ga58f1a34a943c4492970f901d63bbc3d8) -- [LayoutRightOfParent\(\)](#ga479528ed259b5539e423955f2b60517d) -- [LayoutRightToSibling\(\)](#gac4cd64de5291759add164825a323a0d6) -- [LayoutTopOfParent\(\)](#ga859288ea61ad23ba7e381bbc07769e83) -- [LayoutTopToSibling\(\)](#gaaa8385807e3a9bea46f8dcc326252a70) -- [Lime\(\)](#ga629dc5c95263df097a06b207a36b1dca) -- [Line\(\) \[1/3\]](#ga3c8dd952afc5a76f8628c7f702755bd8) -- [Line\(\) \[2/3\]](#ga0bda554c3c7d5950637a50ffbbec2269) -- [Line\(\) \[3/3\]](#ga216de7fbcb274d28bb5a50d0e0692aa0) -- [LinearEaseNone\(\)](#ga8af9a1f527ffaa5006cf0ee867f7d7d0) -- [List\(\)](#ga92532583f91e7cb84255ddbacc34b3e6) -- [ListScrollListener\(\)](#gabed0d1b84d44874c94487796be82748f) -- [LongPressEvent\(\)](#ga0ccf400cdc4f55e28ef4680a4a3c5632) -- [Magenta\(\)](#ga4cbaf5650de24fc1ae45f93571b92f37) -- [MakeAABB\(\)](#ga73295e4e05e9063082fb33b9847f4831) -- [Maroon\(\)](#gaf8342e9323109066e57434445de4423e) -- [Matrix3\(\) \[1/2\]](#ga8fedd026cac422882e9c0a0d5d1f3b50) -- [Matrix3\(\) \[2/2\]](#ga068d055d130c7c46269072bf65254082) -- [ModifyPoint\(\)](#gaa4e5a9c7d456a3753020a3fb88159c83) -- [MoveChildByOffset\(\) \[1/4\]](#ga5013215d3075616ae081849ef52bb57a) -- [MoveChildByOffset\(\) \[2/4\]](#ga776c6c1640cb88b537af227fa5eb0725) -- [MoveChildByOffset\(\) \[3/4\]](#gafe121e0cc150122486049dcaf83f3c26) -- [MoveChildByOffset\(\) \[4/4\]](#ga4db88368bb4908ee05aa1137982b6d0e) -- [Navy\(\)](#ga327d185847eab86cbe297a1e35f0d5d7) -- [Next\(\)](#ga93ec1e9e9b778751aa53b7afb0b67258) -- [Olive\(\)](#ga8c8d03f5579dbb976119cee384856e3b) -- [OnAnimatorStop\(\) \[1/2\]](#gac5f2c1471f83ebf2a47d86b8f58da094) -- [OnAnimatorStop\(\) \[2/2\]](#ga20fee882d590dd429742acff4357ea67) -- [OnCancel\(\)](#ga7ce030676f1222599dd6367cd4b9cf7e) -- [OnCancelEvent\(\) \[1/2\]](#ga8f01ff25a33b20df0758f564148e579d) -- [OnCancelEvent\(\) \[2/2\]](#ga4f481e0ce91f87c6b70f6e0190e4f34f) -- [OnChange\(\) \[1/2\]](#ga6044e7ac9a27c7a85cc855dd32e4df5e) -- [OnChange\(\) \[2/2\]](#ga373b76d4ce1aea6380f42ce78ecd59c3) -- [OnChildChanged\(\)](#ga06a5bd621f6532fe5c8fd08a2c1314b2) -- [OnClick\(\)](#gaea43f140dccee06b1e720b66c08c745b) -- [OnClickEvent\(\) \[1/5\]](#gad08697a29aae4c58267f494b66b9a547) -- [OnClickEvent\(\) \[2/5\]](#gaca17d1cfa9daa35a88d387ebc1d9352c) -- [OnClickEvent\(\) \[3/5\]](#ga7b6849c94b9d8b90cbbe890790fedf1e) -- [OnClickEvent\(\) \[4/5\]](#ga31d4f10f4c32b0fb284645450875ae0c) -- [OnClickEvent\(\) \[5/5\]](#ga05029e55d4ccb50cd45f1cd2a53917e4) -- [OnDrag\(\)](#gac112ce602c6939a52781d13440255b0c) -- [OnDragEnd\(\)](#gab9e57971ae7e9925eaa3ccef245cbd72) -- [OnDragEndEvent\(\) \[1/5\]](#ga1799d33be73f64ed2066f50d7e65468d) -- [OnDragEndEvent\(\) \[2/5\]](#ga05e30354bc97373fbd30f8c045dbbeea) -- [OnDragEndEvent\(\) \[3/5\]](#ga225e59d60271c9012a017136d2aab0d6) -- [OnDragEndEvent\(\) \[4/5\]](#gae9136559779057065708312fb62304bb) -- [OnDragEndEvent\(\) \[5/5\]](#gab57d973cea1186dd90eec91cd27da1fb) -- [OnDragEvent\(\) \[1/5\]](#ga46249c8caf06b81590d9450e30a31147) -- [OnDragEvent\(\) \[2/5\]](#ga2fde4511d743ccc257308d9a0c035076) -- [OnDragEvent\(\) \[3/5\]](#ga7e99d1fb891879195c19c211c6de6600) -- [OnDragEvent\(\) \[4/5\]](#ga4481d4453dbf06cc808e4848a814ed7e) -- [OnDragEvent\(\) \[5/5\]](#ga888ec9a6ddaa4051e7c2e5d76832565c) -- [OnDragStart\(\)](#ga876bada94186d79c03de6da64c26e636) -- [OnDragStartEvent\(\)](#gac0e10556ff99b8a92bfb11df6456d605) -- [OnDraw\(\) \[1/15\]](#ga9a5f43bdc03cde30323b570bfb7ae425) -- [OnDraw\(\) \[2/15\]](#ga159c536c3f826165c26fdabdc87f498a) -- [OnDraw\(\) \[3/15\]](#ga611f2f03c22499c428d1de3392ee4861) -- [OnDraw\(\) \[4/15\]](#gae69843b87be9fcdab3e4ac776547f3bc) -- [OnDraw\(\) \[5/15\]](#ga565cecb8ac66f2009dc4783da9bdc699) -- [OnDraw\(\) \[6/15\]](#ga5360803f425055de52af5f7fa1081cfe) -- [OnDraw\(\) \[7/15\]](#ga911199741bf792b5de00789b4c8d780d) -- [OnDraw\(\) \[8/15\]](#ga8e75f8411fb25e564c82573a12773189) -- [OnDraw\(\) \[9/15\]](#ga30a99c506c6d8d8fc0e0bd81d52e2d52) -- [OnDraw\(\) \[10/15\]](#gad6bd59e05d77868e595d087fd2de5d00) -- [OnDraw\(\) \[11/15\]](#ga3321d9b9b156423bdc0abcb8e99efb0d) -- [OnDraw\(\) \[12/15\]](#ga6c943119bd89a863ec5f05722a1fd146) -- [OnDraw\(\) \[13/15\]](#ga9f3b69ad5511a4bd8f3aede212f3f374) -- [OnDraw\(\) \[14/15\]](#gac6122967d3e1f0d312eebed2f93a1369) -- [OnDraw\(\) \[15/15\]](#ga5c101948cb2cfb8394af0bcb56f65efb) -- [OnFPSChanged\(\)](#ga82a8426a18e30ff3e9d4d388c53b4af5) -- [OnFPSChangedListener\(\)](#ga3e24fe52ec7c4bf9fc9f5703982b3568) -- [OnItemSelected\(\)](#gab6b77fec222bb03439d2d0a37538f1f0) -- [OnKeyAct\(\)](#gab21e31a784cc709b1f075ae53ad81818) -- [OnKeyEvent\(\)](#gaffcd945698a2df5f3fde5342c74719a9) -- [OnLongPress\(\)](#gadd8ba1ff84abfc796ddeb9c6e5d46497) -- [OnLongPressEvent\(\) \[1/2\]](#gac311aa47301d727c35fc31f8630d016e) -- [OnLongPressEvent\(\) \[2/2\]](#ga33de0d99700bd1c289d967458477606f) -- [OnPickerStoped\(\)](#ga9cd5ee866fe730a6ae6c66344284b5e2) -- [OnPostDraw\(\) \[1/3\]](#gab70473cd0d8fe7c9d4bb817caeee9153) -- [OnPostDraw\(\) \[2/3\]](#ga8a7764e5a85e40b497a67fdf54a1b4c8) -- [OnPostDraw\(\) \[3/3\]](#ga1366a4ca45babb67f3103279a2bbc0bf) -- [OnPreDraw\(\) \[1/13\]](#gac295fe4851eed72f48e9a63771416d71) -- [OnPreDraw\(\) \[2/13\]](#ga3e2a703a10017c789366029b297969ab) -- [OnPreDraw\(\) \[3/13\]](#ga98bc4ea99629e4d5c7ca5ca4b43e8e96) -- [OnPreDraw\(\) \[4/13\]](#gade9069f6e553c6c43f7684e835b584e5) -- [OnPreDraw\(\) \[5/13\]](#gaf64d9ec1744ab9c7385dd64d30a786e4) -- [OnPreDraw\(\) \[6/13\]](#ga5d79816831f61406c1c8bd300da9973e) -- [OnPreDraw\(\) \[7/13\]](#ga6b3cf14760fc07e38f51d366a8e5fdb9) -- [OnPreDraw\(\) \[8/13\]](#gad1bf4d83270c0a4ba04f3cffbc67bb97) -- [OnPreDraw\(\) \[9/13\]](#gaac293fb7f318e1855fba21b740147061) -- [OnPreDraw\(\) \[10/13\]](#ga53cc6c8f18b90c3abd96a791c8921010) -- [OnPreDraw\(\) \[11/13\]](#gaeb15d1fb86ad2e2aabddc9c36676894a) -- [OnPreDraw\(\) \[12/13\]](#gaf0483e605613ee1789332e67f00f5e2d) -- [OnPreDraw\(\) \[13/13\]](#ga9a8287a522f00bb3dbe60af8f242054a) -- [OnPress\(\)](#ga2cfaed7013dc76bcbe9a5ea5d51caac3) -- [OnPressEvent\(\) \[1/4\]](#gafa544ff2d27785a9410a80689f1ad3b1) -- [OnPressEvent\(\) \[2/4\]](#ga1d887720c89170abd3c8a400a791765d) -- [OnPressEvent\(\) \[3/4\]](#ga54572308575db6d19997343c65d72fbb) -- [OnPressEvent\(\) \[4/4\]](#gaa6ba86e78d4a12ea47b6aaa8dd88f882) -- [OnRelease\(\) \[1/2\]](#gaf8982c429bfa52c1a8a01d1115b596e6) -- [OnRelease\(\) \[2/2\]](#ga16fa19e254ae19fe181dba0ac9dd5d1f) -- [OnReleaseEvent\(\) \[1/3\]](#ga7bd1a74563b059b03fbf66f9add53ee3) -- [OnReleaseEvent\(\) \[2/3\]](#gadd5891c03d95d07d127558b5bc9a7bd7) -- [OnReleaseEvent\(\) \[3/3\]](#gadb9492eb82ff23f91f9263fc748f24de) -- [OnScrollEnd\(\) \[1/2\]](#ga958c02ddc348eadaaf08f917f55aba63) -- [OnScrollEnd\(\) \[2/2\]](#ga74cc55be27bfd4c21f10d859bc1fbd3d) -- [OnScrollListener\(\)](#gad065bfe4e322d036b5bd9e30667754a6) -- [OnScrollStart\(\) \[1/2\]](#ga8000c484a999483edc66e8dd1b7ceaf6) -- [OnScrollStart\(\) \[2/2\]](#gae802e8b4c48f7d416d6809ba8fa89428) -- [OnStop\(\)](#ga33875ecdc72e4d8076be696a35667a8f) -- [OnTimePickerStoped\(\)](#ga525c9a0f0c5b51e0086a53dc5b0b5301) -- [OnVirtualDeviceEvent\(\) \[1/2\]](#gae86a0b7fa1a2c4fee021cb7bed2d418c) -- [OnVirtualDeviceEvent\(\) \[2/2\]](#ga548d8e9577a986223ff134c32eece547) -- [operator delete\(\)](#gadf1997a0f56ac2b220e7f0f8e8e0a6ef) -- [operator new\(\)](#ga4854963aa969ee20a6cd174a70f5cd23) -- [operator\[\]\(\) \[1/2\]](#gafeae0169d5e3e92fcbc743c09cd4f6d0) -- [operator\[\]\(\) \[2/2\]](#ga3f747832db7335f2198c7746140a6631) -- [Orange\(\)](#gae127df687f7b04f9debc853498678aeb) -- [Paint\(\)](#ga68ecc0cb6bc379284fd1fbaebb8dcfcd) -- [Pause\(\) \[1/2\]](#ga4dd9d23ebff1359bd1145fd2f26e1be2) -- [Pause\(\) \[2/2\]](#gab8af32245cdf31fcc0a9d0a5d681774c) -- [Polygon\(\) \[1/3\]](#ga56fa89b7be39ff928c8ad488bbaddac3) -- [Polygon\(\) \[2/3\]](#gaa3be3f3605efe49629c024974e56da6a) -- [Polygon\(\) \[3/3\]](#ga54df053b5f430ed2ee7be14a898f668d) -- [PopBack\(\)](#ga667b81954fd60474b575b4aa9c6bc193) -- [PopFront\(\)](#ga0fa953b7476412923f25d079431f7189) -- [PressEvent\(\)](#ga851cee6814b500741c9eb4833ae75c19) -- [Purple\(\)](#ga7ec7f44a7a7d828641b739616b01dadb) -- [PushBack\(\)](#gad26996a2802e32e89ecefa8311fe5d27) -- [PushFront\(\)](#ga5084ab98dce9aab41b216f73a04ed8b6) -- [QuadEaseIn\(\)](#ga72a9b93086c8466767942863a7d5cb78) -- [QuadEaseInOut\(\)](#ga8f62ddc3f1b2b33904845601108d6f64) -- [QuadEaseOut\(\)](#ga0c9cd2781e17f7077b4c9d5847eb90c8) -- [QuintEaseIn\(\)](#ga9ddf5221cdde5f6a37096300847a50ac) -- [QuintEaseInOut\(\)](#ga8bea02f98d26a97072f32369370a421b) -- [QuintEaseOut\(\)](#gaa61e26b2bff3f69edced36d0c0d17a45) -- [Rect\(\) \[1/4\]](#ga7d3779a5cf121ba98026ddbf36705178) -- [Rect\(\) \[2/4\]](#gabcc74bf916f06152b4a69e1a36116e3f) -- [Rect\(\) \[3/4\]](#ga766eee89dbd7d4969fb88485893ea662) -- [Rect\(\) \[4/4\]](#gab37a12fb10478edcb5389fa0b347c46f) -- [Red\(\)](#gac7d29e91471253cbef9d709d74bc0d78) -- [RefreshChart\(\) \[1/3\]](#ga0c6028474577ce99caa6d3eafaef1573) -- [RefreshChart\(\) \[2/3\]](#ga53594e65076b8588bcc48d4c69fbe8fd) -- [RefreshChart\(\) \[3/3\]](#gaaab35011c82308c770cf5c15641fe21c) -- [RefreshList\(\)](#gaf2aabfa8e8edd803d034c23efe45f57b) -- [RegisterFPSChangedListener\(\)](#gac885a43e87f57ae57e0d8b6d213e9fa1) -- [RegisterScrollListener\(\)](#gad66c58c77db0dd0c507e45290ad5cd24) -- [RegisterSelectedListener\(\) \[1/2\]](#ga70a514c87a883999a93b6c9d3713be61) -- [RegisterSelectedListener\(\) \[2/2\]](#gaa49ecf72e74e9b835c6fc19c701bf454) -- [ReleaseEvent\(\)](#gae74aa5e1b3f0af7e66d55e9be15f32d1) -- [ReMeasure\(\)](#ga81726238adeda1efa989be6ed4f4fe5b) -- [Remove\(\) \[1/4\]](#ga493d53a9e4a47b79d30c0d37f96a69da) -- [Remove\(\) \[2/4\]](#gaf3806e9581846930ad5bf063ced38367) -- [Remove\(\) \[3/4\]](#ga25523928b24d6692f18aed31edb07006) -- [Remove\(\) \[4/4\]](#ga2a4f70938a7d2298a318dff6dff95e85) -- [RemoveAll\(\) \[1/2\]](#gaf3ee08173d92932687809049e3c11e9b) -- [RemoveAll\(\) \[2/2\]](#gaa55aae2e8066fecc5941e021a7f30d7e) -- [Reset\(\)](#gac18ead79047d6f63e1ceb5fc52bbff68) -- [Resize\(\) \[1/3\]](#ga6d51096b1d1b1929d8ee6a0d25c153d8) -- [Resize\(\) \[2/3\]](#gae985b607d2f0701911778bf20d640ccd) -- [Resize\(\) \[3/3\]](#gaa860971513d96f553be4e251f25c0262) -- [ResizeVisibleArea\(\)](#gae6c5f3bcf99dc837bcecd60c38d3df5a) -- [Resume\(\) \[1/2\]](#ga645bbd33356bd708636a94c3d95c282d) -- [Resume\(\) \[2/2\]](#ga051f03136d8c00295162f53acbe6da97) -- [Rotate\(\) \[1/5\]](#gac57d591450b239f8e375f4c7b287f0d8) -- [Rotate\(\) \[2/5\]](#ga77d0dea6024cd2bb980f27f789db77c3) -- [Rotate\(\) \[3/5\]](#ga9bb4f3256ad01b5abdd347de1fea09ee) -- [Rotate\(\) \[4/5\]](#gaea4c507789bf4c27daef3e81176c656d) -- [Rotate\(\) \[5/5\]](#ga8bd72462c8fdba21d3a805a415a88d06) -- [Scale\(\) \[1/2\]](#gae9344b31226a5a35035ccb845bf9cff2) -- [Scale\(\) \[2/2\]](#ga915aa59cac37c6584fafb06a06046087) -- [ScrollBy\(\) \[1/2\]](#gaf97d599fe1147a71e44a5a107edeac77) -- [ScrollBy\(\) \[2/2\]](#ga233e426fee2ff5b0973637bb3bf545ee) -- [ScrollTo\(\)](#ga9a760e34ff783d738d414d26af3903e5) -- [SelectedListener\(\) \[1/2\]](#gaf68f896c9d4e4c14a56c201d8e4b3db1) -- [SelectedListener\(\) \[2/2\]](#gae386080bbc3bb3ae2bb4572b8bfbb6b0) -- [SetAdapter\(\)](#gaa44fd515481de0f1de5d20a62be63267) -- [SetAlign\(\) \[1/4\]](#gab5625481e1a9cb77f30102c76ec76bdd) -- [SetAlign\(\) \[2/4\]](#gad379123d69ceb0dbb49d4055f9abac82) -- [SetAlign\(\) \[3/4\]](#gad4721f5014971f6017aaaa5cc0af6845) -- [SetAlign\(\) \[4/4\]](#ga889e1adc1a74db59dc161cb7031b1f23) -- [SetAnimatorStopListener\(\) \[1/2\]](#gaab25406cdcb4af33cfd2cc2c31037d27) -- [SetAnimatorStopListener\(\) \[2/2\]](#ga80b4b917c30226c1b1f7169e3eb8ed8d) -- [SetAnimatorTime\(\)](#gadb01e8e5702625c3a99f383eb7ae1664) -- [SetArcTextAngle\(\)](#gaea37f7ce223d76e5b74dc098fc74cbf9) -- [SetArcTextCenter\(\)](#ga0679d838c86fbf540574a41ce0cfbdaf) -- [SetArcTextOrientation\(\)](#gad24333f7363f2d73988f479e73b62b92) -- [SetArcTextRadius\(\)](#ga304513546d8c396e89719725acf0a086) -- [SetAutoEnable\(\)](#gab3f60d7eff9b467c64edc90293dbb21d) -- [SetAutoSize\(\)](#ga6442ba36114d739df1b17ca8943cc087) -- [SetBackgroundFont\(\) \[1/2\]](#ga77e6edef3e2a70e68c4a79ca6e2b99f6) -- [SetBackgroundFont\(\) \[2/2\]](#ga42de341630d7c681674df31a22e77856) -- [SetBackgroundImagePosition\(\)](#ga66b95a4793bc60596a56be00849b8296) -- [SetBackgroundStyle\(\) \[1/2\]](#ga6817b5178e93e5f16f2b420cf5a171c1) -- [SetBackgroundStyle\(\) \[2/2\]](#ga23acea0a42587746e35ec5f3a74af59f) -- [SetBackOvershoot\(\)](#gab7cf0e64a0d363d8b448262d719ac97a) -- [SetBlankSize\(\)](#ga834d61387b0243cd0505f6d03d32a8f8) -- [SetBlurLevel\(\)](#ga339c80c2f8f05ff0d79638dc61c71d5a) -- [SetBottom\(\)](#ga764001fa9f51716fd3dacac691cbca6d) -- [SetBottomPointStyle\(\)](#gab99eef3cd222625e8d3a30cca815ced2) -- [SetButton\(\)](#gaa8bcf4d2d60becd105d0b87ee2ec18af) -- [SetCapType\(\)](#gabdc0eb4d279212ea7c3ea7a1f9a85e13) -- [SetCenterPosition\(\)](#ga6cf6b8ab0934ce8c0ea1821da0791317) -- [SetColor\(\)](#gaabdefd6f104682c755886594e259e810) -- [SetCols\(\)](#gab5737dec2f5c0bc812dee9c4bc7a796b) -- [SetCurrent\(\)](#ga6c4963d3186afc52db0d0a18bd52820f) -- [SetCurrentPage\(\)](#gaedb8649e42a712463158f42eb66efc33) -- [SetData\(\) \[1/2\]](#ga9521d17dfaf251b42deafc182aea8a1e) -- [SetData\(\) \[2/2\]](#gabe6f62c7e3284e04b37451963e803a96) -- [SetDataRange\(\) \[1/3\]](#ga2181796eef584a71a5db9186399720aa) -- [SetDataRange\(\) \[2/3\]](#gae635d27e0a4eba30002e3607c42b914a) -- [SetDataRange\(\) \[3/3\]](#gabb486419e729add9ff85a24371253bf8) -- [SetDelayTime\(\)](#gaa2d428cb1098dafb21e7dd24f6ba612f) -- [SetDirect\(\) \[1/5\]](#ga96801aa6350a8533496b0718d67f0b9c) -- [SetDirect\(\) \[2/5\]](#gabdea4ed71d6a22492ff423339cc08d5e) -- [SetDirect\(\) \[3/5\]](#ga618021df16f2156ddeeb12d5a8fa14f9) -- [SetDirect\(\) \[4/5\]](#ga51d43cfa57f438939627066d66a3f6cb) -- [SetDirect\(\) \[5/5\]](#gad0c36e1430f8db5571fd92b82d6d6bc1) -- [SetDirection\(\) \[1/2\]](#ga3e2e7d0c37b4945a3f4f456c20cb0177) -- [SetDirection\(\) \[2/2\]](#ga29be43640abe185baef5ead904a729cb) -- [SetDisallowIntercept\(\)](#gad53c52e619a54358a413a836ae0c1861) -- [SetDisplayMode\(\)](#ga2ac4d800eb47c4238d160819e165a30a) -- [SetDragACCLevel\(\)](#gad344babd5b251ed908cdf628fae55093) -- [SetDragFunc\(\)](#ga957ec65a7efad6818be6df5169158aad) -- [SetDraggable\(\)](#gab06abe0fe824c048f3b72974f9a8f0d0) -- [SetDragParentInstead\(\)](#ga6c08e49bf7a82a7ebaef0f251e7a6f85) -- [SetDurationTime\(\)](#gac2727b2cd7aa7abead44717cf0ce7b3c) -- [SetEasingFunc\(\)](#ga0f099914c2daa13dc6acf3fb28c3f45a) -- [SetEndAngle\(\)](#ga831186bf208f8236b006b13cc122c82c) -- [SetExpandHeight\(\)](#gac08f297a1593424d754450c75bc47045) -- [SetExpandWidth\(\)](#ga7aa8b64ece3c4b3bf592dc88fc7c11d2) -- [SetFillColor\(\) \[1/2\]](#gab1b0e3a5e21ce2ec8454311ed31956ae) -- [SetFillColor\(\) \[2/2\]](#gac620b9878a5e28d066dffbcd6145539c) -- [SetFlexWrap\(\)](#gade436564eb29d29e32220863a6fe94e1) -- [SetFont\(\) \[1/6\]](#gaa41d0c6ab53a4451e9e90199dbaa3895) -- [SetFont\(\) \[2/6\]](#ga1c1a26e57098662f787a1bb44bb9da8c) -- [SetFont\(\) \[3/6\]](#ga28d957b0aa0324e876a871eae1b80d3f) -- [SetFont\(\) \[4/6\]](#gaa45fef56dbe7296f3273586cbc29c7ed) -- [SetFont\(\) \[5/6\]](#gad84d1829e94b7ec45ab6576bc14c62d0) -- [SetFont\(\) \[6/6\]](#gad4b6741054c0041c6df365b1d41d49ec) -- [SetFontId\(\) \[1/7\]](#ga11a0d71430e826f1971744e5ce1c9048) -- [SetFontId\(\) \[2/7\]](#ga9013bc4fa8bfc77cf75b898db1a0fbf6) -- [SetFontId\(\) \[3/7\]](#gaf0ec9f4036ed071ab95081bb3237f89a) -- [SetFontId\(\) \[4/7\]](#gac27135182c89eabec65e22df079dc413) -- [SetFontId\(\) \[5/7\]](#gad77dde925091bf68bb39316208a304ce) -- [SetFontId\(\) \[6/7\]](#ga89cde9550d1bd443dad10d11c5c2fbfc) -- [SetFontId\(\) \[7/7\]](#gaf8b585ae9aa99d4876e1d81c8b193300) -- [SetForegroundStyle\(\) \[1/2\]](#gaccebcfa35f98f9bc6be4bb8cc53eb11c) -- [SetForegroundStyle\(\) \[2/2\]](#gae6386ca25603e42f06087f6b2ef65bae) -- [SetFPSCalculateType\(\)](#ga5eb3d62fce38f8d2fcf2a0a4560a3640) -- [SetGradientBottom\(\)](#gafdab5b0f7f8563d475c5aba2aeb1e828) -- [SetGradientOpacity\(\)](#gacf4303bade3933dcac90459fa38d6e1f) -- [SetHandImage\(\)](#ga18816e5dae6a7b79cbc408b1bc70c584) -- [SetHandLine\(\)](#ga271358e8076b55ed48de19350b3e55de) -- [SetHeadPointStyle\(\)](#ga8fcb9d0640963ff30ff010ca5d387ff2) -- [SetHeight\(\) \[1/10\]](#ga2c83259c064091d74deac1e4a69f834c) -- [SetHeight\(\) \[2/10\]](#ga8e3fab1e0d6cd4671c6628b94c493d0f) -- [SetHeight\(\) \[3/10\]](#ga9c7110620d5dc3a7bd3efe1fc2edd125) -- [SetHeight\(\) \[4/10\]](#ga54299cb7561cee9a03d0fc9d0ddda784) -- [SetHeight\(\) \[5/10\]](#gaf90ada30a3336b947951d408b685787e) -- [SetHeight\(\) \[6/10\]](#ga06667e791f24098f22ef096ee6af77ad) -- [SetHeight\(\) \[7/10\]](#ga167979fe09694b0f0c09e9c676189bea) -- [SetHeight\(\) \[8/10\]](#ga8b6dbfcd0328753c2c3cef4d14b0ff30) -- [SetHeight\(\) \[9/10\]](#ga9998ddd0dfc0863d31f931a76f1da033) -- [SetHeight\(\) \[10/10\]](#ga54b3c4122ebaeefe74587ca69aa98600) -- [SetHighlightFont\(\) \[1/2\]](#ga56b1f4b7f18e9684cdbac447aa106503) -- [SetHighlightFont\(\) \[2/2\]](#ga2a340bb688a9ecc28d621daa6d570e07) -- [SetHorizontalScrollState\(\)](#ga53a40f1c665fc7333e6aac156a1f5b81) -- [SetImage\(\) \[1/4\]](#gaea596b36fd10c26361666aeda1aca01e) -- [SetImage\(\) \[2/4\]](#ga5b3ec363e391f601e12bf937b9cf77db) -- [SetImage\(\) \[3/4\]](#ga0685ff139a48f556a2323d06470ad301) -- [SetImage\(\) \[4/4\]](#ga10723293ab9e384907dd9dacbc9ad448) -- [SetImageAnimatorSrc\(\) \[1/2\]](#ga4b2c4bc9d0ab881439d5ec728adc0b1a) -- [SetImageAnimatorSrc\(\) \[2/2\]](#ga6d585adbcbd0d236df848b48ff1b7ece) -- [SetImagePosition\(\)](#ga952fcbc88905cf35ec3e09bdf01375f2) -- [SetImages\(\) \[1/2\]](#ga2e1ac9e3084d018febf5ac0912a27c72) -- [SetImages\(\) \[2/2\]](#ga89eb87d02e7b31fc6517b8744751f021) -- [SetImageSrc\(\) \[1/2\]](#ga60194db1c1bba6a0ef963bdbbe9f972f) -- [SetImageSrc\(\) \[2/2\]](#gab751bc5941edb403022d65d2c605a241) -- [SetInitTime12Hour\(\)](#gaa118c65942244bb0948b626944c0eaf9) -- [SetInitTime24Hour\(\)](#ga3099f37f0ff8cd1229c0734098649173) -- [SetIntercept\(\)](#ga980fc6824c64cfae6af8657aee17af88) -- [SetInterval\(\)](#ga88637ae5acd7701ded0d0e88fb28227d) -- [SetItemHeight\(\) \[1/2\]](#ga54e8588b0be58272d1fef244c5e9ba27) -- [SetItemHeight\(\) \[2/2\]](#ga6a6d9ca48f543f4f6cf6073d6cca359a) -- [SetKnobStyle\(\) \[1/2\]](#gac78f9aa2fe12353627a74f87fe49ef4b) -- [SetKnobStyle\(\) \[2/2\]](#ga80c30c69e9f565269b09fc9d7ded432e) -- [SetKnobWidth\(\)](#gaf0de71e2d767ccfc3cb41679185a5529) -- [SetLabelStyle\(\) \[1/2\]](#ga66e316e344c0165a6fd3c5083ea523f4) -- [SetLabelStyle\(\) \[2/2\]](#gad1d6be2a8aec65bef4c1f598bfde7666) -- [SetLablePosition\(\)](#gaf97dc0d36701691a001ef3fd9e6e8b4f) -- [SetLastRun\(\)](#gabdbfe69d5f5da3cc5bbb1749d281af62) -- [SetLayoutDirection\(\)](#gada9223ec4d664c00a9640c8b9cbcacc3) -- [SetLeft\(\)](#ga043a1c4f0aaf4eed2ddf99083ed993bb) -- [SetLineBreakMode\(\) \[1/2\]](#ga406c7972fbf4950aaa8c4cef8c86acc5) -- [SetLineBreakMode\(\) \[2/2\]](#gafc5f3b2c909753f4a7ef53daa80b530b) -- [SetLineColor\(\) \[1/3\]](#gad0453bc291f75f4864c112f9f2f474db) -- [SetLineColor\(\) \[2/3\]](#ga8ceec5e67fa2c4f161bd9af1f0788bbe) -- [SetLineColor\(\) \[3/3\]](#ga94beac0c71885b8546996271c876f999) -- [SetLoopState\(\) \[1/3\]](#ga7f7dce8193817e29c9b82af47934d788) -- [SetLoopState\(\) \[2/3\]](#gaa07b156ab757cd20486ec0bcbf4c17ac) -- [SetLoopState\(\) \[3/3\]](#ga742f27b59ae3c19dfb5d99e84ca19554) -- [SetMajorAxisAlign\(\)](#gaa683d4401ecb3c19a5b5c2cea1252636) -- [SetMarkNum\(\) \[1/3\]](#ga46f4151f1379809749ab2ba364d55170) -- [SetMarkNum\(\) \[2/3\]](#gaf67c1b25c1d1a3ba694cb47f7e9fda85) -- [SetMarkNum\(\) \[3/3\]](#gaebe68b636d2147f2e69bd658696dc4ee) -- [SetMaxDataCount\(\)](#ga81133f20156b6dc269927a5be9caf653) -- [SetMaxScrollDistance\(\)](#gae2d6f5c97a316ecd3b41fecfa35a351f) -- [SetName\(\)](#gad56eb918dbfec65f8f596572a9911286) -- [SetNextSibling\(\)](#ga02bec5de07d93cabc45affba79eba4ad) -- [SetOnChangeListener\(\)](#gad72c8f6a67fc3fb86da8eabffcf5315d) -- [SetOnClickListener\(\) \[1/2\]](#ga4564bf8d8c7184e9c02bf33c9e171fa3) -- [SetOnClickListener\(\) \[2/2\]](#ga9aa8cecae666906c7fa3d292d6c1c842) -- [SetOnDragListener\(\)](#gad8e3cf5f0dd003a6aa932ef04e7b59f2) -- [SetOnKeyActListener\(\)](#ga3c0fce0e3a6c1b83324e54468d077bb0) -- [SetOnLongPressListener\(\)](#gabcbe7a0adce600424f7f0d5a7396eb5b) -- [SetOnSwipeListener\(\)](#ga7d4a3dc25f189ab19eaef4a62cd0428e) -- [SetOnTouchListener\(\)](#gadd697fbf481f98d9d6ca8b67390071af) -- [SetOnVirtualDeviceEventListener\(\)](#gac12473c0dc9b293f6be9553afbb7c5d6) -- [SetOpacity\(\) \[1/2\]](#ga1565dcdb5ab0403fa477fd74c5920b99) -- [SetOpacity\(\) \[2/2\]](#gacd329fb89bbf6f0e3fd4f9a61f4ce60f) -- [SetParent\(\)](#gaeea67a3a84b4ffe9bfeda418b82184cc) -- [SetPeriod\(\)](#gac6e9fe7bde72bf506558a6f0d0287a92) -- [SetPivot\(\)](#ga44fa62a21869361527a8af1a10e5276e) -- [SetPolygon\(\)](#gaaf0b94adde30d2ee1f3c82ef5d8c60c9) -- [SetPosition\(\) \[1/7\]](#ga723d2b5ace818a6b71e0570339689690) -- [SetPosition\(\) \[2/7\]](#gab34233f6aeae330b025969137d03e67a) -- [SetPosition\(\) \[3/7\]](#ga5d9af67ba074697876ff97f8ece305b7) -- [SetPosition\(\) \[4/7\]](#ga01d3098090d17bdd720df6e861784e13) -- [SetPosition\(\) \[5/7\]](#gaf8ce4c009f23b7175b2b34bac4a74262) -- [SetPosition\(\) \[6/7\]](#ga4a505b3b207653c60161d90750f88a9d) -- [SetPosition\(\) \[7/7\]](#gaa7fad079e41c8efd137781350b60687b) -- [SetPreLastPoint\(\)](#ga8399680c67bc048745257a1b56250834) -- [SetProgressImagePosition\(\)](#ga62b71500ccc75673be297d2e114c0c1b) -- [SetRadius\(\)](#ga80377fb579f6698cefd5fcf74d0cde46) -- [SetRange\(\)](#ga089e3875453011499ad33ed89a44a699) -- [SetReboundSize\(\)](#ga5d7fefcd2057e868a8f6c6a6000aa7ef) -- [SetRect\(\)](#ga4423fe83ed9271d1186711dff65796cb) -- [SetRepeat\(\)](#ga0368d596c01e1a6093d7476fce548a38) -- [SetRepeatTimes\(\)](#ga8d0a02c46af6bea17323c715620b6212) -- [SetReverse\(\)](#ga38a53936c930f4d75ccd9d9c6a5b9afa) -- [SetRight\(\)](#ga314f4443ef95351a80e6edaaeff11674) -- [SetRollSpeed\(\)](#gaf95611590551b86e5e49efce1cab5069) -- [SetRollStartPos\(\)](#gaeb4eb6f2b82574eb005fdbf17b0b926b) -- [SetRotateEnd\(\)](#ga9bb2570b86ef683f8a501e98f8689ed5) -- [SetRotateStart\(\)](#ga98a7e074315fdf49b6a9c0663848c9aa) -- [SetRows\(\)](#gac2df1f13d5ee6d2e6993c9a51eb9a716) -- [SetRunTime\(\)](#ga4d5ff5057df28da1bc99d08070312f24) -- [SetScaleEnd\(\)](#ga7c7c54ce9ab139498ba286762286c0c0) -- [SetScaleStart\(\)](#ga31a2295a15e2e990a1f2484f5756609b) -- [SetScrollbarWidth\(\)](#ga992fe30e6840d966688154ea96c362f4) -- [SetScrollBlankSize\(\)](#gab37cea97d63ee9ca609c9a1ed0f1e281) -- [SetScrollStateListener\(\)](#gad6b2f7598033f4e1d0d73e30b0e41f02) -- [SetSecondaryAxisAlign\(\)](#gadb57c6de7bcd0c04cde8004019e32b32) -- [SetSelected\(\) \[1/2\]](#gaecddab27ffd11267d3f613a1cf7f1549) -- [SetSelected\(\) \[2/2\]](#ga07eb2080a6052c19dba2873fcfae2c34) -- [SetSelectPosition\(\)](#ga919b4f3116ca0d0971a48b7a14921954) -- [SetSizeFixed\(\)](#ga0e41547fd9d55ff85d6b800e59957370) -- [SetSliderColor\(\)](#ga8369feb4c08ec7a01e7200a881acb94b) -- [SetSliderEventListener\(\)](#ga1319a5ea74ad822cb12b0f48c19ccb5d) -- [SetSliderRadius\(\)](#ga977ead9a79667465b107ca0776868712) -- [SetSrc\(\) \[1/4\]](#ga4fe78bf99b160fc55770ba1979412c8e) -- [SetSrc\(\) \[2/4\]](#ga4e2dac4fd52a54a828f13db5ab51d110) -- [SetSrc\(\) \[3/4\]](#ga9471d489ab4d5b6848c1e50b4b7aac23) -- [SetSrc\(\) \[4/4\]](#ga18a9eed434132ac60c127ca1fc03e663) -- [SetStartAngle\(\)](#gae27e30bd77b83bc55ecc9f2a5643943a) -- [SetStartIndex\(\)](#gaa8023e5c4e0688841263d0f576e76218) -- [SetStartPosition\(\)](#gaca35fe1a1d344eab80ecb1425a74a91a) -- [SetState\(\) \[1/3\]](#ga73354e99d22f2fe8b44f1c11c8d62fd0) -- [SetState\(\) \[2/3\]](#ga32217050815d4d9129ace5ab410fb82d) -- [SetState\(\) \[3/3\]](#gab8ec3815f5e42605a51a328c1b0857dd) -- [SetStateForStyle\(\)](#ga737d850b2adf8a2977369e611764b1ae) -- [SetStep\(\)](#ga747a29652b441a06d09a97a297aae9bb) -- [SetStrokeColor\(\)](#gaff7464c7456b1e7caf9464ff61ab2527) -- [SetStrokeWidth\(\)](#gad56b6b014e1d061ba93ba8e6c135b90a) -- [SetStyle\(\) \[1/5\]](#gab93dc15f466a656150e62d7620d34333) -- [SetStyle\(\) \[2/5\]](#ga535942844ebee554d413e960634a2867) -- [SetStyle\(\) \[3/5\]](#ga31941bb1abbb6744ee832d4b0fe6e080) -- [SetStyle\(\) \[4/5\]](#ga0945c2f05815dc2e466ef9ceaca2f700) -- [SetStyle\(\) \[5/5\]](#gaa5fdd9b28b8c919dbde0e34d8ae38caf) -- [SetStyleForState\(\)](#ga7ece04980fa99a277bfbb591771f47f1) -- [SetSwipeACCLevel\(\)](#gafab9d1a8f5987b50f9111c733ada6341) -- [SetText\(\) \[1/5\]](#ga6b5b491c9240a061fc21cf6b98bdaefc) -- [SetText\(\) \[2/5\]](#gaf4c592a07fe20af21e0ddae2d8203d96) -- [SetText\(\) \[3/5\]](#ga597e95748fba71238a99c8c17ed848a5) -- [SetText\(\) \[4/5\]](#ga6085d982d8ec3d570b2eabc7d1a58b67) -- [SetText\(\) \[5/5\]](#gab1f3eafda465d09aaa886f09db7e47c1) -- [SetTextColor\(\) \[1/4\]](#ga281508b16585cdf4531e29872486e6c8) -- [SetTextColor\(\) \[2/4\]](#ga4d7878f9ad47c81c81e22dfbf6efb3cd) -- [SetTextColor\(\) \[3/4\]](#ga07e45127ac9569064beb2a63753d2673) -- [SetTextColor\(\) \[4/4\]](#ga55592f14dc16b1e1ae3fc9ab7ee9a976) -- [SetTextFormatter\(\) \[1/2\]](#gadad75361a42fd390b5f9c5edad2f2f0b) -- [SetTextFormatter\(\) \[2/2\]](#ga564153af81a4a41ceab63622506d25eb) -- [SetTextRotation\(\) \[1/2\]](#ga2ec83b586a0a7ebe402bb70a31be2ca6) -- [SetTextRotation\(\) \[2/2\]](#ga3c8eb22a51f4ec16640f5003c32d0341) -- [SetTextStyle\(\)](#gab1847d20b4ae671aaa512f978e043ee1) -- [SetThrowDrag\(\)](#ga4dde5f89d70304e77a96d4f4679438c2) -- [SetTime\(\)](#ga5a2bfa5fb257b2116d08ad5ae254327c) -- [SetTime12Hour\(\)](#ga37750dfa0b5a47c8dcb61547dd991a6a) -- [SetTime24Hour\(\)](#ga44a7312163a4192670c00bb8f9916e51) -- [SetTimeOfPause\(\)](#gad4bd7aaf1100aac86a2cde8728ae8ee0) -- [SetTimeOfUpdate\(\)](#ga0ee52a2ca252957199034c1234dc4f64) -- [SetTimeStamp\(\)](#gabee47ba229e81c44f648cf5b3203010f) -- [SetTitle\(\)](#ga5629d5a1e19bc38087e8b35d65292714) -- [SetTop\(\)](#gae7c63105b7e1871f231a1a8dfad48de7) -- [SetTopPointStyle\(\)](#ga91b0d5442e708e2d2bd39436b5d46baa) -- [SetTouchable\(\)](#gaf9fb55fd9aa397f7158f1515e90bce02) -- [SetTransformAlgorithm\(\)](#gacd3bafd7cd7dfb83d46d4fae36eae612) -- [SetTransformMap\(\)](#ga8623abbbeff458c0cb2d7dc0d1f21e4a) -- [SetValidHeight\(\)](#ga6958b8273ad7a5563dfa19267cc3a13c) -- [SetValidWidth\(\)](#gada3cf1819e826ee0aed4a40ef00b91a6) -- [SetValue\(\)](#ga5f65014431a6489ffa1d4949f9c4449b) -- [SetValues\(\) \[1/2\]](#ga419bb15f72b02f009a76a84e1242b37a) -- [SetValues\(\) \[2/2\]](#gadc27ad0369bad90526a59d0cefdb9697) -- [SetVertexNum\(\)](#gad1990bc3055e0155d324479a2bb3baf1) -- [SetVerticalScrollState\(\)](#ga8a6839614c863229666675c289a5cff4) -- [SetViewId\(\)](#ga0caaa15c9b304673331e778a266be77f) -- [SetViewIndex\(\)](#ga77a961aa53567c5214508b4569801c16) -- [SetVisible\(\) \[1/3\]](#ga07e7e1f268bd6ce975f4f0f8487af5d0) -- [SetVisible\(\) \[2/3\]](#gaf836d530b3fa9d50f70053c2b0b528d6) -- [SetVisible\(\) \[3/3\]](#gaa6b5efec0684a2800dba70c697d3902e) -- [SetWidth\(\) \[1/10\]](#gaed7f27b1dbf4f50ae8eda00cc6cb6a27) -- [SetWidth\(\) \[2/10\]](#ga8a31c03ecb4a452d79374b392537f183) -- [SetWidth\(\) \[3/10\]](#ga3375ec5ef059fd88c657af4552d2fa4f) -- [SetWidth\(\) \[4/10\]](#ga4b3eeb9de2443182480a71cadb23178c) -- [SetWidth\(\) \[5/10\]](#ga54c350b75cf87ca112b3c21791f9c559) -- [SetWidth\(\) \[6/10\]](#gad8dc3b2df7fe8aed16776a063efc8b4b) -- [SetWidth\(\) \[7/10\]](#ga792a345948af532f9c06cd40c05d1a2d) -- [SetWidth\(\) \[8/10\]](#ga420f927c473cec8c6f3265ff7c35336f) -- [SetWidth\(\) \[9/10\]](#ga4000481fca247d526961d9da6809a806) -- [SetWidth\(\) \[10/10\]](#ga2ae317808111cd58e6ba93e030f23111) -- [SetWorkMode\(\) \[1/2\]](#gaafa5df66c896268de27bf335c1b72b92) -- [SetWorkMode\(\) \[2/2\]](#ga1714e171ff1e9248932a9f2c14c82d12) -- [SetX\(\) \[1/3\]](#ga6d14ede131d4a9445e0890632d2e4370) -- [SetX\(\) \[2/3\]](#gaded403626558d28e62bf5632ccbb24b5) -- [SetX\(\) \[3/3\]](#ga87457cce8ab3daa62852815ad36e9692) -- [SetXScrollBarVisible\(\)](#ga011dae1414a147441e1d32d548545f24) -- [SetY\(\) \[1/3\]](#ga260393d7b4c514eebc2a28187ec6f8b4) -- [SetY\(\) \[2/3\]](#gaaa8edc224cf1c7deb2724fb225960877) -- [SetY\(\) \[3/3\]](#gad7e27c2508753b6752594c3615b5d2fe) -- [SetYScrollBarVisible\(\)](#ga36fcdfce31fab72f54a37062d3f4a6f1) -- [Silver\(\)](#ga6dcfcd450637398b7b7d28ce7464d153) -- [SineEaseIn\(\)](#ga89ee91a569b73c6ebb29ae4dfd2777f9) -- [SineEaseInOut\(\)](#ga2c3b14232a67095b0b941bae3a7b2e54) -- [SineEaseOut\(\)](#ga34018757e69d7920557030f33393048d) -- [Size\(\)](#gae209f40639cdee7a5b07dc6587dac170) -- [Start\(\) \[1/3\]](#ga83f0469f24917e59c3c6d7b331928014) -- [Start\(\) \[2/3\]](#gad56477fe4b6d0158082e841e327c1bf6) -- [Start\(\) \[3/3\]](#ga99fb1b9b27ee65f812085f93e05330a6) -- [Stop\(\) \[1/2\]](#gad670cee429a5535149db0f8b3828e951) -- [Stop\(\) \[2/2\]](#ga1887f1afd8e85c0a9c781e182fe5afc3) -- [Style\(\)](#ga592b31b43819c40563c52fe7b45d9358) -- [StyleDefault\(\)](#gae5bc682ac7e77c369ccdd32a68de4387) -- [SuthHodgClip\(\)](#ga9fd2882e4813fbf4dbe77baa50d97b5c) -- [Tail\(\)](#gab60fda7a08504db2cf992de435ad1848) -- [Task\(\)](#gaa7c50eb360b6a4478b5332b8bf565940) -- [Teal\(\)](#ga9f4afc8d27c8e90d5295b281a7198fe5) -- [Text\(\)](#ga7ea8e1b0f5e199317c3134b575431ce6) -- [TextAdapter\(\)](#ga38bde4aa4a0952341ad74284ff686832) -- [Theme\(\)](#ga375bdd5a61da0f2bc437a531c8958d70) -- [TransformMap\(\) \[1/2\]](#ga3b20453b0a161da3a1a761fd75da9975) -- [TransformMap\(\) \[2/2\]](#ga84f0243719d4b43d0ee3a22e74c165bb) -- [Translate\(\)](#gab1cbae80ef16538294c97ba81626970e) -- [TranslateToPixel\(\) \[1/3\]](#ga9407ddab6d7e65fc075ca37b86163e6f) -- [TranslateToPixel\(\) \[2/3\]](#gae70c8c411116746a2ab73a6f9bbd1233) -- [TranslateToPixel\(\) \[3/3\]](#ga8ff3fd2953897245e4f6e3cb6bd71495) -- [UIAbstractClock\(\) \[1/2\]](#ga160a40d9f81c72b606b3c5b05168bacf) -- [UIAbstractClock\(\) \[2/2\]](#ga93d3d68e48a79ee7fc4b42a9c0c0ccc1) -- [UIAbstractProgress\(\)](#ga8f9bfb4f42ee0e094501ff776e3336da) -- [UIAbstractScroll\(\)](#ga93a169fba7c98f6534692cba9e8d539b) -- [UIAnalogClock\(\)](#ga2e986cb53c62dd015edced59450b9fff) -- [UIArcLabel\(\)](#gaeb650e68c370ef4d09d0eb0b30e4346e) -- [UIAxis\(\)](#gad79f1c694abce57af451b8f7b0b17c35) -- [UIBoxProgress\(\)](#ga315a532a3e0aa658a64d2f7739483f35) -- [UIButton\(\) \[1/2\]](#ga3aee093d4c583223850a7ad80d5bed79) -- [UIButton\(\) \[2/2\]](#ga33e30931e9b3557634b2b2be93bc41f6) -- [UICanvas\(\)](#ga60d2ed5d49ef68ae8d6f2a8b58322ed3) -- [UIChart\(\)](#ga3ab02ed367123e4f84e5ab145f5ed949) -- [UIChartDataSerial\(\)](#ga8f1555cd3433927a650e7800a8746779) -- [UIChartPillar\(\)](#ga5c26ce24f640f795404c8375b4043186) -- [UIChartPolyline\(\)](#gaf32e6833f395ca6ac8620277531d5ea7) -- [UICheckBox\(\)](#ga811085fbe237690f21a95e7df2a7c45f) -- [UICircleProgress\(\)](#gae6d547653f0448f9151fa257cbf9c3ac) -- [UIDialog\(\)](#gaeaaddc56316206d4465ce8c927a686b7) -- [UIDigitalClock\(\)](#gac89c3f554cea687e0b7d7338319c8d0b) -- [UIFree\(\)](#ga77914ea7bc96f6cb30f65ae2014746e8) -- [UIImageAnimatorView\(\)](#ga0506b7e6730f07b6e78371b479326b54) -- [UIImageView\(\)](#ga3db47186dbc7a0cb996c23abcdaf2c38) -- [UILabel\(\)](#ga7e145ba3fb7b78ecefa1018a9540be32) -- [UILabelButton\(\)](#gadf3e53072501ed36700dea74a3ddbd8f) -- [UIList\(\) \[1/2\]](#ga56c15f8c21c433c8a08a151e33b521cf) -- [UIList\(\) \[2/2\]](#ga2da1983fedabd5ea06a8a544aeb2cf04) -- [UIMalloc\(\)](#gafc7b2c7d0b427079d8b04b11cc4db009) -- [UIPicker\(\)](#ga527215b87f48c8e4a76c1d1d7979b739) -- [UIRadioButton\(\)](#gaae79b6ffd2b156a8d42263a322985284) -- [UIRepeatButton\(\)](#gac43cbe638a874231842ad80c23c00b0a) -- [UIScrollView\(\)](#ga83285fe2d337f5d2242204e739e130ab) -- [UISlider\(\)](#ga67f8d874edcd65b1610117052ceed0a6) -- [UISurfaceView\(\)](#gab8acc0b7172486e8e5d48c09fcd4c878) -- [UISwipeView\(\)](#ga3a460525251fde8e30c35be808151509) -- [UITextureMapper\(\)](#gaff111e4883be7412bfd6a41d769d9e77) -- [UITimePicker\(\)](#ga125b46b02ee28c0ba6403ef024196b03) -- [UIToggleButton\(\)](#ga98d6bb49e21d7748020b75a9f5f1c61d) -- [UIView\(\) \[1/2\]](#ga7aad5b50d945efe5f9304bc978b2001c) -- [UIView\(\) \[2/2\]](#ga57d429bb1cd71782f3b825f1bc6b9362) -- [UIViewGroup\(\)](#gadae043c6d43d5436ec0374e5d128c654) -- [UIXAxis\(\)](#ga8cc8e2c8249360ccfc89462fff33ca4a) -- [UIYAxis\(\)](#ga0f9a52b48bcd8170b4a64a891a88fb5c) -- [UpdateClock\(\) \[1/3\]](#gad7c0fba1eac5d10998954e9c1e097197) -- [UpdateClock\(\) \[2/3\]](#ga386c03c483ef38cb5310563b6ba9bc02) -- [UpdateClock\(\) \[3/3\]](#ga5274a3e5b66e5f80aab899ef4e61edb2) -- [Vector2\(\) \[1/2\]](#ga7fd378c8c6c9fcf7325fa354f182865c) -- [Vector2\(\) \[2/2\]](#gada601fe3518d7bb489010370f1db9903) -- [Vector3\(\) \[1/2\]](#ga0e56d35f73116fdc410e305c1d702076) -- [Vector3\(\) \[2/2\]](#ga1b07727c686eb7a4d028d1052cc0fd3c) -- [VirtualDeviceEvent\(\)](#ga4832bd35eeae9c4402c1cba6294fe55b) -- [White\(\)](#gad98c45688cd59b11e9e766e62e24252f) -- [Yellow\(\)](#gadd545c06bdd497b259179379e6910e15) -- [\~AbstractAdapter\(\)](#ga86fbbc62904d459ec4fa39bab7703af7) -- [\~Animator\(\)](#gaee2a71f97b102654ca3b7ded4b5ce350) -- [\~AnimatorCallback\(\)](#ga783aca5777750141552a5aba974ffdff) -- [\~AnimatorStopListener\(\) \[1/2\]](#ga7165af78c57699d722f5264dcdf5d6dd) -- [\~AnimatorStopListener\(\) \[2/2\]](#gaafa8a44fe38db14ab7e8f72e4d3c8581) -- [\~CancelEvent\(\)](#ga5f8a22ac27c5ffc2b8801b4687a38394) -- [\~ClickEvent\(\)](#ga75b3bef18631b1640c31dd1191f35ef7) -- [\~DragEvent\(\)](#gabed19ea6c1b15b861653485349133468) -- [\~Event\(\)](#gabafa07a6393f4757f402bf9437561fa4) -- [\~FlexLayout\(\)](#gada390db4ca762cf1dac06abfcd74e543) -- [\~GridLayout\(\)](#ga1c2e62760fdb7032341272197f376358) -- [\~Hand\(\)](#ga1e433482830dd12b9b40430dab92505f) -- [\~Image\(\)](#gaf3794ceb5acb543f8c526b5d9f6a1e4e) -- [\~KeyEvent\(\)](#ga468e77700a90ef155a2428af9176551e) -- [\~Layout\(\)](#ga6c7cc7a849197fe014ea57d0534728bf) -- [\~Line\(\)](#ga86d5bfc47854c5e85363adce571de167) -- [\~List\(\)](#gae36a1bb98e3352c2b97423ca340a51a9) -- [\~ListScrollListener\(\)](#gace5864b41e1f07feecb33b3f897fe02d) -- [\~LongPressEvent\(\)](#gab7cd91a47633f432b39da4f6056f72fc) -- [\~Matrix3\(\)](#ga9cf7c2656623468c34003bb3c4056a72) -- [\~OnChangeListener\(\)](#gab2e7f64e07e70975baa571660687f6a1) -- [\~OnClickListener\(\)](#ga53fcaf6484a178d452c76f0f1b493e99) -- [\~OnDragListener\(\)](#ga34c01de74c319674fc94d1d74bb6e77e) -- [\~OnFPSChangedListener\(\)](#ga4e103243c2fd1e2e5206262280f1b80c) -- [\~OnLongPressListener\(\)](#ga80d9a933818b4ae9c3f34fe78f65a8f6) -- [\~OnScrollListener\(\)](#ga14fe076dffea62fdd281cd13e846de2d) -- [\~OnTouchListener\(\)](#gacf19bb5f0c979bb6889d30a20b2737e1) -- [\~Paint\(\)](#ga53f5ef8053f9e468a2fcf6c81449d16d) -- [\~Polygon\(\)](#gab27ef37ff8b5462c771aed96f58dcac6) -- [\~PressEvent\(\)](#ga14740b5b74e00d2dfd612f2e08687884) -- [\~Rect\(\)](#ga3729aa7a7f052d182bd20707097f9db9) -- [\~ReleaseEvent\(\)](#ga4a9df65bdfd2edcb0f21be7b7e52ad56) -- [\~SelectedListener\(\) \[1/2\]](#ga59db1409429fa0c598e3cf70a8ec2738) -- [\~SelectedListener\(\) \[2/2\]](#ga6aa15c4365ba33bc21c67cfc3e5cf06f) -- [\~Style\(\)](#ga6356d56766de8fe37d4888ef70f521ec) -- [\~StyleDefault\(\)](#ga01ecc90591628698b0d657a60f567b09) -- [\~Text\(\)](#gae15585b395b286ee404a57a61baa81f1) -- [\~TextAdapter\(\)](#ga1e868c845df224beff2f3c6f49593d3b) -- [\~Theme\(\)](#ga7de1b9b039dd5aee8493f4aad889358f) -- [\~TransformMap\(\)](#gaaa46c8a5a343df76b418423a9f2344ba) -- [\~UIAbstractClock\(\)](#ga0fb0c108b319f02b9d42b34c1d2c8708) -- [\~UIAbstractProgress\(\)](#ga5c1cf7239bf0c0f7d331e63df805b518) -- [\~UIAbstractScroll\(\)](#ga414798ec7357edc85409128fba0a813c) -- [\~UIAnalogClock\(\)](#ga4b06e05f003e25206d5fa772b303dcc5) -- [\~UIArcLabel\(\)](#ga89c52725ea96d25f451c2cd29f9cee22) -- [\~UIAxis\(\)](#gaacc9ac178b3b235f1186297021eb98d8) -- [\~UIBoxProgress\(\)](#ga7a5eefc7d4ad253a286444e76146af7f) -- [\~UIButton\(\)](#ga0c5fbcf319fc6df8170d407a337b9d8b) -- [\~UICanvas\(\)](#gaf099d1872cdb070f038c5135309b9b6b) -- [\~UIChart\(\)](#gab5d79c4736d822116dcdd7ed6e45294e) -- [\~UIChartDataSerial\(\)](#gaaf2cda0d138bb4b3a752f875f146a5bc) -- [\~UIChartPillar\(\)](#ga0f1e413e8eb026f2b5746b05b48d7ca7) -- [\~UIChartPolyline\(\)](#ga620a90ab246ec8c5c55aed8985329cb9) -- [\~UICheckBox\(\)](#ga061c90b24caa6595b70a9da9f96c5c4e) -- [\~UICircleProgress\(\)](#ga10a9da813e933b3513e22a95bb81af98) -- [\~UIDialog\(\)](#gae5b58ec7225efdbfaf9947e46bfd2616) -- [\~UIDigitalClock\(\)](#gaf4daabe77c9ab8264618a4f970b0a15e) -- [\~UIImageAnimatorView\(\)](#ga72c8450b3c27dd0429691667a6d66dd1) -- [\~UIImageView\(\)](#ga8be6fe17af73ab21f97effa26dbacaca) -- [\~UILabel\(\)](#ga8509fa2391e0ddd37faed27e35845fc5) -- [\~UILabelButton\(\)](#ga9c585e4c556a62f44c71d538608544ee) -- [\~UIList\(\)](#ga84de0a8214747d118abfd3d1185ffa63) -- [\~UIPicker\(\)](#ga7aa364d1c552eaf8b8be587e03049f59) -- [\~UIRadioButton\(\)](#ga1b9fbd5840829e912aa4013a343e7b36) -- [\~UIRepeatButton\(\)](#ga2e2a8bc2b9aa21899356dbad7a242900) -- [\~UIScrollView\(\)](#ga1b5f674824f5c27038329aa1223b137b) -- [\~UISlider\(\)](#ga024c4f15347a0b70920ab745efe8d250) -- [\~UISliderEventListener\(\)](#gaf7923989ab1a8cb8a0b643ef65d02134) -- [\~UISurfaceView\(\)](#gabf32743913a2a061ace3a5a3c88fe6fa) -- [\~UISwipeView\(\)](#gaf51c21b72dcbe790c3bb7b83b53b3cef) -- [\~UITextureMapper\(\)](#ga6c7e34e3ecc1d300e647483aed10c4cf) -- [\~UITimePicker\(\)](#gaf5906b1a1389a599c0086f25cfc02fa0) -- [\~UIToggleButton\(\)](#ga4946fb71fed32a4f328ecdd1da3141c5) -- [\~UIView\(\)](#ga17f0ffc1090bdcce0f88288da5962012) -- [\~UIViewGroup\(\)](#ga19ec065bd41a01f0925a4a9ffa450d1c) -- [\~UIXAxis\(\)](#gaa4e8939fb25fc20dd93ed030044b019f) -- [\~UIYAxis\(\)](#ga0dc204e8a15fa66762af58142552557c) -- [\~Vector2\(\)](#ga1cc5130b89192fc1403eb29dd4504cbb) -- [\~Vector3\(\)](#ga3b5bda0743cb7968e10429b627444f20) -- [\~VirtualDeviceEvent\(\)](#ga72e6afde17a0376e756b463e04a86ba1) -- [Variable](#section1744765298165625) -- [align](#gafa759d19aaa13f4dd0dc6f14cf09c24c) -- [alpha \[1/2\]](#ga1dd6db25b9f0e2ff6903a8bdff9b9b7a) -- [alpha \[2/2\]](#ga52cf77740ccf797d0fb2d122db80f679) -- [ANIMATOR\_TIME](#gadcba2d82501e76cfd140f05c77f96a01) -- [blue \[1/5\]](#ga5fd8eae40ce824adf273edadc84cb1e0) -- [blue \[2/5\]](#ga689900b0923b7a14f2aefbcfef603fc7) -- [blue \[3/5\]](#ga992f26a61065854a2b8dc82300141f50) -- [blue \[4/5\]](#ga6b19f6c5bf0db63f480207b6f73603d2) -- [blue \[5/5\]](#gac557017d4ef3285b2ac6246f44d52fff) -- [CIRCLE\_IN\_DEGREE](#gaa4982c092b6a8ded29e5df8bd1c39734) -- [colorMode](#ga9c75c581d1f77ecfc7230bd61723417d) -- [data](#ga5cd05c8b56b8d410f78795407fb98c75) -- [dataSize](#ga70d8bc34472386fcd16e88408103980a) -- [DEFAULT\_BLANK\_SIZE](#ga81883a607d2cb3356560fc0f8f84cf74) -- [direct](#ga0626c6f34c391fd27d24576f01fd4575) -- [fillColor](#gabf45efc45e3cbfe5d26072fadcb10af4) -- [fontName](#ga5a6088911d1998f93b949c22a3291bed) -- [fontSize](#gae17b6d7f13602d89f2b2d56e06b4a71b) -- [full \[1/2\]](#gab1eaaf72fa828b56a868d3fd9549fb71) -- [full \[2/2\]](#ga0563b1b1fd3481316a497c4504194357) -- [green \[1/5\]](#ga08c93bf4559a2af2bb7c25abbc007a3d) -- [green \[2/5\]](#ga4fbb2d771fd811298a3e770a29bb99d7) -- [green \[3/5\]](#ga2e5c69997158e4057334b5681051f092) -- [green \[4/5\]](#gaf976764b6737f675fad951e2bfed29dd) -- [green \[5/5\]](#gae35a7590d293ab37ee44e7877a367efb) -- [header](#gae36970890276c4f736e707a9521f5258) -- [height \[1/2\]](#ga1f515bb347b259348411884e41d7a7ea) -- [height \[2/2\]](#gafa300e18e8ed8a75adcdeb5d71c407d0) -- [HORIZONTAL](#ga34dfbde0fad8baade31c02d9e8dd5026) -- [imageInfo](#gab445a69c14b79bc38160c2c7f93aeae9) -- [inactive](#ga68874c767fe15554aecb6ac7ecef52e8) -- [letterSpace](#ga88db96f0f145614cf3f29f32dc8c623e) -- [MAX\_VERTEX\_NUM](#gafff78acb69e2b147b6f33d68e570ef54) -- [pos](#ga5f2a2382f2db4c6dd38803dff9ff1a86) -- [pressed](#ga01ff7d86c87e35e000023d1b98b75ddb) -- [QUARTER\_IN\_DEGREE](#gad835cf3672559707afe8fe6b5c8f8d45) -- [radius](#gadae6b0762c238e13b0624fe1e9c837ab) -- [red \[1/5\]](#ga110a2bb21e45358c3091ff1beceaffa5) -- [red \[2/5\]](#gad6039692dcafbce7a8450342d37cb2f9) -- [red \[3/5\]](#ga110f65c4b60ab5412734c1e58f2ca4b6) -- [red \[4/5\]](#ga2222e523994d3193ad043409347d24a7) -- [red \[5/5\]](#gac22ca9527c8c5e1ad941e18cc81f963a) -- [released](#ga46a6dd17da832419b8ba2806781b1bdc) -- [SEMICIRCLE\_IN\_DEGREE](#gafbbb7828863c3aa36f54a91631dd1e5a) -- [STOP\_DISTANCE](#ga0fc4210d617931b5cb229b1ac0313249) -- [strokeColor](#ga17c691721ccd2cf76f198feef257254c) -- [strokeWidth](#ga7f91d1884015d15d1a22dd468541998e) -- [TEXT\_ELLIPSIS\_END\_INV](#gaeacbcd7308bba53ba1154424143cd349) -- [THREE\_QUARTER\_IN\_DEGREE](#gafe0fe6f607752b650c61cb921f119877) -- [UI\_PI](#ga6de7080e13041493a5c2c663ee7db5f3) -- [userData](#ga4c8e09888e21f154d61867b2e168b8a3) -- [VERTICAL](#gacb8ccc9545b6c306f9eff97eaf5276aa) -- [width \[1/2\]](#ga29cf4bf4853f41efa5d7473f396108c7) -- [width \[2/2\]](#gacf365facd8be0e934f4d776097ffd807) -- [x](#gab426145151f58e845cea92fcf216e852) -- [y](#gaadc4725f7f09240b24b79bf045924fe2) - -## **Overview** - -**Description:** - -Defines a lightweight graphics system that provides basic UI and container views, including buttons, images, labels, lists, animators, scroll views, swipe views, and layouts. This system also provides the Design for X \(DFX\) capability to implement features such as view rendering, animation, and input event distribution. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Name

-

Description

-

animator.h

-

Defines the attributes and common functions of the animator module.

-

easing_equation.h

-

Defines the attributes and functions of the animation easing module.

-

interpolation.h

-

Defines the functions for calculating the interpolation in computer graphics.

-

color.h

-

Defines color attributes for the graphics system and implements common color functions.

-

image.h

-

Declares basic image attributes, including the image type and path.

-

screen.h

-

Declares the screen information.

-

task.h

-

Declares the Task class of the graphics module, which provides functions for setting the running period and time of a task.

-

text.h

-

Declares the Text class that provides functions to set basic text attributes, such as the text direction and alignment mode.

-

abstract_adapter.h

-

Defines the base class for adapters.

-

root_view.h

-

Manages a root view.

-

text_adapter.h

-

Defines a text adapter that is used to construct UILabel instances.

-

ui_abstract_clock.h

-

Declares the UIAbstractClock class that provides the functions related to clocks.

-

ui_abstract_progress.h

-

Defines the base class attributes and common functions of a progress bar.

-

ui_abstract_scroll.h

-

Declares the base class used to define the attributes of a scroll. The UIList, UIScrollView, and UISwipeView inherit from this class.

-

ui_analog_clock.h

-

Declares an analog clock.

-

ui_arc_label.h

-

Defines the attributes of an arc label.

-

ui_axis.h

-

Defines the attributes and functions of the x- and y-axises. This class is used in UIChart.

-

ui_box_progress.h

-

Defines the attributes and common functions of a linear progress bar.

-

ui_button.h

-

Defines the attributes and common functions of a button.

-

ui_canvas.h

-

Defines the attributes of the canvas component and provides functions for drawing rectangles, circles, and others.

-

ui_chart.h

-

Defines the attributes of the chart component and provides functions for adding and deleting data sets to display a chart.

-

ui_checkbox.h

-

Defines the attributes and common functions of a check box.

-

ui_circle_progress.h

-

Defines the attributes and common functions of a circular progress bar.

-

ui_dialog.h

-

Declares the UIDialog class that defines the dialog box component.

-

ui_digital_clock.h

-

Declares a digital clock.

-

ui_image_animator.h

-

Defines the attributes and functions of an image animator.

-

ui_image_view.h

-

Declares an image view.

-

ui_label.h

-

Declares a UILabel class that represents a label.

-

ui_label_button.h

-

Declares a label button.

-

ui_list.h

-

Declares a scrollable list in the vertical or horizontal direction. * This scrollable list can be used with the adapter AbstractAdapter to implement scrolling, inertial scrolling, automatic alignment, and invoking of a callback when a child view at the preset position is selected as this list scrolls. It is used when there is a large number of child views with a fixed format.

-

ui_picker.h

-

Defines the attributes and functions of the UIPicker class.

-

ui_radiobutton.h

-

Defines the attributes and common functions of a radio button.

-

ui_scroll_view.h

-

Declares a view group that allows its child views to be displayed as scroll events occur.

-

ui_slider.h

-

Defines the attributes and common functions of a slider.

-

ui_surface_view.h

-

Declares the surface view that interacts with the multimedia to achieve camera preview and video playback.

-

ui_swipe_view.h

-

Defines the attributes and common functions of a swipe view.

-

ui_texture_mapper.h

-

Defines the attributes and functions of a texture mapper.

-

ui_time_picker.h

-

Defines the attributes and functions of the UITimePicker class.

-

ui_toggle_button.h

-

Defines the attributes and common functions of a toggle button.

-

ui_view.h

-

Declares the base class of a view, providing basic view attributes and operations. All views are derived from this class.

-

ui_view_group.h

-

Declares a view group.

-

event_injector.h

-

Declares the function for simulating input events.

-

ui_dump_dom_tree.h

-

Declares a function for exporting information about a Document Object Model (DOM) tree or DOM node.

-

ui_screenshot.h

-

Declares the screenshot function.

-

aod_callback.h

-

Defines the callback for the touch event notification in screen-off mode.

-

cancel_event.h

-

Declares a cancel event, which usually occurs when the target view changes due to user sliding. For example, this event is triggered if you, after pressing a button, does not release the button but slides.

-

click_event.h

-

Declares a click event, which indicates that a finger is pressed on the screen and then lifted within 1 second.

-

drag_event.h

-

Declares a drag event, which indicates a certain movement (more than 10 pixels) after a view is pressed.

-

event.h

-

Declares the base class of a user input event and provides functions to record information such as the event position and timestamp.

-

key_event.h

-

Declares a key event, which indicates that a physical button is pressed or released.

-

long_press_event.h

-

Declares a long-press event, which indicates that the finger is not raised or moved within 1 second after a view is pressed.

-

press_event.h

-

Declares a touch event, which indicates that the touchscreen or mouse is pressed.

-

release_event.h

-

Declares a release event, which indicates that the touchscreen or mouse is released.

-

virtual_device_event.h

-

Declares a virtual device event, which is used to receive a customized input event and call back the listening function registered.

-

geometry2d.h

-

Defines attributes of 2D geometries (including points, lines, rectangles, and polygons) of the lightweight graphics system and provides functions for performing operations on the geometries.

-

graphic_assert.h

-

Declares the assertion utility for the graphics module.

-

graphic_config.h

-

Provides configuration items required for graphics.

-

graphic_math.h

-

Defines mathematical operation functions and types, including trigonometric functions, two-dimensional vectors, three-dimensional vectors, and matrices.

-

graphic_types.h

-

Defines the common data types for the graphics system.

-

heap_base.h

-

Declares the functions for overriding the new and delete functions.

-

image_info.h

-

Defines image information.

-

flex_layout.h

-

Declares a flexible layout container. You can perform simple adaptive layout on child views that the container holds, for example, to evenly arrange all child views in the same row or column.

-

grid_layout.h

-

Declares a grid layout container. You can perform simple grid layout on child views that the container holds.

-

layout.h

-

Declares the base class of the layout, which indicates the basic data types and operations that may be used in the layout.

-

list.h

-

Defines a linked list template class, which implements the data structure of bidirectional linked list and provides basic functions such as adding, deleting, inserting, clearing, popping up, and obtaining the size of the linked list.

-

mem_api.h

-

Defines the functions for memory application and release. You can implement the malloc and free functions to manage the memory.

-

rect.h

-

Defines a rectangle, including the position data of the four boundaries of the rectangle, and provides functions for rectangle inclusion, intersection, and aggregation.

-

style.h

-

Defines the attributes and common functions of style.

-

sys_info.h

-

Declares the system information about the graphics module, including the function to obtain the information about FPS, which needs to be enabled by the ENABLE_FPS_SUPPORT macro.

-

theme.h

-

Declares the base class used to define the functions related to the styles of different components.

-

theme_manager.h

-

Declares the singleton class used to manage the current screen theme of an application.

-

transform.h

-

Provides functions to transform components, points, and line segments, including rotation and scaling.

-

version.h

-

Declares the version number control for the graphics module. This file defines functions to obtain the version number and library description.

-
- -## Data Structures - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

OHOS::AnimatorCallback

-

Represents the animator callback.

-

OHOS::Animator

-

Represents an animator.

-

OHOS::AnimatorManager

-

Represents the animator manager.

-

OHOS::EasingEquation

-

Defines functions for specifying the velocity of an animation.

-

OHOS::Interpolation

-

Calculates the Bezier interpolation.

-

OHOS::Color16

-

Defines the color attribute when the color depth is 16.

-

OHOS::Color24

-

Defines the color attribute when the color depth is 24.

-

OHOS::Color32

-

Defines the color attribute when the color depth is 32.

-

OHOS::Color

-

Converts colors in different formats and defines common colors.

-

OHOS::Image

-

Represents basic image attributes, including the image type and path.

-

OHOS::Screen

-

Represents the screen info of the device.

-

OHOS::Task

-

Represents the Task class of the graphics module. This class provides functions for setting the running period and time of a task.

-

OHOS::Text

-

Represents the base class of Text, providing the text attribute setting and text drawing capabilities for components that require font display.

-

OHOS::AbstractAdapter

-

Defines the base class for adapters. You can derive AbstractAdapter based on actual requirements and use the GetView() and GetCount() functions to implement adapters of different data types. For details, see TextAdapter.

-

OHOS::RootView::OnKeyActListener

-

Represents the listener for monitoring physical key events.

-

OHOS::RootView::OnVirtualDeviceEventListener

-

Listens for the input events triggered by a virtual device other than human touching or physical pressing.

-

OHOS::RootView

-

Defines the functions related to a root view which contains its child views and represents the root node in a tree structure.

-

OHOS::TextFormatter

-

Defines a text formatter. You can inherit this class and implement the Format() function.

-

OHOS::TextAdapter

-

Defines a text adapter, which implements UILabel instance construction and supports text data and continuous integer data.

-

OHOS::UIAbstractClock

-

An abstract class that contains functions for converting units of time (hour, minute, and second), setting and obtaining the time.

-

OHOS::UIAbstractProgress

-

Represents the abstract base class which provides functions related to the progress bar.

-

OHOS::UIAbstractScroll

-

Defines the attributes of a scroll, including the scroll direction, blank size of a scroll view, velocity and effects of a scroll animation.

-

OHOS::UIAnalogClock::Hand

-

Defines the basic attributes of the analog clock hands. This is an inner class of UIAbstractClock.

-

OHOS::UIAnalogClock

-

Provides the functions related to an analog clock.

-

OHOS::UIArcLabel::ArcTextInfo

-

Stores the attribute information about this arc text to draw.

-

OHOS::UIArcLabel

-

Defines functions related to an arc label.

-

OHOS::UIAxis

-

Represents the coordinate axis base class, which defines the basic attributes of coordinate axis, sets whether a coordinate axis is visible, and sets the number of scales on a coordinate axis. This class is used in UIChart.

-

OHOS::UIXAxis

-

Defines the unique attributes and functions for the x-axis. This class is used in UIChart.

-

OHOS::UIYAxis

-

Defines the unique attributes and functions for the y-axis. This class is used in UIChart.

-

OHOS::UIBoxProgress

-

Represents a linear progress bar.

-

OHOS::UIButton

-

Represents a button.

-

OHOS::Paint

-

Defines the basic styles of graphs drawn on canvases.

-

OHOS::UICanvas::FontStyle

-

Defines the font style.

-

OHOS::UICanvas

-

Defines a canvas, which is used to draw multiple types of 2D graphs.

-

OHOS::UIChartDataSerial::PointStyle

-

Defines the style for the top, bottom, and frontmost points in a line chart.

-

OHOS::UIChartDataSerial

-

Defines a data set and provides functions such as adding and deleting data points.

-

OHOS::UIChart

-

Defines the chart class and provides functions such as adding and deleting data sets to display a chart.

-

OHOS::UIChartPillar

-

Provides special functions for implementing a bar chart.

-

OHOS::UIChartPolyline

-

Provides special functions for implementing a polyline.

-

OHOS::UICheckBox::OnChangeListener

-

Represents a listener for changes of a check box.

-

OHOS::UICheckBox

-

Represents a check box.

-

OHOS::UICircleProgress

-

Represents a circular progress bar.

-

OHOS::UIDialog

-

Represents a dialog box.

-

OHOS::UIDigitalClock

-

Displays time digitally.

-

OHOS::ImageAnimatorInfo

-

Provides information about the images.

-

OHOS::UIImageAnimatorView::AnimatorStopListener

-

Represents a listener that contains a callback to be invoked when this animator stops.

-

OHOS::UIImageAnimatorView

-

Represents an image animator.

-

OHOS::UIImageView

-

Defines the functions related to an image view.

-

OHOS::UILabel

-

Defines the functions for presenting a label in a specified area, setting the style and background color of a label, and setting the display mode of a long label text.

-

OHOS::UILabelButton

-

Provides the functions related to a label button.

-

OHOS::ListScrollListener

-

Represents a listener that contains a callback to be invoked when the scroll state changes or when a new child view is selected at the preset position as this list scrolls. The scroll state can be {} or SCROLL_STATE_MOVE}.

-

OHOS::UIList

-

Represents a scrollable list which is used with the adapter AbstractAdapter to implement scrolling, inertial scrolling, automatic alignment, and invoking of a callback when a child view is selected at the preset position as this list scrolls.

-

OHOS::UIPicker::SelectedListener

-

Defines the listener used by a picker. This listener is triggered when an item is selected after sliding stops.

-

OHOS::UIPicker

-

Defines a picker. Multiple texts or numbers can be put into a sliding list for selection. The selected text or numbers are highlighted.

-

OHOS::UIRadioButton

-

Represents a radio button.

-

OHOS::UIRepeatButton

-

Represents a repeat button.

-

OHOS::UIScrollView::OnScrollListener

-

Represents a listener that contains a callback to be invoked upon scroll state changes. The state can either be SCROLL_STATE_STOP or SCROLL_STATE_MOVE.

-

OHOS::UIScrollView

-

Supports horizontal or vertical scroll of child views. This class is inherited from UIAbstractScroll.

-

OHOS::UISlider::UISliderEventListener

-

Represents the listener for a slider change.

-

OHOS::UISlider

-

Represents a slider.

-

OHOS::UISurfaceView

-

Represents a surface view that interacts with the multimedia to achieve camera preview and video playback.

-

OHOS::UISwipeView::OnSwipeListener

-

Represents a listener for changes of the swipe view.

-

OHOS::UISwipeView

-

Represents a swipe view.

-

OHOS::UITextureMapper::AnimatorStopListener

-

Represents a listener that contains a callback to be invoked when this animator stops.

-

OHOS::UITextureMapper

-

Rotates and scales images.

-

OHOS::UITimePicker::SelectedListener

-

Defines the listener used by the time picker. This listener is triggered when an item is selected after sliding stops.

-

OHOS::UITimePicker

-

Defines the time picker. The time is in the format of "hour:minute" or "hour:minute:second". The selected time is highlighted.

-

OHOS::UIToggleButton

-

Represents a toggle button.

-

OHOS::UIView::OnClickListener

-

Defines a click event listener. You need to register this listener with the view to listen to click events.

-

OHOS::UIView::OnLongPressListener

-

Defines a long-press event listener. You need to register this listener with the view to listen to long-press events.

-

OHOS::UIView::OnDragListener

-

Defines a drag event listener. You need to register this listener with the view to listen to drag events.

-

OHOS::UIView::OnTouchListener

-

Defines a touch event listener. You need to register this listener with the view to listen to touch events.

-

OHOS::UIView

-

Defines the base class of a view, providing basic view attributes and operations. All views are derived from this class.

-

OHOS::UIViewGroup

-

Represents a view group that consists of its child views.

-

OHOS::UIDumpDomTree

-

Provides functions for exporting information about a specified DOM node or information about the DOM tree starting from a specified DOM node.

-

OHOS::CancelEvent

-

Defines a cancel event, which usually occurs when the target view changes due to user sliding. For example, this event is triggered if you, after pressing a button, does not release the button but slides.

-

OHOS::ClickEvent

-

Defines a click event, which indicates that a finger is pressed on the screen and then lifted within 1 second.

-

OHOS::DragEvent

-

Defines a drag event, which indicates a certain movement (more than 10 pixels) after a view is pressed.

-

OHOS::Event

-

Defines the base class of a user input event and provides functions to record information such as the event position and timestamp.

-

OHOS::KeyEvent

-

Defines a key event, which indicates that a physical button is pressed or released.

-

OHOS::LongPressEvent

-

Defines a long-press event, which indicates that the finger is not raised or moved within 1 second after a view is pressed.

-

OHOS::PressEvent

-

Defines a touch event, which indicates that the touchscreen or mouse is pressed.

-

OHOS::ReleaseEvent

-

Defines a release event, which indicates that the touchscreen or mouse is released.

-

OHOS::VirtualDeviceEvent

-

Defines a virtual device event, which is used to receive a customized input event and call back the listening function registered.

-

OHOS::Line

-

Defines a line, which consists of the start and end points.

-

OHOS::Polygon

-

Defines a polygon, including vertex coordinates and the maximum number of vertices (defined by MAX_VERTEX_NUM).

-

OHOS::Vector2< T >

-

Defines the two-dimensional vector, and provides basic mathematical operations such as vector assignment, scalar product, cross product, addition, and subtraction.

-

OHOS::Vector3< T >

-

Defines the 3-dimensional vector, and provides basic operators such as [] and ==.

-

OHOS::Matrix3< T >

-

Defines a 3 x 3 matrix.

-

OHOS::Point

-

Defines a point.

-

OHOS::HeapBase

-

Defines the base class, overriding the new and delete functions.

-

OHOS::ImageHeader

-

Defines image head node information.

-

OHOS::ImageInfo

-

Defines image information.

-

OHOS::FlexLayout

-

Defines a flexible layout container. You can perform simple adaptive layout on child views that the container holds, for example, to evenly arrange all child views in the same row or column.

-

OHOS::GridLayout

-

Defines a grid layout container. You can perform simple grid layout on child views that the container holds.

-

OHOS::Layout

-

Defines the base class of the layout, which indicates the basic data types and operations that may be used in the layout.

-

OHOS::ListNode< T >

-

Stores linked list data and contains pointers to the previous node and the next node.

-

OHOS::List< T >

-

Defines a linked list template class, which implements the data structure of bidirectional linked list and provides basic functions such as adding, deleting, inserting, clearing, popping up, and obtaining the size of the linked list.

-

OHOS::Rect

-

Defines a rectangle, including the position data of the four boundaries of the rectangle, and provides functions for rectangle inclusion, intersection, and aggregation.

-

OHOS::Style

-

Defines the basic attributes and functions of a style. You can use this class to set different styles.

-

OHOS::StyleDefault

-

Define some default style for UIView.

-

OHOS::SysInfo::OnFPSChangedListener

-

Called when the FPS changes.

-

OHOS::SysInfo

-

Obtains the system information. Currently, the FPS information can be obtained. To enable the FPS feature, enable the ENABLE_FPS_SUPPORT macro.

-

OHOS::ButtonStyle

-

Stores styles of a button in its different states.

-

OHOS::Theme

-

Defines the theme class used to define the functions related to the styles of different components.

-

OHOS::ThemeManager

-

Declares the singleton class used to manage the current screen theme of an application.

-

OHOS::TransformMap

-

Transforms a rectangle, including rotation and scaling.

-
- -## Macros - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

VERSION_STANDARD

-
 

ENABLE_DMA2D 0

-

DMA2D hardware acceleration, which does not take effect on other platforms.

-

ENABLE_DMA2D_TEXT 0

-

DMA2D hardware acceleration for font rendering, which does not take effect on other platforms.

-

ENABLE_ICU 0

-

Advanced algorithm for line breaks, which is disabled by default on other platforms.

-

ENABLE_WINDOW 1

-

Multi-window, which is enabled by default on other platforms.

-

ENABLE_FRAME_BUFFER 0

-

Display buffer for rendering data refresh, which is disabled by default on other platforms.

-

ENABLE_VECTOR_FONT 1

-

Vector type font,which is enabled by default on other platforms.

-

ENABLE_BUFFER_RGBA 1

-

Graphics bottom-layer RGBA, which is enabled by default.

-

ENABLE_HARDWARE_ACCELERATION 1

-

Graphics rendering hardware acceleration, which is enabled by default.

-

ENABLE_DEBUG 1

-

Debug mode, which is disabled by default.

-

ENABLE_MEMORY_HOOKS 0

-

Memory hook, which is enabled by default. The system memory allocation is taken over after it is enabled.

-

ENABLE_FPS_SUPPORT 0

-

Function for monitoring the image refresh frame rate, which is disabled by default.

-

ENABLE_ANTIALIAS 1

-

Anti-aliasing, which is enabled by default.

-

ENABLE_RECT_ANTIALIAS 0

-

Rectangle anti-aliasing, which is disabled by default.

-

ENABLE_SPEC_FONT 0

-

Font color mode, which is disabled by default. After it is enabled, the font color mode is set to 4 to accelerate font rendering.

-

ENABLE_GRAPHIC_LOG 0

-

Log function of a graphics subsystem, which is disabled by default.

-

ENABLE_AOD 0

-

Function for receiving input events in screen-off mode, which is disabled by default.

-

GRAPHIC_LOG_LEVEL 5

-

Defines the log level. A smaller value indicates a higher priority. Logs whose priorities are higher than a specified level can be recorded. Log levels: NONE: disabling logs FATAL: fatal level ERROR: error level WARN: warning level INFO: info level DEBUG: debugging level.

-

COLOR_DEPTH 32

-

Defines the color depth of graphics rendering. The default value is 32 bits. The value can be 16 or 32.

-

LAYER_PF_CODE 0

-

Represents the code number of the layer pixel format. 0: LAYER_PF_ARGB1555 1: LAYER_PF_ARGB8888 Other: LAYER_PF_ARGB8888.

-

DEFAULT_VECTOR_FONT_FILENAME "SourceHanSansSC-Regular.otf"

-

Defines the file name of default vector font.

-

MATH_MAX (a, b) ((a) > (b) ? (a) : (b))

-

Larger of a and b.

-

MATH_MIN (a, b) ((a) < (b) ? (a) : (b))

-

Smaller of a and b.

-

MATH_ABS (x) ((x) > 0 ? (x) : (-(x)))

-

Absolute value of x.

-

MATH_MINUS (a, b) ((a) < (b) ? ((b) - (a)) : ((a) - (b)))

-

Difference between a and b.

-
- -## Typedefs - - - - - - - - - - -

Typedef Name

-

Description

-

OHOS::EasingFunc) (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

typedef int16_t(*

-

Calculates the value for the current time of an animation.

-
- -## Enumerations - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

: uint8_t { OHOS::Animator::STOP, OHOS::Animator::START, OHOS::Animator::PAUSE, OHOS::Animator::RUNNING }

-

Enumerates the states of this animator.

-

{ OHOS::OPA_TRANSPARENT = 0, OHOS::OPA_OPAQUE = 255 }

-

Enumerates opacity values.

-

OHOS::UITextLanguageAlignment : uint8_t { OHOS::TEXT_ALIGNMENT_LEFT = 0, OHOS::TEXT_ALIGNMENT_RIGHT, OHOS::TEXT_ALIGNMENT_CENTER, OHOS::TEXT_ALIGNMENT_TOP, OHOS::TEXT_ALIGNMENT_BOTTOM }

-

Enumerates text alignment modes.

-

OHOS::UITextLanguageDirect : uint8_t { OHOS::TEXT_DIRECT_LTR = 0, OHOS::TEXT_DIRECT_RTL }

-

Enumerates text directions.

-

OHOS::UIAbstractClock::WorkMode { OHOS::UIAbstractClock::ALWAYS_ON, OHOS::UIAbstractClock::NORMAL }

-

Enumerates the working modes of this clock.

-

OHOS::UIAnalogClock::HandType { OHOS::UIAnalogClock::HandType::HOUR_HAND, OHOS::UIAnalogClock::HandType::MINUTE_HAND, OHOS::UIAnalogClock::HandType::SECOND_HAND }

-

Enumerates the clock hand types.

-

OHOS::UIAnalogClock::DrawType { OHOS::UIAnalogClock::DrawType::DRAW_LINE, OHOS::UIAnalogClock::DrawType::DRAW_IMAGE }

-

Enumerates the drawing types of a clock hand.

-

OHOS::UIArcLabel::TextOrientation : uint8_t { OHOS::UIArcLabel::TextOrientation::INSIDE, OHOS::UIArcLabel::TextOrientation::OUTSIDE }

-

Enumerates text orientations.

-

OHOS::UIBoxProgress::Direction : uint8_t { OHOS::UIBoxProgress::Direction::DIR_LEFT_TO_RIGHT, OHOS::UIBoxProgress::Direction::DIR_RIGHT_TO_LEFT, OHOS::UIBoxProgress::Direction::DIR_TOP_TO_BOTTOM, OHOS::UIBoxProgress::Direction::DIR_BOTTOM_TO_TOP }

-

Enumerates the directions of the progress bar.

-

OHOS::UIButton::ButtonImageSrc : uint8_t

-

Enumerates the images for different button states.

-

OHOS::UIButton::ButtonState : uint8_t

-

Enumerates the states of this button.

-

OHOS::Paint::PaintStyle { OHOS::Paint::STROKE_STYLE = 1, OHOS::Paint::FILL_STYLE, OHOS::Paint::STROKE_FILL_STYLE }

-

Enumerates paint styles of a closed graph. The styles are invalid for non-closed graphs.

-

OHOS::UICheckBox::UICheckBoxState : uint8_t

-

Enumerates the states of a check box.

-

OHOS::UIDialog::DialogButtonType { OHOS::UIDialog::DialogButtonType::BUTTON1, OHOS::UIDialog::DialogButtonType::BUTTON2, OHOS::UIDialog::DialogButtonType::BUTTON3 }

-

Enumerates buttons in a dialog box.

-

OHOS::UIDigitalClock::DisplayMode { OHOS::UIDigitalClock::DISPLAY_12_HOUR_NO_SECONDS, OHOS::UIDigitalClock::DISPLAY_24_HOUR_NO_SECONDS, OHOS::UIDigitalClock::DISPLAY_12_HOUR, OHOS::UIDigitalClock::DISPLAY_24_HOUR }

-

Enumerates the display modes of this digital clock.

-

OHOS::UIDigitalClock::TimeElement { OHOS::UIDigitalClock::HOUR_ELEMENT, OHOS::UIDigitalClock::MINUTE_ELEMENT, OHOS::UIDigitalClock::SECOND_ELEMENT }

-

Enumerates the time elements of this digital clock.

-

OHOS::UILabel::LineBreakMode : uint8_t { OHOS::UILabel::LINE_BREAK_ADAPT = 0, OHOS::UILabel::LINE_BREAK_STRETCH, OHOS::UILabel::LINE_BREAK_WRAP, OHOS::UILabel::LINE_BREAK_ELLIPSIS, OHOS::UILabel::LINE_BREAK_MARQUEE, OHOS::UILabel::LINE_BREAK_CLIP, OHOS::UILabel::LINE_BREAK_MAX }

-

Enumerates the display modes of a long text.

-

OHOS::VirtualDeviceEvent::DeviceType

-

Enumerates virtual device types.

-

OHOS::ColorMode : uint8_t { OHOS::ARGB8888 = 0, OHOS::RGB888, OHOS::RGB565, OHOS::ARGB1555, OHOS::ARGB4444, OHOS::AL44, OHOS::AL88, OHOS::L1, OHOS::L2, OHOS::L4, OHOS::L8, OHOS::A1, OHOS::A2, OHOS::A4, OHOS::A8, OHOS::UNKNOW }

-

colormode of image and font.

-

: uint8_t { OHOS::STYLE_BACKGROUND_COLOR, OHOS::STYLE_BACKGROUND_OPA, OHOS::STYLE_BORDER_RADIUS, OHOS::STYLE_BORDER_COLOR, OHOS::STYLE_BORDER_OPA, OHOS::STYLE_BORDER_WIDTH, OHOS::STYLE_PADDING_LEFT, OHOS::STYLE_PADDING_RIGHT, OHOS::STYLE_PADDING_TOP, OHOS::STYLE_PADDING_BOTTOM, OHOS::STYLE_MARGIN_LEFT, OHOS::STYLE_MARGIN_RIGHT, OHOS::STYLE_MARGIN_TOP, OHOS::STYLE_MARGIN_BOTTOM, OHOS::STYLE_IMAGE_OPA, OHOS::STYLE_TEXT_COLOR, OHOS::STYLE_TEXT_FONT, OHOS::STYLE_LETTER_SPACE, OHOS::STYLE_LINE_SPACE, OHOS::STYLE_TEXT_OPA, OHOS::STYLE_LINE_COLOR, OHOS::STYLE_LINE_WIDTH, OHOS::STYLE_LINE_OPA, OHOS::STYLE_LINE_CAP }

-

Enumerates keys of styles.

-

OHOS::CapType : uint8_t { OHOS::CAP_NONE, OHOS::CAP_ROUND }

-

Enumerates cap styles.

-

OHOS::SysInfo::FPSCalculateType { OHOS::SysInfo::FPS_CT_FIXED_TIME, OHOS::SysInfo::FPS_CT_AVERAGE_SAMPLING, OHOS::SysInfo::FPS_CT_PRECISE_SAMPLING }

-

Enumerates the FPS capture types.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

OHOS::AnimatorCallback::Callback (UIView *view)=0

-

virtual void

-

Called when each frame starts. This is a pure virtual function, which needs your inheritance and implementation.

-

OHOS::AnimatorCallback::OnStop (UIView &view)

-

virtual void

-

Called when an animator stops. This is a pure virtual function, which needs your inheritance and implementation.

-

OHOS::AnimatorCallback::~AnimatorCallback ()

-

virtual

-

A default destructor used to delete an AnimatorCallback instance.

-

OHOS::Animator::Animator ()

-

-

A default constructor used to create an Animator instance.

-

OHOS::Animator::Animator (AnimatorCallback *callback, UIView *view, uint32_t time, bool repeat)

-

-

A constructor used to create an Animator instance.

-

OHOS::Animator::~Animator ()

-

virtual

-

A destructor used to delete the Animator instance.

-

OHOS::Animator::Start ()

-

void

-

Starts this animator.

-

OHOS::Animator::Stop ()

-

void

-

Stops this animator.

-

OHOS::Animator::Pause ()

-

void

-

Pauses this animator.

-

OHOS::Animator::Resume ()

-

void

-

Resumes this animator from where it was paused.

-

OHOS::Animator::GetState () const

-

uint8_t

-

Obtains the current state of this animator.

-

OHOS::Animator::SetState (uint8_t state)

-

void

-

Sets the current state for this animator.

-

OHOS::Animator::GetTime () const

-

uint32_t

-

Obtains the total duration of this animator.

-

OHOS::Animator::SetTime (uint32_t time)

-

void

-

Sets the total duration for this animator.

-

OHOS::Animator::GetRunTime () const

-

uint32_t

-

Obtains the running time of this animator.

-

OHOS::Animator::SetRunTime (uint32_t runTime)

-

void

-

Sets the running time for this animator.

-

OHOS::Animator::IsRepeat () const

-

bool

-

Checks whether this animator is repeated.

-

OHOS::AnimatorManager::GetInstance ()

-

static AnimatorManager *

-

Obtains the AnimatorManager instance.

-

OHOS::AnimatorManager::Init () override

-

void

-

Initializes this task.

-

OHOS::AnimatorManager::Add (Animator *animator)

-

void

-

Adds the Animator instance to the AnimatorManager linked list for management, so that the Run function of the Animator class is called once for each frame.

-

OHOS::AnimatorManager::Remove (const Animator *animator)

-

void

-

Removes the Animator instance from the AnimatorManager linked list.

-

OHOS::AnimatorManager::Callback () override

-

void

-

Called when this task is executed.

-

OHOS::EasingEquation::SetBackOvershoot (double overshoot)

-

static void

-

Sets the parameter s in the equation (s+1)*t^3 - s*t^2 for a back easing.

-

OHOS::EasingEquation::BackEaseIn (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

static int16_t

-

Eases in with an overshoot.

-

OHOS::EasingEquation::BackEaseOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

static int16_t

-

Eases out with an overshoot.

-

OHOS::EasingEquation::BackEaseInOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

static int16_t

-

Eases in and then out with an overshoot.

-

OHOS::EasingEquation::CircEaseIn (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

static int16_t

-

Eases in shaping like a circular curve.

-

OHOS::EasingEquation::CircEaseOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

static int16_t

-

Eases out shaping like a circular curve.

-

OHOS::EasingEquation::CircEaseInOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

static int16_t

-

Eases in and then out shaping like a circular curve.

-

OHOS::EasingEquation::CubicEaseIn (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

static int16_t

-

Eases in shaping like a cubic curve.

-

OHOS::EasingEquation::CubicEaseOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

static int16_t

-

Eases out shaping like a cubic curve.

-

OHOS::EasingEquation::CubicEaseInOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

static int16_t

-

Eases in and then out shaping like a cubic curve.

-

OHOS::EasingEquation::LinearEaseNone (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

static int16_t

-

Displays no linear easing effects.

-

OHOS::EasingEquation::QuadEaseIn (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

static int16_t

-

Eases in shaping like a quadratic curve.

-

OHOS::EasingEquation::QuadEaseOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

static int16_t

-

Eases out shaping like a quadratic curve.

-

OHOS::EasingEquation::QuadEaseInOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

static int16_t

-

Eases in and then out shaping like a quadratic curve.

-

OHOS::EasingEquation::QuintEaseIn (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

static int16_t

-

Eases in shaping like a quintic curve.

-

OHOS::EasingEquation::QuintEaseOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

static int16_t

-

Eases out shaping like a quintic curve.

-

OHOS::EasingEquation::QuintEaseInOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

static int16_t

-

Eases in and then out shaping like a quintic curve.

-

OHOS::EasingEquation::SineEaseIn (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

static int16_t

-

Eases in shaping like a sinusoidal curve.

-

OHOS::EasingEquation::SineEaseOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

static int16_t

-

Eases out shaping like a sinusoidal curve.

-

OHOS::EasingEquation::SineEaseInOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

static int16_t

-

Eases in and then out shaping like a sinusoidal curve.

-

OHOS::Interpolation::GetBezierInterpolation (int16_t t, int16_t u0, int16_t u1, int16_t u2, int16_t u3)

-

static int16_t

-

Obtains the value calculated by the cubic Bezier equation.

-

OHOS::Color::GetMixColor (ColorType c1, ColorType c2, uint8_t mix)

-

static ColorType

-

Mixes two colors (color 1 and color 2) based on a specified opacity.

-

OHOS::Color::GetColorFromRGB (uint8_t r8, uint8_t g8, uint8_t b8)

-

static ColorType

-

Obtains the color based on the RGB color value.

-

OHOS::Color::GetColorFromRGBA (uint8_t r8, uint8_t g8, uint8_t b8, uint8_t alpha)

-

static ColorType

-

Obtains the color based on the RGBA color value.

-

OHOS::Color::ColorTo32 (ColorType color)

-

static uint32_t

-

Converts color data into the RGBA8888 format.

-

OHOS::Color::ColorTo32 (Color16 color, uint8_t alpha)

-

static uint32_t

-

Converts color data with the 16-bit color depth into the RGBA8888 format.

-

OHOS::Color::ColorTo16 (Color32 color)

-

static uint16_t

-

Converts color data from the RGBA8888 format into the RGB565 format.

-

OHOS::Color::White ()

-

static ColorType

-

Obtains the color data of white.

-

OHOS::Color::Silver ()

-

static ColorType

-

Obtains the color data of silver.

-

OHOS::Color::Gray ()

-

static ColorType

-

Obtains the color data of gray.

-

OHOS::Color::Black ()

-

static ColorType

-

Obtains the color data of black.

-

OHOS::Color::Red ()

-

static ColorType

-

Obtains the color data of red.

-

OHOS::Color::Maroon ()

-

static ColorType

-

Obtains the color data of maroon.

-

OHOS::Color::Yellow ()

-

static ColorType

-

Obtains the color data of yellow.

-

OHOS::Color::Olive ()

-

static ColorType

-

Obtains the color data of olive.

-

OHOS::Color::Lime ()

-

static ColorType

-

Obtains the color data of lime.

-

OHOS::Color::Green ()

-

static ColorType

-

Obtains the color data of green.

-

OHOS::Color::Cyan ()

-

static ColorType

-

Obtains the color data of cyan.

-

OHOS::Color::Aqua ()

-

static ColorType

-

Obtains the color data of aqua.

-

OHOS::Color::Teal ()

-

static ColorType

-

Obtains the color data of teal.

-

OHOS::Color::Blue ()

-

static ColorType

-

Obtains the color data of blue.

-

OHOS::Color::Navy ()

-

static ColorType

-

Obtains the color data of navy.

-

OHOS::Color::Magenta ()

-

static ColorType

-

Obtains the color data of magenta.

-

OHOS::Color::Purple ()

-

static ColorType

-

Obtains the color data of purple.

-

OHOS::Color::Orange ()

-

static ColorType

-

Obtains the color data of orange.

-

OHOS::Image::Image ()

-

-

A constructor used to create an Image instance. You can use this constructor when a component requires a map.

-

OHOS::Image::~Image ()

-

virtual

-

A destructor used to delete the Image instance.

-

OHOS::Image::GetImageInfo () const

-

const ImageInfo *

-

Obtains the image information in an array.

-

OHOS::Image::GetPath () const

-

const char *

-

Obtains the image path in binary.

-

OHOS::Image::GetHeader (ImageHeader &header) const

-

void

-

Obtains the basic image information, including the image format, width, and height.

-

OHOS::Image::GetSrcType () const

-

uint8_t

-

Obtains the image type.

-

OHOS::Image::SetSrc (const char *src)

-

bool

-

Sets the image path.

-

OHOS::Image::SetSrc (const ImageInfo *src)

-

bool

-

Sets the image information.

-

OHOS::Screen::GetInstance ()

-

static Screen &

-

Obtains a singleton Screen instance.

-

OHOS::Screen::GetWidth ()

-

uint16_t

-

Obtains the width of this screen.

-

OHOS::Screen::GetHeight ()

-

uint16_t

-

Obtains the height of this screen.

-

OHOS::Task::Task ()

-

-

A constructor used to create a Task instance.

-

OHOS::Task::Task (uint32_t period)

-

-

A constructor used to create a Task instance with the specified running period.

-

OHOS::Task::~Task ()

-

virtual

-

A destructor used to delete the Task instance.

-

OHOS::Task::SetPeriod (uint32_t period)

-

void

-

Sets the running period for this task.

-

OHOS::Task::SetLastRun (uint32_t lastRun)

-

void

-

Sets the end time for this task.

-

OHOS::Task::GetPeriod () const

-

uint32_t

-

Obtains the running period of this task.

-

OHOS::Task::GetLastRun () const

-

uint32_t

-

Obtains the end time of this task.

-

OHOS::Task::TaskExecute ()

-

void

-

Executes this task.

-

OHOS::Task::Callback ()=0

-

virtual void

-

Called when this task is executed.

-

OHOS::Task::Init ()

-

virtual void

-

Initializes this task.

-

OHOS::Text::Text ()

-

-

A constructor used to create a Text instance.

-

OHOS::Text::~Text ()

-

virtual

-

A destructor used to delete the Text instance.

-

OHOS::Text::SetText (const char *text)

-

void

-

Sets the content for this text.

-

OHOS::Text::GetText () const

-

const char *

-

Obtains the content of this text.

-

OHOS::Text::SetFont (const char *name, uint8_t size)

-

void

-

Sets the font name and size.

-

OHOS::Text::SetFontId (uint8_t fontId)

-

void

-

Sets the font ID.

-

OHOS::Text::GetFontId () const

-

uint8_t

-

Obtains the font ID.

-

OHOS::Text::SetDirect (UITextLanguageDirect direct)

-

void

-

Sets the direction for this text.

-

OHOS::Text::GetDirect () const

-

UITextLanguageDirect

-

Obtains the direction of this text.

-

OHOS::Text::SetAlign (UITextLanguageAlignment horizontalAlign, UITextLanguageAlignment verticalAlign=TEXT_ALIGNMENT_TOP)

-

void

-

Sets the alignment mode for this text.

-

OHOS::Text::GetHorAlign () const

-

UITextLanguageAlignment

-

Obtains the horizontal alignment mode.

-

OHOS::Text::GetVerAlign () const

-

UITextLanguageAlignment

-

Obtains the vertical alignment mode.

-

OHOS::Text::SetTextRotation (LabelRotateDegree angle)

-

void

-

Sets the clockwise rotation angle for this text.

-

OHOS::Text::GetTextRotation () const

-

LabelRotateDegree

-

Obtains the clockwise rotation degree of this text.

-

OHOS::Text::GetTextRotateDegree () const

-

uint16_t

-

Obtains the number of text rotation degrees.

-

OHOS::Text::GetTextSize () const

-

Point

-

Obtains the size of this text.

-

OHOS::Text::SetExpandWidth (bool expand)

-

void

-

Sets whether to adapt the component width to this text.

-

OHOS::Text::IsExpandWidth () const

-

bool

-

Checks whether the component width adapts to this text.

-

OHOS::Text::SetExpandHeight (bool expand)

-

void

-

Sets whether to adapt the component height to this text.

-

OHOS::Text::IsExpandHeight () const

-

bool

-

Checks whether the component height adapts to this text.

-

OHOS::Text::GetEllipsisIndex (const Rect &textRect, const Style &style)

-

uint16_t

-

Obtains the index of the character from where text will be replaced by ellipses based on the text rectangle and style.

-

OHOS::AbstractAdapter::AbstractAdapter ()

-

-

A constructor used to create an AbstractAdapter instance.

-

OHOS::AbstractAdapter::~AbstractAdapter ()

-

virtual

-

A destructor used to delete the AbstractAdapter instance.

-

OHOS::AbstractAdapter::GetCount ()=0

-

virtual uint16_t

-

Obtains the number of adapter data items.

-

OHOS::AbstractAdapter::GetView (UIView *inView, int16_t index)=0

-

virtual UIView *

-

Obtains a UIView instance to convert adapter data into another UIView instance.

-

OHOS::RootView::GetInstance ()

-

static RootView *

-

Obtains a singleton RootView instance.

-

OHOS::RootView::OnKeyActListener::OnKeyAct (UIView &view, const KeyEvent &event)=0

-

virtual bool

-

Responds to a physical key event.

-

OHOS::RootView::GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

OHOS::RootView::OnKeyEvent (const KeyEvent &event)

-

virtual void

-

Executes a physical key event.

-

OHOS::RootView::SetOnKeyActListener (OnKeyActListener *onKeyActListener)

-

void

-

Sets the listener that contains a callback to be invoked upon a physical key event.

-

OHOS::RootView::ClearOnKeyActListener ()

-

void

-

Clears the listener for monitoring physical key events.

-

OHOS::RootView::OnVirtualDeviceEventListener::OnVirtualDeviceEvent (UIView &view, VirtualDeviceEvent event)=0

-

virtual bool

-

Responds to an input event triggered by a virtual device.

-

OHOS::RootView::OnVirtualDeviceEvent (const VirtualDeviceEvent &event)

-

virtual void

-

Executes an input event triggered by a virtual device.

-

OHOS::RootView::SetOnVirtualDeviceEventListener (OnVirtualDeviceEventListener *onVirtualDeviceEventListener)

-

void

-

Sets a listener for monitoring the input events of a virtual device.

-

OHOS::RootView::ClearOnVirtualDeviceEventListener ()

-

void

-

Clears the listener for monitoring the input events of a virtual device.

-

OHOS::RootView::FindSubView (const UIView &parentView, const UIView *subView)

-

static bool

-

Checks whether the target view is one of the child views of the specified parent view.

-

OHOS::TextFormatter::Format (int16_t value, char *outText, uint16_t textLen)

-

virtual bool

-

Converts the input integer into a character string for output.

-

OHOS::TextAdapter::TextAdapter ()

-

-

A constructor used to create a UILabel instance.

-

OHOS::TextAdapter::~TextAdapter ()

-

virtual

-

A destructor used to delete the UILabel instance.

-

OHOS::TextAdapter::GetView (UIView *inView, int16_t index) override

-

UIView *

-

Obtains a UILabel instance to convert adapter data into another UILabel instance.

-

OHOS::TextAdapter::SetData (List< const char * > *data)

-

void

-

Sets the UILabel adapter data, which is a string linked list.

-

OHOS::TextAdapter::SetData (int16_t start, int16_t end)

-

void

-

Sets continuously increasing data. For example, if you need to set data 0, 1, 2, 3, 4, use this function to set start to 0 and end to 4.

-

OHOS::TextAdapter::SetFontId (uint8_t fontId)

-

void

-

Sets font ID.

-

OHOS::TextAdapter::GetFontId () const

-

uint8_t

-

Obtains font ID.

-

OHOS::TextAdapter::SetFont (const char *name, uint8_t size)

-

void

-

Sets the font.

-

OHOS::TextAdapter::GetStyle ()

-

Style &

-

Obtains the UILabel adapter style.

-

OHOS::TextAdapter::GetCount () override

-

virtual uint16_t

-

Obtains the data size of the UILabel adapter.

-

OHOS::TextAdapter::SetWidth (int16_t width)

-

void

-

Sets the width of UILabel constructed by the adapter.

-

OHOS::TextAdapter::SetDirect (UITextLanguageDirect direct)

-

void

-

Sets the direction of the UILabel constructed by the adapter.

-

OHOS::TextAdapter::SetHeight (int16_t height)

-

void

-

Sets the height of the UILabel constructed by the adapter.

-

OHOS::TextAdapter::SetLineBreakMode (const uint8_t lineBreakMode)

-

void

-

Sets the LineBreakMode attribute of UILabel constructed by the adapter. For details about the values of LineBreakMode, see LINE_BREAK_ADAPT, LINE_BREAK_WRAP, LINE_BREAK_ELLIPSIS, and LINE_BREAK_MARQUEE.

-

OHOS::TextAdapter::SetOnClickListener (UIView::OnClickListener *clickListener)

-

void

-

Sets the callback function to be invoked upon a click event.

-

OHOS::TextAdapter::SetTextFormatter (TextFormatter *formatter)

-

void

-

Sets the text formatter.

-

OHOS::UIAbstractClock::UIAbstractClock ()

-

-

A default constructor used to create a UIAbstractClock instance.

-

OHOS::UIAbstractClock::UIAbstractClock (uint8_t hour, uint8_t minute, uint8_t second)

-

-

A constructor used to create a UIAbstractClock instance with time elements (hour, minute and second).

-

OHOS::UIAbstractClock::~UIAbstractClock ()

-

virtual

-

A destructor used to delete the UIAbstractClock instance.

-

OHOS::UIAbstractClock::GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

OHOS::UIAbstractClock::SetTime24Hour (uint8_t hour, uint8_t minute, uint8_t second)

-

void

-

Sets the time in 24-hour format.

-

OHOS::UIAbstractClock::SetTime12Hour (uint8_t hour, uint8_t minute, uint8_t second, bool am)

-

void

-

Sets the time in 12-hour format.

-

OHOS::UIAbstractClock::GetCurrentHour () const

-

uint8_t

-

Obtains the current number of hours.

-

OHOS::UIAbstractClock::GetCurrentMinute () const

-

uint8_t

-

Obtains the current number of minutes.

-

OHOS::UIAbstractClock::GetCurrentSecond () const

-

uint8_t

-

Obtains the current number of seconds.

-

OHOS::UIAbstractClock::IncOneSecond ()

-

void

-

Increases the time by one second.

-

OHOS::UIAbstractClock::UpdateClock (bool clockInit)

-

virtual void

-

Updates this clock.

-

OHOS::UIAbstractClock::SetWorkMode (WorkMode newMode)

-

virtual void

-

Sets the working mode for this clock.

-

OHOS::UIAbstractClock::GetWorkMode () const

-

virtual WorkMode

-

Obtains the working mode of this clock.

-

OHOS::UIAbstractProgress::UIAbstractProgress ()

-

-

A constructor used to create a UIAbstractProgress instance.

-

OHOS::UIAbstractProgress::~UIAbstractProgress ()

-

virtual

-

A destructor used to delete the UIAbstractProgress instance.

-

OHOS::UIAbstractProgress::GetViewType () const override

-

UIViewType

-

Obtains the component type.

-

OHOS::UIAbstractProgress::EnableBackground (bool enable)

-

void

-

Sets whether the background of the progress bar is visible.

-

OHOS::UIAbstractProgress::SetValue (int16_t value)

-

void

-

Sets the current value for this progress bar.

-

OHOS::UIAbstractProgress::GetValue () const

-

int16_t

-

Obtains the current value of this progress bar.

-

OHOS::UIAbstractProgress::SetRange (int16_t rangeMax, int16_t rangeMin)

-

void

-

Sets the range for this progress bar.

-

OHOS::UIAbstractProgress::GetRangeMin () const

-

int16_t

-

Obtains the minimum value of this progress bar.

-

OHOS::UIAbstractProgress::GetRangeMax () const

-

int16_t

-

Obtains the maximum value of this progress bar.

-

OHOS::UIAbstractProgress::SetImage (const char *foregroundImage, const char *backgroundImage=nullptr)

-

void

-

Sets the image for this progress bar.

-

OHOS::UIAbstractProgress::SetImage (const ImageInfo *foregroundImage, const ImageInfo *backgroundImage=nullptr)

-

void

-

Sets the image as a pixel map for this progress bar.

-

OHOS::UIAbstractProgress::SetStep (uint16_t step)

-

void

-

Sets the step for this progress bar.

-

OHOS::UIAbstractProgress::GetStep () const

-

uint16_t

-

Obtains the current step of this progress bar.

-

OHOS::UIAbstractProgress::SetBackgroundStyle (const Style &style)

-

void

-

Sets the background style for this progress bar.

-

OHOS::UIAbstractProgress::SetBackgroundStyle (uint8_t key, int64_t value)

-

void

-

Sets a background style for this progress bar.

-

OHOS::UIAbstractProgress::GetBackgroundStyle () const

-

const Style &

-

Obtains the background style of this progress bar.

-

OHOS::UIAbstractProgress::GetBackgroundStyle (uint8_t key) const

-

int64_t

-

Obtains the value of a background style of this progress bar.

-

OHOS::UIAbstractProgress::SetForegroundStyle (const Style &style)

-

void

-

Sets the foreground style for this progress bar.

-

OHOS::UIAbstractProgress::SetForegroundStyle (uint8_t key, int64_t value)

-

void

-

Sets a foreground style for this progress bar.

-

OHOS::UIAbstractProgress::GetForegroundStyle () const

-

const Style &

-

Obtains the foreground style of this progress bar.

-

OHOS::UIAbstractProgress::GetForegroundStyle (uint8_t key) const

-

int64_t

-

Obtains the value of a foreground style of this progress bar.

-

OHOS::UIAbstractProgress::SetCapType (CapType cap)

-

void

-

Sets the type of caps on the background and foreground of the progress bar.

-

OHOS::UIAbstractScroll::UIAbstractScroll ()

-

-

A constructor used to create a UIAbstractScroll instance.

-

OHOS::UIAbstractScroll::~UIAbstractScroll ()

-

virtual

-

A destructor used to delete the UIAbstractScroll instance.

-

OHOS::UIAbstractScroll::GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

OHOS::UIAbstractScroll::GetDirection () const

-

uint8_t

-

Obtains the scroll direction.

-

OHOS::UIAbstractScroll::SetScrollBlankSize (uint16_t size)

-

void

-

Sets the blank size for this scroll view.

-

OHOS::UIAbstractScroll::SetMaxScrollDistance (uint16_t distance)

-

void

-

Sets the maximum scroll distance after a finger lifts the screen.

-

OHOS::UIAbstractScroll::SetReboundSize (uint16_t size)

-

void

-

Sets the rebound size, which is the distance a knob moves after being released when it reaches the end of a scrollbar.

-

OHOS::UIAbstractScroll::GetMaxScrollDistance () const

-

uint16_t

-

Obtains the maximum scroll distance after a finger lifts the screen.

-

OHOS::UIAbstractScroll::SetDragFunc (EasingFunc func)

-

void

-

Sets the easing function that specifies a scroll animation after a finger lifts the screen.

-

OHOS::UIAbstractScroll::SetThrowDrag (bool throwDrag)

-

void

-

Sets whether to continue scrolling after a finger lifts the screen.

-

OHOS::UIAbstractScroll::MoveChildByOffset (int16_t offsetX, int16_t offsetY) override

-

void

-

Moves the position of all child views.

-

OHOS::UIAbstractScroll::SetDragACCLevel (uint16_t value)

-

void

-

Sets the drag acceleration.

-

OHOS::UIAbstractScroll::GetDragACCLevel () const

-

uint8_t

-

Obtains the drag acceleration.

-

OHOS::UIAbstractScroll::SetSwipeACCLevel (uint16_t value)

-

void

-

Sets the compensation distance after a finger lifts the screen.

-

OHOS::UIAbstractScroll::GetSwipeACCLevel () const

-

uint8_t

-

Obtains the compensation distance after a finger lifts the screen.

-

OHOS::UIAnalogClock::UIAnalogClock ()

-

-

A default constructor used to create a UIAnalogClock instance.

-

OHOS::UIAnalogClock::~UIAnalogClock ()

-

virtual

-

A destructor used to delete the UIAnalogClock instance.

-

OHOS::UIAnalogClock::Hand::Hand ()

-

-

A default constructor used to create a Hand instance.

-

OHOS::UIAnalogClock::Hand::~Hand ()

-

virtual

-

A destructor used to delete the Hand instance.

-

OHOS::UIAnalogClock::GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

OHOS::UIAnalogClock::SetHandImage (HandType type, const UIImageView &img, Point position, Point center)

-

void

-

Sets the image used to draw a clock hand.

-

OHOS::UIAnalogClock::SetHandLine (HandType type, Point position, Point center, ColorType color, uint16_t width, uint16_t height, OpacityType opacity)

-

void

-

Sets the line used to draw a clock hand.

-

OHOS::UIAnalogClock::GetHandRotateCenter (HandType type) const

-

Point

-

Obtains the rotation center of a specified clock hand.

-

OHOS::UIAnalogClock::GetHandPosition (HandType type) const

-

Point

-

Obtains the position of a specified clock hand.

-

OHOS::UIAnalogClock::GetHandInitAngle (HandType type) const

-

uint16_t

-

Obtains the initial rotation angle of the specified clock hand.

-

OHOS::UIAnalogClock::GetHandCurrentAngle (HandType type) const

-

uint16_t

-

Obtains the current rotation angle of the specified clock hand.

-

OHOS::UIAnalogClock::SetInitTime24Hour (uint8_t hour, uint8_t minute, uint8_t second)

-

void

-

Sets the initial time in the 24-hour format.

-

OHOS::UIAnalogClock::SetInitTime12Hour (uint8_t hour, uint8_t minute, uint8_t second, bool am)

-

void

-

Sets the initial time in the 12-hour format.

-

OHOS::UIAnalogClock::OnDraw (const Rect &invalidatedArea) override

-

void

-

Draws an analog clock.

-

OHOS::UIAnalogClock::OnPostDraw (const Rect &invalidatedArea) override

-

virtual void

-

Performs the operations needed after the drawing.

-

OHOS::UIAnalogClock::SetPosition (int16_t x, int16_t y) override

-

void

-

Sets the position for this analog clock.

-

OHOS::UIAnalogClock::SetPosition (int16_t x, int16_t y, int16_t width, int16_t height) override

-

void

-

Sets the position and size for this analog clock.

-

OHOS::UIAnalogClock::SetWorkMode (WorkMode newMode) override

-

void

-

Sets the working mode for this analog clock.

-

OHOS::UIAnalogClock::UpdateClock (bool clockInit) override

-

void

-

Updates the time of this analog clock.

-

OHOS::UIArcLabel::UIArcLabel ()

-

-

A default constructor used to create a UIArcLabel instance.

-

OHOS::UIArcLabel::~UIArcLabel ()

-

virtual

-

A destructor used to delete the UIArcLabel instance.

-

OHOS::UIArcLabel::GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

OHOS::UIArcLabel::GetWidth () override

-

int16_t

-

Obtains the width of this arc text.

-

OHOS::UIArcLabel::GetHeight () override

-

int16_t

-

Obtains the height of this arc text.

-

OHOS::UIArcLabel::SetText (const char *text)

-

void

-

Sets the text content for this arc label.

-

OHOS::UIArcLabel::GetText () const

-

const char *

-

Obtains the text of this arc label.

-

OHOS::UIArcLabel::SetAlign (UITextLanguageAlignment horizontalAlign)

-

void

-

Sets the alignment mode for this text.

-

OHOS::UIArcLabel::GetHorAlign () const

-

UITextLanguageAlignment

-

Obtains the horizontal alignment mode.

-

OHOS::UIArcLabel::GetDirect ()

-

UITextLanguageDirect

-

Obtains the direction of this text.

-

OHOS::UIArcLabel::SetFontId (uint8_t fontId)

-

void

-

Sets the font ID for this arc label.

-

OHOS::UIArcLabel::GetFontId () const

-

uint8_t

-

Obtains the font ID composed of font name and size.

-

OHOS::UIArcLabel::SetFont (const char *name, uint8_t size)

-

void

-

Sets the font for this arc label.

-

OHOS::UIArcLabel::SetArcTextCenter (int16_t x, int16_t y)

-

void

-

Sets the center position for this arc text.

-

OHOS::UIArcLabel::GetArcTextCenter () const

-

Point

-

Obtains the center position of this arc text.

-

OHOS::UIArcLabel::SetArcTextRadius (uint16_t radius)

-

void

-

Sets the radius for this arc text.

-

OHOS::UIArcLabel::GetArcTextRadius () const

-

uint16_t

-

Obtains the radius of this arc text.

-

OHOS::UIArcLabel::SetArcTextAngle (int16_t startAngle, int16_t endAngle)

-

void

-

Sets the start angle and end angle for this arc text.

-

OHOS::UIArcLabel::GetArcTextStartAngle () const

-

int16_t

-

Obtains the start angle of this arc text.

-

OHOS::UIArcLabel::GetArcTextEndAngle () const

-

int16_t

-

Obtains the end angle of this arc text.

-

OHOS::UIArcLabel::SetArcTextOrientation (TextOrientation orientation)

-

void

-

Sets the orientation for this arc text.

-

OHOS::UIArcLabel::GetArcTextOrientation () const

-

TextOrientation

-

Obtains the orientation of this arc text.

-

OHOS::UIArcLabel::OnDraw (const Rect &invalidatedArea) override

-

virtual void

-

Draws an arc text.

-

OHOS::UIAxis::UIAxis ()

-

-

A constructor used to create a UIAxis instance.

-

OHOS::UIAxis::~UIAxis ()

-

virtual

-

A destructor used to delete the UIAxis instance.

-

OHOS::UIAxis::GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

OHOS::UIAxis::SetDataRange (uint16_t min, uint16_t max)=0

-

virtual bool

-

Sets the value range of a coordinate axis.

-

OHOS::UIAxis::SetMarkNum (uint16_t count)=0

-

virtual void

-

Sets the number of scales on a coordinate axis.

-

OHOS::UIAxis::SetLineColor (const ColorType &color)

-

void

-

Sets the line color of the coordinate axis.

-

OHOS::UIAxis::OnDraw (const Rect &invalidatedArea) override

-

void

-

Called when a view is drawn.

-

OHOS::UIAxis::OnPreDraw (const Rect &invalidatedArea) override

-

bool

-

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

-

OHOS::UIAxis::TranslateToPixel (int16_t &value)=0

-

virtual void

-

Translates data into pixel coordinates.

-

OHOS::UIXAxis::UIXAxis ()

-

-

A constructor used to create a UIXAxis instance.

-

OHOS::UIXAxis::~UIXAxis ()

-

virtual

-

A destructor used to delete the UIXAxis instance.

-

OHOS::UIXAxis::TranslateToPixel (int16_t &value) override

-

void

-

Translates data into the x coordinate of a pixel.

-

OHOS::UIXAxis::SetDataRange (uint16_t min, uint16_t max) override

-

bool

-

Sets the value range of the X axis.

-

OHOS::UIXAxis::SetMarkNum (uint16_t count) override

-

void

-

Sets the number of scales on the x-axis.

-

OHOS::UIYAxis::UIYAxis ()

-

-

A constructor used to create a UIYAxis instance.

-

OHOS::UIYAxis::~UIYAxis ()

-

virtual

-

A destructor used to delete the UIYAxis instance.

-

OHOS::UIYAxis::TranslateToPixel (int16_t &value) override

-

void

-

Translates data into the y coordinate of a pixel.

-

OHOS::UIYAxis::SetDataRange (uint16_t min, uint16_t max) override

-

bool

-

Sets the value range of the y-axis.

-

OHOS::UIYAxis::SetMarkNum (uint16_t count) override

-

void

-

Sets the number of scales on the Y axis.

-

OHOS::UIBoxProgress::UIBoxProgress ()

-

-

A constructor used to create a UIBoxProgress instance.

-

OHOS::UIBoxProgress::~UIBoxProgress ()

-

virtual

-

A destructor used to delete the UIBoxProgress instance.

-

OHOS::UIBoxProgress::GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

OHOS::UIBoxProgress::SetWidth (int16_t width) override

-

void

-

Sets the width for the view holding this progress bar.

-

OHOS::UIBoxProgress::SetHeight (int16_t height) override

-

void

-

Sets the height for this view.

-

OHOS::UIBoxProgress::SetDirection (const Direction &direction)

-

void

-

Sets the direction for this progress bar.

-

OHOS::UIBoxProgress::GetDirection () const

-

Direction

-

Obtains the direction of this progress bar.

-

OHOS::UIBoxProgress::SetValidWidth (int16_t width)

-

void

-

Sets the actual width for this progress bar.

-

OHOS::UIBoxProgress::GetValidWidth () const

-

int16_t

-

Obtains the actual width of this progress bar.

-

OHOS::UIBoxProgress::SetValidHeight (int16_t height)

-

void

-

Sets the actual height for this progress bar.

-

OHOS::UIBoxProgress::GetValidHeight () const

-

int16_t

-

Obtains the actual height of this progress bar.

-

OHOS::UIBoxProgress::OnDraw (const Rect &invalidatedArea) override

-

void

-

Called when a view is drawn.

-

OHOS::UIButton::UIButton ()

-

-

A constructor used to create a UIButton instance.

-

OHOS::UIButton::UIButton (const char *id)

-

-

A constructor used to create a UIButton instance based on the button ID.

-

OHOS::UIButton::~UIButton ()

-

virtual

-

A destructor used to delete the UIButton instance.

-

OHOS::UIButton::GetViewType () const override

-

UIViewType

-

Obtains the component type.

-

OHOS::UIButton::OnPreDraw (const Rect &invalidatedArea) override

-

bool

-

Do something before draw, this function will be invoked mainly to check if this view need to cover invalidate area so render manager can decide which layer to draw firstly.

-

OHOS::UIButton::OnDraw (const Rect &invalidatedArea) override

-

void

-

Executes the draw action.

-

OHOS::UIButton::OnPressEvent (const PressEvent &event) override

-

void

-

Executes the press event action.

-

OHOS::UIButton::OnReleaseEvent (const ReleaseEvent &event) override

-

void

-

Executes the press release event action.

-

OHOS::UIButton::OnCancelEvent (const CancelEvent &event) override

-

void

-

Executes the cancel event action.

-

OHOS::UIButton::SetImageSrc (const char *defaultImgSrc, const char *triggeredImgSrc)

-

void

-

Sets the image for this button.

-

OHOS::UIButton::SetImageSrc (const ImageInfo *defaultImgSrc, const ImageInfo *triggeredImgSrc)

-

void

-

Sets the image for this button.

-

OHOS::UIButton::SetImagePosition (const int16_t x, const int16_t y)

-

void

-

Sets the position for this image.

-

OHOS::UIButton::GetImageX () const

-

int16_t

-

Obtains the x-coordinate of this image.

-

OHOS::UIButton::GetImageY () const

-

int16_t

-

Obtains the y-coordinate of this image.

-

OHOS::UIButton::GetCurImageSrc () const

-

const Image *

-

Obtains the image for the current button state.

-

OHOS::UIButton::GetWidth () override

-

int16_t

-

Obtains the width of this image.

-

OHOS::UIButton::GetHeight () override

-

int16_t

-

Obtains the height of this image.

-

OHOS::UIButton::SetWidth (int16_t width) override

-

void

-

Sets the width for this image.

-

OHOS::UIButton::SetHeight (int16_t height) override

-

void

-

Sets the height for this image.

-

OHOS::UIButton::GetContentRect () override

-

virtual Rect

-

Obtains a rectangular area that contains coordinate information.

-

OHOS::UIButton::GetStyle (uint8_t key) const override

-

int64_t

-

Obtains the value of a style.

-

OHOS::UIButton::SetStyle (uint8_t key, int64_t value) override

-

void

-

Sets a style.

-

OHOS::UIButton::GetStyleForState (uint8_t key, ButtonState state) const

-

int64_t

-

Obtains the style of a button in a specific state.

-

OHOS::UIButton::SetStyleForState (uint8_t key, int64_t value, ButtonState state)

-

void

-

Sets the style for a button in a specific state.

-

OHOS::UIButton::Disable ()

-

void

-

Disables this button.

-

OHOS::UIButton::Enable ()

-

void

-

Enables this button.

-

OHOS::UIButton::SetStateForStyle (ButtonState state)

-

void

-

Sets the state for a button. After the setting, calling SetStyle will change the style of this button, but not its state.

-

OHOS::Paint::Paint ()

-

-

A constructor used to create a Paint instance.

-

OHOS::Paint::~Paint ()

-

virtual

-

A destructor used to delete the Paint instance.

-

OHOS::Paint::SetStyle (PaintStyle style)

-

void

-

Sets the paint style of a closed graph.

-

OHOS::Paint::GetStyle () const

-

PaintStyle

-

Obtains the paint style of a closed graph.

-

OHOS::Paint::SetStrokeWidth (uint16_t width)

-

void

-

Sets the width of a line or border.

-

OHOS::Paint::GetStrokeWidth () const

-

uint16_t

-

Obtains the width of a line or border.

-

OHOS::Paint::SetStrokeColor (ColorType color)

-

void

-

Sets the color of a line or border.

-

OHOS::Paint::GetStrokeColor () const

-

ColorType

-

Obtains the color of a line or border.

-

OHOS::Paint::SetFillColor (ColorType color)

-

void

-

Sets fill color.

-

OHOS::Paint::GetFillColor () const

-

ColorType

-

Obtains the fill color.

-

OHOS::Paint::SetOpacity (uint8_t opacity)

-

void

-

Sets the opacity.

-

OHOS::Paint::GetOpacity () const

-

uint8_t

-

Obtains the opacity.

-

OHOS::UICanvas::UICanvas ()

-

-

A constructor used to create a UICanvas instance.

-

OHOS::UICanvas::~UICanvas ()

-

virtual

-

A destructor used to delete the UICanvas instance.

-

OHOS::UICanvas::GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

OHOS::UICanvas::Clear ()

-

void

-

Clears the entire canvas.

-

OHOS::UICanvas::SetStartPosition (const Point &startPoint)

-

void

-

Sets the coordinates of the start point for drawing a line. For example, if startPoint is set to {50, 50}, the line is drawn from this set of coordinates on the canvas.

-

OHOS::UICanvas::GetStartPosition () const

-

const Point &

-

Obtains the coordinates of the start point of a line.

-

OHOS::UICanvas::DrawLine (const Point &endPoint, const Paint &paint)

-

void

-

Draws a straight line.

-

OHOS::UICanvas::DrawLine (const Point &startPoint, const Point &endPoint, const Paint &paint)

-

void

-

Draws a straight line from the coordinates of the start point.

-

OHOS::UICanvas::DrawCurve (const Point &control1, const Point &control2, const Point &endPoint, const Paint &paint)

-

void

-

Draws a cubic Bezier curve.

-

OHOS::UICanvas::DrawCurve (const Point &startPoint, const Point &control1, const Point &control2, const Point &endPoint, const Paint &paint)

-

void

-

Draws a cubic Bezier curve from the start point coordinates.

-

OHOS::UICanvas::DrawRect (const Point &startPoint, int16_t height, int16_t width, const Paint &paint)

-

void

-

Draws a rectangle.

-

OHOS::UICanvas::DrawCircle (const Point &center, uint16_t radius, const Paint &paint)

-

void

-

Draws a circle.

-

OHOS::UICanvas::DrawSector (const Point &center, uint16_t radius, int16_t startAngle, int16_t endAngle, const Paint &paint)

-

void

-

Draws a sector.

-

OHOS::UICanvas::DrawArc (const Point &center, uint16_t radius, int16_t startAngle, int16_t endAngle, const Paint &paint)

-

void

-

Draws an arc.

-

OHOS::UICanvas::DrawImage (const Point &startPoint, const char *image, const Paint &paint)

-

void

-

Draws an image.

-

OHOS::UICanvas::DrawLabel (const Point &startPoint, const char *text, uint16_t maxWidth, const FontStyle &fontStyle, const Paint &paint)

-

void

-

Draws text.

-

OHOS::UICanvas::OnDraw (const Rect &invalidatedArea) override

-

virtual void

-

Called when a view is drawn.

-

OHOS::UIChartDataSerial::UIChartDataSerial ()

-

-

A constructor used to create a UIChartDataSerial instance.

-

OHOS::UIChartDataSerial::~UIChartDataSerial ()

-

virtual

-

A destructor used to delete the UIChartDataSerial instance.

-

OHOS::UIChartDataSerial::SetMaxDataCount (uint16_t maxCount)

-

bool

-

Sets the maximum number of data points that can be stored in a data set.

-

OHOS::UIChartDataSerial::ModifyPoint (uint16_t index, const Point &point)

-

bool

-

Modifies the value of a data point in the data set.

-

OHOS::UIChartDataSerial::GetPoint (uint16_t index, Point &point)

-

bool

-

Obtains the coordinates in the chart for a data point in the data set.

-

OHOS::UIChartDataSerial::AddPoints (const Point *data, uint16_t count)

-

bool

-

Adds data points.

-

OHOS::UIChartDataSerial::ClearData ()

-

void

-

Clears all data points.

-

OHOS::UIChartDataSerial::GetDataCount () const

-

uint16_t

-

Obtains the number of data points available in the data set.

-

OHOS::UIChartDataSerial::EnableSmooth (bool smooth)

-

void

-

Sets whether to smooth a polyline.

-

OHOS::UIChartDataSerial::IsSmooth () const

-

bool

-

Checks whether smoothing is performed on a polyline.

-

OHOS::UIChartDataSerial::EnableGradient (bool enable)

-

void

-

Enables the fill color of a line chart.

-

OHOS::UIChartDataSerial::IsGradient () const

-

bool

-

Checks whether a polyline has a fill color.

-

OHOS::UIChartDataSerial::GetPeakIndex () const

-

uint16_t

-

Obtains the index of the top point in the data set.

-

OHOS::UIChartDataSerial::GetLatestIndex () const

-

uint16_t

-

Obtains the index of the frontmost point (the latest added or modified data point in a data set).

-

OHOS::UIChartDataSerial::GetValleyIndex () const

-

uint16_t

-

Obtains the index of the bottom point in a data set.

-

OHOS::UIChartDataSerial::GetPeakData () const

-

int16_t

-

Obtains the Y value of the top point in a data set.

-

OHOS::UIChartDataSerial::GetValleyData () const

-

int16_t

-

Obtains the Y value of the bottom point in a data set.

-

OHOS::UIChartDataSerial::GetLineColor () const

-

ColorType

-

Obtains the polyline color of the data set in a line chart.

-

OHOS::UIChartDataSerial::GetFillColor () const

-

ColorType

-

Obtains the fill color of the data set.

-

OHOS::UIChartDataSerial::SetFillColor (const ColorType &color)

-

void

-

Sets the fill color of the data set.

-

OHOS::UIChartDataSerial::SetLineColor (const ColorType &color)

-

void

-

Sets the polyline color of the data set in the line chart.

-

OHOS::UIChartDataSerial::HidePoint (uint16_t index, uint16_t count)

-

void

-

Hides some points in the data set.

-

OHOS::UIChartDataSerial::GetHideIndex () const

-

uint16_t

-

Obtains the index from which the data set starts to hide.

-

OHOS::UIChartDataSerial::GetHideCount () const

-

uint16_t

-

Obtains the number of hidden points in the data set.

-

OHOS::UIChartDataSerial::SetHeadPointStyle (const PointStyle &style)

-

void

-

Sets the style of the frontmost point on a polyline.

-

OHOS::UIChartDataSerial::SetTopPointStyle (const PointStyle &style)

-

void

-

Sets the style of the top point of a polyline.

-

OHOS::UIChartDataSerial::SetBottomPointStyle (const PointStyle &style)

-

void

-

Sets the style of the bottom point of a polyline.

-

OHOS::UIChartDataSerial::GetHeadPointStyle () const

-

const PointStyle &

-

Obtains the style of the frontmost point on a polyline.

-

OHOS::UIChartDataSerial::GetTopPointStyle () const

-

const PointStyle &

-

Obtains the style of the top point of a polyline.

-

OHOS::UIChartDataSerial::GetBottomPointStyle () const

-

const PointStyle &

-

Obtains the style of the bottom point of a polyline.

-

OHOS::UIChartDataSerial::EnableHeadPoint (bool enable)

-

void

-

Enables the feature of drawing the frontmost point on a polyline.

-

OHOS::UIChartDataSerial::EnableTopPoint (bool enable)

-

void

-

Enables the feature of drawing the top point of a polyline. If there are multiple top points, only the first one is drawn.

-

OHOS::UIChartDataSerial::EnableBottomPoint (bool enable)

-

void

-

Enables the feature of drawing the bottom point of a polyline. If there are multiple bottom points, only the first one is drawn.

-

OHOS::UIChart::UIChart ()

-

-

A constructor used to create a UIChart instance.

-

OHOS::UIChart::~UIChart ()

-

virtual

-

A destructor used to delete the UIChart instance.

-

OHOS::UIChart::GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

OHOS::UIChart::SetHeight (int16_t height) override

-

void

-

Sets the height for this component.

-

OHOS::UIChart::SetWidth (int16_t width) override

-

void

-

Sets the width for this component.

-

OHOS::UIChart::OnPreDraw (const Rect &invalidatedArea) override

-

bool

-

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

-

OHOS::UIChart::OnDraw (const Rect &invalidatedArea) override

-

void

-

Called when a view is drawn.

-

OHOS::UIChart::AddDataSerial (UIChartDataSerial *dataSerial)

-

virtual bool

-

Adds a data set.

-

OHOS::UIChart::DeleteDataSerial (UIChartDataSerial *dataSerial)

-

virtual bool

-

Deletes a data set.

-

OHOS::UIChart::ClearDataSerial ()

-

virtual void

-

Clears all data sets.

-

OHOS::UIChart::RefreshChart ()=0

-

virtual void

-

Refreshes a chart and redraws the dirty region.

-

OHOS::UIChart::GetXAxis ()

-

UIXAxis &

-

Obtains the x-axis instance.

-

OHOS::UIChart::GetYAxis ()

-

UIYAxis &

-

Obtains the y-axis instance.

-

OHOS::UIChart::EnableReverse (bool enable)

-

void

-

Enables chart reverse.

-

OHOS::UIChartPillar::UIChartPillar ()

-

-

A constructor used to create a UIChartPillar instance.

-

OHOS::UIChartPillar::~UIChartPillar ()

-

virtual

-

A destructor used to delete the UIChartPillar instance.

-

OHOS::UIChartPillar::RefreshChart () override

-

void

-

Refreshes a bar chart and redraws the dirty region.

-

OHOS::UIChartPolyline::UIChartPolyline ()

-

-

A constructor used to create a UIChartPolyline instance.

-

OHOS::UIChartPolyline::~UIChartPolyline ()

-

virtual

-

A destructor used to delete the UIChartPolyline instance.

-

OHOS::UIChartPolyline::RefreshChart () override

-

void

-

Refreshes a line chart and redraws the dirty region.

-

OHOS::UIChartPolyline::SetGradientOpacity (uint8_t minOpa, uint8_t maxOpa)

-

void

-

Sets the opacity range of the fill color gradient.

-

OHOS::UIChartPolyline::SetGradientBottom (uint16_t bottom)

-

void

-

Sets the distance between the bottom edge of the fill color range and the x-axis.

-

OHOS::UICheckBox::UICheckBox ()

-

-

A constructor used to create a UICheckBox instance.

-

OHOS::UICheckBox::~UICheckBox ()

-

virtual

-

A destructor used to delete the UICheckBox instance.

-

OHOS::UICheckBox::OnChangeListener::OnChange (UICheckBoxState state)=0

-

virtual bool

-

Called when the state of this check box is switched. This is a virtual function, which needs your implementation.

-

OHOS::UICheckBox::OnChangeListener::~OnChangeListener ()

-

virtual

-

A destructor used to delete the OnChangeListener instance.

-

OHOS::UICheckBox::GetViewType () const override

-

UIViewType

-

Obtains the component type.

-

OHOS::UICheckBox::SetOnChangeListener (OnChangeListener *onStateChangeListener)

-

void

-

Sets the listener for this check box.

-

OHOS::UICheckBox::OnPreDraw (const Rect &invalidatedArea) override

-

bool

-

Do something before draw, this function will be invoked mainly to check if this view need to cover invalidate area so render manager can decide which layer to draw firstly.

-

OHOS::UICheckBox::OnDraw (const Rect &invalidatedArea) override

-

void

-

Executes the draw action Ondraw invokes the rendering function provided by the underlying layer to draw pictures based on the selected status of the checkbox.

-

OHOS::UICheckBox::OnClickEvent (const ClickEvent &event) override

-

void

-

Executes the click event action OnClickEvent will reverse the selected state of checkbox. Example: If the check box is selected, the checkbox status is changed to Unselected after the click action is taken.

-

OHOS::UICheckBox::SetImages (const char *selectedImageSrc, const char *unselectedImageSrc)

-

virtual void

-

Sets the images for this check box.

-

OHOS::UICheckBox::SetImages (const ImageInfo *selectedImageSrc, const ImageInfo *unselectedImageSrc)

-

virtual void

-

Sets the images for this check box.

-

OHOS::UICheckBox::GetState () const

-

UICheckBoxState

-

Obtains the state of this check box.

-

OHOS::UICheckBox::SetState (UICheckBoxState state)

-

void

-

Sets the state for this check box.

-

OHOS::UICircleProgress::UICircleProgress ()

-

-

A constructor used to create a UICircleProgress instance.

-

OHOS::UICircleProgress::~UICircleProgress ()

-

virtual

-

A destructor used to delete the UICircleProgress instance.

-

OHOS::UICircleProgress::GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

OHOS::UICircleProgress::OnPreDraw (const Rect &invalidatedArea) override

-

bool

-

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

-

OHOS::UICircleProgress::OnDraw (const Rect &invalidatedArea) override

-

void

-

Called when a view is drawn.

-

OHOS::UICircleProgress::SetCenterPosition (int16_t x, int16_t y)

-

void

-

Sets the coordinates of the center point for this circular progress bar.

-

OHOS::UICircleProgress::GetCenterPosition () const

-

Point

-

Obtains the coordinates of the center point for this circular progress bar.

-

OHOS::UICircleProgress::SetRadius (uint16_t radius)

-

void

-

Sets the outer radius for this circular progress bar.

-

OHOS::UICircleProgress::GetRadius () const

-

uint16_t

-

Obtains the outer radius of this circular progress bar.

-

OHOS::UICircleProgress::SetStartAngle (int16_t startAngle)

-

void

-

Sets the start angle.

-

OHOS::UICircleProgress::GetStartAngle () const

-

int16_t

-

Obtains the start angle.

-

OHOS::UICircleProgress::SetEndAngle (int16_t endAngle)

-

void

-

Sets the end angle.

-

OHOS::UICircleProgress::GetEndAngle () const

-

int16_t

-

Obtains the end angle.

-

OHOS::UICircleProgress::SetProgressImagePosition (int16_t x, int16_t y)

-

void

-

Sets the coordinates of the foreground image for this progress bar relative to the view.

-

OHOS::UICircleProgress::SetBackgroundImagePosition (int16_t x, int16_t y)

-

void

-

Sets the coordinates of the background image for this progress bar relative to the view.

-

OHOS::UICircleProgress::SetLineColor (ColorType color)

-

void

-

Sets the foreground color for this progress bar.

-

OHOS::UIDialog::UIDialog ()

-

-

A constructor used to create a UIDialog instance.

-

OHOS::UIDialog::~UIDialog ()

-

virtual

-

A destructor used to delete the UIDialog instance.

-

OHOS::UIDialog::GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

OHOS::UIDialog::SetTitle (const char *title)

-

void

-

Sets the title for this dialog box.

-

OHOS::UIDialog::SetText (const char *text)

-

void

-

Sets the text for this dialog box.

-

OHOS::UIDialog::OnPreDraw (const Rect &invalidatedArea) override

-

bool

-

Checks whether this label needs to be covered before drawing it.

-

OHOS::UIDialog::SetButton (DialogButtonType buttonType, const char *text, OnClickListener *listener)

-

void

-

Sets a button for this dialog box.

-

OHOS::UIDialog::SetVisible (bool visible) override

-

void

-

Sets whether a dialog box is visible.

-

OHOS::UIDigitalClock::UIDigitalClock ()

-

-

A default constructor used to create a UIDigitalClock instance.

-

OHOS::UIDigitalClock::~UIDigitalClock ()

-

virtual

-

A destructor used to delete the UIDigitalClock instance.

-

OHOS::UIDigitalClock::GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

OHOS::UIDigitalClock::SetFontId (uint8_t fontId)

-

void

-

Sets the dynamic font ID for this digital clock.

-

OHOS::UIDigitalClock::SetFont (const char *name, uint8_t size)

-

void

-

Sets the dynamic font for this digital clock.

-

OHOS::UIDigitalClock::SetColor (ColorType color)

-

void

-

Sets the font color for this digital clock.

-

OHOS::UIDigitalClock::SetDisplayMode (DisplayMode dm)

-

void

-

Sets the display mode for this digital clock.

-

OHOS::UIDigitalClock::GetDisplayMode () const

-

DisplayMode

-

Obtains the display mode of this digital clock.

-

OHOS::UIDigitalClock::DisplayLeadingZero (bool displayLeadingZero)

-

void

-

Sets whether to add 0 before the hour of this digital clock.

-

OHOS::UIDigitalClock::SetOpacity (uint8_t opacity)

-

void

-

Sets the opacity for this digital clock.

-

OHOS::UIDigitalClock::GetOpacity () const

-

uint8_t

-

Obtains the opacity of this digital clock.

-

OHOS::UIDigitalClock::UpdateClock (bool clockInit) override

-

void

-

Updates this digital clock.

-

OHOS::UIImageAnimatorView::UIImageAnimatorView ()

-

-

A constructor used to create a UIImageAnimatorView instance.

-

OHOS::UIImageAnimatorView::~UIImageAnimatorView ()

-

virtual

-

A destructor used to delete the UIImageAnimatorView instance.

-

OHOS::UIImageAnimatorView::GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

OHOS::UIImageAnimatorView::SetImageAnimatorSrc (const char *imageSrc, uint8_t imageNum, uint16_t timeOfUpdate)

-

void

-

Sets the images and speed for this animator.

-

OHOS::UIImageAnimatorView::SetImageAnimatorSrc (const char *imageSrc, uint8_t imageNum)

-

void

-

Sets the images for this animator.

-

OHOS::UIImageAnimatorView::SetTimeOfUpdate (uint16_t timeOfUpdate)

-

void

-

Sets the speed for this animator.

-

OHOS::UIImageAnimatorView::GetTimeOfUpdate () const

-

uint16_t

-

Obtains the speed of this animator.

-

OHOS::UIImageAnimatorView::SetTimeOfPause (uint16_t timeOfPause)

-

void

-

Sets the interval between two playbacks of an infinitely repeated animator.

-

OHOS::UIImageAnimatorView::GetTimeOfPause () const

-

uint16_t

-

Obtains the interval between two playbacks of an infinitely repeated animator.

-

OHOS::UIImageAnimatorView::GetImageAnimatorSrc () const

-

const ImageAnimatorInfo *

-

Obtains the image array of this frame animator.

-

OHOS::UIImageAnimatorView::GetImageAnimatorImageNum () const

-

uint8_t

-

Obtains the number of images.

-

OHOS::UIImageAnimatorView::SetSizeFixed (bool fixed)

-

void

-

Sets whether the image size is fixed to the view size.

-

OHOS::UIImageAnimatorView::IsSizeFixed () const

-

bool

-

Checks whether the image size is fixed to the view size.

-

OHOS::UIImageAnimatorView::SetRepeat (bool repeat)

-

void

-

Sets whether to play this animator for infinite times.

-

OHOS::UIImageAnimatorView::IsRepeat () const

-

bool

-

Checks whether this animator is played for infinite times.

-

OHOS::UIImageAnimatorView::SetRepeatTimes (uint32_t times)

-

void

-

Sets the playback times for this animator.

-

OHOS::UIImageAnimatorView::GetRepeatTimes () const

-

uint32_t

-

Obtains the playback times.

-

OHOS::UIImageAnimatorView::GetState () const

-

uint8_t

-

Obtains the current state of this animator.

-

OHOS::UIImageAnimatorView::SetReverse (bool reverse)

-

void

-

Sets the playback sequence for this animator.

-

OHOS::UIImageAnimatorView::IsReverse () const

-

bool

-

Obtains the playback sequence of this animator.

-

OHOS::UIImageAnimatorView::Start ()

-

void

-

Starts this animator.

-

OHOS::UIImageAnimatorView::Stop (bool needReset=true)

-

void

-

Stops this animator.

-

OHOS::UIImageAnimatorView::Pause ()

-

void

-

Pauses this animator at the current image.

-

OHOS::UIImageAnimatorView::Resume ()

-

void

-

Resumes this animator from the current image.

-

OHOS::UIImageAnimatorView::AnimatorStopListener::~AnimatorStopListener ()

-

virtual

-

A destructor used to delete an AnimatorStopListener instance.

-

OHOS::UIImageAnimatorView::AnimatorStopListener::OnAnimatorStop (UIView &view)

-

virtual void

-

Called when this animator stops.

-

OHOS::UIImageAnimatorView::SetAnimatorStopListener (AnimatorStopListener *listener)

-

void

-

Sets the listener for the stop of this animator.

-

OHOS::UIImageView::UIImageView ()

-

-

A default constructor used to create a UIImageView instance.

-

OHOS::UIImageView::~UIImageView ()

-

virtual

-

A destructor used to delete the UIImageView instance.

-

OHOS::UIImageView::GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

OHOS::UIImageView::GetWidth () override

-

int16_t

-

Obtains the width of this image view.

-

OHOS::UIImageView::GetHeight () override

-

int16_t

-

Obtains the height of this image view.

-

OHOS::UIImageView::OnPreDraw (const Rect &invalidatedArea) override

-

bool

-

Checks whether this image view needs to be covered to optimize the drawing process.

-

OHOS::UIImageView::OnDraw (const Rect &invalidatedArea) override

-

void

-

Draws this image view.

-

OHOS::UIImageView::SetSrc (const char *src)

-

void

-

Sets the image path.

-

OHOS::UIImageView::SetSrc (const ImageInfo *src)

-

void

-

Sets the image information.

-

OHOS::UIImageView::SetAutoEnable (bool enable)

-

void

-

Sets whether the image view size needs to be adaptive to the image size.

-

OHOS::UIImageView::SetBlurLevel (BlurLevel level)

-

void

-

Sets the blur level for this image when it is rotated or scaled.

-

OHOS::UIImageView::GetBlurLevel () const

-

BlurLevel

-

Obtains the blur level of this image when it is rotated or scaled.

-

OHOS::UIImageView::SetTransformAlgorithm (TransformAlgorithm algorithm)

-

void

-

Sets the algorithm used for image rotation and scaling.

-

OHOS::UIImageView::GetTransformAlgorithm () const

-

TransformAlgorithm

-

Obtains the algorithm used for image rotation and scaling.

-

OHOS::UIImageView::GetPath () const

-

const char *

-

获取图片路径

-

OHOS::UIImageView::GetImageInfo () const

-

const ImageInfo *

-

获取图片信息

-

OHOS::UIImageView::GetSrcType () const

-

uint8_t

-

获取图片类型

-

OHOS::UILabel::UILabel ()

-

-

A constructor used to create a UILabel instance.

-

OHOS::UILabel::~UILabel ()

-

virtual

-

A destructor used to delete the UILabel instance.

-

OHOS::UILabel::GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

OHOS::UILabel::GetWidth () override

-

int16_t

-

Obtains the width of this label.

-

OHOS::UILabel::GetHeight () override

-

int16_t

-

Obtains the height of this label.

-

OHOS::UILabel::OnPreDraw (const Rect &invalidatedArea) override

-

bool

-

Checks whether this label needs to be covered before drawing it.

-

OHOS::UILabel::OnDraw (const Rect &invalidatedArea) override

-

void

-

Draws this label.

-

OHOS::UILabel::SetText (const char *text)

-

void

-

Sets the text content for this label.

-

OHOS::UILabel::GetText () const

-

const char *

-

Obtains the text of this label.

-

OHOS::UILabel::SetLineBreakMode (const uint8_t lineBreakMode)

-

void

-

Sets the line break mode for this text.

-

OHOS::UILabel::GetLineBreakMode () const

-

uint8_t

-

Obtains the line break mode of this text.

-

OHOS::UILabel::SetTextColor (ColorType color)

-

void

-

Sets the color for this text.

-

OHOS::UILabel::GetTextColor () const

-

ColorType

-

Obtains the color of this text.

-

OHOS::UILabel::SetAlign (UITextLanguageAlignment horizontalAlign, UITextLanguageAlignment verticalAlign=TEXT_ALIGNMENT_TOP)

-

void

-

Sets the alignment mode for this text.

-

OHOS::UILabel::GetHorAlign () const

-

UITextLanguageAlignment

-

Obtains the horizontal alignment mode.

-

OHOS::UILabel::GetVerAlign () const

-

UITextLanguageAlignment

-

Obtains the vertical alignment mode.

-

OHOS::UILabel::SetDirect (UITextLanguageDirect direct)

-

void

-

Sets the direction for this text.

-

OHOS::UILabel::GetDirect () const

-

UITextLanguageDirect

-

Obtains the direction of this text.

-

OHOS::UILabel::SetFontId (uint8_t fontId)

-

void

-

Sets the font ID for this label.

-

OHOS::UILabel::GetFontId () const

-

uint8_t

-

Obtains the font ID composed of font name and size.

-

OHOS::UILabel::SetFont (const char *name, uint8_t size)

-

void

-

Sets the font for this label.

-

OHOS::UILabel::SetRollSpeed (uint16_t speed)

-

void

-

Sets the scroll speed for this text.

-

OHOS::UILabel::GetTextWidth ()

-

uint16_t

-

Obtains the width of this text.

-

OHOS::UILabel::GetTextHeight ()

-

uint16_t

-

Obtains the height of this text.

-

OHOS::UILabel::SetRollStartPos (int16_t pos)

-

void

-

Sets the position where this text starts to roll.

-

OHOS::UILabel::GetRollStartPos () const

-

int16_t

-

Obtains the position where this text starts to roll.

-

OHOS::UILabel::SetWidth (int16_t width) override

-

void

-

Sets the width for this label.

-

OHOS::UILabel::SetHeight (int16_t height) override

-

void

-

Sets the height for this label.

-

OHOS::UILabel::SetTextRotation (LabelRotateDegree angle)

-

void

-

Sets the clockwise rotation angle for this text.

-

OHOS::UILabel::GetTextRotation () const

-

LabelRotateDegree

-

Obtains the clockwise rotation degree of this text.

-

OHOS::UILabel::GetTextRotateDegree () const

-

uint16_t

-

Obtains the number of text rotation degrees.

-

OHOS::UILabelButton::UILabelButton ()

-

-

A constructor used to create a UILabelButton instance.

-

OHOS::UILabelButton::~UILabelButton ()

-

virtual

-

A destructor used to delete the UILabelButton instance.

-

OHOS::UILabelButton::OnDraw (const Rect &invalidatedArea) override

-

void

-

Draws a label button.

-

OHOS::UILabelButton::GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

OHOS::UILabelButton::SetText (const char *text)

-

void

-

Sets the text for this label button.

-

OHOS::UILabelButton::GetText () const

-

const char *

-

Obtains the text of this label button.

-

OHOS::UILabelButton::SetLablePosition (int16_t x, int16_t y)

-

void

-

Sets the position for this label relative to the button holding it.

-

OHOS::UILabelButton::GetLabelPosition () const

-

Point

-

Obtains the position of this label relative to the button holding it.

-

OHOS::UILabelButton::SetAlign (UITextLanguageAlignment align)

-

void

-

Sets the alignment mode for this text.

-

OHOS::UILabelButton::GetAlign () const

-

UITextLanguageAlignment

-

Obtains the alignment mode of this text.

-

OHOS::UILabelButton::SetDirect (UITextLanguageDirect direct)

-

void

-

Sets the direction for this text.

-

OHOS::UILabelButton::GetDirect () const

-

UITextLanguageDirect

-

Obtains the direction of this text.

-

OHOS::UILabelButton::SetLabelStyle (Style &labelStyle)

-

void

-

Sets the style for this label.

-

OHOS::UILabelButton::SetLabelStyle (uint8_t key, int64_t value)

-

void

-

Sets a style for this label.

-

OHOS::UILabelButton::GetLabelStyle () const

-

const Style &

-

Obtains the style of this label.

-

OHOS::UILabelButton::GetLabelStyle (uint8_t key) const

-

int64_t

-

Obtains the value of a style of this label.

-

OHOS::UILabelButton::SetTextColor (ColorType color)

-

void

-

Sets the color for this text.

-

OHOS::UILabelButton::SetFont (const char *name, uint8_t size)

-

void

-

Sets the font for this text.

-

OHOS::UILabelButton::SetFontId (uint8_t fontId)

-

void

-

Sets the font ID.

-

OHOS::UILabelButton::GetFontId () const

-

uint8_t

-

Obtains the font ID.

-

OHOS::ListScrollListener::ListScrollListener ()

-

-

A constructor used to create a ListScrollListener instance with the default state SCROLL_STATE_STOP.

-

OHOS::ListScrollListener::~ListScrollListener ()

-

virtual

-

A destructor used to delete the ListScrollListener instance.

-

OHOS::ListScrollListener::OnScrollStart (int16_t index, UIView *view)

-

virtual void

-

Called when a scroll starts.

-

OHOS::ListScrollListener::OnScrollEnd (int16_t index, UIView *view)

-

virtual void

-

Called when a scroll ends.

-

OHOS::ListScrollListener::OnItemSelected (int16_t index, UIView *view)

-

virtual void

-

Called when a new child view is selected at the preset position as this list scrolls. For details about how to set the position, see SetSelectPosition.

-

OHOS::ListScrollListener::GetScrollState () const

-

uint8_t

-

Obtains the scroll state of this list.

-

OHOS::UIList::UIList ()

-

-

A constructor used to create a UIList instance in the vertical direction.

-

OHOS::UIList::UIList (uint8_t direction)

-

-

A constructor used to create a UIList instance in the specified direction.

-

OHOS::UIList::~UIList ()

-

virtual

-

A destructor used to delete the UIList instance.

-

OHOS::UIList::GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

OHOS::UIList::OnDragEvent (const DragEvent &event) override

-

bool

-

Called when the view is being dragged.

-

OHOS::UIList::OnDragEndEvent (const DragEvent &event) override

-

bool

-

Called when the view stops dragging.

-

OHOS::UIList::OnPressEvent (const PressEvent &event) override

-

void

-

Called when the view is pressed.

-

OHOS::UIList::SetAdapter (AbstractAdapter *adapter)

-

void

-

Sets the adapter for this list. The content of this list is initialized when the adapter is set.

-

OHOS::UIList::MoveChildByOffset (int16_t x, int16_t y) override

-

virtual void

-

Moves the position of all child views.

-

OHOS::UIList::ScrollTo (uint16_t index)

-

void

-

Scrolls to change the index of the first row or column of the current view.

-

OHOS::UIList::ScrollBy (int16_t distance)

-

void

-

Scrolls the content in this list.

-

OHOS::UIList::SetStartIndex (uint16_t index)

-

void

-

Sets the start index for this list.

-

OHOS::UIList::GetStartIndex () const

-

uint16_t

-

Obtains the start index of this list. The default value is 0.

-

OHOS::UIList::SetLoopState (bool state)

-

void

-

Sets the loop state for this list, in which a loop scroll is possible since the top and bottom of the list are connected together.

-

OHOS::UIList::GetLoopState () const

-

bool

-

Checks whether this list is in a loop state.

-

OHOS::UIList::SetSelectPosition (uint16_t position)

-

void

-

Sets the position where a child view is selected as this list scrolls.

-

OHOS::UIList::GetSelectView ()

-

UIView *

-

Obtains the child view being selected at the preset position.

-

OHOS::UIList::SetScrollStateListener (ListScrollListener *scrollListener)

-

void

-

Sets the listener that contains a callback to be invoked when a child view is selected as this list scrolls.

-

OHOS::UIList::RefreshList ()

-

void

-

Refreshes this list. The number of child views in the current view is fixed and the positions of those reserved child views as this list scrolls remain unchanged.

-

OHOS::UIList::EnableAutoAlign (bool state)

-

void

-

Sets the automatic alignment state for this list. When a scroll stops, a child view is selected and its position is automatically aligned with the preset position.

-

OHOS::UIList::RemoveAll () override

-

void

-

Removes all child views.

-

OHOS::UIPicker::UIPicker ()

-

-

A constructor used to create a UIPicker instance.

-

OHOS::UIPicker::~UIPicker ()

-

virtual

-

A destructor used to delete the UIPicker instance.

-

OHOS::UIPicker::GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

OHOS::UIPicker::OnPreDraw (const Rect &invalidatedArea) override

-

bool

-

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

-

OHOS::UIPicker::SetValues (const char *value[], uint16_t count)

-

bool

-

Sets dynamic text data in the picker by using a string array.

-

OHOS::UIPicker::SetValues (int16_t start, int16_t end)

-

bool

-

Sets the numeric data in the picker by using a given numeric range.

-

OHOS::UIPicker::ClearValues ()

-

virtual void

-

Clears all values in the picker.

-

OHOS::UIPicker::SetFontId (uint8_t backgroundFontId, uint8_t highlightFontId)

-

void

-

Sets the font IDs of dynamic text, which is the string array set through SetValues.

-

OHOS::UIPicker::SetBackgroundFont (const char *name, uint8_t size)

-

void

-

Sets the font name and size for the background text.

-

OHOS::UIPicker::SetHighlightFont (const char *name, uint8_t size)

-

void

-

Sets the font name and size for the highlighted text.

-

OHOS::UIPicker::GetBackgroundFontId () const

-

uint16_t

-

Obtains the font ID of the background text.

-

OHOS::UIPicker::GetHighlightFontId () const

-

uint16_t

-

Obtains the font ID of the highlighted text.

-

OHOS::UIPicker::SetTextColor (ColorType backgroundColor, ColorType highlightColor)

-

void

-

Sets the text color.

-

OHOS::UIPicker::GetBackgroundTextColor () const

-

ColorType

-

Obtains the color of the background text.

-

OHOS::UIPicker::GetHighlightTextColor () const

-

ColorType

-

Obtains the color of the highlighted text.

-

OHOS::UIPicker::SetSelected (uint16_t index)

-

bool

-

Sets the index of the item currently selected in the picker.

-

OHOS::UIPicker::GetSelected () const

-

uint16_t

-

Obtains the index of the item currently selected in the picker.

-

OHOS::UIPicker::SetItemHeight (int16_t height)

-

void

-

Sets the height of each item in the picker.

-

OHOS::UIPicker::SetWidth (int16_t width) override

-

void

-

Sets the width for this component.

-

OHOS::UIPicker::SetHeight (int16_t height) override

-

void

-

Sets the height for this component.

-

OHOS::UIPicker::SetLoopState (bool state)

-

void

-

Sets whether a picker can slide cyclically.

-

OHOS::UIPicker::SelectedListener::SelectedListener ()

-

-

A constructor used to create a SelectedListener instance.

-

OHOS::UIPicker::SelectedListener::~SelectedListener ()

-

virtual

-

A destructor used to delete the SelectedListener instance.

-

OHOS::UIPicker::SelectedListener::OnPickerStoped (UIPicker &picker)

-

virtual void

-

Called when an item is selected after sliding stops. This function is implemented by applications.

-

OHOS::UIPicker::RegisterSelectedListener (SelectedListener *pickerListener)

-

void

-

Registers a listener for a selected event.

-

OHOS::UIPicker::SetDirect (UITextLanguageDirect direct)

-

void

-

Sets the text direction.

-

OHOS::UIPicker::SetTextFormatter (TextFormatter *formatter)

-

void

-

Sets the text formatter.

-

OHOS::UIRadioButton::UIRadioButton ()

-

-

A constructor used to create a UIRadioButton instance.

-

OHOS::UIRadioButton::UIRadioButton (const char *name)

-

-

Default constructor.

-

OHOS::UIRadioButton::~UIRadioButton ()

-

virtual

-

A destructor used to delete the UIRadioButton instance.

-

OHOS::UIRadioButton::GetViewType () const override

-

UIViewType

-

Obtains the component type.

-

OHOS::UIRadioButton::OnPreDraw (const Rect &invalidatedArea) override

-

bool

-

Do something before draw, this function will be invoked mainly to check if this view need to cover invalidate area so render manager can decide which layer to draw firstly.

-

OHOS::UIRadioButton::OnClickEvent (const ClickEvent &event) override

-

void

-

Executes the click event action OnClickEvent will reverse the selected state of checkbox. Example: If the check box is selected, the checkbox status is changed to Unselected after the click action is taken.

-

OHOS::UIRadioButton::SetName (const char *name)

-

void

-

Sets the name for this radio button.

-

OHOS::UIRadioButton::GetName () const

-

const char *

-

Obtains the name of this radio button.

-

OHOS::UIRepeatButton::UIRepeatButton ()

-

-

A constructor used to create a UIRepeatButton instance.

-

OHOS::UIRepeatButton::~UIRepeatButton ()

-

virtual

-

A destructor used to delete the UIRepeatButton instance.

-

OHOS::UIRepeatButton::GetViewType () const override

-

UIViewType

-

Obtains the component type.

-

OHOS::UIRepeatButton::SetInterval (uint16_t interval)

-

virtual void

-

Sets the interval between two consecutive click events.

-

OHOS::UIRepeatButton::GetInterval () const

-

virtual uint16_t

-

Obtains the interval between two consecutive click events.

-

OHOS::UIRepeatButton::OnClickEvent (const ClickEvent &event) override

-

virtual void

-

The action of click event.

-

OHOS::UIRepeatButton::OnReleaseEvent (const ReleaseEvent &event) override

-

virtual void

-

The action of release event.

-

OHOS::UIRepeatButton::OnLongPressEvent (const LongPressEvent &event) override

-

virtual bool

-

The action of long press event.

-

OHOS::UIRepeatButton::HandleTickEvent ()

-

void

-

handle the event of long pressing.

-

OHOS::UIScrollView::OnScrollListener::OnScrollListener ()

-

-

A constructor used to create an OnScrollListener instance with the default scroll state SCROLL_STATE_STOP.

-

OHOS::UIScrollView::OnScrollListener::~OnScrollListener ()

-

virtual

-

A destructor used to delete the OnScrollListener instance.

-

OHOS::UIScrollView::OnScrollListener::OnScrollStart ()

-

virtual void

-

Called when a scroll starts.

-

OHOS::UIScrollView::OnScrollListener::OnScrollEnd ()

-

virtual void

-

Called when a scroll ends.

-

OHOS::UIScrollView::OnScrollListener::GetScrollState () const

-

uint8_t

-

Obtains the scroll state of this view.

-

OHOS::UIScrollView::UIScrollView ()

-

-

A constructor used to create a UIScrollView instance, with both horizontal and vertical scrolls supported.

-

OHOS::UIScrollView::~UIScrollView ()

-

virtual

-

A destructor used to delete the UIScrollView instance.

-

OHOS::UIScrollView::GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

OHOS::UIScrollView::OnPostDraw (const Rect &invalidatedArea) override

-

void

-

Called after a view is drawn.

-

OHOS::UIScrollView::OnDragEvent (const DragEvent &event) override

-

bool

-

Called when the view is being dragged.

-

OHOS::UIScrollView::OnDragEndEvent (const DragEvent &event) override

-

bool

-

Called when the view stops dragging.

-

OHOS::UIScrollView::OnPressEvent (const PressEvent &event) override

-

void

-

Called when the view is pressed.

-

OHOS::UIScrollView::ScrollBy (int16_t xDistance, int16_t yDistance)

-

void

-

Scrolls the content of this view.

-

OHOS::UIScrollView::SetScrollbarWidth (uint8_t width)

-

void

-

Sets the width for this scroll bar.

-

OHOS::UIScrollView::SetHorizontalScrollState (bool state)

-

void

-

Sets whether a horizontal scroll is enabled.

-

OHOS::UIScrollView::GetHorizontalScrollState () const

-

bool

-

Checks whether a horizontal scroll is enabled.

-

OHOS::UIScrollView::SetVerticalScrollState (bool state)

-

void

-

Sets whether a vertical scroll is enabled.

-

OHOS::UIScrollView::GetVerticalScrollState () const

-

bool

-

Checks whether a vertical scroll is enabled.

-

OHOS::UIScrollView::SetXScrollBarVisible (bool state)

-

void

-

Sets whether the horizontal scroll bar is visible.

-

OHOS::UIScrollView::SetYScrollBarVisible (bool state)

-

void

-

Sets whether the vertical scroll bar is visible.

-

OHOS::UIScrollView::RegisterScrollListener (OnScrollListener *scrollListener)

-

void

-

Registers a listener that contains a callback to be invoked upon scroll state changes.

-

OHOS::UISlider::UISlider ()

-

-

A constructor used to create a UISlider instance.

-

OHOS::UISlider::~UISlider ()

-

virtual

-

A destructor used to delete the UISlider instance.

-

OHOS::UISlider::GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

OHOS::UISlider::SetKnobWidth (int16_t width)

-

void

-

Sets the width for this knob.

-

OHOS::UISlider::GetKnobWidth ()

-

int16_t

-

Obtains the knob width.

-

OHOS::UISlider::SetImage (const ImageInfo *backgroundImage, const ImageInfo *foregroundImage, const ImageInfo *knobImage)

-

void

-

Sets the images as pixel maps for this slider, including the background, foreground, and knob images.

-

OHOS::UISlider::SetImage (const char *backgroundImage, const char *foregroundImage, const char *knobImage)

-

void

-

Sets the images for this slider, including the background, foreground, and knob images.

-

OHOS::UISlider::SetSliderColor (const ColorType backgroundColor, const ColorType foregroundColor, const ColorType knobColor)

-

void

-

Sets the colors for this slider, including the background, foreground, and knob colors.

-

OHOS::UISlider::SetSliderRadius (int16_t backgroundRadius, int16_t foregroundRadius, int16_t knobRadius)

-

void

-

Sets the corner radiuses for this slider, including the background, foreground, and knob corner radiuses.

-

OHOS::UISlider::SetKnobStyle (const Style &style)

-

void

-

Sets the knob style.

-

OHOS::UISlider::SetKnobStyle (uint8_t key, int64_t value)

-

void

-

Sets a knob style.

-

OHOS::UISlider::GetKnobStyle () const

-

const Style &

-

Obtains the knob style.

-

OHOS::UISlider::GetKnobStyle (uint8_t key) const

-

int64_t

-

Obtains the value of a knob style.

-

OHOS::UISlider::OnClickEvent (const ClickEvent &event) override

-

void

-

Called when the view is clicked.

-

OHOS::UISlider::OnDragEvent (const DragEvent &event) override

-

bool

-

Called when the view is being dragged.

-

OHOS::UISlider::OnDragEndEvent (const DragEvent &event) override

-

bool

-

Called when the view stops dragging.

-

OHOS::UISlider::OnPreDraw (const Rect &invalidatedArea) override

-

bool

-

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

-

OHOS::UISlider::OnDraw (const Rect &invalidatedArea) override

-

void

-

Called when a view is drawn.

-

OHOS::UISlider::UISliderEventListener::~UISliderEventListener ()

-

virtual

-

A destructor used to delete the UISliderEventListener instance.

-

OHOS::UISlider::UISliderEventListener::OnChange (int16_t value)

-

virtual void

-

Called when the slider is dragged or clicked. This is a virtual function, which needs your implementation.

-

OHOS::UISlider::UISliderEventListener::OnRelease (int16_t value)

-

virtual void

-

Called when the slider is released. This is a virtual function, which needs your implementation.

-

OHOS::UISlider::SetSliderEventListener (UISliderEventListener *listener)

-

void

-

Sets the listener for a slider change.

-

OHOS::UISurfaceView::UISurfaceView ()

-

-

A constructor used to create a UISurfaceView instance.

-

OHOS::UISurfaceView::~UISurfaceView ()

-

-

A destructor used to delete the UISurfaceView instance.

-

OHOS::UISurfaceView::GetSurface () const

-

Surface *

-

Obtains the surface, which should be used together with the camera and video modules.

-

OHOS::UISurfaceView::SetPosition (int16_t x, int16_t y) override

-

void

-

Sets the position for this view.

-

OHOS::UISurfaceView::SetPosition (int16_t x, int16_t y, int16_t width, int16_t height) override

-

void

-

Sets the position and size for this view.

-

OHOS::UISurfaceView::Resize (int16_t width, int16_t height) override

-

void

-

Adjusts the size of this view.

-

OHOS::UISurfaceView::SetX (int16_t x) override

-

void

-

Sets the x-coordinate for this view.

-

OHOS::UISurfaceView::SetY (int16_t y) override

-

void

-

Sets the y-coordinate for this view.

-

OHOS::UISurfaceView::SetWidth (int16_t width) override

-

void

-

Sets the width for this view.

-

OHOS::UISurfaceView::SetHeight (int16_t height) override

-

void

-

Sets the height for this view.

-

OHOS::UISurfaceView::SetVisible (bool visible) override

-

void

-

Sets whether this view is visible.

-

OHOS::UISurfaceView::OnPreDraw (const Rect &invalidatedArea) override

-

bool

-

Called before this view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so that the drawing process is optimized.

-

OHOS::UISurfaceView::OnDraw (const Rect &invalidatedArea) override

-

void

-

Called when this view is drawn.

-

OHOS::UISwipeView::UISwipeView (uint8_t direction=HORIZONTAL)

-

-

A constructor used to create a UISwipeView instance.

-

OHOS::UISwipeView::~UISwipeView ()

-

virtual

-

A destructor used to delete the UISwipeView instance.

-

OHOS::UISwipeView::GetViewType () const override

-

UIViewType

-

Obtains the component type.

-

OHOS::UISwipeView::SetDirection (uint8_t direction)

-

void

-

Sets the dragging direction.

-

OHOS::UISwipeView::GetDirection () const

-

uint8_t

-

Obtains the dragging direction.

-

OHOS::UISwipeView::Add (UIView *view) override

-

void

-

Adds a view.

-

OHOS::UISwipeView::Insert (UIView *prevView, UIView *insertView) override

-

void

-

Inserts a view.

-

OHOS::UISwipeView::Remove (UIView *view) override

-

virtual void

-

Deletes a view.

-

OHOS::UISwipeView::SetCurrentPage (uint16_t index, bool needAnimator=false)

-

void

-

Sets the index for the current tab.

-

OHOS::UISwipeView::GetCurrentPage () const

-

uint16_t

-

Obtains the current tab index.

-

OHOS::UISwipeView::GetCurrentView () const

-

UIView *

-

Obtains the current view.

-

OHOS::UISwipeView::SetBlankSize (uint16_t size)

-

void

-

Sets a blank size, as defined in DEFAULT_BLANK_SIZE.

-

OHOS::UISwipeView::OnDragEvent (const DragEvent &event) override

-

bool

-

revice drag event, Switch to specified view when drag

-

OHOS::UISwipeView::OnDragEndEvent (const DragEvent &event) override

-

bool

-

Called when the view stops dragging.

-

OHOS::UISwipeView::SetAnimatorTime (uint16_t time)

-

void

-

Sets the time for the page being animated. The page will go beyond the blank during this time.

-

OHOS::UISwipeView::SetLoopState (bool loop)

-

void

-

Sets whether the swipe view supports a cycle swipe.

-

OHOS::UISwipeView::GetViewByIndex (uint16_t index) const

-

UIView *

-

Obtains a view based on its index.

-

OHOS::UISwipeView::GetOnSwipeListener ()

-

OnSwipeListener *&

-

Obtains the listener set for swipe events.

-

OHOS::UISwipeView::SetOnSwipeListener (OnSwipeListener *onSwipeListener)

-

void

-

Sets the listener that contains a callback to be invoked upon a swipe event.

-

OHOS::UISwipeView::MoveChildByOffset (int16_t xOffset, int16_t yOffset) override

-

void

-

Moves the position of all child views.

-

OHOS::UITextureMapper::UITextureMapper ()

-

-

A constructor used to create a UITextureMapper instance.

-

OHOS::UITextureMapper::~UITextureMapper ()

-

virtual

-

A destructor used to delete the UITextureMapper instance.

-

OHOS::UITextureMapper::GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

OHOS::UITextureMapper::Start ()

-

void

-

Starts this animator.

-

OHOS::UITextureMapper::SetRotateStart (int16_t start)

-

void

-

Sets the start angle of rotation for this image.

-

OHOS::UITextureMapper::SetRotateEnd (int16_t end)

-

void

-

Sets the end angle of rotation for this image.

-

OHOS::UITextureMapper::SetScaleStart (float start)

-

void

-

Sets the start ratio for scaling this image.

-

OHOS::UITextureMapper::SetScaleEnd (float end)

-

void

-

Sets the end ratio for scaling this image.

-

OHOS::UITextureMapper::SetDurationTime (uint16_t durationTime)

-

void

-

Sets the duration for this animator, in milliseconds.

-

OHOS::UITextureMapper::SetDelayTime (uint16_t delayTime)

-

void

-

Sets the delay time for this animator, in milliseconds.

-

OHOS::UITextureMapper::SetEasingFunc (EasingFunc easingFunc)

-

void

-

Sets the easing function for this animator.

-

OHOS::UITextureMapper::Cancel ()

-

void

-

Cancels this animator.

-

OHOS::UITextureMapper::Reset ()

-

void

-

Displays the original image.

-

OHOS::UITextureMapper::SetPivot (int16_t x, int16_t y)

-

void

-

Sets the coordinates of the rotation and scaling pivots for this image.

-

OHOS::UITextureMapper::AnimatorStopListener::~AnimatorStopListener ()

-

virtual

-

A destructor used to delete an AnimatorStopListener instance.

-

OHOS::UITextureMapper::AnimatorStopListener::OnAnimatorStop (UIView &view)=0

-

virtual void

-

Called when this animator stops. This is a pure virtual function, which needs your inheritance and implementation.

-

OHOS::UITextureMapper::SetAnimatorStopListener (AnimatorStopListener *listener)

-

void

-

Sets the listener for the stop of this animator.

-

OHOS::UITimePicker::UITimePicker ()

-

-

A constructor used to create a UITimePicker instance.

-

OHOS::UITimePicker::~UITimePicker ()

-

virtual

-

A destructor used to delete the UITimePicker instance.

-

OHOS::UITimePicker::GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

OHOS::UITimePicker::SetSelected (const char *value)

-

bool

-

Sets the time currently selected in the time picker.

-

OHOS::UITimePicker::GetSelectValue ()

-

const char *

-

Obtains the time currently selected in the time picker.

-

OHOS::UITimePicker::GetSelectHour () const

-

const char *

-

Obtains the hour currently selected in the time picker.

-

OHOS::UITimePicker::GetSelectMinute () const

-

const char *

-

Obtains the minute currently selected in the time picker.

-

OHOS::UITimePicker::GetSelectSecond () const

-

const char *

-

Obtains the second currently selected in the time picker.

-

OHOS::UITimePicker::SetItemHeight (int16_t height)

-

void

-

Sets the height of each item in the time picker.

-

OHOS::UITimePicker::EnableSecond (bool state)

-

void

-

Sets whether to enable seconds in the time picker.

-

OHOS::UITimePicker::SetTextStyle (uint8_t backgroundFontId, uint8_t highlightFontId, ColorType backgroundColor, ColorType highlightColor)

-

void

-

Sets the text format in the time picker, including the font ID and color.

-

OHOS::UITimePicker::SetTextColor (ColorType backgroundColor, ColorType highlightColor)

-

void

-

Sets the text color in the time picker.

-

OHOS::UITimePicker::SetBackgroundFont (const char *name, uint8_t size)

-

void

-

Sets the font name and size for the background text.

-

OHOS::UITimePicker::SetHighlightFont (const char *name, uint8_t size)

-

void

-

Sets the font name and size for the highlighted text.

-

OHOS::UITimePicker::SetWidth (int16_t width) override

-

void

-

Sets the width for the time picker.

-

OHOS::UITimePicker::SetHeight (int16_t height) override

-

void

-

Sets the height for the time picker.

-

OHOS::UITimePicker::SelectedListener::SelectedListener ()

-

-

A constructor used to create a SelectedListener instance.

-

OHOS::UITimePicker::SelectedListener::~SelectedListener ()

-

-

A destructor used to delete the SelectedListener instance.

-

OHOS::UITimePicker::SelectedListener::OnTimePickerStoped (UITimePicker &picker)

-

virtual void

-

Called when an item is selected after sliding stops. This function is implemented by applications.

-

OHOS::UITimePicker::RegisterSelectedListener (SelectedListener *timePickerListener)

-

void

-

Registers a listener for a selected event.

-

OHOS::UIToggleButton::UIToggleButton ()

-

-

A constructor used to create a UIToggleButton instance.

-

OHOS::UIToggleButton::~UIToggleButton ()

-

virtual

-

A destructor used to delete the UIToggleButton instance.

-

OHOS::UIToggleButton::GetViewType () const override

-

UIViewType

-

Obtains the component type.

-

OHOS::UIToggleButton::SetState (bool state)

-

void

-

Sets the state for this toggle button.

-

OHOS::UIToggleButton::GetState () const

-

bool

-

Obtains the state of this toggle button.

-

OHOS::UIView::OnClickListener::OnClick (UIView &view, const ClickEvent &event)

-

virtual bool

-

Called when a view is clicked.

-

OHOS::UIView::OnClickListener::~OnClickListener ()

-

virtual

-

A destructor used to delete the OnClickListener instance.

-

OHOS::UIView::OnLongPressListener::OnLongPress (UIView &view, const LongPressEvent &event)

-

virtual bool

-

Called when a view is long pressed.

-

OHOS::UIView::OnLongPressListener::~OnLongPressListener ()

-

virtual

-

A destructor used to delete the OnLongPressListener instance.

-

OHOS::UIView::OnDragListener::OnDragStart (UIView &view, const DragEvent &event)

-

virtual bool

-

Called when a view starts to drag.

-

OHOS::UIView::OnDragListener::OnDrag (UIView &view, const DragEvent &event)

-

virtual bool

-

Called when a view is being dragged.

-

OHOS::UIView::OnDragListener::OnDragEnd (UIView &view, const DragEvent &event)

-

virtual bool

-

Called when a view stops dragging.

-

OHOS::UIView::OnDragListener::~OnDragListener ()

-

virtual

-

A destructor used to delete the OnDragListener instance.

-

OHOS::UIView::OnTouchListener::OnPress (UIView &view, const PressEvent &event)

-

virtual bool

-

Called when a view is pressed.

-

OHOS::UIView::OnTouchListener::OnRelease (UIView &view, const ReleaseEvent &event)

-

virtual bool

-

Called when a view is released.

-

OHOS::UIView::OnTouchListener::OnCancel (UIView &view, const CancelEvent &event)

-

virtual bool

-

Called when a click event on a view is canceled.

-

OHOS::UIView::OnTouchListener::~OnTouchListener ()

-

virtual

-

A destructor used to delete the OnTouchListener instance.

-

OHOS::UIView::UIView ()

-

-

A default constructor used to create an UIView instance.

-

OHOS::UIView::UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

OHOS::UIView::~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OHOS::UIView::OnPreDraw (const Rect &invalidatedArea)

-

virtual bool

-

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

-

OHOS::UIView::OnDraw (const Rect &invalidatedArea)

-

virtual void

-

Called when a view is drawn.

-

OHOS::UIView::OnPostDraw (const Rect &invalidatedArea)

-

virtual void

-

Called after a view is drawn.

-

OHOS::UIView::ReMeasure ()

-

virtual void

-

Remeasures the view size.

-

OHOS::UIView::Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

OHOS::UIView::InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OHOS::UIView::OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OHOS::UIView::OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OHOS::UIView::OnDragEvent (const DragEvent &event)

-

virtual bool

-

Called when the view is being dragged.

-

OHOS::UIView::OnDragEndEvent (const DragEvent &event)

-

virtual bool

-

Called when the view stops dragging.

-

OHOS::UIView::OnClickEvent (const ClickEvent &event)

-

virtual void

-

Called when the view is clicked.

-

OHOS::UIView::OnPressEvent (const PressEvent &event)

-

virtual void

-

Called when the view is pressed.

-

OHOS::UIView::OnReleaseEvent (const ReleaseEvent &event)

-

virtual void

-

Called when the view is released.

-

OHOS::UIView::OnCancelEvent (const CancelEvent &event)

-

virtual void

-

Called when a click event on the view is canceled.

-

OHOS::UIView::SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

OHOS::UIView::GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

OHOS::UIView::SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

OHOS::UIView::GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

OHOS::UIView::SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

OHOS::UIView::GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

OHOS::UIView::SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

OHOS::UIView::GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

OHOS::UIView::GetTargetView (const Point &point, UIView **last)

-

virtual void

-

Obtains the top-level view based on specified coordinates.

-

OHOS::UIView::SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

OHOS::UIView::GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

OHOS::UIView::SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

OHOS::UIView::GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

OHOS::UIView::SetVisible (bool visible)

-

virtual void

-

Sets whether the view is visible.

-

OHOS::UIView::IsVisible () const

-

bool

-

Checks whether the view is visible.

-

OHOS::UIView::SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

OHOS::UIView::IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

OHOS::UIView::SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

OHOS::UIView::IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

OHOS::UIView::SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

OHOS::UIView::IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

OHOS::UIView::GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

OHOS::UIView::GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

OHOS::UIView::GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

OHOS::UIView::GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

OHOS::UIView::GetContentRect ()

-

virtual Rect

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

OHOS::UIView::GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

OHOS::UIView::ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

OHOS::UIView::SetWidth (int16_t width)

-

virtual void

-

Sets the width for the view.

-

OHOS::UIView::GetWidth ()

-

virtual int16_t

-

Obtains the width for the view.

-

OHOS::UIView::SetHeight (int16_t height)

-

virtual void

-

Sets the height for the view.

-

OHOS::UIView::GetHeight ()

-

virtual int16_t

-

Obtains the height for the view.

-

OHOS::UIView::Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

OHOS::UIView::SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

OHOS::UIView::GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

OHOS::UIView::SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

OHOS::UIView::GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

OHOS::UIView::SetPosition (int16_t x, int16_t y)

-

virtual void

-

Sets the position for the view.

-

OHOS::UIView::SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void

-

Adjusts the position and size of the view.

-

OHOS::UIView::IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

OHOS::UIView::SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

OHOS::UIView::SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

OHOS::UIView::GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

OHOS::UIView::GetChildById (const char *id) const

-

virtual UIView *

-

Obtains the child view of a specified ID.

-

OHOS::UIView::SetViewId (const char *id)

-

void

-

Sets the view ID.

-

OHOS::UIView::GetViewId () const

-

const char *

-

Obtains the view ID.

-

OHOS::UIView::SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

OHOS::UIView::GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

OHOS::UIView::GetViewType () const

-

virtual UIViewType

-

Obtains the view type.

-

OHOS::UIView::LayoutChildren (bool neeInvalidate=false)

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

OHOS::UIView::LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

OHOS::UIView::LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

OHOS::UIView::LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

OHOS::UIView::LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

OHOS::UIView::LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

OHOS::UIView::AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

OHOS::UIView::AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

OHOS::UIView::AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

OHOS::UIView::AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

OHOS::UIView::AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

OHOS::UIView::AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

OHOS::UIView::LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

OHOS::UIView::LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

OHOS::UIView::LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

OHOS::UIView::LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

OHOS::UIView::SetStyle (Style &style)

-

void

-

Sets the view style.

-

OHOS::UIView::SetStyle (uint8_t key, int64_t value)

-

virtual void

-

Sets a style.

-

OHOS::UIView::GetStyle (uint8_t key) const

-

virtual int64_t

-

Obtains the value of a style.

-

OHOS::UIView::GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

OHOS::UIViewGroup::UIViewGroup ()

-

-

A default constructor used to create a UIViewGroup instance.

-

OHOS::UIViewGroup::~UIViewGroup ()

-

virtual

-

A destructor used to delete the UIViewGroup instance.

-

OHOS::UIViewGroup::GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

OHOS::UIViewGroup::Add (UIView *view)

-

virtual void

-

Adds a child view.

-

OHOS::UIViewGroup::Insert (UIView *prevView, UIView *insertView)

-

virtual void

-

Inserts a new child view behind the current one.

-

OHOS::UIViewGroup::Remove (UIView *view)

-

virtual void

-

Removes a child view.

-

OHOS::UIViewGroup::RemoveAll ()

-

virtual void

-

Removes all child views.

-

OHOS::UIViewGroup::GetTargetView (const Point &point, UIView **last) override

-

virtual void

-

Obtains the target child view that is visible and can respond to touch events based on given coordinates.

-

OHOS::UIViewGroup::MoveChildByOffset (int16_t x, int16_t y)

-

virtual void

-

Moves all child views.

-

OHOS::UIViewGroup::GetChildrenHead () const

-

UIView *

-

Obtains the first child view in this view group.

-

OHOS::UIViewGroup::GetChildrenTail () const

-

UIView *

-

Obtains the last child view in this view group.

-

OHOS::UIViewGroup::SetDisallowIntercept (bool flag)

-

void

-

Sets whether this view group is intercepted upon touch events.

-

OHOS::UIViewGroup::GetChildById (const char *id) const override

-

UIView *

-

Obtains the target child view with a specified ID.

-

OHOS::UIViewGroup::SetAutoSize (bool state)

-

void

-

Sets whether the size of this view group is adaptive to that of all child views.

-

OHOS::UIViewGroup::GetAllChildRelativeRect () const

-

Rect

-

Obtains the rectangle area of a new view group after being adaptive to the size of all child views.

-

OHOS::UIViewGroup::OnChildChanged ()

-

virtual void

-

Performs operations needed after a child view is added or removed.

-

OHOS::UIDumpDomTree::GetInstance ()

-

static UIDumpDomTree *

-

Obtains an instance in singleton pattern.

-

OHOS::UIDumpDomTree::DumpDomTree (const char *id, const char *path)

-

bool

-

Exports information about a DOM tree starting from a specified DOM node and saves the information to a specified path.

-

OHOS::UIDumpDomTree::DumpDomTree (const char *id)

-

bool

-

Exports information about a DOM tree starting from a specified DOM node and saves the information to the default path. The default path is DEFAULT_DUMP_DOM_TREE_PATH.

-

OHOS::UIDumpDomTree::DumpDomNode (const char *id)

-

char *

-

Exports information about a specified DOM node.

-

OHOS::CancelEvent::CancelEvent (const Point &pos)

-

-

A constructor used to create a CancelEvent instance.

-

OHOS::CancelEvent::~CancelEvent ()

-

virtual

-

A destructor used to delete the CancelEvent instance.

-

OHOS::ClickEvent::ClickEvent (const Point &pos)

-

-

A constructor used to create a ClickEvent instance.

-

OHOS::ClickEvent::~ClickEvent ()

-

virtual

-

A destructor used to delete the ClickEvent instance.

-

OHOS::DragEvent::DragEvent (const Point &newPos, const Point &lastPos, const Point &totalLen)

-

-

A constructor used to create a DragEvent instance.

-

OHOS::DragEvent::~DragEvent ()

-

virtual

-

A destructor used to delete the DragEvent instance.

-

OHOS::DragEvent::GetLastPoint () const

-

const Point &

-

Obtains the coordinates of the last position in the drag event.

-

OHOS::DragEvent::GetStartPoint () const

-

const Point &

-

Obtains the start coordinates in the drag event.

-

OHOS::DragEvent::SetPreLastPoint (const Point &preLastPos)

-

void

-

Sets the coordinates of the stay position before the last position in the drag event.

-

OHOS::DragEvent::GetPreLastPoint () const

-

const Point &

-

Obtains the coordinates of the stay position before the last position in the drag event.

-

OHOS::DragEvent::GetDragDirection () const

-

uint8_t

-

Obtains the direction in the drag event.

-

OHOS::DragEvent::GetDeltaX () const

-

int16_t

-

Obtains the difference between the current position and the last position of the view in the x-axis.

-

OHOS::DragEvent::GetDeltaY () const

-

int16_t

-

Obtains the difference between the current position and the last position of the view in the y-axis.

-

OHOS::Event::Event ()

-

-

A default constructor used to create an Event instance.

-

OHOS::Event::Event (const Point &curPos)

-

-

A constructor used to create an Event instance.

-

OHOS::Event::~Event ()

-

virtual

-

A destructor used to delete the Event instance.

-

OHOS::Event::GetCurrentPos () const

-

const Point &

-

Obtains the position where an event occurs.

-

OHOS::Event::GetTimeStamp () const

-

const TimeType &

-

Obtains the timestamp when an event occurs.

-

OHOS::Event::SetTimeStamp (const TimeType &timeStamp)

-

void

-

Sets the timestamp when an event occurs.

-

OHOS::KeyEvent::KeyEvent (uint16_t keyId, uint16_t state)

-

-

A constructor used to create a KeyEvent instance.

-

OHOS::KeyEvent::~KeyEvent ()

-

-

A destructor used to delete the KeyEvent instance.

-

OHOS::KeyEvent::GetKeyId () const

-

uint16_t

-

Obtains the key ID.

-

OHOS::KeyEvent::GetState () const

-

uint16_t

-

Obtains the key state.

-

OHOS::LongPressEvent::LongPressEvent (const Point &pos, const TimeType &timeStamp)

-

-

A constructor used to create a LongPressEvent instance.

-

OHOS::LongPressEvent::~LongPressEvent ()

-

virtual

-

A destructor used to delete the LongPressEvent instance.

-

OHOS::PressEvent::PressEvent (const Point &pos)

-

-

A constructor used to create a PressEvent instance.

-

OHOS::PressEvent::~PressEvent ()

-

virtual

-

A destructor used to delete the PressEvent instance.

-

OHOS::ReleaseEvent::ReleaseEvent (const Point &pos)

-

-

A constructor used to create a ReleaseEvent instance.

-

OHOS::ReleaseEvent::~ReleaseEvent ()

-

virtual

-

A destructor used to delete the ReleaseEvent instance.

-

OHOS::VirtualDeviceEvent::VirtualDeviceEvent (uint16_t type, uint16_t value)

-

-

A constructor used to create a VirtualDeviceEvent instance.

-

OHOS::VirtualDeviceEvent::~VirtualDeviceEvent ()

-

-

A destructor used to delete the VirtualDeviceEvent instance.

-

OHOS::VirtualDeviceEvent::GetType () const

-

uint16_t

-

Obtains the type of the virtual device.

-

OHOS::VirtualDeviceEvent::GetState () const

-

uint16_t

-

Obtains the state of the virtual event.

-

OHOS::Line::Line ()

-

-

The default constructor used to create a Line instance.

-

OHOS::Line::Line (const Vector2< int16_t > &a, const Vector2< int16_t > &b)

-

-

A constructor used to create a Line instance.

-

OHOS::Line::Line (int16_t x1, int16_t y1, int16_t x2, int16_t y2)

-

-

A constructor used to create a Line instance.

-

OHOS::Line::~Line ()

-

-

A destructor used to delete the Line instance.

-

OHOS::Line::operator[] (uint8_t index)

-

Vector2< int16_t > &

-

Obtains the start or end point of the line based on the value of index.

-

OHOS::Line::operator[] (uint8_t index) const

-

const Vector2< int16_t >

-

Obtains the start or end point of the line based on the value of index.

-

OHOS::Polygon::Polygon ()

-

-

The default constructor used to create a Polygon instance.

-

OHOS::Polygon::Polygon (const Rect &rect)

-

-

A constructor used to construct a Polygon instance based on a rectangle.

-

OHOS::Polygon::Polygon (const Vector2< int16_t > *vertexes, const uint8_t vertexNum)

-

-

A constructor used to create a Polygon instance based on the vertex coordinates and the number of coordinates.

-

OHOS::Polygon::~Polygon ()

-

-

A destructor used to delete the Polygon instance.

-

OHOS::Polygon::MakeAABB () const

-

Rect

-

Obtains the minimum rectangle that can contain the polygon. All vertices of the polygon are inside this rectangle.

-

OHOS::Polygon::GetVertexNum () const

-

uint8_t

-

Obtains the number of vertices of the polygon.

-

OHOS::Polygon::SetVertexNum (uint8_t vertexNum)

-

void

-

Sets the number of vertices of a polygon.

-

OHOS::Intersect (const Line &a, const Line &b, Vector2< int16_t > &out)

-

bool

-

Checks whether line segment a and line segment b intersect, and returns the intersection point (if available).

-

OHOS::IsIntersect (const Line &a, const Line &b)

-

bool

-

Chekcs whether line segment a and line segment b intersect.

-

OHOS::Clip (Polygon &poly, const Line &line)

-

void

-

Clips a polygon by using a line segment.

-

OHOS::SuthHodgClip (const Rect &clipRect, const Polygon &polygon)

-

Polygon

-

Implements Sutherland-Hodgman, an algorithm used for clipping polygons.

-

OHOS::Clip (const Line &line, const Polygon &poly, Vector2< int16_t > *pOut, uint8_t *pNum)

-

void

-

Clips a polygon by using a line segment and obtains the intersections.

-

OHOS::Vector2< T >::Vector2 ()

-

-

A constructor used to create a Vector2 instance.

-

OHOS::Vector2< T >::Vector2 (T x, T y)

-

-

A constructor used to create a Vector2 instance based on the X and Y coordinates.

-

OHOS::Vector2< T >::~Vector2 ()

-

-

A destructor used to delete the Vector2 instance.

-

OHOS::Vector2< T >::Dot (const Vector2< T > &other) const

-

T

-

Calculates the scalar product of the two-dimensional vector and another two-dimensional vector.

-

OHOS::Vector2< T >::Cross (const Vector2< T > &other) const

-

T

-

Calculates the cross product of the two-dimensional vector and another two-dimensional vector.

-

OHOS::Vector3< T >::Vector3 ()

-

-

A constructor used to create a Vector3 instance.

-

OHOS::Vector3< T >::Vector3 (T x, T y, T z)

-

-

Defines a Vector3 instance and initializes the values of x, y, and z.

-

OHOS::Vector3< T >::~Vector3 ()

-

-

A destructor used to delete the Vector3 instance.

-

OHOS::Matrix3< T >::Matrix3 ()

-

-

Defines a Matrix3 instance and initializes the 3 x 3 matrix data.

-

OHOS::Matrix3< T >::Matrix3 (T m00, T m01, T m02, T m10, T m11, T m12, T m20, T m21, T m22)

-

-

Defines a Matrix3 instance and initializes the 3 x 3 matrix data.

-

OHOS::Matrix3< T >::~Matrix3 ()

-

-

A destructor used to delete the Matrix3 instance.

-

OHOS::Matrix3< T >::GetData () const

-

const T *

-

Obtains the 3 x 3 matrix data.

-

OHOS::Matrix3< T >::Determinant () const

-

T

-

Obtains the determinant of the matrix.

-

OHOS::Matrix3< T >::Inverse () const

-

Matrix3

-

Obtains the inverse matrix.

-

OHOS::Matrix3< T >::Rotate (T angle, const Vector2< T > &pivot)

-

static Matrix3

-

Obtains a rotation matrix. After a matrix is rotated, its data is shifted leftwards by 15 bits. Therefore, the result data needs to be shifted rightwards by 15 bits.

-

OHOS::Matrix3< T >::Scale (const Vector2< T > &scale, const Vector2< T > &fixed)

-

static Matrix3

-

Obtains the scaling matrix. After a matrix is scaled, its data is shifted leftwards by 8 bits. Therefore, the result data needs to be shifted rightwards by 8 bits.

-

OHOS::Matrix3< T >::Translate (const Vector2< T > &trans)

-

static Matrix3< T >

-

Obtains a matrix translation.

-

OHOS::HeapBase::operator new (size_t size)

-

void *

-

Overrides the new function.

-

OHOS::HeapBase::operator delete (void *p)

-

void

-

Overrides the delete function.

-

OHOS::FlexLayout::FlexLayout ()

-

-

A default constructor used to create a FlexLayout instance.

-

OHOS::FlexLayout::~FlexLayout ()

-

virtual

-

A destructor used to delete the FlexLayout instance.

-

OHOS::FlexLayout::SetMajorAxisAlign (const AlignType &align)

-

void

-

Sets the alignment mode of the primary axis (the axis where the layout direction is located). The child views in the layout are placed in this mode in the direction of the primary axis.

-

OHOS::FlexLayout::SetSecondaryAxisAlign (const AlignType &align)

-

void

-

Sets the alignment mode of the secondary axis (the axis perpendicular to the set layout direction).

-

OHOS::FlexLayout::SetFlexWrap (uint8_t wrap)

-

void

-

Sets whether to support word wrap.

-

OHOS::FlexLayout::LayoutChildren (bool needInvalidate=false) override

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

OHOS::GridLayout::GridLayout ()

-

-

A default constructor used to create a GridLayout instance.

-

OHOS::GridLayout::~GridLayout ()

-

virtual

-

A destructor used to delete the GridLayout instance.

-

OHOS::GridLayout::SetRows (const uint16_t &rows)

-

void

-

Sets the number of rows in a grid.

-

OHOS::GridLayout::SetCols (const uint16_t &cols)

-

void

-

Sets the number of columns in a grid.

-

OHOS::GridLayout::LayoutChildren (bool needInvalidate=false) override

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

OHOS::Layout::Layout ()

-

-

A default constructor used to create a Layout instance.

-

OHOS::Layout::~Layout ()

-

virtual

-

A destructor used to delete the Layout instance.

-

OHOS::Layout::SetLayoutDirection (const DirectionType &direction)

-

void

-

Sets the layout direction.

-

OHOS::List< T >::List ()

-

-

A default constructor used to create a List instance. The initial size is 0.

-

OHOS::List< T >::~List ()

-

virtual

-

A destructor used to delete the List instance.

-

OHOS::List< T >::Front () const

-

const T

-

Obtains the head node data of a linked list.

-

OHOS::List< T >::Back () const

-

const T

-

Obtains the tail node data of a linked list.

-

OHOS::List< T >::PushBack (T data)

-

void

-

Inserts data at the end of a linked list.

-

OHOS::List< T >::PushFront (T data)

-

void

-

Inserts data at the start of a linked list.

-

OHOS::List< T >::PopBack ()

-

void

-

Pops up a data record at the end of a linked list.

-

OHOS::List< T >::PopFront ()

-

void

-

Pops up a data record at the start of a linked list.

-

OHOS::List< T >::Insert (ListNode< T > *node, T data)

-

void

-

Inserts data before a specified node, which follows the inserted data node.

-

OHOS::List< T >::Remove (ListNode< T > *node)

-

void

-

Deletes a data node.

-

OHOS::List< T >::Clear ()

-

void

-

Deletes all nodes from a linked list.

-

OHOS::List< T >::Head () const

-

ListNode< T > *

-

Obtains the head node address of a linked list.

-

OHOS::List< T >::Tail () const

-

ListNode< T > *

-

Obtains the tail node address of a linked list.

-

OHOS::List< T >::Begin () const

-

ListNode< T > *

-

Obtains the head node address of a linked list.

-

OHOS::List< T >::End () const

-

const ListNode< T > *

-

Obtains the end node address of a linked list.

-

OHOS::List< T >::Next (const ListNode< T > *node) const

-

ListNode< T > *

-

Obtains the address of the node following the specified node.

-

OHOS::List< T >::IsEmpty () const

-

bool

-

Checks whether a linked list is empty.

-

OHOS::List< T >::Size () const

-

uint16_t

-

Obtains the size of a linked list.

-

OHOS::ImageCacheMalloc (const ImageInfo &info)

-

void *

-

Applies for the image cache memory. You can customize the memory area when loading image resources.

-

OHOS::ImageCacheFree (ImageInfo &info)

-

void

-

Releases the image cache memory.

-

OHOS::UIMalloc (uint32_t size)

-

void *

-

Applies for memory for the graphics module. You can implement this function to override the malloc and new functions.

-

OHOS::UIFree (void *buffer)

-

void

-

Releases memory for the graphics module. You can implement this function to override the free and delete functions.

-

OHOS::Rect::Rect ()

-

-

A constructor used to create a Rect instance.

-

OHOS::Rect::~Rect ()

-

-

A destructor used to delete the Rect instance.

-

OHOS::Rect::Rect (int16_t left, int16_t top, int16_t right, int16_t bottom)

-

-

A constructor used to create a Rect instance based on the coordinates of the four boundaries.

-

OHOS::Rect::Rect (const Rect &other)

-

-

A constructor used to create a Rect instance by copying another rectangle.

-

OHOS::Rect::Rect (const Rect &&other)

-

-

A constructor used to create a Rect instance by copying another rectangle.

-

OHOS::Rect::SetRect (int16_t left, int16_t top, int16_t right, int16_t bottom)

-

void

-

Sets the coordinates of the four boundaries of a rectangle.

-

OHOS::Rect::GetWidth () const

-

int16_t

-

Obtains the rectangle width.

-

OHOS::Rect::GetHeight () const

-

int16_t

-

Obtains the rectangle height.

-

OHOS::Rect::GetX () const

-

int16_t

-

Obtains the left boundary coordinate of the rectangle.

-

OHOS::Rect::GetY () const

-

int16_t

-

Obtains the top boundary coordinate of the rectangle.

-

OHOS::Rect::GetLeft () const

-

int16_t

-

Obtains the left boundary coordinate of the rectangle.

-

OHOS::Rect::GetTop () const

-

int16_t

-

Obtains the top boundary coordinate of the rectangle.

-

OHOS::Rect::GetRight () const

-

int16_t

-

Obtains the right boundary coordinate of the rectangle.

-

OHOS::Rect::GetBottom () const

-

int16_t

-

Obtains the bottom boundary coordinate of the rectangle.

-

OHOS::Rect::SetX (int16_t x)

-

void

-

Changes the left boundary coordinate of the rectangle without changing the rectangle width.

-

OHOS::Rect::SetY (int16_t y)

-

void

-

Changes the top boundary coordinate of the rectangle without changing the rectangle height.

-

OHOS::Rect::SetPosition (int16_t x, int16_t y)

-

void

-

Changes the coordinates of the left and top boundaries of the rectangle without changing the rectangle width and height.

-

OHOS::Rect::SetWidth (int16_t width)

-

void

-

Changes the width of the rectangle without changing the coordinate of the left boundary.

-

OHOS::Rect::SetHeight (int16_t height)

-

void

-

Changes the height of the rectangle without changing the coordinate of the top boundary.

-

OHOS::Rect::SetLeft (int16_t left)

-

void

-

Sets the coordinate of the left boundary of a rectangle.

-

OHOS::Rect::SetTop (int16_t top)

-

void

-

Sets the coordinate of the top boundary of a rectangle.

-

OHOS::Rect::SetRight (int16_t right)

-

void

-

Sets the coordinate of the right boundary of a rectangle.

-

OHOS::Rect::SetBottom (int16_t bottom)

-

void

-

Sets the coordinate of the bottom boundary of a rectangle.

-

OHOS::Rect::Resize (int16_t width, int16_t height)

-

void

-

Sets the width and height of a rectangle.

-

OHOS::Rect::GetSize () const

-

uint32_t

-

Obtains the area of a rectangle.

-

OHOS::Rect::Intersect (const Rect &rect1, const Rect &rect2)

-

bool

-

Checks whether two rectangles intersect.

-

OHOS::Rect::Join (const Rect &rect1, const Rect &rect2)

-

void

-

Obtains the minimum rectangle that contains another two rectangles.

-

OHOS::Rect::IsContains (const Vector2< int16_t > &point) const

-

bool

-

Checks whether the rectangle contains a coordinate point.

-

OHOS::Rect::IsContains (const Point &point) const

-

bool

-

Checks whether the rectangle contains a coordinate point.

-

OHOS::Rect::IsExtends (const Rect &other) const

-

bool

-

Checks whether the rectangle is adjacent to another rectangle horizontally or vertically.

-

OHOS::Rect::IsIntersect (const Rect &other) const

-

bool

-

Checks whether the rectangle intersects with another rectangle.

-

OHOS::Rect::IsContains (const Rect &other) const

-

bool

-

Checks whether the rectangle contains another rectangle.

-

OHOS::Style::Style ()

-

-

A constructor used to create a Style instance.

-

OHOS::Style::~Style ()

-

virtual

-

A destructor used to delete the Style instance.

-

OHOS::Style::SetStyle (uint8_t key, int64_t value)

-

void

-

Sets a style.

-

OHOS::Style::GetStyle (uint8_t key) const

-

int64_t

-

Obtains the value of a style.

-

OHOS::StyleDefault::StyleDefault ()

-

-

A constructor used to create a StyleDefault instance.

-

OHOS::StyleDefault::~StyleDefault ()

-

-

A destructor used to delete the StyleDefault instance.

-

OHOS::StyleDefault::GetDefaultStyle ()

-

static Style &

-

Obtains the default style.

-

OHOS::StyleDefault::GetBrightStyle ()

-

static Style &

-

Obtains the bright style.

-

OHOS::StyleDefault::GetBrightColorStyle ()

-

static Style &

-

Obtains the bright color style.

-

OHOS::StyleDefault::GetButtonPressedStyle ()

-

static Style &

-

Obtains the button pressed style.

-

OHOS::StyleDefault::GetButtonReleasedStyle ()

-

static Style &

-

Obtains the button released style.

-

OHOS::StyleDefault::GetButtonInactivedStyle ()

-

static Style &

-

Obtains the button inactived style.

-

OHOS::StyleDefault::GetLabelStyle ()

-

static Style &

-

Obtains the label style.

-

OHOS::StyleDefault::GetBackgroundTransparentStyle ()

-

static Style &

-

Obtains the background transparent style.

-

OHOS::StyleDefault::GetProgressBackgroundStyle ()

-

static Style &

-

Obtains the progress background style.

-

OHOS::StyleDefault::GetProgressForegroundStyle ()

-

static Style &

-

Obtains the progress foreground style.

-

OHOS::StyleDefault::GetSliderKnobStyle ()

-

static Style &

-

Obtains the slider knob style.

-

OHOS::StyleDefault::GetPickerBackgroundStyle ()

-

static Style &

-

Obtains the picker background style.

-

OHOS::StyleDefault::GetPickerHighlightStyle ()

-

static Style &

-

Obtains the picker highlight style.

-

OHOS::SysInfo::OnFPSChangedListener::OnFPSChangedListener ()

-

-

A constructor used to create an OnFPSChangedListener instance with the default sampling type FPS_CT_FIXED_TIME.

-

OHOS::SysInfo::OnFPSChangedListener::~OnFPSChangedListener ()

-

virtual

-

A destructor used to delete the OnFPSChangedListener instance.

-

OHOS::SysInfo::OnFPSChangedListener::OnFPSChanged (float newFPS)=0

-

virtual void

-

Called when the FPS data changes.

-

OHOS::SysInfo::OnFPSChangedListener::GetFPSCalculateType () const

-

FPSCalculateType

-

Obtains the FPS sampling type.

-

OHOS::SysInfo::OnFPSChangedListener::SetFPSCalculateType (FPSCalculateType type)

-

void

-

Sets the FPS sampling type.

-

OHOS::SysInfo::GetFPS ()

-

static float

-

Obtains the FPS data.

-

OHOS::SysInfo::RegisterFPSChangedListener (OnFPSChangedListener *onFPSChangedListener)

-

static void

-

Registers the listener for notifying the FPS changes.

-

OHOS::Theme::Theme ()

-

-

A constructor used to create a Theme instance.

-

OHOS::Theme::~Theme ()

-

virtual

-

A destructor used to delete the Theme instance.

-

OHOS::Theme::GetMainStyle ()

-

Style &

-

Obtains the basic style.

-

OHOS::Theme::GetButtonStyle ()

-

ButtonStyle &

-

Obtains the style of this button.

-

OHOS::Theme::GetLabelStyle ()

-

Style &

-

Obtains the style of this label.

-

OHOS::Theme::GetPickerBackgroundStyle ()

-

Style &

-

Obtains the background style of this picker.

-

OHOS::Theme::GetPickerHighlightStyle ()

-

Style &

-

Obtains the highlight style of this picker.

-

OHOS::Theme::GetProgressBackgroundStyle ()

-

Style &

-

Obtains the background style of this progress bar.

-

OHOS::Theme::GetProgressForegroundStyle ()

-

Style &

-

Obtains the foreground style of this progress bar.

-

OHOS::Theme::GetSliderKnobStyle ()

-

Style &

-

Obtains the style of this slider knob.

-

OHOS::ThemeManager::GetInstance ()

-

static ThemeManager &

-

Obtains the singleton instance of the ThemeManager class.

-

OHOS::ThemeManager::SetCurrent (Theme *theme)

-

void

-

Sets the current screen theme for this application.

-

OHOS::ThemeManager::GetCurrent ()

-

Theme *

-

Obtains the current screen theme of this application.

-

OHOS::TransformMap::TransformMap ()

-

-

The default constructor used to create a TransformMap instance.

-

OHOS::TransformMap::TransformMap (const Rect &rect)

-

-

A constructor used to create a TransformMap instance.

-

OHOS::TransformMap::~TransformMap ()

-

-

A destructor used to delete the TransformMap instance.

-

OHOS::TransformMap::GetClockWise () const

-

bool

-

Checks whether the vertex coordinates of a polygon are clockwise.

-

OHOS::TransformMap::SetPolygon (const Polygon &polygon)

-

void

-

Sets a polygon after rectangle transformation.

-

OHOS::TransformMap::GetPolygon () const

-

Polygon

-

Obtains the polygon after rectangle transformation.

-

OHOS::TransformMap::GetPivot () const

-

Point

-

Obtains the pivot for the rotation or scaling operation.

-

OHOS::TransformMap::IsInvalid () const

-

bool

-

Checks whether the TransformMap instance is invalid. When the vertices are all 0, the TransformMap is invalid.

-

OHOS::TransformMap::GetBoxRect () const

-

Rect

-

Obtains the minimum rectangle that can contain a polygon. All vertices of the polygon are inside this rectangle.

-

OHOS::TransformMap::Rotate (int16_t angle, const Vector2< int16_t > &pivot)

-

void

-

Rotates the rectangle.

-

OHOS::TransformMap::Scale (const Vector2< float > scale, const Vector2< int16_t > &pivot)

-

void

-

Scales the rectangle.

-

OHOS::Rotate (const Vector2< int16_t > &point, int16_t angle, const Vector2< int16_t > &pivot, Vector2< int16_t > &out)

-

void

-

Rotates a point around the pivot by a certain angle.

-

OHOS::Rotate (const Line &origLine, int16_t angle, const Vector2< int16_t > &pivot, Line &out)

-

void

-

Rotates a line around the pivot by a certain angle.

-

OHOS::Rotate (const Rect &origRect, int16_t angle, const Vector2< int16_t > &pivot, Polygon &out)

-

void

-

Rotates a rectangle around the pivot by a certain angle.

-

OHOS::GetVersion ()

-

std::string

-

Obtains the version number of the graphics module.

-

OHOS::GetLibDsc ()

-

std::string

-

Obtains the library description of the graphics module.

-
- -## **Details** - -## **Macro Definition ** - -## VERSION\_STANDARD - -``` -#define VERSION_STANDARD -``` - - **Description:** - -Defines three graphics library versions: lightweight, standard, and extended versions. The three versions have different requirements on the memory and hardware. The standard version is enabled by default. - -The macros of the versions are defined as follows: - -## **Typedef ** - -## EasingFunc - -``` -typedef int16_t(* OHOS::EasingFunc) (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime) -``` - - **Description:** - -Calculates the value for the current time of an animation. - -Returns the value for the current time. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
startPosIndicates the start value of this animation.
endPosIndicates the end value of this animation.
curTimeIndicates the current time of this animation.
durationTimeIndicates the total duration of this animation.
- -## **Enumeration Type ** - -## anonymous enum - -``` -anonymous enum : uint8_t -``` - - **Description:** - -Enumerates the states of this animator. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
STOP

Stop

-
START

Start

-
PAUSE

Pause

-
RUNNING

Running (reserved and not used currently)

-
- -## anonymous enum - -``` -anonymous enum -``` - - **Description:** - -Enumerates opacity values. - - - - - - - - - - - - - -

Enumerator

-

Description

-
OPA_TRANSPARENT

The opacity is 0.

-
OPA_OPAQUE

The opacity is 100%.

-
- -## anonymous enum - -``` -anonymous enum : uint8_t -``` - - **Description:** - -Enumerates keys of styles. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
STYLE_BACKGROUND_COLOR

Background color

-
STYLE_BACKGROUND_OPA

Background opacity

-
STYLE_BORDER_RADIUS

Border radius

-
STYLE_BORDER_COLOR

Border color

-
STYLE_BORDER_OPA

Border opacity

-
STYLE_BORDER_WIDTH

Border width

-
STYLE_PADDING_LEFT

Left padding

-
STYLE_PADDING_RIGHT

Right padding

-
STYLE_PADDING_TOP

Top padding

-
STYLE_PADDING_BOTTOM

Bottom padding

-
STYLE_MARGIN_LEFT

Left margin

-
STYLE_MARGIN_RIGHT

Right margin

-
STYLE_MARGIN_TOP

Top margin

-
STYLE_MARGIN_BOTTOM

Bottom margin

-
STYLE_IMAGE_OPA

Image opacity

-
STYLE_TEXT_COLOR

Text color

-
STYLE_TEXT_FONT

Text font

-
STYLE_LETTER_SPACE

Letter spacing

-
STYLE_LINE_SPACE

Line spacing

-
STYLE_TEXT_OPA

Text opacity

-
STYLE_LINE_COLOR

Line color

-
STYLE_LINE_WIDTH

Line width

-
STYLE_LINE_OPA

Line opacity

-
STYLE_LINE_CAP

Line cap style

-
- -## ButtonImageSrc - -``` -enum [OHOS::UIButton::ButtonImageSrc](Graphic.md#gaf9f6c0c373f090e79b9e8d847e186e92) : uint8_t -``` - - **Description:** - -Enumerates the images for different button states. - -You can define a different image for each button state. - -## ButtonState - -``` -enum [OHOS::UIButton::ButtonState](Graphic.md#ga188dd55c17ee44be27fa80543f13f729) : uint8_t -``` - - **Description:** - -Enumerates the states of this button. - -The button has three states. - -## CapType - -``` -enum [OHOS::CapType](Graphic.md#ga2db3928cdf793f4950245a6841dd43d6) : uint8_t -``` - - **Description:** - -Enumerates cap styles. - - - - - - - - - - - - - -

Enumerator

-

Description

-
CAP_NONE

No cap style

-
CAP_ROUND

Round cap style

-
- -## ColorMode - -``` -enum [OHOS::ColorMode](Graphic.md#ga3a3fb04ed2cda4017e6771c66b692141) : uint8_t -``` - - **Description:** - -colormode of image and font. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
ARGB8888

ARGB8888 color mode

-
RGB888

RGB888 color mode

-
RGB565

RGB565 color mode

-
ARGB1555

ARGB1555 color mode

-
ARGB4444

ARGB4444 color mode

-
AL44

AL44 color mode

-
AL88

AL88 color mode

-
L1

L1 color mode

-
L2

L2 color mode

-
L4

L4 color mode

-
L8

L8 color mode

-
A1

A1 color mode

-
A2

A2 color mode

-
A4

A4 color mode

-
A8

A8 color mode

-
UNKNOW

unknow color mode

-
- -## DeviceType - -``` -enum [OHOS::VirtualDeviceEvent::DeviceType](Graphic.md#gaf8133740d5a3cb2f88a7f33cb11c6dbd) -``` - - **Description:** - -Enumerates virtual device types. - -## DialogButtonType - -``` -enum [OHOS::UIDialog::DialogButtonType](Graphic.md#ga1bfefa0b46fd5a79a28d0c9a75114295) -``` - - **Description:** - -Enumerates buttons in a dialog box. - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
BUTTON1

First button

-
BUTTON2

Second button

-
BUTTON3

Third button

-
- -## Direction - -``` -enum [OHOS::UIBoxProgress::Direction](Graphic.md#ga4a7a2c192206c8b18379f42a5fd176eb) : uint8_t -``` - - **Description:** - -Enumerates the directions of the progress bar. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
DIR_LEFT_TO_RIGHT

Filling from left to right

-
DIR_RIGHT_TO_LEFT

Filling from right to left

-
DIR_TOP_TO_BOTTOM

Filling from top to bottom

-
DIR_BOTTOM_TO_TOP

Filling from bottom to top

-
- -## DisplayMode - -``` -enum [OHOS::UIDigitalClock::DisplayMode](Graphic.md#gabe3b64b11e5bf5d7b54e1039e40f306b) -``` - - **Description:** - -Enumerates the display modes of this digital clock. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
DISPLAY_12_HOUR_NO_SECONDS

12-hour format, without seconds

-
DISPLAY_24_HOUR_NO_SECONDS

24-hour format, without seconds

-
DISPLAY_12_HOUR

12-hour format

-
DISPLAY_24_HOUR

24-hour format

-
- -## DrawType - -``` -enum [OHOS::UIAnalogClock::DrawType](Graphic.md#ga0a595eeb50ce4e7dfff9ede16098d2db) -``` - - **Description:** - -Enumerates the drawing types of a clock hand. - - - - - - - - - - - - - -

Enumerator

-

Description

-
DRAW_LINE

Using a line to draw a clock hand

-
DRAW_IMAGE

Using an image to draw a clock hand

-
- -## FPSCalculateType - -``` -enum [OHOS::SysInfo::FPSCalculateType](Graphic.md#ga75d850e3abff6c2f617b689a0cb9a3d1) -``` - - **Description:** - -Enumerates the FPS capture types. - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
FPS_CT_FIXED_TIME

Fixed time sampling: The system collects the number of page refresh times within one second.

-
FPS_CT_AVERAGE_SAMPLING

Average sampling: The system collects statistics on the average frame rate of 100 frames. No extra space is required to store the data of each frame. The precision is not as high as that of precise sampling.

-
FPS_CT_PRECISE_SAMPLING

Precise sampling: The system collects statistics on the average frame rate of the current 100 frames. Extra space is required to save the data of each frame. The result is more precise than that of average sampling.

-
- -## HandType - -``` -enum [OHOS::UIAnalogClock::HandType](Graphic.md#ga13cf64ea5bd39550976aaf65b1381edf) -``` - - **Description:** - -Enumerates the clock hand types. - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
HOUR_HAND

Hour hand

-
MINUTE_HAND

Minute hand

-
SECOND_HAND

Second hand

-
- -## LineBreakMode - -``` -enum [OHOS::UILabel::LineBreakMode](Graphic.md#gaf2ba9acac6cafffc549781ace0475cd5) : uint8_t -``` - - **Description:** - -Enumerates the display modes of a long text. - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
LINE_BREAK_ADAPT

The label size is adaptive to the text size.

-
LINE_BREAK_STRETCH

The height of this label remains unchanged, and the width is adaptive to the text size.

-
LINE_BREAK_WRAP

The width of this label remains unchanged, and the height is adaptive to the text size. The text switches to the next line if the text exceeds the maximum label width.

-
LINE_BREAK_ELLIPSIS

The width and height of this label remain unchanged. If this text is too long, ellipsis will be used at the end.

-
LINE_BREAK_MARQUEE

The width and height of this label remain unchanged. If this text is too long, it will be rolled to display.

-
LINE_BREAK_CLIP

The width and height of this label remain unchanged. If this text is too long, it will be cropped to display.

-
LINE_BREAK_MAX

Maximum value of the line break mode, which is used for validity check.

-
- -## PaintStyle - -``` -enum [OHOS::Paint::PaintStyle](Graphic.md#ga548320a469b7862fa416af062cad5d7a) -``` - - **Description:** - -Enumerates paint styles of a closed graph. The styles are invalid for non-closed graphs. - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
STROKE_STYLE

Stroke only

-
FILL_STYLE

Fill only

-
STROKE_FILL_STYLE

Stroke and fill

-
- -## TextOrientation - -``` -enum [OHOS::UIArcLabel::TextOrientation](Graphic.md#ga0778527bee4a7ddd8d46395585a5cfb9) : uint8_t -``` - - **Description:** - -Enumerates text orientations. - - - - - - - - - - - - - -

Enumerator

-

Description

-
INSIDE

Inside

-
OUTSIDE

Outside

-
- -## TimeElement - -``` -enum [OHOS::UIDigitalClock::TimeElement](Graphic.md#gaa6aacc9ecbf5e20f22e50e542a69f472) -``` - - **Description:** - -Enumerates the time elements of this digital clock. - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
HOUR_ELEMENT

Clock

-
MINUTE_ELEMENT

Minute

-
SECOND_ELEMENT

Second

-
- -## UICheckBoxState - -``` -enum [OHOS::UICheckBox::UICheckBoxState](Graphic.md#ga15a3f0302aded0e4d1584ddc6002335d) : uint8_t -``` - - **Description:** - -Enumerates the states of a check box. - -## UITextLanguageAlignment - -``` -enum [OHOS::UITextLanguageAlignment](Graphic.md#ga3f99b58f731a37cacde72d5e0c934593) : uint8_t -``` - - **Description:** - -Enumerates text alignment modes. - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
TEXT_ALIGNMENT_LEFT

Left-aligned

-
TEXT_ALIGNMENT_RIGHT

Right-aligned

-
TEXT_ALIGNMENT_CENTER

Centered

-
TEXT_ALIGNMENT_TOP

Top-aligned

-
TEXT_ALIGNMENT_BOTTOM

Bottom-aligned

-
- -## UITextLanguageDirect - -``` -enum [OHOS::UITextLanguageDirect](Graphic.md#ga0c108f97781843f67c101b47b6c00cf0) : uint8_t -``` - - **Description:** - -Enumerates text directions. - - - - - - - - - - - - - -

Enumerator

-

Description

-
TEXT_DIRECT_LTR

Left-to-right

-
TEXT_DIRECT_RTL

Right-to-left

-
- -## WorkMode - -``` -enum [OHOS::UIAbstractClock::WorkMode](Graphic.md#ga19db90932bc71e6bbced6ccf2935ac98) -``` - - **Description:** - -Enumerates the working modes of this clock. - - - - - - - - - - - - - -

Enumerator

-

Description

-
ALWAYS_ON

Always on (drawing not updated)

-
NORMAL

Normal (drawing updated with the time change)

-
- -## **Function ** - -## AbstractAdapter\(\) - -``` -OHOS::AbstractAdapter::AbstractAdapter () -``` - - **Description:** - -A constructor used to create an **[AbstractAdapter](OHOS-AbstractAdapter.md)** instance. - -## Add\(\) \[1/3\] - -``` -void OHOS::AnimatorManager::Add ([Animator](OHOS-Animator.md) * animator) -``` - - **Description:** - -Adds the **[Animator](OHOS-Animator.md)** instance to the **[AnimatorManager](OHOS-AnimatorManager.md)** linked list for management, so that the **Run** function of the **[Animator](OHOS-Animator.md)** class is called once for each frame. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
animatorIndicates the pointer to the Animator instance to add.
- -**See also:** - -[Remove](Graphic.md#ga493d53a9e4a47b79d30c0d37f96a69da) - -## Add\(\) \[2/3\] - -``` -virtual void OHOS::UIViewGroup::Add ([UIView](OHOS-UIView.md) * view) -``` - - **Description:** - -Adds a child view. - -Reimplemented in [OHOS::UISwipeView](Graphic.md#ga1cdc37a33412d6134ed7214300bc1c87). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
viewIndicates the pointer to the child view to add.
- -## Add\(\) \[3/3\] - -``` -void OHOS::UISwipeView::Add ([UIView](OHOS-UIView.md) * view) -``` - - **Description:** - -Adds a view. - -Reimplemented from [OHOS::UIViewGroup](Graphic.md#gacf5db120308ac7783c493f5437f06cee). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
viewIndicates the view to add.
- -## AddDataSerial\(\) - -``` -virtual bool OHOS::UIChart::AddDataSerial ([UIChartDataSerial](OHOS-UIChartDataSerial.md) * dataSerial) -``` - - **Description:** - -Adds a data set. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
dataSerialIndicates the pointer to the data set class. For details, see UIChartDataSerial.
- -**Returns:** - -Returns **true** if the data set is added successfully; returns **false** otherwise. - -**See also:** - -[DeleteDataSerial](Graphic.md#ga2af81fbcd6a17ef250bf07e2d7606b8d) - -## AddPoints\(\) - -``` -bool OHOS::UIChartDataSerial::AddPoints (const [Point](OHOS-Point.md) * data, uint16_t count ) -``` - - **Description:** - -Adds data points. - -The new data points are appended to the last added data. No more data points can be added if the maximum number is reached - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
dataIndicates the pointer to the start address of the data point.
countIndicates the number of data points to add.
- -**Returns:** - -Returns **true** if the data points are added successfully; returns **false** otherwise. - -## AlignBottomToSibling\(\) - -``` -void OHOS::UIView::AlignBottomToSibling (const char * id, int16_t offset = 0 ) -``` - - **Description:** - -Aligns the view with the bottom of a sibling view. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the pointer to the ID of the sibling view.
offsetIndicates the offset added to the y-axis after the view is placed. A positive number indicates the offset to the top, and a negative number indicates the offset to the bottom.
- -## AlignHorCenterToSibling\(\) - -``` -void OHOS::UIView::AlignHorCenterToSibling (const char * id, int16_t offset = 0 ) -``` - - **Description:** - -Aligns the view with the center of a sibling view in the x-axis. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the pointer to the ID of the sibling view.
offsetIndicates the offset added to the x-axis after the view is placed. A positive number indicates the offset to the right, and a negative number indicates the offset to the left.
- -## AlignLeftToSibling\(\) - -``` -void OHOS::UIView::AlignLeftToSibling (const char * id, int16_t offset = 0 ) -``` - - **Description:** - -Aligns the view with the left of a sibling view. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the pointer to the ID of the sibling view.
offsetIndicates the offset added to the x-axis after the view is placed. A positive number indicates the offset to the right, and a negative number indicates the offset to the left.
- -## AlignRightToSibling\(\) - -``` -void OHOS::UIView::AlignRightToSibling (const char * id, int16_t offset = 0 ) -``` - - **Description:** - -Aligns the view with the right of a sibling view. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the pointer to the ID of the sibling view.
offsetIndicates the offset added to the x-axis after the view is placed. A positive number indicates the offset to the left, and a negative number indicates the offset to the right.
- -## AlignTopToSibling\(\) - -``` -void OHOS::UIView::AlignTopToSibling (const char * id, int16_t offset = 0 ) -``` - - **Description:** - -Aligns the view with the top of a sibling view. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the pointer to the ID of the sibling view.
offsetIndicates the offset added to the y-axis after the view is placed. A positive number indicates the offset to the bottom, and a negative number indicates the offset to the top.
- -## AlignVerCenterToSibling\(\) - -``` -void OHOS::UIView::AlignVerCenterToSibling (const char * id, int16_t offset = 0 ) -``` - - **Description:** - -Aligns the view with the center of a sibling view in the y-axis. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the pointer to the ID of the sibling view.
offsetIndicates the offset added to the y-axis after the view is placed. A positive number indicates the offset to the bottom, and a negative number indicates the offset to the top.
- -## Animator\(\) \[1/2\] - -``` -OHOS::Animator::Animator () -``` - - **Description:** - -A default constructor used to create an **[Animator](OHOS-Animator.md)** instance. - -## Animator\(\) \[2/2\] - -``` -OHOS::Animator::Animator ([AnimatorCallback](OHOS-AnimatorCallback.md) * callback, [UIView](OHOS-UIView.md) * view, uint32_t time, bool repeat ) -``` - - **Description:** - -A constructor used to create an **[Animator](OHOS-Animator.md)** instance. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
callbackIndicates the animator callback for producing animator effects. For details, see AnimatorCallback.
viewIndicates the UIView instance bound to an animator, which can be used when invoking the animator callback.
timeIndicates the duration of this animator, in milliseconds.
repeatSpecifies whether to repeat this animator. true indicates the animator is repeated, and false (default value) indicates the animator is played once.
- -## Aqua\(\) - -``` -static [ColorType](OHOS-Color32.md) OHOS::Color::Aqua () -``` - - **Description:** - -Obtains the color data of aqua. - -**Returns:** - -Returns the color data. - -## Back\(\) - -``` -const T [OHOS::List](OHOS-List-T.md)< T >::Back () const -``` - - **Description:** - -Obtains the tail node data of a linked list. - -**Returns:** - -Returns the tail node data. - -## BackEaseIn\(\) - -``` -static int16_t OHOS::EasingEquation::BackEaseIn (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime ) -``` - - **Description:** - -Eases in with an overshoot. - -**\(s+1\)\*t^3 - s\*t^2** is the equation for a back easing. The animation moves back slightly at the beginning and then accelerates towards the end. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
startPosIndicates the start value of this animation.
endPosIndicates the end value of this animation.
curTimeIndicates the current time of this animation.
durationTimeIndicates the total duration of this animation.
- -**Returns:** - -Returns the value for the current time. - -**See also:** - -[SetBackOvershoot](Graphic.md#gab7cf0e64a0d363d8b448262d719ac97a) | [BackEaseOut](Graphic.md#ga7399f01f7abc33413bf25aa17a99c2f2) | [BackEaseInOut](Graphic.md#gac7c2a9a1dfce384438a3bd9d6c0c2525) - -## BackEaseInOut\(\) - -``` -static int16_t OHOS::EasingEquation::BackEaseInOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime ) -``` - - **Description:** - -Eases in and then out with an overshoot. - -**\(s+1\)\*t^3 - s\*t^2** is the equation for a back easing. The animation slightly moves back at the beginning, goes towards the end, slightly exceeds it and finally comes back. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
startPosIndicates the start value of this animation.
endPosIndicates the end value of this animation.
curTimeIndicates the current time of this animation.
durationTimeIndicates the total duration of this animation.
- -**Returns:** - -Returns the value for the current time. - -**See also:** - -[SetBackOvershoot](Graphic.md#gab7cf0e64a0d363d8b448262d719ac97a) | [BackEaseIn](Graphic.md#ga4598524b16a33de497fa9321d887d3b1) | [BackEaseOut](Graphic.md#ga7399f01f7abc33413bf25aa17a99c2f2) - -## BackEaseOut\(\) - -``` -static int16_t OHOS::EasingEquation::BackEaseOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime ) -``` - - **Description:** - -Eases out with an overshoot. - -**\(s+1\)\*t^3 - s\*t^2** is the equation for a back easing. The animation moves towards the end, slightly exceeds it and finally comes back. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
startPosIndicates the start value of this animation.
endPosIndicates the end value of this animation.
curTimeIndicates the current time of this animation.
durationTimeIndicates the total duration of this animation.
- -**Returns:** - -Returns the value for the current time. - -**See also:** - -[SetBackOvershoot](Graphic.md#gab7cf0e64a0d363d8b448262d719ac97a) | [BackEaseIn](Graphic.md#ga4598524b16a33de497fa9321d887d3b1) | [BackEaseInOut](Graphic.md#gac7c2a9a1dfce384438a3bd9d6c0c2525) - -## Begin\(\) - -``` -[ListNode](OHOS-ListNode-T.md)* [OHOS::List](OHOS-List-T.md)< T >::Begin () const -``` - - **Description:** - -Obtains the head node address of a linked list. - -**Returns:** - -Returns the head node address. - -## Black\(\) - -``` -static [ColorType](OHOS-Color32.md) OHOS::Color::Black () -``` - - **Description:** - -Obtains the color data of black. - -**Returns:** - -Returns the color data. - -## Blue\(\) - -``` -static [ColorType](OHOS-Color32.md) OHOS::Color::Blue () -``` - - **Description:** - -Obtains the color data of blue. - -**Returns:** - -Returns the color data. - -## Callback\(\) - -``` -virtual void OHOS::AnimatorCallback::Callback ([UIView](OHOS-UIView.md) * view) -``` - - **Description:** - -Called when each frame starts. This is a pure virtual function, which needs your inheritance and implementation. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
viewIndicates the UIView instance, which is added from the constructor of the Animator class.
- -## Cancel\(\) - -``` -void OHOS::UITextureMapper::Cancel () -``` - - **Description:** - -Cancels this animator. - -After being cancelled, the animator will stop in the current playback state. - -## CancelEvent\(\) - -``` -OHOS::CancelEvent::CancelEvent (const [Point](OHOS-Point.md) & pos) -``` - - **Description:** - -A constructor used to create a **[CancelEvent](OHOS-CancelEvent.md)** instance. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
posIndicates the position where the cancel event occurs.
- -## CircEaseIn\(\) - -``` -static int16_t OHOS::EasingEquation::CircEaseIn (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime ) -``` - - **Description:** - -Eases in shaping like a circular curve. - -**sqrt\(1-t^2\)** is the equation for a circular easing. The animation starts slowly from zero velocity and accelerates fast towards the end. The acceleration change is similar to a circular curve. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
startPosIndicates the start value of this animation.
endPosIndicates the end value of this animation.
curTimeIndicates the current time of this animation.
durationTimeIndicates the total duration of this animation.
- -**Returns:** - -Returns the value for the current time. - -**See also:** - -[CircEaseOut](Graphic.md#gaab8fad8664d648df7e5e224b68ee54ad) | [CircEaseInOut](Graphic.md#ga68c392dad14e1bef192b085aeec6ca9b) - -## CircEaseInOut\(\) - -``` -static int16_t OHOS::EasingEquation::CircEaseInOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime ) -``` - - **Description:** - -Eases in and then out shaping like a circular curve. - -**sqrt\(1-t^2\)** is the equation for a circular easing. The animation accelerates slowly until halfway and decreases slowly towards the end. The acceleration change is similar to a circular curve. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
startPosIndicates the start value of this animation.
endPosIndicates the end value of this animation.
curTimeIndicates the current time of this animation.
durationTimeIndicates the total duration of this animation.
- -**Returns:** - -Returns the value for the current time. - -**See also:** - -[CircEaseIn](Graphic.md#ga446c958f14b3d6de24e2c1bab171bba2) | [CircEaseOut](Graphic.md#gaab8fad8664d648df7e5e224b68ee54ad) - -## CircEaseOut\(\) - -``` -static int16_t OHOS::EasingEquation::CircEaseOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime ) -``` - - **Description:** - -Eases out shaping like a circular curve. - -**sqrt\(1-t^2\)** is the equation for a circular easing. The animation starts fast and decelerates slowly towards the end. The acceleration change is similar to a circular curve. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
startPosIndicates the start value of this animation.
endPosIndicates the end value of this animation.
curTimeIndicates the current time of this animation.
durationTimeIndicates the total duration of this animation.
- -**Returns:** - -Returns the value for the current time. - -**See also:** - -[CircEaseIn](Graphic.md#ga446c958f14b3d6de24e2c1bab171bba2) | [CircEaseInOut](Graphic.md#ga68c392dad14e1bef192b085aeec6ca9b) - -## Clear\(\) \[1/2\] - -``` -void [OHOS::List](OHOS-List-T.md)< T >::Clear () -``` - - **Description:** - -Deletes all nodes from a linked list. - -## Clear\(\) \[2/2\] - -``` -void OHOS::UICanvas::Clear () -``` - - **Description:** - -Clears the entire canvas. - -## ClearData\(\) - -``` -void OHOS::UIChartDataSerial::ClearData () -``` - - **Description:** - -Clears all data points. - -## ClearDataSerial\(\) - -``` -virtual void OHOS::UIChart::ClearDataSerial () -``` - - **Description:** - -Clears all data sets. - -## ClearOnKeyActListener\(\) - -``` -void OHOS::RootView::ClearOnKeyActListener () -``` - - **Description:** - -Clears the listener for monitoring physical key events. - -## ClearOnVirtualDeviceEventListener\(\) - -``` -void OHOS::RootView::ClearOnVirtualDeviceEventListener () -``` - - **Description:** - -Clears the listener for monitoring the input events of a virtual device. - -## ClearValues\(\) - -``` -virtual void OHOS::UIPicker::ClearValues () -``` - - **Description:** - -Clears all values in the picker. - -## ClickEvent\(\) - -``` -OHOS::ClickEvent::ClickEvent (const [Point](OHOS-Point.md) & pos) -``` - - **Description:** - -A constructor used to create a **[ClickEvent](OHOS-ClickEvent.md)** instance. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
posIndicates the position where the click event occurs.
- -## Clip\(\) \[1/2\] - -``` -void OHOS::Clip (const [Line](OHOS-Line.md) & line, const [Polygon](OHOS-Polygon.md) & poly, [Vector2](OHOS-Vector2-T.md)< int16_t > * pOut, uint8_t * pNum ) -``` - - **Description:** - -Clips a polygon by using a line segment and obtains the intersections. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
lineIndicates the line segment used for clipping.
polyIndicates the polygon to clip.
pOutIndicates the pointer to the intersections.
pNumIndicates the pointer to the number of the intersections.
- -## Clip\(\) \[2/2\] - -``` -void OHOS::Clip ([Polygon](OHOS-Polygon.md) & poly, const [Line](OHOS-Line.md) & line ) -``` - - **Description:** - -Clips a polygon by using a line segment. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
polyIndicates the polygon to clip.
lineIndicates the line segment used for clipping.
- -## ColorTo16\(\) - -``` -static uint16_t OHOS::Color::ColorTo16 ([Color32](OHOS-Color32.md) color) -``` - - **Description:** - -Converts color data from the RGBA8888 format into the RGB565 format. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
colorIndicates the color data with the 32-bit color depth, which is defined by Color32.
- -**Returns:** - -Returns the RGB565 color data. - -## ColorTo32\(\) \[1/2\] - -``` -static uint32_t OHOS::Color::ColorTo32 ([Color16](OHOS-Color16.md) color, uint8_t alpha ) -``` - - **Description:** - -Converts color data with the 16-bit color depth into the RGBA8888 format. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
colorIndicates the color data with the 16-bit color depth, which is defined by Color16.
alphaIndicates the alpha, that is, how opaque each pixel is.
- -**Returns:** - -Returns the RGBA8888 color data. - -## ColorTo32\(\) \[2/2\] - -``` -static uint32_t OHOS::Color::ColorTo32 ([ColorType](OHOS-Color32.md) color) -``` - - **Description:** - -Converts color data into the RGBA8888 format. - -The color data definition varies according to the color depth. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
colorIndicates the color data, which is defined by ColorType.
- -**Returns:** - -Returns the RGBA8888 color data. - -## Cross\(\) - -``` -T [OHOS::Vector2](OHOS-Vector2-T.md)< T >::Cross (const [Vector2](OHOS-Vector2-T.md)< T > & other) const -``` - - **Description:** - -Calculates the cross product of the two-dimensional vector and another two-dimensional vector. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
otherIndicates the two-dimensional vector to be used for calculation.
- -**Returns:** - -Returns the cross product. - -## CubicEaseIn\(\) - -``` -static int16_t OHOS::EasingEquation::CubicEaseIn (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime ) -``` - - **Description:** - -Eases in shaping like a cubic curve. - -**t^3** is the equation for a cubic easing. The animation starts slowly from zero velocity and accelerates fast towards the end. The acceleration change is similar to a cubic curve. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
startPosIndicates the start value of this animation.
endPosIndicates the end value of this animation.
curTimeIndicates the current time of this animation.
durationTimeIndicates the total duration of this animation.
- -**Returns:** - -Returns the value for the current time. - -**See also:** - -[CubicEaseOut](Graphic.md#ga529a948d9f6711a5f2726af5f10d7a48) | [CubicEaseInOut](Graphic.md#gad99ea4ed828f274f111f492eea123cb4) - -## CubicEaseInOut\(\) - -``` -static int16_t OHOS::EasingEquation::CubicEaseInOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime ) -``` - - **Description:** - -Eases in and then out shaping like a cubic curve. - -**t^3** is the equation for a cubic easing. The animation accelerates slowly until halfway and decelerates slowly towards the end. The acceleration change is similar to a cubic curve. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
startPosIndicates the start value of this animation.
endPosIndicates the end value of this animation.
curTimeIndicates the current time of this animation.
durationTimeIndicates the total duration of this animation.
- -**Returns:** - -Returns the value for the current time. - -**See also:** - -[CubicEaseIn](Graphic.md#ga5c91a83cc424fb7e4e1f40cae6b3be66) | [CubicEaseOut](Graphic.md#ga529a948d9f6711a5f2726af5f10d7a48) - -## CubicEaseOut\(\) - -``` -static int16_t OHOS::EasingEquation::CubicEaseOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime ) -``` - - **Description:** - -Eases out shaping like a cubic curve. - -**t^3** is the equation for a cubic easing. The animation starts fast and decelerates slowly towards the end. The acceleration change is similar to a cubic curve. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
startPosIndicates the start value of this animation.
endPosIndicates the end value of this animation.
curTimeIndicates the current time of this animation.
durationTimeIndicates the total duration of this animation.
- -**Returns:** - -Returns the value for the current time. - -**See also:** - -[CubicEaseIn](Graphic.md#ga5c91a83cc424fb7e4e1f40cae6b3be66) | [CubicEaseInOut](Graphic.md#gad99ea4ed828f274f111f492eea123cb4) - -## Cyan\(\) - -``` -static [ColorType](OHOS-Color32.md) OHOS::Color::Cyan () -``` - - **Description:** - -Obtains the color data of cyan. - -**Returns:** - -Returns the color data. - -## DeleteDataSerial\(\) - -``` -virtual bool OHOS::UIChart::DeleteDataSerial ([UIChartDataSerial](OHOS-UIChartDataSerial.md) * dataSerial) -``` - - **Description:** - -Deletes a data set. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
dataSerialIndicates the pointer to the data set class. For details, see UIChartDataSerial.
- -**Returns:** - -Returns **true** if the data set is deleted successfully; returns **false** otherwise. - -**See also:** - -[AddDataSerial](Graphic.md#gafc510047aac4e7eebd5b229e726ef762) - -## Determinant\(\) - -``` -T [OHOS::Matrix3](OHOS-Matrix3-T.md)< T >::Determinant -``` - - **Description:** - -Obtains the determinant of the matrix. - -**Returns:** - -Returns the determinant. - -## Disable\(\) - -``` -void OHOS::UIButton::Disable () -``` - - **Description:** - -Disables this button. - -## DisplayLeadingZero\(\) - -``` -void OHOS::UIDigitalClock::DisplayLeadingZero (bool displayLeadingZero) -``` - - **Description:** - -Sets whether to add **0** before the hour of this digital clock. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
displayLeadingZeroSpecifies whether to add 0 before the hour of this digital clock. true indicates that 0 is added, and false indicates the opposite case.
- -## Dot\(\) - -``` -T [OHOS::Vector2](OHOS-Vector2-T.md)< T >::Dot (const [Vector2](OHOS-Vector2-T.md)< T > & other) const -``` - - **Description:** - -Calculates the scalar product of the two-dimensional vector and another two-dimensional vector. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
otherIndicates the two-dimensional vector to be used for calculation.
- -**Returns:** - -Returns the scalar product. - -## DragEvent\(\) - -``` -OHOS::DragEvent::DragEvent (const [Point](OHOS-Point.md) & newPos, const [Point](OHOS-Point.md) & lastPos, const [Point](OHOS-Point.md) & totalLen ) -``` - - **Description:** - -A constructor used to create a **[DragEvent](OHOS-DragEvent.md)** instance. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
newPosIndicates the new position in the drag event.
lastPosIndicates the last position in the drag event.
totalLenIndicates the distance that the view has been dragged, including the movement on the x-axis and y-axis.
- -## DrawArc\(\) - -``` -void OHOS::UICanvas::DrawArc (const [Point](OHOS-Point.md) & center, uint16_t radius, int16_t startAngle, int16_t endAngle, const [Paint](OHOS-Paint.md) & paint ) -``` - - **Description:** - -Draws an arc. - -Only stroke is supported. When the start angle is smaller than the end angle, the sector is drawn clockwise. Otherwise, the sector is drawn counterclockwise. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
centerIndicates the coordinates of the arc's center.
radiusIndicates the radius of the arc.
startAngleIndicates the start angle of the arc. Value 0 indicates the 12-o'clock direction, and 90 indicates the 3-o'clock direction.
endAngleIndicates the end angle of the arc. Value 0 indicates the 12-o'clock direction, and 90 indicates the 3-o'clock direction.
paintIndicates the arc style. For details, see Paint.
- -## DrawCircle\(\) - -``` -void OHOS::UICanvas::DrawCircle (const [Point](OHOS-Point.md) & center, uint16_t radius, const [Paint](OHOS-Paint.md) & paint ) -``` - - **Description:** - -Draws a circle. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
centerIndicates the coordinates of the circle center.
radiusIndicates the radius of the circle.
paintIndicates the circle style. For details, see Paint.
- -## DrawCurve\(\) \[1/2\] - -``` -void OHOS::UICanvas::DrawCurve (const [Point](OHOS-Point.md) & control1, const [Point](OHOS-Point.md) & control2, const [Point](OHOS-Point.md) & endPoint, const [Paint](OHOS-Paint.md) & paint ) -``` - - **Description:** - -Draws a cubic Bezier curve. - -If [SetStartPosition](Graphic.md#gaca35fe1a1d344eab80ecb1425a74a91a) is not used to set the coordinates of the start point of the curve, the drawing starts from the end point of the last line. Currently, the opacity cannot be set, and the maximum line width is **3**. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
control1Indicates the coordinates of the first control point of the cubic Bezier curve.
control2Indicates the coordinates of the second control point of the cubic Bezier curve.
endPointIndicates the coordinates of the end point of the cubic Bezier curve.
paintIndicates the curve style. For details, see Paint.
- -## DrawCurve\(\) \[2/2\] - -``` -void OHOS::UICanvas::DrawCurve (const [Point](OHOS-Point.md) & startPoint, const [Point](OHOS-Point.md) & control1, const [Point](OHOS-Point.md) & control2, const [Point](OHOS-Point.md) & endPoint, const [Paint](OHOS-Paint.md) & paint ) -``` - - **Description:** - -Draws a cubic Bezier curve from the start point coordinates. - -Currently, the opacity cannot be set, and the maximum line width is **3**. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
startPointIndicates the coordinates of the start point of the cubic Bezier curve.
control1Indicates the coordinates of the first control point of the cubic Bezier curve.
control2Indicates the coordinates of the second control point of the cubic Bezier curve.
endPointIndicates the coordinates of the end point of the cubic Bezier curve.
paintIndicates the curve style. For details, see Paint.
- -## DrawImage\(\) - -``` -void OHOS::UICanvas::DrawImage (const [Point](OHOS-Point.md) & startPoint, const char * image, const [Paint](OHOS-Paint.md) & paint ) -``` - - **Description:** - -Draws an image. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
startPointIndicates the coordinates of the start point.
imageIndicates the pointer to the image source.
paintIndicates the image style. For details, see Paint.
- -## DrawLabel\(\) - -``` -void OHOS::UICanvas::DrawLabel (const [Point](OHOS-Point.md) & startPoint, const char * text, uint16_t maxWidth, const [FontStyle](OHOS-UICanvas-FontStyle.md) & fontStyle, const [Paint](OHOS-Paint.md) & paint ) -``` - - **Description:** - -Draws text. - -Only fill is supported. If the text length exceeds the value of **maxWidth**, the text will be truncated. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
startPointIndicates the coordinates of the start point.
textIndicates the pointer to the text content.
maxWidthIndicates the maximum width of the text that can be displayed. If the maximum width is exceeded, the text is truncated.
fontStyleIndicates the text layout and font style. For details, see FontStyle.
paintIndicates the text style. For details, see Paint.
- -## DrawLine\(\) \[1/2\] - -``` -void OHOS::UICanvas::DrawLine (const [Point](OHOS-Point.md) & endPoint, const [Paint](OHOS-Paint.md) & paint ) -``` - - **Description:** - -Draws a straight line. - -If [SetStartPosition](Graphic.md#gaca35fe1a1d344eab80ecb1425a74a91a) is not used to set the coordinates of the start point of the line, the drawing starts from the end point of the last line. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
endPointIndicates the end point of the straight line.
paintIndicates the straight line style. For details, see Paint.
- -## DrawLine\(\) \[2/2\] - -``` -void OHOS::UICanvas::DrawLine (const [Point](OHOS-Point.md) & startPoint, const [Point](OHOS-Point.md) & endPoint, const [Paint](OHOS-Paint.md) & paint ) -``` - - **Description:** - -Draws a straight line from the coordinates of the start point. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
startPointIndicates the coordinates of the start point.
endPointIndicates the coordinates of the end point.
paintIndicates the straight line style. For details, see Paint.
- -## DrawRect\(\) - -``` -void OHOS::UICanvas::DrawRect (const [Point](OHOS-Point.md) & startPoint, int16_t height, int16_t width, const [Paint](OHOS-Paint.md) & paint ) -``` - - **Description:** - -Draws a rectangle. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
startPointIndicates the coordinates of the point at the upper left corner of the rectangle.
heightIndicates the height of the rectangle.
widthIndicates the width of the rectangle.
paintIndicates the rectangle style. For details, see Paint.
- -## DrawSector\(\) - -``` -void OHOS::UICanvas::DrawSector (const [Point](OHOS-Point.md) & center, uint16_t radius, int16_t startAngle, int16_t endAngle, const [Paint](OHOS-Paint.md) & paint ) -``` - - **Description:** - -Draws a sector. - -When the start angle is smaller than the end angle, the sector is drawn clockwise. Otherwise, the sector is drawn counterclockwise. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
centerIndicates the coordinates of the sector's center.
radiusIndicates the radius of the sector.
startAngleIndicates the start angle of the sector. Value 0 indicates the 12-o'clock direction, and 90 indicates the 3-o'clock direction.
endAngleIndicates the end angle of the sector. Value 0 indicates the 12-o'clock direction, and 90 indicates the 3-o'clock direction.
paintIndicates the sector style. For details, see Paint.
- -## DumpDomNode\(\) - -``` -char* OHOS::UIDumpDomTree::DumpDomNode (const char * id) -``` - - **Description:** - -Exports information about a specified DOM node. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
idIndicates the pointer to the DOM node ID.
- -**Returns:** - -Returns a character string about the DOM node information. The character string memory is released by invoking **cJSON\_free\(\)**. - -## DumpDomTree\(\) \[1/2\] - -``` -bool OHOS::UIDumpDomTree::DumpDomTree (const char * id) -``` - - **Description:** - -Exports information about a DOM tree starting from a specified DOM node and saves the information to the default path. The default path is **DEFAULT\_DUMP\_DOM\_TREE\_PATH**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
idIndicates the pointer to the DOM node ID.
- -**Returns:** - -Returns **true** if the operation is successful; returns **false** otherwise. - -## DumpDomTree\(\) \[2/2\] - -``` -bool OHOS::UIDumpDomTree::DumpDomTree (const char * id, const char * path ) -``` - - **Description:** - -Exports information about a DOM tree starting from a specified DOM node and saves the information to a specified path. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the pointer to the DOM node ID.
pathIndicates the pointer to the specified path.
- -**Returns:** - -Returns **true** if the operation is successful; returns **false** otherwise. - -## Enable\(\) - -``` -void OHOS::UIButton::Enable () -``` - - **Description:** - -Enables this button. - -## EnableAutoAlign\(\) - -``` -void OHOS::UIList::EnableAutoAlign (bool state) -``` - - **Description:** - -Sets the automatic alignment state for this list. When a scroll stops, a child view is selected and its position is automatically aligned with the preset position. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
stateIndicates the automatic alignment state. true indicates this state is enabled, and false indicates the opposite case.
- -## EnableBackground\(\) - -``` -void OHOS::UIAbstractProgress::EnableBackground (bool enable) -``` - - **Description:** - -Sets whether the background of the progress bar is visible. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
enableSpecifies whether the background of the progress bar is visible. true (the default value) indicates that the background is visible, and false indicates the opposite case.
- -## EnableBottomPoint\(\) - -``` -void OHOS::UIChartDataSerial::EnableBottomPoint (bool enable) -``` - - **Description:** - -Enables the feature of drawing the bottom point of a polyline. If there are multiple bottom points, only the first one is drawn. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
enableSpecifies whether to draw the bottom point. Value true means to draw the bottom point, and value false means not to draw the bottom point.
- -## EnableGradient\(\) - -``` -void OHOS::UIChartDataSerial::EnableGradient (bool enable) -``` - - **Description:** - -Enables the fill color of a line chart. - -This function applies only to line charts. By default, the area between the polyline and the x-axis is filled. You can use **SetGradientBottom** to modify the filled region. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
enableSpecifies whether to enable the fill color. Value true means to enable the fill color, and value false means to disable the fill color. The default value is false.
- -## EnableHeadPoint\(\) - -``` -void OHOS::UIChartDataSerial::EnableHeadPoint (bool enable) -``` - - **Description:** - -Enables the feature of drawing the frontmost point on a polyline. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
enableSpecifies whether to draw the frontmost point. Value true means to draw the frontmost point, and value false means not to draw the frontmost point.
- -## EnableReverse\(\) - -``` -void OHOS::UIChart::EnableReverse (bool enable) -``` - - **Description:** - -Enables chart reverse. - -After the chart is reversed, the x-axis aligns with the top of the chart. The pixel position corresponding to the data point remains unchanged. Complementary filling is performed on the chart \(only the part that is not filled previously will be filled\). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
enableSpecifies whether to enable chart reverse. Value true means to enable chart reverse, and value false means not to enable chart reverse. The default value is false.
- -## EnableSecond\(\) - -``` -void OHOS::UITimePicker::EnableSecond (bool state) -``` - - **Description:** - -Sets whether to enable seconds in the time picker. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
stateSpecifies whether to enable seconds in the time picker. Value true means to enable seconds, and value false means to disable seconds. The default value is false.
- -## EnableSmooth\(\) - -``` -void OHOS::UIChartDataSerial::EnableSmooth (bool smooth) -``` - - **Description:** - -Sets whether to smooth a polyline. - -This function applies only to line charts. After the smoothing, some data is discarded. Therefore, the polyline does not pass through all data points. If **smooth** is set to **true**, the filling color, top point, and bottom point of a line chart have deviations. Therefore, you are advised not to use these functions at the same time. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
smoothSpecifies whether to smooth a polyline. Value true means to smooth a polyline, and value false means not to smooth a polyline. The default value is false.
- -## EnableTopPoint\(\) - -``` -void OHOS::UIChartDataSerial::EnableTopPoint (bool enable) -``` - - **Description:** - -Enables the feature of drawing the top point of a polyline. If there are multiple top points, only the first one is drawn. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
enableSpecifies whether to draw the top point. Value true means to draw the top point, and value false means not to draw the top point.
- -## End\(\) - -``` -const [ListNode](OHOS-ListNode-T.md)* [OHOS::List](OHOS-List-T.md)< T >::End () const -``` - - **Description:** - -Obtains the end node address of a linked list. - -**Returns:** - -Returns the end node address. - -## Event\(\) \[1/2\] - -``` -OHOS::Event::Event () -``` - - **Description:** - -A default constructor used to create an **[Event](OHOS-Event.md)** instance. - -## Event\(\) \[2/2\] - -``` -OHOS::Event::Event (const [Point](OHOS-Point.md) & curPos) -``` - - **Description:** - -A constructor used to create an **[Event](OHOS-Event.md)** instance. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
posIndicates the position where the event occurs.
- -## FindSubView\(\) - -``` -static bool OHOS::RootView::FindSubView (const [UIView](OHOS-UIView.md) & parentView, const [UIView](OHOS-UIView.md) * subView ) -``` - - **Description:** - -Checks whether the target view is one of the child views of the specified parent view. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
parentViewIndicates the specified parent view.
subViewIndicates the target child view.
- -**Returns:** - -Returns **true** if the target view is available; returns ** false** otherwise. - -## FlexLayout\(\) - -``` -OHOS::FlexLayout::FlexLayout () -``` - - **Description:** - -A default constructor used to create a **[FlexLayout](OHOS-FlexLayout.md)** instance. - -## Format\(\) - -``` -virtual bool OHOS::TextFormatter::Format (int16_t value, char * outText, uint16_t textLen ) -``` - - **Description:** - -Converts the input integer into a character string for output. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
valueIndicates the input integer.
outTextIndicates the pointer to the converted string.
textLenIndicates the length of the string.
- -## Front\(\) - -``` -const T [OHOS::List](OHOS-List-T.md)< T >::Front () const -``` - - **Description:** - -Obtains the head node data of a linked list. - -**Returns:** - -Returns the head node data. - -## GetAlign\(\) - -``` -[UITextLanguageAlignment](Graphic.md#ga3f99b58f731a37cacde72d5e0c934593) OHOS::UILabelButton::GetAlign () const -``` - - **Description:** - -Obtains the alignment mode of this text. - -**Returns:** - -Returns the text alignment mode, as defined in **UITextLanguageAlignment**. - -## GetAllChildRelativeRect\(\) - -``` -[Rect](OHOS-Rect.md) OHOS::UIViewGroup::GetAllChildRelativeRect () const -``` - - **Description:** - -Obtains the rectangle area of a new view group after being adaptive to the size of all child views. - -**Returns:** - -Returns the rectangle area of the new view group. - -## GetArcTextCenter\(\) - -``` -[Point](OHOS-Point.md) OHOS::UIArcLabel::GetArcTextCenter () const -``` - - **Description:** - -Obtains the center position of this arc text. - -**Returns:** - -Returns the center position of this arc text. - -## GetArcTextEndAngle\(\) - -``` -int16_t OHOS::UIArcLabel::GetArcTextEndAngle () const -``` - - **Description:** - -Obtains the end angle of this arc text. - -**Returns:** - -Returns the end angle of this arc text. - -## GetArcTextOrientation\(\) - -``` -[TextOrientation](Graphic.md#ga0778527bee4a7ddd8d46395585a5cfb9) OHOS::UIArcLabel::GetArcTextOrientation () const -``` - - **Description:** - -Obtains the orientation of this arc text. - -**Returns:** - -Returns the orientation of this arc text. - -## GetArcTextRadius\(\) - -``` -uint16_t OHOS::UIArcLabel::GetArcTextRadius () const -``` - - **Description:** - -Obtains the radius of this arc text. - -**Returns:** - -Returns the radius of this arc text. - -## GetArcTextStartAngle\(\) - -``` -int16_t OHOS::UIArcLabel::GetArcTextStartAngle () const -``` - - **Description:** - -Obtains the start angle of this arc text. - -**Returns:** - -Returns the start angle of this arc text. - -## GetBackgroundFontId\(\) - -``` -uint16_t OHOS::UIPicker::GetBackgroundFontId () const -``` - - **Description:** - -Obtains the font ID of the background text. - -**Returns:** - -Returns the font ID. - -## GetBackgroundStyle\(\) \[1/2\] - -``` -const [Style](OHOS-Style.md)& OHOS::UIAbstractProgress::GetBackgroundStyle () const -``` - - **Description:** - -Obtains the background style of this progress bar. - -**Returns:** - -Returns the background style. @See SetBackgroundStyle - -## GetBackgroundStyle\(\) \[2/2\] - -``` -int64_t OHOS::UIAbstractProgress::GetBackgroundStyle (uint8_t key) const -``` - - **Description:** - -Obtains the value of a background style of this progress bar. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
keyIndicates the key of the style.
- -**Returns:** - -Returns the value of the style. - -## GetBackgroundTextColor\(\) - -``` -[ColorType](OHOS-Color32.md) OHOS::UIPicker::GetBackgroundTextColor () const -``` - - **Description:** - -Obtains the color of the background text. - -**Returns:** - -Returns the color. - -## GetBackgroundTransparentStyle\(\) - -``` -static [Style](OHOS-Style.md)& OHOS::StyleDefault::GetBackgroundTransparentStyle () -``` - - **Description:** - -Obtains the background transparent style. - -**Returns:** - -Returns the background transparent style. - -## GetBezierInterpolation\(\) - -``` -static int16_t OHOS::Interpolation::GetBezierInterpolation (int16_t t, int16_t u0, int16_t u1, int16_t u2, int16_t u3 ) -``` - - **Description:** - -Obtains the value calculated by the cubic Bezier equation. - -Use \[0, 1024\] instead of \[0, 1\] in the standard Bezier equation. The cubic Bezier equation is **B\(t\) = P0\*\(1-t\)^3 + 3\*P1\*t\*\(1-t\)^2 + 3\*P2\*t^2\*\(1-t\) + P3\*t^3**. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
tIndicates the current change rate of the cubic Bezier curve, within [0, 1024].
u0Indicates the coordinates for the start point of the cubic Bezier curve, within [0, 1024].
u1Indicates the coordinates for the first control point of the cubic Bezier curve, within [0, 1024].
u2Indicates the coordinates for the second control point of the cubic Bezier curve, within [0, 1024].
u3Indicates the coordinates for the end point of the cubic Bezier curve, within [0, 1024].
- -**Returns:** - -Returns the coordinates for the current change rate. - -## GetBlurLevel\(\) - -``` -BlurLevel OHOS::UIImageView::GetBlurLevel () const -``` - - **Description:** - -Obtains the blur level of this image when it is rotated or scaled. - -**Returns:** - -Returns the blur level of this image, as defined in **BlurLevel**. - -## GetBottom\(\) - -``` -int16_t OHOS::Rect::GetBottom () const -``` - - **Description:** - -Obtains the bottom boundary coordinate of the rectangle. - -**Returns:** - -Returns the bottom boundary coordinate. - -## GetBottomPointStyle\(\) - -``` -const [PointStyle](OHOS-UIChartDataSerial-PointStyle.md)& OHOS::UIChartDataSerial::GetBottomPointStyle () const -``` - - **Description:** - -Obtains the style of the bottom point of a polyline. - -**Returns:** - -Returns the style of the point. For details, see [PointStyle](OHOS-UIChartDataSerial-PointStyle.md). - -## GetBoxRect\(\) - -``` -[Rect](OHOS-Rect.md) OHOS::TransformMap::GetBoxRect () const -``` - - **Description:** - -Obtains the minimum rectangle that can contain a polygon. All vertices of the polygon are inside this rectangle. - -**Returns:** - -Returns the minimum rectangle that can contain the polygon. - -## GetBrightColorStyle\(\) - -``` -static [Style](OHOS-Style.md)& OHOS::StyleDefault::GetBrightColorStyle () -``` - - **Description:** - -Obtains the bright color style. - -**Returns:** - -Returns the bright color style. - -## GetBrightStyle\(\) - -``` -static [Style](OHOS-Style.md)& OHOS::StyleDefault::GetBrightStyle () -``` - - **Description:** - -Obtains the bright style. - -**Returns:** - -Returns the bright style. - -## GetButtonInactivedStyle\(\) - -``` -static [Style](OHOS-Style.md)& OHOS::StyleDefault::GetButtonInactivedStyle () -``` - - **Description:** - -Obtains the button inactived style. - -**Returns:** - -Returns the button inactived style. - -## GetButtonPressedStyle\(\) - -``` -static [Style](OHOS-Style.md)& OHOS::StyleDefault::GetButtonPressedStyle () -``` - - **Description:** - -Obtains the button pressed style. - -**Returns:** - -Returns the button pressed style. - -## GetButtonReleasedStyle\(\) - -``` -static [Style](OHOS-Style.md)& OHOS::StyleDefault::GetButtonReleasedStyle () -``` - - **Description:** - -Obtains the button released style. - -**Returns:** - -Returns the button released style. - -## GetButtonStyle\(\) - -``` -[ButtonStyle](OHOS-ButtonStyle.md)& OHOS::Theme::GetButtonStyle () -``` - - **Description:** - -Obtains the style of this button. - -**Returns:** - -Returns the button style. - -## GetCenterPosition\(\) - -``` -[Point](OHOS-Point.md) OHOS::UICircleProgress::GetCenterPosition () const -``` - - **Description:** - -Obtains the coordinates of the center point for this circular progress bar. - -The coordinates of the center point refer to the position relative to the view. - -**Returns:** - -Returns the coordinates of the center point. - -**See also:** - -[SetCenterPosition](Graphic.md#ga6cf6b8ab0934ce8c0ea1821da0791317) - -## GetChildById\(\) \[1/2\] - -``` -virtual [UIView](OHOS-UIView.md)* OHOS::UIView::GetChildById (const char * id) const -``` - - **Description:** - -Obtains the child view of a specified ID. - -Reimplemented in [OHOS::UIViewGroup](Graphic.md#gae9f6ddb5819392546463d6371147c486). - -**Returns:** - -Returns the pointer to the child view. - -## GetChildById\(\) \[2/2\] - -``` -[UIView](OHOS-UIView.md)* OHOS::UIViewGroup::GetChildById (const char * id) const -``` - - **Description:** - -Obtains the target child view with a specified ID. - -Reimplemented from [OHOS::UIView](Graphic.md#ga0573aa25307c22319db4629781b5cad2). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
idIndicates the pointer to the ID of the target child view.
- -**Returns:** - -Returns the target child view if available; returns **nullptr** otherwise. - -## GetChildrenHead\(\) - -``` -[UIView](OHOS-UIView.md)* OHOS::UIViewGroup::GetChildrenHead () const -``` - - **Description:** - -Obtains the first child view in this view group. - -**Returns:** - -Returns the first child view. - -## GetChildrenTail\(\) - -``` -[UIView](OHOS-UIView.md)* OHOS::UIViewGroup::GetChildrenTail () const -``` - - **Description:** - -Obtains the last child view in this view group. - -**Returns:** - -Returns the last child view. - -## GetClockWise\(\) - -``` -bool OHOS::TransformMap::GetClockWise () const -``` - - **Description:** - -Checks whether the vertex coordinates of a polygon are clockwise. - -**Returns:** - -Returns **true** if the vertex coordinates are clockwise; returns **false** otherwise. - -## GetColorFromRGB\(\) - -``` -static [ColorType](OHOS-Color32.md) OHOS::Color::GetColorFromRGB (uint8_t r8, uint8_t g8, uint8_t b8 ) -``` - - **Description:** - -Obtains the color based on the RGB color value. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
r8Indicates the intensity of red.
g8Indicates the intensity of green.
b8Indicates the intensity of blue.
- -**Returns:** - -Returns the color data generated. - -## GetColorFromRGBA\(\) - -``` -static [ColorType](OHOS-Color32.md) OHOS::Color::GetColorFromRGBA (uint8_t r8, uint8_t g8, uint8_t b8, uint8_t alpha ) -``` - - **Description:** - -Obtains the color based on the RGBA color value. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
r8Indicates the intensity of red.
g8Indicates the intensity of green.
b8Indicates the intensity of blue.
alphaIndicates the alpha, that is, how opaque each pixel is.
- -**Returns:** - -Returns the color data generated. - -## GetContentRect\(\) \[1/2\] - -``` -virtual [Rect](OHOS-Rect.md) OHOS::UIView::GetContentRect () -``` - - **Description:** - -Obtains the content of the absolute rectangle area of the view. This area excludes padding. - -Reimplemented in [OHOS::UIButton](Graphic.md#ga93994f4d735e4f9a7d3e7d737e2c620c). - -**Returns:** - -Returns the content of the absolute rectangle area. - -## GetContentRect\(\) \[2/2\] - -``` -virtual [Rect](OHOS-Rect.md) OHOS::UIButton::GetContentRect () -``` - - **Description:** - -Obtains a rectangular area that contains coordinate information. - -Reimplemented from [OHOS::UIView](Graphic.md#ga9db88eae712676359d02a92be14fa316). - -**Returns:** - -Returns the rectangle area. - -## GetCount\(\) \[1/2\] - -``` -virtual uint16_t OHOS::TextAdapter::GetCount () -``` - - **Description:** - -Obtains the **data** size of the [UILabel](OHOS-UILabel.md) adapter. - -Implements [OHOS::AbstractAdapter](Graphic.md#ga67021b360d4097c475d5e24519b5276d). - -**Returns:** - -Returns the **data** size of the [UILabel](OHOS-UILabel.md) adapter. - -## GetCount\(\) \[2/2\] - -``` -virtual uint16_t OHOS::AbstractAdapter::GetCount () -``` - - **Description:** - -Obtains the number of adapter data items. - -Implemented in [OHOS::TextAdapter](Graphic.md#gaa8d1098628c391a687b08f4ccdba0a4d). - -**Returns:** - -Returns the number of adapter data items. - -## GetCurImageSrc\(\) - -``` -const [Image](OHOS-Image.md)* OHOS::UIButton::GetCurImageSrc () const -``` - - **Description:** - -Obtains the image for the current button state. - -**Returns:** - -Returns the image for the current button state. - -## GetCurrent\(\) - -``` -[Theme](OHOS-Theme.md)* OHOS::ThemeManager::GetCurrent () -``` - - **Description:** - -Obtains the current screen theme of this application. - -**Returns:** - -Returns the current theme if available; returns **nullptr** otherwise. - -## GetCurrentHour\(\) - -``` -uint8_t OHOS::UIAbstractClock::GetCurrentHour () const -``` - - **Description:** - -Obtains the current number of hours. - -**Returns:** - -Returns the current number of hours. - -## GetCurrentMinute\(\) - -``` -uint8_t OHOS::UIAbstractClock::GetCurrentMinute () const -``` - - **Description:** - -Obtains the current number of minutes. - -**Returns:** - -Returns the current number of minutes. - -## GetCurrentPage\(\) - -``` -uint16_t OHOS::UISwipeView::GetCurrentPage () const -``` - - **Description:** - -Obtains the current tab index. - -**Returns:** - -Returns the current tab index. - -## GetCurrentPos\(\) - -``` -const [Point](OHOS-Point.md)& OHOS::Event::GetCurrentPos () const -``` - - **Description:** - -Obtains the position where an event occurs. - -**Returns:** - -Returns the position. - -## GetCurrentSecond\(\) - -``` -uint8_t OHOS::UIAbstractClock::GetCurrentSecond () const -``` - - **Description:** - -Obtains the current number of seconds. - -**Returns:** - -Returns the current number of seconds. - -## GetCurrentView\(\) - -``` -[UIView](OHOS-UIView.md)* OHOS::UISwipeView::GetCurrentView () const -``` - - **Description:** - -Obtains the current view. - -**Returns:** - -Returns the current view. - -## GetData\(\) - -``` -const T* [OHOS::Matrix3](OHOS-Matrix3-T.md)< T >::GetData () const -``` - - **Description:** - -Obtains the 3 x 3 matrix data. - -**Returns:** - -Returns the 3 x 3 matrix data. - -## GetDataCount\(\) - -``` -uint16_t OHOS::UIChartDataSerial::GetDataCount () const -``` - - **Description:** - -Obtains the number of data points available in the data set. - -**Returns:** - -Returns the number of data points. - -## GetDefaultStyle\(\) - -``` -static [Style](OHOS-Style.md)& OHOS::StyleDefault::GetDefaultStyle () -``` - - **Description:** - -Obtains the default style. - -**Returns:** - -Returns the default style. - -## GetDeltaX\(\) - -``` -int16_t OHOS::DragEvent::GetDeltaX () const -``` - - **Description:** - -Obtains the difference between the current position and the last position of the view in the x-axis. - -**Returns:** - -Returns the different in the x-aix. - -## GetDeltaY\(\) - -``` -int16_t OHOS::DragEvent::GetDeltaY () const -``` - - **Description:** - -Obtains the difference between the current position and the last position of the view in the y-axis. - -**Returns:** - -Returns the different in the y-aix. - -## GetDirect\(\) \[1/4\] - -``` -[UITextLanguageDirect](Graphic.md#ga0c108f97781843f67c101b47b6c00cf0) OHOS::UIArcLabel::GetDirect () -``` - - **Description:** - -Obtains the direction of this text. - -**Returns:** - -Returns the text direction, as defined in **UITextLanguageDirect**. - -## GetDirect\(\) \[2/4\] - -``` -[UITextLanguageDirect](Graphic.md#ga0c108f97781843f67c101b47b6c00cf0) OHOS::Text::GetDirect () const -``` - - **Description:** - -Obtains the direction of this text. - -**Returns:** - -Returns the text direction, as defined in **UITextLanguageDirect**. - -## GetDirect\(\) \[3/4\] - -``` -[UITextLanguageDirect](Graphic.md#ga0c108f97781843f67c101b47b6c00cf0) OHOS::UILabelButton::GetDirect () const -``` - - **Description:** - -Obtains the direction of this text. - -**Returns:** - -Returns the text direction, as defined in **UITextLanguageDirect**. - -## GetDirect\(\) \[4/4\] - -``` -[UITextLanguageDirect](Graphic.md#ga0c108f97781843f67c101b47b6c00cf0) OHOS::UILabel::GetDirect () const -``` - - **Description:** - -Obtains the direction of this text. - -**Returns:** - -Returns the text direction, as defined in **UITextLanguageDirect**. - -## GetDirection\(\) \[1/3\] - -``` -uint8_t OHOS::UIAbstractScroll::GetDirection () const -``` - - **Description:** - -Obtains the scroll direction. - -**Returns:** - -Returns the scroll direction, either **HORIZONTAL** or **VERTICAL**. - -## GetDirection\(\) \[2/3\] - -``` -uint8_t OHOS::UISwipeView::GetDirection () const -``` - - **Description:** - -Obtains the dragging direction. - -**Returns:** - -Returns the dragging direction. - -## GetDirection\(\) \[3/3\] - -``` -[Direction](Graphic.md#ga4a7a2c192206c8b18379f42a5fd176eb) OHOS::UIBoxProgress::GetDirection () const -``` - - **Description:** - -Obtains the direction of this progress bar. - -**Returns:** - -Returns the direction of this progress bar, as defined in [Direction](Graphic.md#ga4a7a2c192206c8b18379f42a5fd176eb). - -**See also:** - -[SetDirection](Graphic.md#ga3e2e7d0c37b4945a3f4f456c20cb0177) - -## GetDisplayMode\(\) - -``` -[DisplayMode](Graphic.md#gabe3b64b11e5bf5d7b54e1039e40f306b) OHOS::UIDigitalClock::GetDisplayMode () const -``` - - **Description:** - -Obtains the display mode of this digital clock. - -**Returns:** - -Returns the display mode of this digital clock. - -## GetDragACCLevel\(\) - -``` -uint8_t OHOS::UIAbstractScroll::GetDragACCLevel () const -``` - - **Description:** - -Obtains the drag acceleration. - -**Returns:** - -Returns the drag acceleration. - -## GetDragDirection\(\) - -``` -uint8_t OHOS::DragEvent::GetDragDirection () const -``` - - **Description:** - -Obtains the direction in the drag event. - -**Returns:** - -Returns the direction. Available values are as follows: **0** indicates dragging from left to right. **1** indicates dragging from right to left. **2** indicates dragging from top to bottom. **3** indicates dragging from bottom to top. - -## GetEllipsisIndex\(\) - -``` -uint16_t OHOS::Text::GetEllipsisIndex (const [Rect](OHOS-Rect.md) & textRect, const [Style](OHOS-Style.md) & style ) -``` - - **Description:** - -Obtains the index of the character from where text will be replaced by ellipses based on the text rectangle and style. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
textRectIndicates the text rectangle.
styleIndicates the text style.
- -## GetEndAngle\(\) - -``` -int16_t OHOS::UICircleProgress::GetEndAngle () const -``` - - **Description:** - -Obtains the end angle. - -**Returns:** - -Returns the end angle. - -**See also:** - -[SetEndAngle](Graphic.md#ga831186bf208f8236b006b13cc122c82c) - -## GetFillColor\(\) \[1/2\] - -``` -[ColorType](OHOS-Color32.md) OHOS::Paint::GetFillColor () const -``` - - **Description:** - -Obtains the fill color. - -**Returns:** - -Returns the fill color. - -**See also:** - -[SetFillColor](Graphic.md#gab1b0e3a5e21ce2ec8454311ed31956ae) - -## GetFillColor\(\) \[2/2\] - -``` -[ColorType](OHOS-Color32.md) OHOS::UIChartDataSerial::GetFillColor () const -``` - - **Description:** - -Obtains the fill color of the data set. - -**Returns:** - -Returns the fill color. - -**See also:** - -[SetFillColor](Graphic.md#gac620b9878a5e28d066dffbcd6145539c) - -## GetFontId\(\) \[1/5\] - -``` -uint8_t OHOS::TextAdapter::GetFontId () const -``` - - **Description:** - -Obtains font ID. - -**Returns:** - -Returns the font ID. For details, see **UITextLanguageFontId**. - -## GetFontId\(\) \[2/5\] - -``` -uint8_t OHOS::Text::GetFontId () const -``` - - **Description:** - -Obtains the font ID. - -**Returns:** - -Returns the front ID. - -## GetFontId\(\) \[3/5\] - -``` -uint8_t OHOS::UIArcLabel::GetFontId () const -``` - - **Description:** - -Obtains the font ID composed of font name and size. - -**Returns:** - -Returns the front ID of this arc label. - -## GetFontId\(\) \[4/5\] - -``` -uint8_t OHOS::UILabelButton::GetFontId () const -``` - - **Description:** - -Obtains the font ID. - -**Returns:** - -Returns the front ID composed of the font name and size. - -## GetFontId\(\) \[5/5\] - -``` -uint8_t OHOS::UILabel::GetFontId () const -``` - - **Description:** - -Obtains the font ID composed of font name and size. - -**Returns:** - -Returns the front ID of this label. - -## GetForegroundStyle\(\) \[1/2\] - -``` -const [Style](OHOS-Style.md)& OHOS::UIAbstractProgress::GetForegroundStyle () const -``` - - **Description:** - -Obtains the foreground style of this progress bar. - -**Returns:** - -Returns the foreground style. @See SetForegroundStyle - -## GetForegroundStyle\(\) \[2/2\] - -``` -int64_t OHOS::UIAbstractProgress::GetForegroundStyle (uint8_t key) const -``` - - **Description:** - -Obtains the value of a foreground style of this progress bar. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
keyIndicates the key of the style.
- -**Returns:** - -Returns the value of the style. - -## GetFPS\(\) - -``` -static float OHOS::SysInfo::GetFPS () -``` - - **Description:** - -Obtains the FPS data. - -**Returns:** - -Returns the FPS data. - -## GetFPSCalculateType\(\) - -``` -[FPSCalculateType](Graphic.md#ga75d850e3abff6c2f617b689a0cb9a3d1) OHOS::SysInfo::OnFPSChangedListener::GetFPSCalculateType () const -``` - - **Description:** - -Obtains the FPS sampling type. - -**Returns:** - -Returns the FPS sampling type. For details, see [FPSCalculateType](Graphic.md#ga75d850e3abff6c2f617b689a0cb9a3d1). - -## GetHandCurrentAngle\(\) - -``` -uint16_t OHOS::UIAnalogClock::GetHandCurrentAngle ([HandType](Graphic.md#ga13cf64ea5bd39550976aaf65b1381edf) type) const -``` - - **Description:** - -Obtains the current rotation angle of the specified clock hand. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
typeIndicates the clock hand type, as enumerated in HandType.
- -**Returns:** - -Returns the current rotation angle of this specified clock hand. - -## GetHandInitAngle\(\) - -``` -uint16_t OHOS::UIAnalogClock::GetHandInitAngle ([HandType](Graphic.md#ga13cf64ea5bd39550976aaf65b1381edf) type) const -``` - - **Description:** - -Obtains the initial rotation angle of the specified clock hand. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
typeIndicates the clock hand type, as enumerated in HandType.
- -**Returns:** - -Returns the initial rotation angle of this specified clock hand. - -## GetHandPosition\(\) - -``` -[Point](OHOS-Point.md) OHOS::UIAnalogClock::GetHandPosition ([HandType](Graphic.md#ga13cf64ea5bd39550976aaf65b1381edf) type) const -``` - - **Description:** - -Obtains the position of a specified clock hand. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
typeIndicates the clock hand type, as enumerated in HandType.
- -**Returns:** - -Returns the position of this specified clock hand. - -## GetHandRotateCenter\(\) - -``` -[Point](OHOS-Point.md) OHOS::UIAnalogClock::GetHandRotateCenter ([HandType](Graphic.md#ga13cf64ea5bd39550976aaf65b1381edf) type) const -``` - - **Description:** - -Obtains the rotation center of a specified clock hand. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
typeIndicates the clock hand type, as enumerated in HandType.
- -**Returns:** - -Returns the rotation center. - -## GetHeader\(\) - -``` -void OHOS::Image::GetHeader ([ImageHeader](OHOS-ImageHeader.md) & header) const -``` - - **Description:** - -Obtains the basic image information, including the image format, width, and height. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
headerIndicates the basic image information.
- -## GetHeadPointStyle\(\) - -``` -const [PointStyle](OHOS-UIChartDataSerial-PointStyle.md)& OHOS::UIChartDataSerial::GetHeadPointStyle () const -``` - - **Description:** - -Obtains the style of the frontmost point on a polyline. - -**Returns:** - -Returns the style of the point. For details, see [PointStyle](OHOS-UIChartDataSerial-PointStyle.md). - -## GetHeight\(\) \[1/7\] - -``` -uint16_t OHOS::Screen::GetHeight () -``` - - **Description:** - -Obtains the height of this screen. - -**Returns:** - -Returns the screen height. - -## GetHeight\(\) \[2/7\] - -``` -virtual int16_t OHOS::UIView::GetHeight () -``` - - **Description:** - -Obtains the height for the view. - -Reimplemented in [OHOS::UIButton](Graphic.md#ga1f8015706cfc73728696bf2bbd3e833b), [OHOS::UILabel](Graphic.md#ga148f6d32ed06364dbee0190f6ff77b59), [OHOS::UIArcLabel](Graphic.md#ga37dbe21b6a8206460136b18a2d0e3f65), and [OHOS::UIImageView](Graphic.md#gaddc6e68c67782eaad40977c6c2256cdd). - -**Returns:** - -Returns the view height. - -## GetHeight\(\) \[3/7\] - -``` -int16_t OHOS::Rect::GetHeight () const -``` - - **Description:** - -Obtains the rectangle height. - -**Returns:** - -Returns the rectangle height. - -## GetHeight\(\) \[4/7\] - -``` -int16_t OHOS::UIImageView::GetHeight () -``` - - **Description:** - -Obtains the height of this image view. - -Reimplemented from [OHOS::UIView](Graphic.md#ga9b35f4603a561c7a9a29b023a022ac97). - -**Returns:** - -Returns the height of this image view. - -## GetHeight\(\) \[5/7\] - -``` -int16_t OHOS::UIArcLabel::GetHeight () -``` - - **Description:** - -Obtains the height of this arc text. - -Reimplemented from [OHOS::UIView](Graphic.md#ga9b35f4603a561c7a9a29b023a022ac97). - -**Returns:** - -Returns the height of this arc text. - -## GetHeight\(\) \[6/7\] - -``` -int16_t OHOS::UILabel::GetHeight () -``` - - **Description:** - -Obtains the height of this label. - -Reimplemented from [OHOS::UIView](Graphic.md#ga9b35f4603a561c7a9a29b023a022ac97). - -**Returns:** - -Returns the label height. - -## GetHeight\(\) \[7/7\] - -``` -int16_t OHOS::UIButton::GetHeight () -``` - - **Description:** - -Obtains the height of this image. - -Reimplemented from [OHOS::UIView](Graphic.md#ga9b35f4603a561c7a9a29b023a022ac97). - -**Returns:** - -Returns the image height. - -## GetHideCount\(\) - -``` -uint16_t OHOS::UIChartDataSerial::GetHideCount () const -``` - - **Description:** - -Obtains the number of hidden points in the data set. - -**Returns:** - -Returns the number of hidden points. - -**See also:** - -[HidePoint](Graphic.md#ga02cb658da66c73863ac2a49849e23b24) - -## GetHideIndex\(\) - -``` -uint16_t OHOS::UIChartDataSerial::GetHideIndex () const -``` - - **Description:** - -Obtains the index from which the data set starts to hide. - -**Returns:** - -Returns the index. - -**See also:** - -[HidePoint](Graphic.md#ga02cb658da66c73863ac2a49849e23b24) - -## GetHighlightFontId\(\) - -``` -uint16_t OHOS::UIPicker::GetHighlightFontId () const -``` - - **Description:** - -Obtains the font ID of the highlighted text. - -**Returns:** - -Returns the font ID. - -## GetHighlightTextColor\(\) - -``` -[ColorType](OHOS-Color32.md) OHOS::UIPicker::GetHighlightTextColor () const -``` - - **Description:** - -Obtains the color of the highlighted text. - -**Returns:** - -Returns the color of the highlighted text. - -## GetHorAlign\(\) \[1/3\] - -``` -[UITextLanguageAlignment](Graphic.md#ga3f99b58f731a37cacde72d5e0c934593) OHOS::UIArcLabel::GetHorAlign () const -``` - - **Description:** - -Obtains the horizontal alignment mode. - -**Returns:** - -Returns the horizontal alignment mode. - -## GetHorAlign\(\) \[2/3\] - -``` -[UITextLanguageAlignment](Graphic.md#ga3f99b58f731a37cacde72d5e0c934593) OHOS::Text::GetHorAlign () const -``` - - **Description:** - -Obtains the horizontal alignment mode. - -**Returns:** - -Returns the horizontal alignment mode. - -## GetHorAlign\(\) \[3/3\] - -``` -[UITextLanguageAlignment](Graphic.md#ga3f99b58f731a37cacde72d5e0c934593) OHOS::UILabel::GetHorAlign () const -``` - - **Description:** - -Obtains the horizontal alignment mode. - -**Returns:** - -Returns the horizontal alignment mode. - -## GetHorizontalScrollState\(\) - -``` -bool OHOS::UIScrollView::GetHorizontalScrollState () const -``` - - **Description:** - -Checks whether a horizontal scroll is enabled. - -**Returns:** - -Returns **true** if a horizontal scroll is enabled; returns **false** otherwise. - -## GetImageAnimatorImageNum\(\) - -``` -uint8_t OHOS::UIImageAnimatorView::GetImageAnimatorImageNum () const -``` - - **Description:** - -Obtains the number of images. - -**Returns:** - -Returns the number of images. - -## GetImageAnimatorSrc\(\) - -``` -const [ImageAnimatorInfo](OHOS-ImageAnimatorInfo.md)* OHOS::UIImageAnimatorView::GetImageAnimatorSrc () const -``` - - **Description:** - -Obtains the image array of this frame animator. - -**Returns:** - -Returns a pointer to the [ImageAnimatorInfo](OHOS-ImageAnimatorInfo.md) array if the operation is successful; returns **nullptr** otherwise. - -## GetImageInfo\(\) \[1/2\] - -``` -const [ImageInfo](OHOS-ImageInfo.md)* OHOS::Image::GetImageInfo () const -``` - - **Description:** - -Obtains the image information in an array. - -**Returns:** - -Returns the pointer to the image information. - -## GetImageInfo\(\) \[2/2\] - -``` -const [ImageInfo](OHOS-ImageInfo.md)* OHOS::UIImageView::GetImageInfo () const -``` - - **Description:** - -获取图片信息 - -**Returns:** - -图片信息 - -## GetImageX\(\) - -``` -int16_t OHOS::UIButton::GetImageX () const -``` - - **Description:** - -Obtains the x-coordinate of this image. - -**Returns:** - -Returns the x-coordinate of this image. - -## GetImageY\(\) - -``` -int16_t OHOS::UIButton::GetImageY () const -``` - - **Description:** - -Obtains the y-coordinate of this image. - -**Returns:** - -Returns the y-coordinate of this image. - -## GetInstance\(\) \[1/5\] - -``` -static [Screen](OHOS-Screen.md)& OHOS::Screen::GetInstance () -``` - - **Description:** - -Obtains a singleton **[Screen](OHOS-Screen.md)** instance. - -**Returns:** - -Returns the **[Screen](OHOS-Screen.md)** instance. - -## GetInstance\(\) \[2/5\] - -``` -static [ThemeManager](OHOS-ThemeManager.md)& OHOS::ThemeManager::GetInstance () -``` - - **Description:** - -Obtains the singleton instance of the **[ThemeManager](OHOS-ThemeManager.md)** class. - -**Returns:** - -Returns the singleton instance of the **[ThemeManager](OHOS-ThemeManager.md)** class. - -## GetInstance\(\) \[3/5\] - -``` -static [RootView](OHOS-RootView.md)* OHOS::RootView::GetInstance () -``` - - **Description:** - -Obtains a singleton **[RootView](OHOS-RootView.md)** instance. - -**Returns:** - -Returns the singleton **[RootView](OHOS-RootView.md)** instance. - -## GetInstance\(\) \[4/5\] - -``` -static [UIDumpDomTree](OHOS-UIDumpDomTree.md)* OHOS::UIDumpDomTree::GetInstance () -``` - - **Description:** - -Obtains an instance in singleton pattern. - -**Returns:** - -Returns the function instance for exporting DOM information. - -## GetInstance\(\) \[5/5\] - -``` -static [AnimatorManager](OHOS-AnimatorManager.md)* OHOS::AnimatorManager::GetInstance () -``` - - **Description:** - -Obtains the **[AnimatorManager](OHOS-AnimatorManager.md)** instance. - -**Returns:** - -Returns the **[AnimatorManager](OHOS-AnimatorManager.md)** instance. - -## GetInterval\(\) - -``` -virtual uint16_t OHOS::UIRepeatButton::GetInterval () const -``` - - **Description:** - -Obtains the interval between two consecutive click events. - -**Returns:** - -Returns the interval between two consecutive click events. - -## GetKeyId\(\) - -``` -uint16_t OHOS::KeyEvent::GetKeyId () const -``` - - **Description:** - -Obtains the key ID. - -## GetKnobStyle\(\) \[1/2\] - -``` -const [Style](OHOS-Style.md)& OHOS::UISlider::GetKnobStyle () const -``` - - **Description:** - -Obtains the knob style. - -**Returns:** - -Returns the knob style. - -## GetKnobStyle\(\) \[2/2\] - -``` -int64_t OHOS::UISlider::GetKnobStyle (uint8_t key) const -``` - - **Description:** - -Obtains the value of a knob style. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
keyIndicates the key of the style.
- -**Returns:** - -Returns the value of the style. - -## GetKnobWidth\(\) - -``` -int16_t OHOS::UISlider::GetKnobWidth () -``` - - **Description:** - -Obtains the knob width. - -**Returns:** - -Returns the knob width. - -**See also:** - -[SetKnobWidth](Graphic.md#gaf0de71e2d767ccfc3cb41679185a5529) - -## GetLabelPosition\(\) - -``` -[Point](OHOS-Point.md) OHOS::UILabelButton::GetLabelPosition () const -``` - - **Description:** - -Obtains the position of this label relative to the button holding it. - -**Returns:** - -Returns the position of this label. - -## GetLabelStyle\(\) \[1/4\] - -``` -[Style](OHOS-Style.md)& OHOS::Theme::GetLabelStyle () -``` - - **Description:** - -Obtains the style of this label. - -**Returns:** - -Returns the label style. - -## GetLabelStyle\(\) \[2/4\] - -``` -static [Style](OHOS-Style.md)& OHOS::StyleDefault::GetLabelStyle () -``` - - **Description:** - -Obtains the label style. - -**Returns:** - -Returns the label style. - -## GetLabelStyle\(\) \[3/4\] - -``` -const [Style](OHOS-Style.md)& OHOS::UILabelButton::GetLabelStyle () const -``` - - **Description:** - -Obtains the style of this label. - -**Returns:** - -Returns the label style. - -## GetLabelStyle\(\) \[4/4\] - -``` -int64_t OHOS::UILabelButton::GetLabelStyle (uint8_t key) const -``` - - **Description:** - -Obtains the value of a style of this label. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
keyIndicates the key of the style.
- -**Returns:** - -Returns the value of the style. - -## GetLastPoint\(\) - -``` -const [Point](OHOS-Point.md)& OHOS::DragEvent::GetLastPoint () const -``` - - **Description:** - -Obtains the coordinates of the last position in the drag event. - -**Returns:** - -Returns the coordinates of the last position. - -## GetLastRun\(\) - -``` -uint32_t OHOS::Task::GetLastRun () const -``` - - **Description:** - -Obtains the end time of this task. - -**Returns:** - -Returns the end time. - -## GetLatestIndex\(\) - -``` -uint16_t OHOS::UIChartDataSerial::GetLatestIndex () const -``` - - **Description:** - -Obtains the index of the frontmost point \(the latest added or modified data point in a data set\). - -**Returns:** - -Returns the index of the frontmost point. - -## GetLeft\(\) - -``` -int16_t OHOS::Rect::GetLeft () const -``` - - **Description:** - -Obtains the left boundary coordinate of the rectangle. - -**Returns:** - -Returns the left boundary coordinate. - -## GetLibDsc\(\) - -``` -std::string OHOS::GetLibDsc () -``` - - **Description:** - -Obtains the library description of the graphics module. - -**Returns:** - -Returns the library description of the graphics module. - -## GetLineBreakMode\(\) - -``` -uint8_t OHOS::UILabel::GetLineBreakMode () const -``` - - **Description:** - -Obtains the line break mode of this text. - -**Returns:** - -Returns the line break mode. - -## GetLineColor\(\) - -``` -[ColorType](OHOS-Color32.md) OHOS::UIChartDataSerial::GetLineColor () const -``` - - **Description:** - -Obtains the polyline color of the data set in a line chart. - -**Returns:** - -Returns the polyline color of the data set. - -**See also:** - -[SetLineColor](Graphic.md#ga94beac0c71885b8546996271c876f999) - -## GetLoopState\(\) - -``` -bool OHOS::UIList::GetLoopState () const -``` - - **Description:** - -Checks whether this list is in a loop state. - -**Returns:** - -Returns if the list is in the loop state; returns **false** if the list is in the common state. - -## GetMainStyle\(\) - -``` -[Style](OHOS-Style.md)& OHOS::Theme::GetMainStyle () -``` - - **Description:** - -Obtains the basic style. - -**Returns:** - -Returns the basic style. - -## GetMaskedRect\(\) - -``` -[Rect](OHOS-Rect.md) OHOS::UIView::GetMaskedRect () const -``` - - **Description:** - -Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout. - -**Returns:** - -Returns the valid absolute rectangle area. - -## GetMaxScrollDistance\(\) - -``` -uint16_t OHOS::UIAbstractScroll::GetMaxScrollDistance () const -``` - - **Description:** - -Obtains the maximum scroll distance after a finger lifts the screen. - -**Returns:** - -Returns the maximum scroll distance. The default value is **0**, indicating that the scroll distance is not limited. - -## GetMixColor\(\) - -``` -static [ColorType](OHOS-Color32.md) OHOS::Color::GetMixColor ([ColorType](OHOS-Color32.md) c1, [ColorType](OHOS-Color32.md) c2, uint8_t mix ) -``` - - **Description:** - -Mixes two colors \(color 1 and color 2\) based on a specified opacity. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
c1Indicates color 1.
c2Indicates color 2.
mixIndicates the alpha, that is, how opaque each pixel is.
- -**Returns:** - -Returns the color data after mixing. - -## GetName\(\) - -``` -const char* OHOS::UIRadioButton::GetName () const -``` - - **Description:** - -Obtains the name of this radio button. - -**Returns:** - -Returns the name of this radio button, which is a defined character string. Radio buttons sharing the same name are in the same batch from which only one can be selected. - -## GetNextSibling\(\) - -``` -[UIView](OHOS-UIView.md)* OHOS::UIView::GetNextSibling () const -``` - - **Description:** - -Obtains the next sibling view of the view. - -**Returns:** - -Returns the pointer to the next sibling view. - -## GetOnClickListener\(\) - -``` -[OnClickListener](OHOS-UIView-OnClickListener.md)*& OHOS::UIView::GetOnClickListener () -``` - - **Description:** - -Obtains the click event listener for the view. - -**Returns:** - -Returns the click event listener. - -## GetOnDragListener\(\) - -``` -[OnDragListener](OHOS-UIView-OnDragListener.md)*& OHOS::UIView::GetOnDragListener () -``` - - **Description:** - -Obtains the drag event listener for the view. - -**Returns:** - -Returns the drag event listener. - -## GetOnLongPressListener\(\) - -``` -[OnLongPressListener](OHOS-UIView-OnLongPressListener.md)*& OHOS::UIView::GetOnLongPressListener () -``` - - **Description:** - -Obtains the long-press event listener for the view. - -**Returns:** - -Returns the long-press event listener. - -## GetOnSwipeListener\(\) - -``` -[OnSwipeListener](OHOS-UISwipeView-OnSwipeListener.md)*& OHOS::UISwipeView::GetOnSwipeListener () -``` - - **Description:** - -Obtains the listener set for swipe events. - -**Returns:** - -Returns the swipe event listener. - -## GetOpacity\(\) \[1/2\] - -``` -uint8_t OHOS::UIDigitalClock::GetOpacity () const -``` - - **Description:** - -Obtains the opacity of this digital clock. - -**Returns:** - -Returns the opacity of this digital clock, within \[0, 255\]. - -## GetOpacity\(\) \[2/2\] - -``` -uint8_t OHOS::Paint::GetOpacity () const -``` - - **Description:** - -Obtains the opacity. - -**Returns:** - -Returns the opacity. - -**See also:** - -[SetOpacity](Graphic.md#gacd329fb89bbf6f0e3fd4f9a61f4ce60f) - -## GetOrigRect\(\) - -``` -[Rect](OHOS-Rect.md) OHOS::UIView::GetOrigRect () const -``` - - **Description:** - -Obtains the absolute rectangle area of the view. - -**Returns:** - -Returns the absolute rectangle area. - -## GetParent\(\) - -``` -[UIView](OHOS-UIView.md)* OHOS::UIView::GetParent () const -``` - - **Description:** - -Obtains the parent view of the view. - -**Returns:** - -Returns the pointer to the parent view. - -## GetPath\(\) \[1/2\] - -``` -const char* OHOS::Image::GetPath () const -``` - - **Description:** - -Obtains the image path in binary. - -**Returns:** - -Returns the pointer to the image path. - -## GetPath\(\) \[2/2\] - -``` -const char* OHOS::UIImageView::GetPath () const -``` - - **Description:** - -获取图片路径 - -**Returns:** - -图片路径 - -## GetPeakData\(\) - -``` -int16_t OHOS::UIChartDataSerial::GetPeakData () const -``` - - **Description:** - -Obtains the Y value of the top point in a data set. - -The Y value is the data added by users, not the pixel coordinate. - -**Returns:** - -Returns the Y value. - -## GetPeakIndex\(\) - -``` -uint16_t OHOS::UIChartDataSerial::GetPeakIndex () const -``` - - **Description:** - -Obtains the index of the top point in the data set. - -**Returns:** - -Returns the index of the top point. If there are multiple top points, the first one is returned. - -## GetPeriod\(\) - -``` -uint32_t OHOS::Task::GetPeriod () const -``` - - **Description:** - -Obtains the running period of this task. - -**Returns:** - -Returns the running period. - -## GetPickerBackgroundStyle\(\) \[1/2\] - -``` -[Style](OHOS-Style.md)& OHOS::Theme::GetPickerBackgroundStyle () -``` - - **Description:** - -Obtains the background style of this picker. - -**Returns:** - -Returns the background style of this picker. - -## GetPickerBackgroundStyle\(\) \[2/2\] - -``` -static [Style](OHOS-Style.md)& OHOS::StyleDefault::GetPickerBackgroundStyle () -``` - - **Description:** - -Obtains the picker background style. - -**Returns:** - -Returns the picker background style. - -## GetPickerHighlightStyle\(\) \[1/2\] - -``` -[Style](OHOS-Style.md)& OHOS::Theme::GetPickerHighlightStyle () -``` - - **Description:** - -Obtains the highlight style of this picker. - -**Returns:** - -Returns the highlight style of this picker. - -## GetPickerHighlightStyle\(\) \[2/2\] - -``` -static [Style](OHOS-Style.md)& OHOS::StyleDefault::GetPickerHighlightStyle () -``` - - **Description:** - -Obtains the picker highlight style. - -**Returns:** - -Returns the picker highlight style. - -## GetPivot\(\) - -``` -[Point](OHOS-Point.md) OHOS::TransformMap::GetPivot () const -``` - - **Description:** - -Obtains the pivot for the rotation or scaling operation. - -**Returns:** - -Returns the pivot. - -## GetPoint\(\) - -``` -bool OHOS::UIChartDataSerial::GetPoint (uint16_t index, [Point](OHOS-Point.md) & point ) -``` - - **Description:** - -Obtains the coordinates in the chart for a data point in the data set. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
indexIndicates the index of the data point to obtain.
pointIndicates the obtained coordinates. If the data set is not added to the chart, the original value of the data point is printed.
- -**Returns:** - -Returns **true** if the operation is successful; returns **false** otherwise. - -## GetPolygon\(\) - -``` -[Polygon](OHOS-Polygon.md) OHOS::TransformMap::GetPolygon () const -``` - - **Description:** - -Obtains the polygon after rectangle transformation. - -**Returns:** - -Returns the polygon. - -## GetPreLastPoint\(\) - -``` -const [Point](OHOS-Point.md)& OHOS::DragEvent::GetPreLastPoint () const -``` - - **Description:** - -Obtains the coordinates of the stay position before the last position in the drag event. - -**Returns:** - -Returns the coordinates of the stay position. - -## GetProgressBackgroundStyle\(\) \[1/2\] - -``` -[Style](OHOS-Style.md)& OHOS::Theme::GetProgressBackgroundStyle () -``` - - **Description:** - -Obtains the background style of this progress bar. - -**Returns:** - -Returns the background style of this progress bar. - -## GetProgressBackgroundStyle\(\) \[2/2\] - -``` -static [Style](OHOS-Style.md)& OHOS::StyleDefault::GetProgressBackgroundStyle () -``` - - **Description:** - -Obtains the progress background style. - -**Returns:** - -Returns the progress background style. - -## GetProgressForegroundStyle\(\) \[1/2\] - -``` -[Style](OHOS-Style.md)& OHOS::Theme::GetProgressForegroundStyle () -``` - - **Description:** - -Obtains the foreground style of this progress bar. - -**Returns:** - -Returns the foreground style of this progress bar. - -## GetProgressForegroundStyle\(\) \[2/2\] - -``` -static [Style](OHOS-Style.md)& OHOS::StyleDefault::GetProgressForegroundStyle () -``` - - **Description:** - -Obtains the progress foreground style. - -**Returns:** - -Returns the progress foreground style. - -## GetRadius\(\) - -``` -uint16_t OHOS::UICircleProgress::GetRadius () const -``` - - **Description:** - -Obtains the outer radius of this circular progress bar. - -**Returns:** - -Returns the outer radius. - -**See also:** - -[SetRadius](Graphic.md#ga80377fb579f6698cefd5fcf74d0cde46) - -## GetRangeMax\(\) - -``` -int16_t OHOS::UIAbstractProgress::GetRangeMax () const -``` - - **Description:** - -Obtains the maximum value of this progress bar. - -**Returns:** - -Returns the maximum value of this progress bar. - -**See also:** - -[SetRange](Graphic.md#ga089e3875453011499ad33ed89a44a699) | [GetRangeMin](Graphic.md#ga68ab733afcf4224a799ccad2092d1d23) - -## GetRangeMin\(\) - -``` -int16_t OHOS::UIAbstractProgress::GetRangeMin () const -``` - - **Description:** - -Obtains the minimum value of this progress bar. - -**Returns:** - -Returns the minimum value of this progress bar. - -**See also:** - -[SetRange](Graphic.md#ga089e3875453011499ad33ed89a44a699) | [GetRangeMax](Graphic.md#ga1840199f22d5d3e4ef58e41ac8f4febc) - -## GetRect\(\) - -``` -[Rect](OHOS-Rect.md) OHOS::UIView::GetRect () const -``` - - **Description:** - -Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix. - -**Returns:** - -Returns the absolute rectangle area. - -## GetRelativeRect\(\) - -``` -[Rect](OHOS-Rect.md) OHOS::UIView::GetRelativeRect () const -``` - - **Description:** - -Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view. - -**Returns:** - -Returns the rectangle area relative to the parent view. - -## GetRepeatTimes\(\) - -``` -uint32_t OHOS::UIImageAnimatorView::GetRepeatTimes () const -``` - - **Description:** - -Obtains the playback times. - -**Returns:** - -Returns the playback times. - -**See also:** - -[SetRepeatTimes](Graphic.md#ga8d0a02c46af6bea17323c715620b6212) - -## GetRight\(\) - -``` -int16_t OHOS::Rect::GetRight () const -``` - - **Description:** - -Obtains the right boundary coordinate of the rectangle. - -**Returns:** - -Returns the right boundary coordinate. - -## GetRollStartPos\(\) - -``` -int16_t OHOS::UILabel::GetRollStartPos () const -``` - - **Description:** - -Obtains the position where this text starts to roll. - -**Returns:** - -Returns the position where this text starts to roll. - -## GetRunTime\(\) - -``` -uint32_t OHOS::Animator::GetRunTime () const -``` - - **Description:** - -Obtains the running time of this animator. - -**Returns:** - -Returns the running time. - -**See also:** - -[SetRunTime](Graphic.md#ga4d5ff5057df28da1bc99d08070312f24) - -## GetScrollState\(\) \[1/2\] - -``` -uint8_t OHOS::UIScrollView::OnScrollListener::GetScrollState () const -``` - - **Description:** - -Obtains the scroll state of this view. - -**Returns:** - -Returns the scroll state, either **SCROLL\_STATE\_STOP** or **SCROLL\_STATE\_MOVE**. - -## GetScrollState\(\) \[2/2\] - -``` -uint8_t OHOS::ListScrollListener::GetScrollState () const -``` - - **Description:** - -Obtains the scroll state of this list. - -**Returns:** - -Returns the scroll state, either **SCROLL\_STATE\_STOP** or **SCROLL\_STATE\_MOVE**. - -## GetSelected\(\) - -``` -uint16_t OHOS::UIPicker::GetSelected () const -``` - - **Description:** - -Obtains the index of the item currently selected in the picker. - -**Returns:** - -Returns the index. - -## GetSelectHour\(\) - -``` -const char* OHOS::UITimePicker::GetSelectHour () const -``` - - **Description:** - -Obtains the hour currently selected in the time picker. - -**Returns:** - -Returns a string representing the selected hour, for example, 10. - -## GetSelectMinute\(\) - -``` -const char* OHOS::UITimePicker::GetSelectMinute () const -``` - - **Description:** - -Obtains the minute currently selected in the time picker. - -**Returns:** - -Returns a string representing the selected minute, for example, 12. - -## GetSelectSecond\(\) - -``` -const char* OHOS::UITimePicker::GetSelectSecond () const -``` - - **Description:** - -Obtains the second currently selected in the time picker. - -**Returns:** - -Returns a string representing the selected second, for example, 50. - -## GetSelectValue\(\) - -``` -const char* OHOS::UITimePicker::GetSelectValue () -``` - - **Description:** - -Obtains the time currently selected in the time picker. - -**Returns:** - -Returns a string representing the selected time. The time is in the format of "hour:minute:second", for example, 10:12:50. The second is optional and depends on the setting of [EnableSecond](Graphic.md#gaa2402a0538f08fb4d6857c356be7699c). - -## GetSelectView\(\) - -``` -[UIView](OHOS-UIView.md)* OHOS::UIList::GetSelectView () -``` - - **Description:** - -Obtains the child view being selected at the preset position. - -**Returns:** - -Returns the child view if available; returns **NULL** if no child view is selected or no position is set. - -## GetSize\(\) - -``` -uint32_t OHOS::Rect::GetSize () const -``` - - **Description:** - -Obtains the area of a rectangle. - -**Returns:** - -Returns the area of the rectangle. - -## GetSliderKnobStyle\(\) \[1/2\] - -``` -[Style](OHOS-Style.md)& OHOS::Theme::GetSliderKnobStyle () -``` - - **Description:** - -Obtains the style of this slider knob. - -**Returns:** - -Returns the style of this slider knob. - -## GetSliderKnobStyle\(\) \[2/2\] - -``` -static [Style](OHOS-Style.md)& OHOS::StyleDefault::GetSliderKnobStyle () -``` - - **Description:** - -Obtains the slider knob style. - -**Returns:** - -Returns the slider knob style. - -## GetSrcType\(\) \[1/2\] - -``` -uint8_t OHOS::Image::GetSrcType () const -``` - - **Description:** - -Obtains the image type. - -**Returns:** - -Returns **IMG\_SRC\_VARIABLE** for image information in an array; returns **IMG\_SRC\_FILE** for an image path in binary. - -## GetSrcType\(\) \[2/2\] - -``` -uint8_t OHOS::UIImageView::GetSrcType () const -``` - - **Description:** - -获取图片类型 - -**Returns:** - -图片类型 - -## GetStartAngle\(\) - -``` -int16_t OHOS::UICircleProgress::GetStartAngle () const -``` - - **Description:** - -Obtains the start angle. - -**Returns:** - -Returns the start angle. - -**See also:** - -[SetStartAngle](Graphic.md#gae27e30bd77b83bc55ecc9f2a5643943a) - -## GetStartIndex\(\) - -``` -uint16_t OHOS::UIList::GetStartIndex () const -``` - - **Description:** - -Obtains the start index of this list. The default value is **0**. - -**Returns:** - -Returns the start index. - -## GetStartPoint\(\) - -``` -const [Point](OHOS-Point.md)& OHOS::DragEvent::GetStartPoint () const -``` - - **Description:** - -Obtains the start coordinates in the drag event. - -**Returns:** - -Returns the start coordinates. - -## GetStartPosition\(\) - -``` -const [Point](OHOS-Point.md)& OHOS::UICanvas::GetStartPosition () const -``` - - **Description:** - -Obtains the coordinates of the start point of a line. - -**Returns:** - -Returns the coordinates of the start point. - -**See also:** - -[SetStartPosition](Graphic.md#gaca35fe1a1d344eab80ecb1425a74a91a) - -## GetState\(\) \[1/6\] - -``` -uint16_t OHOS::KeyEvent::GetState () const -``` - - **Description:** - -Obtains the key state. - -## GetState\(\) \[2/6\] - -``` -uint16_t OHOS::VirtualDeviceEvent::GetState () const -``` - - **Description:** - -Obtains the state of the virtual event. - -**Returns:** - -Returns the state. - -## GetState\(\) \[3/6\] - -``` -bool OHOS::UIToggleButton::GetState () const -``` - - **Description:** - -Obtains the state of this toggle button. - -**Returns:** - -Returns **true** if the image for **On** is displayed; returns **false** if the image is displayed for **Off**. - -## GetState\(\) \[4/6\] - -``` -uint8_t OHOS::Animator::GetState () const -``` - - **Description:** - -Obtains the current state of this animator. - -**Returns:** - -Returns the current animator state, which can be [START](Graphic.md#gga771fc52d017036dfa9c9625b16c20650a49f9e652157f467df5de3be9e8758f91), [STOP](Graphic.md#gga771fc52d017036dfa9c9625b16c20650a6618a5c1c0e9e4be3acba1aaee15cb8d), or [PAUSE](Graphic.md#gga771fc52d017036dfa9c9625b16c20650ae5db6c9a921eec21a2990d73400ff507). - -**See also:** - -[SetState](Graphic.md#gab8ec3815f5e42605a51a328c1b0857dd) - -## GetState\(\) \[5/6\] - -``` -[UICheckBoxState](Graphic.md#ga15a3f0302aded0e4d1584ddc6002335d) OHOS::UICheckBox::GetState () const -``` - - **Description:** - -Obtains the state of this check box. - -**Returns:** - -Returns the state of this check box, as defined in [UICheckBoxState](Graphic.md#ga15a3f0302aded0e4d1584ddc6002335d). - -## GetState\(\) \[6/6\] - -``` -uint8_t OHOS::UIImageAnimatorView::GetState () const -``` - - **Description:** - -Obtains the current state of this animator. - -**Returns:** - -Returns the current state, which can be **START**, **STOP**, or **PAUSE**. For details, see [Animator](OHOS-Animator.md). - -## GetStep\(\) - -``` -uint16_t OHOS::UIAbstractProgress::GetStep () const -``` - - **Description:** - -Obtains the current step of this progress bar. - -**Returns:** - -Returns the current step. - -**See also:** - -[SetStep](Graphic.md#ga747a29652b441a06d09a97a297aae9bb) - -## GetStrokeColor\(\) - -``` -[ColorType](OHOS-Color32.md) OHOS::Paint::GetStrokeColor () const -``` - - **Description:** - -Obtains the color of a line or border. - -**Returns:** - -Returns the line color if a line is drawn or the border color if a closed graph is drawn. - -**See also:** - -[SetStrokeWidth](Graphic.md#gad56b6b014e1d061ba93ba8e6c135b90a) - -## GetStrokeWidth\(\) - -``` -uint16_t OHOS::Paint::GetStrokeWidth () const -``` - - **Description:** - -Obtains the width of a line or border. - -**Returns:** - -Returns the line width if a line is drawn or the border width if a closed graph is drawn. - -**See also:** - -[SetStrokeWidth](Graphic.md#gad56b6b014e1d061ba93ba8e6c135b90a) - -## GetStyle\(\) \[1/5\] - -``` -[Style](OHOS-Style.md)& OHOS::TextAdapter::GetStyle () -``` - - **Description:** - -Obtains the [UILabel](OHOS-UILabel.md) adapter style. - -**Returns:** - -Returns the [UILabel](OHOS-UILabel.md) adapter style. - -## GetStyle\(\) \[2/5\] - -``` -[PaintStyle](Graphic.md#ga548320a469b7862fa416af062cad5d7a) OHOS::Paint::GetStyle () const -``` - - **Description:** - -Obtains the paint style of a closed graph. - -**Returns:** - -Returns the paint style. For details, see [PaintStyle](Graphic.md#ga548320a469b7862fa416af062cad5d7a). - -**See also:** - -[SetStyle](Graphic.md#gab93dc15f466a656150e62d7620d34333) - -## GetStyle\(\) \[3/5\] - -``` -int64_t OHOS::Style::GetStyle (uint8_t key) const -``` - - **Description:** - -Obtains the value of a style. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
keyIndicates the key of the style.
- -**Returns:** - -Returns the value of the style. - -## GetStyle\(\) \[4/5\] - -``` -virtual int64_t OHOS::UIView::GetStyle (uint8_t key) const -``` - - **Description:** - -Obtains the value of a style. - -Reimplemented in [OHOS::UIButton](Graphic.md#ga37736a82bec6a01bc5a880e1d01ccccd). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
keyIndicates the key of the style.
- -**Returns:** - -Returns the value of the style. - -## GetStyle\(\) \[5/5\] - -``` -int64_t OHOS::UIButton::GetStyle (uint8_t key) const -``` - - **Description:** - -Obtains the value of a style. - -Reimplemented from [OHOS::UIView](Graphic.md#ga4ea19bc9f4b487946c9e29e63b54a0e6). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
keyIndicates the key of the style.
- -**Returns:** - -Returns the value of the style. - -## GetStyleConst\(\) - -``` -const [Style](OHOS-Style.md)& OHOS::UIView::GetStyleConst () const -``` - - **Description:** - -Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory. - -**Returns:** - -Returns the view style. - -## GetStyleForState\(\) - -``` -int64_t OHOS::UIButton::GetStyleForState (uint8_t key, [ButtonState](Graphic.md#ga188dd55c17ee44be27fa80543f13f729) state ) const -``` - - **Description:** - -Obtains the style of a button in a specific state. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the key of the style.
stateIndicates the button state, as enumerated in ButtonState.
- -**Returns:** - -Returns the style of the button in the specific state. - -## GetSurface\(\) - -``` -[Surface](OHOS-Surface.md)* OHOS::UISurfaceView::GetSurface () const -``` - - **Description:** - -Obtains the surface, which should be used together with the camera and video modules. - -**Returns:** - -Returns the surface. - -## GetSwipeACCLevel\(\) - -``` -uint8_t OHOS::UIAbstractScroll::GetSwipeACCLevel () const -``` - - **Description:** - -Obtains the compensation distance after a finger lifts the screen. - -**Returns:** - -Returns the compensation distance. - -## GetTargetView\(\) \[1/2\] - -``` -virtual void OHOS::UIView::GetTargetView (const [Point](OHOS-Point.md) & point, [UIView](OHOS-UIView.md) ** last ) -``` - - **Description:** - -Obtains the top-level view based on specified coordinates. - -Reimplemented in [OHOS::UIViewGroup](Graphic.md#ga7ea54fc6ef3a8b7dec1bf88ab189f7c7). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
pointIndicates the coordinates to specify.
lastIndicates the double pointer to the view that contains the specified coordinates.
- -## GetTargetView\(\) \[2/2\] - -``` -virtual void OHOS::UIViewGroup::GetTargetView (const [Point](OHOS-Point.md) & point, [UIView](OHOS-UIView.md) ** last ) -``` - - **Description:** - -Obtains the target child view that is visible and can respond to touch events based on given coordinates. - -Reimplemented from [OHOS::UIView](Graphic.md#gaea9f334f2481e1c03a2cd8f3078d7c72). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
pointIndicates the given coordinates.
lastIndicates the double pointer to the target view. nullptr indicates that the target view is not available.
- -## GetText\(\) \[1/4\] - -``` -const char* OHOS::UILabelButton::GetText () const -``` - - **Description:** - -Obtains the text of this label button. - -**Returns:** - -Returns the text. - -## GetText\(\) \[2/4\] - -``` -const char* OHOS::Text::GetText () const -``` - - **Description:** - -Obtains the content of this text. - -**Returns:** - -Returns the text content. - -## GetText\(\) \[3/4\] - -``` -const char* OHOS::UIArcLabel::GetText () const -``` - - **Description:** - -Obtains the text of this arc label. - -**Returns:** - -Returns the text. - -## GetText\(\) \[4/4\] - -``` -const char* OHOS::UILabel::GetText () const -``` - - **Description:** - -Obtains the text of this label. - -**Returns:** - -Returns the text. - -## GetTextColor\(\) - -``` -[ColorType](OHOS-Color32.md) OHOS::UILabel::GetTextColor () const -``` - - **Description:** - -Obtains the color of this text. - -**Returns:** - -Returns the text color. - -## GetTextHeight\(\) - -``` -uint16_t OHOS::UILabel::GetTextHeight () -``` - - **Description:** - -Obtains the height of this text. - -**Returns:** - -Returns the text height. - -## GetTextRotateDegree\(\) \[1/2\] - -``` -uint16_t OHOS::Text::GetTextRotateDegree () const -``` - - **Description:** - -Obtains the number of text rotation degrees. - -**Returns:** - -Returns the number of text rotation degrees. - -## GetTextRotateDegree\(\) \[2/2\] - -``` -uint16_t OHOS::UILabel::GetTextRotateDegree () const -``` - - **Description:** - -Obtains the number of text rotation degrees. - -**Returns:** - -Returns the number of text rotation degrees. - -## GetTextRotation\(\) \[1/2\] - -``` -LabelRotateDegree OHOS::Text::GetTextRotation () const -``` - - **Description:** - -Obtains the clockwise rotation degree of this text. - -**Returns:** - -Returns the rotation degree, as defined in **LabelRotateDegree**. - -## GetTextRotation\(\) \[2/2\] - -``` -LabelRotateDegree OHOS::UILabel::GetTextRotation () const -``` - - **Description:** - -Obtains the clockwise rotation degree of this text. - -**Returns:** - -Returns the rotation degree, as defined in **LabelRotateDegree**. - -## GetTextSize\(\) - -``` -[Point](OHOS-Point.md) OHOS::Text::GetTextSize () const -``` - - **Description:** - -Obtains the size of this text. - -**Returns:** - -Returns the text size. - -## GetTextWidth\(\) - -``` -uint16_t OHOS::UILabel::GetTextWidth () -``` - - **Description:** - -Obtains the width of this text. - -**Returns:** - -Returns the text width. - -## GetTime\(\) - -``` -uint32_t OHOS::Animator::GetTime () const -``` - - **Description:** - -Obtains the total duration of this animator. - -**Returns:** - -Returns the total duration. - -**See also:** - -[SetTime](Graphic.md#ga5a2bfa5fb257b2116d08ad5ae254327c) - -## GetTimeOfPause\(\) - -``` -uint16_t OHOS::UIImageAnimatorView::GetTimeOfPause () const -``` - - **Description:** - -Obtains the interval between two playbacks of an infinitely repeated animator. - -**Returns:** - -Returns the interval between two playbacks, in milliseconds. - -**See also:** - -[SetTimeOfPause](Graphic.md#gad4bd7aaf1100aac86a2cde8728ae8ee0) - -## GetTimeOfUpdate\(\) - -``` -uint16_t OHOS::UIImageAnimatorView::GetTimeOfUpdate () const -``` - - **Description:** - -Obtains the speed of this animator. - -**Returns:** - -Returns the interval for updating images, in milliseconds. - -**See also:** - -[SetTimeOfUpdate](Graphic.md#ga0ee52a2ca252957199034c1234dc4f64) - -## GetTimeStamp\(\) - -``` -const TimeType& OHOS::Event::GetTimeStamp () const -``` - - **Description:** - -Obtains the timestamp when an event occurs. - -**Returns:** - -Returns the timestamp. - -## GetTop\(\) - -``` -int16_t OHOS::Rect::GetTop () const -``` - - **Description:** - -Obtains the top boundary coordinate of the rectangle. - -**Returns:** - -Returns the top boundary coordinate. - -## GetTopPointStyle\(\) - -``` -const [PointStyle](OHOS-UIChartDataSerial-PointStyle.md)& OHOS::UIChartDataSerial::GetTopPointStyle () const -``` - - **Description:** - -Obtains the style of the top point of a polyline. - -**Returns:** - -Returns the style of the point. For details, see [PointStyle](OHOS-UIChartDataSerial-PointStyle.md). - -## GetTouchListener\(\) - -``` -[OnTouchListener](OHOS-UIView-OnTouchListener.md)*& OHOS::UIView::GetTouchListener () -``` - - **Description:** - -Obtains the touch event listener for the view. - -**Returns:** - -Returns the touch event listener. - -## GetTransformAlgorithm\(\) - -``` -TransformAlgorithm OHOS::UIImageView::GetTransformAlgorithm () const -``` - - **Description:** - -Obtains the algorithm used for image rotation and scaling. - -**Returns:** - -Returns the image transform algorithm, as defined in **TransformAlgorithm**. - -## GetTransformMap\(\) - -``` -[TransformMap](OHOS-TransformMap.md)& OHOS::UIView::GetTransformMap () -``` - - **Description:** - -Obtains an affine transformation matrix. - -**Returns:** - -Returns the transform matrix. - -## GetType\(\) - -``` -uint16_t OHOS::VirtualDeviceEvent::GetType () const -``` - - **Description:** - -Obtains the type of the virtual device. - -**Returns:** - -Returns the type. - -## GetValidHeight\(\) - -``` -int16_t OHOS::UIBoxProgress::GetValidHeight () const -``` - - **Description:** - -Obtains the actual height of this progress bar. - -**Returns:** - -Returns the actual height of this progress bar. - -**See also:** - -[SetValidHeight](Graphic.md#ga6958b8273ad7a5563dfa19267cc3a13c) - -## GetValidWidth\(\) - -``` -int16_t OHOS::UIBoxProgress::GetValidWidth () const -``` - - **Description:** - -Obtains the actual width of this progress bar. - -**Returns:** - -Returns the actual width of this progress bar. - -**See also:** - -[SetValidWidth](Graphic.md#gada3cf1819e826ee0aed4a40ef00b91a6) - -## GetValleyData\(\) - -``` -int16_t OHOS::UIChartDataSerial::GetValleyData () const -``` - - **Description:** - -Obtains the Y value of the bottom point in a data set. - -The Y value is the data added by users, not the pixel coordinate. - -**Returns:** - -Returns the Y value. - -## GetValleyIndex\(\) - -``` -uint16_t OHOS::UIChartDataSerial::GetValleyIndex () const -``` - - **Description:** - -Obtains the index of the bottom point in a data set. - -**Returns:** - -Returns the index of the bottom point. If there are multiple bottom points, the first one is returned. - -## GetValue\(\) - -``` -int16_t OHOS::UIAbstractProgress::GetValue () const -``` - - **Description:** - -Obtains the current value of this progress bar. - -**Returns:** - -Returns the current value of this progress bar. - -**See also:** - -[SetValue](Graphic.md#ga5f65014431a6489ffa1d4949f9c4449b) - -## GetVerAlign\(\) \[1/2\] - -``` -[UITextLanguageAlignment](Graphic.md#ga3f99b58f731a37cacde72d5e0c934593) OHOS::Text::GetVerAlign () const -``` - - **Description:** - -Obtains the vertical alignment mode. - -**Returns:** - -Returns the vertical alignment mode. - -## GetVerAlign\(\) \[2/2\] - -``` -[UITextLanguageAlignment](Graphic.md#ga3f99b58f731a37cacde72d5e0c934593) OHOS::UILabel::GetVerAlign () const -``` - - **Description:** - -Obtains the vertical alignment mode. - -**Returns:** - -Returns the vertical alignment mode. - -## GetVersion\(\) - -``` -std::string OHOS::GetVersion () -``` - - **Description:** - -Obtains the version number of the graphics module. - -**Returns:** - -Returns the version number of the graphics module. - -## GetVertexNum\(\) - -``` -uint8_t OHOS::Polygon::GetVertexNum () const -``` - - **Description:** - -Obtains the number of vertices of the polygon. - -**Returns:** - -Returns the number of vertices. - -## GetVerticalScrollState\(\) - -``` -bool OHOS::UIScrollView::GetVerticalScrollState () const -``` - - **Description:** - -Checks whether a vertical scroll is enabled. - -**Returns:** - -Returns **true** if a vertical scroll is enabled, returns **false** otherwise. - -## GetView\(\) \[1/2\] - -``` -[UIView](OHOS-UIView.md)* OHOS::TextAdapter::GetView ([UIView](OHOS-UIView.md) * inView, int16_t index ) -``` - - **Description:** - -Obtains a **[UILabel](OHOS-UILabel.md)** instance to convert adapter data into another **[UILabel](OHOS-UILabel.md)** instance. - -Implements [OHOS::AbstractAdapter](Graphic.md#gab155b2f4a6d8fd97755dcd1e6d3d8361). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
inViewIndicates the pointer to the reusable instance. If this parameter is not NULL, a reusable UILabel instance is available. In this case, this function does not need to create a new UILabel instance, just resusing the instance specified by inView to update the inView data. If this parameter is NULL, there is no resuable UIView instance. In this case, this function needs to create a new UILabel instance.
indexIndicates the adapter data index.
- -**Returns:** - -Returns the address of the **[UILabel](OHOS-UILabel.md)** instance constructed by the adapter. - -## GetView\(\) \[2/2\] - -``` -virtual [UIView](OHOS-UIView.md)* OHOS::AbstractAdapter::GetView ([UIView](OHOS-UIView.md) * inView, int16_t index ) -``` - - **Description:** - -Obtains a **[UIView](OHOS-UIView.md)** instance to convert adapter data into another **[UIView](OHOS-UIView.md)** instance. - -Implemented in [OHOS::TextAdapter](Graphic.md#ga733211ca13eccff628bb2712c27b885e). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
inViewIndicates the pointer to the reusable instance. If this parameter is not NULL, a reusable UIView instance is available. In this case, this function does not need to create a new UIView instance, just reusing the instance specified by inView to update the inView data. If this parameter is NULL, there is no reusable UIView instance. In this case, this function needs to create a new UIView instance.
indexIndicates the adapter data index.
- -**Returns:** - -[UIView](OHOS-UIView.md) Returns the pointer to the **[UIView](OHOS-UIView.md)** instance constructed by the adapter. - -## GetViewByIndex\(\) - -``` -[UIView](OHOS-UIView.md)* OHOS::UISwipeView::GetViewByIndex (uint16_t index) const -``` - - **Description:** - -Obtains a view based on its index. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
Indicatesthe index of a view.
- -**Returns:** - -Returns the view. - -## GetViewId\(\) - -``` -const char* OHOS::UIView::GetViewId () const -``` - - **Description:** - -Obtains the view ID. - -**Returns:** - -Returns the pointer to the view ID. - -## GetViewIndex\(\) - -``` -int16_t OHOS::UIView::GetViewIndex () const -``` - - **Description:** - -Obtains the view index. - -**Returns:** - -Returns the view index. - -## GetViewType\(\) \[1/31\] - -``` -virtual UIViewType OHOS::UIView::GetViewType () const -``` - - **Description:** - -Obtains the view type. - -Reimplemented in [OHOS::UIChart](Graphic.md#gaea65298b6e4a71a2de65c13e1b14ed7b), [OHOS::UICanvas](Graphic.md#ga467faebb78b4c4a753eaa44b772f0905), [OHOS::UIAnalogClock](Graphic.md#ga2f5123df8cbcc4f55c5192acbe30ba0d), [OHOS::UIList](Graphic.md#ga6e11e5de67f87ed6cf6c44f60b7d4096), [OHOS::UIScrollView](Graphic.md#ga1feefd393c568a12ec4e877e207d598c), [OHOS::RootView](Graphic.md#ga7b96c15cdbe0edd5045e479b3b2fe1eb), [OHOS::UICheckBox](Graphic.md#ga6820cef1fb685db5796670ca56b6aace), [OHOS::UILabel](Graphic.md#gaebb514dc68a761c444af0e0e89dfcb6f), [OHOS::UIAbstractClock](Graphic.md#ga8f7edc9e099688b4fd2b3ed3171eac58), [OHOS::UISwipeView](Graphic.md#ga71ae0dd892d8d9b8d277ba2b5572182d), [OHOS::UIDialog](Graphic.md#gac0b18fe28ee4ad44814d3897d3cd5c05), [OHOS::UIBoxProgress](Graphic.md#gaa2d380d48776748583f51297715af0b5), [OHOS::UIImageAnimatorView](Graphic.md#ga831167c9f5000af808638eac56d6ec19), [OHOS::UIButton](Graphic.md#gad19f55fb0de64f3f39485292d0629dc7), [OHOS::UIRadioButton](Graphic.md#ga2efe6a87345903726c721fc7a9ed4365), [OHOS::UIArcLabel](Graphic.md#ga2ebe9b09e69cd04b00db686dbec8c32c), [OHOS::UILabelButton](Graphic.md#ga7064f161dbf0e539bd089db62339cad8), [OHOS::UIToggleButton](Graphic.md#gaeb2bf2bfa7b5f229a151bec4fd046b40), [OHOS::UIRepeatButton](Graphic.md#gac391336aedd68659b7f76bee59eba521), [OHOS::UISlider](Graphic.md#gac2070526833718284148689678c542a9), [OHOS::UIViewGroup](Graphic.md#gad5756764839a844ee9bee0c186798029), [OHOS::UIAbstractScroll](Graphic.md#gaeb9e84901b38ef75fa650fc5a27ffc65), [OHOS::UIAxis](Graphic.md#ga2f46b702f1543c5076a8957a94a780d3), [OHOS::UICircleProgress](Graphic.md#gab1d8fc06d4a73db344efd271d68a62e6), [OHOS::UIDigitalClock](Graphic.md#ga567a8195e8520b74b682de697cfe1d90), [OHOS::UITextureMapper](Graphic.md#ga5cb1566d1fdd815004a37349dc458203), [OHOS::UIAbstractProgress](Graphic.md#ga79885b87d1935947f6980ae56f139083), [OHOS::UIImageView](Graphic.md#ga5dc99855271c582e960e0952cca8227c), [OHOS::UIPicker](Graphic.md#ga926337be55785de0b32ad57d7ee85c5c), and [OHOS::UITimePicker](Graphic.md#gaf4770cfad2f6368b22e9ea581b12aefa). - -**Returns:** - -Returns the view type. - -## GetViewType\(\) \[2/31\] - -``` -UIViewType OHOS::UITimePicker::GetViewType () const -``` - - **Description:** - -Obtains the view type. - -Reimplemented from [OHOS::UIView](Graphic.md#ga6d23780da1faa1071197b716bca365e0). - -**Returns:** - -Returns the view type. For details, see **UIViewType**. - -## GetViewType\(\) \[3/31\] - -``` -UIViewType OHOS::UIImageView::GetViewType () const -``` - - **Description:** - -Obtains the view type. - -Reimplemented from [OHOS::UIView](Graphic.md#ga6d23780da1faa1071197b716bca365e0). - -Reimplemented in [OHOS::UITextureMapper](Graphic.md#ga5cb1566d1fdd815004a37349dc458203). - -**Returns:** - -Returns **UI\_IMAGE\_VIEW**, as defined in **UIViewType**. - -## GetViewType\(\) \[4/31\] - -``` -UIViewType OHOS::UIPicker::GetViewType () const -``` - - **Description:** - -Obtains the view type. - -Reimplemented from [OHOS::UIView](Graphic.md#ga6d23780da1faa1071197b716bca365e0). - -**Returns:** - -Returns the view type. For details, see **UIViewType**. - -## GetViewType\(\) \[5/31\] - -``` -UIViewType OHOS::UIAbstractProgress::GetViewType () const -``` - - **Description:** - -Obtains the component type. - -Reimplemented from [OHOS::UIView](Graphic.md#ga6d23780da1faa1071197b716bca365e0). - -Reimplemented in [OHOS::UIBoxProgress](Graphic.md#gaa2d380d48776748583f51297715af0b5), [OHOS::UISlider](Graphic.md#gac2070526833718284148689678c542a9), and [OHOS::UICircleProgress](Graphic.md#gab1d8fc06d4a73db344efd271d68a62e6). - -**Returns:** - -Returns the component type, as defined in **UIViewType**. - -## GetViewType\(\) \[6/31\] - -``` -UIViewType OHOS::UIDigitalClock::GetViewType () const -``` - - **Description:** - -Obtains the view type. - -Reimplemented from [OHOS::UIAbstractClock](Graphic.md#ga8f7edc9e099688b4fd2b3ed3171eac58). - -**Returns:** - -Returns **UI\_DIGITAL\_CLOCK**, as defined in **UIViewType**. - -## GetViewType\(\) \[7/31\] - -``` -UIViewType OHOS::UIAxis::GetViewType () const -``` - - **Description:** - -Obtains the view type. - -Reimplemented from [OHOS::UIView](Graphic.md#ga6d23780da1faa1071197b716bca365e0). - -**Returns:** - -Returns the view type. For details, see **UIViewType**. - -## GetViewType\(\) \[8/31\] - -``` -UIViewType OHOS::UIAbstractScroll::GetViewType () const -``` - - **Description:** - -Obtains the view type. - -Reimplemented from [OHOS::UIView](Graphic.md#ga6d23780da1faa1071197b716bca365e0). - -Reimplemented in [OHOS::UIList](Graphic.md#ga6e11e5de67f87ed6cf6c44f60b7d4096), [OHOS::UIScrollView](Graphic.md#ga1feefd393c568a12ec4e877e207d598c), and [OHOS::UISwipeView](Graphic.md#ga71ae0dd892d8d9b8d277ba2b5572182d). - -**Returns:** - -Returns the view type, as defined in **UIViewType**. - -## GetViewType\(\) \[9/31\] - -``` -UIViewType OHOS::UITextureMapper::GetViewType () const -``` - - **Description:** - -Obtains the view type. - -Reimplemented from [OHOS::UIImageView](Graphic.md#ga5dc99855271c582e960e0952cca8227c). - -**Returns:** - -Returns the view type, as defined in **UIViewType**. - -## GetViewType\(\) \[10/31\] - -``` -UIViewType OHOS::UICircleProgress::GetViewType () const -``` - - **Description:** - -Obtains the view type. - -Reimplemented from [OHOS::UIAbstractProgress](Graphic.md#ga79885b87d1935947f6980ae56f139083). - -**Returns:** - -Returns the view type, as defined in **UIViewType**. - -## GetViewType\(\) \[11/31\] - -``` -UIViewType OHOS::UIViewGroup::GetViewType () const -``` - - **Description:** - -Obtains the view type. - -Reimplemented from [OHOS::UIView](Graphic.md#ga6d23780da1faa1071197b716bca365e0). - -**Returns:** - -Returns **UI\_VIEW\_GROUP**, as defined in **UIViewType**. - -## GetViewType\(\) \[12/31\] - -``` -UIViewType OHOS::UIRepeatButton::GetViewType () const -``` - - **Description:** - -Obtains the component type. - -Reimplemented from [OHOS::UIButton](Graphic.md#gad19f55fb0de64f3f39485292d0629dc7). - -**Returns:** - -Returns the component type, as defined in **UIViewType**. - -## GetViewType\(\) \[13/31\] - -``` -UIViewType OHOS::UISlider::GetViewType () const -``` - - **Description:** - -Obtains the view type. - -Reimplemented from [OHOS::UIBoxProgress](Graphic.md#gaa2d380d48776748583f51297715af0b5). - -**Returns:** - -Returns the view type, as defined in **UIViewType**. - -## GetViewType\(\) \[14/31\] - -``` -UIViewType OHOS::UIToggleButton::GetViewType () const -``` - - **Description:** - -Obtains the component type. - -Reimplemented from [OHOS::UICheckBox](Graphic.md#ga6820cef1fb685db5796670ca56b6aace). - -**Returns:** - -Returns the component type, as defined in **UIViewType**. - -## GetViewType\(\) \[15/31\] - -``` -UIViewType OHOS::UILabelButton::GetViewType () const -``` - - **Description:** - -Obtains the view type. - -Reimplemented from [OHOS::UIButton](Graphic.md#gad19f55fb0de64f3f39485292d0629dc7). - -**Returns:** - -Returns **UI\_LABEL\_BUTTON**, as defined in **UIViewType**. - -## GetViewType\(\) \[16/31\] - -``` -UIViewType OHOS::UIArcLabel::GetViewType () const -``` - - **Description:** - -Obtains the view type. - -Reimplemented from [OHOS::UIView](Graphic.md#ga6d23780da1faa1071197b716bca365e0). - -**Returns:** - -Returns **UI\_ARC\_LABEL**, as defined in \{link UIViewType\}. - -## GetViewType\(\) \[17/31\] - -``` -UIViewType OHOS::UIRadioButton::GetViewType () const -``` - - **Description:** - -Obtains the component type. - -Reimplemented from [OHOS::UICheckBox](Graphic.md#ga6820cef1fb685db5796670ca56b6aace). - -**Returns:** - -Returns the component type, as defined in **UIViewType**. - -## GetViewType\(\) \[18/31\] - -``` -UIViewType OHOS::UIButton::GetViewType () const -``` - - **Description:** - -Obtains the component type. - -Reimplemented from [OHOS::UIView](Graphic.md#ga6d23780da1faa1071197b716bca365e0). - -Reimplemented in [OHOS::UILabelButton](Graphic.md#ga7064f161dbf0e539bd089db62339cad8), and [OHOS::UIRepeatButton](Graphic.md#gac391336aedd68659b7f76bee59eba521). - -**Returns:** - -Returns the component type, as defined in **UIViewType**. - -## GetViewType\(\) \[19/31\] - -``` -UIViewType OHOS::UIImageAnimatorView::GetViewType () const -``` - - **Description:** - -Obtains the view type. - -Reimplemented from [OHOS::UIView](Graphic.md#ga6d23780da1faa1071197b716bca365e0). - -**Returns:** - -Returns the view type, as defined in **UIViewType**. - -## GetViewType\(\) \[20/31\] - -``` -UIViewType OHOS::UIBoxProgress::GetViewType () const -``` - - **Description:** - -Obtains the view type. - -Reimplemented from [OHOS::UIAbstractProgress](Graphic.md#ga79885b87d1935947f6980ae56f139083). - -Reimplemented in [OHOS::UISlider](Graphic.md#gac2070526833718284148689678c542a9). - -**Returns:** - -Returns the view type, as defined in **UIViewType**. - -## GetViewType\(\) \[21/31\] - -``` -UIViewType OHOS::UIDialog::GetViewType () const -``` - - **Description:** - -Obtains the view type. - -Reimplemented from [OHOS::UIView](Graphic.md#ga6d23780da1faa1071197b716bca365e0). - -**Returns:** - -Returns the view type, as defined in **UIViewType**. - -## GetViewType\(\) \[22/31\] - -``` -UIViewType OHOS::UISwipeView::GetViewType () const -``` - - **Description:** - -Obtains the component type. - -Reimplemented from [OHOS::UIAbstractScroll](Graphic.md#gaeb9e84901b38ef75fa650fc5a27ffc65). - -**Returns:** - -Returns the component type, as defined in **UIViewType**. - -## GetViewType\(\) \[23/31\] - -``` -UIViewType OHOS::UIAbstractClock::GetViewType () const -``` - - **Description:** - -Obtains the view type. - -Reimplemented from [OHOS::UIView](Graphic.md#ga6d23780da1faa1071197b716bca365e0). - -Reimplemented in [OHOS::UIAnalogClock](Graphic.md#ga2f5123df8cbcc4f55c5192acbe30ba0d), and [OHOS::UIDigitalClock](Graphic.md#ga567a8195e8520b74b682de697cfe1d90). - -**Returns:** - -Returns **UI\_ABSTRACT\_CLOCK**, as defined in **UIViewType**. - -## GetViewType\(\) \[24/31\] - -``` -UIViewType OHOS::UILabel::GetViewType () const -``` - - **Description:** - -Obtains the view type. - -Reimplemented from [OHOS::UIView](Graphic.md#ga6d23780da1faa1071197b716bca365e0). - -**Returns:** - -Returns **UI\_LABEL**, as defined in **UIViewType**. - -## GetViewType\(\) \[25/31\] - -``` -UIViewType OHOS::UICheckBox::GetViewType () const -``` - - **Description:** - -Obtains the component type. - -Reimplemented from [OHOS::UIView](Graphic.md#ga6d23780da1faa1071197b716bca365e0). - -Reimplemented in [OHOS::UIRadioButton](Graphic.md#ga2efe6a87345903726c721fc7a9ed4365), and [OHOS::UIToggleButton](Graphic.md#gaeb2bf2bfa7b5f229a151bec4fd046b40). - -**Returns:** - -Returns the component type, as defined in **UIViewType**. - -## GetViewType\(\) \[26/31\] - -``` -UIViewType OHOS::RootView::GetViewType () const -``` - - **Description:** - -Obtains the view type. - -Reimplemented from [OHOS::UIView](Graphic.md#ga6d23780da1faa1071197b716bca365e0). - -**Returns:** - -Returns **UI\_ROOT\_VIEW**, as defined in **UIViewType**. - -## GetViewType\(\) \[27/31\] - -``` -UIViewType OHOS::UIScrollView::GetViewType () const -``` - - **Description:** - -Obtains the view type. - -Reimplemented from [OHOS::UIAbstractScroll](Graphic.md#gaeb9e84901b38ef75fa650fc5a27ffc65). - -**Returns:** - -Returns the view type, as defined in **UIViewType**. - -## GetViewType\(\) \[28/31\] - -``` -UIViewType OHOS::UIList::GetViewType () const -``` - - **Description:** - -Obtains the view type. - -Reimplemented from [OHOS::UIAbstractScroll](Graphic.md#gaeb9e84901b38ef75fa650fc5a27ffc65). - -**Returns:** - -Returns the view type, as defined in **UIViewType**. - -## GetViewType\(\) \[29/31\] - -``` -UIViewType OHOS::UIAnalogClock::GetViewType () const -``` - - **Description:** - -Obtains the view type. - -Reimplemented from [OHOS::UIAbstractClock](Graphic.md#ga8f7edc9e099688b4fd2b3ed3171eac58). - -**Returns:** - -Returns **UI\_ANALOG\_CLOCK**, as defined in **UIViewType**. - -## GetViewType\(\) \[30/31\] - -``` -UIViewType OHOS::UICanvas::GetViewType () const -``` - - **Description:** - -Obtains the view type. - -Reimplemented from [OHOS::UIView](Graphic.md#ga6d23780da1faa1071197b716bca365e0). - -**Returns:** - -Returns the view type. For details, see **UIViewType**. - -## GetViewType\(\) \[31/31\] - -``` -UIViewType OHOS::UIChart::GetViewType () const -``` - - **Description:** - -Obtains the view type. - -Reimplemented from [OHOS::UIView](Graphic.md#ga6d23780da1faa1071197b716bca365e0). - -**Returns:** - -Returns the view type. For details, see **UIViewType**. - -## GetVisibleRect\(\) - -``` -[Rect](OHOS-Rect.md) OHOS::UIView::GetVisibleRect () const -``` - - **Description:** - -Obtains the visible absolute rectangle area of the view. - -**Returns:** - -Returns the visible absolute rectangle area. - -## GetWidth\(\) \[1/7\] - -``` -uint16_t OHOS::Screen::GetWidth () -``` - - **Description:** - -Obtains the width of this screen. - -**Returns:** - -Returns the screen width. - -## GetWidth\(\) \[2/7\] - -``` -virtual int16_t OHOS::UIView::GetWidth () -``` - - **Description:** - -Obtains the width for the view. - -Reimplemented in [OHOS::UIButton](Graphic.md#ga8cb74b23f740091e59ad350a8dea436b), [OHOS::UILabel](Graphic.md#ga95bc777cda044ada4401d9c5900226c6), [OHOS::UIArcLabel](Graphic.md#gae2348ef2f06893325ca3366856657199), and [OHOS::UIImageView](Graphic.md#ga20ea7dd2d8ddb16cf9750ccdcc2a2803). - -**Returns:** - -Returns the view width. - -## GetWidth\(\) \[3/7\] - -``` -int16_t OHOS::Rect::GetWidth () const -``` - - **Description:** - -Obtains the rectangle width. - -**Returns:** - -Returns the rectangle width. - -## GetWidth\(\) \[4/7\] - -``` -int16_t OHOS::UIImageView::GetWidth () -``` - - **Description:** - -Obtains the width of this image view. - -Reimplemented from [OHOS::UIView](Graphic.md#ga90cf8cffb98d71c30d6fc1d118442dbd). - -**Returns:** - -Returns the width of this image view. - -## GetWidth\(\) \[5/7\] - -``` -int16_t OHOS::UIArcLabel::GetWidth () -``` - - **Description:** - -Obtains the width of this arc text. - -Reimplemented from [OHOS::UIView](Graphic.md#ga90cf8cffb98d71c30d6fc1d118442dbd). - -**Returns:** - -Returns the width of this arc text. - -## GetWidth\(\) \[6/7\] - -``` -int16_t OHOS::UILabel::GetWidth () -``` - - **Description:** - -Obtains the width of this label. - -Reimplemented from [OHOS::UIView](Graphic.md#ga90cf8cffb98d71c30d6fc1d118442dbd). - -**Returns:** - -Returns the label width. - -## GetWidth\(\) \[7/7\] - -``` -int16_t OHOS::UIButton::GetWidth () -``` - - **Description:** - -Obtains the width of this image. - -Reimplemented from [OHOS::UIView](Graphic.md#ga90cf8cffb98d71c30d6fc1d118442dbd). - -**Returns:** - -Returns the image width. - -## GetWorkMode\(\) - -``` -virtual [WorkMode](Graphic.md#ga19db90932bc71e6bbced6ccf2935ac98) OHOS::UIAbstractClock::GetWorkMode () const -``` - - **Description:** - -Obtains the working mode of this clock. - -**Returns:** - -Returns the working mode, as defined in [WorkMode](Graphic.md#ga19db90932bc71e6bbced6ccf2935ac98). - -## GetX\(\) \[1/2\] - -``` -int16_t OHOS::Rect::GetX () const -``` - - **Description:** - -Obtains the left boundary coordinate of the rectangle. - -**Returns:** - -Returns the left boundary coordinate. - -## GetX\(\) \[2/2\] - -``` -int16_t OHOS::UIView::GetX () const -``` - - **Description:** - -Obtains the x-coordinate for the view. - -**Returns:** - -Returns the x-coordinate. - -## GetXAxis\(\) - -``` -[UIXAxis](OHOS-UIXAxis.md)& OHOS::UIChart::GetXAxis () -``` - - **Description:** - -Obtains the x-axis instance. - -**Returns:** - -Returns the x-axis instance. - -## GetY\(\) \[1/2\] - -``` -int16_t OHOS::Rect::GetY () const -``` - - **Description:** - -Obtains the top boundary coordinate of the rectangle. - -**Returns:** - -Returns the top boundary coordinate. - -## GetY\(\) \[2/2\] - -``` -int16_t OHOS::UIView::GetY () const -``` - - **Description:** - -Obtains the y-coordinate for the view. - -**Returns:** - -Returns the y-coordinate. - -## GetYAxis\(\) - -``` -[UIYAxis](OHOS-UIYAxis.md)& OHOS::UIChart::GetYAxis () -``` - - **Description:** - -Obtains the y-axis instance. - -**Returns:** - -Returns the y-axis instance. - -## Gray\(\) - -``` -static [ColorType](OHOS-Color32.md) OHOS::Color::Gray () -``` - - **Description:** - -Obtains the color data of gray. - -**Returns:** - -Returns the color data. - -## Green\(\) - -``` -static [ColorType](OHOS-Color32.md) OHOS::Color::Green () -``` - - **Description:** - -Obtains the color data of green. - -**Returns:** - -Returns the color data. - -## GridLayout\(\) - -``` -OHOS::GridLayout::GridLayout () -``` - - **Description:** - -A default constructor used to create a **[GridLayout](OHOS-GridLayout.md)** instance. - -## Hand\(\) - -``` -OHOS::UIAnalogClock::Hand::Hand () -``` - - **Description:** - -A default constructor used to create a **[Hand](OHOS-UIAnalogClock-Hand.md)** instance. - -## Head\(\) - -``` -[ListNode](OHOS-ListNode-T.md)* [OHOS::List](OHOS-List-T.md)< T >::Head () const -``` - - **Description:** - -Obtains the head node address of a linked list. - -**Returns:** - -Returns the head node address. - -## HidePoint\(\) - -``` -void OHOS::UIChartDataSerial::HidePoint (uint16_t index, uint16_t count ) -``` - - **Description:** - -Hides some points in the data set. - -This function applies only to line charts. After the points are hidden, the line connected by the points is not displayed. The top and bottom points may appear in the hidden region. If this method is enabled, you are not advised to enable the display of the top and bottom points. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
indexIndicates the point from which the hide starts.
countIndicates the number of points to hide.
- -## Image\(\) - -``` -OHOS::Image::Image () -``` - - **Description:** - -A constructor used to create an **[Image](OHOS-Image.md)** instance. You can use this constructor when a component requires a map. - -## ImageCacheFree\(\) - -``` -void OHOS::ImageCacheFree ([ImageInfo](OHOS-ImageInfo.md) & info) -``` - - **Description:** - -Releases the image cache memory. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
infoIndicates the image information. For details, see ImageInfo.
- -## ImageCacheMalloc\(\) - -``` -void* OHOS::ImageCacheMalloc (const [ImageInfo](OHOS-ImageInfo.md) & info) -``` - - **Description:** - -Applies for the image cache memory. You can customize the memory area when loading image resources. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
infoIndicates the image information. For details, see ImageInfo.
- -## IncOneSecond\(\) - -``` -void OHOS::UIAbstractClock::IncOneSecond () -``` - - **Description:** - -Increases the time by one second. - -## Insert\(\) \[1/3\] - -``` -void [OHOS::List](OHOS-List-T.md)< T >::Insert ([ListNode](OHOS-ListNode-T.md)< T > * node, T data ) -``` - - **Description:** - -Inserts data before a specified node, which follows the inserted data node. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
nodeIndicates the pointer to the node holding the inserted data.
dataIndicates the data to insert.
- -## Insert\(\) \[2/3\] - -``` -virtual void OHOS::UIViewGroup::Insert ([UIView](OHOS-UIView.md) * prevView, [UIView](OHOS-UIView.md) * insertView ) -``` - - **Description:** - -Inserts a new child view behind the current one. - -Reimplemented in [OHOS::UISwipeView](Graphic.md#ga154efaf952ba1db65e53efdd29f0027b). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
prevViewIndicates the pointer to the current child view, previous to the new child view to insert.
viewIndicates the pointer to the new child view to insert.
- -## Insert\(\) \[3/3\] - -``` -void OHOS::UISwipeView::Insert ([UIView](OHOS-UIView.md) * prevView, [UIView](OHOS-UIView.md) * insertView ) -``` - - **Description:** - -Inserts a view. - -Reimplemented from [OHOS::UIViewGroup](Graphic.md#ga84195a993bfe50d8302435ababb63966). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
prevViewIndicates the previous view.
insertViewIndicates the view to insert.
- -## Intersect\(\) \[1/2\] - -``` -bool OHOS::Intersect (const [Line](OHOS-Line.md) & a, const [Line](OHOS-Line.md) & b, [Vector2](OHOS-Vector2-T.md)< int16_t > & out ) -``` - - **Description:** - -Checks whether line segment a and line segment b intersect, and returns the intersection point \(if available\). - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
aIndicates line segment a.
bIndicates line segment b.
outIndicates the intersection point.
- -**Returns:** - -Returns **true** if the two line segments intersect; returns **false** otherwise. - -## Intersect\(\) \[2/2\] - -``` -bool OHOS::Rect::Intersect (const [Rect](OHOS-Rect.md) & rect1, const [Rect](OHOS-Rect.md) & rect2 ) -``` - - **Description:** - -Checks whether two rectangles intersect. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
rect1Indicates the first rectangle to check.
rect2Indicates the second rectangle to check.
- -**Returns:** - -Returns **true** if the two rectangles intersect; returns **false** otherwise. - -## Invalidate\(\) - -``` -void OHOS::UIView::Invalidate () -``` - - **Description:** - -Refreshes the invalidated area of the view. - -## InvalidateRect\(\) - -``` -void OHOS::UIView::InvalidateRect (const [Rect](OHOS-Rect.md) & invalidatedArea) -``` - - **Description:** - -Refreshes a view in a specified invalidated area. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
invalidatedAreaIndicates the area to refresh.
- -## Inverse\(\) - -``` -[Matrix3](OHOS-Matrix3-T.md)< T > [OHOS::Matrix3](OHOS-Matrix3-T.md)< T >::Inverse -``` - - **Description:** - -Obtains the inverse matrix. - -**Returns:** - -Returns the inverse matrix. - -## IsContains\(\) \[1/3\] - -``` -bool OHOS::Rect::IsContains (const [Point](OHOS-Point.md) & point) const -``` - - **Description:** - -Checks whether the rectangle contains a coordinate point. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
pointIndicates the coordinate point.
- -**Returns:** - -Returns **true** if the input coordinate point is contained; returns **false** otherwise. - -## IsContains\(\) \[2/3\] - -``` -bool OHOS::Rect::IsContains (const [Rect](OHOS-Rect.md) & other) const -``` - - **Description:** - -Checks whether the rectangle contains another rectangle. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
otherIndicates the rectangle to be used for check.
- -**Returns:** - -Returns **true** if the input rectangle is contained; returns **false** otherwise. - -## IsContains\(\) \[3/3\] - -``` -bool OHOS::Rect::IsContains (const [Vector2](OHOS-Vector2-T.md)< int16_t > & point) const -``` - - **Description:** - -Checks whether the rectangle contains a coordinate point. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
pointIndicates the coordinate point.
- -**Returns:** - -Returns **true** if the input coordinate point is contained; returns **false** otherwise. - -## IsDraggable\(\) - -``` -bool OHOS::UIView::IsDraggable () const -``` - - **Description:** - -Checks whether the view is draggable. - -**Returns:** - -Returns **true** if the view is draggable; returns **false** otherwise. - -## IsDragParentInstead\(\) - -``` -bool OHOS::UIView::IsDragParentInstead () const -``` - - **Description:** - -Obtains whether the view transfers a drag event to the parent view for processing. - -**Returns:** - -Returns **true** if the view transfers the event to the parent view for processing; returns **false** otherwise. - -## IsEmpty\(\) - -``` -bool [OHOS::List](OHOS-List-T.md)< T >::IsEmpty () const -``` - - **Description:** - -Checks whether a linked list is empty. - -**Returns:** - -Returns **true** if the linked list is empty; returns **false** otherwise. - -## IsExpandHeight\(\) - -``` -bool OHOS::Text::IsExpandHeight () const -``` - - **Description:** - -Checks whether the component height adapts to this text. - -**Returns:** - -Returns **true** if the component height adapts to this text; returns **false** otherwise. - -## IsExpandWidth\(\) - -``` -bool OHOS::Text::IsExpandWidth () const -``` - - **Description:** - -Checks whether the component width adapts to this text. - -**Returns:** - -Returns **true** if the component width adapts to this text; returns **false** otherwise. - -## IsExtends\(\) - -``` -bool OHOS::Rect::IsExtends (const [Rect](OHOS-Rect.md) & other) const -``` - - **Description:** - -Checks whether the rectangle is adjacent to another rectangle horizontally or vertically. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
otherIndicates the rectangle to be used for check.
- -**Returns:** - -Returns **true** if the rectangle is adjacent to the input rectangle; returns **false** otherwise. - -## IsGradient\(\) - -``` -bool OHOS::UIChartDataSerial::IsGradient () const -``` - - **Description:** - -Checks whether a polyline has a fill color. - -**Returns:** - -Returns **true** if there is a fill color; returns **false** otherwise. - -## IsIntersect\(\) \[1/2\] - -``` -bool OHOS::IsIntersect (const [Line](OHOS-Line.md) & a, const [Line](OHOS-Line.md) & b ) -``` - - **Description:** - -Chekcs whether line segment a and line segment b intersect. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
aIndicates line segment a.
bIndicates line segment b.
- -**Returns:** - -Returns **true** if the two line segments intersect; returns **false** otherwise. - -## IsIntersect\(\) \[2/2\] - -``` -bool OHOS::Rect::IsIntersect (const [Rect](OHOS-Rect.md) & other) const -``` - - **Description:** - -Checks whether the rectangle intersects with another rectangle. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
otherIndicates the rectangle to be used for check.
- -**Returns:** - -Returns **true** if the two rectangles intersect; returns **false** otherwise. - -## IsInvalid\(\) - -``` -bool OHOS::TransformMap::IsInvalid () const -``` - - **Description:** - -Checks whether the **[TransformMap](OHOS-TransformMap.md)** instance is invalid. When the vertices are all 0, the **[TransformMap](OHOS-TransformMap.md)** is invalid. - -**Returns:** - -Returns **true** if **[TransformMap](OHOS-TransformMap.md)** is invalid; returns **false** otherwise. - -## IsRepeat\(\) \[1/2\] - -``` -bool OHOS::UIImageAnimatorView::IsRepeat () const -``` - - **Description:** - -Checks whether this animator is played for infinite times. - -**Returns:** - -Returns **true** if this animator is played for infinite times, returns **false** if the animator is played a specified number of times. - -**See also:** - -[SetRepeat](Graphic.md#ga0368d596c01e1a6093d7476fce548a38) - -## IsRepeat\(\) \[2/2\] - -``` -bool OHOS::Animator::IsRepeat () const -``` - - **Description:** - -Checks whether this animator is repeated. - -**Returns:** - -Returns **true** if the animator is repeated; returns **false** if the animator is played once. - -## IsReverse\(\) - -``` -bool OHOS::UIImageAnimatorView::IsReverse () const -``` - - **Description:** - -Obtains the playback sequence of this animator. - -**Returns:** - -Returns **true** if a reverse playback is performed; returns **false** if a forward playback is performed. - -**See also:** - -[SetReverse](Graphic.md#ga38a53936c930f4d75ccd9d9c6a5b9afa) - -## IsSizeFixed\(\) - -``` -bool OHOS::UIImageAnimatorView::IsSizeFixed () const -``` - - **Description:** - -Checks whether the image size is fixed to the view size. - -**Returns:** - -Returns **true** if the image size is fixed to the view size; returns **false** if the image size is set independently. - -**See also:** - -[SetSizeFixed](Graphic.md#ga0e41547fd9d55ff85d6b800e59957370) - -## IsSmooth\(\) - -``` -bool OHOS::UIChartDataSerial::IsSmooth () const -``` - - **Description:** - -Checks whether smoothing is performed on a polyline. - -**Returns:** - -Returns **true** if smooth processing is performed on the polyline; returns **false** otherwise. - -## IsTouchable\(\) - -``` -bool OHOS::UIView::IsTouchable () const -``` - - **Description:** - -Checks whether the view is touchable. - -**Returns:** - -Returns **true** if the view is touchable; returns **false** otherwise. - -## IsViewGroup\(\) - -``` -bool OHOS::UIView::IsViewGroup () const -``` - - **Description:** - -Checks whether the view is a container view. - -**Returns:** - -Returns **true** if the view is a container view; returns **false** otherwise. - -## IsVisible\(\) - -``` -bool OHOS::UIView::IsVisible () const -``` - - **Description:** - -Checks whether the view is visible. - -**Returns:** - -Returns **true** if the view is visible; returns **false** otherwise. - -## Join\(\) - -``` -void OHOS::Rect::Join (const [Rect](OHOS-Rect.md) & rect1, const [Rect](OHOS-Rect.md) & rect2 ) -``` - - **Description:** - -Obtains the minimum rectangle that contains another two rectangles. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
rect1Indicates the first rectangle to contain.
rect2Indicates the second rectangle to contain.
- -## KeyEvent\(\) - -``` -OHOS::KeyEvent::KeyEvent (uint16_t keyId, uint16_t state ) -``` - - **Description:** - -A constructor used to create a **[KeyEvent](OHOS-KeyEvent.md)** instance. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
keyIdIndicates the key ID.
stateIndicates the key state.
- -## Layout\(\) - -``` -OHOS::Layout::Layout () -``` - - **Description:** - -A default constructor used to create a **[Layout](OHOS-Layout.md)** instance. - -## LayoutBottomOfParent\(\) - -``` -void OHOS::UIView::LayoutBottomOfParent (int16_t offset = 0) -``` - - **Description:** - -Lays out the view on the bottom of the parent view. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
offsetIndicates the offset added to the y-axis after the view is placed. A positive number indicates the offset to the top, and a negative number indicates the offset to the bottom.
- -## LayoutBottomToSibling\(\) - -``` -void OHOS::UIView::LayoutBottomToSibling (const char * id, int16_t offset = 0 ) -``` - - **Description:** - -Lays out the view on the below of a sibling view. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the pointer to the ID of the sibling view.
offsetIndicates the offset added to the y-axis after the view is placed. A positive number indicates the offset to the bottom, and a negative number indicates the offset to the top.
- -## LayoutCenterOfParent\(\) - -``` -void OHOS::UIView::LayoutCenterOfParent (int16_t xOffSet = 0, int16_t yOffset = 0 ) -``` - - **Description:** - -Lays out the view in the center of the parent view. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xOffsetIndicates the offset added to the x-axis after the view is placed. A positive number indicates the offset to the right, and a negative number indicates the offset to the left.
yOffsetIndicates the offset added to the y-axis after the view is placed. A positive number indicates the offset to the bottom, and a negative number indicates the offset to the top.
- -## LayoutChildren\(\) \[1/3\] - -``` -virtual void OHOS::GridLayout::LayoutChildren (bool needInvalidate = false) -``` - - **Description:** - -Lays out all child views according to the preset arrangement mode. - -Reimplemented from [OHOS::UIView](Graphic.md#gaca871fa2f8219e7ea9388e212d1f1e69). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
needInvalidateSpecifies whether to refresh the invalidated area after the layout is complete. Value true means to refresh the invalidated area after the layout is complete, and false means the opposite.
- -## LayoutChildren\(\) \[2/3\] - -``` -virtual void OHOS::FlexLayout::LayoutChildren (bool needInvalidate = false) -``` - - **Description:** - -Lays out all child views according to the preset arrangement mode. - -Reimplemented from [OHOS::UIView](Graphic.md#gaca871fa2f8219e7ea9388e212d1f1e69). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
needInvalidateSpecifies whether to refresh the invalidated area after the layout is complete. Value true means to refresh the invalidated area after the layout is complete, and false means the opposite.
- -## LayoutChildren\(\) \[3/3\] - -``` -virtual void OHOS::UIView::LayoutChildren (bool neeInvalidate = false) -``` - - **Description:** - -Lays out all child views according to the preset arrangement mode. - -Reimplemented in [OHOS::FlexLayout](Graphic.md#ga976abe5b006bef9018dd0d8ee2380526), and [OHOS::GridLayout](Graphic.md#ga449c17a9fa3898aac9ac68a2c48363a3). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
needInvalidateSpecifies whether to refresh the invalidated area after the layout is complete. Value true means to refresh the invalidated area after the layout is complete, and false means the opposite.
- -## LayoutLeftOfParent\(\) - -``` -void OHOS::UIView::LayoutLeftOfParent (int16_t offset = 0) -``` - - **Description:** - -Lays out the view on the left of the parent view. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
offsetIndicates the offset added to the x-axis after the view is placed. A positive number indicates the offset to the right, and a negative number indicates the offset to the left.
- -## LayoutLeftToSibling\(\) - -``` -void OHOS::UIView::LayoutLeftToSibling (const char * id, int16_t offset = 0 ) -``` - - **Description:** - -Lays out the view on the left of a sibling view. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the pointer to the ID of the sibling view.
offsetIndicates the offset added to the x-axis after the view is placed. A positive number indicates the offset to the left, and a negative number indicates the offset to the right.
- -## LayoutRightOfParent\(\) - -``` -void OHOS::UIView::LayoutRightOfParent (int16_t offset = 0) -``` - - **Description:** - -Lays out the view on the right of the parent view. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
offsetIndicates the offset added to the x-axis after the view is placed. A positive number indicates the offset to the left, and a negative number indicates the offset to the right.
- -## LayoutRightToSibling\(\) - -``` -void OHOS::UIView::LayoutRightToSibling (const char * id, int16_t offset = 0 ) -``` - - **Description:** - -Lays out the view on the right of a sibling view. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the pointer to the ID of the sibling view.
offsetIndicates the offset added to the x-axis after the view is placed. A positive number indicates the offset to the right, and a negative number indicates the offset to the left.
- -## LayoutTopOfParent\(\) - -``` -void OHOS::UIView::LayoutTopOfParent (int16_t offset = 0) -``` - - **Description:** - -Lays out the view on the top of the parent view. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
offsetIndicates the offset added to the y-axis after the view is placed. A positive number indicates the offset to the bottom, and a negative number indicates the offset to the top.
- -## LayoutTopToSibling\(\) - -``` -void OHOS::UIView::LayoutTopToSibling (const char * id, int16_t offset = 0 ) -``` - - **Description:** - -Lays out the view on the above of a sibling view. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the pointer to the ID of the sibling view.
offsetIndicates the offset added to the y-axis after the view is placed. A positive number indicates the offset to the top, and a negative number indicates the offset to the bottom.
- -## Lime\(\) - -``` -static [ColorType](OHOS-Color32.md) OHOS::Color::Lime () -``` - - **Description:** - -Obtains the color data of lime. - -**Returns:** - -Returns the color data. - -## Line\(\) \[1/3\] - -``` -OHOS::Line::Line () -``` - - **Description:** - -The default constructor used to create a **[Line](OHOS-Line.md)** instance. - -## Line\(\) \[2/3\] - -``` -OHOS::Line::Line (const [Vector2](OHOS-Vector2-T.md)< int16_t > & a, const [Vector2](OHOS-Vector2-T.md)< int16_t > & b ) -``` - - **Description:** - -A constructor used to create a **[Line](OHOS-Line.md)** instance. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
aIndicates the start point of the line.
bIndicates the end point of the line.
- -## Line\(\) \[3/3\] - -``` -OHOS::Line::Line (int16_t x1, int16_t y1, int16_t x2, int16_t y2 ) -``` - - **Description:** - -A constructor used to create a **[Line](OHOS-Line.md)** instance. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
x1Indicates the X coordinate of the line's start point.
y1Indicates the Y coordinate of the line's start point.
x2Indicates the X coordinate of the line's end point.
y2Indicates the Y coordinate of the line's end point.
- -## LinearEaseNone\(\) - -``` -static int16_t OHOS::EasingEquation::LinearEaseNone (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime ) -``` - - **Description:** - -Displays no linear easing effects. - -**t** is the equation for a linear easing. The animation progresses at a constant velocity towards the end. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
startPosIndicates the start value of this animation.
endPosIndicates the end value of this animation.
curTimeIndicates the current time of this animation.
durationTimeIndicates the total duration of this animation.
- -**Returns:** - -Returns the value for the current time. - -**See also:** - -LinearEaseIn | LinearEaseOut | LinearEaseInOut - -## List\(\) - -``` -[OHOS::List](OHOS-List-T.md)< T >::[List](OHOS-List-T.md) () -``` - - **Description:** - -A default constructor used to create a **[List](OHOS-List-T.md)** instance. The initial size is **0**. - -## ListScrollListener\(\) - -``` -OHOS::ListScrollListener::ListScrollListener () -``` - - **Description:** - -A constructor used to create a **[ListScrollListener](OHOS-ListScrollListener.md)** instance with the default state **SCROLL\_STATE\_STOP**. - -## LongPressEvent\(\) - -``` -OHOS::LongPressEvent::LongPressEvent (const [Point](OHOS-Point.md) & pos, const TimeType & timeStamp ) -``` - - **Description:** - -A constructor used to create a **[LongPressEvent](OHOS-LongPressEvent.md)** instance. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
posIndicates the position where the long-press event occurs.
timeStampIndicates the time stamp when the long-press event occurs.
- -## Magenta\(\) - -``` -static [ColorType](OHOS-Color32.md) OHOS::Color::Magenta () -``` - - **Description:** - -Obtains the color data of magenta. - -**Returns:** - -Returns the color data. - -## MakeAABB\(\) - -``` -[Rect](OHOS-Rect.md) OHOS::Polygon::MakeAABB () const -``` - - **Description:** - -Obtains the minimum rectangle that can contain the polygon. All vertices of the polygon are inside this rectangle. - -**Returns:** - -Returns the minimum rectangle that contains the polygon. - -## Maroon\(\) - -``` -static [ColorType](OHOS-Color32.md) OHOS::Color::Maroon () -``` - - **Description:** - -Obtains the color data of maroon. - -**Returns:** - -Returns the color data. - -## Matrix3\(\) \[1/2\] - -``` -[OHOS::Matrix3](OHOS-Matrix3-T.md)< T >::[Matrix3](OHOS-Matrix3-T.md) -``` - - **Description:** - -Defines a **[Matrix3](OHOS-Matrix3-T.md)** instance and initializes the 3 x 3 matrix data. - -## Matrix3\(\) \[2/2\] - -``` -[OHOS::Matrix3](OHOS-Matrix3-T.md)< T >::[Matrix3](OHOS-Matrix3-T.md) (T m00, T m01, T m02, T m10, T m11, T m12, T m20, T m21, T m22 ) -``` - - **Description:** - -Defines a **[Matrix3](OHOS-Matrix3-T.md)** instance and initializes the 3 x 3 matrix data. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
m00Indicates the element in row 1 and column 1 of the matrix.
m01Indicates the element in row 1 and column 2 of the matrix.
m02Indicates the element in row 1 and column 3 of the matrix.
m10Indicates the element in row 2 and column 1 of the matrix.
m11Indicates the element in row 2 and column 2 of the matrix.
m12Indicates the element in row 2 and column 3 of the matrix.
m20Indicates the element in row 3 and column 1 of the matrix.
m21Indicates the element in row 3 and column 2 of the matrix.
m22Indicates the element in row 3 and column 3 of the matrix.
- -## ModifyPoint\(\) - -``` -bool OHOS::UIChartDataSerial::ModifyPoint (uint16_t index, const [Point](OHOS-Point.md) & point ) -``` - - **Description:** - -Modifies the value of a data point in the data set. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
indexIndicates the index of the data point to modify.
pointIndicates the new value of the data point.
- -**Returns:** - -Returns **true** if the operation is successful; returns **false** otherwise. - -## MoveChildByOffset\(\) \[1/4\] - -``` -void OHOS::UIAbstractScroll::MoveChildByOffset (int16_t offsetX, int16_t offsetY ) -``` - - **Description:** - -Moves the position of all child views. - -Reimplemented from [OHOS::UIViewGroup](Graphic.md#ga776c6c1640cb88b537af227fa5eb0725). - -Reimplemented in [OHOS::UISwipeView](Graphic.md#ga4db88368bb4908ee05aa1137982b6d0e), and [OHOS::UIList](Graphic.md#gafe121e0cc150122486049dcaf83f3c26). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
offsetXIndicates the offset distance by which a child view is moved on the x-axis.
offsetYIndicates the offset distance by which a child view is moved on the y-axis.
- -## MoveChildByOffset\(\) \[2/4\] - -``` -virtual void OHOS::UIViewGroup::MoveChildByOffset (int16_t x, int16_t y ) -``` - - **Description:** - -Moves all child views. - -Reimplemented in [OHOS::UISwipeView](Graphic.md#ga4db88368bb4908ee05aa1137982b6d0e), [OHOS::UIList](Graphic.md#gafe121e0cc150122486049dcaf83f3c26), and [OHOS::UIAbstractScroll](Graphic.md#ga5013215d3075616ae081849ef52bb57a). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the offset distance by which this view group is moved on the x-axis.
yIndicates the offset distance by which this view group is moved on the y-axis.
- -## MoveChildByOffset\(\) \[3/4\] - -``` -virtual void OHOS::UIList::MoveChildByOffset (int16_t x, int16_t y ) -``` - - **Description:** - -Moves the position of all child views. - -Reimplemented from [OHOS::UIAbstractScroll](Graphic.md#ga5013215d3075616ae081849ef52bb57a). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
offsetXIndicates the offset distance by which a child view is moved on the x-axis.
offsetYIndicates the offset distance by which a child view is moved on the y-axis.
- -## MoveChildByOffset\(\) \[4/4\] - -``` -void OHOS::UISwipeView::MoveChildByOffset (int16_t offsetX, int16_t offsetY ) -``` - - **Description:** - -Moves the position of all child views. - -Reimplemented from [OHOS::UIAbstractScroll](Graphic.md#ga5013215d3075616ae081849ef52bb57a). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
offsetXIndicates the offset distance by which a child view is moved on the x-axis.
offsetYIndicates the offset distance by which a child view is moved on the y-axis.
- -## Navy\(\) - -``` -static [ColorType](OHOS-Color32.md) OHOS::Color::Navy () -``` - - **Description:** - -Obtains the color data of navy. - -**Returns:** - -Returns the color data. - -## Next\(\) - -``` -[ListNode](OHOS-ListNode-T.md)* [OHOS::List](OHOS-List-T.md)< T >::Next (const [ListNode](OHOS-ListNode-T.md)< T > * node) const -``` - - **Description:** - -Obtains the address of the node following the specified **node**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
nodeIndicates the pointer to the data node in the linked list.
- -**Returns:** - -Returns the address of the node following **node**. - -## Olive\(\) - -``` -static [ColorType](OHOS-Color32.md) OHOS::Color::Olive () -``` - - **Description:** - -Obtains the color data of olive. - -**Returns:** - -Returns the color data. - -## OnAnimatorStop\(\) \[1/2\] - -``` -virtual void OHOS::UIImageAnimatorView::AnimatorStopListener::OnAnimatorStop ([UIView](OHOS-UIView.md) & view) -``` - - **Description:** - -Called when this animator stops. - -You need to inherit from the ** [AnimatorStopListener](OHOS-UIImageAnimatorView-AnimatorStopListener.md)** class and implement this function. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
viewIndicates the instance of this view.
- -## OnAnimatorStop\(\) \[2/2\] - -``` -virtual void OHOS::UITextureMapper::AnimatorStopListener::OnAnimatorStop ([UIView](OHOS-UIView.md) & view) -``` - - **Description:** - -Called when this animator stops. This is a pure virtual function, which needs your inheritance and implementation. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
viewIndicates the instance of this view.
- -## OnCancel\(\) - -``` -virtual bool OHOS::UIView::OnTouchListener::OnCancel ([UIView](OHOS-UIView.md) & view, const [CancelEvent](OHOS-CancelEvent.md) & event ) -``` - - **Description:** - -Called when a click event on a view is canceled. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
viewIndicates the view on which a click event is canceled.
eventIndicates the cancel event.
- -**Returns:** - -Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) - -## OnCancelEvent\(\) \[1/2\] - -``` -virtual void OHOS::UIView::OnCancelEvent (const [CancelEvent](OHOS-CancelEvent.md) & event) -``` - - **Description:** - -Called when a click event on the view is canceled. - -Reimplemented in [OHOS::UIButton](Graphic.md#ga4f481e0ce91f87c6b70f6e0190e4f34f). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
eventIndicates the cancel event.
- -**Returns:** - -Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) - -## OnCancelEvent\(\) \[2/2\] - -``` -void OHOS::UIButton::OnCancelEvent (const [CancelEvent](OHOS-CancelEvent.md) & event) -``` - - **Description:** - -Executes the cancel event action. - -Reimplemented from [OHOS::UIView](Graphic.md#ga8f01ff25a33b20df0758f564148e579d). - -**Parameters:** - - - - - - - - - - - -

Name

-

Description

-
[in]eventThe cancel event.
- -## OnChange\(\) \[1/2\] - -``` -virtual void OHOS::UISlider::UISliderEventListener::OnChange (int16_t value) -``` - - **Description:** - -Called when the slider is dragged or clicked. This is a virtual function, which needs your implementation. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
valueIndicates the current value of the slider.
- -## OnChange\(\) \[2/2\] - -``` -virtual bool OHOS::UICheckBox::OnChangeListener::OnChange ([UICheckBoxState](Graphic.md#ga15a3f0302aded0e4d1584ddc6002335d) state) -``` - - **Description:** - -Called when the state of this check box is switched. This is a virtual function, which needs your implementation. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
stateIndicates the current state of this check box. For details, see UICheckBoxState.
- -## OnChildChanged\(\) - -``` -virtual void OHOS::UIViewGroup::OnChildChanged () -``` - - **Description:** - -Performs operations needed after a child view is added or removed. - -## OnClick\(\) - -``` -virtual bool OHOS::UIView::OnClickListener::OnClick ([UIView](OHOS-UIView.md) & view, const [ClickEvent](OHOS-ClickEvent.md) & event ) -``` - - **Description:** - -Called when a view is clicked. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
viewIndicates the view clicked.
eventIndicates the click event.
- -**Returns:** - -Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) - -## OnClickEvent\(\) \[1/5\] - -``` -virtual void OHOS::UIView::OnClickEvent (const [ClickEvent](OHOS-ClickEvent.md) & event) -``` - - **Description:** - -Called when the view is clicked. - -Reimplemented in [OHOS::UISlider](Graphic.md#ga05029e55d4ccb50cd45f1cd2a53917e4), [OHOS::UICheckBox](Graphic.md#ga31d4f10f4c32b0fb284645450875ae0c), [OHOS::UIRadioButton](Graphic.md#ga7b6849c94b9d8b90cbbe890790fedf1e), and [OHOS::UIRepeatButton](Graphic.md#gaca17d1cfa9daa35a88d387ebc1d9352c). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
eventIndicates the click event.
- -**Returns:** - -Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) - -## OnClickEvent\(\) \[2/5\] - -``` -void OHOS::UIRepeatButton::OnClickEvent (const [ClickEvent](OHOS-ClickEvent.md) & event) -``` - - **Description:** - -The action of click event. - -Reimplemented from [OHOS::UIView](Graphic.md#gad08697a29aae4c58267f494b66b9a547). - -**Parameters:** - - - - - - - - - - - -

Name

-

Description

-
[in]eventclick event.
- -## OnClickEvent\(\) \[3/5\] - -``` -void OHOS::UIRadioButton::OnClickEvent (const [ClickEvent](OHOS-ClickEvent.md) & event) -``` - - **Description:** - -Executes the click event action OnClickEvent will reverse the selected state of checkbox. Example: If the check box is selected, the checkbox status is changed to Unselected after the click action is taken. - -Reimplemented from [OHOS::UICheckBox](Graphic.md#ga31d4f10f4c32b0fb284645450875ae0c). - -**Parameters:** - - - - - - - - - - - -

Name

-

Description

-
[in]eventThe event that passed when OnClickEvent is invoked.
- -## OnClickEvent\(\) \[4/5\] - -``` -void OHOS::UICheckBox::OnClickEvent (const [ClickEvent](OHOS-ClickEvent.md) & event) -``` - - **Description:** - -Executes the click event action OnClickEvent will reverse the selected state of checkbox. Example: If the check box is selected, the checkbox status is changed to Unselected after the click action is taken. - -Reimplemented from [OHOS::UIView](Graphic.md#gad08697a29aae4c58267f494b66b9a547). - -Reimplemented in [OHOS::UIRadioButton](Graphic.md#ga7b6849c94b9d8b90cbbe890790fedf1e). - -**Parameters:** - - - - - - - - - - - -

Name

-

Description

-
[in]eventThe event that passed when OnClickEvent is invoked.
- -## OnClickEvent\(\) \[5/5\] - -``` -void OHOS::UISlider::OnClickEvent (const [ClickEvent](OHOS-ClickEvent.md) & event) -``` - - **Description:** - -Called when the view is clicked. - -Reimplemented from [OHOS::UIView](Graphic.md#gad08697a29aae4c58267f494b66b9a547). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
eventIndicates the click event.
- -**Returns:** - -Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) - -## OnDrag\(\) - -``` -virtual bool OHOS::UIView::OnDragListener::OnDrag ([UIView](OHOS-UIView.md) & view, const [DragEvent](OHOS-DragEvent.md) & event ) -``` - - **Description:** - -Called when a view is being dragged. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
viewIndicates the view dragged.
eventIndicates the drag event.
- -**Returns:** - -Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) - -## OnDragEnd\(\) - -``` -virtual bool OHOS::UIView::OnDragListener::OnDragEnd ([UIView](OHOS-UIView.md) & view, const [DragEvent](OHOS-DragEvent.md) & event ) -``` - - **Description:** - -Called when a view stops dragging. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
viewIndicates the view dragged.
eventIndicates the drag event.
- -**Returns:** - -Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) - -## OnDragEndEvent\(\) \[1/5\] - -``` -virtual bool OHOS::UIView::OnDragEndEvent (const [DragEvent](OHOS-DragEvent.md) & event) -``` - - **Description:** - -Called when the view stops dragging. - -Reimplemented in [OHOS::UISwipeView](Graphic.md#gab57d973cea1186dd90eec91cd27da1fb), [OHOS::UISlider](Graphic.md#gae9136559779057065708312fb62304bb), [OHOS::UIList](Graphic.md#ga225e59d60271c9012a017136d2aab0d6), and [OHOS::UIScrollView](Graphic.md#ga05e30354bc97373fbd30f8c045dbbeea). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
eventIndicates the drag event.
- -**Returns:** - -Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) - -## OnDragEndEvent\(\) \[2/5\] - -``` -bool OHOS::UIScrollView::OnDragEndEvent (const [DragEvent](OHOS-DragEvent.md) & event) -``` - - **Description:** - -Called when the view stops dragging. - -Reimplemented from [OHOS::UIView](Graphic.md#ga1799d33be73f64ed2066f50d7e65468d). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
eventIndicates the drag event.
- -**Returns:** - -Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) - -## OnDragEndEvent\(\) \[3/5\] - -``` -bool OHOS::UIList::OnDragEndEvent (const [DragEvent](OHOS-DragEvent.md) & event) -``` - - **Description:** - -Called when the view stops dragging. - -Reimplemented from [OHOS::UIView](Graphic.md#ga1799d33be73f64ed2066f50d7e65468d). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
eventIndicates the drag event.
- -**Returns:** - -Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) - -## OnDragEndEvent\(\) \[4/5\] - -``` -bool OHOS::UISlider::OnDragEndEvent (const [DragEvent](OHOS-DragEvent.md) & event) -``` - - **Description:** - -Called when the view stops dragging. - -Reimplemented from [OHOS::UIView](Graphic.md#ga1799d33be73f64ed2066f50d7e65468d). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
eventIndicates the drag event.
- -**Returns:** - -Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) - -## OnDragEndEvent\(\) \[5/5\] - -``` -bool OHOS::UISwipeView::OnDragEndEvent (const [DragEvent](OHOS-DragEvent.md) & event) -``` - - **Description:** - -Called when the view stops dragging. - -Reimplemented from [OHOS::UIView](Graphic.md#ga1799d33be73f64ed2066f50d7e65468d). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
eventIndicates the drag event.
- -**Returns:** - -Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) - -## OnDragEvent\(\) \[1/5\] - -``` -virtual bool OHOS::UIView::OnDragEvent (const [DragEvent](OHOS-DragEvent.md) & event) -``` - - **Description:** - -Called when the view is being dragged. - -Reimplemented in [OHOS::UISwipeView](Graphic.md#ga888ec9a6ddaa4051e7c2e5d76832565c), [OHOS::UISlider](Graphic.md#ga4481d4453dbf06cc808e4848a814ed7e), [OHOS::UIList](Graphic.md#ga7e99d1fb891879195c19c211c6de6600), and [OHOS::UIScrollView](Graphic.md#ga2fde4511d743ccc257308d9a0c035076). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
eventIndicates the drag event.
- -**Returns:** - -Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) - -## OnDragEvent\(\) \[2/5\] - -``` -bool OHOS::UIScrollView::OnDragEvent (const [DragEvent](OHOS-DragEvent.md) & event) -``` - - **Description:** - -Called when the view is being dragged. - -Reimplemented from [OHOS::UIView](Graphic.md#ga46249c8caf06b81590d9450e30a31147). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
eventIndicates the drag event.
- -**Returns:** - -Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) - -## OnDragEvent\(\) \[3/5\] - -``` -bool OHOS::UIList::OnDragEvent (const [DragEvent](OHOS-DragEvent.md) & event) -``` - - **Description:** - -Called when the view is being dragged. - -Reimplemented from [OHOS::UIView](Graphic.md#ga46249c8caf06b81590d9450e30a31147). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
eventIndicates the drag event.
- -**Returns:** - -Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) - -## OnDragEvent\(\) \[4/5\] - -``` -bool OHOS::UISlider::OnDragEvent (const [DragEvent](OHOS-DragEvent.md) & event) -``` - - **Description:** - -Called when the view is being dragged. - -Reimplemented from [OHOS::UIView](Graphic.md#ga46249c8caf06b81590d9450e30a31147). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
eventIndicates the drag event.
- -**Returns:** - -Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) - -## OnDragEvent\(\) \[5/5\] - -``` -void OHOS::UISwipeView::OnDragEvent (const [DragEvent](OHOS-DragEvent.md) & event) -``` - - **Description:** - -revice drag event, Switch to specified view when drag - -Reimplemented from [OHOS::UIView](Graphic.md#ga46249c8caf06b81590d9450e30a31147). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
eventThe drag event
- -## OnDragStart\(\) - -``` -virtual bool OHOS::UIView::OnDragListener::OnDragStart ([UIView](OHOS-UIView.md) & view, const [DragEvent](OHOS-DragEvent.md) & event ) -``` - - **Description:** - -Called when a view starts to drag. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
viewIndicates the view dragged.
eventIndicates the drag event.
- -**Returns:** - -Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) - -## OnDragStartEvent\(\) - -``` -virtual bool OHOS::UIView::OnDragStartEvent (const [DragEvent](OHOS-DragEvent.md) & event) -``` - - **Description:** - -Called when the view starts to drag. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
eventIndicates the drag event.
- -**Returns:** - -Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) - -## OnDraw\(\) \[1/15\] - -``` -virtual void OHOS::UIView::OnDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) -``` - - **Description:** - -Called when a view is drawn. - -Reimplemented in [OHOS::UIChart](Graphic.md#ga5c101948cb2cfb8394af0bcb56f65efb), [OHOS::UICanvas](Graphic.md#gac6122967d3e1f0d312eebed2f93a1369), [OHOS::UIArcLabel](Graphic.md#ga9f3b69ad5511a4bd8f3aede212f3f374), [OHOS::UIAnalogClock](Graphic.md#ga6c943119bd89a863ec5f05722a1fd146), [OHOS::UIBoxProgress](Graphic.md#ga3321d9b9b156423bdc0abcb8e99efb0d), [OHOS::UISlider](Graphic.md#gad6bd59e05d77868e595d087fd2de5d00), [OHOS::UISurfaceView](Graphic.md#ga30a99c506c6d8d8fc0e0bd81d52e2d52), [OHOS::UICheckBox](Graphic.md#ga8e75f8411fb25e564c82573a12773189), [OHOS::UILabel](Graphic.md#ga911199741bf792b5de00789b4c8d780d), [OHOS::UIAxis](Graphic.md#ga5360803f425055de52af5f7fa1081cfe), [OHOS::UIImageView](Graphic.md#ga565cecb8ac66f2009dc4783da9bdc699), [OHOS::UIButton](Graphic.md#gae69843b87be9fcdab3e4ac776547f3bc), [OHOS::UICircleProgress](Graphic.md#ga611f2f03c22499c428d1de3392ee4861), and [OHOS::UILabelButton](Graphic.md#ga159c536c3f826165c26fdabdc87f498a). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
invalidatedAreaIndicates the area to draw.
- -## OnDraw\(\) \[2/15\] - -``` -void OHOS::UILabelButton::OnDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) -``` - - **Description:** - -Draws a label button. - -Reimplemented from [OHOS::UIButton](Graphic.md#gae69843b87be9fcdab3e4ac776547f3bc). - -## OnDraw\(\) \[3/15\] - -``` -void OHOS::UICircleProgress::OnDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) -``` - - **Description:** - -Called when a view is drawn. - -Reimplemented from [OHOS::UIView](Graphic.md#ga9a5f43bdc03cde30323b570bfb7ae425). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
invalidatedAreaIndicates the area to draw.
- -## OnDraw\(\) \[4/15\] - -``` -void OHOS::UIButton::OnDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) -``` - - **Description:** - -Executes the draw action. - -Reimplemented from [OHOS::UIView](Graphic.md#ga9a5f43bdc03cde30323b570bfb7ae425). - -Reimplemented in [OHOS::UILabelButton](Graphic.md#ga159c536c3f826165c26fdabdc87f498a). - -**Parameters:** - - - - - - - - - - - -

Name

-

Description

-
[in]invalidatedAreaThe rectangle to draw, with coordinates relative to this drawable..
- -## OnDraw\(\) \[5/15\] - -``` -void OHOS::UIImageView::OnDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) -``` - - **Description:** - -Draws this image view. - -Reimplemented from [OHOS::UIView](Graphic.md#ga9a5f43bdc03cde30323b570bfb7ae425). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
invalidatedAreaIndicates the area to draw.
- -## OnDraw\(\) \[6/15\] - -``` -void OHOS::UIAxis::OnDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) -``` - - **Description:** - -Called when a view is drawn. - -Reimplemented from [OHOS::UIView](Graphic.md#ga9a5f43bdc03cde30323b570bfb7ae425). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
invalidatedAreaIndicates the area to draw.
- -## OnDraw\(\) \[7/15\] - -``` -void OHOS::UILabel::OnDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) -``` - - **Description:** - -Draws this label. - -Reimplemented from [OHOS::UIView](Graphic.md#ga9a5f43bdc03cde30323b570bfb7ae425). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
invalidatedAreaIndicates the area to draw.
- -## OnDraw\(\) \[8/15\] - -``` -void OHOS::UICheckBox::OnDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) -``` - - **Description:** - -Executes the draw action Ondraw invokes the rendering function provided by the underlying layer to draw pictures based on the selected status of the checkbox. - -Reimplemented from [OHOS::UIView](Graphic.md#ga9a5f43bdc03cde30323b570bfb7ae425). - -**Parameters:** - - - - - - - - - - - -

Name

-

Description

-
[in]invalidatedAreaThe invalidated area.
- -## OnDraw\(\) \[9/15\] - -``` -void OHOS::UISurfaceView::OnDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) -``` - - **Description:** - -Called when this view is drawn. - -Reimplemented from [OHOS::UIView](Graphic.md#ga9a5f43bdc03cde30323b570bfb7ae425). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
invalidatedAreaIndicates the area to draw.
- -## OnDraw\(\) \[10/15\] - -``` -void OHOS::UISlider::OnDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) -``` - - **Description:** - -Called when a view is drawn. - -Reimplemented from [OHOS::UIBoxProgress](Graphic.md#ga3321d9b9b156423bdc0abcb8e99efb0d). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
invalidatedAreaIndicates the area to draw.
- -## OnDraw\(\) \[11/15\] - -``` -void OHOS::UIBoxProgress::OnDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) -``` - - **Description:** - -Called when a view is drawn. - -Reimplemented from [OHOS::UIView](Graphic.md#ga9a5f43bdc03cde30323b570bfb7ae425). - -Reimplemented in [OHOS::UISlider](Graphic.md#gad6bd59e05d77868e595d087fd2de5d00). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
invalidatedAreaIndicates the area to draw.
- -## OnDraw\(\) \[12/15\] - -``` -void OHOS::UIAnalogClock::OnDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) -``` - - **Description:** - -Draws an analog clock. - -Reimplemented from [OHOS::UIView](Graphic.md#ga9a5f43bdc03cde30323b570bfb7ae425). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
invalidatedAreaIndicates the area to draw.
- -## OnDraw\(\) \[13/15\] - -``` -virtual void OHOS::UIArcLabel::OnDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) -``` - - **Description:** - -Draws an arc text. - -Reimplemented from [OHOS::UIView](Graphic.md#ga9a5f43bdc03cde30323b570bfb7ae425). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
invalidatedAreaIndicates the area to draw.
- -## OnDraw\(\) \[14/15\] - -``` -virtual void OHOS::UICanvas::OnDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) -``` - - **Description:** - -Called when a view is drawn. - -Reimplemented from [OHOS::UIView](Graphic.md#ga9a5f43bdc03cde30323b570bfb7ae425). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
invalidatedAreaIndicates the area to draw.
- -## OnDraw\(\) \[15/15\] - -``` -void OHOS::UIChart::OnDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) -``` - - **Description:** - -Called when a view is drawn. - -Reimplemented from [OHOS::UIView](Graphic.md#ga9a5f43bdc03cde30323b570bfb7ae425). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
invalidatedAreaIndicates the area to draw.
- -## OnFPSChanged\(\) - -``` -virtual void OHOS::SysInfo::OnFPSChangedListener::OnFPSChanged (float newFPS) -``` - - **Description:** - -Called when the FPS data changes. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
newFPSIndicates the FPS data.
- -## OnFPSChangedListener\(\) - -``` -OHOS::SysInfo::OnFPSChangedListener::OnFPSChangedListener () -``` - - **Description:** - -A constructor used to create an **[OnFPSChangedListener](OHOS-SysInfo-OnFPSChangedListener.md)** instance with the default sampling type **FPS\_CT\_FIXED\_TIME**. - -## OnItemSelected\(\) - -``` -virtual void OHOS::ListScrollListener::OnItemSelected (int16_t index, [UIView](OHOS-UIView.md) * view ) -``` - - **Description:** - -Called when a new child view is selected at the preset position as this list scrolls. For details about how to set the position, see **SetSelectPosition**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
indexIndicates the index of the child view being selected at the preset position. This parameter should be set to NULL_SELECT_INDEX if no child view is selected or no position is preset.
viewIndicates the child view being selected at the preset position. This parameter should be set to NULL if no child view is selected or no position is preset.
- -## OnKeyAct\(\) - -``` -virtual bool OHOS::RootView::OnKeyActListener::OnKeyAct ([UIView](OHOS-UIView.md) & view, const [KeyEvent](OHOS-KeyEvent.md) & event ) -``` - - **Description:** - -Responds to a physical key event. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
viewIndicates the view displayed upon a physical key event.
eventIndicates the physical key event to respond to.
- -**Returns:** - -Returns **true** if the view is normally displayed upon a physical key event; returns ** false** otherwise. - -## OnKeyEvent\(\) - -``` -virtual void OHOS::RootView::OnKeyEvent (const [KeyEvent](OHOS-KeyEvent.md) & event) -``` - - **Description:** - -Executes a physical key event. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
eventIndicates the physical key event to execute.
- -## OnLongPress\(\) - -``` -virtual bool OHOS::UIView::OnLongPressListener::OnLongPress ([UIView](OHOS-UIView.md) & view, const [LongPressEvent](OHOS-LongPressEvent.md) & event ) -``` - - **Description:** - -Called when a view is long pressed. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
viewIndicates the view long pressed.
eventIndicates the long-press event.
- -**Returns:** - -Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) - -## OnLongPressEvent\(\) \[1/2\] - -``` -virtual bool OHOS::UIView::OnLongPressEvent (const [LongPressEvent](OHOS-LongPressEvent.md) & event) -``` - - **Description:** - -Called when the view is long pressed. - -Reimplemented in [OHOS::UIRepeatButton](Graphic.md#ga33de0d99700bd1c289d967458477606f). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
eventIndicates the long-press event.
- -**Returns:** - -Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) - -## OnLongPressEvent\(\) \[2/2\] - -``` -void OHOS::UIRepeatButton::OnLongPressEvent (const [LongPressEvent](OHOS-LongPressEvent.md) & event) -``` - - **Description:** - -The action of long press event. - -Reimplemented from [OHOS::UIView](Graphic.md#gac311aa47301d727c35fc31f8630d016e). - -**Parameters:** - - - - - - - - - - - -

Name

-

Description

-
[in]eventlong press event.
- -## OnPickerStoped\(\) - -``` -virtual void OHOS::UIPicker::SelectedListener::OnPickerStoped ([UIPicker](OHOS-UIPicker.md) & picker) -``` - - **Description:** - -Called when an item is selected after sliding stops. This function is implemented by applications. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
pickerIndicates the picker instance.
- -## OnPostDraw\(\) \[1/3\] - -``` -virtual void OHOS::UIView::OnPostDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) -``` - - **Description:** - -Called after a view is drawn. - -Reimplemented in [OHOS::UIAnalogClock](Graphic.md#ga1366a4ca45babb67f3103279a2bbc0bf), and [OHOS::UIScrollView](Graphic.md#ga8a7764e5a85e40b497a67fdf54a1b4c8). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
invalidatedAreaIndicates the area in which the view is drawn.
- -## OnPostDraw\(\) \[2/3\] - -``` -void OHOS::UIScrollView::OnPostDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) -``` - - **Description:** - -Called after a view is drawn. - -Reimplemented from [OHOS::UIView](Graphic.md#gab70473cd0d8fe7c9d4bb817caeee9153). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
invalidatedAreaIndicates the area in which the view is drawn.
- -## OnPostDraw\(\) \[3/3\] - -``` -virtual void OHOS::UIAnalogClock::OnPostDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) -``` - - **Description:** - -Performs the operations needed after the drawing. - -Reimplemented from [OHOS::UIView](Graphic.md#gab70473cd0d8fe7c9d4bb817caeee9153). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
invalidatedAreaIndicates the area to draw.
- -## OnPreDraw\(\) \[1/13\] - -``` -virtual bool OHOS::UIView::OnPreDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) -``` - - **Description:** - -Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process. - -Reimplemented in [OHOS::UIChart](Graphic.md#ga9a8287a522f00bb3dbe60af8f242054a), [OHOS::UISlider](Graphic.md#gaf0483e605613ee1789332e67f00f5e2d), [OHOS::UISurfaceView](Graphic.md#gaeb15d1fb86ad2e2aabddc9c36676894a), [OHOS::UICheckBox](Graphic.md#ga53cc6c8f18b90c3abd96a791c8921010), [OHOS::UILabel](Graphic.md#gaac293fb7f318e1855fba21b740147061), [OHOS::UIAxis](Graphic.md#gad1bf4d83270c0a4ba04f3cffbc67bb97), [OHOS::UIDialog](Graphic.md#ga6b3cf14760fc07e38f51d366a8e5fdb9), [OHOS::UIImageView](Graphic.md#ga5d79816831f61406c1c8bd300da9973e), [OHOS::UIButton](Graphic.md#gaf64d9ec1744ab9c7385dd64d30a786e4), [OHOS::UIRadioButton](Graphic.md#gade9069f6e553c6c43f7684e835b584e5), [OHOS::UICircleProgress](Graphic.md#ga98bc4ea99629e4d5c7ca5ca4b43e8e96), and [OHOS::UIPicker](Graphic.md#ga3e2a703a10017c789366029b297969ab). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
invalidatedAreaIndicates the area to draw.
- -**Returns:** - -Returns **true** if the parent view needs to be redrawn; returns **false** otherwise. - -## OnPreDraw\(\) \[2/13\] - -``` -bool OHOS::UIPicker::OnPreDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) -``` - - **Description:** - -Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process. - -Reimplemented from [OHOS::UIView](Graphic.md#gac295fe4851eed72f48e9a63771416d71). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
invalidatedAreaIndicates the area to draw.
- -**Returns:** - -Returns **true** if the parent view needs to be redrawn; returns **false** otherwise. - -## OnPreDraw\(\) \[3/13\] - -``` -bool OHOS::UICircleProgress::OnPreDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) -``` - - **Description:** - -Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process. - -Reimplemented from [OHOS::UIView](Graphic.md#gac295fe4851eed72f48e9a63771416d71). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
invalidatedAreaIndicates the area to draw.
- -**Returns:** - -Returns **true** if the parent view needs to be redrawn; returns **false** otherwise. - -## OnPreDraw\(\) \[4/13\] - -``` -bool OHOS::UIRadioButton::OnPreDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) -``` - - **Description:** - -Do something before draw, this function will be invoked mainly to check if this view need to cover invalidate area so render manager can decide which layer to draw firstly. - -Reimplemented from [OHOS::UICheckBox](Graphic.md#ga53cc6c8f18b90c3abd96a791c8921010). - -**Parameters:** - - - - - - - - - - - -

Name

-

Description

-
[in]invalidatearea.
- -**Returns:** - -True if need cover. - -## OnPreDraw\(\) \[5/13\] - -``` -bool OHOS::UIButton::OnPreDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) -``` - - **Description:** - -Do something before draw, this function will be invoked mainly to check if this view need to cover invalidate area so render manager can decide which layer to draw firstly. - -Reimplemented from [OHOS::UIView](Graphic.md#gac295fe4851eed72f48e9a63771416d71). - -**Parameters:** - - - - - - - - - - - -

Name

-

Description

-
[in]invalidatearea.
- -**Returns:** - -True if need cover. - -## OnPreDraw\(\) \[6/13\] - -``` -bool OHOS::UIImageView::OnPreDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) -``` - - **Description:** - -Checks whether this image view needs to be covered to optimize the drawing process. - -Reimplemented from [OHOS::UIView](Graphic.md#gac295fe4851eed72f48e9a63771416d71). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
invalidatedAreaIndicates the area to draw.
- -**Returns:** - -Returns **true** if this image view needs to be covered; returns ** false** otherwise. - -## OnPreDraw\(\) \[7/13\] - -``` -bool OHOS::UIDialog::OnPreDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) -``` - - **Description:** - -Checks whether this label needs to be covered before drawing it. - -Reimplemented from [OHOS::UIView](Graphic.md#gac295fe4851eed72f48e9a63771416d71). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
invalidatedAreaIndicates the area to draw.
- -**Returns:** - -Returns **true** if this label needs to be covered; returns ** false** otherwise. - -## OnPreDraw\(\) \[8/13\] - -``` -bool OHOS::UIAxis::OnPreDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) -``` - - **Description:** - -Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process. - -Reimplemented from [OHOS::UIView](Graphic.md#gac295fe4851eed72f48e9a63771416d71). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
invalidatedAreaIndicates the area to draw.
- -**Returns:** - -Returns **true** if the parent view needs to be redrawn; returns **false** otherwise. - -## OnPreDraw\(\) \[9/13\] - -``` -bool OHOS::UILabel::OnPreDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) -``` - - **Description:** - -Checks whether this label needs to be covered before drawing it. - -Reimplemented from [OHOS::UIView](Graphic.md#gac295fe4851eed72f48e9a63771416d71). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
invalidatedAreaIndicates the area to draw.
- -**Returns:** - -Returns **true** if this label needs to be covered; returns ** false** otherwise. - -## OnPreDraw\(\) \[10/13\] - -``` -bool OHOS::UICheckBox::OnPreDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) -``` - - **Description:** - -Do something before draw, this function will be invoked mainly to check if this view need to cover invalidate area so render manager can decide which layer to draw firstly. - -Reimplemented from [OHOS::UIView](Graphic.md#gac295fe4851eed72f48e9a63771416d71). - -Reimplemented in [OHOS::UIRadioButton](Graphic.md#gade9069f6e553c6c43f7684e835b584e5). - -**Parameters:** - - - - - - - - - - - -

Name

-

Description

-
[in]invalidatearea.
- -**Returns:** - -True if need cover. - -## OnPreDraw\(\) \[11/13\] - -``` -bool OHOS::UISurfaceView::OnPreDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) -``` - - **Description:** - -Called before this view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so that the drawing process is optimized. - -Reimplemented from [OHOS::UIView](Graphic.md#gac295fe4851eed72f48e9a63771416d71). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
invalidatedAreaIndicates the area to draw.
- -**Returns:** - -Returns **true** if the parent view needs to be redrawn; returns **false** otherwise. - -## OnPreDraw\(\) \[12/13\] - -``` -bool OHOS::UISlider::OnPreDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) -``` - - **Description:** - -Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process. - -Reimplemented from [OHOS::UIView](Graphic.md#gac295fe4851eed72f48e9a63771416d71). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
invalidatedAreaIndicates the area to draw.
- -**Returns:** - -Returns **true** if the parent view needs to be redrawn; returns **false** otherwise. - -## OnPreDraw\(\) \[13/13\] - -``` -bool OHOS::UIChart::OnPreDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) -``` - - **Description:** - -Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process. - -Reimplemented from [OHOS::UIView](Graphic.md#gac295fe4851eed72f48e9a63771416d71). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
invalidatedAreaIndicates the area to draw.
- -**Returns:** - -Returns **true** if the parent view needs to be redrawn; returns **false** otherwise. - -## OnPress\(\) - -``` -virtual bool OHOS::UIView::OnTouchListener::OnPress ([UIView](OHOS-UIView.md) & view, const [PressEvent](OHOS-PressEvent.md) & event ) -``` - - **Description:** - -Called when a view is pressed. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
viewIndicates the view pressed.
eventIndicates the press event.
- -**Returns:** - -Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) - -## OnPressEvent\(\) \[1/4\] - -``` -virtual void OHOS::UIView::OnPressEvent (const [PressEvent](OHOS-PressEvent.md) & event) -``` - - **Description:** - -Called when the view is pressed. - -Reimplemented in [OHOS::UIList](Graphic.md#gaa6ba86e78d4a12ea47b6aaa8dd88f882), [OHOS::UIScrollView](Graphic.md#ga54572308575db6d19997343c65d72fbb), and [OHOS::UIButton](Graphic.md#ga1d887720c89170abd3c8a400a791765d). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
eventIndicates the press event.
- -**Returns:** - -Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) - -## OnPressEvent\(\) \[2/4\] - -``` -void OHOS::UIButton::OnPressEvent (const [PressEvent](OHOS-PressEvent.md) & event) -``` - - **Description:** - -Executes the press event action. - -Reimplemented from [OHOS::UIView](Graphic.md#gafa544ff2d27785a9410a80689f1ad3b1). - -**Parameters:** - - - - - - - - - - - -

Name

-

Description

-
[in]eventThe press event, contain press position.
- -## OnPressEvent\(\) \[3/4\] - -``` -void OHOS::UIScrollView::OnPressEvent (const [PressEvent](OHOS-PressEvent.md) & event) -``` - - **Description:** - -Called when the view is pressed. - -Reimplemented from [OHOS::UIView](Graphic.md#gafa544ff2d27785a9410a80689f1ad3b1). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
eventIndicates the press event.
- -**Returns:** - -Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) - -## OnPressEvent\(\) \[4/4\] - -``` -void OHOS::UIList::OnPressEvent (const [PressEvent](OHOS-PressEvent.md) & event) -``` - - **Description:** - -Called when the view is pressed. - -Reimplemented from [OHOS::UIView](Graphic.md#gafa544ff2d27785a9410a80689f1ad3b1). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
eventIndicates the press event.
- -**Returns:** - -Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) - -## OnRelease\(\) \[1/2\] - -``` -virtual void OHOS::UISlider::UISliderEventListener::OnRelease (int16_t value) -``` - - **Description:** - -Called when the slider is released. This is a virtual function, which needs your implementation. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
valueIndicates the current value of the slider.
- -## OnRelease\(\) \[2/2\] - -``` -virtual bool OHOS::UIView::OnTouchListener::OnRelease ([UIView](OHOS-UIView.md) & view, const [ReleaseEvent](OHOS-ReleaseEvent.md) & event ) -``` - - **Description:** - -Called when a view is released. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
viewIndicates the view released.
eventIndicates the release event.
- -**Returns:** - -Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) - -## OnReleaseEvent\(\) \[1/3\] - -``` -virtual void OHOS::UIView::OnReleaseEvent (const [ReleaseEvent](OHOS-ReleaseEvent.md) & event) -``` - - **Description:** - -Called when the view is released. - -Reimplemented in [OHOS::UIButton](Graphic.md#gadb9492eb82ff23f91f9263fc748f24de), and [OHOS::UIRepeatButton](Graphic.md#gadd5891c03d95d07d127558b5bc9a7bd7). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
eventIndicates the release event.
- -**Returns:** - -Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) - -## OnReleaseEvent\(\) \[2/3\] - -``` -void OHOS::UIRepeatButton::OnReleaseEvent (const [ReleaseEvent](OHOS-ReleaseEvent.md) & event) -``` - - **Description:** - -The action of release event. - -Reimplemented from [OHOS::UIButton](Graphic.md#gadb9492eb82ff23f91f9263fc748f24de). - -**Parameters:** - - - - - - - - - - - -

Name

-

Description

-
[in]eventrelease event.
- -## OnReleaseEvent\(\) \[3/3\] - -``` -void OHOS::UIButton::OnReleaseEvent (const [ReleaseEvent](OHOS-ReleaseEvent.md) & event) -``` - - **Description:** - -Executes the press release event action. - -Reimplemented from [OHOS::UIView](Graphic.md#ga7bd1a74563b059b03fbf66f9add53ee3). - -Reimplemented in [OHOS::UIRepeatButton](Graphic.md#gadd5891c03d95d07d127558b5bc9a7bd7). - -**Parameters:** - - - - - - - - - - - -

Name

-

Description

-
[in]eventThe press release event.
- -## OnScrollEnd\(\) \[1/2\] - -``` -virtual void OHOS::UIScrollView::OnScrollListener::OnScrollEnd () -``` - - **Description:** - -Called when a scroll ends. - -## OnScrollEnd\(\) \[2/2\] - -``` -virtual void OHOS::ListScrollListener::OnScrollEnd (int16_t index, [UIView](OHOS-UIView.md) * view ) -``` - - **Description:** - -Called when a scroll ends. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
indexIndicates the index of the child view being selected at the preset position. This parameter should be set to NULL_SELECT_INDEX if no child view is selected or no position is preset.
viewIndicates the child view being selected at the preset position. This parameter should be set to NULL if no child view is selected or no position is preset.
- -## OnScrollListener\(\) - -``` -OHOS::UIScrollView::OnScrollListener::OnScrollListener () -``` - - **Description:** - -A constructor used to create an **[OnScrollListener](OHOS-UIScrollView-OnScrollListener.md)** instance with the default scroll state **SCROLL\_STATE\_STOP**. - -## OnScrollStart\(\) \[1/2\] - -``` -virtual void OHOS::UIScrollView::OnScrollListener::OnScrollStart () -``` - - **Description:** - -Called when a scroll starts. - -## OnScrollStart\(\) \[2/2\] - -``` -virtual void OHOS::ListScrollListener::OnScrollStart (int16_t index, [UIView](OHOS-UIView.md) * view ) -``` - - **Description:** - -Called when a scroll starts. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
indexIndicates the index of the child view being selected at the preset position. This parameter should be set to NULL_SELECT_INDEX if no child view is selected or no position is preset.
viewIndicates the child view being selected at the preset position. This parameter should be set to NULL if no child view is selected or no position is preset.
- -## OnStop\(\) - -``` -virtual void OHOS::AnimatorCallback::OnStop ([UIView](OHOS-UIView.md) & view) -``` - - **Description:** - -Called when an animator stops. This is a pure virtual function, which needs your inheritance and implementation. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
viewIndicates the UIView instance, which is added from the constructor of the Animator class.
- -## OnTimePickerStoped\(\) - -``` -virtual void OHOS::UITimePicker::SelectedListener::OnTimePickerStoped ([UITimePicker](OHOS-UITimePicker.md) & picker) -``` - - **Description:** - -Called when an item is selected after sliding stops. This function is implemented by applications. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
pickerIndicates the time picker instance.
- -## OnVirtualDeviceEvent\(\) \[1/2\] - -``` -virtual void OHOS::RootView::OnVirtualDeviceEvent (const [VirtualDeviceEvent](OHOS-VirtualDeviceEvent.md) & event) -``` - - **Description:** - -Executes an input event triggered by a virtual device. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
eventIndicates the input event to respond to.
- -## OnVirtualDeviceEvent\(\) \[2/2\] - -``` -virtual bool OHOS::RootView::OnVirtualDeviceEventListener::OnVirtualDeviceEvent ([UIView](OHOS-UIView.md) & view, [VirtualDeviceEvent](OHOS-VirtualDeviceEvent.md) event ) -``` - - **Description:** - -Responds to an input event triggered by a virtual device. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
viewIndicates the view displayed upon an input event triggered by a virtual device.
eventIndicates the input event to respond to.
- -**Returns:** - -Returns **true** if this view is normally displayed upon an input event triggered by a virtual device; returns ** false** otherwise. - -## operator delete\(\) - -``` -void OHOS::HeapBase::operator delete (void * p) -``` - - **Description:** - -Overrides the **delete** function. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
pIndicates the pointer to the memory to be released.
- -## operator new\(\) - -``` -void* OHOS::HeapBase::operator new (size_t size) -``` - - **Description:** - -Overrides the **new** function. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sizeIndicates the size of the memory to be allocated.
- -## operator\[\]\(\) \[1/2\] - -``` -[Vector2](OHOS-Vector2-T.md)& OHOS::Line::operator[] (uint8_t index) -``` - - **Description:** - -Obtains the start or end point of the line based on the value of **index**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
indexIndicates the start or end point to obtain. The value 0 indicates that the start point is to be obtained, and 1 indicates that the end point is to be obtained.
- -**Returns:** - -Returns the start or end point of the line. - -## operator\[\]\(\) \[2/2\] - -``` -const [Vector2](OHOS-Vector2-T.md) OHOS::Line::operator[] (uint8_t index) const -``` - - **Description:** - -Obtains the start or end point of the line based on the value of **index**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
indexIndicates the start or end point to obtain. The value 0 indicates that the start point is to be obtained, and 1 indicates that the end point is to be obtained.
- -**Returns:** - -Returns the start or end point of the line. - -## Orange\(\) - -``` -static [ColorType](OHOS-Color32.md) OHOS::Color::Orange () -``` - - **Description:** - -Obtains the color data of orange. - -**Returns:** - -Returns the color data. - -## Paint\(\) - -``` -OHOS::Paint::Paint () -``` - - **Description:** - -A constructor used to create a **[Paint](OHOS-Paint.md)** instance. - -## Pause\(\) \[1/2\] - -``` -void OHOS::Animator::Pause () -``` - - **Description:** - -Pauses this animator. - -**See also:** - -[Resume](Graphic.md#ga645bbd33356bd708636a94c3d95c282d) - -## Pause\(\) \[2/2\] - -``` -void OHOS::UIImageAnimatorView::Pause () -``` - - **Description:** - -Pauses this animator at the current image. - -**See also:** - -[Resume](Graphic.md#ga051f03136d8c00295162f53acbe6da97) - -## Polygon\(\) \[1/3\] - -``` -OHOS::Polygon::Polygon () -``` - - **Description:** - -The default constructor used to create a **[Polygon](OHOS-Polygon.md)** instance. - -## Polygon\(\) \[2/3\] - -``` -OHOS::Polygon::Polygon (const [Rect](OHOS-Rect.md) & rect) -``` - - **Description:** - -A constructor used to construct a **[Polygon](OHOS-Polygon.md)** instance based on a rectangle. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
rectIndicates the rectangle used to construct the polygon.
- -## Polygon\(\) \[3/3\] - -``` -OHOS::Polygon::Polygon (const [Vector2](OHOS-Vector2-T.md)< int16_t > * vertexes, const uint8_t vertexNum ) -``` - - **Description:** - -A constructor used to create a **[Polygon](OHOS-Polygon.md)** instance based on the vertex coordinates and the number of coordinates. - -The number of vertex coordinates cannot exceed the value of [MAX\_VERTEX\_NUM](Graphic.md#gafff78acb69e2b147b6f33d68e570ef54). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
vertexesIndicates the pointer to the vertex coordinates.
vertexNumIndicates the number of vertices.
- -## PopBack\(\) - -``` -void [OHOS::List](OHOS-List-T.md)< T >::PopBack () -``` - - **Description:** - -Pops up a data record at the end of a linked list. - -## PopFront\(\) - -``` -void [OHOS::List](OHOS-List-T.md)< T >::PopFront () -``` - - **Description:** - -Pops up a data record at the start of a linked list. - -## PressEvent\(\) - -``` -OHOS::PressEvent::PressEvent (const [Point](OHOS-Point.md) & pos) -``` - - **Description:** - -A constructor used to create a **[PressEvent](OHOS-PressEvent.md)** instance. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
posIndicates the position where the press event occurs.
- -## Purple\(\) - -``` -static [ColorType](OHOS-Color32.md) OHOS::Color::Purple () -``` - - **Description:** - -Obtains the color data of purple. - -**Returns:** - -Returns the color data. - -## PushBack\(\) - -``` -void [OHOS::List](OHOS-List-T.md)< T >::PushBack (T data) -``` - - **Description:** - -Inserts data at the end of a linked list. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
dataIndicates the data to insert.
- -## PushFront\(\) - -``` -void [OHOS::List](OHOS-List-T.md)< T >::PushFront (T data) -``` - - **Description:** - -Inserts data at the start of a linked list. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
dataIndicates the data to insert.
- -## QuadEaseIn\(\) - -``` -static int16_t OHOS::EasingEquation::QuadEaseIn (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime ) -``` - - **Description:** - -Eases in shaping like a quadratic curve. - -**t^2** is the equation for a quadratic easing. The animation starts slowly from zero velocity and accelerates fast towards the end. The acceleration change is similar to a quadratic curve. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
startPosIndicates the start value of this animation.
endPosIndicates the end value of this animation.
curTimeIndicates the current time of this animation.
durationTimeIndicates the total duration of this animation.
- -**Returns:** - -Returns the value for the current time. - -**See also:** - -[QuadEaseOut](Graphic.md#ga0c9cd2781e17f7077b4c9d5847eb90c8) | [QuadEaseInOut](Graphic.md#ga8f62ddc3f1b2b33904845601108d6f64) - -## QuadEaseInOut\(\) - -``` -static int16_t OHOS::EasingEquation::QuadEaseInOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime ) -``` - - **Description:** - -Eases in and then out shaping like a quadratic curve. - -**t^2** is the equation for a quadratic easing. The animation accelerates slowly until halfway and decelerates slowly towards the end. The acceleration change is similar to a quadratic curve. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
startPosIndicates the start value of this animation.
endPosIndicates the end value of this animation.
curTimeIndicates the current time of this animation.
durationTimeIndicates the total duration of this animation.
- -**Returns:** - -Returns the value for the current time. - -**See also:** - -[QuadEaseIn](Graphic.md#ga72a9b93086c8466767942863a7d5cb78) | [QuadEaseOut](Graphic.md#ga0c9cd2781e17f7077b4c9d5847eb90c8) - -## QuadEaseOut\(\) - -``` -static int16_t OHOS::EasingEquation::QuadEaseOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime ) -``` - - **Description:** - -Eases out shaping like a quadratic curve. - -**t^2** is the equation for a quadratic easing. The animation starts fast and decelerates slowly towards the end. The acceleration change is similar to a quadratic curve. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
startPosIndicates the start value of this animation.
endPosIndicates the end value of this animation.
curTimeIndicates the current time of this animation.
durationTimeIndicates the total duration of this animation.
- -**Returns:** - -Returns the value for the current time. - -**See also:** - -[QuadEaseIn](Graphic.md#ga72a9b93086c8466767942863a7d5cb78) | [QuadEaseInOut](Graphic.md#ga8f62ddc3f1b2b33904845601108d6f64) - -## QuintEaseIn\(\) - -``` -static int16_t OHOS::EasingEquation::QuintEaseIn (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime ) -``` - - **Description:** - -Eases in shaping like a quintic curve. - -**t^5** is the equation for a quintic easing. The animation starts slowly from zero velocity and accelerates fast towards the end. The acceleration change is similar to a quintic curve. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
startPosIndicates the start value of this animation.
endPosIndicates the end value of this animation.
curTimeIndicates the current time of this animation.
durationTimeIndicates the total duration of this animation.
- -**Returns:** - -Returns the value for the current time. - -**See also:** - -[QuintEaseOut](Graphic.md#gaa61e26b2bff3f69edced36d0c0d17a45) | [QuintEaseInOut](Graphic.md#ga8bea02f98d26a97072f32369370a421b) - -## QuintEaseInOut\(\) - -``` -static int16_t OHOS::EasingEquation::QuintEaseInOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime ) -``` - - **Description:** - -Eases in and then out shaping like a quintic curve. - -**t^5** is the equation for a quintic easing. The animation accelerates slowly until halfway and decelerates slowly towards the end. The acceleration change is similar to a quintic curve. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
startPosIndicates the start value of this animation.
endPosIndicates the end value of this animation.
curTimeIndicates the current time of this animation.
durationTimeIndicates the total duration of this animation.
- -**Returns:** - -Returns the value for the current time. - -**See also:** - -[QuintEaseIn](Graphic.md#ga9ddf5221cdde5f6a37096300847a50ac) | [QuintEaseOut](Graphic.md#gaa61e26b2bff3f69edced36d0c0d17a45) - -## QuintEaseOut\(\) - -``` -static int16_t OHOS::EasingEquation::QuintEaseOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime ) -``` - - **Description:** - -Eases out shaping like a quintic curve. - -**t^5** is the equation for a quintic easing. The animation starts fast and decelerates slowly towards the end. The acceleration change is similar to a quintic curve. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
startPosIndicates the start value of this animation.
endPosIndicates the end value of this animation.
curTimeIndicates the current time of this animation.
durationTimeIndicates the total duration of this animation.
- -**Returns:** - -Returns the value for the current time. - -**See also:** - -[QuintEaseIn](Graphic.md#ga9ddf5221cdde5f6a37096300847a50ac) | [QuintEaseInOut](Graphic.md#ga8bea02f98d26a97072f32369370a421b) - -## Rect\(\) \[1/4\] - -``` -OHOS::Rect::Rect () -``` - - **Description:** - -A constructor used to create a **[Rect](OHOS-Rect.md)** instance. - -## Rect\(\) \[2/4\] - -``` -OHOS::Rect::Rect (const [Rect](OHOS-Rect.md) && other) -``` - - **Description:** - -A constructor used to create a **[Rect](OHOS-Rect.md)** instance by copying another rectangle. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
otherIndicates the rectangle to copy.
- -## Rect\(\) \[3/4\] - -``` -OHOS::Rect::Rect (const [Rect](OHOS-Rect.md) & other) -``` - - **Description:** - -A constructor used to create a **[Rect](OHOS-Rect.md)** instance by copying another rectangle. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
otherIndicates the rectangle to copy.
- -## Rect\(\) \[4/4\] - -``` -OHOS::Rect::Rect (int16_t left, int16_t top, int16_t right, int16_t bottom ) -``` - - **Description:** - -A constructor used to create a **[Rect](OHOS-Rect.md)** instance based on the coordinates of the four boundaries. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
leftIndicates the coordinate of the left boundary.
topIndicates the coordinate of the top boundary.
rightIndicates the coordinate of the right boundary.
bottomIndicates the coordinate of the bottom boundary.
- -## Red\(\) - -``` -static [ColorType](OHOS-Color32.md) OHOS::Color::Red () -``` - - **Description:** - -Obtains the color data of red. - -**Returns:** - -Returns the color data. - -## RefreshChart\(\) \[1/3\] - -``` -void OHOS::UIChartPillar::RefreshChart () -``` - - **Description:** - -Refreshes a bar chart and redraws the dirty region. - -Only the parts that need to be redrawn are refreshed, for example, new data points. This function provides better performance than [Invalidate](Graphic.md#ga2a9a38b8450fbb196277238a51fbbf99). - -Implements [OHOS::UIChart](Graphic.md#gaaab35011c82308c770cf5c15641fe21c). - -## RefreshChart\(\) \[2/3\] - -``` -void OHOS::UIChartPolyline::RefreshChart () -``` - - **Description:** - -Refreshes a line chart and redraws the dirty region. - -Only the parts that need to be redrawn are refreshed, for example, new data points. This function provides better performance than [Invalidate](Graphic.md#ga2a9a38b8450fbb196277238a51fbbf99). - -Implements [OHOS::UIChart](Graphic.md#gaaab35011c82308c770cf5c15641fe21c). - -## RefreshChart\(\) \[3/3\] - -``` -virtual void OHOS::UIChart::RefreshChart () -``` - - **Description:** - -Refreshes a chart and redraws the dirty region. - -Only the parts that need to be redrawn are refreshed, for example, new data points. This function provides better performance than [Invalidate](Graphic.md#ga2a9a38b8450fbb196277238a51fbbf99). - -Implemented in [OHOS::UIChartPolyline](Graphic.md#ga53594e65076b8588bcc48d4c69fbe8fd), and [OHOS::UIChartPillar](Graphic.md#ga0c6028474577ce99caa6d3eafaef1573). - -## RefreshList\(\) - -``` -void OHOS::UIList::RefreshList () -``` - - **Description:** - -Refreshes this list. The number of child views in the current view is fixed and the positions of those reserved child views as this list scrolls remain unchanged. - -## RegisterFPSChangedListener\(\) - -``` -static void OHOS::SysInfo::RegisterFPSChangedListener ([OnFPSChangedListener](OHOS-SysInfo-OnFPSChangedListener.md) * onFPSChangedListener) -``` - - **Description:** - -Registers the listener for notifying the FPS changes. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
onFPSChangedListenerIndicates the pointer to the FPS change notification function. For details, see OnFPSChangedListener.
- -## RegisterScrollListener\(\) - -``` -void OHOS::UIScrollView::RegisterScrollListener ([OnScrollListener](OHOS-UIScrollView-OnScrollListener.md) * scrollListener) -``` - - **Description:** - -Registers a listener that contains a callback to be invoked upon scroll state changes. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
scrollListenerIndicates the listener to register. For details, see OnScrollListener.
- -## RegisterSelectedListener\(\) \[1/2\] - -``` -void OHOS::UIPicker::RegisterSelectedListener ([SelectedListener](OHOS-UIPicker-SelectedListener.md) * pickerListener) -``` - - **Description:** - -Registers a listener for a selected event. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
pickerListenerIndicates the listener for a selected event in the picker. For details, see SelectedListener.
- -## RegisterSelectedListener\(\) \[2/2\] - -``` -void OHOS::UITimePicker::RegisterSelectedListener ([SelectedListener](OHOS-UITimePicker-SelectedListener.md) * timePickerListener) -``` - - **Description:** - -Registers a listener for a selected event. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
timePickerListenerIndicates the listener to register. For details, see SelectedListener.
- -## ReleaseEvent\(\) - -``` -OHOS::ReleaseEvent::ReleaseEvent (const [Point](OHOS-Point.md) & pos) -``` - - **Description:** - -A constructor used to create a **[ReleaseEvent](OHOS-ReleaseEvent.md)** instance. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
posIndicates the position where the release event occurs.
- -## ReMeasure\(\) - -``` -virtual void OHOS::UIView::ReMeasure () -``` - - **Description:** - -Remeasures the view size. - -## Remove\(\) \[1/4\] - -``` -void OHOS::AnimatorManager::Remove (const [Animator](OHOS-Animator.md) * animator) -``` - - **Description:** - -Removes the **[Animator](OHOS-Animator.md)** instance from the **[AnimatorManager](OHOS-AnimatorManager.md)** linked list. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
animatorIndicates the pointer to the Animator instance to remove.
- -**See also:** - -[Add](Graphic.md#ga8b60ed045dc2a3370498a3e6922d5400) - -## Remove\(\) \[2/4\] - -``` -void [OHOS::List](OHOS-List-T.md)< T >::Remove ([ListNode](OHOS-ListNode-T.md)< T > * node) -``` - - **Description:** - -Deletes a data node. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
nodeIndicates the pointer to the node to delete.
- -## Remove\(\) \[3/4\] - -``` -virtual void OHOS::UIViewGroup::Remove ([UIView](OHOS-UIView.md) * view) -``` - - **Description:** - -Removes a child view. - -Reimplemented in [OHOS::UISwipeView](Graphic.md#ga2a4f70938a7d2298a318dff6dff95e85). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
viewIndicates the pointer to the child view to remove.
- -## Remove\(\) \[4/4\] - -``` -virtual void OHOS::UISwipeView::Remove ([UIView](OHOS-UIView.md) * view) -``` - - **Description:** - -Deletes a view. - -Reimplemented from [OHOS::UIViewGroup](Graphic.md#ga25523928b24d6692f18aed31edb07006). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
viewIndicates the view to delete.
- -## RemoveAll\(\) \[1/2\] - -``` -virtual void OHOS::UIViewGroup::RemoveAll () -``` - - **Description:** - -Removes all child views. - -Reimplemented in [OHOS::UIList](Graphic.md#gaa55aae2e8066fecc5941e021a7f30d7e). - -## RemoveAll\(\) \[2/2\] - -``` -void OHOS::UIList::RemoveAll () -``` - - **Description:** - -Removes all child views. - -Reimplemented from [OHOS::UIViewGroup](Graphic.md#gaf3ee08173d92932687809049e3c11e9b). - -## Reset\(\) - -``` -void OHOS::UITextureMapper::Reset () -``` - - **Description:** - -Displays the original image. - -The configured parameters are reserved and will not be reset. - -## Resize\(\) \[1/3\] - -``` -void OHOS::Rect::Resize (int16_t width, int16_t height ) -``` - - **Description:** - -Sets the width and height of a rectangle. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
widthIndicates the width of the rectangle.
heightIndicates the height of the rectangle.
- -## Resize\(\) \[2/3\] - -``` -virtual void OHOS::UIView::Resize (int16_t width, int16_t height ) -``` - - **Description:** - -Adjusts the size of the view. - -Reimplemented in [OHOS::UISurfaceView](Graphic.md#gaa860971513d96f553be4e251f25c0262). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
widthIndicates the new width.
heightIndicates the new height.
- -## Resize\(\) \[3/3\] - -``` -void OHOS::UISurfaceView::Resize (int16_t width, int16_t height ) -``` - - **Description:** - -Adjusts the size of this view. - -Reimplemented from [OHOS::UIView](Graphic.md#gae985b607d2f0701911778bf20d640ccd). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
widthIndicates the new width.
heightIndicates the new height.
- -## ResizeVisibleArea\(\) - -``` -void OHOS::UIView::ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height ) -``` - - **Description:** - -Adjusts the size of the visible area. This operation may affect the final display size. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the new x-coordinate.
yIndicates the new y-coordinate.
widthIndicates the new width.
heightIndicates the new height.
- -## Resume\(\) \[1/2\] - -``` -void OHOS::Animator::Resume () -``` - - **Description:** - -Resumes this animator from where it was paused. - -**See also:** - -[Pause](Graphic.md#ga4dd9d23ebff1359bd1145fd2f26e1be2) - -## Resume\(\) \[2/2\] - -``` -void OHOS::UIImageAnimatorView::Resume () -``` - - **Description:** - -Resumes this animator from the current image. - -**See also:** - -[Pause](Graphic.md#gab8af32245cdf31fcc0a9d0a5d681774c) - -## Rotate\(\) \[1/5\] - -``` -void OHOS::Rotate (const [Line](OHOS-Line.md) & origLine, int16_t angle, const [Vector2](OHOS-Vector2-T.md)< int16_t > & pivot, [Line](OHOS-Line.md) & out ) -``` - - **Description:** - -Rotates a line around the pivot by a certain angle. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
origLineIndicates the line segment to rotate.
angleIndicates the angle to rotate.
pivotIndicates the rotation pivot.
outIndicates the line generated after rotation.
- -## Rotate\(\) \[2/5\] - -``` -void OHOS::Rotate (const [Rect](OHOS-Rect.md) & origRect, int16_t angle, const [Vector2](OHOS-Vector2-T.md)< int16_t > & pivot, [Polygon](OHOS-Polygon.md) & out ) -``` - - **Description:** - -Rotates a rectangle around the pivot by a certain angle. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
origRectIndicates the rectangle to rotate.
angleIndicates the angle to rotate.
pivotIndicates the rotation pivot.
outIndicates the polygon generated after the rectangle is rotated.
- -## Rotate\(\) \[3/5\] - -``` -void OHOS::Rotate (const [Vector2](OHOS-Vector2-T.md)< int16_t > & point, int16_t angle, const [Vector2](OHOS-Vector2-T.md)< int16_t > & pivot, [Vector2](OHOS-Vector2-T.md)< int16_t > & out ) -``` - - **Description:** - -Rotates a point around the pivot by a certain angle. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
pointIndicates the point to rotate.
angleIndicates the angle to rotate.
pivotIndicates the rotation pivot.
outIndicates the point generated after rotation.
- -## Rotate\(\) \[4/5\] - -``` -void OHOS::TransformMap::Rotate (int16_t angle, const [Vector2](OHOS-Vector2-T.md)< int16_t > & pivot ) -``` - - **Description:** - -Rotates the rectangle. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
angleIndicates the angle to rotate.
pivotIndicates the rotation pivot.
- -## Rotate\(\) \[5/5\] - -``` -[Matrix3](OHOS-Matrix3-T.md)< T > [OHOS::Matrix3](OHOS-Matrix3-T.md)< T >::Rotate (T angle, const [Vector2](OHOS-Vector2-T.md)< T > & pivot ) -``` - - **Description:** - -Obtains a rotation matrix. After a matrix is rotated, its data is shifted leftwards by 15 bits. Therefore, the result data needs to be shifted rightwards by 15 bits. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
angleIndicates the angle to rotate.
pivotIndicates the rotation pivot.
- -**Returns:** - -Returns the matrix after rotation. - -## Scale\(\) \[1/2\] - -``` -void OHOS::TransformMap::Scale (const [Vector2](OHOS-Vector2-T.md)< float > scale, const [Vector2](OHOS-Vector2-T.md)< int16_t > & pivot ) -``` - - **Description:** - -Scales the rectangle. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
scaleIndicates the scaling factors of the x-axis and y-axis.
pivotIndicates the pivot for scaling.
- -## Scale\(\) \[2/2\] - -``` -[Matrix3](OHOS-Matrix3-T.md)< T > [OHOS::Matrix3](OHOS-Matrix3-T.md)< T >::Scale (const [Vector2](OHOS-Vector2-T.md)< T > & scale, const [Vector2](OHOS-Vector2-T.md)< T > & fixed ) -``` - - **Description:** - -Obtains the scaling matrix. After a matrix is scaled, its data is shifted leftwards by 8 bits. Therefore, the result data needs to be shifted rightwards by 8 bits. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
scaleIndicates the scaling factors of the x-axis and y-axis.
fixedIndicates the fixed scaling point.
- -**Returns:** - -Returns the matrix after scaling. - -## ScrollBy\(\) \[1/2\] - -``` -void OHOS::UIList::ScrollBy (int16_t distance) -``` - - **Description:** - -Scrolls the content in this list. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
distanceIndicates the distance by which the content is scrolled.
- -## ScrollBy\(\) \[2/2\] - -``` -void OHOS::UIScrollView::ScrollBy (int16_t xDistance, int16_t yDistance ) -``` - - **Description:** - -Scrolls the content of this view. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xDistanceIndicates the offset distance by which the content is scrolled on the x-axis.
yDistanceIndicates the offset distance by which the content is scrolled on the y-axis.
- -## ScrollTo\(\) - -``` -void OHOS::UIList::ScrollTo (uint16_t index) -``` - - **Description:** - -Scrolls to change the index of the first row or column of the current view. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
indexIndicates the new index of the first row or column of the current view.
- -## SelectedListener\(\) \[1/2\] - -``` -OHOS::UITimePicker::SelectedListener::SelectedListener () -``` - - **Description:** - -A constructor used to create a **[SelectedListener](OHOS-UITimePicker-SelectedListener.md)** instance. - -## SelectedListener\(\) \[2/2\] - -``` -OHOS::UIPicker::SelectedListener::SelectedListener () -``` - - **Description:** - -A constructor used to create a **[SelectedListener](OHOS-UIPicker-SelectedListener.md)** instance. - -## SetAdapter\(\) - -``` -void OHOS::UIList::SetAdapter ([AbstractAdapter](OHOS-AbstractAdapter.md) * adapter) -``` - - **Description:** - -Sets the adapter for this list. The content of this list is initialized when the adapter is set. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
adapterIndicates the adapter to set. For details, see AbstractAdapter.
- -## SetAlign\(\) \[1/4\] - -``` -void OHOS::UILabelButton::SetAlign ([UITextLanguageAlignment](Graphic.md#ga3f99b58f731a37cacde72d5e0c934593) align) -``` - - **Description:** - -Sets the alignment mode for this text. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
alignIndicates the text alignment mode to set, as defined in UITextLanguageAlignment.
- -## SetAlign\(\) \[2/4\] - -``` -void OHOS::UIArcLabel::SetAlign ([UITextLanguageAlignment](Graphic.md#ga3f99b58f731a37cacde72d5e0c934593) horizontalAlign) -``` - - **Description:** - -Sets the alignment mode for this text. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
horizontalAlignIndicates the horizontal alignment mode to set, which can be TEXT_ALIGNMENT_LEFT, TEXT_ALIGNMENT_CENTER, or TEXT_ALIGNMENT_RIGHT.
- -## SetAlign\(\) \[3/4\] - -``` -void OHOS::Text::SetAlign ([UITextLanguageAlignment](Graphic.md#ga3f99b58f731a37cacde72d5e0c934593) horizontalAlign, [UITextLanguageAlignment](Graphic.md#ga3f99b58f731a37cacde72d5e0c934593) verticalAlign = TEXT_ALIGNMENT_TOP ) -``` - - **Description:** - -Sets the alignment mode for this text. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
horizontalAlignIndicates the horizontal alignment mode to set, which can be TEXT_ALIGNMENT_LEFT, TEXT_ALIGNMENT_CENTER, or TEXT_ALIGNMENT_RIGHT.
verticalAlignIndicates the vertical alignment mode to set, which can be TEXT_ALIGNMENT_TOP (default mode), TEXT_ALIGNMENT_CENTER, or TEXT_ALIGNMENT_BOTTOM.
- -## SetAlign\(\) \[4/4\] - -``` -void OHOS::UILabel::SetAlign ([UITextLanguageAlignment](Graphic.md#ga3f99b58f731a37cacde72d5e0c934593) horizontalAlign, [UITextLanguageAlignment](Graphic.md#ga3f99b58f731a37cacde72d5e0c934593) verticalAlign = TEXT_ALIGNMENT_TOP ) -``` - - **Description:** - -Sets the alignment mode for this text. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
horizontalAlignIndicates the horizontal alignment mode to set, which can be TEXT_ALIGNMENT_LEFT, TEXT_ALIGNMENT_CENTER, or TEXT_ALIGNMENT_RIGHT.
verticalAlignIndicates the vertical alignment mode to set, which can be TEXT_ALIGNMENT_TOP (default mode), TEXT_ALIGNMENT_CENTER, or TEXT_ALIGNMENT_BOTTOM.
- -## SetAnimatorStopListener\(\) \[1/2\] - -``` -void OHOS::UITextureMapper::SetAnimatorStopListener ([AnimatorStopListener](OHOS-UITextureMapper-AnimatorStopListener.md) * listener) -``` - - **Description:** - -Sets the listener for the stop of this animator. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
listenerIndicates the listener to set. For details, see AnimatorStopListener.
- -## SetAnimatorStopListener\(\) \[2/2\] - -``` -void OHOS::UIImageAnimatorView::SetAnimatorStopListener ([AnimatorStopListener](OHOS-UIImageAnimatorView-AnimatorStopListener.md) * listener) -``` - - **Description:** - -Sets the listener for the stop of this animator. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
listenerIndicates the listener to set. For details, see AnimatorStopListener.
- -## SetAnimatorTime\(\) - -``` -void OHOS::UISwipeView::SetAnimatorTime (uint16_t time) -``` - - **Description:** - -Sets the time for the page being animated. The page will go beyond the blank during this time. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
timeIndicates the time of the page being animated.
- -## SetArcTextAngle\(\) - -``` -void OHOS::UIArcLabel::SetArcTextAngle (int16_t startAngle, int16_t endAngle ) -``` - - **Description:** - -Sets the start angle and end angle for this arc text. - -The angle in 12 o'clock direction is 0 degrees, and the value increases clockwise. The text direction is clockwise when the end angle is greater than the start angle, and the text direction is counterclockwise otherwise. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
startAngleIndicates the start angle to set.
endAngleIndicates the end angle to set.
- -## SetArcTextCenter\(\) - -``` -void OHOS::UIArcLabel::SetArcTextCenter (int16_t x, int16_t y ) -``` - - **Description:** - -Sets the center position for this arc text. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the x-coordinate to set.
yIndicates the y-coordinate to set.
- -## SetArcTextOrientation\(\) - -``` -void OHOS::UIArcLabel::SetArcTextOrientation ([TextOrientation](Graphic.md#ga0778527bee4a7ddd8d46395585a5cfb9) orientation) -``` - - **Description:** - -Sets the orientation for this arc text. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
orientationIndicates the text orientation to set.
- -## SetArcTextRadius\(\) - -``` -void OHOS::UIArcLabel::SetArcTextRadius (uint16_t radius) -``` - - **Description:** - -Sets the radius for this arc text. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
radiusIndicates the radius to set.
- -## SetAutoEnable\(\) - -``` -void OHOS::UIImageView::SetAutoEnable (bool enable) -``` - - **Description:** - -Sets whether the image view size needs to be adaptive to the image size. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
enableSpecifies whether the image view size needs to be adaptive to the image size. true indicates that automatic adaption is enabled, and false indicates the opposite case.
- -## SetAutoSize\(\) - -``` -void OHOS::UIViewGroup::SetAutoSize (bool state) -``` - - **Description:** - -Sets whether the size of this view group is adaptive to that of all child views. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
stateSpecifies whether the size of this view group is adaptive to that of all child views. true indicates automatic adaption is enabled, and false indicates the opposite case.
- -## SetBackgroundFont\(\) \[1/2\] - -``` -void OHOS::UIPicker::SetBackgroundFont (const char * name, uint8_t size ) -``` - - **Description:** - -Sets the font name and size for the background text. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
nameIndicates the pointer to the font name to set.
sizeIndicates the font size to set.
- -## SetBackgroundFont\(\) \[2/2\] - -``` -void OHOS::UITimePicker::SetBackgroundFont (const char * name, uint8_t size ) -``` - - **Description:** - -Sets the font name and size for the background text. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
nameIndicates the pointer to the font name to set.
sizeIndicates the font size to set.
- -## SetBackgroundImagePosition\(\) - -``` -void OHOS::UICircleProgress::SetBackgroundImagePosition (int16_t x, int16_t y ) -``` - - **Description:** - -Sets the coordinates of the background image for this progress bar relative to the view. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the x-coordinate to set. The default value is 0.
yIndicates the y-coordinate to set. The default value is 0.
- -**See also:** - -[SetProgressImagePosition](Graphic.md#ga62b71500ccc75673be297d2e114c0c1b) - -## SetBackgroundStyle\(\) \[1/2\] - -``` -void OHOS::UIAbstractProgress::SetBackgroundStyle (const [Style](OHOS-Style.md) & style) -``` - - **Description:** - -Sets the background style for this progress bar. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
styleIndicates the background style of the progress bar. For details, see Style.
- -**See also:** - -[SetForegroundStyle](Graphic.md#gaccebcfa35f98f9bc6be4bb8cc53eb11c) | [GetBackgroundStyle](Graphic.md#gac2ca1212c23c11405b12ae0a46c7eff1) - -## SetBackgroundStyle\(\) \[2/2\] - -``` -void OHOS::UIAbstractProgress::SetBackgroundStyle (uint8_t key, int64_t value ) -``` - - **Description:** - -Sets a background style for this progress bar. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the key of the style to set.
valueIndicates the value matching the key.
- -## SetBackOvershoot\(\) - -``` -static void OHOS::EasingEquation::SetBackOvershoot (double overshoot) -``` - - **Description:** - -Sets the parameter **s** in the equation **\(s+1\)\*t^3 - s\*t^2** for a back easing. - -A larger **s** indicates a larger degree of overshoot. The default value is 1.7. You are advised to set this parameter to a value ranging from 1 to 4. The setting takes effect for all the back-ease animations. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
overshootIndicates the overshoot s in the equation to set.
- -**See also:** - -[BackEaseIn](Graphic.md#ga4598524b16a33de497fa9321d887d3b1) | [BackEaseOut](Graphic.md#ga7399f01f7abc33413bf25aa17a99c2f2) | [BackEaseInOut](Graphic.md#gac7c2a9a1dfce384438a3bd9d6c0c2525) - -## SetBlankSize\(\) - -``` -void OHOS::UISwipeView::SetBlankSize (uint16_t size) -``` - - **Description:** - -Sets a blank size, as defined in [DEFAULT\_BLANK\_SIZE](Graphic.md#ga81883a607d2cb3356560fc0f8f84cf74). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sizeIndicates the blank size to set.
- -## SetBlurLevel\(\) - -``` -void OHOS::UIImageView::SetBlurLevel (BlurLevel level) -``` - - **Description:** - -Sets the blur level for this image when it is rotated or scaled. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
levelIndicates the blur level to set. For details, see BlurLevel.
- -## SetBottom\(\) - -``` -void OHOS::Rect::SetBottom (int16_t bottom) -``` - - **Description:** - -Sets the coordinate of the bottom boundary of a rectangle. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
bottomIndicates the coordinate of the bottom boundary.
- -## SetBottomPointStyle\(\) - -``` -void OHOS::UIChartDataSerial::SetBottomPointStyle (const [PointStyle](OHOS-UIChartDataSerial-PointStyle.md) & style) -``` - - **Description:** - -Sets the style of the bottom point of a polyline. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
styleIndicates the style to set. For details, see PointStyle.
- -## SetButton\(\) - -``` -void OHOS::UIDialog::SetButton ([DialogButtonType](Graphic.md#ga1bfefa0b46fd5a79a28d0c9a75114295) buttonType, const char * text, [OnClickListener](OHOS-UIView-OnClickListener.md) * listener ) -``` - - **Description:** - -Sets a button for this dialog box. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
buttonTypeIndicates the button position.
textIndicates the pointer to the button text.
listenerIndicates the pointer to the listener registered for the button.
- -## SetCapType\(\) - -``` -void OHOS::UIAbstractProgress::SetCapType ([CapType](Graphic.md#ga2db3928cdf793f4950245a6841dd43d6) cap) -``` - - **Description:** - -Sets the type of caps on the background and foreground of the progress bar. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
capIndicates the cap type. For details, see CapType.
- -## SetCenterPosition\(\) - -``` -void OHOS::UICircleProgress::SetCenterPosition (int16_t x, int16_t y ) -``` - - **Description:** - -Sets the coordinates of the center point for this circular progress bar. - -The coordinates of the center point refer to the position relative to the view. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the x-coordinate to set. The default value is 0.
yIndicates the y-coordinate to set. The default value is 0.
- -**See also:** - -[GetCenterPosition](Graphic.md#ga706ac374a1383cef01dfc59c5257e480) - -## SetColor\(\) - -``` -void OHOS::UIDigitalClock::SetColor ([ColorType](OHOS-Color32.md) color) -``` - - **Description:** - -Sets the font color for this digital clock. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
colorIndicates the front color to set.
- -## SetCols\(\) - -``` -void OHOS::GridLayout::SetCols (const uint16_t & cols) -``` - - **Description:** - -Sets the number of columns in a grid. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
colsIndicates the number of columns to set.
- -## SetCurrent\(\) - -``` -void OHOS::ThemeManager::SetCurrent ([Theme](OHOS-Theme.md) * theme) -``` - - **Description:** - -Sets the current screen theme for this application. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
themeIndicates the theme to set.
- -## SetCurrentPage\(\) - -``` -void OHOS::UISwipeView::SetCurrentPage (uint16_t index, bool needAnimator = false ) -``` - - **Description:** - -Sets the index for the current tab. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
indexIndicates the index of a view.
needAnimatorSpecifies whether a flip animation is needed. false (default value) indicates a flip animation is not needed, and true indicates the opposite case.
- -## SetData\(\) \[1/2\] - -``` -void OHOS::TextAdapter::SetData (int16_t start, int16_t end ) -``` - - **Description:** - -Sets continuously increasing data. For example, if you need to set data **0**, **1**, **2**, **3**, **4**, use this function to set **start** to 0 and **end** to 4. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
startIndicates the start value of the integer data.
endIndicates the end value of the integer data.
- -## SetData\(\) \[2/2\] - -``` -void OHOS::TextAdapter::SetData ([List](OHOS-List-T.md)< const char * > * data) -``` - - **Description:** - -Sets the [UILabel](OHOS-UILabel.md) adapter data, which is a string linked list. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
dataIndicates the string linked list data.
- -## SetDataRange\(\) \[1/3\] - -``` -bool OHOS::UIXAxis::SetDataRange (uint16_t min, uint16_t max ) -``` - - **Description:** - -Sets the value range of the X axis. - -The maximum value must be greater than the minimum value. Otherwise, the setting fails. - -Implements [OHOS::UIAxis](Graphic.md#gabb486419e729add9ff85a24371253bf8). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
minIndicates the minimum value to set.
maxIndicates the maximum value to set.
- -**Returns:** - -Returns **true** if the setting is successful; returns **false** otherwise. - -## SetDataRange\(\) \[2/3\] - -``` -bool OHOS::UIYAxis::SetDataRange (uint16_t min, uint16_t max ) -``` - - **Description:** - -Sets the value range of the y-axis. - -The maximum value must be greater than the minimum value. Otherwise, the setting fails. - -Implements [OHOS::UIAxis](Graphic.md#gabb486419e729add9ff85a24371253bf8). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
minIndicates the minimum value to set.
maxIndicates the maximum value to set.
- -**Returns:** - -Returns **true** if the setting is successful; returns **false** otherwise. - -## SetDataRange\(\) \[3/3\] - -``` -virtual bool OHOS::UIAxis::SetDataRange (uint16_t min, uint16_t max ) -``` - - **Description:** - -Sets the value range of a coordinate axis. - -The maximum value must be greater than the minimum value. Otherwise, the setting fails. - -Implemented in [OHOS::UIYAxis](Graphic.md#gae635d27e0a4eba30002e3607c42b914a), and [OHOS::UIXAxis](Graphic.md#ga2181796eef584a71a5db9186399720aa). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
minIndicates the minimum value to set.
maxIndicates the maximum value to set.
- -**Returns:** - -Returns **true** if the setting is successful; returns **false** otherwise. - -## SetDelayTime\(\) - -``` -void OHOS::UITextureMapper::SetDelayTime (uint16_t delayTime) -``` - - **Description:** - -Sets the delay time for this animator, in milliseconds. - -The delays of image scaling and rotation are the same and cannot be set separately. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
delayTimeIndicates the delay time to set.
- -## SetDirect\(\) \[1/5\] - -``` -void OHOS::Text::SetDirect ([UITextLanguageDirect](Graphic.md#ga0c108f97781843f67c101b47b6c00cf0) direct) -``` - - **Description:** - -Sets the direction for this text. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
directIndicates the text direction, as defined in UITextLanguageDirect.
- -## SetDirect\(\) \[2/5\] - -``` -void OHOS::UILabelButton::SetDirect ([UITextLanguageDirect](Graphic.md#ga0c108f97781843f67c101b47b6c00cf0) direct) -``` - - **Description:** - -Sets the direction for this text. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
directIndicates the text direction to set, as defined in UITextLanguageDirect.
- -## SetDirect\(\) \[3/5\] - -``` -void OHOS::TextAdapter::SetDirect ([UITextLanguageDirect](Graphic.md#ga0c108f97781843f67c101b47b6c00cf0) direct) -``` - - **Description:** - -Sets the direction of the [UILabel](OHOS-UILabel.md) constructed by the adapter. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
directIndicates the direction of the UILabel constructed by the adapter.
- -## SetDirect\(\) \[4/5\] - -``` -void OHOS::UILabel::SetDirect ([UITextLanguageDirect](Graphic.md#ga0c108f97781843f67c101b47b6c00cf0) direct) -``` - - **Description:** - -Sets the direction for this text. - -**Returns:** - -direct Returns the text direction, as defined in **UITextLanguageDirect**. - -## SetDirect\(\) \[5/5\] - -``` -void OHOS::UIPicker::SetDirect ([UITextLanguageDirect](Graphic.md#ga0c108f97781843f67c101b47b6c00cf0) direct) -``` - - **Description:** - -Sets the text direction. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
directIndicates the text direction to set. For details, see UITextLanguageDirect.
- -## SetDirection\(\) \[1/2\] - -``` -void OHOS::UIBoxProgress::SetDirection (const [Direction](Graphic.md#ga4a7a2c192206c8b18379f42a5fd176eb) & direction) -``` - - **Description:** - -Sets the direction for this progress bar. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
directionIndicates the direction to set. The default direction is from left to right. For details, see Direction.
- -**See also:** - -[GetDirection](Graphic.md#ga493699e8d0e934d7fb3d5502529a1c5e) - -## SetDirection\(\) \[2/2\] - -``` -void OHOS::UISwipeView::SetDirection (uint8_t direction) -``` - - **Description:** - -Sets the dragging direction. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
directionIndicates the dragging direction, either HORIZONTAL or VERTICAL.
- -## SetDisallowIntercept\(\) - -``` -void OHOS::UIViewGroup::SetDisallowIntercept (bool flag) -``` - - **Description:** - -Sets whether this view group is intercepted upon touch events. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
flagSpecifies whether this view group is intercepted upon touch events. true indicates that this view group is intercepted upon touch events, and false indicates the opposite case.
- -## SetDisplayMode\(\) - -``` -void OHOS::UIDigitalClock::SetDisplayMode ([DisplayMode](Graphic.md#gabe3b64b11e5bf5d7b54e1039e40f306b) dm) -``` - - **Description:** - -Sets the display mode for this digital clock. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
dmIndicates the display mode to set.
- -## SetDragACCLevel\(\) - -``` -void OHOS::UIAbstractScroll::SetDragACCLevel (uint16_t value) -``` - - **Description:** - -Sets the drag acceleration. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
valueIndicates the drag acceleration to set. The default value is 10. A larger drag acceleration indicates a higher inertial scroll velocity.
- -## SetDragFunc\(\) - -``` -void OHOS::UIAbstractScroll::SetDragFunc (EasingFunc func) -``` - - **Description:** - -Sets the easing function that specifies a scroll animation after a finger lifts the screen. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
funcIndicates the easing function to set. The default function is EasingEquation::CubicEaseOut. For details, see EasingEquation.
- -## SetDraggable\(\) - -``` -void OHOS::UIView::SetDraggable (bool draggable) -``` - - **Description:** - -Sets whether the view is draggable. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
draggableSpecifies whether to set the view draggable. Value true means to set the view draggable, and false means the opposite.
- -## SetDragParentInstead\(\) - -``` -void OHOS::UIView::SetDragParentInstead (bool dragParentInstead) -``` - - **Description:** - -Sets whether to transfer the drag event to the parent view for processing when the view is being dragged. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
dragParentInsteadSpecifies whether to transfer the event to the parent view for processing. Value true means to transfer the event to the parent view for processing, and false means the opposite.
- -## SetDurationTime\(\) - -``` -void OHOS::UITextureMapper::SetDurationTime (uint16_t durationTime) -``` - - **Description:** - -Sets the duration for this animator, in milliseconds. - -The durations of image scaling and rotation are the same and cannot be set separately. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
durationTimeIndicates the duration to set.
- -## SetEasingFunc\(\) - -``` -void OHOS::UITextureMapper::SetEasingFunc (EasingFunc easingFunc) -``` - - **Description:** - -Sets the easing function for this animator. - -The easing functions for image scaling and rotation are the same and cannot be set separately. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
easingFuncIndicates the easing function to set. The animation moves at a constant velocity by default. For details, see EasingEquation.
- -## SetEndAngle\(\) - -``` -void OHOS::UICircleProgress::SetEndAngle (int16_t endAngle) -``` - - **Description:** - -Sets the end angle. - -The 12-clock direction is 0 degrees, and the 3-clock direction is 90 degrees. If the start angle is smaller than the end angle, the progress bar is clockwise. Otherwise, the progress bar is anticlockwise. The maximum range of a progress bar is a circle. If the difference between the start angle and end angle exceeds 360 degrees, a circular progress bar is created. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
endAngleIndicates the end angle to set, which can be any value represented by int16_t. The default value is 360.
- -**See also:** - -[GetEndAngle](Graphic.md#gacab2327bfc24ee985818a95d468af181) | [SetStartAngle](Graphic.md#gae27e30bd77b83bc55ecc9f2a5643943a) - -## SetExpandHeight\(\) - -``` -void OHOS::Text::SetExpandHeight (bool expand) -``` - - **Description:** - -Sets whether to adapt the component height to this text. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
expandSpecifies whether to adapt the component height to this text. The value true indicates that the component height will adapt to this text, and false indicates not.
- -## SetExpandWidth\(\) - -``` -void OHOS::Text::SetExpandWidth (bool expand) -``` - - **Description:** - -Sets whether to adapt the component width to this text. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
expandSpecifies whether to adapt the component width to this text. The value true indicates that the component width will adapt to this text, and false indicates not.
- -## SetFillColor\(\) \[1/2\] - -``` -void OHOS::Paint::SetFillColor ([ColorType](OHOS-Color32.md) color) -``` - - **Description:** - -Sets fill color. - -This function is valid only for closed graphs. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
colorIndicates the fill color to set.
- -**See also:** - -[GetFillColor](Graphic.md#gadc1b88c39670f103e0c84a089e2178cf) - -## SetFillColor\(\) \[2/2\] - -``` -void OHOS::UIChartDataSerial::SetFillColor (const [ColorType](OHOS-Color32.md) & color) -``` - - **Description:** - -Sets the fill color of the data set. - -For a line chart, **color** refers to the fill color between the line and the x-axis. For a bar chart, **color** refers to the color of the bars. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
colorIndicates the fill color to set.
- -**See also:** - -[GetFillColor](Graphic.md#ga3b20df3a339aa0f41d404eb3dc1d12ca) - -## SetFlexWrap\(\) - -``` -void OHOS::FlexLayout::SetFlexWrap (uint8_t wrap) -``` - - **Description:** - -Sets whether to support word wrap. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
wrapIndicates the word wrap attribute.
- -## SetFont\(\) \[1/6\] - -``` -void OHOS::UIDigitalClock::SetFont (const char * name, uint8_t size ) -``` - - **Description:** - -Sets the dynamic font for this digital clock. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
nameIndicates the pointer to the font name.
sizeIndicates the font size to set.
- -## SetFont\(\) \[2/6\] - -``` -void OHOS::Text::SetFont (const char * name, uint8_t size ) -``` - - **Description:** - -Sets the font name and size. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
nameIndicates the pointer to the font name.
sizeIndicates the font size to set.
- -## SetFont\(\) \[3/6\] - -``` -void OHOS::TextAdapter::SetFont (const char * name, uint8_t size ) -``` - - **Description:** - -Sets the font. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
nameIndicates the pointer to the font name.
sizeIndicates the font size to set.
- -## SetFont\(\) \[4/6\] - -``` -void OHOS::UIArcLabel::SetFont (const char * name, uint8_t size ) -``` - - **Description:** - -Sets the font for this arc label. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
nameIndicates the pointer to the font name.
sizeIndicates the font size to set.
- -## SetFont\(\) \[5/6\] - -``` -void OHOS::UILabelButton::SetFont (const char * name, uint8_t size ) -``` - - **Description:** - -Sets the font for this text. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
nameIndicates the pointer to the font name.
sizeIndicates the font size to set.
- -## SetFont\(\) \[6/6\] - -``` -void OHOS::UILabel::SetFont (const char * name, uint8_t size ) -``` - - **Description:** - -Sets the font for this label. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
nameIndicates the pointer to the font name.
sizeIndicates the font size to set.
- -## SetFontId\(\) \[1/7\] - -``` -void OHOS::UIPicker::SetFontId (uint8_t backgroundFontId, uint8_t highlightFontId ) -``` - - **Description:** - -Sets the font IDs of dynamic text, which is the string array set through [SetValues](Graphic.md#ga419bb15f72b02f009a76a84e1242b37a). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
backgroundFontIdIndicates the font ID of the background text.
highlightFontIdIndicates the font ID of the highlighted text.
- -## SetFontId\(\) \[2/7\] - -``` -void OHOS::UIDigitalClock::SetFontId (uint8_t fontId) -``` - - **Description:** - -Sets the dynamic font ID for this digital clock. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
fontIdIndicates the dynamic font ID to set.
- -## SetFontId\(\) \[3/7\] - -``` -void OHOS::TextAdapter::SetFontId (uint8_t fontId) -``` - - **Description:** - -Sets font ID. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
fontIdIndicates the font ID. For details, see UITextLanguageFontId.
- -## SetFontId\(\) \[4/7\] - -``` -void OHOS::Text::SetFontId (uint8_t fontId) -``` - - **Description:** - -Sets the font ID. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
fontIdIndicates the font ID to set.
- -## SetFontId\(\) \[5/7\] - -``` -void OHOS::UIArcLabel::SetFontId (uint8_t fontId) -``` - - **Description:** - -Sets the font ID for this arc label. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
fontIdIndicates the font ID composed of font name and size.
- -## SetFontId\(\) \[6/7\] - -``` -void OHOS::UILabelButton::SetFontId (uint8_t fontId) -``` - - **Description:** - -Sets the font ID. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
fontIdIndicates the font ID composed of the font name and size.
- -## SetFontId\(\) \[7/7\] - -``` -void OHOS::UILabel::SetFontId (uint8_t fontId) -``` - - **Description:** - -Sets the font ID for this label. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
fontIdIndicates the font ID composed of font name and size.
- -## SetForegroundStyle\(\) \[1/2\] - -``` -void OHOS::UIAbstractProgress::SetForegroundStyle (const [Style](OHOS-Style.md) & style) -``` - - **Description:** - -Sets the foreground style for this progress bar. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
styleIndicates the foreground style of this progress bar. For details, see Style.
- -**See also:** - -[SetBackgroundStyle](Graphic.md#ga6817b5178e93e5f16f2b420cf5a171c1) | [GetForegroundStyle](Graphic.md#gac77f945f375f333f80bd70254b5c1f96) - -## SetForegroundStyle\(\) \[2/2\] - -``` -void OHOS::UIAbstractProgress::SetForegroundStyle (uint8_t key, int64_t value ) -``` - - **Description:** - -Sets a foreground style for this progress bar. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the key of the style to set.
valueIndicates the value matching the key.
- -## SetFPSCalculateType\(\) - -``` -void OHOS::SysInfo::OnFPSChangedListener::SetFPSCalculateType ([FPSCalculateType](Graphic.md#ga75d850e3abff6c2f617b689a0cb9a3d1) type) -``` - - **Description:** - -Sets the FPS sampling type. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
typeIndicates the FPS sampling type. For details, see FPSCalculateType.
- -## SetGradientBottom\(\) - -``` -void OHOS::UIChartPolyline::SetGradientBottom (uint16_t bottom) -``` - - **Description:** - -Sets the distance between the bottom edge of the fill color range and the x-axis. - -This function fills in the area between the polyline and bottom of the line chart. For a chart that is not reversed, if the bottom is above the polyline, there is no filling. For a reversed chart, if the bottom is below the polyline, there is no filling. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
bottomIndicates the bottom of the filling range. The value is the distance to the x-axis.
- -## SetGradientOpacity\(\) - -``` -void OHOS::UIChartPolyline::SetGradientOpacity (uint8_t minOpa, uint8_t maxOpa ) -``` - - **Description:** - -Sets the opacity range of the fill color gradient. - -This function sets the opacity range between the top point and bottom point of the line chart. The opacity of each horizontal line is calculated based on the ratio. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
minOpaIndicates the opacity closest to the x-axis.
maxOpaIndicates the opacity farthest away from the x-axis.
- -## SetHandImage\(\) - -``` -void OHOS::UIAnalogClock::SetHandImage ([HandType](Graphic.md#ga13cf64ea5bd39550976aaf65b1381edf) type, const [UIImageView](OHOS-UIImageView.md) & img, [Point](OHOS-Point.md) position, [Point](OHOS-Point.md) center ) -``` - - **Description:** - -Sets the image used to draw a clock hand. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
typeIndicates the clock hand type, as enumerated in HandType.
imgIndicates the image to set.
positionIndicates the start position of this image.
centerIndicates the rotation center of this clock hand.
- -## SetHandLine\(\) - -``` -void OHOS::UIAnalogClock::SetHandLine ([HandType](Graphic.md#ga13cf64ea5bd39550976aaf65b1381edf) type, [Point](OHOS-Point.md) position, [Point](OHOS-Point.md) center, [ColorType](OHOS-Color32.md) color, uint16_t width, uint16_t height, OpacityType opacity ) -``` - - **Description:** - -Sets the line used to draw a clock hand. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
typeIndicates the clock hand type, as enumerated in HandType.
positionIndicates the position of the line endpoint close to the rotation center.
centerIndicates the rotation center of this clock hand.
colorIndicates the color of this line.
widthIndicates the width of this line when it is 12 o'clock.
heightIndicates the height of this line when it is 12 o'clock.
opacityIndicates the opacity of this line.
- -## SetHeadPointStyle\(\) - -``` -void OHOS::UIChartDataSerial::SetHeadPointStyle (const [PointStyle](OHOS-UIChartDataSerial-PointStyle.md) & style) -``` - - **Description:** - -Sets the style of the frontmost point on a polyline. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
styleIndicates the style to set. For details, see PointStyle.
- -## SetHeight\(\) \[1/10\] - -``` -void OHOS::TextAdapter::SetHeight (int16_t height) -``` - - **Description:** - -Sets the height of the [UILabel](OHOS-UILabel.md) constructed by the adapter. - -**Returns:** - -Returns the height of the [UILabel](OHOS-UILabel.md) constructed by the adapter. - -## SetHeight\(\) \[2/10\] - -``` -void OHOS::Rect::SetHeight (int16_t height) -``` - - **Description:** - -Changes the height of the rectangle without changing the coordinate of the top boundary. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
heightIndicates the height of the rectangle.
- -## SetHeight\(\) \[3/10\] - -``` -virtual void OHOS::UIView::SetHeight (int16_t height) -``` - - **Description:** - -Sets the height for the view. - -Reimplemented in [OHOS::UIChart](Graphic.md#ga54b3c4122ebaeefe74587ca69aa98600), [OHOS::UILabel](Graphic.md#ga9998ddd0dfc0863d31f931a76f1da033), [OHOS::UIButton](Graphic.md#ga8b6dbfcd0328753c2c3cef4d14b0ff30), [OHOS::UIPicker](Graphic.md#ga167979fe09694b0f0c09e9c676189bea), [OHOS::UITimePicker](Graphic.md#ga06667e791f24098f22ef096ee6af77ad), [OHOS::UISurfaceView](Graphic.md#gaf90ada30a3336b947951d408b685787e), and [OHOS::UIBoxProgress](Graphic.md#ga54299cb7561cee9a03d0fc9d0ddda784). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
heightIndicates the height to set.
- -## SetHeight\(\) \[4/10\] - -``` -void OHOS::UIBoxProgress::SetHeight (int16_t height) -``` - - **Description:** - -Sets the height for this view. - -The height of the view must be greater than or equal to the actual height of the progress bar to ensure a normal display. You need to call this function before calling [SetValidHeight](Graphic.md#ga6958b8273ad7a5563dfa19267cc3a13c) to set the actual height of the progress bar. Otherwise, the height of the progress bar is reset to **height** of the view. - -Reimplemented from [OHOS::UIView](Graphic.md#ga9c7110620d5dc3a7bd3efe1fc2edd125). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
heightIndicates the height to set.
- -**See also:** - -[SetWidth](Graphic.md#ga4b3eeb9de2443182480a71cadb23178c) | [SetValidWidth](Graphic.md#gada3cf1819e826ee0aed4a40ef00b91a6) | [SetValidHeight](Graphic.md#ga6958b8273ad7a5563dfa19267cc3a13c) - -## SetHeight\(\) \[5/10\] - -``` -void OHOS::UISurfaceView::SetHeight (int16_t height) -``` - - **Description:** - -Sets the height for this view. - -Reimplemented from [OHOS::UIView](Graphic.md#ga9c7110620d5dc3a7bd3efe1fc2edd125). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
heightIndicates the height to set.
- -## SetHeight\(\) \[6/10\] - -``` -void OHOS::UITimePicker::SetHeight (int16_t height) -``` - - **Description:** - -Sets the height for the time picker. - -Reimplemented from [OHOS::UIView](Graphic.md#ga9c7110620d5dc3a7bd3efe1fc2edd125). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
heightIndicates the height to set.
- -## SetHeight\(\) \[7/10\] - -``` -void OHOS::UIPicker::SetHeight (int16_t height) -``` - - **Description:** - -Sets the height for this component. - -Reimplemented from [OHOS::UIView](Graphic.md#ga9c7110620d5dc3a7bd3efe1fc2edd125). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
heightIndicates the height to set.
- -## SetHeight\(\) \[8/10\] - -``` -void OHOS::UIButton::SetHeight (int16_t height) -``` - - **Description:** - -Sets the height for this image. - -Reimplemented from [OHOS::UIView](Graphic.md#ga9c7110620d5dc3a7bd3efe1fc2edd125). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
heightIndicates the height to set.
- -## SetHeight\(\) \[9/10\] - -``` -void OHOS::UILabel::SetHeight (int16_t height) -``` - - **Description:** - -Sets the height for this label. - -Reimplemented from [OHOS::UIView](Graphic.md#ga9c7110620d5dc3a7bd3efe1fc2edd125). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
heightIndicates the height to set.
- -## SetHeight\(\) \[10/10\] - -``` -void OHOS::UIChart::SetHeight (int16_t height) -``` - - **Description:** - -Sets the height for this component. - -Reimplemented from [OHOS::UIView](Graphic.md#ga9c7110620d5dc3a7bd3efe1fc2edd125). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
heightIndicates the height to set.
- -## SetHighlightFont\(\) \[1/2\] - -``` -void OHOS::UIPicker::SetHighlightFont (const char * name, uint8_t size ) -``` - - **Description:** - -Sets the font name and size for the highlighted text. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
nameIndicates the pointer to the font name to set.
sizeIndicates the font size to set.
- -## SetHighlightFont\(\) \[2/2\] - -``` -void OHOS::UITimePicker::SetHighlightFont (const char * name, uint8_t size ) -``` - - **Description:** - -Sets the font name and size for the highlighted text. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
nameIndicates the pointer to the font name to set.
sizeIndicates the font size to set.
- -## SetHorizontalScrollState\(\) - -``` -void OHOS::UIScrollView::SetHorizontalScrollState (bool state) -``` - - **Description:** - -Sets whether a horizontal scroll is enabled. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
stateSpecifies whether a horizontal scroll is enabled. true indicates a horizontal scroll is enabled, and false indicates the opposite case.
- -## SetImage\(\) \[1/4\] - -``` -void OHOS::UISlider::SetImage (const char * backgroundImage, const char * foregroundImage, const char * knobImage ) -``` - - **Description:** - -Sets the images for this slider, including the background, foreground, and knob images. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
backgroundImageIndicates the background image to set.
foregroundImageIndicates the foreground image to set.
knobImageIndicates the knob image to set.
- -## SetImage\(\) \[2/4\] - -``` -void OHOS::UIAbstractProgress::SetImage (const char * foregroundImage, const char * backgroundImage = nullptr ) -``` - - **Description:** - -Sets the image for this progress bar. - -The size of the image must be the same as that of the progress bar to ensure a normal display. If the value of any input parameter is **nullptr**, image filling is canceled. Instead, color filling will be adopted. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
foregroundImageIndicates the foreground image of the progress bar. The default value is nullptr.
backgroundImageIndicates the background image of the progress bar. The default value is nullptr.
- -## SetImage\(\) \[3/4\] - -``` -void OHOS::UISlider::SetImage (const [ImageInfo](OHOS-ImageInfo.md) * backgroundImage, const [ImageInfo](OHOS-ImageInfo.md) * foregroundImage, const [ImageInfo](OHOS-ImageInfo.md) * knobImage ) -``` - - **Description:** - -Sets the images as pixel maps for this slider, including the background, foreground, and knob images. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
backgroundImageIndicates the background image to set.
foregroundImageIndicates the foreground image to set.
knobImageIndicates the knob image to set.
- -## SetImage\(\) \[4/4\] - -``` -void OHOS::UIAbstractProgress::SetImage (const [ImageInfo](OHOS-ImageInfo.md) * foregroundImage, const [ImageInfo](OHOS-ImageInfo.md) * backgroundImage = nullptr ) -``` - - **Description:** - -Sets the image as a pixel map for this progress bar. - -The size of the image must be the same as that of the progress bar to ensure a normal display. If the value of any input parameter is **nullptr**, image filling is canceled. Instead, color filling will be adopted. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
foregroundImageIndicates the foreground image of the progress bar. The default value is nullptr.
backgroundImageIndicates the background image of the progress bar. The default value is nullptr.
- -## SetImageAnimatorSrc\(\) \[1/2\] - -``` -void OHOS::UIImageAnimatorView::SetImageAnimatorSrc (const char * imageSrc, uint8_t imageNum ) -``` - - **Description:** - -Sets the images for this animator. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
imageSrcIndicates the pointer to the ImageAnimatorInfo array for storing the configured image information. The memory cannot be released before this animator stops.
imageNumIndicates the number of images.
- -**See also:** - -[GetImageAnimatorSrc](Graphic.md#gadc1064a27f9b95a2797c33793b2110ee) | [GetImageAnimatorImageNum](Graphic.md#ga1da191cab1e6b4ffb3a87b50fbe4f7ed) - -## SetImageAnimatorSrc\(\) \[2/2\] - -``` -void OHOS::UIImageAnimatorView::SetImageAnimatorSrc (const char * imageSrc, uint8_t imageNum, uint16_t timeOfUpdate ) -``` - - **Description:** - -Sets the images and speed for this animator. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
imageSrcIndicates the pointer to the ImageAnimatorInfo array for storing the configured image information. The memory cannot be released before this animator stops.
imageNumIndicates the number of images.
timeOfUpdateIndicates the interval for updating images, in milliseconds. The default value is 1.
- -**See also:** - -[GetTimeOfUpdate](Graphic.md#ga24411b0b4d9f619532aa879ee6ee7af1) | [GetImageAnimatorSrc](Graphic.md#gadc1064a27f9b95a2797c33793b2110ee) | [GetImageAnimatorImageNum](Graphic.md#ga1da191cab1e6b4ffb3a87b50fbe4f7ed) - -## SetImagePosition\(\) - -``` -void OHOS::UIButton::SetImagePosition (const int16_t x, const int16_t y ) -``` - - **Description:** - -Sets the position for this image. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the x-coordinate to set.
yIndicates the y-coordinate to set.
- -## SetImages\(\) \[1/2\] - -``` -virtual void OHOS::UICheckBox::SetImages (const char * selectedImageSrc, const char * unselectedImageSrc ) -``` - - **Description:** - -Sets the images for this check box. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
selectedImageSrcIndicates the image for this check box when selected.
unselectedImageSrcIndicates the image for this check box when unselected.
- -## SetImages\(\) \[2/2\] - -``` -virtual void OHOS::UICheckBox::SetImages (const [ImageInfo](OHOS-ImageInfo.md) * selectedImageSrc, const [ImageInfo](OHOS-ImageInfo.md) * unselectedImageSrc ) -``` - - **Description:** - -Sets the images for this check box. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
selectedImageSrcIndicates the image for this check box when selected.
unselectedImageSrcIndicates the image for this check box when unselected.
- -## SetImageSrc\(\) \[1/2\] - -``` -void OHOS::UIButton::SetImageSrc (const char * defaultImgSrc, const char * triggeredImgSrc ) -``` - - **Description:** - -Sets the image for this button. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
defaultImgSrcIndicates the default image.
triggeredImgSrcIndicates the image for a button when it is triggered.
- -## SetImageSrc\(\) \[2/2\] - -``` -void OHOS::UIButton::SetImageSrc (const [ImageInfo](OHOS-ImageInfo.md) * defaultImgSrc, const [ImageInfo](OHOS-ImageInfo.md) * triggeredImgSrc ) -``` - - **Description:** - -Sets the image for this button. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
defaultImgSrcIndicates the default image.
triggeredImgSrcIndicates the image for a button when it is triggered.
- -## SetInitTime12Hour\(\) - -``` -void OHOS::UIAnalogClock::SetInitTime12Hour (uint8_t hour, uint8_t minute, uint8_t second, bool am ) -``` - - **Description:** - -Sets the initial time in the 12-hour format. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
hourIndicates the hour to set.
minuteIndicates the minute to set.
secondIndicates the second to set.
amSpecifies whether it is in the morning. true indicates that it is in the morning, and false indicates that it is in the afternoon.
- -## SetInitTime24Hour\(\) - -``` -void OHOS::UIAnalogClock::SetInitTime24Hour (uint8_t hour, uint8_t minute, uint8_t second ) -``` - - **Description:** - -Sets the initial time in the 24-hour format. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
hourIndicates the hour to set.
minuteIndicates the minute to set.
secondIndicates the second to set.
- -## SetIntercept\(\) - -``` -void OHOS::UIView::SetIntercept (bool isIntercept) -``` - - **Description:** - -Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
isInterceptSpecifies whether to intercept the drag event. Value true means to intercept the drag event, and false means the opposite.
- -## SetInterval\(\) - -``` -virtual void OHOS::UIRepeatButton::SetInterval (uint16_t interval) -``` - - **Description:** - -Sets the interval between two consecutive click events. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
intervalIndicates the interval to set.
- -## SetItemHeight\(\) \[1/2\] - -``` -void OHOS::UITimePicker::SetItemHeight (int16_t height) -``` - - **Description:** - -Sets the height of each item in the time picker. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
heightIndicates the height of each item.
- -## SetItemHeight\(\) \[2/2\] - -``` -void OHOS::UIPicker::SetItemHeight (int16_t height) -``` - - **Description:** - -Sets the height of each item in the picker. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
heightIndicates the height to set.
- -## SetKnobStyle\(\) \[1/2\] - -``` -void OHOS::UISlider::SetKnobStyle (const [Style](OHOS-Style.md) & style) -``` - - **Description:** - -Sets the knob style. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
styleIndicates the knob style to set. For details, see Style.
- -**See also:** - -[GetKnobStyle](Graphic.md#gaecf92fe00a7565d034937e89fe2cf1e6) - -## SetKnobStyle\(\) \[2/2\] - -``` -void OHOS::UISlider::SetKnobStyle (uint8_t key, int64_t value ) -``` - - **Description:** - -Sets a knob style. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the key of the style to set.
valueIndicates the value matching the key.
- -## SetKnobWidth\(\) - -``` -void OHOS::UISlider::SetKnobWidth (int16_t width) -``` - - **Description:** - -Sets the width for this knob. - -The width of this knob is the same as its height. By default, the width of this knob is the same as the height of the horizontal slider or the width of the vertical slider. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
widthIndicates the knob width to set.
- -**See also:** - -[GetKnobWidth](Graphic.md#ga9bac904abdf8b097778fea5febc1ec00) - -## SetLabelStyle\(\) \[1/2\] - -``` -void OHOS::UILabelButton::SetLabelStyle ([Style](OHOS-Style.md) & labelStyle) -``` - - **Description:** - -Sets the style for this label. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
labelStyleIndicates the label style to set.
- -## SetLabelStyle\(\) \[2/2\] - -``` -void OHOS::UILabelButton::SetLabelStyle (uint8_t key, int64_t value ) -``` - - **Description:** - -Sets a style for this label. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the key of the style to set.
valueIndicates the value matching the key.
- -## SetLablePosition\(\) - -``` -void OHOS::UILabelButton::SetLablePosition (int16_t x, int16_t y ) -``` - - **Description:** - -Sets the position for this label relative to the button holding it. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the offset distance by which this label is moved on the x-axis.
yIndicates the offset distance by which this label is moved on the y-axis.
- -## SetLastRun\(\) - -``` -void OHOS::Task::SetLastRun (uint32_t lastRun) -``` - - **Description:** - -Sets the end time for this task. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
lastRunIndicates the end time to set.
- -## SetLayoutDirection\(\) - -``` -void OHOS::Layout::SetLayoutDirection (const [DirectionType](Codec.md#ga8ef30fa9c08e08c8706653571f9f5b81) & direction) -``` - - **Description:** - -Sets the layout direction. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
directionIndicates the direction of the layout. Available values are as follows: LAYOUT_HOR: from left to right LAYOUT_HOR_R: from right to left LAYOUT_VER: from top to bottom LAYOUT_VER_R: from bottom to top
- -## SetLeft\(\) - -``` -void OHOS::Rect::SetLeft (int16_t left) -``` - - **Description:** - -Sets the coordinate of the left boundary of a rectangle. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
leftIndicates the coordinate of the left boundary.
- -## SetLineBreakMode\(\) \[1/2\] - -``` -void OHOS::UILabel::SetLineBreakMode (const uint8_t lineBreakMode) -``` - - **Description:** - -Sets the line break mode for this text. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
lineBreakModeIndicates the line break mode to set.
- -## SetLineBreakMode\(\) \[2/2\] - -``` -void OHOS::TextAdapter::SetLineBreakMode (const uint8_t lineBreakMode) -``` - - **Description:** - -Sets the **LineBreakMode** attribute of [UILabel](OHOS-UILabel.md) constructed by the adapter. For details about the values of **LineBreakMode**, see **LINE\_BREAK\_ADAPT**, **LINE\_BREAK\_WRAP**, **LINE\_BREAK\_ELLIPSIS**, and **LINE\_BREAK\_MARQUEE**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
lineBreakModeIndicates the LineBreakMode of UILabel.
- -## SetLineColor\(\) \[1/3\] - -``` -void OHOS::UICircleProgress::SetLineColor ([ColorType](OHOS-Color32.md) color) -``` - - **Description:** - -Sets the foreground color for this progress bar. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
colorIndicates the foreground color to set. For details, see ColorType.
- -## SetLineColor\(\) \[2/3\] - -``` -void OHOS::UIAxis::SetLineColor (const [ColorType](OHOS-Color32.md) & color) -``` - - **Description:** - -Sets the line color of the coordinate axis. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
colorIndicates the line color to set. For details, see ColorType.
- -## SetLineColor\(\) \[3/3\] - -``` -void OHOS::UIChartDataSerial::SetLineColor (const [ColorType](OHOS-Color32.md) & color) -``` - - **Description:** - -Sets the polyline color of the data set in the line chart. - -This function applies only to line charts. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
colorIndicates the polyline color to set.
- -**See also:** - -[GetLineColor](Graphic.md#gaa35d69c841a74505735d1acb60476f13) - -## SetLoopState\(\) \[1/3\] - -``` -void OHOS::UISwipeView::SetLoopState (bool loop) -``` - - **Description:** - -Sets whether the swipe view supports a cycle swipe. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
loopIndicates the cycle swipe flag. true indicates the cycle swipe is supported, and false indicates the opposite case.
- -## SetLoopState\(\) \[2/3\] - -``` -void OHOS::UIList::SetLoopState (bool state) -``` - - **Description:** - -Sets the loop state for this list, in which a loop scroll is possible since the top and bottom of the list are connected together. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
stateIndicates the loop state to set.
- -## SetLoopState\(\) \[3/3\] - -``` -void OHOS::UIPicker::SetLoopState (bool state) -``` - - **Description:** - -Sets whether a picker can slide cyclically. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
stateSpecifies whether the picker can slide cyclically. Value true indicates that the picker can slide cyclically, and value false indicates that the picker cannot slide cyclically. The default value is false.
- -## SetMajorAxisAlign\(\) - -``` -void OHOS::FlexLayout::SetMajorAxisAlign (const AlignType & align) -``` - - **Description:** - -Sets the alignment mode of the primary axis \(the axis where the layout direction is located\). The child views in the layout are placed in this mode in the direction of the primary axis. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
alignIndicates the alignment mode to set. The value can be ALIGN_START, ALIGN_END, ALIGN_CENTER, ALIGN_EVENLY, ALIGN_AROUND, or ALIGN_BETWEEN.
- -## SetMarkNum\(\) \[1/3\] - -``` -void OHOS::UIXAxis::SetMarkNum (uint16_t count) -``` - - **Description:** - -Sets the number of scales on the x-axis. - -For a bar chart, the number of scales must be the same as that of bars so that each bar can be properly displayed between two scales. - -Implements [OHOS::UIAxis](Graphic.md#gaebe68b636d2147f2e69bd658696dc4ee). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
countIndicates the number of scales to set. The default value is 5.
- -## SetMarkNum\(\) \[2/3\] - -``` -void OHOS::UIYAxis::SetMarkNum (uint16_t count) -``` - - **Description:** - -Sets the number of scales on the Y axis. - -Implements [OHOS::UIAxis](Graphic.md#gaebe68b636d2147f2e69bd658696dc4ee). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
countIndicates the number of scales to set. The default value is 5.
- -## SetMarkNum\(\) \[3/3\] - -``` -virtual void OHOS::UIAxis::SetMarkNum (uint16_t count) -``` - - **Description:** - -Sets the number of scales on a coordinate axis. - -For a bar chart, the number of scales must be the same as that of bars so that each bar can be properly displayed between two scales. - -Implemented in [OHOS::UIYAxis](Graphic.md#gaf67c1b25c1d1a3ba694cb47f7e9fda85), and [OHOS::UIXAxis](Graphic.md#ga46f4151f1379809749ab2ba364d55170). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
countIndicates the number of scales to set. The default value is 5.
- -## SetMaxDataCount\(\) - -``` -bool OHOS::UIChartDataSerial::SetMaxDataCount (uint16_t maxCount) -``` - - **Description:** - -Sets the maximum number of data points that can be stored in a data set. - -This function must be called before data is added, deleted, or modified. Otherwise, data operations will fail. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
maxCountIndicates the number of data points. The default value is 0.
- -**Returns:** - -Returns **true** if the operation is successful; returns **false** otherwise. - -## SetMaxScrollDistance\(\) - -``` -void OHOS::UIAbstractScroll::SetMaxScrollDistance (uint16_t distance) -``` - - **Description:** - -Sets the maximum scroll distance after a finger lifts the screen. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
distanceIndicates the maximum scroll distance to set. The default value is 0, indicating that the scroll distance is not limited.
- -## SetName\(\) - -``` -void OHOS::UIRadioButton::SetName (const char * name) -``` - - **Description:** - -Sets the name for this radio button. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
nameIndicates the name to set, which is a character string.
- -## SetNextSibling\(\) - -``` -void OHOS::UIView::SetNextSibling ([UIView](OHOS-UIView.md) * sibling) -``` - - **Description:** - -Sets the next sibling view for the view. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
siblingIndicates the pointer to the next sibling view to set.
- -## SetOnChangeListener\(\) - -``` -void OHOS::UICheckBox::SetOnChangeListener ([OnChangeListener](OHOS-UICheckBox-OnChangeListener.md) * onStateChangeListener) -``` - - **Description:** - -Sets the listener for this check box. - -The listener is triggered to invoke the callback function upon click events. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
listenerIndicates the listener to set. For details, see OnChangeListener.
- -## SetOnClickListener\(\) \[1/2\] - -``` -void OHOS::UIView::SetOnClickListener ([OnClickListener](OHOS-UIView-OnClickListener.md) * onClickListener) -``` - - **Description:** - -Sets a click event listener for the view. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
onClickListenerIndicates the pointer to the click event listener to set.
- -## SetOnClickListener\(\) \[2/2\] - -``` -void OHOS::TextAdapter::SetOnClickListener ([UIView::OnClickListener](OHOS-UIView-OnClickListener.md) * clickListener) -``` - - **Description:** - -Sets the callback function to be invoked upon a click event. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
clickListenerIndicates the pointer to the callback function.
- -## SetOnDragListener\(\) - -``` -void OHOS::UIView::SetOnDragListener ([OnDragListener](OHOS-UIView-OnDragListener.md) * onDragListener) -``` - - **Description:** - -Sets a drag event listener for the view. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
onDragListenerIndicates the pointer to the drag event listener to set.
- -## SetOnKeyActListener\(\) - -``` -void OHOS::RootView::SetOnKeyActListener ([OnKeyActListener](OHOS-RootView-OnKeyActListener.md) * onKeyActListener) -``` - - **Description:** - -Sets the listener that contains a callback to be invoked upon a physical key event. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
onKeyActListenerIndicates the pointer to the listener to set.
- -## SetOnLongPressListener\(\) - -``` -void OHOS::UIView::SetOnLongPressListener ([OnLongPressListener](OHOS-UIView-OnLongPressListener.md) * onLongPressListener) -``` - - **Description:** - -Sets a long-press event listener for the view. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
onLongPressListenerIndicates the pointer to the long-press event listener to set.
- -## SetOnSwipeListener\(\) - -``` -void OHOS::UISwipeView::SetOnSwipeListener ([OnSwipeListener](OHOS-UISwipeView-OnSwipeListener.md) * onSwipeListener) -``` - - **Description:** - -Sets the listener that contains a callback to be invoked upon a swipe event. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
onSwipeListenerIndicates the listener to set.
- -## SetOnTouchListener\(\) - -``` -void OHOS::UIView::SetOnTouchListener ([OnTouchListener](OHOS-UIView-OnTouchListener.md) * onTouchListener) -``` - - **Description:** - -Sets a touch event listener for the view. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
onTouchListenerIndicates the pointer to the touch event listener to set.
- -## SetOnVirtualDeviceEventListener\(\) - -``` -void OHOS::RootView::SetOnVirtualDeviceEventListener ([OnVirtualDeviceEventListener](OHOS-RootView-OnVirtualDeviceEventListener.md) * onVirtualDeviceEventListener) -``` - - **Description:** - -Sets a listener for monitoring the input events of a virtual device. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
onVirtualDeviceEventListenerIndicates the pointer to the listener to set.
- -## SetOpacity\(\) \[1/2\] - -``` -void OHOS::UIDigitalClock::SetOpacity (uint8_t opacity) -``` - - **Description:** - -Sets the opacity for this digital clock. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
opacityIndicates the opacity of this digital clock. The value ranges from 0 (transparency) to 255 (opacity).
- -## SetOpacity\(\) \[2/2\] - -``` -void OHOS::Paint::SetOpacity (uint8_t opacity) -``` - - **Description:** - -Sets the opacity. - -The setting takes effect for the entire graph, including the border, line color, and fill color. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
opacityIndicates the opacity. The value range is [0, 255].
- -**See also:** - -[GetOpacity](Graphic.md#ga3a47fccd734ec0e79af89bedacdd4357) - -## SetParent\(\) - -``` -void OHOS::UIView::SetParent ([UIView](OHOS-UIView.md) * parent) -``` - - **Description:** - -Sets the parent view for the view. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
parentIndicates the pointer to the parent view to set.
- -## SetPeriod\(\) - -``` -void OHOS::Task::SetPeriod (uint32_t period) -``` - - **Description:** - -Sets the running period for this task. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
periodIndicates the running period to set.
- -## SetPivot\(\) - -``` -void OHOS::UITextureMapper::SetPivot (int16_t x, int16_t y ) -``` - - **Description:** - -Sets the coordinates of the rotation and scaling pivots for this image. - -The coordinates represent the position relative to this image. For example, setting the x-coordinate and y-coordinate of the rotation or scaling center to the half of the image width and height respectively means the rotation or scaling is going to be performed around the center of this image. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the x-coordinate to set.
yIndicates the y-coordinate to set.
- -## SetPolygon\(\) - -``` -void OHOS::TransformMap::SetPolygon (const [Polygon](OHOS-Polygon.md) & polygon) -``` - - **Description:** - -Sets a polygon after rectangle transformation. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
polygonIndicates the polygon to set.
- -## SetPosition\(\) \[1/7\] - -``` -void OHOS::Rect::SetPosition (int16_t x, int16_t y ) -``` - - **Description:** - -Changes the coordinates of the left and top boundaries of the rectangle without changing the rectangle width and height. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the coordinate of the left boundary.
yIndicates the coordinate of the top boundary.
- -## SetPosition\(\) \[2/7\] - -``` -virtual void OHOS::UIView::SetPosition (int16_t x, int16_t y ) -``` - - **Description:** - -Sets the position for the view. - -Reimplemented in [OHOS::UIAnalogClock](Graphic.md#ga01d3098090d17bdd720df6e861784e13), and [OHOS::UISurfaceView](Graphic.md#ga5d9af67ba074697876ff97f8ece305b7). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the x-coordinate to set.
yIndicates the y-coordinate to set.
- -## SetPosition\(\) \[3/7\] - -``` -void OHOS::UISurfaceView::SetPosition (int16_t x, int16_t y ) -``` - - **Description:** - -Sets the position for this view. - -Reimplemented from [OHOS::UIView](Graphic.md#gab34233f6aeae330b025969137d03e67a). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the x-coordinate to set.
yIndicates the y-coordinate to set.
- -## SetPosition\(\) \[4/7\] - -``` -void OHOS::UIAnalogClock::SetPosition (int16_t x, int16_t y ) -``` - - **Description:** - -Sets the position for this analog clock. - -Reimplemented from [OHOS::UIView](Graphic.md#gab34233f6aeae330b025969137d03e67a). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the x-coordinate to set.
yIndicates the y-coordinate to set.
- -## SetPosition\(\) \[5/7\] - -``` -virtual void OHOS::UIView::SetPosition (int16_t x, int16_t y, int16_t width, int16_t height ) -``` - - **Description:** - -Adjusts the position and size of the view. - -Reimplemented in [OHOS::UIAnalogClock](Graphic.md#gaa7fad079e41c8efd137781350b60687b), and [OHOS::UISurfaceView](Graphic.md#ga4a505b3b207653c60161d90750f88a9d). - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the new x-coordinate.
yIndicates the new y-coordinate.
widthIndicates the new width.
heightIndicates the new height.
- -## SetPosition\(\) \[6/7\] - -``` -void OHOS::UISurfaceView::SetPosition (int16_t x, int16_t y, int16_t width, int16_t height ) -``` - - **Description:** - -Sets the position and size for this view. - -Reimplemented from [OHOS::UIView](Graphic.md#gaf8ce4c009f23b7175b2b34bac4a74262). - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the x-coordinate to set.
yIndicates the y-coordinate to set.
widthIndicates the width to set.
heightIndicates the height to set.
- -## SetPosition\(\) \[7/7\] - -``` -void OHOS::UIAnalogClock::SetPosition (int16_t x, int16_t y, int16_t width, int16_t height ) -``` - - **Description:** - -Sets the position and size for this analog clock. - -Reimplemented from [OHOS::UIView](Graphic.md#gaf8ce4c009f23b7175b2b34bac4a74262). - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the x-coordinate to set.
yIndicates the y-coordinate to set.
widthIndicates the width to set.
heightIndicates the height to set.
- -## SetPreLastPoint\(\) - -``` -void OHOS::DragEvent::SetPreLastPoint (const [Point](OHOS-Point.md) & preLastPos) -``` - - **Description:** - -Sets the coordinates of the stay position before the last position in the drag event. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
preLastPosIndicates the coordinates of the stay position to set.
- -## SetProgressImagePosition\(\) - -``` -void OHOS::UICircleProgress::SetProgressImagePosition (int16_t x, int16_t y ) -``` - - **Description:** - -Sets the coordinates of the foreground image for this progress bar relative to the view. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the x-coordinate to set. The default value is 0.
yIndicates the y-coordinate to set. The default value is 0.
- -**See also:** - -[SetBackgroundImagePosition](Graphic.md#ga66b95a4793bc60596a56be00849b8296) - -## SetRadius\(\) - -``` -void OHOS::UICircleProgress::SetRadius (uint16_t radius) -``` - - **Description:** - -Sets the outer radius for this circular progress bar. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
radiusIndicates the outer radius to set.
- -**See also:** - -[GetRadius](Graphic.md#gabb2869e683ccd799891a8869613ec8c7) - -## SetRange\(\) - -``` -void OHOS::UIAbstractProgress::SetRange (int16_t rangeMax, int16_t rangeMin ) -``` - - **Description:** - -Sets the range for this progress bar. - -**rangeMin** and **rangeMax** can be any value represented by **int16\_t**. **rangeMax** must be greater than or equal to **rangeMin**. Otherwise, the setting does not take effect and the original value is used. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
rangeMaxIndicates the maximum value of this progress bar. The default value is 100.
rangeMinIndicates the minimum value of this progress bar. The default value is 0.
- -**See also:** - -[GetRangeMin](Graphic.md#ga68ab733afcf4224a799ccad2092d1d23) | [GetRangeMax](Graphic.md#ga1840199f22d5d3e4ef58e41ac8f4febc) - -## SetReboundSize\(\) - -``` -void OHOS::UIAbstractScroll::SetReboundSize (uint16_t size) -``` - - **Description:** - -Sets the rebound size, which is the distance a knob moves after being released when it reaches the end of a scrollbar. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sizeIndicates the rebound size to set.
- -## SetRect\(\) - -``` -void OHOS::Rect::SetRect (int16_t left, int16_t top, int16_t right, int16_t bottom ) -``` - - **Description:** - -Sets the coordinates of the four boundaries of a rectangle. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
leftIndicates the coordinate of the left boundary.
topIndicates the coordinate of the top boundary.
rightIndicates the coordinate of the right boundary.
bottomIndicates the coordinate of the bottom boundary.
- -## SetRepeat\(\) - -``` -void OHOS::UIImageAnimatorView::SetRepeat (bool repeat) -``` - - **Description:** - -Sets whether to play this animator for infinite times. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
repeatSpecifies whether the animator is played for infinite times. true (default value) indicates the animator is played for infinite times, and false indicates the animator is played a specified number of times.
- -**See also:** - -[IsRepeat](Graphic.md#ga5e3700fe3d572ed6329237480bd4b5d2) - -## SetRepeatTimes\(\) - -``` -void OHOS::UIImageAnimatorView::SetRepeatTimes (uint32_t times) -``` - - **Description:** - -Sets the playback times for this animator. - -This function takes effect only when **repeat** is set to **false** in [SetRepeat](Graphic.md#ga0368d596c01e1a6093d7476fce548a38). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
timesIndicates the playback times to set. The default value is 1.
- -**See also:** - -[GetRepeatTimes](Graphic.md#gae900ab627983fb255dc0d1672c1f3a03) - -## SetReverse\(\) - -``` -void OHOS::UIImageAnimatorView::SetReverse (bool reverse) -``` - - **Description:** - -Sets the playback sequence for this animator. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
reverseIndicates the playback sequence to set. true indicates a reverse playback and false (default value) indicates a forward playback.
- -**See also:** - -[IsReverse](Graphic.md#ga35b508048046b7adf938de5cc4004724) - -## SetRight\(\) - -``` -void OHOS::Rect::SetRight (int16_t right) -``` - - **Description:** - -Sets the coordinate of the right boundary of a rectangle. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
rightIndicates the coordinate of the right boundary.
- -## SetRollSpeed\(\) - -``` -void OHOS::UILabel::SetRollSpeed (uint16_t speed) -``` - - **Description:** - -Sets the scroll speed for this text. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
speedIndicates the scroll speed to set.
- -## SetRollStartPos\(\) - -``` -void OHOS::UILabel::SetRollStartPos (int16_t pos) -``` - - **Description:** - -Sets the position where this text starts to roll. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
posIndicates the position to set.
- -## SetRotateEnd\(\) - -``` -void OHOS::UITextureMapper::SetRotateEnd (int16_t end) -``` - - **Description:** - -Sets the end angle of rotation for this image. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
endIndicates the end angle of rotation to set. The default value is 0.
- -## SetRotateStart\(\) - -``` -void OHOS::UITextureMapper::SetRotateStart (int16_t start) -``` - - **Description:** - -Sets the start angle of rotation for this image. - -By default, the image starts to rotate from the current angle of this stopped animator. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
startIndicates the start angle to set. The default value is 0.
- -## SetRows\(\) - -``` -void OHOS::GridLayout::SetRows (const uint16_t & rows) -``` - - **Description:** - -Sets the number of rows in a grid. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
rowsIndicates the number of rows to set.
- -## SetRunTime\(\) - -``` -void OHOS::Animator::SetRunTime (uint32_t runTime) -``` - - **Description:** - -Sets the running time for this animator. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
runTimeIndicates the running time to set, in milliseconds.
- -**See also:** - -[GetRunTime](Graphic.md#ga18a8b8b9ceb344e6660a5c0de5a9ce1f) - -## SetScaleEnd\(\) - -``` -void OHOS::UITextureMapper::SetScaleEnd (float end) -``` - - **Description:** - -Sets the end ratio for scaling this image. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
endIndicates the end ratio to set. The default value is 1.
- -## SetScaleStart\(\) - -``` -void OHOS::UITextureMapper::SetScaleStart (float start) -``` - - **Description:** - -Sets the start ratio for scaling this image. - -By default, the image starts to scale from the current ratio of this stopped animator. The X and Y directions are scaled at the same ratio. Single-direction scaling is not supported. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
startIndicates the start ratio to set. The default value is 1.
- -## SetScrollbarWidth\(\) - -``` -void OHOS::UIScrollView::SetScrollbarWidth (uint8_t width) -``` - - **Description:** - -Sets the width for this scroll bar. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
widthIndicates the width to set. The default value is DEFAULT_BAR_WIDTH.
- -## SetScrollBlankSize\(\) - -``` -void OHOS::UIAbstractScroll::SetScrollBlankSize (uint16_t size) -``` - - **Description:** - -Sets the blank size for this scroll view. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
valueIndicates the blank size to set. The default value is 0. Taking a vertical scroll as an example, the value 0 indicates that the head node can only scroll downwards the top of the view and the tail node scroll upwards the bottom; the value 10 indicates that the head node can continue scrolling down by 10 pixels after it reaches the top of the view.
- -## SetScrollStateListener\(\) - -``` -void OHOS::UIList::SetScrollStateListener ([ListScrollListener](OHOS-ListScrollListener.md) * scrollListener) -``` - - **Description:** - -Sets the listener that contains a callback to be invoked when a child view is selected as this list scrolls. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
scrollListenerIndicates the listener to set.
- -## SetSecondaryAxisAlign\(\) - -``` -void OHOS::FlexLayout::SetSecondaryAxisAlign (const AlignType & align) -``` - - **Description:** - -Sets the alignment mode of the secondary axis \(the axis perpendicular to the set layout direction\). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
alignIndicates the alignment mode to set. The value can be ALIGN_START, ALIGN_CENTER, or ALIGN_END.
- -## SetSelected\(\) \[1/2\] - -``` -bool OHOS::UITimePicker::SetSelected (const char * value) -``` - - **Description:** - -Sets the time currently selected in the time picker. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
valueIndicates the pointer to the selected time, which is in the format of "hour:minute:second", for example, 10:12:50. The second is optional and depends on the setting of EnableSecond. The time must be a valid value. For example, the hour value must range from 0 to 23.
- -**Returns:** - -Returns **true** if the setting is successful; returns **false** otherwise. - -## SetSelected\(\) \[2/2\] - -``` -bool OHOS::UIPicker::SetSelected (uint16_t index) -``` - - **Description:** - -Sets the index of the item currently selected in the picker. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
indexIndicates the index to set.
- -**Returns:** - -Returns **true** if the setting is successful; returns **false** otherwise. - -## SetSelectPosition\(\) - -``` -void OHOS::UIList::SetSelectPosition (uint16_t position) -``` - - **Description:** - -Sets the position where a child view is selected as this list scrolls. - -When a child view is selected at the specified position, the callback [ListScrollListener](OHOS-ListScrollListener.md) is invoked. You can implement the zoom-in and color-change effects in the callback. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
positionIndicates the position to set. The default value is 0, indicating that no position is set.
- -## SetSizeFixed\(\) - -``` -void OHOS::UIImageAnimatorView::SetSizeFixed (bool fixed) -``` - - **Description:** - -Sets whether the image size is fixed to the view size. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
fixedSpecifies whether the image size is fixed to the view size. The value true indicates the size of the image is the same as that of the view, and false indicates the position and size of this image need to be set in the ImageAnimatorInfo structure.
- -**See also:** - -[IsSizeFixed](Graphic.md#gabf4bad201ee9ef8aa484677b1daa3ba4) - -## SetSliderColor\(\) - -``` -void OHOS::UISlider::SetSliderColor (const [ColorType](OHOS-Color32.md) backgroundColor, const [ColorType](OHOS-Color32.md) foregroundColor, const [ColorType](OHOS-Color32.md) knobColor ) -``` - - **Description:** - -Sets the colors for this slider, including the background, foreground, and knob colors. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
backgroundColorIndicates the background color to set.
foregroundColorIndicates the foreground color to set.
knobColorIndicates the knob color to set.
- -## SetSliderEventListener\(\) - -``` -void OHOS::UISlider::SetSliderEventListener ([UISliderEventListener](OHOS-UISlider-UISliderEventListener.md) * listener) -``` - - **Description:** - -Sets the listener for a slider change. - -When a user drags or clicks the slider, listening is triggered and the **OnChange** callback is invoked. When a user releases the slider, the **OnRelease** callback is invoked. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
listenerIndicates the listener to set. For details, see UISliderEventListener.
- -## SetSliderRadius\(\) - -``` -void OHOS::UISlider::SetSliderRadius (int16_t backgroundRadius, int16_t foregroundRadius, int16_t knobRadius ) -``` - - **Description:** - -Sets the corner radiuses for this slider, including the background, foreground, and knob corner radiuses. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
backgroundRadiusIndicates the background corner radius to set.
foregroundRadiusIndicates the foreground corner radius to set.
knobRadiusIndicates the knob corner radius to set.
- -## SetSrc\(\) \[1/4\] - -``` -bool OHOS::Image::SetSrc (const char * src) -``` - - **Description:** - -Sets the image path. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
srcIndicates the pointer to image path in the format of ..\xxx\xxx\xxx.bin.
- -**Returns:** - -Returns **true** if the operation is successful; returns **false** if the operation fails. - -## SetSrc\(\) \[2/4\] - -``` -void OHOS::UIImageView::SetSrc (const char * src) -``` - - **Description:** - -Sets the image path. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
srcIndicates the pointer to the image path represented by a string.
- -## SetSrc\(\) \[3/4\] - -``` -bool OHOS::Image::SetSrc (const [ImageInfo](OHOS-ImageInfo.md) * src) -``` - - **Description:** - -Sets the image information. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
srcIndicates the pointer to the image information.
- -**Returns:** - -Returns **true** if the operation is successful; returns **false** if the operation fails. - -## SetSrc\(\) \[4/4\] - -``` -void OHOS::UIImageView::SetSrc (const [ImageInfo](OHOS-ImageInfo.md) * src) -``` - - **Description:** - -Sets the image information. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
srcIndicates the pointer to the image information. For details, see ImageInfo.
- -## SetStartAngle\(\) - -``` -void OHOS::UICircleProgress::SetStartAngle (int16_t startAngle) -``` - - **Description:** - -Sets the start angle. - -The 12-clock direction is 0 degrees, and the 3-clock direction is 90 degrees. If the start angle is smaller than the end angle, the progress bar is clockwise. Otherwise, the progress bar is anticlockwise. The maximum range of a progress bar is a circle. If the difference between the start angle and end angle exceeds 360 degrees, a circular progress bar is created. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
startAngleIndicates the start angle to set, which can be any value represented by int16_t. The default value is 0.
- -**See also:** - -[GetStartAngle](Graphic.md#ga37a3e63da7a8658e48a25ae9ec73abea) | [SetEndAngle](Graphic.md#ga831186bf208f8236b006b13cc122c82c) - -## SetStartIndex\(\) - -``` -void OHOS::UIList::SetStartIndex (uint16_t index) -``` - - **Description:** - -Sets the start index for this list. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
indexIndicates the start index to set. The default value is 0.
- -## SetStartPosition\(\) - -``` -void OHOS::UICanvas::SetStartPosition (const [Point](OHOS-Point.md) & startPoint) -``` - - **Description:** - -Sets the coordinates of the start point for drawing a line. For example, if **startPoint** is set to \{50, 50\}, the line is drawn from this set of coordinates on the canvas. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
startPointIndicates the coordinates of the start point.
- -**See also:** - -[GetStartPosition](Graphic.md#gad23f7db18bfa5f91e3cb814193e6932d) - -## SetState\(\) \[1/3\] - -``` -void OHOS::UIToggleButton::SetState (bool state) -``` - - **Description:** - -Sets the state for this toggle button. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
stateIndicates the state of this toggle button. The value true indicates the image displayed for On, and false indicates the image displayed for Off. If this function is not called, the image is displayed for Off.
- -## SetState\(\) \[2/3\] - -``` -void OHOS::UICheckBox::SetState ([UICheckBoxState](Graphic.md#ga15a3f0302aded0e4d1584ddc6002335d) state) -``` - - **Description:** - -Sets the state for this check box. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
stateIndicates the state of this check box. For details, see UICheckBoxState.
- -## SetState\(\) \[3/3\] - -``` -void OHOS::Animator::SetState (uint8_t state) -``` - - **Description:** - -Sets the current state for this animator. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
stateIndicates the current animator state to set, which can be STOP, START, or PAUSE.
- -**See also:** - -[GetState](Graphic.md#gafd0166df63bed582022ed93175dd3179) - -## SetStateForStyle\(\) - -``` -void OHOS::UIButton::SetStateForStyle ([ButtonState](Graphic.md#ga188dd55c17ee44be27fa80543f13f729) state) -``` - - **Description:** - -Sets the state for a button. After the setting, calling [SetStyle](Graphic.md#gaa5fdd9b28b8c919dbde0e34d8ae38caf) will change the style of this button, but not its state. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
stateIndicates the button state, as enumerated in ButtonState.
- -## SetStep\(\) - -``` -void OHOS::UIAbstractProgress::SetStep (uint16_t step) -``` - - **Description:** - -Sets the step for this progress bar. - -The step is used to control the update frequency of the progress bar. When the value change exceeds the step, the progress bar is redrawn. For example, when the step is set to 10 and the current progress value is 5, the progress bar will not be redrawn if the progress value becomes 14, but will be redrawn if the progress value becomes 15. In addition, when its current value changes to be the maximum or minimum value, the progress bar is redrawn regardless of the step you set. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
stepIndicates the step to set. The default value is 1.
- -**See also:** - -[GetStep](Graphic.md#ga9c1678604605a54c2e338d283c46866d) - -## SetStrokeColor\(\) - -``` -void OHOS::Paint::SetStrokeColor ([ColorType](OHOS-Color32.md) color) -``` - - **Description:** - -Sets the color of a line or border. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
colorIndicates the line color when a line is drawn or the border color when a closed graph is drawn.
- -**See also:** - -[GetStrokeColor](Graphic.md#gaf9dba05cf9c9f91853a523d961e76fb1) - -## SetStrokeWidth\(\) - -``` -void OHOS::Paint::SetStrokeWidth (uint16_t width) -``` - - **Description:** - -Sets the width of a line or border. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
widthIndicates the line width when a line is drawn or the border width when a closed graph is drawn. The width is extended to both sides.
- -**See also:** - -[GetStrokeWidth](Graphic.md#gaf8420a460f4a21c9208674e07893c3f0) - -## SetStyle\(\) \[1/5\] - -``` -void OHOS::Paint::SetStyle ([PaintStyle](Graphic.md#ga548320a469b7862fa416af062cad5d7a) style) -``` - - **Description:** - -Sets the paint style of a closed graph. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
styleIndicates the paint style. Stroke and fill are set by default. For details, see PaintStyle.
- -**See also:** - -[GetStyle](Graphic.md#ga18429dcf1a0dfbe0bf3e5718efa65128) - -## SetStyle\(\) \[2/5\] - -``` -void OHOS::UIView::SetStyle ([Style](OHOS-Style.md) & style) -``` - - **Description:** - -Sets the view style. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
styleIndicates the view style.
- -## SetStyle\(\) \[3/5\] - -``` -void OHOS::Style::SetStyle (uint8_t key, int64_t value ) -``` - - **Description:** - -Sets a style. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the key of the style to set.
valueIndicates the value matching the key.
- -## SetStyle\(\) \[4/5\] - -``` -virtual void OHOS::UIView::SetStyle (uint8_t key, int64_t value ) -``` - - **Description:** - -Sets a style. - -Reimplemented in [OHOS::UIButton](Graphic.md#gaa5fdd9b28b8c919dbde0e34d8ae38caf). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the key of the style to set.
valueIndicates the value matching the key.
- -## SetStyle\(\) \[5/5\] - -``` -void OHOS::UIButton::SetStyle (uint8_t key, int64_t value ) -``` - - **Description:** - -Sets a style. - -Reimplemented from [OHOS::UIView](Graphic.md#ga0945c2f05815dc2e466ef9ceaca2f700). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the key of the style to set.
valueIndicates the value matching the key.
- -## SetStyleForState\(\) - -``` -void OHOS::UIButton::SetStyleForState (uint8_t key, int64_t value, [ButtonState](Graphic.md#ga188dd55c17ee44be27fa80543f13f729) state ) -``` - - **Description:** - -Sets the style for a button in a specific state. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the key of the style to set.
valueIndicates the value matching the key.
stateIndicates the button state, as enumerated in ButtonState.
- -## SetSwipeACCLevel\(\) - -``` -void OHOS::UIAbstractScroll::SetSwipeACCLevel (uint16_t value) -``` - - **Description:** - -Sets the compensation distance after a finger lifts the screen. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
valueIndicates the compensation distance to set. The default value is 0.
- -## SetText\(\) \[1/5\] - -``` -void OHOS::UILabelButton::SetText (const char * text) -``` - - **Description:** - -Sets the text for this label button. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
textIndicates the pointer to the text.
- -## SetText\(\) \[2/5\] - -``` -void OHOS::Text::SetText (const char * text) -``` - - **Description:** - -Sets the content for this text. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
textIndicates the pointer to the text content.
- -## SetText\(\) \[3/5\] - -``` -void OHOS::UIDialog::SetText (const char * text) -``` - - **Description:** - -Sets the text for this dialog box. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
textIndicates the pointer to the text.
- -## SetText\(\) \[4/5\] - -``` -void OHOS::UIArcLabel::SetText (const char * text) -``` - - **Description:** - -Sets the text content for this arc label. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
textIndicates the pointer to the text content.
- -## SetText\(\) \[5/5\] - -``` -void OHOS::UILabel::SetText (const char * text) -``` - - **Description:** - -Sets the text content for this label. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
textIndicates the pointer to the text content.
- -## SetTextColor\(\) \[1/4\] - -``` -void OHOS::UIPicker::SetTextColor ([ColorType](OHOS-Color32.md) backgroundColor, [ColorType](OHOS-Color32.md) highlightColor ) -``` - - **Description:** - -Sets the text color. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
backgroundColorIndicates the color of the background text.
highlightColorIndicates the color of the highlighted text.
- -## SetTextColor\(\) \[2/4\] - -``` -void OHOS::UITimePicker::SetTextColor ([ColorType](OHOS-Color32.md) backgroundColor, [ColorType](OHOS-Color32.md) highlightColor ) -``` - - **Description:** - -Sets the text color in the time picker. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
backgroundColorIndicates the color of the background text.
highlightColorIndicates the color of the highlighted text.
- -## SetTextColor\(\) \[3/4\] - -``` -void OHOS::UILabel::SetTextColor ([ColorType](OHOS-Color32.md) color) -``` - - **Description:** - -Sets the color for this text. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
colorIndicates the text color to set.
- -## SetTextColor\(\) \[4/4\] - -``` -void OHOS::UILabelButton::SetTextColor ([ColorType](OHOS-Color32.md) color) -``` - - **Description:** - -Sets the color for this text. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
colorIndicates the text color to set.
- -## SetTextFormatter\(\) \[1/2\] - -``` -void OHOS::TextAdapter::SetTextFormatter ([TextFormatter](OHOS-TextFormatter.md) * formatter) -``` - - **Description:** - -Sets the text formatter. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
formatterIndicates the pointer to the text formatter. For details, see TextFormatter.
- -## SetTextFormatter\(\) \[2/2\] - -``` -void OHOS::UIPicker::SetTextFormatter ([TextFormatter](OHOS-TextFormatter.md) * formatter) -``` - - **Description:** - -Sets the text formatter. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
formatterIndicates the pointer to the text formatter. For details, see TextFormatter.
- -## SetTextRotation\(\) \[1/2\] - -``` -void OHOS::Text::SetTextRotation (LabelRotateDegree angle) -``` - - **Description:** - -Sets the clockwise rotation angle for this text. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
angleIndicates the rotation angle to set. The value can be DEGREE_0, DEGREE_90, DEGREE_180, or DEGREE_270, as defined in LabelRotateDegree.
- -## SetTextRotation\(\) \[2/2\] - -``` -void OHOS::UILabel::SetTextRotation (LabelRotateDegree angle) -``` - - **Description:** - -Sets the clockwise rotation angle for this text. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
angleIndicates the rotation angle to set. The value can be DEGREE_0, DEGREE_90, DEGREE_180, or DEGREE_270, as defined in LabelRotateDegree.
- -## SetTextStyle\(\) - -``` -void OHOS::UITimePicker::SetTextStyle (uint8_t backgroundFontId, uint8_t highlightFontId, [ColorType](OHOS-Color32.md) backgroundColor, [ColorType](OHOS-Color32.md) highlightColor ) -``` - - **Description:** - -Sets the text format in the time picker, including the font ID and color. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
backgroundFontIdIndicates the font ID of the background text.
highlightFontIdIndicates the font ID of the highlighted text.
backgroundColorIndicates the color of the background text.
highlightColorIndicates the color of the highlighted text.
- -## SetThrowDrag\(\) - -``` -void OHOS::UIAbstractScroll::SetThrowDrag (bool throwDrag) -``` - - **Description:** - -Sets whether to continue scrolling after a finger lifts the screen. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
throwDragSpecifies whether to continue scrolling after a finger lifts the screen. true indicates the scroll continues, and false indicates the scroll stops immediately after a finger lifts.
- -## SetTime\(\) - -``` -void OHOS::Animator::SetTime (uint32_t time) -``` - - **Description:** - -Sets the total duration for this animator. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
timeIndicates the total duration to set, in milliseconds.
- -**See also:** - -[GetTime](Graphic.md#gac05ba70bafa9887dc23ea4ba69da632d) - -## SetTime12Hour\(\) - -``` -void OHOS::UIAbstractClock::SetTime12Hour (uint8_t hour, uint8_t minute, uint8_t second, bool am ) -``` - - **Description:** - -Sets the time in 12-hour format. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
hourIndicates the hour to set, within [0, 11] after the modulo operation.
minuteIndicates the minute to set, within [0, 59] after the modulo operation.
secondIndicates the second to set, within [0, 59] after the modulo operation.
amSpecifies whether it is in the morning. true indicates that it is in the morning, and false indicates that it is in the afternoon.
- -## SetTime24Hour\(\) - -``` -void OHOS::UIAbstractClock::SetTime24Hour (uint8_t hour, uint8_t minute, uint8_t second ) -``` - - **Description:** - -Sets the time in 24-hour format. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
hourIndicates the hour to set, within [0, 23] after the modulo operation.
minuteIndicates the minute to set, within [0, 59] after the modulo operation.
secondIndicates the second to set, within [0, 59] after the modulo operation.
- -## SetTimeOfPause\(\) - -``` -void OHOS::UIImageAnimatorView::SetTimeOfPause (uint16_t timeOfPause) -``` - - **Description:** - -Sets the interval between two playbacks of an infinitely repeated animator. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
timeOfPauseIndicates the interval between two playbacks of an infinitely repeated animator, in milliseconds. The default value is 0, indicating that there is no interval.
- -**See also:** - -[GetTimeOfPause](Graphic.md#ga8bd6ba744209193fd1f3e630e6cf1c5a) - -## SetTimeOfUpdate\(\) - -``` -void OHOS::UIImageAnimatorView::SetTimeOfUpdate (uint16_t timeOfUpdate) -``` - - **Description:** - -Sets the speed for this animator. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
timeOfUpdateIndicates the interval for updating images, in milliseconds. The default value is 1.
- -**See also:** - -[GetTimeOfUpdate](Graphic.md#ga24411b0b4d9f619532aa879ee6ee7af1) - -## SetTimeStamp\(\) - -``` -void OHOS::Event::SetTimeStamp (const TimeType & timeStamp) -``` - - **Description:** - -Sets the timestamp when an event occurs. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
timeStampIndicates the timestamp of the event to set.
- -## SetTitle\(\) - -``` -void OHOS::UIDialog::SetTitle (const char * title) -``` - - **Description:** - -Sets the title for this dialog box. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
titleIndicates the pointer to the title.
- -## SetTop\(\) - -``` -void OHOS::Rect::SetTop (int16_t top) -``` - - **Description:** - -Sets the coordinate of the top boundary of a rectangle. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
topIndicates the coordinate of the top boundary.
- -## SetTopPointStyle\(\) - -``` -void OHOS::UIChartDataSerial::SetTopPointStyle (const [PointStyle](OHOS-UIChartDataSerial-PointStyle.md) & style) -``` - - **Description:** - -Sets the style of the top point of a polyline. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
styleIndicates the style to set. For details, see PointStyle.
- -## SetTouchable\(\) - -``` -void OHOS::UIView::SetTouchable (bool touch) -``` - - **Description:** - -Sets whether the view is touchable. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
touchableSpecifies whether to set the view touchable. Value true means to set the view touchable, and false means the opposite.
- -## SetTransformAlgorithm\(\) - -``` -void OHOS::UIImageView::SetTransformAlgorithm (TransformAlgorithm algorithm) -``` - - **Description:** - -Sets the algorithm used for image rotation and scaling. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
algorithmIndicates the image transformation algorithm. For details, see TransformAlgorithm.
- -## SetTransformMap\(\) - -``` -void OHOS::UIView::SetTransformMap (const [TransformMap](OHOS-TransformMap.md) & transMap) -``` - - **Description:** - -Sets the affine transformation matrix. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
transMapIndicates the transformation matrix.
- -## SetValidHeight\(\) - -``` -void OHOS::UIBoxProgress::SetValidHeight (int16_t height) -``` - - **Description:** - -Sets the actual height for this progress bar. - -The progress bar is centered in the view after the setting. By default, the height of the progress bar is the same as that of the view. If the height of the progress bar is greater than that of the view, the excess part cannot be displayed. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
heightIndicates the actual height to set.
- -**See also:** - -[GetValidHeight](Graphic.md#ga1e6c92b20c4931a058c0b7775bf180c9) - -## SetValidWidth\(\) - -``` -void OHOS::UIBoxProgress::SetValidWidth (int16_t width) -``` - - **Description:** - -Sets the actual width for this progress bar. - -The progress bar is centered in the view after the setting. By default, the width of the progress bar is the same as that of the view. If the width of the progress bar is greater than that of the view, the excess part cannot be displayed. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
widthIndicates the actual width of this progress bar.
- -**See also:** - -[GetValidWidth](Graphic.md#ga6577d38d85234e08f709dd0ae131b255) - -## SetValue\(\) - -``` -void OHOS::UIAbstractProgress::SetValue (int16_t value) -``` - - **Description:** - -Sets the current value for this progress bar. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
valueIndicates the current value of this progress bar, within [rangeMin, rangeMax] specified by SetRange. If the value is less than rangeMin, rangeMin is used; if the value is greater than rangeMax, rangeMax is used.
- -**See also:** - -[SetRange](Graphic.md#ga089e3875453011499ad33ed89a44a699) | [GetValue](Graphic.md#ga6face76aa7972efeb6cbb8f525f23135) - -## SetValues\(\) \[1/2\] - -``` -bool OHOS::UIPicker::SetValues (const char * value[], uint16_t count ) -``` - - **Description:** - -Sets dynamic text data in the picker by using a string array. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
value[]Indicates the array of text data.
countIndicates the array size.
- -**Returns:** - -Returns **true** if the setting is successful; returns **false** otherwise. - -## SetValues\(\) \[2/2\] - -``` -bool OHOS::UIPicker::SetValues (int16_t start, int16_t end ) -``` - - **Description:** - -Sets the numeric data in the picker by using a given numeric range. - -All integers in the range are automatically generated based on the start value and end value and placed in the picker in sequence. The start value must be smaller or equal to the end value. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
startIndicates the start integer.
endIndicates the end integer.
- -**Returns:** - -Returns **true** if the setting is successful; returns **false** otherwise. - -## SetVertexNum\(\) - -``` -void OHOS::Polygon::SetVertexNum (uint8_t vertexNum) -``` - - **Description:** - -Sets the number of vertices of a polygon. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
vertexNumIndicates the number of vertices.
- -## SetVerticalScrollState\(\) - -``` -void OHOS::UIScrollView::SetVerticalScrollState (bool state) -``` - - **Description:** - -Sets whether a vertical scroll is enabled. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
stateSpecifies whether a vertical scroll is enabled. true indicates a vertical scroll is enabled, and false indicates the opposite case.
- -## SetViewId\(\) - -``` -void OHOS::UIView::SetViewId (const char * id) -``` - - **Description:** - -Sets the view ID. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
idIndicates the pointer to the view ID.
- -## SetViewIndex\(\) - -``` -void OHOS::UIView::SetViewIndex (int16_t index) -``` - - **Description:** - -Sets the view index. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
indexIndicates the view index to set.
- -## SetVisible\(\) \[1/3\] - -``` -virtual void OHOS::UIView::SetVisible (bool visible) -``` - - **Description:** - -Sets whether the view is visible. - -Reimplemented in [OHOS::UISurfaceView](Graphic.md#gaa6b5efec0684a2800dba70c697d3902e), and [OHOS::UIDialog](Graphic.md#gaf836d530b3fa9d50f70053c2b0b528d6). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
visibleSpecifies whether to set the view visible. Value true means to set the view visible, and false means the opposite.
- -## SetVisible\(\) \[2/3\] - -``` -void OHOS::UIDialog::SetVisible (bool visible) -``` - - **Description:** - -Sets whether a dialog box is visible. - -Reimplemented from [OHOS::UIView](Graphic.md#ga07e7e1f268bd6ce975f4f0f8487af5d0). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
visibleSpecifies whether a dialog box is visible. The value true means visible, and false means invisible.
- -## SetVisible\(\) \[3/3\] - -``` -void OHOS::UISurfaceView::SetVisible (bool visible) -``` - - **Description:** - -Sets whether this view is visible. - -Reimplemented from [OHOS::UIView](Graphic.md#ga07e7e1f268bd6ce975f4f0f8487af5d0). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
visibleSpecifies whether this view is visible. true indicates this view is visible, and false indicates the opposite case.
- -## SetWidth\(\) \[1/10\] - -``` -void OHOS::TextAdapter::SetWidth (int16_t width) -``` - - **Description:** - -Sets the width of [UILabel](OHOS-UILabel.md) constructed by the adapter. - -**Returns:** - -Returns the width of [UILabel](OHOS-UILabel.md). - -## SetWidth\(\) \[2/10\] - -``` -void OHOS::Rect::SetWidth (int16_t width) -``` - - **Description:** - -Changes the width of the rectangle without changing the coordinate of the left boundary. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
widthIndicates the width of the rectangle.
- -## SetWidth\(\) \[3/10\] - -``` -virtual void OHOS::UIView::SetWidth (int16_t width) -``` - - **Description:** - -Sets the width for the view. - -Reimplemented in [OHOS::UIChart](Graphic.md#ga2ae317808111cd58e6ba93e030f23111), [OHOS::UILabel](Graphic.md#ga4000481fca247d526961d9da6809a806), [OHOS::UIButton](Graphic.md#ga420f927c473cec8c6f3265ff7c35336f), [OHOS::UIPicker](Graphic.md#ga792a345948af532f9c06cd40c05d1a2d), [OHOS::UITimePicker](Graphic.md#gad8dc3b2df7fe8aed16776a063efc8b4b), [OHOS::UISurfaceView](Graphic.md#ga54c350b75cf87ca112b3c21791f9c559), and [OHOS::UIBoxProgress](Graphic.md#ga4b3eeb9de2443182480a71cadb23178c). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
widthIndicates the width to set.
- -## SetWidth\(\) \[4/10\] - -``` -void OHOS::UIBoxProgress::SetWidth (int16_t width) -``` - - **Description:** - -Sets the width for the view holding this progress bar. - -The width of the view must be greater than or equal to the actual width of the progress bar to ensure a normal display. You need to call this function before calling [SetValidWidth](Graphic.md#gada3cf1819e826ee0aed4a40ef00b91a6) to set the actual width of the progress bar. Otherwise, the width of the progress bar is reset to **width** of the view. - -Reimplemented from [OHOS::UIView](Graphic.md#ga3375ec5ef059fd88c657af4552d2fa4f). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
widthIndicates the width of the view.
- -**See also:** - -[SetHeight](Graphic.md#ga54299cb7561cee9a03d0fc9d0ddda784) | [SetValidWidth](Graphic.md#gada3cf1819e826ee0aed4a40ef00b91a6) | [SetValidHeight](Graphic.md#ga6958b8273ad7a5563dfa19267cc3a13c) - -## SetWidth\(\) \[5/10\] - -``` -void OHOS::UISurfaceView::SetWidth (int16_t width) -``` - - **Description:** - -Sets the width for this view. - -Reimplemented from [OHOS::UIView](Graphic.md#ga3375ec5ef059fd88c657af4552d2fa4f). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
widthIndicates the width to set.
- -## SetWidth\(\) \[6/10\] - -``` -void OHOS::UITimePicker::SetWidth (int16_t width) -``` - - **Description:** - -Sets the width for the time picker. - -Reimplemented from [OHOS::UIView](Graphic.md#ga3375ec5ef059fd88c657af4552d2fa4f). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
widthIndicates the width to set.
- -## SetWidth\(\) \[7/10\] - -``` -void OHOS::UIPicker::SetWidth (int16_t width) -``` - - **Description:** - -Sets the width for this component. - -Reimplemented from [OHOS::UIView](Graphic.md#ga3375ec5ef059fd88c657af4552d2fa4f). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
widthIndicates the width to set.
- -## SetWidth\(\) \[8/10\] - -``` -void OHOS::UIButton::SetWidth (int16_t width) -``` - - **Description:** - -Sets the width for this image. - -Reimplemented from [OHOS::UIView](Graphic.md#ga3375ec5ef059fd88c657af4552d2fa4f). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
widthIndicates the width to set.
- -## SetWidth\(\) \[9/10\] - -``` -void OHOS::UILabel::SetWidth (int16_t width) -``` - - **Description:** - -Sets the width for this label. - -Reimplemented from [OHOS::UIView](Graphic.md#ga3375ec5ef059fd88c657af4552d2fa4f). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
widthIndicates the width to set.
- -## SetWidth\(\) \[10/10\] - -``` -void OHOS::UIChart::SetWidth (int16_t width) -``` - - **Description:** - -Sets the width for this component. - -Reimplemented from [OHOS::UIView](Graphic.md#ga3375ec5ef059fd88c657af4552d2fa4f). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
widthIndicates the width to set.
- -## SetWorkMode\(\) \[1/2\] - -``` -virtual void OHOS::UIAbstractClock::SetWorkMode ([WorkMode](Graphic.md#ga19db90932bc71e6bbced6ccf2935ac98) newMode) -``` - - **Description:** - -Sets the working mode for this clock. - -Reimplemented in [OHOS::UIAnalogClock](Graphic.md#ga1714e171ff1e9248932a9f2c14c82d12). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
newModeIndicates the working mode to set. For details, see WorkMode.
- -## SetWorkMode\(\) \[2/2\] - -``` -void OHOS::UIAnalogClock::SetWorkMode ([WorkMode](Graphic.md#ga19db90932bc71e6bbced6ccf2935ac98) newMode) -``` - - **Description:** - -Sets the working mode for this analog clock. - -Reimplemented from [OHOS::UIAbstractClock](Graphic.md#gaafa5df66c896268de27bf335c1b72b92). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
newModeIndicates the working mode to set. For details, see WorkMode.
- -## SetX\(\) \[1/3\] - -``` -void OHOS::Rect::SetX (int16_t x) -``` - - **Description:** - -Changes the left boundary coordinate of the rectangle without changing the rectangle width. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the coordinate of the left boundary.
- -## SetX\(\) \[2/3\] - -``` -virtual void OHOS::UIView::SetX (int16_t x) -``` - - **Description:** - -Sets the x-coordinate for the view. - -Reimplemented in [OHOS::UISurfaceView](Graphic.md#ga87457cce8ab3daa62852815ad36e9692). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the x-coordinate to set.
- -## SetX\(\) \[3/3\] - -``` -void OHOS::UISurfaceView::SetX (int16_t x) -``` - - **Description:** - -Sets the x-coordinate for this view. - -Reimplemented from [OHOS::UIView](Graphic.md#gaded403626558d28e62bf5632ccbb24b5). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the x-coordinate to set.
- -## SetXScrollBarVisible\(\) - -``` -void OHOS::UIScrollView::SetXScrollBarVisible (bool state) -``` - - **Description:** - -Sets whether the horizontal scroll bar is visible. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
stateSpecifies whether the horizontal scroll bar is visible. true indicates the horizontal scroll bar is visible, and false indicates the opposite case.
- -## SetY\(\) \[1/3\] - -``` -void OHOS::Rect::SetY (int16_t y) -``` - - **Description:** - -Changes the top boundary coordinate of the rectangle without changing the rectangle height. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
yIndicates the coordinate of the top boundary.
- -## SetY\(\) \[2/3\] - -``` -virtual void OHOS::UIView::SetY (int16_t y) -``` - - **Description:** - -Sets the y-coordinate for the view. - -Reimplemented in [OHOS::UISurfaceView](Graphic.md#gad7e27c2508753b6752594c3615b5d2fe). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
yIndicates the y-coordinate to set.
- -## SetY\(\) \[3/3\] - -``` -void OHOS::UISurfaceView::SetY (int16_t y) -``` - - **Description:** - -Sets the y-coordinate for this view. - -Reimplemented from [OHOS::UIView](Graphic.md#gaaa8edc224cf1c7deb2724fb225960877). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
yIndicates the y-coordinate to set.
- -## SetYScrollBarVisible\(\) - -``` -void OHOS::UIScrollView::SetYScrollBarVisible (bool state) -``` - - **Description:** - -Sets whether the vertical scroll bar is visible. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
stateSpecifies whether this vertical scroll bar is visible. true indicates the horizontal scroll bar is visible, and false indicates the opposite case.
- -## Silver\(\) - -``` -static [ColorType](OHOS-Color32.md) OHOS::Color::Silver () -``` - - **Description:** - -Obtains the color data of silver. - -**Returns:** - -Returns the color data. - -## SineEaseIn\(\) - -``` -static int16_t OHOS::EasingEquation::SineEaseIn (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime ) -``` - - **Description:** - -Eases in shaping like a sinusoidal curve. - -**sin\(t\)** is the equation for a sinusoidal easing. The animation starts slowly from zero velocity and accelerates fast towards the end. The acceleration change is similar to a sinusoidal curve. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
startPosIndicates the start value of this animation.
endPosIndicates the end value of this animation.
curTimeIndicates the current time of this animation.
durationTimeIndicates the total duration of this animation.
- -**Returns:** - -Returns the value for the current time. - -**See also:** - -[SineEaseOut](Graphic.md#ga34018757e69d7920557030f33393048d) | [SineEaseInOut](Graphic.md#ga2c3b14232a67095b0b941bae3a7b2e54) - -## SineEaseInOut\(\) - -``` -static int16_t OHOS::EasingEquation::SineEaseInOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime ) -``` - - **Description:** - -Eases in and then out shaping like a sinusoidal curve. - -**sin\(t\)** is the equation for a sinusoidal easing. The animation accelerates slowly until halfway and decelerates slowly towards the end. The acceleration change is similar to a sinusoidal curve. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
startPosIndicates the start value of this animation.
endPosIndicates the end value of this animation.
curTimeIndicates the current time of this animation.
durationTimeIndicates the total duration of this animation.
- -**Returns:** - -Returns the value for the current time. - -**See also:** - -[SineEaseIn](Graphic.md#ga89ee91a569b73c6ebb29ae4dfd2777f9) | [SineEaseOut](Graphic.md#ga34018757e69d7920557030f33393048d) - -## SineEaseOut\(\) - -``` -static int16_t OHOS::EasingEquation::SineEaseOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime ) -``` - - **Description:** - -Eases out shaping like a sinusoidal curve. - -**sin\(t\)** is the equation for a sinusoidal easing. The animation starts fast and decelerates slowly towards the end. The acceleration change is similar to a sinusoidal curve. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
startPosIndicates the start value of this animation.
endPosIndicates the end value of this animation.
curTimeIndicates the current time of this animation.
durationTimeIndicates the total duration of this animation.
- -**Returns:** - -Returns the value for the current time. - -**See also:** - -[SineEaseIn](Graphic.md#ga89ee91a569b73c6ebb29ae4dfd2777f9) | [SineEaseInOut](Graphic.md#ga2c3b14232a67095b0b941bae3a7b2e54) - -## Size\(\) - -``` -uint16_t [OHOS::List](OHOS-List-T.md)< T >::Size () const -``` - - **Description:** - -Obtains the size of a linked list. - -**Returns:** - -Returns the size of the linked list. - -## Start\(\) \[1/3\] - -``` -void OHOS::UITextureMapper::Start () -``` - - **Description:** - -Starts this animator. - -## Start\(\) \[2/3\] - -``` -void OHOS::Animator::Start () -``` - - **Description:** - -Starts this animator. - -**See also:** - -[Stop](Graphic.md#gad670cee429a5535149db0f8b3828e951) - -## Start\(\) \[3/3\] - -``` -void OHOS::UIImageAnimatorView::Start () -``` - - **Description:** - -Starts this animator. - -The forward playback starts from the first image and the reverse playback starts from the last image. - -**See also:** - -[Stop](Graphic.md#ga1887f1afd8e85c0a9c781e182fe5afc3) - -## Stop\(\) \[1/2\] - -``` -void OHOS::Animator::Stop () -``` - - **Description:** - -Stops this animator. - -**See also:** - -[Start](Graphic.md#gad56477fe4b6d0158082e841e327c1bf6) - -## Stop\(\) \[2/2\] - -``` -void OHOS::UIImageAnimatorView::Stop (bool needReset = true) -``` - - **Description:** - -Stops this animator. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
needResetSpecifies whether the animator needs to be reset to the original one. true (default value) indicates the original image is displayed, and false indicates the current image is displayed.
- -**See also:** - -[Start](Graphic.md#ga99fb1b9b27ee65f812085f93e05330a6) - -## Style\(\) - -``` -OHOS::Style::Style () -``` - - **Description:** - -A constructor used to create a **[Style](OHOS-Style.md)** instance. - -## StyleDefault\(\) - -``` -OHOS::StyleDefault::StyleDefault () -``` - - **Description:** - -A constructor used to create a **[StyleDefault](OHOS-StyleDefault.md)** instance. - -## SuthHodgClip\(\) - -``` -[Polygon](OHOS-Polygon.md) OHOS::SuthHodgClip (const [Rect](OHOS-Rect.md) & clipRect, const [Polygon](OHOS-Polygon.md) & polygon ) -``` - - **Description:** - -Implements Sutherland-Hodgman, an algorithm used for clipping polygons. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
clipRectIndicates the rectangle used for clipping the polygon.
polygonIndicates the polygon to clip.
- -**Returns:** - -Returns the polygon after clipping. - -## Tail\(\) - -``` -[ListNode](OHOS-ListNode-T.md)* [OHOS::List](OHOS-List-T.md)< T >::Tail () const -``` - - **Description:** - -Obtains the tail node address of a linked list. - -**Returns:** - -Returns the tail node address. - -## Task\(\) - -``` -OHOS::Task::Task (uint32_t period) -``` - - **Description:** - -A constructor used to create a **[Task](OHOS-Task.md)** instance with the specified running period. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
periodIndicates the running period of this task.
- -## Teal\(\) - -``` -static [ColorType](OHOS-Color32.md) OHOS::Color::Teal () -``` - - **Description:** - -Obtains the color data of teal. - -**Returns:** - -Returns the color data. - -## Text\(\) - -``` -OHOS::Text::Text () -``` - - **Description:** - -A constructor used to create a **[Text](OHOS-Text.md)** instance. - -## TextAdapter\(\) - -``` -OHOS::TextAdapter::TextAdapter () -``` - - **Description:** - -A constructor used to create a **[UILabel](OHOS-UILabel.md)** instance. - -## Theme\(\) - -``` -OHOS::Theme::Theme () -``` - - **Description:** - -A constructor used to create a **[Theme](OHOS-Theme.md)** instance. - -## TransformMap\(\) \[1/2\] - -``` -OHOS::TransformMap::TransformMap () -``` - - **Description:** - -The default constructor used to create a **[TransformMap](OHOS-TransformMap.md)** instance. - -## TransformMap\(\) \[2/2\] - -``` -OHOS::TransformMap::TransformMap (const [Rect](OHOS-Rect.md) & rect) -``` - - **Description:** - -A constructor used to create a **[TransformMap](OHOS-TransformMap.md)** instance. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
rectIndicates the rectangle to transform.
- -## Translate\(\) - -``` -[Matrix3](OHOS-Matrix3-T.md)< T > [OHOS::Matrix3](OHOS-Matrix3-T.md)< T >::Translate (const [Vector2](OHOS-Vector2-T.md)< T > & trans) -``` - - **Description:** - -Obtains a matrix translation. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
transIndicates the distances to translate along the x-axis and y-axis.
- -**Returns:** - -Returns the matrix after translation. - -## TranslateToPixel\(\) \[1/3\] - -``` -void OHOS::UIXAxis::TranslateToPixel (int16_t & value) -``` - - **Description:** - -Translates data into the x coordinate of a pixel. - -This function calculates the position of the corresponding pixel \(relative position in the chart\) based on the value of **value** and the data range of the x-axis. - -Implements [OHOS::UIAxis](Graphic.md#ga8ff3fd2953897245e4f6e3cb6bd71495). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
valueIndicates the current value. The x coordinate obtained after translation is also printed using this parameter.
- -## TranslateToPixel\(\) \[2/3\] - -``` -void OHOS::UIYAxis::TranslateToPixel (int16_t & value) -``` - - **Description:** - -Translates data into the y coordinate of a pixel. - -Calculates the position of the corresponding pixel \(relative position in the chart\) based on the value of **value** and the data range of the Y axis. - -Implements [OHOS::UIAxis](Graphic.md#ga8ff3fd2953897245e4f6e3cb6bd71495). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
valueIndicates the current value. The y coordinate obtained after translation is also printed using this parameter.
- -## TranslateToPixel\(\) \[3/3\] - -``` -virtual void OHOS::UIAxis::TranslateToPixel (int16_t & value) -``` - - **Description:** - -Translates data into pixel coordinates. - -This function calculates the relative position of a pixel in the corresponding [UIChart](OHOS-UIChart.md) based on the value of **value** and the data range of the coordinate axis. - -Implemented in [OHOS::UIYAxis](Graphic.md#gae70c8c411116746a2ab73a6f9bbd1233), and [OHOS::UIXAxis](Graphic.md#ga9407ddab6d7e65fc075ca37b86163e6f). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
valueIndicates the current value. The coordinate value obtained after translation is also printed using this parameter.
- -## UIAbstractClock\(\) \[1/2\] - -``` -OHOS::UIAbstractClock::UIAbstractClock () -``` - - **Description:** - -A default constructor used to create a **[UIAbstractClock](OHOS-UIAbstractClock.md)** instance. - -## UIAbstractClock\(\) \[2/2\] - -``` -OHOS::UIAbstractClock::UIAbstractClock (uint8_t hour, uint8_t minute, uint8_t second ) -``` - - **Description:** - -A constructor used to create a **[UIAbstractClock](OHOS-UIAbstractClock.md)** instance with time elements \(hour, minute and second\). - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
hourIndicates the hour.
minuteIndicates the minute.
secondIndicates the second.
- -## UIAbstractProgress\(\) - -``` -OHOS::UIAbstractProgress::UIAbstractProgress () -``` - - **Description:** - -A constructor used to create a **[UIAbstractProgress](OHOS-UIAbstractProgress.md)** instance. - -## UIAbstractScroll\(\) - -``` -OHOS::UIAbstractScroll::UIAbstractScroll () -``` - - **Description:** - -A constructor used to create a **[UIAbstractScroll](OHOS-UIAbstractScroll.md)** instance. - -## UIAnalogClock\(\) - -``` -OHOS::UIAnalogClock::UIAnalogClock () -``` - - **Description:** - -A default constructor used to create a **[UIAnalogClock](OHOS-UIAnalogClock.md)** instance. - -## UIArcLabel\(\) - -``` -OHOS::UIArcLabel::UIArcLabel () -``` - - **Description:** - -A default constructor used to create a **[UIArcLabel](OHOS-UIArcLabel.md)** instance. - -## UIAxis\(\) - -``` -OHOS::UIAxis::UIAxis () -``` - - **Description:** - -A constructor used to create a **[UIAxis](OHOS-UIAxis.md)** instance. - -## UIBoxProgress\(\) - -``` -OHOS::UIBoxProgress::UIBoxProgress () -``` - - **Description:** - -A constructor used to create a **[UIBoxProgress](OHOS-UIBoxProgress.md)** instance. - -## UIButton\(\) \[1/2\] - -``` -OHOS::UIButton::UIButton () -``` - - **Description:** - -A constructor used to create a **[UIButton](OHOS-UIButton.md)** instance. - -## UIButton\(\) \[2/2\] - -``` -OHOS::UIButton::UIButton (const char * id) -``` - - **Description:** - -A constructor used to create a **[UIButton](OHOS-UIButton.md)** instance based on the button ID. - -Buttons sharing the same ID are in the same batch. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
idIndicates the button ID.
- -## UICanvas\(\) - -``` -OHOS::UICanvas::UICanvas () -``` - - **Description:** - -A constructor used to create a **[UICanvas](OHOS-UICanvas.md)** instance. - -## UIChart\(\) - -``` -OHOS::UIChart::UIChart () -``` - - **Description:** - -A constructor used to create a **[UIChart](OHOS-UIChart.md)** instance. - -## UIChartDataSerial\(\) - -``` -OHOS::UIChartDataSerial::UIChartDataSerial () -``` - - **Description:** - -A constructor used to create a **[UIChartDataSerial](OHOS-UIChartDataSerial.md)** instance. - -## UIChartPillar\(\) - -``` -OHOS::UIChartPillar::UIChartPillar () -``` - - **Description:** - -A constructor used to create a **[UIChartPillar](OHOS-UIChartPillar.md)** instance. - -## UIChartPolyline\(\) - -``` -OHOS::UIChartPolyline::UIChartPolyline () -``` - - **Description:** - -A constructor used to create a **[UIChartPolyline](OHOS-UIChartPolyline.md)** instance. - -## UICheckBox\(\) - -``` -OHOS::UICheckBox::UICheckBox () -``` - - **Description:** - -A constructor used to create a **[UICheckBox](OHOS-UICheckBox.md)** instance. - -## UICircleProgress\(\) - -``` -OHOS::UICircleProgress::UICircleProgress () -``` - - **Description:** - -A constructor used to create a **[UICircleProgress](OHOS-UICircleProgress.md)** instance. - -## UIDialog\(\) - -``` -OHOS::UIDialog::UIDialog () -``` - - **Description:** - -A constructor used to create a **[UIDialog](OHOS-UIDialog.md)** instance. - -## UIDigitalClock\(\) - -``` -OHOS::UIDigitalClock::UIDigitalClock () -``` - - **Description:** - -A default constructor used to create a **[UIDigitalClock](OHOS-UIDigitalClock.md)** instance. - -## UIFree\(\) - -``` -void OHOS::UIFree (void * buffer) -``` - - **Description:** - -Releases memory for the graphics module. You can implement this function to override the **free** and **delete** functions. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
bufferIndicates the pointer to the memory to be released.
- -## UIImageAnimatorView\(\) - -``` -OHOS::UIImageAnimatorView::UIImageAnimatorView () -``` - - **Description:** - -A constructor used to create a **[UIImageAnimatorView](OHOS-UIImageAnimatorView.md)** instance. - -## UIImageView\(\) - -``` -OHOS::UIImageView::UIImageView () -``` - - **Description:** - -A default constructor used to create a **[UIImageView](OHOS-UIImageView.md)** instance. - -## UILabel\(\) - -``` -OHOS::UILabel::UILabel () -``` - - **Description:** - -A constructor used to create a **[UILabel](OHOS-UILabel.md)** instance. - -## UILabelButton\(\) - -``` -OHOS::UILabelButton::UILabelButton () -``` - - **Description:** - -A constructor used to create a **[UILabelButton](OHOS-UILabelButton.md)** instance. - -## UIList\(\) \[1/2\] - -``` -OHOS::UIList::UIList () -``` - - **Description:** - -A constructor used to create a **[UIList](OHOS-UIList.md)** instance in the vertical direction. - -## UIList\(\) \[2/2\] - -``` -OHOS::UIList::UIList (uint8_t direction) -``` - - **Description:** - -A constructor used to create a **[UIList](OHOS-UIList.md)** instance in the specified direction. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
directionIndicates the UIList direction, either HORIZONTAL or VERTICAL.
- -## UIMalloc\(\) - -``` -void* OHOS::UIMalloc (uint32_t size) -``` - - **Description:** - -Applies for memory for the graphics module. You can implement this function to override the **malloc** and **new** functions. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sizeIndicates the size of the memory to apply for.
- -## UIPicker\(\) - -``` -OHOS::UIPicker::UIPicker () -``` - - **Description:** - -A constructor used to create a **[UIPicker](OHOS-UIPicker.md)** instance. - -## UIRadioButton\(\) - -``` -OHOS::UIRadioButton::UIRadioButton () -``` - - **Description:** - -A constructor used to create a **[UIRadioButton](OHOS-UIRadioButton.md)** instance. - -## UIRepeatButton\(\) - -``` -OHOS::UIRepeatButton::UIRepeatButton () -``` - - **Description:** - -A constructor used to create a **[UIRepeatButton](OHOS-UIRepeatButton.md)** instance. - -## UIScrollView\(\) - -``` -OHOS::UIScrollView::UIScrollView () -``` - - **Description:** - -A constructor used to create a **[UIScrollView](OHOS-UIScrollView.md)** instance, with both horizontal and vertical scrolls supported. - -## UISlider\(\) - -``` -OHOS::UISlider::UISlider () -``` - - **Description:** - -A constructor used to create a **[UISlider](OHOS-UISlider.md)** instance. - -## UISurfaceView\(\) - -``` -OHOS::UISurfaceView::UISurfaceView () -``` - - **Description:** - -A constructor used to create a **[UISurfaceView](OHOS-UISurfaceView.md)** instance. - -## UISwipeView\(\) - -``` -OHOS::UISwipeView::UISwipeView (uint8_t direction = [HORIZONTAL](Graphic.md#ga34dfbde0fad8baade31c02d9e8dd5026)) -``` - - **Description:** - -A constructor used to create a **[UISwipeView](OHOS-UISwipeView.md)** instance. - -## UITextureMapper\(\) - -``` -OHOS::UITextureMapper::UITextureMapper () -``` - - **Description:** - -A constructor used to create a **[UITextureMapper](OHOS-UITextureMapper.md)** instance. - -## UITimePicker\(\) - -``` -OHOS::UITimePicker::UITimePicker () -``` - - **Description:** - -A constructor used to create a **[UITimePicker](OHOS-UITimePicker.md)** instance. - -## UIToggleButton\(\) - -``` -OHOS::UIToggleButton::UIToggleButton () -``` - - **Description:** - -A constructor used to create a **[UIToggleButton](OHOS-UIToggleButton.md)** instance. - -## UIView\(\) \[1/2\] - -``` -OHOS::UIView::UIView () -``` - - **Description:** - -A default constructor used to create an **[UIView](OHOS-UIView.md)** instance. - -## UIView\(\) \[2/2\] - -``` -OHOS::UIView::UIView (const char * id) -``` - - **Description:** - -A constructor used to create an **[UIView](OHOS-UIView.md)** instance. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
idIndicates the pointer to the view ID.
- -## UIViewGroup\(\) - -``` -OHOS::UIViewGroup::UIViewGroup () -``` - - **Description:** - -A default constructor used to create a **[UIViewGroup](OHOS-UIViewGroup.md)** instance. - -## UIXAxis\(\) - -``` -OHOS::UIXAxis::UIXAxis () -``` - - **Description:** - -A constructor used to create a **[UIXAxis](OHOS-UIXAxis.md)** instance. - -## UIYAxis\(\) - -``` -OHOS::UIYAxis::UIYAxis () -``` - - **Description:** - -A constructor used to create a **[UIYAxis](OHOS-UIYAxis.md)** instance. - -## UpdateClock\(\) \[1/3\] - -``` -virtual void OHOS::UIAbstractClock::UpdateClock (bool clockInit) -``` - - **Description:** - -Updates this clock. - -Reimplemented in [OHOS::UIAnalogClock](Graphic.md#ga5274a3e5b66e5f80aab899ef4e61edb2), and [OHOS::UIDigitalClock](Graphic.md#ga386c03c483ef38cb5310563b6ba9bc02). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
clockInitSpecifies whether it is the first initialization. true indicates it is the first initialization, and false indicates the opposite case.
- -## UpdateClock\(\) \[2/3\] - -``` -void OHOS::UIDigitalClock::UpdateClock (bool clockInit) -``` - - **Description:** - -Updates this digital clock. - -Reimplemented from [OHOS::UIAbstractClock](Graphic.md#gad7c0fba1eac5d10998954e9c1e097197). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
clockInitSpecifies whether the first initialization. true indicates the first initialization, and false indicates the opposite case.
- -## UpdateClock\(\) \[3/3\] - -``` -void OHOS::UIAnalogClock::UpdateClock (bool clockInit) -``` - - **Description:** - -Updates the time of this analog clock. - -Reimplemented from [OHOS::UIAbstractClock](Graphic.md#gad7c0fba1eac5d10998954e9c1e097197). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
clockInitSpecifies whether it is the first initialization. true indicates it is the first initialization, and false indicates the opposite case.
- -## Vector2\(\) \[1/2\] - -``` -[OHOS::Vector2](OHOS-Vector2-T.md)< T >::[Vector2](OHOS-Vector2-T.md) () -``` - - **Description:** - -A constructor used to create a **[Vector2](OHOS-Vector2-T.md)** instance. - -## Vector2\(\) \[2/2\] - -``` -[OHOS::Vector2](OHOS-Vector2-T.md)< T >::[Vector2](OHOS-Vector2-T.md) (T x, T y ) -``` - - **Description:** - -A constructor used to create a **[Vector2](OHOS-Vector2-T.md)** instance based on the X and Y coordinates. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the X coordinate.
yIndicates the Y coordinate.
- -## Vector3\(\) \[1/2\] - -``` -[OHOS::Vector3](OHOS-Vector3-T.md)< T >::[Vector3](OHOS-Vector3-T.md) () -``` - - **Description:** - -A constructor used to create a **[Vector3](OHOS-Vector3-T.md)** instance. - -## Vector3\(\) \[2/2\] - -``` -[OHOS::Vector3](OHOS-Vector3-T.md)< T >::[Vector3](OHOS-Vector3-T.md) (T x, T y, T z ) -``` - - **Description:** - -Defines a **[Vector3](OHOS-Vector3-T.md)** instance and initializes the values of **x**, **y**, and **z**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the X coordinate.
yIndicates the Y coordinate.
zIndicates the Z coordinate.
- -## VirtualDeviceEvent\(\) - -``` -OHOS::VirtualDeviceEvent::VirtualDeviceEvent (uint16_t type, uint16_t value ) -``` - - **Description:** - -A constructor used to create a **[VirtualDeviceEvent](OHOS-VirtualDeviceEvent.md)** instance. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
typeIndicates the virtual device type. The options are AOD and PRIVATE.
valueIndicates the virtual event value.
- -## White\(\) - -``` -static [ColorType](OHOS-Color32.md) OHOS::Color::White () -``` - - **Description:** - -Obtains the color data of white. - -**Returns:** - -Returns the color data. - -## Yellow\(\) - -``` -static [ColorType](OHOS-Color32.md) OHOS::Color::Yellow () -``` - - **Description:** - -Obtains the color data of yellow. - -**Returns:** - -Returns the color data. - -## \~AbstractAdapter\(\) - -``` -virtual OHOS::AbstractAdapter::~AbstractAdapter () -``` - - **Description:** - -A destructor used to delete the **[AbstractAdapter](OHOS-AbstractAdapter.md)** instance. - -## \~Animator\(\) - -``` -virtual OHOS::Animator::~Animator () -``` - - **Description:** - -A destructor used to delete the **[Animator](OHOS-Animator.md)** instance. - -## \~AnimatorCallback\(\) - -``` -virtual OHOS::AnimatorCallback::~AnimatorCallback () -``` - - **Description:** - -A default destructor used to delete an **[AnimatorCallback](OHOS-AnimatorCallback.md)** instance. - -## \~AnimatorStopListener\(\) \[1/2\] - -``` -virtual OHOS::UITextureMapper::AnimatorStopListener::~AnimatorStopListener () -``` - - **Description:** - -A destructor used to delete an **[AnimatorStopListener](OHOS-UITextureMapper-AnimatorStopListener.md)** instance. - -## \~AnimatorStopListener\(\) \[2/2\] - -``` -virtual OHOS::UIImageAnimatorView::AnimatorStopListener::~AnimatorStopListener () -``` - - **Description:** - -A destructor used to delete an **[AnimatorStopListener](OHOS-UIImageAnimatorView-AnimatorStopListener.md)** instance. - -## \~CancelEvent\(\) - -``` -virtual OHOS::CancelEvent::~CancelEvent () -``` - - **Description:** - -A destructor used to delete the **[CancelEvent](OHOS-CancelEvent.md)** instance. - -## \~ClickEvent\(\) - -``` -virtual OHOS::ClickEvent::~ClickEvent () -``` - - **Description:** - -A destructor used to delete the **[ClickEvent](OHOS-ClickEvent.md)** instance. - -## \~DragEvent\(\) - -``` -virtual OHOS::DragEvent::~DragEvent () -``` - - **Description:** - -A destructor used to delete the **[DragEvent](OHOS-DragEvent.md)** instance. - -## \~Event\(\) - -``` -virtual OHOS::Event::~Event () -``` - - **Description:** - -A destructor used to delete the **[Event](OHOS-Event.md)** instance. - -## \~FlexLayout\(\) - -``` -virtual OHOS::FlexLayout::~FlexLayout () -``` - - **Description:** - -A destructor used to delete the **[FlexLayout](OHOS-FlexLayout.md)** instance. - -## \~GridLayout\(\) - -``` -virtual OHOS::GridLayout::~GridLayout () -``` - - **Description:** - -A destructor used to delete the **[GridLayout](OHOS-GridLayout.md)** instance. - -## \~Hand\(\) - -``` -virtual OHOS::UIAnalogClock::Hand::~Hand () -``` - - **Description:** - -A destructor used to delete the **[Hand](OHOS-UIAnalogClock-Hand.md)** instance. - -## \~Image\(\) - -``` -virtual OHOS::Image::~Image () -``` - - **Description:** - -A destructor used to delete the **[Image](OHOS-Image.md)** instance. - -## \~KeyEvent\(\) - -``` -OHOS::KeyEvent::~KeyEvent () -``` - - **Description:** - -A destructor used to delete the **[KeyEvent](OHOS-KeyEvent.md)** instance. - -## \~Layout\(\) - -``` -virtual OHOS::Layout::~Layout () -``` - - **Description:** - -A destructor used to delete the **[Layout](OHOS-Layout.md)** instance. - -## \~Line\(\) - -``` -OHOS::Line::~Line () -``` - - **Description:** - -A destructor used to delete the **[Line](OHOS-Line.md)** instance. - -## \~List\(\) - -``` -virtual [OHOS::List](OHOS-List-T.md)< T >::~[List](OHOS-List-T.md) () -``` - - **Description:** - -A destructor used to delete the **[List](OHOS-List-T.md)** instance. - -## \~ListScrollListener\(\) - -``` -virtual OHOS::ListScrollListener::~ListScrollListener () -``` - - **Description:** - -A destructor used to delete the **[ListScrollListener](OHOS-ListScrollListener.md)** instance. - -## \~LongPressEvent\(\) - -``` -virtual OHOS::LongPressEvent::~LongPressEvent () -``` - - **Description:** - -A destructor used to delete the **[LongPressEvent](OHOS-LongPressEvent.md)** instance. - -## \~Matrix3\(\) - -``` -[OHOS::Matrix3](OHOS-Matrix3-T.md)< T >::~[Matrix3](OHOS-Matrix3-T.md) () -``` - - **Description:** - -A destructor used to delete the **[Matrix3](OHOS-Matrix3-T.md)** instance. - -## \~OnChangeListener\(\) - -``` -virtual OHOS::UICheckBox::OnChangeListener::~OnChangeListener () -``` - - **Description:** - -A destructor used to delete the **[OnChangeListener](OHOS-UICheckBox-OnChangeListener.md)** instance. - -## \~OnClickListener\(\) - -``` -virtual OHOS::UIView::OnClickListener::~OnClickListener () -``` - - **Description:** - -A destructor used to delete the **[OnClickListener](OHOS-UIView-OnClickListener.md)** instance. - -## \~OnDragListener\(\) - -``` -virtual OHOS::UIView::OnDragListener::~OnDragListener () -``` - - **Description:** - -A destructor used to delete the **[OnDragListener](OHOS-UIView-OnDragListener.md)** instance. - -## \~OnFPSChangedListener\(\) - -``` -virtual OHOS::SysInfo::OnFPSChangedListener::~OnFPSChangedListener () -``` - - **Description:** - -A destructor used to delete the **[OnFPSChangedListener](OHOS-SysInfo-OnFPSChangedListener.md)** instance. - -## \~OnLongPressListener\(\) - -``` -virtual OHOS::UIView::OnLongPressListener::~OnLongPressListener () -``` - - **Description:** - -A destructor used to delete the **[OnLongPressListener](OHOS-UIView-OnLongPressListener.md)** instance. - -## \~OnScrollListener\(\) - -``` -virtual OHOS::UIScrollView::OnScrollListener::~OnScrollListener () -``` - - **Description:** - -A destructor used to delete the **[OnScrollListener](OHOS-UIScrollView-OnScrollListener.md)** instance. - -## \~OnTouchListener\(\) - -``` -virtual OHOS::UIView::OnTouchListener::~OnTouchListener () -``` - - **Description:** - -A destructor used to delete the **[OnTouchListener](OHOS-UIView-OnTouchListener.md)** instance. - -## \~Paint\(\) - -``` -virtual OHOS::Paint::~Paint () -``` - - **Description:** - -A destructor used to delete the **[Paint](OHOS-Paint.md)** instance. - -## \~Polygon\(\) - -``` -OHOS::Polygon::~Polygon () -``` - - **Description:** - -A destructor used to delete the **[Polygon](OHOS-Polygon.md)** instance. - -## \~PressEvent\(\) - -``` -virtual OHOS::PressEvent::~PressEvent () -``` - - **Description:** - -A destructor used to delete the **[PressEvent](OHOS-PressEvent.md)** instance. - -## \~Rect\(\) - -``` -OHOS::Rect::~Rect () -``` - - **Description:** - -A destructor used to delete the **[Rect](OHOS-Rect.md)** instance. - -## \~ReleaseEvent\(\) - -``` -virtual OHOS::ReleaseEvent::~ReleaseEvent () -``` - - **Description:** - -A destructor used to delete the **[ReleaseEvent](OHOS-ReleaseEvent.md)** instance. - -## \~SelectedListener\(\) \[1/2\] - -``` -OHOS::UITimePicker::SelectedListener::~SelectedListener () -``` - - **Description:** - -A destructor used to delete the **[SelectedListener](OHOS-UITimePicker-SelectedListener.md)** instance. - -## \~SelectedListener\(\) \[2/2\] - -``` -virtual OHOS::UIPicker::SelectedListener::~SelectedListener () -``` - - **Description:** - -A destructor used to delete the **[SelectedListener](OHOS-UIPicker-SelectedListener.md)** instance. - -## \~Style\(\) - -``` -virtual OHOS::Style::~Style () -``` - - **Description:** - -A destructor used to delete the **[Style](OHOS-Style.md)** instance. - -## \~StyleDefault\(\) - -``` -OHOS::StyleDefault::~StyleDefault () -``` - - **Description:** - -A destructor used to delete the **[StyleDefault](OHOS-StyleDefault.md)** instance. - -## \~Text\(\) - -``` -virtual OHOS::Text::~Text () -``` - - **Description:** - -A destructor used to delete the **[Text](OHOS-Text.md)** instance. - -## \~TextAdapter\(\) - -``` -virtual OHOS::TextAdapter::~TextAdapter () -``` - - **Description:** - -A destructor used to delete the **[UILabel](OHOS-UILabel.md)** instance. - -## \~Theme\(\) - -``` -virtual OHOS::Theme::~Theme () -``` - - **Description:** - -A destructor used to delete the **[Theme](OHOS-Theme.md)** instance. - -## \~TransformMap\(\) - -``` -OHOS::TransformMap::~TransformMap () -``` - - **Description:** - -A destructor used to delete the **[TransformMap](OHOS-TransformMap.md)** instance. - -## \~UIAbstractClock\(\) - -``` -virtual OHOS::UIAbstractClock::~UIAbstractClock () -``` - - **Description:** - -A destructor used to delete the **[UIAbstractClock](OHOS-UIAbstractClock.md)** instance. - -## \~UIAbstractProgress\(\) - -``` -virtual OHOS::UIAbstractProgress::~UIAbstractProgress () -``` - - **Description:** - -A destructor used to delete the **[UIAbstractProgress](OHOS-UIAbstractProgress.md)** instance. - -## \~UIAbstractScroll\(\) - -``` -virtual OHOS::UIAbstractScroll::~UIAbstractScroll () -``` - - **Description:** - -A destructor used to delete the **[UIAbstractScroll](OHOS-UIAbstractScroll.md)** instance. - -## \~UIAnalogClock\(\) - -``` -virtual OHOS::UIAnalogClock::~UIAnalogClock () -``` - - **Description:** - -A destructor used to delete the **[UIAnalogClock](OHOS-UIAnalogClock.md)** instance. - -## \~UIArcLabel\(\) - -``` -virtual OHOS::UIArcLabel::~UIArcLabel () -``` - - **Description:** - -A destructor used to delete the **[UIArcLabel](OHOS-UIArcLabel.md)** instance. - -## \~UIAxis\(\) - -``` -virtual OHOS::UIAxis::~UIAxis () -``` - - **Description:** - -A destructor used to delete the **[UIAxis](OHOS-UIAxis.md)** instance. - -## \~UIBoxProgress\(\) - -``` -virtual OHOS::UIBoxProgress::~UIBoxProgress () -``` - - **Description:** - -A destructor used to delete the **[UIBoxProgress](OHOS-UIBoxProgress.md)** instance. - -## \~UIButton\(\) - -``` -virtual OHOS::UIButton::~UIButton () -``` - - **Description:** - -A destructor used to delete the **[UIButton](OHOS-UIButton.md)** instance. - -## \~UICanvas\(\) - -``` -virtual OHOS::UICanvas::~UICanvas () -``` - - **Description:** - -A destructor used to delete the **[UICanvas](OHOS-UICanvas.md)** instance. - -## \~UIChart\(\) - -``` -virtual OHOS::UIChart::~UIChart () -``` - - **Description:** - -A destructor used to delete the **[UIChart](OHOS-UIChart.md)** instance. - -## \~UIChartDataSerial\(\) - -``` -virtual OHOS::UIChartDataSerial::~UIChartDataSerial () -``` - - **Description:** - -A destructor used to delete the **[UIChartDataSerial](OHOS-UIChartDataSerial.md)** instance. - -## \~UIChartPillar\(\) - -``` -virtual OHOS::UIChartPillar::~UIChartPillar () -``` - - **Description:** - -A destructor used to delete the **[UIChartPillar](OHOS-UIChartPillar.md)** instance. - -## \~UIChartPolyline\(\) - -``` -virtual OHOS::UIChartPolyline::~UIChartPolyline () -``` - - **Description:** - -A destructor used to delete the **[UIChartPolyline](OHOS-UIChartPolyline.md)** instance. - -## \~UICheckBox\(\) - -``` -virtual OHOS::UICheckBox::~UICheckBox () -``` - - **Description:** - -A destructor used to delete the **[UICheckBox](OHOS-UICheckBox.md)** instance. - -## \~UICircleProgress\(\) - -``` -virtual OHOS::UICircleProgress::~UICircleProgress () -``` - - **Description:** - -A destructor used to delete the **[UICircleProgress](OHOS-UICircleProgress.md)** instance. - -## \~UIDialog\(\) - -``` -virtual OHOS::UIDialog::~UIDialog () -``` - - **Description:** - -A destructor used to delete the **[UIDialog](OHOS-UIDialog.md)** instance. - -## \~UIDigitalClock\(\) - -``` -virtual OHOS::UIDigitalClock::~UIDigitalClock () -``` - - **Description:** - -A destructor used to delete the **[UIDigitalClock](OHOS-UIDigitalClock.md)** instance. - -## \~UIImageAnimatorView\(\) - -``` -virtual OHOS::UIImageAnimatorView::~UIImageAnimatorView () -``` - - **Description:** - -A destructor used to delete the **[UIImageAnimatorView](OHOS-UIImageAnimatorView.md)** instance. - -## \~UIImageView\(\) - -``` -virtual OHOS::UIImageView::~UIImageView () -``` - - **Description:** - -A destructor used to delete the **[UIImageView](OHOS-UIImageView.md)** instance. - -## \~UILabel\(\) - -``` -virtual OHOS::UILabel::~UILabel () -``` - - **Description:** - -A destructor used to delete the **[UILabel](OHOS-UILabel.md)** instance. - -## \~UILabelButton\(\) - -``` -virtual OHOS::UILabelButton::~UILabelButton () -``` - - **Description:** - -A destructor used to delete the **[UILabelButton](OHOS-UILabelButton.md)** instance. - -## \~UIList\(\) - -``` -virtual OHOS::UIList::~UIList () -``` - - **Description:** - -A destructor used to delete the **[UIList](OHOS-UIList.md)** instance. - -## \~UIPicker\(\) - -``` -virtual OHOS::UIPicker::~UIPicker () -``` - - **Description:** - -A destructor used to delete the **[UIPicker](OHOS-UIPicker.md)** instance. - -## \~UIRadioButton\(\) - -``` -virtual OHOS::UIRadioButton::~UIRadioButton () -``` - - **Description:** - -A destructor used to delete the **[UIRadioButton](OHOS-UIRadioButton.md)** instance. - -## \~UIRepeatButton\(\) - -``` -virtual OHOS::UIRepeatButton::~UIRepeatButton () -``` - - **Description:** - -A destructor used to delete the **[UIRepeatButton](OHOS-UIRepeatButton.md)** instance. - -## \~UIScrollView\(\) - -``` -virtual OHOS::UIScrollView::~UIScrollView () -``` - - **Description:** - -A destructor used to delete the **[UIScrollView](OHOS-UIScrollView.md)** instance. - -## \~UISlider\(\) - -``` -virtual OHOS::UISlider::~UISlider () -``` - - **Description:** - -A destructor used to delete the **[UISlider](OHOS-UISlider.md)** instance. - -## \~UISliderEventListener\(\) - -``` -virtual OHOS::UISlider::UISliderEventListener::~UISliderEventListener () -``` - - **Description:** - -A destructor used to delete the ** [UISliderEventListener](OHOS-UISlider-UISliderEventListener.md) ** instance. - -## \~UISurfaceView\(\) - -``` -OHOS::UISurfaceView::~UISurfaceView () -``` - - **Description:** - -A destructor used to delete the **[UISurfaceView](OHOS-UISurfaceView.md)** instance. - -## \~UISwipeView\(\) - -``` -virtual OHOS::UISwipeView::~UISwipeView () -``` - - **Description:** - -A destructor used to delete the **[UISwipeView](OHOS-UISwipeView.md)** instance. - -## \~UITextureMapper\(\) - -``` -virtual OHOS::UITextureMapper::~UITextureMapper () -``` - - **Description:** - -A destructor used to delete the **[UITextureMapper](OHOS-UITextureMapper.md)** instance. - -## \~UITimePicker\(\) - -``` -virtual OHOS::UITimePicker::~UITimePicker () -``` - - **Description:** - -A destructor used to delete the **[UITimePicker](OHOS-UITimePicker.md)** instance. - -## \~UIToggleButton\(\) - -``` -virtual OHOS::UIToggleButton::~UIToggleButton () -``` - - **Description:** - -A destructor used to delete the **[UIToggleButton](OHOS-UIToggleButton.md)** instance. - -## \~UIView\(\) - -``` -virtual OHOS::UIView::~UIView () -``` - - **Description:** - -A destructor used to delete the **[UIView](OHOS-UIView.md)** instance. - -## \~UIViewGroup\(\) - -``` -virtual OHOS::UIViewGroup::~UIViewGroup () -``` - - **Description:** - -A destructor used to delete the **[UIViewGroup](OHOS-UIViewGroup.md)** instance. - -## \~UIXAxis\(\) - -``` -virtual OHOS::UIXAxis::~UIXAxis () -``` - - **Description:** - -A destructor used to delete the **[UIXAxis](OHOS-UIXAxis.md)** instance. - -## \~UIYAxis\(\) - -``` -virtual OHOS::UIYAxis::~UIYAxis () -``` - - **Description:** - -A destructor used to delete the **[UIYAxis](OHOS-UIYAxis.md)** instance. - -## \~Vector2\(\) - -``` -[OHOS::Vector2](OHOS-Vector2-T.md)< T >::~[Vector2](OHOS-Vector2-T.md) () -``` - - **Description:** - -A destructor used to delete the **[Vector2](OHOS-Vector2-T.md)** instance. - -## \~Vector3\(\) - -``` -[OHOS::Vector3](OHOS-Vector3-T.md)< T >::~[Vector3](OHOS-Vector3-T.md) () -``` - - **Description:** - -A destructor used to delete the **[Vector3](OHOS-Vector3-T.md)** instance. - -## \~VirtualDeviceEvent\(\) - -``` -OHOS::VirtualDeviceEvent::~VirtualDeviceEvent () -``` - - **Description:** - -A destructor used to delete the **[VirtualDeviceEvent](OHOS-VirtualDeviceEvent.md)** instance. - -## **Variable ** - -## align - -``` -[UITextLanguageAlignment](Graphic.md#ga3f99b58f731a37cacde72d5e0c934593) OHOS::UICanvas::FontStyle::align -``` - - **Description:** - -[Text](OHOS-Text.md) alignment mode. For details, see **UITextLanguageAlignment**. - -## alpha \[1/2\] - -``` -uint8_t OHOS::Color32::alpha -``` - - **Description:** - -Alpha \(how opaque each pixel is\) - -## alpha \[2/2\] - -``` -uint8_t { ... } ::alpha -``` - - **Description:** - -Alpha \(how opaque each pixel is\) - -## ANIMATOR\_TIME - -``` -constexpr static uint16_t OHOS::UISwipeView::ANIMATOR_TIME = 12 -``` - - **Description:** - -Indicates that the animation duration is 12 ticks. - -## blue \[1/5\] - -``` -uint16_t { ... } ::blue -``` - - **Description:** - -Blue - -## blue \[2/5\] - -``` -uint16_t OHOS::Color16::blue -``` - - **Description:** - -Blue - -## blue \[3/5\] - -``` -uint8_t OHOS::Color24::blue -``` - - **Description:** - -Blue - -## blue \[4/5\] - -``` -uint8_t OHOS::Color32::blue -``` - - **Description:** - -Blue - -## blue \[5/5\] - -``` -uint8_t { ... } ::blue -``` - - **Description:** - -Blue - -## CIRCLE\_IN\_DEGREE - -``` -constexpr uint16_t OHOS::CIRCLE_IN_DEGREE = 360 -``` - - **Description:** - -A full rotation: 360 degrees - -## colorMode - -``` -uint32_t OHOS::ImageHeader::colorMode -``` - - **Description:** - -[Color](OHOS-Color.md) format, which is used to match image type. This variable is important. - -## data - -``` -const uint8_t* OHOS::ImageInfo::data -``` - - **Description:** - -Pixel color data of pixelmap images - -## dataSize - -``` -uint32_t OHOS::ImageInfo::dataSize -``` - - **Description:** - -Size of the image data \(in bytes\) - -## DEFAULT\_BLANK\_SIZE - -``` -constexpr static uint16_t OHOS::UISwipeView::DEFAULT_BLANK_SIZE = 30 -``` - - **Description:** - -Indicates the maximum distance between the first and the last tab when the current view is not in a cycle swipe mode. The page can be rebound after the setting. - -## direct - -``` -[UITextLanguageDirect](Graphic.md#ga0c108f97781843f67c101b47b6c00cf0) OHOS::UICanvas::FontStyle::direct -``` - - **Description:** - -[Text](OHOS-Text.md) direction. For details, see **UITextLanguageDirect**. - -## fillColor - -``` -[ColorType](OHOS-Color32.md) OHOS::UIChartDataSerial::PointStyle::fillColor -``` - - **Description:** - -Fill color - -## fontName - -``` -const char* OHOS::UICanvas::FontStyle::fontName -``` - - **Description:** - -Font name - -## fontSize - -``` -uint8_t OHOS::UICanvas::FontStyle::fontSize -``` - - **Description:** - -Font size - -## full \[1/2\] - -``` -uint16_t OHOS::Color16::full -``` - - **Description:** - -Full RGB data - -## full \[2/2\] - -``` -uint32_t OHOS::Color32::full -``` - - **Description:** - -Full RGB data - -## green \[1/5\] - -``` -uint16_t { ... } ::green -``` - - **Description:** - -Green - -## green \[2/5\] - -``` -uint16_t OHOS::Color16::green -``` - - **Description:** - -Green - -## green \[3/5\] - -``` -uint8_t OHOS::Color24::green -``` - - **Description:** - -Green - -## green \[4/5\] - -``` -uint8_t { ... } ::green -``` - - **Description:** - -Green - -## green \[5/5\] - -``` -uint8_t OHOS::Color32::green -``` - - **Description:** - -Green - -## header - -``` -[ImageHeader](OHOS-ImageHeader.md) OHOS::ImageInfo::header -``` - - **Description:** - -[Image](OHOS-Image.md) head node information. For details, see [ImageHeader](OHOS-ImageHeader.md). - -## height \[1/2\] - -``` -uint16_t OHOS::ImageHeader::height -``` - - **Description:** - -[Image](OHOS-Image.md) height - -## height \[2/2\] - -``` -int16_t OHOS::ImageAnimatorInfo::height -``` - - **Description:** - -[Image](OHOS-Image.md) height - -## HORIZONTAL - -``` -constexpr uint8_t OHOS::UISwipeView::HORIZONTAL = 0 -``` - - **Description:** - -Indicates the horizontal direction. - -## imageInfo - -``` -const char* OHOS::ImageAnimatorInfo::imageInfo -``` - - **Description:** - -[Image](OHOS-Image.md) path or pointer to the [ImageInfo](OHOS-ImageInfo.md) structure - -## inactive - -``` -[Style](OHOS-Style.md) OHOS::ButtonStyle::inactive -``` - - **Description:** - -[Style](OHOS-Style.md) when inactive - -## letterSpace - -``` -int16_t OHOS::UICanvas::FontStyle::letterSpace -``` - - **Description:** - -Letter-spacing - -## MAX\_VERTEX\_NUM - -``` -const uint8_t OHOS::Polygon::MAX_VERTEX_NUM = 8 -``` - - **Description:** - -Maximum number of vertices in a polygon - -## pos - -``` -[Point](OHOS-Point.md) OHOS::ImageAnimatorInfo::pos -``` - - **Description:** - -[Image](OHOS-Image.md) start position, relative to this view - -## pressed - -``` -[Style](OHOS-Style.md) OHOS::ButtonStyle::pressed -``` - - **Description:** - -[Style](OHOS-Style.md) when pressed - -## QUARTER\_IN\_DEGREE - -``` -constexpr uint16_t OHOS::QUARTER_IN_DEGREE = 90 -``` - - **Description:** - -A quarter of a rotation: 90 degrees - -## radius - -``` -uint16_t OHOS::UIChartDataSerial::PointStyle::radius -``` - - **Description:** - -Inner radius - -## red \[1/5\] - -``` -uint16_t { ... } ::red -``` - - **Description:** - -Red - -## red \[2/5\] - -``` -uint16_t OHOS::Color16::red -``` - - **Description:** - -Red - -## red \[3/5\] - -``` -uint8_t OHOS::Color24::red -``` - - **Description:** - -Red - -## red \[4/5\] - -``` -uint8_t OHOS::Color32::red -``` - - **Description:** - -Red - -## red \[5/5\] - -``` -uint8_t { ... } ::red -``` - - **Description:** - -Red - -## released - -``` -[Style](OHOS-Style.md) OHOS::ButtonStyle::released -``` - - **Description:** - -[Style](OHOS-Style.md) when released - -## SEMICIRCLE\_IN\_DEGREE - -``` -constexpr uint16_t OHOS::SEMICIRCLE_IN_DEGREE = 180 -``` - - **Description:** - -A half of a rotation: 180 degrees - -## STOP\_DISTANCE - -``` -constexpr static uint16_t OHOS::UISwipeView::STOP_DISTANCE = 5 -``` - - **Description:** - -Indicates the maximum distance of an invalid dragging. Dragging is not triggered if the distance is less than this value. - -## strokeColor - -``` -[ColorType](OHOS-Color32.md) OHOS::UIChartDataSerial::PointStyle::strokeColor -``` - - **Description:** - -Border color - -## strokeWidth - -``` -uint16_t OHOS::UIChartDataSerial::PointStyle::strokeWidth -``` - - **Description:** - -Border width, which extends outwards from the inner radius - -## TEXT\_ELLIPSIS\_END\_INV - -``` -constexpr uint16_t OHOS::Text::TEXT_ELLIPSIS_END_INV = 0xFFFF -``` - - **Description:** - -Invalid value for the ellipsis position - -## THREE\_QUARTER\_IN\_DEGREE - -``` -constexpr uint16_t OHOS::THREE_QUARTER_IN_DEGREE = 270 -``` - - **Description:** - -Three fourths of a rotation: 270 degrees - -## UI\_PI - -``` -constexpr double OHOS::UI_PI = 3.14159265358979 -``` - - **Description:** - -Pi value - -## userData - -``` -void* OHOS::ImageInfo::userData -``` - - **Description:** - -User-defined data - -## VERTICAL - -``` -constexpr uint8_t OHOS::UISwipeView::VERTICAL = 1 -``` - - **Description:** - -Indicates the vertical direction. - -## width \[1/2\] - -``` -uint16_t OHOS::ImageHeader::width -``` - - **Description:** - -[Image](OHOS-Image.md) width - -## width \[2/2\] - -``` -int16_t OHOS::ImageAnimatorInfo::width -``` - - **Description:** - -[Image](OHOS-Image.md) width - -## x - -``` -int16_t OHOS::Point::x -``` - - **Description:** - -X coordinate - -## y - -``` -int16_t OHOS::Point::y -``` - - **Description:** - -Y coordinate - diff --git a/api/api-SmartVision-Devices/HDI.md b/api/api-SmartVision-Devices/HDI.md deleted file mode 100755 index 311d63934c900c099841d6357483c6c99a1ec0ae..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/HDI.md +++ /dev/null @@ -1,13 +0,0 @@ -# HDI - -- **[Audio](Audio.md)** - -- **[Codec](Codec.md)** - -- **[Display](Display.md)** - -- **[Format](Format.md)** - -- **[Input](Input.md)** - - diff --git a/api/api-SmartVision-Devices/HdfDevEventlistener.md b/api/api-SmartVision-Devices/HdfDevEventlistener.md deleted file mode 100755 index 7332a8738ca930508f6642c832f56e32395fcf6d..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/HdfDevEventlistener.md +++ /dev/null @@ -1,88 +0,0 @@ -# HdfDevEventlistener - -- [Overview](#section1479646434165631) -- [Summary](#section1528394413165631) -- [Data Fields](#pub-attribs) -- [Details](#section1429703049165631) -- [Field](#section1957606536165631) -- [callBack](#ab242c593bb5f92f775087c86b7b6bba4) -- [listNode](#a4cf02802e185796f2d373f7c938f8e24) -- [priv](#a518808817b32cbb1e70a96f7009cbf5f) - -## **Overview** - -**Related Modules:** - -[Core](Core.md) - -**Description:** - -Defines a driver event listener object. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

callBack

-

OnEventReceived

-

listNode

-

struct DListHead

-

priv

-

void *

-
- -## **Details** - -## **Field ** - -## callBack - -``` -[OnEventReceived](Core.md#gae314b850ba4b0927007038cf8cc32580) HdfDevEventlistener::callBack -``` - - **Description:** - -Callback invoked when the monitored device reports an event - -## listNode - -``` -struct [DListHead](DListHead.md) HdfDevEventlistener::listNode -``` - - **Description:** - -Intrusive list node used by the HDF to manage listeners. You can ignore this node. - -## priv - -``` -void* HdfDevEventlistener::priv -``` - - **Description:** - -Private data of the listener, which is passed as the first input parameter in **callback** - diff --git a/api/api-SmartVision-Devices/HdfDeviceIoClient.md b/api/api-SmartVision-Devices/HdfDeviceIoClient.md deleted file mode 100755 index 2a8923744e888ebf07c2b708fa5c4b9274ad3150..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/HdfDeviceIoClient.md +++ /dev/null @@ -1,74 +0,0 @@ -# HdfDeviceIoClient - -- [Overview](#section651574459165631) -- [Summary](#section1237984387165631) -- [Data Fields](#pub-attribs) -- [Details](#section1682215971165631) -- [Field](#section1250885591165631) -- [device](#a49e622cbc385f17b3800580157558031) -- [priv](#aef6d8dd955ee8305554d89d1c64486c7) - -## **Overview** - -**Related Modules:** - -[Core](Core.md) - -**Description:** - -Defines the client object structure of the I/O service. - -This structure describes the invoker information of the I/O servcie. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

device

-

struct HdfDeviceObject *

-

priv

-

void *

-
- -## **Details** - -## **Field ** - -## device - -``` -struct [HdfDeviceObject](HdfDeviceObject.md)* HdfDeviceIoClient::device -``` - - **Description:** - -Device object corresponding to the client object - -## priv - -``` -void* HdfDeviceIoClient::priv -``` - - **Description:** - -Private data of the client object. The driver can use **priv** to bind the internal data with the client. - diff --git a/api/api-SmartVision-Devices/HdfDeviceObject.md b/api/api-SmartVision-Devices/HdfDeviceObject.md deleted file mode 100755 index 75787a32ea39489209445c943847c01242574572..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/HdfDeviceObject.md +++ /dev/null @@ -1,74 +0,0 @@ -# HdfDeviceObject - -- [Overview](#section1715265701165631) -- [Summary](#section1845297948165631) -- [Data Fields](#pub-attribs) -- [Details](#section469785400165631) -- [Field](#section1570096397165631) -- [property](#aff597a0d23dbf2c6581a4ea6f261e953) -- [service](#a4a56df841dab2ca990594daea3ad0107) - -## **Overview** - -**Related Modules:** - -[Core](Core.md) - -**Description:** - -Defines the device object. - -This structure is a device object defined by the HDF and is used to store private data and interface information of a device. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

service

-

struct IDeviceIoService *

-

property

-

const struct DeviceResourceNode *

-
- -## **Details** - -## **Field ** - -## property - -``` -const struct [DeviceResourceNode](DeviceResourceNode.md)* HdfDeviceObject::property -``` - - **Description:** - -Pointer to the private data of the device, which is read by the HDF from the configuration file and transmitted to the driver. - -## service - -``` -struct [IDeviceIoService](IDeviceIoService.md)* HdfDeviceObject::service -``` - - **Description:** - -Pointer to the service interface object, which is registered with the HDF by the driver - diff --git a/api/api-SmartVision-Devices/HdfDriverEntry.md b/api/api-SmartVision-Devices/HdfDriverEntry.md deleted file mode 100755 index c1be3d678eecea4513fbdfe0a65d3b6d9787867a..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/HdfDriverEntry.md +++ /dev/null @@ -1,178 +0,0 @@ -# HdfDriverEntry - -- [Overview](#section1763684766165631) -- [Summary](#section1310304761165631) -- [Data Fields](#pub-attribs) -- [Details](#section1675080252165631) -- [Field](#section1229555281165631) -- [Bind](#a9e26ffb43d0d3ab221aad844cd172582) -- [Init](#a1009f6ddf7188c63ed4b66597edbc446) -- [moduleName](#af889c158a46b9805a96bd2281c024191) -- [moduleVersion](#a3c5f146bd9494eb0f052454157e2b4b0) -- [Release](#a5ff4bb43cf9d0a89ebf17876adbbff50) - -## **Overview** - -**Related Modules:** - -[Core](Core.md) - -**Description:** - -Defines the entry structure of the driver in the HDF. - -This structure must be used as the entry for the driver to use the HDF mechanism. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

moduleVersion

-

int32_t

-

moduleName

-

const char *

-

Bind )(struct HdfDeviceObject *deviceObject)

-

int32_t(*

-

Binds the external service interface of a driver to the HDF. This function is implemented by the driver developer and called by the HDF.

-

Init )(struct HdfDeviceObject *deviceObject)

-

int32_t(*

-

Initializes the driver. This function is implemented by the driver developer and called by the HDF.

-

Release )(struct HdfDeviceObject *deviceObject)

-

void(*

-

Releases driver resources. This function is implemented by the driver developer. When an exception occurs during driver loading or the driver is uninstalled, the HDF calls this function to release the driver resources.

-
- -## **Details** - -## **Field ** - -## Bind - -``` -int32_t(* HdfDriverEntry::Bind) (struct [HdfDeviceObject](HdfDeviceObject.md) *deviceObject) -``` - - **Description:** - -Binds the external service interface of a driver to the HDF. This function is implemented by the driver developer and called by the HDF. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
deviceObjectIndicates the pointer to the variable of the HdfDeviceObject type. This variable is generated by the HDF and passed to the driver. Then, the service object of the driver is bound to the service parameter of deviceObject.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## Init - -``` -int32_t(* HdfDriverEntry::Init) (struct [HdfDeviceObject](HdfDeviceObject.md) *deviceObject) -``` - - **Description:** - -Initializes the driver. This function is implemented by the driver developer and called by the HDF. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
deviceObjectIndicates the pointer to the variable of the HdfDeviceObject type. It is the same as the parameter of Bind.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## moduleName - -``` -const char* HdfDriverEntry::moduleName -``` - - **Description:** - -Driver module name, which is used to match the driver information in the configuration file. - -## moduleVersion - -``` -int32_t HdfDriverEntry::moduleVersion -``` - - **Description:** - -Driver version - -## Release - -``` -void(* HdfDriverEntry::Release) (struct [HdfDeviceObject](HdfDeviceObject.md) *deviceObject) -``` - - **Description:** - -Releases driver resources. This function is implemented by the driver developer. When an exception occurs during driver loading or the driver is uninstalled, the HDF calls this function to release the driver resources. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
deviceObjectIndicates the pointer to the variable of the HdfDeviceObject type. It is the same as the parameter of Bind.
- diff --git a/api/api-SmartVision-Devices/HdfIoDispatcher.md b/api/api-SmartVision-Devices/HdfIoDispatcher.md deleted file mode 100755 index 7a05136819f1a65fb6c5b9c2a24339f19c0a0d47..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/HdfIoDispatcher.md +++ /dev/null @@ -1,56 +0,0 @@ -# HdfIoDispatcher - -- [Overview](#section513341924165631) -- [Summary](#section1483060063165631) -- [Data Fields](#pub-attribs) -- [Details](#section1004134595165631) -- [Field](#section1815270027165631) -- [Dispatch](#ab87eb61c3bea95bc41c9e8dcc6e2f865) - -## **Overview** - -**Related Modules:** - -[Core](Core.md) - -**Description:** - -Defines a driver service call dispatcher. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - -

Variable Name

-

Description

-

Dispatch )(struct HdfObject *service, int cmdId, struct HdfSBuf *data, struct HdfSBuf *reply)

-

int(*

-
- -## **Details** - -## **Field ** - -## Dispatch - -``` -int(* HdfIoDispatcher::Dispatch) (struct [HdfObject](HdfObject.md) *service, int cmdId, struct [HdfSBuf](HdfSBuf.md) *data, struct [HdfSBuf](HdfSBuf.md) *reply) -``` - - **Description:** - -Dispatches a driver service call. **service** indicates the pointer to the driver service object, **id** indicates the command word of the function, **data** indicates the pointer to the data you want to pass to the driver, and **reply** indicates the pointer to the data returned by the driver. - diff --git a/api/api-SmartVision-Devices/HdfIoService.md b/api/api-SmartVision-Devices/HdfIoService.md deleted file mode 100755 index dd1a4b441ea1a76a5332bebf8a725d3f35032d4f..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/HdfIoService.md +++ /dev/null @@ -1,88 +0,0 @@ -# HdfIoService - -- [Overview](#section1204021025165631) -- [Summary](#section710048610165631) -- [Data Fields](#pub-attribs) -- [Details](#section1793033829165631) -- [Field](#section1999984985165631) -- [dispatcher](#a3da28f5ff9b7805e136081bb65952761) -- [object](#a6ad278c554dab0fa5b2269e3cae22cab) -- [target](#a4b30a5c89ee7213eb1f74898e2ad605c) - -## **Overview** - -**Related Modules:** - -[Core](Core.md) - -**Description:** - -Defines a driver service object. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

object

-

struct HdfObject

-

target

-

struct HdfObject *

-

dispatcher

-

struct HdfIoDispatcher *

-
- -## **Details** - -## **Field ** - -## dispatcher - -``` -struct [HdfIoDispatcher](HdfIoDispatcher.md)* HdfIoService::dispatcher -``` - - **Description:** - -[Service](Service.md) call dispatcher - -## object - -``` -struct [HdfObject](HdfObject.md) HdfIoService::object -``` - - **Description:** - -Base class object - -## target - -``` -struct [HdfObject](HdfObject.md)* HdfIoService::target -``` - - **Description:** - -Pointer to the bound service entity, which is used for framework management. You can ignore it. - diff --git a/api/api-SmartVision-Devices/HdfObject.md b/api/api-SmartVision-Devices/HdfObject.md deleted file mode 100755 index 5647e7d696db1938a8a2dd95447e984bddeffa66..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/HdfObject.md +++ /dev/null @@ -1,56 +0,0 @@ -# HdfObject - -- [Overview](#section12593094165631) -- [Summary](#section203331448165631) -- [Data Fields](#pub-attribs) -- [Details](#section667957429165631) -- [Field](#section1025924736165631) -- [objectId](#a8618faeb67f830c63ac42828e232c544) - -## **Overview** - -**Related Modules:** - -[Core](Core.md) - -**Description:** - -Describes base class objects defined by the HDF. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - -

Variable Name

-

Description

-

objectId

-

int32_t

-
- -## **Details** - -## **Field ** - -## objectId - -``` -int32_t HdfObject::objectId -``` - - **Description:** - -Base object ID - diff --git a/api/api-SmartVision-Devices/HdfSBuf.md b/api/api-SmartVision-Devices/HdfSBuf.md deleted file mode 100755 index b37fa40fe06877360e6787c7faaa317511b3a6c6..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/HdfSBuf.md +++ /dev/null @@ -1,120 +0,0 @@ -# HdfSBuf - -- [Overview](#section1430273793165631) -- [Summary](#section301392379165631) -- [Data Fields](#pub-attribs) -- [Details](#section566322632165631) -- [Field](#section1299622958165631) -- [capacity](#a4b8ee04fe9c107abec005bc3828a135d) -- [data](#a72274990ce3144c476b74734413d8564) -- [isBind](#a3c130cb993cd738efaf14c3f45d085b2) -- [readPos](#a34756aefb83171abc63d0b5684597542) -- [writePos](#a0de2284b2d9921bdd47e598e0b71a440) - -## **Overview** - -**Related Modules:** - -[Core](Core.md) - -**Description:** - -Defines a **[HdfSBuf](HdfSBuf.md)**. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

writePos

-

size_t

-

readPos

-

size_t

-

capacity

-

size_t

-

data

-

uint8_t *

-

isBind

-

bool

-
- -## **Details** - -## **Field ** - -## capacity - -``` -size_t HdfSBuf::capacity -``` - - **Description:** - -Storage capacity, at most 512 KB. - -## data - -``` -uint8_t* HdfSBuf::data -``` - - **Description:** - -Pointer to data storage - -## isBind - -``` -bool HdfSBuf::isBind -``` - - **Description:** - -Whether to bind the externally transferred pointer for data storage - -## readPos - -``` -size_t HdfSBuf::readPos -``` - - **Description:** - -Current read position - -## writePos - -``` -size_t HdfSBuf::writePos -``` - - **Description:** - -Current write position - diff --git a/api/api-SmartVision-Devices/HdfWifiChipData.md b/api/api-SmartVision-Devices/HdfWifiChipData.md deleted file mode 100755 index d51fb98825e3a31f186f48d935fbdaca1889793b..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/HdfWifiChipData.md +++ /dev/null @@ -1,59 +0,0 @@ -# HdfWifiChipData - -- [Overview](#section964646321165631) -- [Summary](#section150586580165631) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Defines a WLAN chip. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

type

-

uint16_t

-

name [MAX_WIFI_COMPONENT_NAME_LEN]

-

char

-

ops

-

struct WifiMac80211Ops *

-

init )(struct HdfWifiChipData *chipData, const struct HdfConfigWifiChip *chipConfig)

-

int32_t(*

-

deinit )(struct HdfWifiChipData *chipData)

-

int32_t(*

-
- diff --git a/api/api-SmartVision-Devices/HdfWifiProductData.md b/api/api-SmartVision-Devices/HdfWifiProductData.md deleted file mode 100755 index 8a47e71f524c5d7655d000029daf7087e0579cd9..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/HdfWifiProductData.md +++ /dev/null @@ -1,54 +0,0 @@ -# HdfWifiProductData - -- [Overview](#section1804295604165631) -- [Summary](#section737505320165631) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Defines the WLAN module. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

product_name [MAX_WIFI_COMPONENT_NAME_LEN]

-

char

-

state

-

char

-

module

-

struct WifiModule *

-

device

-

struct HdfDeviceObject *

-
- diff --git a/api/api-SmartVision-Devices/HdfWork.md b/api/api-SmartVision-Devices/HdfWork.md deleted file mode 100755 index 05283e4bd48b2e448ec70473322b687f98559d88..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/HdfWork.md +++ /dev/null @@ -1,52 +0,0 @@ -# HdfWork - -- [Overview](#section351142809165631) -- [Summary](#section2043918552165631) -- [Data Fields](#pub-attribs) -- [Details](#section1104441243165631) -- [Field](#section659285226165631) -- [realWork](#a8830d89e775646b48db0beae2af4b561) - -## **Overview** - -**Related Modules:** - -[DriverUtils](DriverUtils.md) - -**Description:** - -Describes a work item and a delayed work item. This structure defines the work and delayed work items, and then calls the initialization function [HdfWorkInit](DriverUtils.md#gad171adc8eda320fd01049a2b87ea62fb) or [HdfDelayedWorkInit](DriverUtils.md#ga55bf669dc6740c65e4d45a4f641db2f1) to perform initialization. The **[HdfAddWork\(\)](DriverUtils.md#ga82cc68d656aa17317634b07d49dae160)** function is to add a work item to a work queue immediately, and the **[HdfAddDelayedWork\(\)](DriverUtils.md#gaef781ccc1579db3070745088da47b2c5)** function is to add a work item to a work queue after the configured delayed time. - -## **Summary** - -## Data Fields - - - - - - - - - - -

Variable Name

-

Description

-

realWork

-

void *

-
- -## **Details** - -## **Field ** - -## realWork - -``` -void* HdfWork::realWork -``` - - **Description:** - -Pointer to a work item and a delayed work item - diff --git a/api/api-SmartVision-Devices/HdfWorkQueue.md b/api/api-SmartVision-Devices/HdfWorkQueue.md deleted file mode 100755 index ae11fc16249e1c03a1243d2ea0cafa6ee5ca6f32..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/HdfWorkQueue.md +++ /dev/null @@ -1,52 +0,0 @@ -# HdfWorkQueue - -- [Overview](#section1305645915165631) -- [Summary](#section1107705898165631) -- [Data Fields](#pub-attribs) -- [Details](#section672663816165631) -- [Field](#section1987442063165631) -- [realWorkQueue](#adb240b1f3c419e4b3fc6a7a772216cde) - -## **Overview** - -**Related Modules:** - -[DriverUtils](DriverUtils.md) - -**Description:** - -Describes a work queue. - -## **Summary** - -## Data Fields - - - - - - - - - - -

Variable Name

-

Description

-

realWorkQueue

-

void *

-
- -## **Details** - -## **Field ** - -## realWorkQueue - -``` -void* HdfWorkQueue::realWorkQueue -``` - - **Description:** - -Pointer to a work queue - diff --git a/api/api-SmartVision-Devices/HiLog.md b/api/api-SmartVision-Devices/HiLog.md deleted file mode 100755 index 4b5187d49628c520e57f893c446e1653f3c55cba..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/HiLog.md +++ /dev/null @@ -1,512 +0,0 @@ -# HiLog - -- [Overview](#section662654821165625) -- [Summary](#section1225783138165625) -- [Macros](#define-members) -- [Enumerations](#enum-members) -- [Functions](#func-members) -- [Details](#section1302429224165625) -- [Macro Definition](#section517686992165625) -- [HILOG\_DEBUG](#ga131e23e4dd8a01f7871851ac23ce3cfc) -- [HILOG\_ERROR](#ga90b1019911094577057834ab3208e454) -- [HILOG\_FATAL](#gac76a098606b7f1e2f73b14158abe0b25) -- [HILOG\_INFO](#ga54d6ebdb0a272e51e3dc2e5cc9775677) -- [HILOG\_WARN](#gab6e05f702fa067419ab6d2b241f70d96) -- [LOG\_DOMAIN](#ga95a1d08c807e0aada863b5298a61d08d) -- [LOG\_TAG](#ga7ce0df38eb467e59f209470c8f5ac4e6) -- [Enumeration Type](#section1363762227165625) -- [HiLogModuleType](#ga125ab0014dcc2b2152e0be2e39e31b9e) -- [LogLevel](#gaca1fd1d8935433e6ba2e3918214e07f9) -- [LogType](#gaf67907baa897e9fb84df0cb89795b87c) -- [Function](#section2032748084165625) -- [HiLogPrint\(\)](#ga09fb4cb8cda1a4353752964b3ac02c7b) - -## **Overview** - -**Description:** - -Provides logging functions. - -For example, you can use these functions to output logs of the specified log type, service domain, log tag, and log level. - -**Since:** - -1.1 - -**Version:** - -1.0 - -## **Summary** - -## Macros - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

LOG_DOMAIN 0

-

Defines the service domain for a log file.

-

LOG_TAG NULL

-

Defines a string constant used to identify the class, file, or service behavior.

-

HILOG_DEBUG(type, ...) ((void)HiLogPrint(LOG_CORE, LOG_DEBUG, LOG_DOMAIN, LOG_TAG, __VA_ARGS__))

-

Outputs debug logs. This is a function-like macro.

-

HILOG_INFO(type, ...) ((void)HiLogPrint(LOG_CORE, LOG_INFO, LOG_DOMAIN, LOG_TAG, __VA_ARGS__))

-

Outputs informational logs. This is a function-like macro.

-

HILOG_WARN(type, ...) ((void)HiLogPrint(LOG_CORE, LOG_WARN, LOG_DOMAIN, LOG_TAG, __VA_ARGS__))

-

Outputs warning logs. This is a function-like macro.

-

HILOG_ERROR(type, ...) ((void)HiLogPrint(LOG_CORE, LOG_ERROR, LOG_DOMAIN, LOG_TAG, __VA_ARGS__))

-

Outputs error logs. This is a function-like macro.

-

HILOG_FATAL(type, ...) ((void)HiLogPrint(LOG_CORE, LOG_FATAL, LOG_DOMAIN, LOG_TAG, __VA_ARGS__))

-

Outputs fatal logs. This is a function-like macro.

-
- -## Enumerations - - - - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

HiLogModuleType { HILOG_MODULE_HIVIEW = 0, HILOG_MODULE_SAMGR, HILOG_MODULE_ACE, HILOG_MODULE_APP, HILOG_MODULE_MAX }

-

Enumerates logging module types.

-

LogType

-

Enumerates log types.

-

LogLevel { LOG_DEBUG = 3, LOG_INFO = 4, LOG_WARN = 5, LOG_ERROR = 6, LOG_FATAL = 7 }

-

Enumerates log levels.

-
- -## Functions - - - - - - - - - - -

Function

-

Description

-

HiLogPrint (LogType type, LogLevel level, unsigned int domain, const char *tag, const char *fmt,...) __attribute__((format(printf

-

int

-

Outputs logs.

-
- -## **Details** - -## **Macro Definition ** - -## HILOG\_DEBUG - -``` -#define HILOG_DEBUG( type, ... ) ((void)[HiLogPrint](HiLog.md#ga09fb4cb8cda1a4353752964b3ac02c7b)(LOG_CORE, [LOG_DEBUG](HiLog.md#ggaca1fd1d8935433e6ba2e3918214e07f9ab9f002c6ffbfd511da8090213227454e), [LOG_DOMAIN](HiLog.md#ga95a1d08c807e0aada863b5298a61d08d), [LOG_TAG](HiLog.md#ga7ce0df38eb467e59f209470c8f5ac4e6), __VA_ARGS__)) -``` - - **Description:** - -Outputs debug logs. This is a function-like macro. - -Before calling this function, define the log service domain and log tag. Generally, you need to define them at the beginning of the source file. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
typeIndicates the log type. The type for third-party applications is defined by LOG_APP.
fmtIndicates the format string, which is an enhancement of a printf format string and supports the privacy identifier. Specifically, {public} or {private} is added between the % character and the format specifier in each parameter.
...Indicates a list of parameters. The number and type of parameters must map onto the format specifiers in the format string.
- -**Returns:** - -Returns **0** or a larger value if the operation is successful; returns a value smaller than **0** otherwise. - -**See also:** - -[HiLogPrint](HiLog.md#ga09fb4cb8cda1a4353752964b3ac02c7b) - -## HILOG\_ERROR - -``` -#define HILOG_ERROR( type, ... ) ((void)[HiLogPrint](HiLog.md#ga09fb4cb8cda1a4353752964b3ac02c7b)(LOG_CORE, [LOG_ERROR](HiLog.md#ggaca1fd1d8935433e6ba2e3918214e07f9a230506cce5c68c3bac5a821c42ed3473), [LOG_DOMAIN](HiLog.md#ga95a1d08c807e0aada863b5298a61d08d), [LOG_TAG](HiLog.md#ga7ce0df38eb467e59f209470c8f5ac4e6), __VA_ARGS__)) -``` - - **Description:** - -Outputs error logs. This is a function-like macro. - -Before calling this function, define the log service domain and log tag. Generally, you need to define them at the beginning of the source file. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
typeIndicates the log type. The type for third-party applications is defined by LOG_APP.
fmtIndicates the format string, which is an enhancement of a printf format string and supports the privacy identifier. Specifically, {public} or {private} is added between the % character and the format specifier in each parameter.
...Indicates a list of parameters. The number and type of parameters must map onto the format specifiers in the format string.
- -**Returns:** - -Returns **0** or a larger value if the operation is successful; returns a value smaller than **0** otherwise. - -**See also:** - -[HiLogPrint](HiLog.md#ga09fb4cb8cda1a4353752964b3ac02c7b) - -## HILOG\_FATAL - -``` -#define HILOG_FATAL( type, ... ) ((void)[HiLogPrint](HiLog.md#ga09fb4cb8cda1a4353752964b3ac02c7b)(LOG_CORE, [LOG_FATAL](HiLog.md#ggaca1fd1d8935433e6ba2e3918214e07f9ac630750884d91cb9767ef2200bbb048b), [LOG_DOMAIN](HiLog.md#ga95a1d08c807e0aada863b5298a61d08d), [LOG_TAG](HiLog.md#ga7ce0df38eb467e59f209470c8f5ac4e6), __VA_ARGS__)) -``` - - **Description:** - -Outputs fatal logs. This is a function-like macro. - -Before calling this function, define the log service domain and log tag. Generally, you need to define them at the beginning of the source file. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
typeIndicates the log type. The type for third-party applications is defined by LOG_APP.
fmtIndicates the format string, which is an enhancement of a printf format string and supports the privacy identifier. Specifically, {public} or {private} is added between the % character and the format specifier in each parameter.
...Indicates a list of parameters. The number and type of parameters must map onto the format specifiers in the format string.
- -**Returns:** - -Returns **0** or a larger value if the operation is successful; returns a value smaller than **0** otherwise. - -**See also:** - -[HiLogPrint](HiLog.md#ga09fb4cb8cda1a4353752964b3ac02c7b) - -## HILOG\_INFO - -``` -#define HILOG_INFO( type, ... ) ((void)[HiLogPrint](HiLog.md#ga09fb4cb8cda1a4353752964b3ac02c7b)(LOG_CORE, [LOG_INFO](HiLog.md#ggaca1fd1d8935433e6ba2e3918214e07f9a6e98ff471e3ce6c4ef2d75c37ee51837), [LOG_DOMAIN](HiLog.md#ga95a1d08c807e0aada863b5298a61d08d), [LOG_TAG](HiLog.md#ga7ce0df38eb467e59f209470c8f5ac4e6), __VA_ARGS__)) -``` - - **Description:** - -Outputs informational logs. This is a function-like macro. - -Before calling this function, define the log service domain and log tag. Generally, you need to define them at the beginning of the source file. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
typeIndicates the log type. The type for third-party applications is defined by LOG_APP.
fmtIndicates the format string, which is an enhancement of a printf format string and supports the privacy identifier. Specifically, {public} or {private} is added between the % character and the format specifier in each parameter.
...Indicates a list of parameters. The number and type of parameters must map onto the format specifiers in the format string.
- -**Returns:** - -Returns **0** or a larger value if the operation is successful; returns a value smaller than **0** otherwise. - -**See also:** - -[HiLogPrint](HiLog.md#ga09fb4cb8cda1a4353752964b3ac02c7b) - -## HILOG\_WARN - -``` -#define HILOG_WARN( type, ... ) ((void)[HiLogPrint](HiLog.md#ga09fb4cb8cda1a4353752964b3ac02c7b)(LOG_CORE, [LOG_WARN](HiLog.md#ggaca1fd1d8935433e6ba2e3918214e07f9ac8041ffa22bc823d4726701cdb13fc13), [LOG_DOMAIN](HiLog.md#ga95a1d08c807e0aada863b5298a61d08d), [LOG_TAG](HiLog.md#ga7ce0df38eb467e59f209470c8f5ac4e6), __VA_ARGS__)) -``` - - **Description:** - -Outputs warning logs. This is a function-like macro. - -Before calling this function, define the log service domain and log tag. Generally, you need to define them at the beginning of the source file. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
typeIndicates the log type. The type for third-party applications is defined by LOG_APP.
fmtIndicates the format string, which is an enhancement of a printf format string and supports the privacy identifier. Specifically, {public} or {private} is added between the % character and the format specifier in each parameter.
...Indicates a list of parameters. The number and type of parameters must map onto the format specifiers in the format string.
- -**Returns:** - -Returns **0** or a larger value if the operation is successful; returns a value smaller than **0** otherwise. - -**See also:** - -[HiLogPrint](HiLog.md#ga09fb4cb8cda1a4353752964b3ac02c7b) - -## LOG\_DOMAIN - -``` -#define LOG_DOMAIN 0 -``` - - **Description:** - -Defines the service domain for a log file. - -The service domain is used to identify the subsystem and module of a service. Its value is a hexadecimal integer ranging from 0x0 to 0xFFFFF. If the value is beyond the range, its significant bits are automatically truncated. The recommended format is 0xAAABB, where AAA indicates the subsystem and BB indicates the module. - -## LOG\_TAG - -``` -#define LOG_TAG [NULL](UTILS.md#ga070d2ce7b6bb7e5c05602aa8c308d0c4) -``` - - **Description:** - -Defines a string constant used to identify the class, file, or service behavior. - -## **Enumeration Type ** - -## HiLogModuleType - -``` -enum [HiLogModuleType](HiLog.md#ga125ab0014dcc2b2152e0be2e39e31b9e) -``` - - **Description:** - -Enumerates logging module types. - -The module type must be globally unique. A maximum of 64 module types can be defined. - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
HILOG_MODULE_HIVIEW

DFX

-
HILOG_MODULE_SAMGR

System Ability Manager

-
HILOG_MODULE_ACE

Update

-
HILOG_MODULE_APP

Third-party applications

-
HILOG_MODULE_MAX

Maximum number of modules

-
- -## LogLevel - -``` -enum [LogLevel](HiLog.md#gaca1fd1d8935433e6ba2e3918214e07f9) -``` - - **Description:** - -Enumerates log levels. - -You are advised to select log levels based on their respective usage scenarios: - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
LOG_DEBUG

Debug level to be used by HILOG_DEBUG

-
LOG_INFO

Informational level to be used by HILOG_INFO

-
LOG_WARN

Warning level to be used by HILOG_WARN

-
LOG_ERROR

Error level to be used by HILOG_ERROR

-
LOG_FATAL

Fatal level to be used by HILOG_FATAL

-
- -## LogType - -``` -enum [LogType](HiLog.md#gaf67907baa897e9fb84df0cb89795b87c) -``` - - **Description:** - -Enumerates log types. - -Currently, **LOG\_APP** is available. - -## **Function ** - -## HiLogPrint\(\) - -``` -int HiLogPrint ([LogType](HiLog.md#gaf67907baa897e9fb84df0cb89795b87c) type, [LogLevel](HiLog.md#gaca1fd1d8935433e6ba2e3918214e07f9) level, unsigned int domain, const char * tag, const char * fmt, ... ) -``` - - **Description:** - -Outputs logs. - -You can use this function to output logs based on the specified log type, log level, service domain, log tag, and variable parameters determined by the format specifier and privacy identifier in the printf format. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
typeIndicates the log type. The type for third-party applications is defined by LOG_APP.
levelIndicates the log level, which can be LOG_DEBUG, LOG_INFO, LOG_WARN, LOG_ERROR, and LOG_FATAL.
domainIndicates the service domain of logs. Its value is a hexadecimal integer ranging from 0x0 to 0xFFFFF. The recommended format is 0xAAABB, where AAA indicates the subsystem and BB indicates the module.
tagIndicates the log tag, which is a string used to identify the class, file, or service behavior.
fmtIndicates the format string, which is an enhancement of a printf format string and supports the privacy identifier. Specifically, {public} or {private} is added between the % character and the format specifier in each parameter.
...Indicates a list of parameters. The number and type of parameters must map onto the format specifiers in the format string.
- -**Returns:** - -Returns **0** or a larger value if the operation is successful; returns a value smaller than **0** otherwise. - diff --git a/api/api-SmartVision-Devices/I2C.md b/api/api-SmartVision-Devices/I2C.md deleted file mode 100755 index 0674c113c7c73e4ce2d0bb6c6f7258703ed35bba..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/I2C.md +++ /dev/null @@ -1,264 +0,0 @@ -# I2C - -- [Overview](#section1269538504165623) -- [Summary](#section1310832739165623) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Enumerations](#enum-members) -- [Functions](#func-members) -- [Details](#section1093936068165623) -- [Enumeration Type](#section716022081165623) -- [I2cFlag](#ga32b58f021632085445d80c80e382a546) -- [Function](#section1683434957165623) -- [I2cClose\(\)](#ga3ca9d500e6fb6592a04f7dc33806c13e) -- [I2cOpen\(\)](#ga564086bbb2121cd6771c66c886da11b5) -- [I2cTransfer\(\)](#ga2395dc94da99c2b990096c659fcefc72) - -## **Overview** - -**Description:** - -Provides standard Inter-Integrated Circuit \(I2C\) interfaces. - -This module allows a driver to perform operations on an I2C controller for accessing devices on the I2C bus, including creating and destroying I2C controller handles as well as reading and writing data. - -**Since:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - -

File Name

-

Description

-

i2c_if.h

-

Declares the standard I2C interface functions.

-
- -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

I2cMsg

-

Defines the I2C transfer message used during custom transfers.

-
- -## Enumerations - - - - - - - - - - -

Enumeration Name

-

Description

-

I2cFlag { I2C_FLAG_READ = (0x1 << 0), I2C_FLAG_ADDR_10BIT = (0x1 << 4), I2C_FLAG_READ_NO_ACK = (0x1 << 11), I2C_FLAG_IGNORE_NO_ACK = (0x1 << 12), I2C_FLAG_NO_START = (0x1 << 14), I2C_FLAG_STOP = (0x1 << 15) }

-

Enumerates flags used for transferring I2C messages.

-
- -## Functions - - - - - - - - - - - - - - - - -

Function

-

Description

-

I2cOpen (int16_t number)

-

DevHandle

-

Obtains the handle of an I2C controller.

-

I2cClose (DevHandle handle)

-

void

-

Releases the handle of an I2C controller.

-

I2cTransfer (DevHandle handle, struct I2cMsg *msgs, int16_t count)

-

int32_t

-

Launches a custom transfer to an I2C device.

-
- -## **Details** - -## **Enumeration Type ** - -## I2cFlag - -``` -enum [I2cFlag](I2C.md#ga32b58f021632085445d80c80e382a546) -``` - - **Description:** - -Enumerates flags used for transferring I2C messages. - -Multiple flags can be used to jointly control a single I2C message transfer. If a bit is set to **1**, the corresponding feature is enabled. If a bit is set to **0**, the corresponding feature is disabled. - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
I2C_FLAG_READ

Read flag. The value 1 indicates the read operation, and 0 indicates the write operation.

-
I2C_FLAG_ADDR_10BIT

10-bit addressing flag. The value 1 indicates that a 10-bit address is used.

-
I2C_FLAG_READ_NO_ACK

Non-ACK read flag. The value 1 indicates that no ACK signal is sent during the read process.

-
I2C_FLAG_IGNORE_NO_ACK

Ignoring no-ACK flag. The value 1 indicates that the non-ACK signal is ignored.

-
I2C_FLAG_NO_START

No START condition flag. The value 1 indicates that there is no START condition for the message transfer.

-
I2C_FLAG_STOP

STOP condition flag. The value 1 indicates that the current transfer ends with a STOP condition.

-
- -## **Function ** - -## I2cClose\(\) - -``` -void I2cClose ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle) -``` - - **Description:** - -Releases the handle of an I2C controller. - -If you no longer need to access the I2C controller, you should call this function to close its handle so as to release unused memory resources. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the device handle of the I2C controller.
- -## I2cOpen\(\) - -``` -[DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) I2cOpen (int16_t number) -``` - - **Description:** - -Obtains the handle of an I2C controller. - -You must call this function before accessing the I2C bus. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
numberIndicates the I2C controller ID.
- -**Returns:** - -Returns the pointer to the [DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) of the I2C controller if the operation is successful; returns **NULL** otherwise. - -## I2cTransfer\(\) - -``` -int32_t I2cTransfer ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle, struct [I2cMsg](I2cMsg.md) * msgs, int16_t count ) -``` - - **Description:** - -Launches a custom transfer to an I2C device. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the device handle of the I2C controller obtained via I2cOpen.
msgsIndicates the pointer to the I2C transfer message structure array.
countIndicates the length of the message structure array.
- -**Returns:** - -Returns the number of transferred message structures if the operation is successful; returns a negative value otherwise. - -**See also:** - -[I2cMsg](I2cMsg.md) - -**Attention:** - -This function does not limit the number of message structures specified by **count** or the data length of each message structure. The specific I2C controller determines the maximum number and data length allowed. - diff --git a/api/api-SmartVision-Devices/I2cMsg.md b/api/api-SmartVision-Devices/I2cMsg.md deleted file mode 100755 index 85311f5fc0e1a6fba6025dd5505a7c0c0c1cbe47..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/I2cMsg.md +++ /dev/null @@ -1,103 +0,0 @@ -# I2cMsg - -- [Overview](#section1938170583165632) -- [Summary](#section208689179165632) -- [Data Fields](#pub-attribs) -- [Details](#section1058882627165632) -- [Field](#section1489406453165632) -- [addr](#a8f9fae2a615957552b2c409b868e91cd) -- [buf](#a7b32a5e6322edb302cea3faf698953a0) -- [flags](#adfecd4720506fef0a87d0abd45d1f201) -- [len](#aa3951709930c577af6f5ee4cf53b6dad) - -## **Overview** - -**Related Modules:** - -[I2C](I2C.md) - -**Description:** - -Defines the I2C transfer message used during custom transfers. - -Attention -: This structure does not limit the data transfer length specified by **len**. The specific I2C controller determines the maximum length allowed. The device address **addr** indicates the original device address and does not need to contain the read/write flag bit. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

addr

-

uint16_t

-

buf

-

uint8_t *

-

len

-

uint16_t

-

flags

-

uint16_t

-
- -## **Details** - -## **Field ** - -## addr - -``` -uint16_t I2cMsg::addr -``` - - **Description:** - -Address of the I2C device - -## buf - -``` -uint8_t* I2cMsg::buf -``` - - **Description:** - -Address of the buffer for storing transferred data - -## flags - -``` -uint16_t I2cMsg::flags -``` - -## len - -``` -uint16_t I2cMsg::len -``` - - **Description:** - -Length of the transferred data - diff --git a/api/api-SmartVision-Devices/IAbilityConnection.md b/api/api-SmartVision-Devices/IAbilityConnection.md deleted file mode 100755 index fe89d6dfdb1f2cd9e5961aad6aef8370b4b3c86b..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/IAbilityConnection.md +++ /dev/null @@ -1,42 +0,0 @@ -# IAbilityConnection - -- [Overview](#section1831135900165631) -- [Summary](#section1540980390165631) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[AbilityKit](AbilityKit.md) - -**Description:** - -Provides callbacks to be invoked when a remote [Service](Service.md) ability is connected or disconnected. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

OnAbilityConnectDone )(ElementName *elementName, SvcIdentity *serviceSid, int resultCode, void *data)

-

void(*

-

Called when a client is connected to a Service ability.

-

OnAbilityDisconnectDone )(ElementName *elementName, int resultCode, void *data)

-

void(*

-

Called after all connections to a Service ability are disconnected.

-
- diff --git a/api/api-SmartVision-Devices/ICircle.md b/api/api-SmartVision-Devices/ICircle.md deleted file mode 100755 index c2801fb714f243b9c47ac68b52eee196dbaf1019..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/ICircle.md +++ /dev/null @@ -1,100 +0,0 @@ -# ICircle - -- [Overview](#section1690795786165631) -- [Summary](#section1228246630165631) -- [Data Fields](#pub-attribs) -- [Details](#section649767776165631) -- [Field](#section1587824593165631) -- [color](#adf0626c2027cdd81bc4e3680630dd49c) -- [r](#a25ffd25c03f85274ab2323102256a40d) -- [x](#a37901e5d46caa56049a68efa4347bc99) -- [y](#a197a46c89668be9eda85f308ac2f266b) - -## **Overview** - -**Related Modules:** - -[Display](Display.md) - -**Description:** - -Describes a circle to help draw circles in hardware acceleration. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

x

-

int32_t

-

y

-

int32_t

-

r

-

int32_t

-

color

-

uint32_t

-
- -## **Details** - -## **Field ** - -## color - -``` -uint32_t ICircle::color -``` - - **Description:** - -Circle color - -## r - -``` -int32_t ICircle::r -``` - - **Description:** - -Radius of a circle - -## x - -``` -int32_t ICircle::x -``` - - **Description:** - -X-axis coordinate of a circle center - -## y - -``` -int32_t ICircle::y -``` - - **Description:** - -Y-axis coordinate of a circle center - diff --git a/api/api-SmartVision-Devices/IClientProxy.md b/api/api-SmartVision-Devices/IClientProxy.md deleted file mode 100755 index a1721dbf75c3cb3fe8fa0629de5b868302d83813..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/IClientProxy.md +++ /dev/null @@ -1,115 +0,0 @@ -# IClientProxy - -- [Overview](#section1650213286165631) -- [Summary](#section984856840165631) -- [Data Fields](#pub-attribs) -- [Details](#section1736297768165631) -- [Field](#section1786390938165631) -- [INHERIT\_IUNKNOWN](#ac0ffdbb3582a99ba237a70d26320075b) -- [Invoke](#a18d8a9e57b05be9fd3e5772e445f474d) - -## **Overview** - -**Related Modules:** - -[Registry](Registry.md) - -**Description:** - -Defines the client proxy object. - -This object is used for the IPC with the server. If you want to use the same invocation mode as that on the server, create an object inherited from - -[IClientProxy](IClientProxy.md) - - and implement serialization. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

INHERIT_IUNKNOWN

-
  

Invoke )(IClientProxy *proxy, int funcId, IpcIo *request, IOwner owner, INotify notify)

-

int(*

-

Sends an IPC message from the client to the IServerProxy.

-
- -## **Details** - -## **Field ** - -## INHERIT\_IUNKNOWN - -``` -IClientProxy::INHERIT_IUNKNOWN -``` - - **Description:** - -Inherites the **[IUnknown](IUnknown.md)** base class. - -## Invoke - -``` -int(* IClientProxy::Invoke) ([IClientProxy](IClientProxy.md) *proxy, int funcId, IpcIo *request, IOwner owner, [INotify](Registry.md#ga362a17c1bda1aace88d42dcbc88bdfac) notify) -``` - - **Description:** - -Sends an IPC message from the client to the **[IServerProxy](IServerProxy.md)**. - -This function is used for IPC. The passed **proxy** is used to obtain the server information. Then, **request** carries the request message to be sent to the server and processed by the function specified by **funcId**. **notify** is a callback function used to process the response message. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
proxyIndicates the pointer of the client proxy object.
funcIdIndicates the ID of the function implemented on the server.
requestIndicates the pointer to the serialized request message.
ownerIndicates the receiver (generics type) of the response message.
notifyIndicates the callback function that notifies the client of the response message.
- -**Returns:** - -Returns **EC\_SUCCESS** if the IPC message is sent successfully; returns other error codes if the message fails to be sent. - diff --git a/api/api-SmartVision-Devices/IDeviceIoService.md b/api/api-SmartVision-Devices/IDeviceIoService.md deleted file mode 100755 index d8b1d24ff43ceabb6c54035a6c100c7beebae02f..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/IDeviceIoService.md +++ /dev/null @@ -1,171 +0,0 @@ -# IDeviceIoService - -- [Overview](#section2117197142165632) -- [Summary](#section98086035165632) -- [Data Fields](#pub-attribs) -- [Details](#section1152369888165632) -- [Field](#section1851010388165632) -- [Dispatch](#acbd0a5848800672aaa0048b73ab725c8) -- [object](#ae79da6a452d1b93d09f1a034a4a7c8d2) -- [Open](#aa655b184dee58c697cd25c9a7367d401) -- [Release](#a45681535736fb530c71da45a259aa128) - -## **Overview** - -**Related Modules:** - -[Core](Core.md) - -**Description:** - -Defines the driver service. - -When a driver releases services to user-level applications, the service interface must inherit this structure and implements the **Dispatch** function in the structure. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

object

-

struct HdfObject

-

Open )(struct HdfDeviceIoClient *client)

-

int32_t(*

-

Called when the driver service is enabled by a user-level application.

-

Dispatch )(struct HdfDeviceIoClient *client, int cmdId, struct HdfSBuf *data, struct HdfSBuf *reply)

-

int32_t(*

-

Called when the driver service is invoked by a user-level application.

-

Release )(struct HdfDeviceIoClient *client)

-

void(*

-

Called when the driver service is released by a user-level application.

-
- -## **Details** - -## **Field ** - -## Dispatch - -``` -int32_t(* IDeviceIoService::Dispatch) (struct [HdfDeviceIoClient](HdfDeviceIoClient.md) *client, int cmdId, struct [HdfSBuf](HdfSBuf.md) *data, struct [HdfSBuf](HdfSBuf.md) *reply) -``` - - **Description:** - -Called when the driver service is invoked by a user-level application. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
clientIndicates the pointer to the client object of the service.
cmdIdIndicates the command word of the service interface.
dataIndicates the pointer to the data passed by the invoker.
replyIndicates the pointer to the data that needs to be returned to the invoker.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value otherwise. - -## object - -``` -struct [HdfObject](HdfObject.md) IDeviceIoService::object -``` - - **Description:** - -Driver service object ID - -## Open - -``` -int32_t(* IDeviceIoService::Open) (struct [HdfDeviceIoClient](HdfDeviceIoClient.md) *client) -``` - - **Description:** - -Called when the driver service is enabled by a user-level application. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
clientIndicates the pointer to the client object of the service.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value otherwise. - -## Release - -``` -void(* IDeviceIoService::Release) (struct [HdfDeviceIoClient](HdfDeviceIoClient.md) *client) -``` - - **Description:** - -Called when the driver service is released by a user-level application. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
clientIndicates the pointer to the client object of the service.
- diff --git a/api/api-SmartVision-Devices/IInputInterface.md b/api/api-SmartVision-Devices/IInputInterface.md deleted file mode 100755 index bfa462f595914ef501a0c9746fe9b2addc61daba..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/IInputInterface.md +++ /dev/null @@ -1,84 +0,0 @@ -# IInputInterface - -- [Overview](#section978084790165631) -- [Summary](#section421144492165631) -- [Data Fields](#pub-attribs) -- [Details](#section2072978642165631) -- [Field](#section789099418165631) -- [iInputController](#a0da92e255529827b823c19071f50fa27) -- [iInputManager](#a539baf2f3554b901abd4820e521ac0ea) -- [iInputReporter](#a592d65e0a8ad8e9bc0241a0be50669d0) - -## **Overview** - -**Related Modules:** - -[Input](Input.md) - -**Description:** - -Defines interfaces for providing driver capabilities of input devices. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

iInputManager

-

InputManager *

-

iInputController

-

InputController *

-

iInputReporter

-

InputReporter *

-
- -## **Details** - -## **Field ** - -## iInputController - -``` -[InputController](InputController.md)* IInputInterface::iInputController -``` - - **Description:** - -[Service](Service.md) control interface for input devices - -## iInputManager - -``` -[InputManager](InputManager.md)* IInputInterface::iInputManager -``` - - **Description:** - -Device management interface for input devices - -## iInputReporter - -``` -[InputReporter](InputReporter.md)* IInputInterface::iInputReporter -``` - - **Description:** - -Data reporting interface for input devices - diff --git a/api/api-SmartVision-Devices/ILine.md b/api/api-SmartVision-Devices/ILine.md deleted file mode 100755 index 4e041b4d9c5b63d3ece867f9cfc6357491c10715..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/ILine.md +++ /dev/null @@ -1,116 +0,0 @@ -# ILine - -- [Overview](#section1079366723165631) -- [Summary](#section587598333165631) -- [Data Fields](#pub-attribs) -- [Details](#section425577645165631) -- [Field](#section2102651958165631) -- [color](#add02707d232b4078a1fdf72e546fd936) -- [x0](#a8bb97958c8417054fa0454639ac489ea) -- [x1](#a94eef2387a316b10bb4927aedf584552) -- [y0](#a0d589a2bb64946f9e0f77f3785768387) -- [y1](#ab586d95d46d0e5abdbfdfc1bb450f626) - -## **Overview** - -**Related Modules:** - -[Display](Display.md) - -**Description:** - -Describes a line to help draw lines in hardware acceleration. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

x0

-

int32_t

-

y0

-

int32_t

-

x1

-

int32_t

-

y1

-

int32_t

-

color

-

uint32_t

-
- -## **Details** - -## **Field ** - -## color - -``` -uint32_t ILine::color -``` - - **Description:** - -Line color - -## x0 - -``` -int32_t ILine::x0 -``` - - **Description:** - -X-axis coordinate of the start point of a line - -## x1 - -``` -int32_t ILine::x1 -``` - - **Description:** - -X-axis coordinate of the end point of a line - -## y0 - -``` -int32_t ILine::y0 -``` - - **Description:** - -Y-axis coordinate of the start point of a line - -## y1 - -``` -int32_t ILine::y1 -``` - - **Description:** - -Y-axis coordinate of the end point of a line - diff --git a/api/api-SmartVision-Devices/IO.md b/api/api-SmartVision-Devices/IO.md deleted file mode 100755 index e9cb8192707813c7b2e60e7f53b314bfc399a006..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/IO.md +++ /dev/null @@ -1,4458 +0,0 @@ -# IO - -- [Overview](#section1444219423165622) -- [Summary](#section101471515165622) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Macros](#define-members) -- [Typedefs](#typedef-members) -- [Functions](#func-members) -- [Details](#section611262313165622) -- [Macro Definition](#section1524028957165622) -- [FD\_CLR](#ga60efc4a969e971f91b7a73bcace62e58) -- [FD\_ISSET](#ga99a3a0e4d7d1d3eb7be68f37554c0a30) -- [FD\_SET](#gaa7701be461ce602ff7043cbd898a0c53) -- [FD\_ZERO](#ga92ab86a10f942411365b9078833559f0) -- [Function](#section398272795165622) -- [asprintf\(\)](#ga1af9acc6b6efdca3576cb8223d95f401) -- [clearerr\(\)](#ga81202d6a15259fbceb71a961a878b01a) -- [dprintf\(\)](#ga5fe0fc8fe920b640d488856c5ca43cb5) -- [err\(\)](#gaa6b66a9a8eb4be40e4424a4dc92ae056) -- [errx\(\)](#gaeaca83913c785b95d6c50f35207ff739) -- [fclose\(\)](#gac41a0ad4b31be2ad59d8222a0de30bda) -- [feof\(\)](#gafb95de1535a5a185954819539f3c6ca5) -- [ferror\(\)](#ga4a98383bb54291c2abede7aa28acf597) -- [ferror\_unlocked\(\)](#ga089fd72e6218cf6805c8fc21123d3d5f) -- [fflush\(\)](#gae4459e830d3e2abcf428337a661d9456) -- [fgetc\(\)](#gab11a990e4f8863a1e7736e3c1d430092) -- [fgetc\_unlocked\(\)](#ga9b8e6d63482eb1fe38f3eb9d7fc9bd8e) -- [fgetln\(\)](#ga8e6fe2fcd5eaa8e2d146a50eeaae5b40) -- [fgetpos\(\)](#gaf2e2b1a01359f5f7068b61d1dffcdcdd) -- [fgets\(\)](#ga2b3df0e66b41edab3c039191fe6cc4f9) -- [fileno\(\)](#ga03681b8592bba6fe02941b9abc182808) -- [fmemopen\(\)](#ga6b2efc6515c53ab5f0c9800c35f65789) -- [fopen\(\)](#ga58386e895d3c07b008c8865b2a9716fb) -- [fprintf\(\)](#gad9291335f34e874c8431285d705bc3aa) -- [fputc\(\)](#gabe6299d5823dd023e610aaa619735a3f) -- [fputc\_unlocked\(\)](#gab8680ff3f49f3fe7ce0fb78b4cb8394c) -- [fputs\(\)](#ga68236e664c1f0da049b25fba1c1695f6) -- [fread\(\)](#ga091b3f41bdd6984d63ea48d87a62bfd2) -- [freopen\(\)](#gaab336dbfc008a0873046ecd7db043df0) -- [fscanf\(\)](#gae902a7b8796799a6e076f07e9d7de045) -- [fseek\(\)](#gaece5d6e00c239ffd0847d8d2ef65bd57) -- [fseeko\(\)](#ga6926f47b76b028f112045fbe7ced4115) -- [fsetpos\(\)](#gae47e3f92dd8fc42ce0b6384c03ce6a9b) -- [ftell\(\)](#gaae4231ac8066eb54ea1d9d12d551605c) -- [ftello\(\)](#ga5f52ea043b9a2aa4d8cc92d674a2117b) -- [ftrylockfile\(\)](#gab486b89691678e4873ec8b1b15c2678a) -- [funlockfile\(\)](#ga4f016c54ff86ca62454417bb7b32ab11) -- [fwrite\(\)](#gaf86a4505e5de39a100f7ea828377b585) -- [getc\(\)](#gad5a0ea2c21a23a380b7c30fe35fa9456) -- [getc\_unlocked\(\)](#ga169f9b7e933ba56156885e30f7263b28) -- [getchar\(\)](#ga3e29caa20f7cffe18f410f01278905a8) -- [getchar\_unlocked\(\)](#gafef7e39f2376c63728163cd5ccfbe99e) -- [getdelim\(\)](#gab87a24b4c09e8fc3712a6d6090bfd371) -- [getline\(\)](#gaaf07c1bbc2aa081a54bdd66f0e152312) -- [gets\(\)](#gaab85b30d68ce9d9e0475e0f51bf610b1) -- [getw\(\)](#ga6d475ead5d1f35e3f14423a99ef3a992) -- [iconv\(\)](#gab7c1300a663def659ce6d4a01076c39d) -- [iconv\_close\(\)](#ga062da5f802d9e274a8702f11921e691b) -- [iconv\_open\(\)](#ga934548ab8aaae237ac5cce0ed0b3edec) -- [open\_memstream\(\)](#gac7250554d80d31f4d8ad316c4c3c3c85) -- [perror\(\)](#ga80b37b56a5a42139dccaef56da4bf82a) -- [poll\(\)](#gab7fc0f6be5f13c81de180c1288ba3b6f) -- [preadv\(\)](#ga94adc8dd94a6bdaaa9cf4d9f388418b3) -- [printf\(\)](#ga98631211a4a8aee62f572375d5b637be) -- [putc\(\)](#ga38f980218f04ebdddcdcd1b77e1cf6b1) -- [putc\_unlocked\(\)](#ga340b21ecb337abb08905095e673672f6) -- [putchar\(\)](#gaf4de2514b7778805db3815e8dd6cf09a) -- [putchar\_unlocked\(\)](#ga07ff061a8fed45cdedbecdd899b5fdb1) -- [puts\(\)](#gad41876f99f190c7488e64ef39c50a23f) -- [putw\(\)](#gae3a2f96dac9fa87b964b69ff6d5cce46) -- [pwritev\(\)](#ga3de6f9331d6bb930e748bb61860edbd6) -- [readv\(\)](#gaa1952d693ed3c43292566e643ceb9858) -- [remove\(\)](#ga02b13b56a188401119ea4da43c184913) -- [rename\(\)](#ga4d4709508ed7604103d77c3fdc5ea4a2) -- [rewind\(\)](#gaa0cd401f198d33d9d01a9e8aa4026819) -- [scanf\(\)](#ga5c48433db9c04031772d5b36e6c4411d) -- [select\(\)](#gaf916439863bed6ba92594e390c227c7e) -- [setbuf\(\)](#ga36d24924e1acc69f9c3ce49a832615fe) -- [setbuffer\(\)](#ga53a57437279b4ed57b7f116dfc9cbbcc) -- [setlinebuf\(\)](#ga2e13e101d5a57cfccf1bab51f8768a5d) -- [setvbuf\(\)](#gaf691eb990d669a9edec8a9ec721ce3bc) -- [snprintf\(\)](#gad76145a6edfc98981ded8815a760e0cd) -- [sprintf\(\)](#ga3082155ec11e7229f7a20439b31a169e) -- [sscanf\(\)](#gaec1e54556dca3bd701d44395d34818dd) -- [tempnam\(\)](#ga44dcf948b2c1dc3356d2937635a27839) -- [ungetc\(\)](#ga54efa95b6d5b41adec98e5b8a1a9f27b) -- [vasprintf\(\)](#ga5ec7fd90ebe6015636bce974c192c86a) -- [vdprintf\(\)](#ga0d0a950c2b4e6fba795cb7d8f2e8b8b8) -- [verr\(\)](#gaf5491fca8b356da75d96fc469bf32ea6) -- [verrx\(\)](#ga4b5f9ccd84c00dc473329e4bf64125e1) -- [vfprintf\(\)](#gad80f05917df38df3a5e1817498d67c26) -- [vfscanf\(\)](#gabdd32e401e37c9d954f3f0a6907500d9) -- [vprintf\(\)](#gaa715ef816dc040c8b367fde4ba84d6f3) -- [vscanf\(\)](#ga40250d63904acd3e898061c9eab6ead3) -- [vsnprintf\(\)](#ga2cadafbeb2d6e0d5781f6e5106d41fc2) -- [vsprintf\(\)](#gaab3db67c98c32122fcb3d076d4207bbc) -- [vsscanf\(\)](#gab1c4552aba80fe03c9b45fe27f4331ad) -- [vwarn\(\)](#ga9ca1ffba0c6f5df7b172d25917611b4a) -- [vwarnx\(\)](#ga22924aaaaa6b6e8bba4c76d0a0fe86cd) -- [warn\(\)](#gaf80d19f1297a11626fab61a248959c71) -- [warnx\(\)](#ga58f3d9691c146f86e562022d39567b7f) -- [writev\(\)](#gad57f362a0aef72b52ea59288f74dd1ea) - -## **Overview** - -**Description:** - -Provides data structures and functions for performing input/output \(I/O\) operations, such as printf and scanf. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Name

-

Description

-

err.h

-

Provides common functions for error messages.

-

iconv.h

-

Declares functions related to the I/O character set conversion.

-

locale.h

-

Provides functions to set and obtain the locale language environment.

-

nl_types.h

-

Defines I/O multiplexing functions related to message catalog operations.

-

poll.h

-

Declares I/O multiplexing functions.

-

stdio.h

-

Declares common functions used for performing input and output (I/O) operations.

-

select.h

-

Provides functions and structures related to I/O multiplexing.

-

uio.h

-

Provides functions and structures related to input/output (I/O) to a file or buffer.

-

wordexp.h

-

Declares functions related to word expansion.

-
- -## Data Structures - - - - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

lconv

-

Indicates format information about a number.

-

pollfd

-

Defines I/O multiplexing.

-

fd_set

-

Defines a file descriptor set.

-

wordexp_t

-

Describes information about word expansion.

-
- -## Macros - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

LC_CTYPE 0

-

Language symbol type, which affects character classification and case conversion.

-

LC_NUMERIC 1

-

Number type, which affects the number format.

-

LC_TIME 2

-

Time type, which affects date and time formats.

-

LC_COLLATE 3

-

Character sorting type, which affects string comparison and sorting habits.

-

LC_MONETARY 4

-

Monetary type, which affects monetary information.

-

LC_MESSAGES 5

-

Message type, which affects prompt information, error information, status information, titles, labels, buttons, and menus.

-

LC_ALL 6

-

All types, which affect all content of locale settings. If LC_ALL is set, the locale information of all types is set to be consistent with LC_ALL.

-

POLLIN 0x001

-

POLLIN event.

-

POLLPRI 0x002

-

POLLPRI event.

-

POLLOUT 0x004

-

POLLOUT event.

-

POLLERR 0x008

-

POLLERR event.

-

POLLHUP 0x010

-

POLLHUP event.

-

POLLNVAL 0x020

-

POLLNVAL event.

-

FD_SETSIZE 1024

-

Defines the size of fd_set, that is, the maximum number of monitored files.

-

FD_ZERO(s) do { int __i; unsigned long *__b=(s)->fds_bits; for(__i=sizeof (fd_set)/sizeof (long); __i; __i--) *__b++=0; } while(0)

-

Clears all elements in the file descriptor set.

-

FD_SET(d, s) ((s)->fds_bits[(d)/(8*sizeof(long))] |= (1UL<<((d)%(8*sizeof(long)))))

-

Adds a file descriptor to a set.

-

FD_CLR(d, s) ((s)->fds_bits[(d)/(8*sizeof(long))] &= ~(1UL<<((d)%(8*sizeof(long)))))

-

Removes a file descriptor from a set.

-

FD_ISSET(d, s) !!((s)->fds_bits[(d)/(8*sizeof(long))] & (1UL<<((d)%(8*sizeof(long)))))

-

Checks whether a file descriptor is in a set.

-
- -## Typedefs - - - - - - - - - - - - - - - - - - - - - - -

Typedef Name

-

Description

-

iconv_t

-

typedef void *

-

Type of the character set conversion descriptor.

-

nl_catd

-

typedef void *

-

Type of message catalog descriptor.

-

nfds_t

-

typedef unsigned long

-

Number of poll types.

-

FILE

-

typedef struct _IO_FILE

-

Struct of file stream.

-

fd_mask

-

typedef unsigned long

-

Defines fd_set as the alias of the element type.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

warn (const char *fmt,...)

-

void

-

Displays a formatted error message on the standard error (stderr) output.

-

vwarn (const char *fmt, va_list args)

-

void

-

Displays a formatted error message on the stderr output.

-

warnx (const char *fmt,...)

-

void

-

Displays a formatted error message on the stderr output.

-

vwarnx (const char *fmt, va_list args)

-

void

-

Displays a formatted error message on the stderr output.

-

err (int eval, const char *fmt, va_list args)

-

void

-

Displays error information.

-

errx (int eval, const char *fmt,...)

-

void

-

Displays error information.

-

verr (int eval, const char *fmt, va_list args)

-

void

-

Displays error information.

-

verrx (int eval, const char *fmt, va_list args)

-

void

-

Displays a formatted error message.

-

iconv_open (const char *to, const char *from)

-

iconv_t

-

Obtain a character set conversion descriptor.

-

iconv (iconv_t cd, char **restrict in, size_t *restrict inb, char **restrict out, size_t *restrict outb)

-

size_t

-

Converts a character set.

-

iconv_close (iconv_t cd)

-

int

-

Closes a character set conversion descriptor.

-

poll (struct pollfd fds[], nfds_t nfds, int timeout)

-

int

-

Defines the I/O multiplexing system.

-

fopen (const char *__restrict path, const char *__restrict mode)

-

FILE *

-

Opens the file stored in the specified path based on the given mode.

-

freopen (const char *__restrict path, const char *__restrict mode, FILE *__restrict stream)

-

FILE *

-

Opens the file stored in the specified path, and associates the stream by the given stream.

-

fclose (FILE *fd)

-

int

-

Closes a file based on the specified file descriptor.

-

remove (const char *pathname)

-

int

-

Deletes a specified file or directory from the file system.

-

rename (const char *oldpath, const char *newpath)

-

int

-

Renames a specified file.

-

feof (FILE *fp)

-

int

-

Tests the end-of-file indicator for a specified stream.

-

ferror (FILE *stream)

-

int

-

Tests for the error identifier of a specified file stream.

-

fflush (FILE *fp)

-

int

-

Flushes the output buffer of a specified stream.

-

clearerr (FILE *fp)

-

void

-

Resets the error indicators.

-

fseek (FILE *fp, long offset, int whence)

-

int

-

Changes the position of a specified stream to a new position.

-

ftell (FILE *fp)

-

long

-

Obtains the current value of the file position indicator for a specified file stream.

-

rewind (FILE *stream)

-

void

-

Sets the position indicator of a specified stream to the beginning of the file.

-

fgetpos (FILE *stream, fpos_t *pos)

-

int

-

Obtains the current file position of a specified stream and writes it to the pos parameter.

-

fsetpos (FILE *fp, const fpos_t *pos)

-

int

-

Sets the file position indicator for a specified file stream.

-

fread (void *__restrict ptr, size_t size, size_t nmemb, FILE *__restrict stream)

-

size_t

-

Reads data from a specified stream.

-

fwrite (const void *__restrict ptr, size_t size, size_t nmemb, FILE *__restrict stream)

-

size_t

-

Writes data to a specified stream.

-

getc (FILE *stream)

-

int

-

Reads a character from a specified file stream.

-

getchar (void)

-

int

-

Obtains the next character from the standard input (stdin).

-

ungetc (int c, FILE *stream)

-

int

-

Pushes a character back into a specified file stream.

-

fputc (int c, FILE *stream)

-

int

-

Writes a character into the position pointed to by a specified stream.

-

putc (int c, FILE *stream)

-

int

-

Writes a character to a specified file stream.

-

putchar (int c)

-

int

-

Writes a character into the standard output (stdout).

-

fgets (char *s, int size, FILE *stream)

-

char *

-

Reads a line of characters from a specified file stream and stores it into the string pointed to by s.

-

gets (char *s)

-

char *

-

Reads a line of characters from the stdin and stores it in the buffer.

-

fputs (const char *s, FILE *stream)

-

int

-

Writes a character string (excluding the terminating null character) to a specified file stream.

-

puts (const char *s)

-

int

-

Writes a character string and appends a new-line character to the stdout.

-

printf (const char *format,...)

-

int

-

Formats arguments based on format and prints formatted data to the stdout.

-

fprintf (FILE *stream, const char *format,...)

-

int

-

Formats arguments based on format and prints formatted data to a specified file stream.

-

sprintf (char *str, const char *format,...)

-

int

-

Prints formatted data from a variable argument list to a specified string.

-

snprintf (char *str, size_t size, const char *format,...)

-

int

-

Prints formatted data of a maximum of size bytes from a variable argument list to a specified string.

-

vprintf (const char *format, va_list ap)

-

int

-

Prints formatted data from a variable argument list to the stdout.

-

vfprintf (FILE *stream, const char *format, va_list ap)

-

int

-

Prints formatted data from a variable argument list to a specified file stream.

-

vsprintf (char *str, const char *format, va_list ap)

-

int

-

Prints formatted data from a variable argument list to a specified string.

-

vsnprintf (char *str, size_t size, const char *format, va_list ap)

-

int

-

Prints formatted data of a maximum of size bytes from a variable argument list to a specified string.

-

scanf (const char *format,...)

-

int

-

Reads formatted data from the stdin and stores the data to the additional arguments based on format.

-

fscanf (FILE *stream, const char *format,...)

-

int

-

Reads formatted data from a specified file stream and stores it based on format into the locations pointed to by the variable arguments.

-

sscanf (const char *str, const char *format,...)

-

int

-

Reads data from a character string pointed to by str and stores it based on format into the locations pointed to by the variable arguments.

-

vscanf (const char *format, va_list ap)

-

int

-

Reads data from the stdin and stores it based on format into the locations pointed to by the elements in the variable argument list identified by ap.

-

vfscanf (FILE *stream, const char *format, va_list ap)

-

int

-

Reads data from a specified file stream and stores it based on format into the locations pointed to by the elements in the variable argument list identified by ap.

-

vsscanf (const char *str, const char *format, va_list ap)

-

int

-

Reads data from a specified string and stores it based on format into the locations pointed to by the elements in the variable argument list identified by ap.

-

perror (const char *msg)

-

void

-

Prints the last error occurred during a call to a system or library function to the standard error output stream (stderr).

-

setvbuf (FILE *stream, char *buf, int mode, size_t size)

-

int

-

Sets the mode and size of the buffer for a specified stream.

-

setbuf (FILE *stream, char *buf)

-

void

-

Sets a buffer to be used by a specified stream.

-

fmemopen (void *buf, size_t size, const char *mode)

-

FILE *

-

Opens a memory stream that allows the access mode specified by mode.

-

open_memstream (char **ptr, size_t *size)

-

FILE *

-

Opens a stream for writing to a specified buffer.

-

fileno (FILE *fp)

-

int

-

Obtains the file descriptor of a specified file stream.

-

fseeko (FILE *fp, off_t offset, int whence)

-

int

-

Sets the position of the next input or output operation on a specified file stream.

-

ftello (FILE *fp)

-

off_t

-

Obtains the current value of the file position indicator for a specified file stream.

-

dprintf (int fd, const char *format,...)

-

int

-

Prints formatted data to a specified file.

-

vdprintf (int fd, const char *format, va_list ap)

-

int

-

Prints formatted data from a variable argument list to a specified file.

-

ftrylockfile (FILE *filehandle)

-

int

-

Locks a specified file.

-

funlockfile (FILE *filehandle)

-

void

-

Unlocks a specified file.

-

getc_unlocked (FILE *stream)

-

int

-

Obtains a character from a specified file stream without locking the file stream or checking whether it is locked.

-

getchar_unlocked (void)

-

int

-

Obtains the next character from stdin.

-

putc_unlocked (int c, FILE *stream)

-

int

-

Writes a character to a specified file stream with the thread remains unlocked.

-

putchar_unlocked (int c)

-

int

-

Writes a character to the stdout with the thread remains unlocked.

-

getdelim (char **lineptr, size_t *n, int delim, FILE *stream)

-

ssize_t

-

Reads an entire line from a specified file stream.

-

getline (char **lineptr, size_t *n, FILE *stream)

-

ssize_t

-

Reads an entire line from a specified file stream.

-

tempnam (const char *dir, const char *prefix)

-

char *

-

Creates a temporary file with a unique file name.

-

setbuffer (FILE *f, char *buf, size_t size)

-

void

-

Sets the buffer for a specified file stream.

-

setlinebuf (FILE *f)

-

void

-

Sets the linear buffer for a specified file stream.

-

fgetc (FILE *stream)

-

int

-

Reads a character from the file pointed to by stream.

-

fgetc_unlocked (FILE *stream)

-

int

-

Reads a character from the file pointed to by stream with the thread remains unlocked.

-

fputc_unlocked (int c, FILE *stream)

-

int

-

Writes a character to the file stream pointed to by stream at the current position.

-

ferror_unlocked (FILE *stream)

-

int

-

Tests for the error identifier of a specified file stream.

-

getw (FILE *stream)

-

int

-

Reads a word (an int value) from a specified file stream.

-

putw (int w, FILE *stream)

-

int

-

Writes a word (an int value) to a specified file stream.

-

fgetln (FILE *stream, size_t *len)

-

char *

-

Reads a line of data from the current position of a specified file stream.

-

asprintf (char **strp, const char *fmt,...)

-

int

-

Prints formatted data to a specified character string.

-

vasprintf (char **strp, const char *fmt, va_list ap)

-

int

-

Prints formatted data from a variable argument list to a specified character string.

-

select (int nfds, fd_set *__restrict readfds, fd_set *__restrict writefds, fd_set *__restrict exceptfds, struct timeval *__restrict timeout)

-

int

-

Monitors the I/O events of multiple file descriptors.

-

readv (int fd, const struct iovec *iov, int iovcnt)

-

ssize_t

-

Reads the data of fd to iov.

-

writev (int fd, const struct iovec *iov, int iovcnt)

-

ssize_t

-

Writes a given length of data into a file.

-

preadv (int fd, const struct iovec *iov, int iovcnt, off_t offset)

-

ssize_t

-

Reads the data in a file whose fd offset is offset to the multi-group buffer space pointed to by iov.

-

pwritev (int fd, const struct iovec *iov, int iovcnt, off_t offset)

-

ssize_t

-

Writes the data of a multi-group buffer space pointed to by iov to the offset of fd.

-
- -## **Details** - -## **Macro Definition ** - -## FD\_CLR - -``` -#define FD_CLR( d, s ) ((s)->fds_bits[(d)/(8*sizeof(long))] &= ~(1UL<<((d)%(8*sizeof(long))))) -``` - - **Description:** - -Removes a file descriptor from a set. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
dIndicates the file descriptor of the int type.
sIndicates the descriptor set of the fd_set type.
- -## FD\_ISSET - -``` -#define FD_ISSET( d, s ) !!((s)->fds_bits[(d)/(8*sizeof(long))] & (1UL<<((d)%(8*sizeof(long))))) -``` - - **Description:** - -Checks whether a file descriptor is in a set. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
dIndicates the file descriptor of the int type.
sIndicates the descriptor set of the fd_set type.
- -**Returns:** - -Returns **0** if the file descriptor is not in the set; returns **1** if the file descriptor is in the set. - -## FD\_SET - -``` -#define FD_SET( d, s ) ((s)->fds_bits[(d)/(8*sizeof(long))] |= (1UL<<((d)%(8*sizeof(long))))) -``` - - **Description:** - -Adds a file descriptor to a set. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
dIndicates the file descriptor of the int type.
sIndicates the descriptor set of the fd_set type.
- -## FD\_ZERO - -``` -#define FD_ZERO( s) do { int __i; unsigned long *__b=(s)->fds_bits; for(__i=sizeof ([fd_set](fd_set.md))/sizeof (long); __i; __i--) *__b++=0; } while(0) -``` - - **Description:** - -Clears all elements in the file descriptor set. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sIndicates the descriptor set of the fd_set type.
- -## **Function ** - -## asprintf\(\) - -``` -int asprintf (char ** strp, const char * fmt, ... ) -``` - - **Description:** - -Prints formatted data to a specified character string. - -If the length of the string is uncertain, this function applies for sufficient memory space based on the length of the formatted character string. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
strpIndicates the double pointer to the start address of the target string.
fmtIndicates the pointer to the format string.
...Indicates the list of arguments corresponding to the format specifiers.
- -**Attention:** - -If **strp** is no longer used, the applied space must be released. - -**Returns:** - -Returns the number of output characters if the operation is successful; returns **-1** otherwise. - -## clearerr\(\) - -``` -void clearerr ([FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * fp) -``` - - **Description:** - -Resets the error indicators. - -This function is used to set both the file error indicator and end-of-file indicator to **0**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
fpIndicates the pointer to the file object that identifies a stream to set.
- -## dprintf\(\) - -``` -int dprintf (int fd, const char * format, ... ) -``` - - **Description:** - -Prints formatted data to a specified file. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
fdIndicates the file descriptor that identifies a file.
formatIndicates the pointer to the format string.
- -**Returns:** - -Returns the total number of written characters if the operation is successful; returns a negative value otherwise. - -## err\(\) - -``` -void err (int eval, const char * fmt, va_list args ) -``` - - **Description:** - -Displays error information. - -If the **fmt** parameter is not **NULL**, stderr displays the error code description obtained from strerror\(errno\), followed by a space and a colon \(:\), and the error message to print. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
evalThis function does not return, but exits with the value of eval.
fmtIndicates the pointer to the string to format.
argsIndicates the parameters initialized by using va_start.
- -## errx\(\) - -``` -void errx (int eval, const char * fmt, ... ) -``` - - **Description:** - -Displays error information. - -This function outputs the executable file name **argv\[0\]** and the accepted second formal parameter to stderr. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
evalThis function does not return, but exits with the value of eval.
fmtIndicates the pointer to the string to format.
- -## fclose\(\) - -``` -int fclose ([FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * fd) -``` - - **Description:** - -Closes a file based on the specified file descriptor. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
fdIndicates the pointer to the file descriptor of the file to close.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

fd is NULL.

-
- -## feof\(\) - -``` -int feof ([FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * fp) -``` - - **Description:** - -Tests the end-of-file indicator for a specified stream. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
fpIndicates the pointer to the file object that identifies a stream to test.
- -**Returns:** - -Returns a non-zero value if the end-of-file indicator is set; returns **0** otherwise. - -## ferror\(\) - -``` -int ferror ([FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * stream) -``` - - **Description:** - -Tests for the error identifier of a specified file stream. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
streamIndicates the pointer to the file object that identifies a stream.
- -**Returns:** - -Returns a non-zero value to indicate an error for the stream if the operation is successful; returns **0** otherwise. - -## ferror\_unlocked\(\) - -``` -int ferror_unlocked ([FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * stream) -``` - - **Description:** - -Tests for the error identifier of a specified file stream. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
streamIndicates the pointer to the file object that identifies a stream.
- -**Returns:** - -Returns a non-zero value to indicate an error for the stream if the operation is successful; returns **0** otherwise. - -## fflush\(\) - -``` -int fflush ([FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * fp) -``` - - **Description:** - -Flushes the output buffer of a specified stream. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
fpIndicates the pointer to the file object that identifies a stream to flush.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EBADF

-

fp points to an invalid stream.

-
- -## fgetc\(\) - -``` -int fgetc ([FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * stream) -``` - - **Description:** - -Reads a character from the file pointed to by **stream**. - -This function reads the next character from the current position of the file stream and returns the character, then advances the file position indicator. You can read each character of the file by continuously calling this function. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
streamIndicates the pointer to the file object that identifies a stream.
- -**Returns:** - -Returns the character read as an int value if the operation is successful; returns **EOF** if the end-of-file is reached or a reading error occurs. - -## fgetc\_unlocked\(\) - -``` -int fgetc_unlocked ([FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * stream) -``` - - **Description:** - -Reads a character from the file pointed to by **stream** with the thread remains unlocked. - -This function reads the next character from the current position of the file stream and returns the character, then advances the file position indicator. You can read each character of the file by continuously calling this function. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
streamIndicates the pointer to the file object that identifies a stream.
- -**Attention:** - -This function cannot be used in a multi-thread process because it does not use locking during the call. \(It does not set locks itself, and does not test for the presence of locks set by others.\) An error occurs upon a multi-thread operation. - -**Returns:** - -Returns the character read as an int value if the operation is successful; returns **EOF** if the end-of-file is reached or a reading error occurs. - -## fgetln\(\) - -``` -char* fgetln ([FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * stream, size_t * len ) -``` - - **Description:** - -Reads a line of data from the current position of a specified file stream. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
streamIndicates the pointer to the file object that identifies a stream.
lenIndicates the pointer to the length of the string that is read.
- -**Returns:** - -Returns the string read. - -## fgetpos\(\) - -``` -int fgetpos ([FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * stream, fpos_t * pos ) -``` - - **Description:** - -Obtains the current file position of a specified stream and writes it to the **pos** parameter. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
streamIndicates the pointer to the file object that identifies a stream.
posIndicates the pointer to the fpos_t object.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## fgets\(\) - -``` -char* fgets (char * s, int size, [FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * stream ) -``` - - **Description:** - -Reads a line of characters from a specified file stream and stores it into the string pointed to by **s**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
sIndicates the pointer to the character array for storing the obtained string.
sizeIndicates the maximum number of characters to read (including the terminating null character). The value of this parameter is usually the length of the array pointed to by s.
streamIndicates the pointer to the file object that identifies a stream.
- -**Returns:** - -Returns the pointer to the read string if the operation is successful; returns a null pointer if the end-of-file is reached, no characters have been read, or if an error occurs. - -## fileno\(\) - -``` -int fileno ([FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * fp) -``` - - **Description:** - -Obtains the file descriptor of a specified file stream. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
fpIndicates the pointer to the file object that identifies a stream for which the file descriptor is obtained.
- -**Returns:** - -Returns the file descriptor if the operation is successful; returns **-1** and sets **errno** to a value in the following table otherwise. - - - - - - - - - - -

errno

-

Description

-

EBADF

-

fp points to an invalid stream.

-
- -## fmemopen\(\) - -``` -[FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1)* fmemopen (void * buf, size_t size, const char * mode ) -``` - - **Description:** - -Opens a memory stream that allows the access mode specified by **mode**. - -This function is used for applications that do not support memory operations but support file operations. After the function call, you can directly operate the returned file stream, which is equivalent to operating the memory stream. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
bufIndicates the pointer to the buffer.
sizeIndicates the size of the buffer.
modeIndicates the pointer to the file operation mode.
- -**Returns:** - -Returns the opened memory stream as a file stream. - -## fopen\(\) - -``` -[FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1)* fopen (const char *__restrict path, const char *__restrict mode ) -``` - - **Description:** - -Opens the file stored in the specified path based on the given mode. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
pathIndicates the pointer to the path of the file to open.
modeIndicates the pointer to the file access mode. The following table describes the available values.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

mode

-

Description

-

"r"

-

Open a file in read-only mode. The file must exist.

-

"w"

-

Open a file in write-only mode. The file is created if it does not exist. If the file already exists, its existing contents will be cleared.

-

"a"

-

Open a write-only file in append mode. The file is created if it does not exist. If the file already exists, new contents will be written at the end of the file.

-

"r+"

-

Open a file in read and write mode. The file must exist.

-

"w+"

-

Open a file for both reading and writing. The file is created if it does not exist. If the file already exists, its contents are cleared.

-

"a+"

-

Open a file in append mode for both reading and writing. The file is created if it does not exist. If the file already exists, new contents will be written at the end of the file.

-

"rb"

-

Open a binary file in read-only mode.

-

"wb"

-

Open or create a binary file in write-only mode.

-

"ab"

-

Open a binary file in append mode and write data at the end of the file.

-

"rb+"

-

Open a binary file in read and write mode. The file must exist.

-

"wb+"

-

Open or create a binary file in read and write mode.

-

"ab+"

-

Open a binary file in append mode for wring data at the end of the file. The file is also readable.

-

"rt"

-

Open a text file in read-only mode.

-

"wt"

-

Open or create a text file in write-only mode.

-

"at"

-

Open a text file in append mode and write data at the end of the file.

-

"rt+"

-

Open a text file in read and write mode.

-

"wt+"

-

Open or create a text file in read and write mode.

-

"at+"

-

Open a text file in append mode for writing data at the end of the file. The file is also readable.

-
- -**Attention:** - -This function can NOT be used in the PROC file system to create a file. - -**Returns:** - -Returns the pointer to the file if the operation is successful; returns **NULL** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid mode.

-

EMFILE

-

The number of opened files exceeds the maximum number.

-
- -## fprintf\(\) - -``` -int fprintf ([FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * stream, const char * format, ... ) -``` - - **Description:** - -Formats arguments based on **format** and prints formatted data to a specified file stream. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
streamIndicates the pointer to the file object that identifies a stream.
formatIndicates the pointer to the format string.
...Indicates the list of arguments corresponding to the format specifiers.
- -**Returns:** - -Returns the total number of characters \(excluding the terminating null character **'\\0'**\) if the operation is successful; returns a negative value otherwise. - -## fputc\(\) - -``` -int fputc (int c, [FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * stream ) -``` - - **Description:** - -Writes a character into the position pointed to by a specified stream. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
cIndicates the int promotion of the character to write.
streamIndicates the pointer to the file object that identifies a stream.
- -**Returns:** - -Returns the ASCII code of the character written if the operation is successful; returns **EOF** otherwise. - -## fputc\_unlocked\(\) - -``` -int fputc_unlocked (int c, [FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * stream ) -``` - - **Description:** - -Writes a character to the file stream pointed to by **stream** at the current position. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
cIndicates the int promotion of the character to write.
streamIndicates the pointer to the file stream.
- -**Attention:** - -This function cannot be used in a multi-thread process because it does not use locking during the call. \(It does not set locks itself, and does not test for the presence of locks set by others.\) An error occurs upon a multi-thread operation. - -**Returns:** - -Returns the ASCII code of the character written if the operation is successful; returns **EOF** otherwise. - -## fputs\(\) - -``` -int fputs (const char * s, [FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * stream ) -``` - - **Description:** - -Writes a character string \(excluding the terminating null character\) to a specified file stream. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sIndicates the pointer to the character string to write.
streamIndicates the pointer to the file object that identifies a stream.
- -**Returns:** - -Returns a non-negative value if the operation is successful; returns **EOF** otherwise. - -## fread\(\) - -``` -size_t fread (void *__restrict ptr, size_t size, size_t nmemb, [FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) *__restrict stream ) -``` - - **Description:** - -Reads data from a specified stream. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
ptrIndicates the pointer to the array for storing the read data.
sizeIndicates the size of each element to read, in bytes.
nmembIndicates the number of elements to read.
streamIndicates the pointer to the file object that identifies a stream to read.
- -**Returns:** - -Returns **0** if **size** or **nmemb** is **0**; returns the number of elements successfully read otherwise. This function sets **errno** to a value in the following table if a reading error occurs or the end-of-file is reached \(**fread** does not distinguish the two error reporting situations, and you can call **feof** and **ferror** to determine the specific situation\). - - - - - - - - - - - - - -

errno

-

Description

-

EBADF

-

stream points to an invalid stream.

-

EEOF

-

The end-of-file is reached.

-
- -## freopen\(\) - -``` -[FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1)* freopen (const char *__restrict path, const char *__restrict mode, [FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) *__restrict stream ) -``` - - **Description:** - -Opens the file stored in the specified path, and associates the stream by the given stream. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
pathIndicates the pointer to the path of the file to open.
modeIndicates the pointer to the file access mode. The usage is same as which in fopen function.
streamIndicates the pointer to the stream to associates.
- -**Attention:** - -This function can NOT be used in the PROC file system to create a file. - -**Returns:** - -Returns the pointer to the file if the operation is successful; returns **NULL** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid mode.

-

EMFILE

-

The number of opened files exceeds the maximum number.

-

EBADF

-

The file descriptor of the stream is not valid.

-
- -## fscanf\(\) - -``` -int fscanf ([FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * stream, const char * format, ... ) -``` - - **Description:** - -Reads formatted data from a specified file stream and stores it based on **format** into the locations pointed to by the variable arguments. - -The operation ends when a space or line feed character is encountered. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
streamIndicates the pointer to the file object that identifies a stream.
formatIndicates the pointer to the format string.
...Indicates the list of arguments corresponding to the format specifiers.
- -**Returns:** - -Returns the number of variables that are successfully read. If the matching fails quickly, the return value may be less than the number of members in the argument list or even zero. If no complete conversion format is available or the input format fails to be matched, **EOF** is returned. The return value is also **EOF** if a reading error occurs. - -## fseek\(\) - -``` -int fseek ([FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * fp, long offset, int whence ) -``` - - **Description:** - -Changes the position of a specified stream to a new position. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
fpIndicates the pointer to the file object that identifies a stream for which the position is to set.
offsetIndicates the offset that determines the position.
whenceIndicates the start position of the offset. The following table describes the available values.
- - - - - - - - - - - - - - - - -

value

-

Description

-

SEEK_SET

-

Beginning of the file

-

SEEK_CUR

-

Current position

-

SEEK_END

-

End of the file

-
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - -

errno

-

Description

-

EBADF

-

fp points to an invalid stream.

-

EINVAL

-

The value of whence is not SEEK_SET, SEEK_END, or SEEK_CUR.

-

ESPIPE

-

Invalid seek.

-
- -## fseeko\(\) - -``` -int fseeko ([FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * fp, off_t offset, int whence ) -``` - - **Description:** - -Sets the position of the next input or output operation on a specified file stream. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
fpIndicates the pointer to the file object that identifies a stream for which the position is to set.
offsetIndicates the offset that determines the next operation.
whenceIndicates the start position of the offset. The following table describes the available values.
- - - - - - - - - - - - - - - - -

value

-

Description

-

SEEK_SET

-

Beginning of the file

-

SEEK_CUR

-

Current position

-

SEEK_END

-

End of the file

-
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - -

errno

-

Description

-

EBADF

-

fp points to an invalid stream.

-

EINVAL

-

The value of whence is not SEEK_SET, SEEK_END, or SEEK_CUR.

-

ESPIPE

-

Invalid seek.

-
- -## fsetpos\(\) - -``` -int fsetpos ([FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * fp, const fpos_t * pos ) -``` - - **Description:** - -Sets the file position indicator for a specified file stream. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
fpIndicates the pointer to the file object that identifies a stream for which the position is to set.
posIndicates the pointer to the position to set.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - -

errno

-

Description

-

EBADF

-

fp points to an invalid stream.

-

ESPIPE

-

Invalid seek.

-
- -## ftell\(\) - -``` -long ftell ([FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * fp) -``` - - **Description:** - -Obtains the current value of the file position indicator for a specified file stream. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
fpIndicates the pointer to the file object that identifies a stream for which the position is to obtain.
- -**Returns:** - -Returns the current offset if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EBADF

-

fp points to an invalid stream.

-
- -## ftello\(\) - -``` -off_t ftello ([FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * fp) -``` - - **Description:** - -Obtains the current value of the file position indicator for a specified file stream. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
fpIndicates the pointer to the file object that identifies a stream for which the position is to obtain.
- -**Returns:** - -Returns the current offset if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EBADF

-

fp points to an invalid stream.

-
- -## ftrylockfile\(\) - -``` -int ftrylockfile ([FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * filehandle) -``` - - **Description:** - -Locks a specified file. - -This function facilitates I/O operations in multiple threads. If the file has been locked by another thread, this function waits until the file object is no longer locked by any thread and then locks it. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
filehandleIndicates the pointer to the file object.
- -**Returns:** - -Returns **0** if the locking is successful; returns a non-zero value otherwise. - -## funlockfile\(\) - -``` -void funlockfile ([FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * filehandle) -``` - - **Description:** - -Unlocks a specified file. - -This function is used to reduce the lock count. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
filehandleIndicates the pointer to the file whose lock count is to be reduced.
- -## fwrite\(\) - -``` -size_t fwrite (const void *__restrict ptr, size_t size, size_t nmemb, [FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) *__restrict stream ) -``` - - **Description:** - -Writes data to a specified stream. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
ptrIndicates the pointer to the data to write.
sizeIndicates the size of each element to write, in bytes.
nmembIndicates the number of elements to write.
streamIndicates the pointer to the file object that identifies a stream to which data is to write.
- -**Returns:** - -Returns **0** if **size** or **nmemb** is **0**; returns the number of elements successfully written otherwise. If this number is not **nmemb**, this function sets **errno** to a value in the following table if the number is not **nmemb**. - - - - - - - - - - -

errno

-

Description

-

EBADF

-

stream points to an invalid stream.

-
- -## getc\(\) - -``` -int getc ([FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * stream) -``` - - **Description:** - -Reads a character from a specified file stream. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
streamIndicates the pointer to the file object that identifies a stream.
- -**Attention:** - -The difference between this function and **fgetc** is that this function can be implemented as a macro. - -**Returns:** - -Returns the character read as an int value if the operation is successful; returns **EOF** if the end-of-file is reached or a reading error occurs. - -## getc\_unlocked\(\) - -``` -int getc_unlocked ([FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * stream) -``` - - **Description:** - -Obtains a character from a specified file stream without locking the file stream or checking whether it is locked. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
streamIndicates the pointer to the file object that identifies a stream.
- -**Attention:** - -Use this function with caution in multi-thread scenarios. - -**Returns:** - -Returns the obtained character. - -## getchar\(\) - -``` -int getchar (void ) -``` - - **Description:** - -Obtains the next character from the standard input \(stdin\). - -This function waits for user input and does not return until any input is available. - -**Returns:** - -Returns the character read as an int value if the operation is successful; returns **EOF** if the end-of-file is reached or a reading error occurs. - -## getchar\_unlocked\(\) - -``` -int getchar_unlocked (void ) -``` - - **Description:** - -Obtains the next character from stdin. - -This function waits for user input and does not return until any input is available. - -**Attention:** - -Use this function with caution in multi-thread scenarios. - -**Returns:** - -Returns the character forcibly converted to an int value if the operation is successful; returns **EOF** if the end-of-file is reached or a reading error occurs. - -## getdelim\(\) - -``` -ssize_t getdelim (char ** lineptr, size_t * n, int delim, [FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * stream ) -``` - - **Description:** - -Reads an entire line from a specified file stream. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
lineptrIndicates the double pointer to the buffer for storing the characters in the line.
nIndicates the pointer to the size of the buffer. If the system needs to dynamically allocate memory, set this parameter to 0.
delimIndicates the line delimiter.
streamIndicates the pointer to the file object that identifies a stream.
- -**Attention:** - -If the system dynamically allocates memory, the memory needs to be released after being used. - -**Returns:** - -Returns the number of bytes read if the operation is successful; returns **-1** otherwise. - -## getline\(\) - -``` -ssize_t getline (char ** lineptr, size_t * n, [FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * stream ) -``` - - **Description:** - -Reads an entire line from a specified file stream. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
lineptrIndicates the double pointer to the buffer for storing the characters in the line.
nIndicates the pointer to the size of the buffer. If the system needs to dynamically allocate memory, set this parameter to 0.
streamIndicates the pointer to the file object that identifies a stream.
- -**Attention:** - -If the system dynamically allocates memory, the memory needs to be released after being used. - -**Returns:** - -Returns the number of bytes read if the operation is successful; returns **-1** otherwise. - -## gets\(\) - -``` -char* gets (char * s) -``` - - **Description:** - -Reads a line of characters from the stdin and stores it in the buffer. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sIndicates the pointer to the memory buffer for storing the obtained string.
- -**Attention:** - -The **[gets\(\)](IO.md#gaab85b30d68ce9d9e0475e0f51bf610b1)** function cannot predict the size of the line to be read, which may cause buffer overflow. You are recommended not to use this function. POSIX.1-2008 and ISO C11 have marked this function as obsolete. - -**Returns:** - -Returns the value of **s** if the operation is successful; returns **NULL** otherwise. - -## getw\(\) - -``` -int getw ([FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * stream) -``` - - **Description:** - -Reads a word \(an int value\) from a specified file stream. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
streamIndicates the pointer to the file object that identifies a stream.
- -**Attention:** - -This function is provided for compatibility with System V Release 4 \(SVR4\). You are advised to use [fread](IO.md#ga091b3f41bdd6984d63ea48d87a62bfd2) instead. The value returned upon an error is also a valid data value. - -**Returns:** - -Returns the integer read if the operation is successful; returns **EOP** otherwise. - -## iconv\(\) - -``` -size_t iconv ([iconv_t](IO.md#ga72517f6ffadddaafa9d51dee9b535c9f) cd, char **restrict in, size_t *restrict inb, char **restrict out, size_t *restrict outb ) -``` - - **Description:** - -Converts a character set. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
cdIndicates the conversion descriptor obtained via iconv_open.
inIndicates the double pointer to the buffer for storing the input character.
inbIndicates the pointer to the length of the character input buffer.
outIndicates the double pointer to the buffer for storing the output character.
outbIndicates the pointer to length of the character output buffer.
- -**Returns:** - -Returns the number of irreversibly converted characters if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - -

errno

-

Description

-

EILSEQ

-

An invalid multi-byte sequence is encountered in the input.

-

E2BIG

-

The output buffer space is insufficient.

-

EINVAL

-

An incomplete multi-byte sequence is encountered in the input.

-
- -## iconv\_close\(\) - -``` -int iconv_close ([iconv_t](IO.md#ga72517f6ffadddaafa9d51dee9b535c9f) cd) -``` - - **Description:** - -Closes a character set conversion descriptor. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
cdIndicates the conversion descriptor to close.
- -**Returns:** - -Returns **0**. - -## iconv\_open\(\) - -``` -[iconv_t](IO.md#ga72517f6ffadddaafa9d51dee9b535c9f) iconv_open (const char * to, const char * from ) -``` - - **Description:** - -Obtain a character set conversion descriptor. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
toIndicates the pointer to the source character set for conversion.
fromIndicates the pointer to the target character set for conversion.
- -**Returns:** - -Returns the character set conversion descriptor if the operation is successful; returns **-1** otherwise. - -## open\_memstream\(\) - -``` -[FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1)* open_memstream (char ** ptr, size_t * size ) -``` - - **Description:** - -Opens a stream for writing to a specified buffer. - -The buffer is dynamically allocated and grown. After the stream is closed, call [free\(\)](MEM.md#gafbedc913aa4651b3c3b4b3aecd9b4711) to release the buffer. When [fclose\(\)](IO.md#gac41a0ad4b31be2ad59d8222a0de30bda) or [fflush\(\)](IO.md#gae4459e830d3e2abcf428337a661d9456) is called to close or flush the stream, the pointers to the allocated buffer address and buffer size are updated to **ptr** and **size**, respectively. @attentions This function is defined in POSIX.1-2008. It is not defined in POSIX.1-2001 and is not widely used in other systems. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
ptrIndicates the pointer to the buffer address.
sizeIndicates the pointer to the buffer size.
- -**Returns:** - -Returns the pointer to the stream if the operation is successful; returns **NULL** and sets **errno** to indicate an error otherwise. - -## perror\(\) - -``` -void perror (const char * msg) -``` - - **Description:** - -Prints the last error occurred during a call to a system or library function to the standard error output stream \(stderr\). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
msgIndicates the pointer to the prompt message printed to stderr before the error message itself.
- -**Attention:** - -To make the output message more useful, **msg** should convey obvious information describing what happened. When a system call fails, it usually returns **-1** and sets **errno** to a value that describes what went wrong. The error codes can be found in **errno.h**. - -## poll\(\) - -``` -int poll (struct [pollfd](pollfd.md) fds[], [nfds_t](IO.md#ga0af7a8bdafcd5532e620a11f0d373d52) nfds, int timeout ) -``` - - **Description:** - -Defines the I/O multiplexing system. - -This function is used to mount the pointer to the **pollfd** file to the waiting queue and then monitor the file. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
fds[]Indicates the pollfd array used to store the socket descriptor to be checked.
nfdsIndicates the nfds_t parameter used to mark the total number of structure elements in fds.
timeoutIndicates the blocking time, in milliseconds.
- -**Returns:** - -Returns a value greater than 0 if the total number of socket descriptors in **fds** is ready for read or write, or on which errors occur; returns **0** otherwise, in which case **poll** timed out. Returns **-1** and sets **errno** to a value if this function fails to be called. - -## preadv\(\) - -``` -ssize_t preadv (int fd, const struct iovec * iov, int iovcnt, off_t offset ) -``` - - **Description:** - -Reads the data in a file whose **fd** offset is **offset** to the multi-group buffer space pointed to by **iov**. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
fdIndicates the file descriptor.
iovIndicates the pointer to the multi-group buffer.
iovcntIndicates the number of buffers. For details, see IOV_MAX.
offsetIndicates the offset of the file descriptor to read.
- -**Returns:** - -Returns the number of bytes read if the operation is successful; returns **-1** and sets **errno** to a value if the operation fails. If **errno** is set to **EINVAL**, the sum of the **iov\_len** values overflows an **ssize\_t** value, or the vector count **iovcnt** is less than 0 or greater than the permitted maximum. - -## printf\(\) - -``` -int printf (const char * format, ... ) -``` - - **Description:** - -Formats arguments based on **format** and prints formatted data to the stdout. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
formatIndicates the pointer to the format string.
...Indicates the list of arguments corresponding to the format specifiers.
- -**Attention:** - -**format** must correspond to the arguments specified in **...**. Otherwise, an error is returned. - -**Returns:** - -Returns the total number of characters \(excluding the terminating null character **'\\0'**\) if the operation is successful; returns a negative value otherwise. - -## putc\(\) - -``` -int putc (int c, [FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * stream ) -``` - - **Description:** - -Writes a character to a specified file stream. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
cIndicates the int promotion of the character to write.
streamIndicates the pointer to the file stream.
- -**Attention:** - -**Returns:** - -Returns the ASCII code of the character written if the operation is successful; returns **EOF** otherwise. - -## putc\_unlocked\(\) - -``` -int putc_unlocked (int c, [FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * stream ) -``` - - **Description:** - -Writes a character to a specified file stream with the thread remains unlocked. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
cIndicates the int promotion of the character to write.
streamIndicates the pointer to the file object that identifies a stream.
- -**Attention:** - -This function cannot be used in a multi-thread process because it does not use locking during the call. - -**Returns:** - -Returns the ASCII code of the character written if the operation is successful; returns **EOF** otherwise. - -## putchar\(\) - -``` -int putchar (int c) -``` - - **Description:** - -Writes a character into the standard output \(stdout\). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
cIndicates the int promotion of the character to write.
- -**Returns:** - -Returns the ASCII code of the character written if the operation is successful; returns **EOF** otherwise. - -## putchar\_unlocked\(\) - -``` -int putchar_unlocked (int c) -``` - - **Description:** - -Writes a character to the stdout with the thread remains unlocked. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
cIndicates the int promotion of the character to write.
- -**Attention:** - -This function cannot be used in a multi-thread process because it does not use locking during the call. - -**Returns:** - -Returns the ASCII code of the character written if the operation is successful; returns **EOF** otherwise. - -## puts\(\) - -``` -int puts (const char * s) -``` - - **Description:** - -Writes a character string and appends a new-line character to the stdout. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sIndicates the pointer to the start address of the output buffer.
- -**Returns:** - -Returns a non-negative value if the operation is successful; returns **EOF** otherwise. - -## putw\(\) - -``` -int putw (int w, [FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * stream ) -``` - - **Description:** - -Writes a word \(an int value\) to a specified file stream. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
wIndicates the word to write.
streamIndicates the pointer to the file object that identifies a stream.
- -**Attention:** - -This function is provided for compatibility with SVR4. You are advised to use [fwrite](IO.md#gaf86a4505e5de39a100f7ea828377b585) instead. - -**Returns:** - -Returns **0** if the operation is successful; returns **EOP** otherwise. - -## pwritev\(\) - -``` -ssize_t pwritev (int fd, const struct iovec * iov, int iovcnt, off_t offset ) -``` - - **Description:** - -Writes the data of a multi-group buffer space pointed to by **iov** to the offset of **fd**. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
fdIndicates the file descriptor.
iovIndicates the pointer to the multi-group buffer.
iovcntIndicates the number of buffers. For details, see IOV_MAX.
offsetIndicates the offset of the file descriptor to write.
- -**Returns:** - -Returns the number of bytes written if the operation is successful; returns **-1** and sets **errno** to a value if the operation fails. If **errno** is set to **EINVAL**, the sum of the **iov\_len** values overflows an **ssize\_t** value, or the vector count **iovcnt** is less than 0 or greater than the permitted maximum. - -## readv\(\) - -``` -ssize_t readv (int fd, const struct iovec * iov, int iovcnt ) -``` - - **Description:** - -Reads the data of **fd** to **iov**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
fdIndicates the file descriptor.
iovIndicates the pointer to the multi-group buffer.
iovcntIndicates the number of buffers. For details, see IOV_MAX.
- -**Returns:** - -Returns the number of bytes read if the operation is successful; returns **-1** and sets **errno** to a value if the operation fails. If **errno** is set to **EINVAL**, the sum of the **iov\_len** values overflows an **ssize\_t** value, or the vector count **iovcnt** is less than 0 or greater than the permitted maximum. - -## remove\(\) - -``` -int remove (const char * pathname) -``` - - **Description:** - -Deletes a specified file or directory from the file system. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
pathnameIndicates the pointer to the file or directory to delete.
- -**Attention:** - -This function can NOT be used in the PROC file system. - -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

pathname is a null pointer or an empty string.

-

ENAMETOOLONG

-

The length of pathname is greater than NAME_MAX.

-

ENOMEM

-

Insufficient memory.

-

ENOENT

-

The file or directory pointed to by pathname does not exist.

-

EPERM

-

The path is a mount point or is neither a directory nor a file.

-

ENOTEMPTY

-

When pathname points to a directory, the directory is not empty.

-

ENXIO

-

No such device or address.

-

EACCES

-

The search permission on the path prefix component is denied, or the write permission of the directory in the path is denied.

-
- -## rename\(\) - -``` -int rename (const char * oldpath, const char * newpath ) -``` - - **Description:** - -Renames a specified file. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
oldpathIndicates the pointer to the old path name of the file to rename.
newpathIndicates the pointer to the new path name of the file.
- -**Attention:** - -This function can NOT be used in the PROC file system. - -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid input parameter.

-

ENOENT

-

The file or directory does not exist.

-

EXDEV

-

oldpath and newpath are not on the same file system.

-

EBUSY

-

The device or resource is in use by the system or another process.

-

EEXIST

-

The file path pointed to by newpath already exists.

-

ENXIO

-

The device or address does not exist.

-
- -## rewind\(\) - -``` -void rewind ([FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * stream) -``` - - **Description:** - -Sets the position indicator of a specified stream to the beginning of the file. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
streamIndicates the pointer to the file object that identifies a stream.
- -## scanf\(\) - -``` -int scanf (const char * format, ... ) -``` - - **Description:** - -Reads formatted data from the stdin and stores the data to the additional arguments based on **format**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
formatIndicates the pointer to the format string.
...Indicates the list of arguments corresponding to the format specifiers.
- -**Attention:** - -The type of each argument must match a format specifier in **format**. - -**Returns:** - -Returns the number of variables that are successfully read. If the matching fails quickly, the return value may be less than the number of members in the argument list or even zero. If no complete conversion format is available or the input format fails to be matched, **EOF** is returned. The return value is also **EOF** if a reading error occurs. If the number of arguments exceeds the number of the format specifiers, the excess arguments are ignored. - -## select\(\) - -``` -int select (int nfds, [fd_set](fd_set.md) *__restrict readfds, [fd_set](fd_set.md) *__restrict writefds, [fd_set](fd_set.md) *__restrict exceptfds, struct [timeval](timeval.md) *__restrict timeout ) -``` - - **Description:** - -Monitors the I/O events of multiple file descriptors. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
nfdsIndicates the maximum value of the file descriptor of the int type.
readfdsIndicates the descriptor set of the readable event to observe, which is the fd_set * type.
writefdsIndicates the descriptor set of the writable event to observe, which is the fd_set * type.
exceptfdsIndicates the descriptor set of exception event to observe, which is the fd_set * type.
timeoutIndicates the timeout interval, which is the struct timeval * type.
- -**Returns:** - -Returns the total number of file descriptors of the observed events \(that is, the sum of all file descriptors in **readfds**, **writefds**, and **exceptfds**\) if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - -

errno

-

Description

-

EBADF

-

An invalid file descriptor is given in one of the sets.

-

EINVAL

-

nfds is less than 0.

-

ENOMEM

-

Failed to apply for memory.

-
- -## setbuf\(\) - -``` -void setbuf ([FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * stream, char * buf ) -``` - - **Description:** - -Sets a buffer to be used by a specified stream. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
streamIndicates the pointer to the file object that identifies a stream.
bufIndicates the pointer to the start address of the buffer.
- -**Attention:** - -When the input parameter **buf** is not null, the buffer mode is **\_IOFBF**. The default buffer size is determined by the value of **BUFSIZ** defined in this file. When **buf** is null, the buffer mode is **\_IONBF** \(unbuffered\). - -## setbuffer\(\) - -``` -void setbuffer ([FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * f, char * buf, size_t size ) -``` - - **Description:** - -Sets the buffer for a specified file stream. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
fIndicates the pointer to the file object that identifies a stream to set.
bufIndicates the pointer to the buffer to set.
sizeIndicates the buffer size.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - -## setlinebuf\(\) - -``` -void setlinebuf ([FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * f) -``` - - **Description:** - -Sets the linear buffer for a specified file stream. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
fIndicates the pointer to the file object that identifies a stream to set.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - -## setvbuf\(\) - -``` -int setvbuf ([FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * stream, char * buf, int mode, size_t size ) -``` - - **Description:** - -Sets the mode and size of the buffer for a specified stream. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
streamIndicates the pointer to the file object that identifies a stream.
bufIndicates the pointer to the start address of the buffer.
modeIndicates the buffer mode to set. There are three modes: _IONBF (unbuffered), _IOLBF (line buffered), and _IOFBF (fully buffered).
sizeIndicates the buffer block size when the buffer mode is _IOFBF.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## snprintf\(\) - -``` -int snprintf (char * str, size_t size, const char * format, ... ) -``` - - **Description:** - -Prints formatted data of a maximum of **size** bytes from a variable argument list to a specified string. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
strIndicates the pointer to the string to which the data is to be written.
sizeIndicates the maximum length of the destination string.
formatIndicates the pointer to the format string.
...Indicates the list of arguments corresponding to the format specifiers.
- -**Attention:** - -This function can write a maximum of size-1 valid characters to the destination string. - -**Returns:** - -Returns the number of formatted characters written \(excluding the terminating null character **'\\0'**\) if the operation is successful; returns a negative value otherwise. If the return value is a non-negative value smaller than the value of **size**, the string has been completely written. - -## sprintf\(\) - -``` -int sprintf (char * str, const char * format, ... ) -``` - - **Description:** - -Prints formatted data from a variable argument list to a specified string. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
strIndicates the pointer to the string to which the data is to be written.
formatIndicates the pointer to the format string.
...Indicates the list of arguments corresponding to the format specifiers.
- -**Returns:** - -Returns the total number of characters \(excluding the terminating null character **'\\0'**\) if the operation is successful; returns a negative value otherwise. - -## sscanf\(\) - -``` -int sscanf (const char * str, const char * format, ... ) -``` - - **Description:** - -Reads data from a character string pointed to by **str** and stores it based on **format** into the locations pointed to by the variable arguments. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
strIndicates the pointer to the character string to read.
formatIndicates the pointer to the format string.
...Indicates the list of arguments corresponding to the format specifiers.
- -**Attention:** - -An asterisk \(\*\) right after the percent symbol \(such as **%\*d** and **%\*s**\) in the format denotes that the value for the format will be read but will not be stored into a variable. - -**Returns:** - -Returns the number of fields successfully assigned to the argument list if the operation is successful; returns **0** if no fields are assigned; returns **EOF** if a reading error occurs or the end-of-file is reached during data reading. If an encoding error occurs when characters are parsed, this function sets **errno** to [EILSEQ](UTILS.md#gac6c071293826a4e66a717bb38db7794d). - -## tempnam\(\) - -``` -char* tempnam (const char * dir, const char * prefix ) -``` - - **Description:** - -Creates a temporary file with a unique file name. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
dirIndicates the pointer to directory for creating the temporary file.
prefixIndicates the pointer to the prefix of the file name.
- -**Attention:** - -Do not use this function. Use **[mkstemp\(\)](UTILS.md#ga6abe6c5eb77aeaf05ad81a7425547d9e)** or **tmpfile\(\)** instead. - -**Returns:** - -Returns the pointer to the unique name of the created temporary file if the operation is successful; returns **NULL** and sets **errno** to indicate an error otherwise. - -**See also:** - -[mkstemp\(\)](UTILS.md#ga6abe6c5eb77aeaf05ad81a7425547d9e) | tmpfile\(\) - -## ungetc\(\) - -``` -int ungetc (int c, [FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * stream ) -``` - - **Description:** - -Pushes a character back into a specified file stream. - -This function is usually used together with **getc**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
cIndicates the int promotion of the character to be pushed back.
streamIndicates the pointer to the file object that identifies a stream.
- -**Attention:** - -The pushed characters are returned in reverse order if multiple characters are pushed back. Only one pushback is guaranteed. - -**Returns:** - -Returns the character specified in **c** if the operation is successful; returns **EOF** otherwise. - -## vasprintf\(\) - -``` -int vasprintf (char ** strp, const char * fmt, va_list ap ) -``` - - **Description:** - -Prints formatted data from a variable argument list to a specified character string. - -If the length of the string is uncertain, this function applies for sufficient memory space based on the length of the formatted character string. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
strpIndicates the double pointer to the start address of the target string.
fmtIndicates the pointer to the format string.
apIndicates a value identifying a variable argument list initialized by using va_start.
- -**Attention:** - -If **strp** is no longer used, the applied space must be released. - -**Returns:** - -Returns the number of output characters if the operation is successful; returns **-1** otherwise. - -## vdprintf\(\) - -``` -int vdprintf (int fd, const char * format, va_list ap ) -``` - - **Description:** - -Prints formatted data from a variable argument list to a specified file. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
fdIndicates the file descriptor that identifies a file.
formatIndicates the pointer to the format string.
apIndicates a value identifying a variable argument list initialized by using va_start.
- -**Returns:** - -Returns the total number of written characters if the operation is successful; returns a negative value otherwise. - -## verr\(\) - -``` -void verr (int eval, const char * fmt, va_list args ) -``` - - **Description:** - -Displays error information. - -This function outputs the executable file name **argv\[0\]** and the accepted second formal parameter to stderr. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
evalThis function does not return, but exits with the value of eval.
fmtIndicates the pointer to the string to format.
argsIndicates the parameters initialized by using va_start.
- -## verrx\(\) - -``` -void verrx (int eval, const char * fmt, va_list args ) -``` - - **Description:** - -Displays a formatted error message. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
evalThis function does not return, but exits with the value of eval.
fmtIndicates the pointer to the string to format.
argsIndicates the parameters initialized by using va_start.
- -## vfprintf\(\) - -``` -int vfprintf ([FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * stream, const char * format, va_list ap ) -``` - - **Description:** - -Prints formatted data from a variable argument list to a specified file stream. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
streamIndicates the pointer to the file object that identifies a stream.
formatIndicates the pointer to the format string.
apIndicates a value identifying a variable argument list initialized by using va_start.
- -**Attention:** - -This function is generally used together with **va\_start** and **va\_end**. - -**Returns:** - -Returns the total number of characters \(excluding the terminating null character **'\\0'**\) if the operation is successful; returns a negative value otherwise. - -## vfscanf\(\) - -``` -int vfscanf ([FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * stream, const char * format, va_list ap ) -``` - - **Description:** - -Reads data from a specified file stream and stores it based on **format** into the locations pointed to by the elements in the variable argument list identified by **ap**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
streamIndicates the pointer to the file object that identifies a stream.
formatIndicates the pointer to the format string.
apIndicates a value identifying a variable argument list initialized by using va_start.
- -**Attention:** - -This function is generally used together with **va\_start** and **va\_end**. - -**Returns:** - -Returns the number of fields successfully assigned to the argument list if the operation is successful; returns **0** if no fields are assigned; returns **EOF** if a reading error occurs or the end-of-file is reached during data reading. If an encoding error occurs when characters are parsed, this function sets **errno** to [EILSEQ](UTILS.md#gac6c071293826a4e66a717bb38db7794d). - -## vprintf\(\) - -``` -int vprintf (const char * format, va_list ap ) -``` - - **Description:** - -Prints formatted data from a variable argument list to the stdout. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
formatIndicates the pointer to the format string.
apIndicates a value identifying a variable argument list initialized by using va_start.
- -**Attention:** - -This function is generally used together with **va\_start** and **va\_end**. - -**Returns:** - -Returns the total number of characters \(excluding the terminating null character **'\\0'**\) if the operation is successful; returns a negative value otherwise. - -## vscanf\(\) - -``` -int vscanf (const char * format, va_list ap ) -``` - - **Description:** - -Reads data from the stdin and stores it based on **format** into the locations pointed to by the elements in the variable argument list identified by **ap**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
formatIndicates the pointer to the format string.
apIndicates a value identifying a variable argument list initialized by using va_start.
- -**Attention:** - -This function is generally used together with **va\_start** and **va\_end**. - -**Returns:** - -Returns the number of fields successfully assigned to the argument list if the operation is successful; returns **0** if no fields are assigned; returns **EOF** if a reading error occurs or the end-of-file is reached during data reading. If an encoding error occurs when characters are parsed, this function sets **errno** to [EILSEQ](UTILS.md#gac6c071293826a4e66a717bb38db7794d). - -## vsnprintf\(\) - -``` -int vsnprintf (char * str, size_t size, const char * format, va_list ap ) -``` - - **Description:** - -Prints formatted data of a maximum of **size** bytes from a variable argument list to a specified string. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
strIndicates the pointer to the destination character string.
sizeIndicates the maximum length of the destination string.
formatIndicates the pointer to the format string.
apIndicates a value identifying a variable argument list initialized by using va_start.
- -**Attention:** - -This function can write a maximum of size-1 characters to the destination string. - -**Returns:** - -Returns the number of formatted characters written \(excluding the terminating null character **'\\0'**\) if the operation is successful; returns a negative value otherwise. If the return value is a non-negative value smaller than the value of **size**, the string has been completely written. - -## vsprintf\(\) - -``` -int vsprintf (char * str, const char * format, va_list ap ) -``` - - **Description:** - -Prints formatted data from a variable argument list to a specified string. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
strIndicates the pointer to the destination character string.
formatIndicates the pointer to the format string.
apIndicates a value identifying a variable argument list initialized by using va_start.
- -**Returns:** - -Returns the total number of characters written \(excluding the terminating null character **'\\0'**\) if the operation is successful; returns a negative value otherwise. - -## vsscanf\(\) - -``` -int vsscanf (const char * str, const char * format, va_list ap ) -``` - - **Description:** - -Reads data from a specified string and stores it based on **format** into the locations pointed to by the elements in the variable argument list identified by **ap**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
strIndicates the pointer to the character string to read.
formatIndicates the pointer to the format string.
apIndicates a value identifying a variable argument list initialized by using va_start.
- -**Attention:** - -This function is generally used together with **va\_start** and **va\_end**. - -**Returns:** - -Returns the number of fields successfully assigned to the argument list if the operation is successful; returns **0** if no fields are assigned; returns **EOF** if a reading error occurs or the end-of-file is reached during data reading. If an encoding error occurs when characters are parsed, this function sets **errno** to [EILSEQ](UTILS.md#gac6c071293826a4e66a717bb38db7794d). - -## vwarn\(\) - -``` -void vwarn (const char * fmt, va_list args ) -``` - - **Description:** - -Displays a formatted error message on the stderr output. - -If the **fmt** parameter is not **NULL**, stderr displays the error code description obtained from strerror\(errno\), followed by a space and a colon \(:\), and the error message to print. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
fmtIndicates the pointer to the string to format.
argsIndicates the parameters initialized by using va_start.
- -## vwarnx\(\) - -``` -void vwarnx (const char * fmt, va_list args ) -``` - - **Description:** - -Displays a formatted error message on the stderr output. - -If the **fmt** parameter is not **NULL**, stderr displays the error code description obtained from strerror\(errno\), followed by a space and a colon \(:\), and the error message to print. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
fmtIndicates the pointer to the string to format.
argsIndicates the parameters initialized by using va_start.
- -## warn\(\) - -``` -void warn (const char * fmt, ... ) -``` - - **Description:** - -Displays a formatted error message on the standard error \(stderr\) output. - -If the **fmt** parameter is not **NULL**, stderr displays the error code description obtained from strerror\(errno\), followed by a space and a colon \(:\), and the error message to print. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
fmtIndicates the pointer to the string to format.
...Indicates the parameters corresponding to the format declaration.
- -## warnx\(\) - -``` -void warnx (const char * fmt, ... ) -``` - - **Description:** - -Displays a formatted error message on the stderr output. - -If the **fmt** parameter is not **NULL**, stderr displays the error code description obtained from strerror\(errno\), followed by a space and a colon \(:\), and the error message to print. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
fmtIndicates the pointer to the string to format.
...Indicates the parameters corresponding to the format declaration.
- -## writev\(\) - -``` -ssize_t writev (int fd, const struct iovec * iov, int iovcnt ) -``` - - **Description:** - -Writes a given length of data into a file. - -This function is used to write the **iovcnt** length of **iov** to **fd**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
fdIndicates the file descriptor.
iovIndicates the pointer to the multi-group buffer.
iovcntIndicates the number of buffers. For details, see IOV_MAX.
- -**Returns:** - -Returns the number of bytes written if the operation is successful; returns **-1** and sets **errno** to a value if the operation fails. If **errno** is set to **EINVAL**, the sum of the **iov\_len** values overflows an **ssize\_t** value, or the vector count **iovcnt** is less than 0 or greater than the permitted maximum. - diff --git "a/api/api-SmartVision-Devices/IOT\345\255\220\347\263\273\347\273\237.md" "b/api/api-SmartVision-Devices/IOT\345\255\220\347\263\273\347\273\237.md" deleted file mode 100755 index bcf745d9f0af870261e8f8316025884420a802a7..0000000000000000000000000000000000000000 --- "a/api/api-SmartVision-Devices/IOT\345\255\220\347\263\273\347\273\237.md" +++ /dev/null @@ -1,2 +0,0 @@ -# IOT子系统 - diff --git "a/api/api-SmartVision-Devices/IOT\345\271\263\345\217\260.md" "b/api/api-SmartVision-Devices/IOT\345\271\263\345\217\260.md" deleted file mode 100755 index 660c26430d7fbf48d902b44fa00da91c6f8c8fe2..0000000000000000000000000000000000000000 --- "a/api/api-SmartVision-Devices/IOT\345\271\263\345\217\260.md" +++ /dev/null @@ -1,5 +0,0 @@ -# IOT平台 - -- **[IOT子系统](IOT子系统.md)** - - diff --git a/api/api-SmartVision-Devices/IPC.md b/api/api-SmartVision-Devices/IPC.md deleted file mode 100755 index f2cb53e643f7c4d53915f0e64c51c8916da2a2d2..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/IPC.md +++ /dev/null @@ -1,2908 +0,0 @@ -# IPC - -- [Overview](#section1091545606165622) -- [Summary](#section1598747749165622) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Macros](#define-members) -- [Typedefs](#typedef-members) -- [Functions](#func-members) -- [Details](#section429935514165622) -- [Function](#section870563513165622) -- [kill\(\)](#ga4539db972bcf3dd8c8b429af0dc3789d) -- [mq\_close\(\)](#ga3fbd3906296be63451c64d69be2bc371) -- [mq\_getattr\(\)](#ga8fafe8b1183830322f8ff875f4e6cb4c) -- [mq\_open\(\)](#gaf5d8bf423701bd1783849119511381a5) -- [mq\_receive\(\)](#gafcd715bf914289ca502136ef7022eab7) -- [mq\_send\(\)](#ga2d07e256d809a61bdc82178cb0dd1ba1) -- [mq\_setattr\(\)](#gaf5cc07adf7823fac8611200b55fc3a27) -- [mq\_timedreceive\(\)](#gaa291cc1bc8bb02fd24bd0d4c563350f4) -- [mq\_timedsend\(\)](#gae59709d01cc34d009edfeae9900568cb) -- [mq\_unlink\(\)](#gaccd8c5ee36e60d990963e1d544ef4140) -- [psignal\(\)](#gada1fed9730b224a68e768e5f2eac53ff) -- [pthread\_sigmask\(\)](#ga8ca5be75c386a4aacd17be00721bf0f8) -- [raise\(\)](#ga350675984ca13ce9b056e69098bda5c6) -- [sem\_close\(\)](#ga4e398fea1080fd7919e5c72ee94e2fc5) -- [sem\_destroy\(\)](#ga6bc9a7dd941a9b5e319715b767af5682) -- [sem\_getvalue\(\)](#ga934bcc3cbc0c67a9e3a8e7a43c023460) -- [sem\_init\(\)](#ga532509bd8a6499f8193253192fb83a3d) -- [sem\_post\(\)](#ga015dce85cab8477c679cc47968958247) -- [sem\_timedwait\(\)](#ga9d832817226c594e7628e2cc7ed7d723) -- [sem\_trywait\(\)](#ga4de7a9a334b01b6373b017aaefa07cf0) -- [sem\_unlink\(\)](#ga776256d1a473906f8b7490689bfcb75c) -- [sem\_wait\(\)](#gaad70020dca2241a2b78e272ca033271b) -- [sigaction\(\)](#ga5263ce0feb3eb0934bc56ab81cae8ddb) -- [sigaddset\(\)](#gae412e6a5436a6c28424b0173251d349c) -- [sigandset\(\)](#ga2a0910ff9d18931a05b995143dc4576e) -- [sigdelset\(\)](#gab0025e4f32ce2737c40cc0074cc6d7d2) -- [sigemptyset\(\)](#ga5925352f90eb589393274fa0376d7def) -- [sigfillset\(\)](#ga88d7bbc77ea1569ee21c90db549ea023) -- [sighold\(\)](#ga4378a40ea3370c436d4e46c7a2a58172) -- [sigisemptyset\(\)](#gac41035aa05cb4523ae93e8a6d55f9453) -- [sigismember\(\)](#ga63693cc65f43d772729b588b453fe1ef) -- [signal\(\)](#gaf0f8ed40d30773bdb68e858ef0139b58) -- [sigorset\(\)](#ga1a0d037b7fd84fb392a4c2ffc6c3525c) -- [sigpause\(\)](#ga95a78da8c44db11c7031b678504d0b34) -- [sigpending\(\)](#ga7b91eecad5998acd6162fde3ab530d7a) -- [sigprocmask\(\)](#gae11d1cbeb529d0050ab5600fe4b5fef9) -- [sigrelse\(\)](#ga96c4aed60b8b727709887e1fae0f5bea) -- [sigsuspend\(\)](#gae5f92586ad50092a7813465eeef792c0) -- [sigtimedwait\(\)](#ga155a526c3da5ffd1a79ba2925bdd278a) -- [sigwait\(\)](#ga900d91a9635b965dbbae6b3cee2d2a2b) -- [sigwaitinfo\(\)](#ga786f18a8e5b7eceed0ddcdc722f3340b) - -## **Overview** - -**Description:** - -Provides functions and structures related to inter-process communication \(IPC\), including signals, semaphores, and message queues. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - - - - - - - - - - - - - -

File Name

-

Description

-

ipcstat.h

-

Defines the macros related to the IPC functions.

-

mqueue.h

-

Provides message queue operation functions and related structures.

-

semaphore.h

-

Provides functions and structures related to semaphore operations.

-

signal.h

-

Provides signal operation functions and structures, including changing the signal processing mode and the process signal mask set.

-

ipc.h

-

Defines IPC-related macros.

-
- -## Data Structures - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

mq_attr

-

Describes message queue attributes.

-

sem_t

-

Defines semaphores.

-

sigaltstack

-

Describes a signal stack.

-

__ucontext

-

Describes the user execution context.

-

__sigset_t

-

Defines the data type of a signal set.

-

sigval

-

Describes signal values in different cases.

-

__si_fields

-

Describes signal information.

-

sigaction

-

Describes the signal processing actions and related attributes.

-

sigevent

-

Describes asynchronous notifications.

-
- -## Macros - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

IPC_STAT 2

-

Defines the input parameter used to obtain information from the kernel.

-

SEM_FAILED ((sem_t *)0)

-

Defines the semaphore failure flag.

-

SA_NOCLDSTOP 1

-

Stops a child process without sending the SIGCHLD signal.

-

SA_NOCLDWAIT 2

-

Sets the SIGCHLD flag to prevent zombie processes.

-

SA_SIGINFO 4

-

Transfers the siginfo_t structure with the signal.

-

SA_ONSTACK 0x08000000

-

Uses the signal stack specified by sigaltstack for signal processing.

-

SA_RESTART 0x10000000

-

Obtains the restart signal.

-

SA_NODEFER 0x40000000

-

The signals being processed are not masked during signal processing.

-

SA_RESETHAND 0x80000000

-

The default processing mode is restored after the signal processing is complete.

-

MINSIGSTKSZ 2048

-

Defines the minimum size of the replaceable signal stack.

-

SIGSTKSZ 8192

-

Defines the size of a signal stack.

-

_NSIG 65

-

Number of supported signals.

-

_NSIG_BPW __BITS_PER_LONG

-

Number of bits occupied by a word.

-

_NSIG_WORDS (_NSIG / _NSIG_BPW)

-

Number of words required by all signals.

-

SIGHUP 1

-

Hangs up a process.

-

SIGINT 2

-

Interrupts a process from keyboard.

-

SIGQUIT 3

-

Exits a process from keyboard. A core file is generated.

-

SIGILL 4

-

Illegal instruction.

-

SIGTRAP 5

-

Breakpoint, used for debugging.

-

SIGABRT 6

-

Abnormal termination.

-

SIGIOT 6

-

Equivalent to SIGABRT.

-

SIGBUS 7

-

Invalid address access.

-

SIGFPE 8

-

Floating-point exceptions.

-

SIGKILL 9

-

Forcibly stops a process.

-

SIGUSR1 10

-

User-defined signal 1.

-

SIGSEGV 11

-

Illegal memory access.

-

SIGUSR2 12

-

User-defined signal 2.

-

SIGPIPE 13

-

The pipe is broken.

-

SIGALRM 14

-

Timer signal.

-

SIGTERM 15

-

Termination signal.

-

SIGSTKFLT 16

-

Coprocessor stack error.

-

SIGCHLD 17

-

Child process terminated or stopped.

-

SIGCONT 18

-

Resumes a suspended process.

-

SIGSTOP 19

-

Suspends a process.

-

SIGTSTP 20

-

Stops a process by entering the command on the terminal.

-

SIGTTIN 21

-

Input required by the background process.

-

SIGTTOU 22

-

Output required by the background process.

-

SIGURG 23

-

Urgent socket condition.

-

SIGXCPU 24

-

CPU time limit exceeded.

-

SIGXFSZ 25

-

File size limit exceeded.

-

SIGVTALRM 26

-

Virtual timer, used to calculate the CPU occupation time of a process.

-

SIGPROF 27

-

Calculates the CPU time occupied by a process and the system calling time.

-

SIGWINCH 28

-

Window size change.

-

SIGIO 29

-

Input/Output.

-

SIGPOLL SIGIO

-

Equivalent to SIGIO.

-

SIGPWR 30

-

Power failure.

-

SIGSYS 31

-

Non-existent system call.

-

SIGUNUSED 31

-

Equivalent to SIGSYS.

-

SIGRTMIN 32

-

Start of a reliable signal.

-

SIGRTMAX _NSIG

-

End of a reliable signal.

-

SA_THIRTYTWO 0x02000000

-

Transfers signals in a 32-bit mode even if the task runs in a 26-bit mode.

-

SA_NOMASK SA_NODEFER

-

Signals being processed are not masked during signal processing.

-

SA_ONESHOT SA_RESETHAND

-

The default processing mode is restored after the signal processing is complete.

-

SIG_BLOCK 0

-

Defines the function behaviors such as sigprocmask() and pthread_sigmask(), which are used to add signals to the mask set.

-

SIG_UNBLOCK 1

-

Defines the function behaviors such as sigprocmask() and pthread_sigmask(), which are used to remove signals from the mask set.

-

SIG_SETMASK 2

-

Defines the function behaviors such as sigprocmask() and pthread_sigmask(), which are used to set the mask set.

-

SIG_HOLD ((void (*)(int)) 2)

-

Defines the function behaviors such as sigset() and adds a specified signal to the process signal mask without changing the current processing mode of the signal.

-

sa_handler __sa_handler.sa_handler

-

Defines the simplified writing used to indicate the __sa_handler.sa_handler field in sigaction.

-

sa_sigaction __sa_handler.sa_sigaction

-

Defines the simplified writing used to indicate the __sa_handler.sa_sigaction field in sigaction.

-

SIGEV_SIGNAL 0

-

Sets the notification method in sigevent: signal notification.

-

SIGEV_NONE 1

-

Sets the notification method in sigevent: no notification.

-

SIGEV_THREAD 2

-

Sets the notification method in sigevent: thread notification.

-

SIG_ERR ((__sighandler_t)-1)

-

Defines the value returned when a function such as signal() fails.

-

SIG_DFL ((__sighandler_t)0)

-

Defines the default signal processing mode.

-

SIG_IGN ((__sighandler_t)1)

-

Defines the signal processing mode in which the signal is ignored.

-

IPC_CREAT 01000

-

Defines the input parameter used to create an IPC object.

-

IPC_EXCL 02000

-

Defines the input parameter used together with IPC_CREAT to prevent duplicate key values during IPC creation.

-

IPC_NOWAIT 04000

-

Defines the input parameter that specifies whether the communication is in non-blocking mode.

-

IPC_RMID 0

-

Defines the input parameter used to delete an IPC object.

-

IPC_SET 1

-

Defines the input parameter used to set information to the kernel.

-

IPC_INFO 3

-

Defines the input parameter used to obtain the system-level restriction information of a specified communication type, for example, shminfo.

-

IPC_PRIVATE ((key_t) 0)

-

Defines the IPC object as a private object.

-
- -## Typedefs - - - - - - - - - - - - - - - - -

Typedef Name

-

Description

-

mqd_t

-

typedef int

-

Represents the data type of a message queue.

-

ucontext_t

-

typedef struct __ucontext

-

Describes the user execution context.

-

sighandler_t ) (int)

-

typedef void(*

-

Function pointer of signal handler.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

mq_close (mqd_t mqdes)

-

int

-

Closes a message queue that is no longer used.

-

mq_getattr (mqd_t mqdes, struct mq_attr *attr)

-

int

-

Obtains the attributes of the message queue specified by the descriptor. The values of mq_maxmsg, mq_msgsize, and mq_curmsgs are fixed.

-

mq_open (const char *name, int oflag,...)

-

mqd_t

-

Creates a message queue or opens an existing message queue.

-

mq_receive (mqd_t mqdes, char *buffer, size_t size, unsigned *prioptr)

-

ssize_t

-

Receives a message from a specified message queue.

-

mq_send (mqd_t mqdes, const char *buffer, size_t size, unsigned prio)

-

int

-

Sends a message to a specified message queue.

-

mq_setattr (mqd_t mqdes, const struct mq_attr *__restrict newattr, struct mq_attr *__restrict oldattr)

-

int

-

Sets the attributes of the message queue specified by the descriptor. The mq_maxmsg, mq_msgsize, and mq_curmsgs attributes cannot be modified. mq_flags supports the O_NONBLOCK attribute only.

-

mq_timedreceive (mqd_t mqdes, char *__restrict buffer, size_t size, unsigned *__restrict prioptr, const struct timespec *__restrict timeout)

-

ssize_t

-

Receives a message from the message queue, with a timeout period specified.

-

mq_timedsend (mqd_t mqdes, const char *buffer, size_t size, unsigned prio, const struct timespec *timeout)

-

int

-

Sends a message to a specified message queue, with a timeout period specified.

-

mq_unlink (const char *name)

-

int

-

Decreases the reference count of the message queue by 1, or deletes the message queue if the reference count is 0.

-

sem_close (sem_t *sem)

-

int

-

Closes a specified semaphore.

-

sem_destroy (sem_t *sem)

-

int

-

Destroys a specified anonymous semaphore that is no longer used.

-

sem_getvalue (sem_t *__restrict sem, int *__restrict sval)

-

int

-

Obtains the count value of a specified semaphore.

-

sem_init (sem_t *sem, int pshared, unsigned int value)

-

int

-

Creates and initializes an anonymous semaphore.

-

sem_post (sem_t *sem)

-

int

-

Increments the semaphore count by 1.

-

sem_timedwait (sem_t *__restrict sem, const struct timespec *__restrict timeout)

-

int

-

Obtains the semaphore, with a timeout period specified.

-

sem_trywait (sem_t *sem)

-

int

-

Attempts to obtain the semaphore.

-

sem_unlink (const char *name)

-

int

-

Deletes a specified semaphore.

-

sem_wait (sem_t *sem)

-

int

-

Obtains the semaphore.

-

kill (pid_t pid, int sig)

-

int

-

Sends a signal to a specified process.

-

sigemptyset (sigset_t *set)

-

int

-

Clears all signals in a specified signal set.

-

sigfillset (sigset_t *set)

-

int

-

Adds all signals to a specified signal set.

-

sigaddset (sigset_t *set, int signum)

-

int

-

Adds a signal to a specified signal set.

-

sigdelset (sigset_t *set, int signum)

-

int

-

Delete a signal from a specified signal set.

-

sigismember (const sigset_t *set, int signum)

-

int

-

Checks whether a signal is in the signal set.

-

sigprocmask (int how, const sigset_t *__restrict set, sigset_t *__restrict oldset)

-

int

-

Changes the signal mask of the calling thread.

-

sigsuspend (const sigset_t *mask)

-

int

-

Sets mask as the signal mask set of the current process and suspends the process until a signal processing action is triggered.

-

sigaction (int signum, const struct sigaction *__restrict act, struct sigaction *__restrict oldact)

-

int

-

Checks or changes the processing action associated with a specified signal. Do not use the process creation function or thread creation function in the registered callback processing function. Otherwise, the process is abnormal. For example, do not use the fork or pthread_create function.

-

sigpending (sigset_t *set)

-

int

-

Obtains the signal suspended by the current thread.

-

sigwait (const sigset_t *__restrict set, int *__restrict sig)

-

int

-

Suspends the calling thread and waits for the signal.

-

sigwaitinfo (const sigset_t *__restrict set, siginfo_t *__restrict info)

-

int

-

Suspends the calling thread and waits for the signal, with a timeout period specified.

-

sigtimedwait (const sigset_t *__restrict set, siginfo_t *__restrict info, const struct timespec *__restrict timeout)

-

int

-

Suspends the calling thread and waits for the signal, with a timeout period specified.

-

pthread_sigmask (int how, const sigset_t *__restrict set, sigset_t *__restrict oldset)

-

int

-

Checks or changes the signal mask of the calling thread.

-

psignal (int signum, const char *s)

-

void

-

Prints signal information.

-

sigpause (int signum)

-

int

-

Deletes the signal specified by signum from the signal mask of the calling process and suspends the process until the signal is received.

-

sighold (int signum)

-

int

-

Adds the signal specified by signum to the signal mask of the calling process.

-

sigrelse (int signum)

-

int

-

Deletes the signal specified by signum from the signal mask of the calling process.

-

sigisemptyset (const sigset_t *set)

-

int

-

Checks whether the signal set is empty.

-

sigorset (sigset_t *dest, const sigset_t *left, const sigset_t *right)

-

int

-

Adds the union set of left and right to dest.

-

sigandset (sigset_t *dest, const sigset_t *left, const sigset_t *right)

-

int

-

Adds the intersection of left and right to dest.

-

signal (int signum, sighandler_t handler)

-

sighandler_t

-

Changes the processing action of a specified signal. Do not use the process creation function or thread creation function in the registered callback processing function. Otherwise, the process is abnormal. For example, do not use the fork or pthread_create function.

-

raise (int signum)

-

int

-

Sends a signal to the calling process.

-
- -## **Details** - -## **Function ** - -## kill\(\) - -``` -int kill ([pid_t](UTILS.md#ga30c34d3eead853c44f459f21b932984c) pid, int sig ) -``` - - **Description:** - -Sends a signal to a specified process. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
pidIndicates the target process ID. Parameters 0 and -1 are not supported.
sigIndicates the signal to be sent.
- -**Attention:** - -The default signal behavior does not support **STOP** and **CONTINUE**, and **COREDUMP** is not involved. [SIGSTOP](IPC.md#ga069e358bc9a864b7dc4fed2440eda14c), [SIGKILL](IPC.md#gaddd8dcd406ce514ab3b4f576a5343d42), and [SIGCONT](IPC.md#ga024f43063003e753afc6cca1acd6e104) cannot be masked. If a process is killed but its parent process is not recycled, a zombie process will be generated. After an asynchronous signal is sent to a process, the signal callback is executed only after the process is scheduled. The kernel cannot forcibly kill the process by using the signal. After the process is killed, [SIGCHLD](IPC.md#ga0e63521a64cc8bc2b91d36a87d32c9f8) is sent to its parent process. The sending action cannot be canceled. A sleeping process cannot be woken up by a signal. For example, a process invokes the **sleep** function to enter the sleeping state. Currently, suspended and zombie processes cannot be forcibly killed. - -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

sig is invalid.

-

EPERM

-

The current process does not have permission to send the signal to the target process.

-
- -## mq\_close\(\) - -``` -int mq_close ([mqd_t](IPC.md#ga4820b065fbcbb30569e78e64ef5ad809) mqdes) -``` - - **Description:** - -Closes a message queue that is no longer used. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
mqdesIndicates the descriptor of the message queue to be closed.
- -**Returns:** - -Returns **0** if the message queue is closed; returns **-1** and sets **errno** to a value in the following table if the message queue fails to be closed. - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EBADF

-

mqdes is invalid.

-

EAGAIN

-

Failed to delete the message queue in the function.

-

EFAULT

-

Failed to release the space allocated with the message queue.

-

EINVAL

-

mqdes is invalid when the message queue is deleted in the function.

-
- -## mq\_getattr\(\) - -``` -int mq_getattr ([mqd_t](IPC.md#ga4820b065fbcbb30569e78e64ef5ad809) mqdes, struct [mq_attr](mq_attr.md) * attr ) -``` - - **Description:** - -Obtains the attributes of the message queue specified by the descriptor. The values of **mq\_maxmsg**, **mq\_msgsize**, and **mq\_curmsgs** are fixed. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
mqdesIndicates the message queue descriptor.
attrIndicates the pointer to the obtained message queue attributes.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - -

errno

-

Description

-

EBADF

-

mqdes is invalid.

-

EINVAL

-

attr is NULL.

-
- -## mq\_open\(\) - -``` -[mqd_t](IPC.md#ga4820b065fbcbb30569e78e64ef5ad809) mq_open (const char * name, int oflag, ... ) -``` - - **Description:** - -Creates a message queue or opens an existing message queue. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
nameIndicates the name of the message queue to be created or opened. The maximum value is 259 bytes.
oflagIndicates the open flag, including O_RDONLY, O_WRONLY, O_RDWR, O_CREAT, O_EXCL, and O_NONBLOCK.
modeUsed for permission control (not supported currently). Its type is mode_t. This is parameter is required only during the creation of a message queue.
attrIndicates the pointer to the queue attributes to be set. Its type is struct mq_attr. This parameter is optional and is used only during the creation of a message queue.
- -**Attention:** - -The message consists of 64 bytes by default, and the maximum length of the message is 64 KB. A maximum of 1024 message queues can be created. The mq\_curmsgs field in [mq\_attr](mq_attr.md) is not supported. - -**Returns:** - -Returns a message queue descriptor if the creation or opening is successful; returns **\(mqd\_t\)-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EEXIST

-

Both O_CREAT and O_EXCL are specified in oflag, and a queue with this name already exists.

-

EINVAL

-

O_CREAT is specified in oflag, and attr is invalid. To be specific, the attribute value of the mq_maxmsg field is less than 0 or greater than USHRT_MAX, or the attribute value of mq_msgsize is less than 0 or greater than USHRT_MAX-4. name is NULL, or the length of the string specified by name is 0.

-

ENAMETOOLONG

-

name is too long.

-

ENOENT

-

O_CREAT is not specified in oflag, and no queue with this name exists.

-

ENOSPC

-

Insufficient memory.

-

ENFILE

-

The number of opened message queues exceeds the maximum.

-
- -## mq\_receive\(\) - -``` -ssize_t mq_receive ([mqd_t](IPC.md#ga4820b065fbcbb30569e78e64ef5ad809) mqdes, char * buffer, size_t size, unsigned * prioptr ) -``` - - **Description:** - -Receives a message from a specified message queue. - -The message queue must have been open by [mq\_open\(\)](IPC.md#gaf5d8bf423701bd1783849119511381a5). - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
mqdesIndicates the message queue descriptor.
bufferIndicates the pointer to the buffer for receiving the message.
sizeIndicates the size of the buffer for receiving the message.
prioptrIndicates the priority of the received message if the value is not NULL. This parameter is not used because priority-based message processing is not supported.
- -**Returns:** - -Returns the number of bytes in the received message if the message is received; returns **\(mqd\_t\)-1** and sets **errno** to a value in the following table if the message fails to be received. - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINTR

-

Message receiving is interrupted.

-

EAGAIN

-

The message queue is empty, and O_NONBLOCK is set for the message queue associated with mqdes.

-

EBADF

-

mqdes is invalid or you do not have the read permission.

-

EMSGSIZE

-

The size of the buffer for receiving the message is less than the message size attribute of the message queue.

-

EINVAL

-

mqdes is NULL or the value of size is 0.

-
- -## mq\_send\(\) - -``` -int mq_send ([mqd_t](IPC.md#ga4820b065fbcbb30569e78e64ef5ad809) mqdes, const char * buffer, size_t size, unsigned prio ) -``` - - **Description:** - -Sends a message to a specified message queue. - -The message queue must have been opened using [mq\_open\(\)](IPC.md#gaf5d8bf423701bd1783849119511381a5). - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
mqdesIndicates the message queue descriptor.
bufferIndicates the pointer to the buffer for receiving the message.
sizeIndicates the size of the buffer for receiving the message.
prioIndicates the priority of the message to be sent. This parameter must be 0 because priority-based message processing is not supported.
- -**Returns:** - -Returns **0** if the message is sent; returns **-1** and sets **errno** to a value in the following table if the message fails to be sent. - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINTR

-

Message sending is interrupted.

-

EAGAIN

-

The message queue is full, and O_NONBLOCK is set for the message queue associated with mqdes.

-

EBADF

-

mqdes is invalid or you do not have the write permission.

-

EINVAL

-

mqdes is NULL or the value of size is 0.

-

EMSGSIZE

-

The size of the message to be sent is greater than the message size attribute of the message queue.

-

EOPNOTSUPP

-

The operation is not supported.

-

ENOSPC

-

Insufficient space.

-
- -## mq\_setattr\(\) - -``` -int mq_setattr ([mqd_t](IPC.md#ga4820b065fbcbb30569e78e64ef5ad809) mqdes, const struct [mq_attr](mq_attr.md) *__restrict newattr, struct [mq_attr](mq_attr.md) *__restrict oldattr ) -``` - - **Description:** - -Sets the attributes of the message queue specified by the descriptor. The **mq\_maxmsg**, **mq\_msgsize**, and **mq\_curmsgs** attributes cannot be modified. **mq\_flags** supports the **O\_NONBLOCK** attribute only. - -The message queue must have been opened using [mq\_open\(\)](IPC.md#gaf5d8bf423701bd1783849119511381a5). - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
mqdesIndicates the message queue descriptor.
newattrIndicates the pointer to the message queue attribute to be set.
oldattrIndicates the pointer to the original attribute.
- -**Returns:** - -Returns **0** if the setting is successful; returns **-1** and sets **errno** to a value in the following table if the setting fails. - - - - - - - - - - - - - -

errno

-

Description

-

EBADF

-

mqdes is invalid.

-

EINVAL

-

newattr is NULL.

-
- -## mq\_timedreceive\(\) - -``` -ssize_t mq_timedreceive ([mqd_t](IPC.md#ga4820b065fbcbb30569e78e64ef5ad809) mqdes, char *__restrict buffer, size_t size, unsigned *__restrict prioptr, const struct [timespec](timespec.md) *__restrict timeout ) -``` - - **Description:** - -Receives a message from the message queue, with a timeout period specified. - -The message queue must have been open by [mq\_open\(\)](IPC.md#gaf5d8bf423701bd1783849119511381a5). - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
mqdesIndicates the message queue descriptor.
bufferIndicates the pointer to the buffer for receiving the message.
sizeIndicates the size of the buffer for receiving the message.
prioptrIndicates the priority of the received message if the value is not NULL. This parameter is not used because priority-based message processing is not supported.
timeoutIndicates the timeout duration for returning a request.
- -**Returns:** - -Returns the number of bytes in the message if the message is received; returns **\(mqd\_t\)-1** and sets **errno** to a value in the following table if the message fails to be received. - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINTR

-

Message receiving is interrupted.

-

EAGAIN

-

The message queue is empty, and O_NONBLOCK is set for the message queue associated with mqdes.

-

EBADF

-

mqdes is invalid or you do not have the read permission.

-

EINVAL

-

mqdes is NULL or the value of size is 0. timeout is invalid. Specifically, the value of tv_sec is less than 0, and the value of tv_nsec is less than 0 or greater than the ninth power of 10.

-

EMSGSIZE

-

The size of the buffer for receiving the message is less than the message size attribute of the message queue.

-

ETIMEDOUT

-

No message is received from the queue before the specified timeout period expires.

-
- -## mq\_timedsend\(\) - -``` -int mq_timedsend ([mqd_t](IPC.md#ga4820b065fbcbb30569e78e64ef5ad809) mqdes, const char * buffer, size_t size, unsigned prio, const struct [timespec](timespec.md) * timeout ) -``` - - **Description:** - -Sends a message to a specified message queue, with a timeout period specified. - -The message queue must have been open by [mq\_open\(\)](IPC.md#gaf5d8bf423701bd1783849119511381a5). - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
mqdesIndicates the message queue descriptor.
bufferIndicates the pointer to the buffer for sending the message.
sizeIndicates the size of the message to be sent.
prioIndicates the priority of the message to be sent. This parameter must be 0 because priority-based message processing is not supported.
timeoutIndicates the timeout duration for returning a request.
- -**Returns:** - -Returns **0** if the message is sent; returns **-1** and sets **errno** to a value in the following table if the message fails to be sent. - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINTR

-

Message sending is interrupted.

-

EAGAIN

-

The message queue is full, and O_NONBLOCK is set for the message queue associated with mqdes.

-

EBADF

-

mqdes is invalid or you do not have the write permission.

-

EINVAL

-

mqdes is NULL or the value of size is 0. timeout is invalid. Specifically, the value of tv_sec is less than 0, and the value of tv_nsec is less than 0 or greater than the ninth power of 10.

-

EMSGSIZE

-

The size of the message to be sent is greater than the message size attribute of the message queue.

-

EOPNOTSUPP

-

The operation is not supported.

-

ETIMEDOUT

-

No message is sent to the queue before the specified timeout period expires.

-
- -## mq\_unlink\(\) - -``` -int mq_unlink (const char * name) -``` - - **Description:** - -Decreases the reference count of the message queue by 1, or deletes the message queue if the reference count is **0**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
nameIndicates the message queue name.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

ENAMETOOLONG

-

name is too long.

-

ENOENT

-

There is no message queue with the given name.

-

EAGAIN

-

Failed to delete the message queue.

-

EBUSY

-

The message queue to be deleted is being used.

-

EINVAL

-

name is NULL, or the length of the string specified by name is 0.

-
- -## psignal\(\) - -``` -void psignal (int signum, const char * s ) -``` - - **Description:** - -Prints signal information. - -This function is used to print a message on the standard error output. The message consists of the character string **s**, a colon, a space, a string describing the signal information **signum**, and a newline character. If the string **s** is **NULL** or empty, the colon and space are omitted. If **signum** is invalid, the message displayed will indicate an unknown signal. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
signumIndicates the signal to be operated.
sIndicates the customized string s to be printed.
- -## pthread\_sigmask\(\) - -``` -int pthread_sigmask (int how, const sigset_t *__restrict set, sigset_t *__restrict oldset ) -``` - - **Description:** - -Checks or changes the signal mask of the calling thread. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
howIndicates the function behavior.
setIndicates the signal set to be changed.
oldsetUsed for returning the original mask set of the calling thread.
- - - - - - - - - - - - - - - - -

flags

-

Description

-

SIG_BLOCK

-

Adds the signals in set to the mask set of the thread.

-

SIG_UNBLOCK

-

Removes the signals in set from the mask set of the thread.

-

SIG_SETMASK

-

Sets set of blocked signals as the mask set of the thread.

-
- -**Returns:** - -Returns **0** if the change is successful; returns **errno** as described below if the change fails. - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

how is invalid.

-

EFAULT

-

The set or oldset points outside the process's allocated address space.

-
- -## raise\(\) - -``` -int raise (int signum) -``` - - **Description:** - -Sends a signal to the calling process. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
signumIndicates the signal to be sent.
- -**Returns:** - -Returns 0 if the operation is successful; returns nonzero if the operation fails. - -## sem\_close\(\) - -``` -int sem_close ([sem_t](sem_t.md) * sem) -``` - - **Description:** - -Closes a specified semaphore. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
semIndicates the pointer to the semaphore to close.
- -**Returns:** - -Returns **0** if the semaphore is closed. errno | Description - -## sem\_destroy\(\) - -``` -int sem_destroy ([sem_t](sem_t.md) * sem) -``` - - **Description:** - -Destroys a specified anonymous semaphore that is no longer used. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
semIndicates the pointer to the semaphore to destroy.
- -**Returns:** - -Returns **0** if the destruction is successful. - -## sem\_getvalue\(\) - -``` -int sem_getvalue ([sem_t](sem_t.md) *__restrict sem, int *__restrict sval ) -``` - - **Description:** - -Obtains the count value of a specified semaphore. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
semIndicates the pointer to the semaphore.
svalIndicates the pointer to the obtained count value.
- -**Returns:** - -Returns **0** if the operation is successful. - -## sem\_init\(\) - -``` -int sem_init ([sem_t](sem_t.md) * sem, int pshared, unsigned int value ) -``` - - **Description:** - -Creates and initializes an anonymous semaphore. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
semIndicates the pointer to the semaphore to be created or initialized.
psharedSpecifies whether the semaphore can be shared between the threads of a process. 0 indicates that the semaphore is shared between the threads of a process. A non-zero value indicates that the semaphore can be shared between processes.
valueIndicates the initial count value of the new semaphore.
- -**Returns:** - -Returns **0** if the initialization is successful; returns **-1** and sets **errno** to a value in the following table if the initialization fails. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

The input parameters are invalid and the initial count value exceeds the limit.

-
- -## sem\_post\(\) - -``` -int sem_post ([sem_t](sem_t.md) * sem) -``` - - **Description:** - -Increments the semaphore count by 1. - -Generally, this function is used to increment the count of available shared resources when the process is to leave its critical section. This function is used together with [sem\_wait\(\)](IPC.md#gaad70020dca2241a2b78e272ca033271b) to protect shared resources. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
semIndicates the pointer to the semaphore to be operated.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EOVERFLOW

-

The number of semaphores exceeds the maximum number.

-
- -## sem\_timedwait\(\) - -``` -int sem_timedwait ([sem_t](sem_t.md) *__restrict sem, const struct [timespec](timespec.md) *__restrict timeout ) -``` - - **Description:** - -Obtains the semaphore, with a timeout period specified. - -If the semaphore count is greater than **0**, the shared resources can be obtained and the semaphore count decreases by 1. After the function returns **0**, the code execution enters the resource critical area. Otherwise, the shared resource is unavailable, the function keeps waiting, and code execution cannot enter the resource critical area. If no semaphore is obtained within the specified timeout period, **-1** is returned. This function is used together with [sem\_post\(\)](IPC.md#ga015dce85cab8477c679cc47968958247) to protect shared resources. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
semIndicates the pointer to the semaphore to be operated.
timeoutIndicates the timeout period to be set.
- -**Returns:** - -Returns **0** if the semaphore is obtained; returns **-1** and sets **errno** to a value in the following table if the semaphore fails to be obtained. - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

sem or timeout is invalid.

-

EINTR

-

The waiting for the semaphore is interrupted.

-

EAGAIN

-

The semaphore is set to non-blocking mode, and the semaphore count is 0.

-

ETIMEDOUT

-

Waiting for the semaphore timed out.

-
- -## sem\_trywait\(\) - -``` -int sem_trywait ([sem_t](sem_t.md) * sem) -``` - - **Description:** - -Attempts to obtain the semaphore. - -If the semaphore count is greater than **0**, the shared resources can be obtained and the semaphore count decreases by 1. After the function returns **0**, the code execution enters the resource critical area. Otherwise, the shared resource is unavailable, and the function returns **-1**. This function is used together with [sem\_post\(\)](IPC.md#ga015dce85cab8477c679cc47968958247) to protect shared resources. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
semIndicates the pointer to the semaphore to be operated.
- -**Returns:** - -Returns **0** if the semaphore is obtained; returns **-1** and sets **errno** to a value in the following table if the semaphore fails to be obtained. - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

sem is invalid.

-

EAGAIN

-

The semaphore is set to non-blocking mode, and the semaphore count is 0.

-
- -## sem\_unlink\(\) - -``` -int sem_unlink (const char * name) -``` - - **Description:** - -Deletes a specified semaphore. - -This function is used to subtract 1 from the open count of the semaphore. If the open count is **0**, this function deletes the semaphore. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
nameIndicates the name of the semaphore to be deleted.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - -

errno

-

Description

-

ENAMETOOLONG

-

name is too long.

-

ENOENT

-

There is no semaphore with the given name.

-
- -## sem\_wait\(\) - -``` -int sem_wait ([sem_t](sem_t.md) * sem) -``` - - **Description:** - -Obtains the semaphore. - -If the semaphore count is greater than **0**, the shared resources can be obtained and the semaphore count decreases by 1. After the function returns **0**, the code execution enters the resource critical area. Otherwise, the shared resource is unavailable, the function keeps waiting, and code execution cannot enter the resource critical area. This function is used together with [sem\_post\(\)](IPC.md#ga015dce85cab8477c679cc47968958247) to protect shared resources. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
semIndicates the pointer to the semaphore to be obtained.
- -**Returns:** - -Returns **0** if the semaphore is obtained; returns **-1** and sets **errno** to a value in the following table if the semaphore fails to be obtained. - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

sem is invalid.

-

EINTR

-

The waiting for the semaphore is interrupted.

-

EAGAIN

-

The semaphore is set to non-blocking mode, and the semaphore count is 0.

-
- -## sigaction\(\) - -``` -int [sigaction](sigaction.md) (int signum, const struct [sigaction](sigaction.md) *__restrict act, struct [sigaction](sigaction.md) *__restrict oldact ) -``` - - **Description:** - -Checks or changes the processing action associated with a specified signal. Do not use the process creation function or thread creation function in the registered callback processing function. Otherwise, the process is abnormal. For example, do not use the **fork** or **pthread\_create** function. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
signumIndicates the signal to be operated.
actIndicates the new signal processing action.
oldactIndicates the original signal processing action if the value is not NULL.
- -**Attention:** - -The **sa\_flag** field in **act** supports the [SA\_SIGINFO](IPC.md#ga59b4c0774aace526b10b6d737075a790) flag only. - -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

signum is invalid or cannot be captured.

-

act is NULL.

-

ENOMEM

-

Insufficient memory.

-
- -## sigaddset\(\) - -``` -int sigaddset (sigset_t * set, int signum ) -``` - - **Description:** - -Adds a signal to a specified signal set. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
setIndicates the pointer to the signal set to hold signals.
signumIndicates the signal to be added.
- -**Returns:** - -Returns **0** if the operation is successful. If **set** or **signum** is invalid, the process is abnormal. - -## sigandset\(\) - -``` -int sigandset (sigset_t * dest, const sigset_t * left, const sigset_t * right ) -``` - - **Description:** - -Adds the intersection of **left** and **right** to **dest**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
destIndicates the pointer to the target signal set.
leftIndicates the left set to be added.
rightIndicates the right set to be added.
- -**Returns:** - -Returns **0** if the operation is successful. - -## sigdelset\(\) - -``` -int sigdelset (sigset_t * set, int signum ) -``` - - **Description:** - -Delete a signal from a specified signal set. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
setIndicates the pointer to the signal set to hold signals.
signumIndicates the signal to be deleted.
- -**Returns:** - -Returns **0** if the operation is successful. If **set** or **signum** is invalid, the process is abnormal. - -## sigemptyset\(\) - -``` -int sigemptyset (sigset_t * set) -``` - - **Description:** - -Clears all signals in a specified signal set. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
setIndicates the pointer to the signal set to be cleared.
- -**Returns:** - -Returns **0** if the operation is successful. If **set** is invalid, the process is abnormal. - -## sigfillset\(\) - -``` -int sigfillset (sigset_t * set) -``` - - **Description:** - -Adds all signals to a specified signal set. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
setIndicates the pointer to the signal set to hold signals.
- -**Returns:** - -Returns **0** if the operation is successful. If **set** is invalid, the process is abnormal. - -## sighold\(\) - -``` -int sighold (int signum) -``` - - **Description:** - -Adds the signal specified by **signum** to the signal mask of the calling process. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
signumIndicates the signal to be added.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** if the operation fails. - -## sigisemptyset\(\) - -``` -int sigisemptyset (const sigset_t * set) -``` - - **Description:** - -Checks whether the signal set is empty. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
setIndicates the pointer to the signal set to be checked.
- -**Returns:** - -Returns **0** if the set is not empty; returns **1** if the set is empty; returns **-1** if the operation fails. - -## sigismember\(\) - -``` -int sigismember (const sigset_t * set, int signum ) -``` - - **Description:** - -Checks whether a signal is in the signal set. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
setIndicates the pointer to the signal set to be checked.
signumIndicates the signal to be checked.
- -**Returns:** - -Returns **0** if the signal is not in the set; returns **1** if the signal is in the set. If **set** or **signum** is invalid, the process is abnormal. - -## signal\(\) - -``` -[sighandler_t](IPC.md#ga754cdc0bcfffe07baa426dc252c9101a) signal (int signum, [sighandler_t](IPC.md#ga754cdc0bcfffe07baa426dc252c9101a) handler ) -``` - - **Description:** - -Changes the processing action of a specified signal. Do not use the process creation function or thread creation function in the registered callback processing function. Otherwise, the process is abnormal. For example, do not use the **fork** or **pthread\_create** function. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
signumIndicates the signal to be operated.
handlerIndicates the pointer to the specified processing action (SIG_IGN or SIG_DFL, or to a custom processing action.
- -**Returns:** - -Returns the pointer to the original processing action if the operation is successful; returns [SIG\_ERR](IPC.md#ga3c330fbddd84bf34e65af370b11998d6) and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

signum is invalid.

-

ENOMEM

-

Insufficient memory.

-
- -## sigorset\(\) - -``` -int sigorset (sigset_t * dest, const sigset_t * left, const sigset_t * right ) -``` - - **Description:** - -Adds the union set of **left** and **right** to **dest**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
destIndicates the pointer to the target signal set.
leftIndicates the left set to be added.
rightIndicates the right set to be added.
- -**Returns:** - -Returns **0** if the operation is successful. - -## sigpause\(\) - -``` -int sigpause (int signum) -``` - - **Description:** - -Deletes the signal specified by **signum** from the signal mask of the calling process and suspends the process until the signal is received. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
signumIndicates the signal to be operated.
- -**Attention:** - -After the signal is received, the original signal mask of the process is restored. - -**Returns:** - -Returns **-1** and sets **errno** to a value in the following table. - - - - - - - - - - -

errno

-

Description

-

EINTR

-

The suspension wait is interrupted by the signal.

-
- -## sigpending\(\) - -``` -int sigpending (sigset_t * set) -``` - - **Description:** - -Obtains the signal suspended by the current thread. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
setIndicates the pointer to the signal set used to store the signal suspended by the current thread.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - -

errno

-

Description

-

EFAULT

-

set points to an invalid space.

-

EINVAL

-

set is NULL.

-

EINTR

-

The suspension wait is interrupted by the signal.

-
- -## sigprocmask\(\) - -``` -int sigprocmask (int how, const sigset_t *__restrict set, sigset_t *__restrict oldset ) -``` - - **Description:** - -Changes the signal mask of the calling thread. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
howIndicates the function behavior.
setIndicates the pointer to the signal set to be changed.
oldsetIndicates the pointer to the original mask set of the calling thread.
- - - - - - - - - - - - - - - - -

flags

-

Description

-

SIG_BLOCK

-

Adds the signals in set to the mask set of the thread.

-

SIG_UNBLOCK

-

Removes the signals in set from the mask set of the thread.

-

SIG_SETMASK

-

Sets set of blocked signals as the mask set of the thread.

-
- -**Returns:** - -Returns **0** if the change is successful; returns **-1** and sets **errno** to a value in the following table if the change fails. - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

how is invalid.

-

EFAULT

-

The set or oldset points outside the process's allocated address space.

-
- -## sigrelse\(\) - -``` -int sigrelse (int signum) -``` - - **Description:** - -Deletes the signal specified by **signum** from the signal mask of the calling process. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
signumIndicates the signal to be deleted.
- -**Returns:** - -Returns **0** if the deletion is successful; returns **-1** if the deletion fails. - -## sigsuspend\(\) - -``` -int sigsuspend (const sigset_t * mask) -``` - - **Description:** - -Sets **mask** as the signal mask set of the current process and suspends the process until a signal processing action is triggered. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
maskIndicates the pointer to the signal set to be set.
- -**Returns:** - -Returns **-1** and sets **errno** to a value in the following table. - - - - - - - - - - - - - - - - -

errno

-

Description

-

EFAULT

-

mask points to an invalid space.

-

EINTR

-

The suspension wait is interrupted by the signal.

-

EINVAL

-

mask is NULL.

-
- -## sigtimedwait\(\) - -``` -int sigtimedwait (const sigset_t *__restrict set, siginfo_t *__restrict info, const struct [timespec](timespec.md) *__restrict timeout ) -``` - - **Description:** - -Suspends the calling thread and waits for the signal, with a timeout period specified. - -This function is used to suspend execution of the calling thread until one of the signals specified in the signal set becomes pending. This function specifies the timeout behavior. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
setIndicates the pointer to the signal set to be waited.
infoUsed to save the information about the waited signal if the value is not NULL.
timeoutIndicates the timeout duration.
- -**Attention:** - -The signal to be waited must be in the mask set of the current thread. Once the signal is received, it is deleted from the pending list. The waiting for the signal cannot be interrupted by other signals, that is, **EINTR** is not supported. - -**Returns:** - -Returns the value of the waited signal if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - -

errno

-

Description

-

EFAULT

-

set points to an invalid space.

-

EAGAIN

-

No signal specified by set is generated within the specified timeout period.

-

EINVAL

-

timeout is invalid.

-
- -## sigwait\(\) - -``` -int sigwait (const sigset_t *__restrict set, int *__restrict sig ) -``` - - **Description:** - -Suspends the calling thread and waits for the signal. - -This function is used to suspend execution of the calling thread until one of the signals specified in the signal set becomes pending. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
setIndicates the pointer to the signal set to be waited.
sigUsed for saving the waited signal.
- -**Attention:** - -The signal to be waited must be in the mask set of the current thread. Once the signal is received, it is deleted from the pending list. - -**Returns:** - -Returns **0** if the signal is received; returns **-1** and sets **errno** to a value in the following table if the signal fails to be received. - - - - - - - - - - -

errno

-

Description

-

EINTR

-

The suspension wait is interrupted by the signal.

-
- -## sigwaitinfo\(\) - -``` -int sigwaitinfo (const sigset_t *__restrict set, siginfo_t *__restrict info ) -``` - - **Description:** - -Suspends the calling thread and waits for the signal, with a timeout period specified. - -This function is used to suspend execution of the calling thread until one of the signals specified in the signal set becomes pending. This function does not specify the timeout behavior. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
setIndicates the pointer to the signal set to be waited.
infoUsed to save the information about the waited signal if the value is not NULL.
- -**Attention:** - -The signal to be waited must be in the mask set of the current thread. Once the signal is received, it is deleted from the pending list. The waiting for the signal cannot be interrupted by other signals, that is, **EINTR** is not supported. - -**Returns:** - -Returns the value of the waited signal if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EFAULT

-

set points to an invalid space.

-
- diff --git a/api/api-SmartVision-Devices/IPowerEventListener.md b/api/api-SmartVision-Devices/IPowerEventListener.md deleted file mode 100755 index b7c0e0f894fddec87bc26849921ad742cd39583f..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/IPowerEventListener.md +++ /dev/null @@ -1,74 +0,0 @@ -# IPowerEventListener - -- [Overview](#section189942363165632) -- [Summary](#section338740721165632) -- [Data Fields](#pub-attribs) -- [Details](#section840861603165632) -- [Field](#section602228592165632) -- [Resume](#ad8501d377d185a998803ad84cacf80d7) -- [Suspend](#a42104ba0f92462db12a13e6b40c40d52) - -## **Overview** - -**Related Modules:** - -[Core](Core.md) - -**Description:** - -Defines the power management functions provided by the HDF for the driver. - -To use the power management mechanism provided by the HDF, implement operations of **[IPowerEventListener](IPowerEventListener.md)** and invoke \{@linkHdfDeviceRegisterPowerListener\} to register the operations with the HDF. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

Resume )(struct HdfDeviceObject *deviceObject)

-

void(*

-

Suspend )(struct HdfDeviceObject *deviceObject)

-

void(*

-
- -## **Details** - -## **Field ** - -## Resume - -``` -void(* IPowerEventListener::Resume) (struct [HdfDeviceObject](HdfDeviceObject.md) *deviceObject) -``` - - **Description:** - -Wakes up the driver device. The driver developer implements the operation. - -## Suspend - -``` -void(* IPowerEventListener::Suspend) (struct [HdfDeviceObject](HdfDeviceObject.md) *deviceObject) -``` - - **Description:** - -Hibernates the driver device. The driver developer implements the operation. - diff --git a/api/api-SmartVision-Devices/IPublishCallback.md b/api/api-SmartVision-Devices/IPublishCallback.md deleted file mode 100755 index 393ee9322a1fd4e5fd0283cefa31e7adab3d9c71..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/IPublishCallback.md +++ /dev/null @@ -1,40 +0,0 @@ -# IPublishCallback - -- [Overview](#section273163417165632) -- [Summary](#section1771518677165632) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[Softbus](Softbus.md) - -**Description:** - -Defines the callbacks for successful and failed service publishing. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

onPublishSuccess )(int publishId)

-

void(*

-

onPublishFail )(int publishId, PublishFailReason reason)

-

void(*

-
- diff --git a/api/api-SmartVision-Devices/IRect.md b/api/api-SmartVision-Devices/IRect.md deleted file mode 100755 index 7b86e5b5aabce05a88ae358a6fc4fe339804c5db..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/IRect.md +++ /dev/null @@ -1,100 +0,0 @@ -# IRect - -- [Overview](#section2000418177165631) -- [Summary](#section1195291148165631) -- [Data Fields](#pub-attribs) -- [Details](#section1959468409165631) -- [Field](#section1732485564165631) -- [h](#a9136e1215b014e23afd9a53c677ecb0f) -- [w](#adf90bb2458e61fbd10ebc758c4d1bc76) -- [x](#ab6d24c10b73ac72c256423219cf8c08a) -- [y](#a08450275ada21813d3f3b073276ff5a7) - -## **Overview** - -**Related Modules:** - -[Display](Display.md) - -**Description:** - -Defines the coordinates of the upper left corner of a rectangle as well as its width and height to describe a rectangular area for an image. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

x

-

int32_t

-

y

-

int32_t

-

w

-

int32_t

-

h

-

int32_t

-
- -## **Details** - -## **Field ** - -## h - -``` -int32_t IRect::h -``` - - **Description:** - -Height of the rectangle - -## w - -``` -int32_t IRect::w -``` - - **Description:** - -Width of the rectangle - -## x - -``` -int32_t IRect::x -``` - - **Description:** - -Start X-axis coordinate of the rectangle - -## y - -``` -int32_t IRect::y -``` - - **Description:** - -Start Y-axis coordinate of the rectangle - diff --git a/api/api-SmartVision-Devices/IServerProxy.md b/api/api-SmartVision-Devices/IServerProxy.md deleted file mode 100755 index cdace61a1e29f608cedac8304c5186c08bb94302..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/IServerProxy.md +++ /dev/null @@ -1,103 +0,0 @@ -# IServerProxy - -- [Overview](#section677920033165631) -- [Summary](#section420049199165631) -- [Data Fields](#pub-attribs) -- [Details](#section1818799670165631) -- [Field](#section1007420859165631) -- [INHERIT\_IUNKNOWN](#a98683c7eaf7a11036cddf8207ddcadbe) -- [Invoke](#a0275e8b826a3de89ab9021906c8360a7) - -## **Overview** - -**Related Modules:** - -[Registry](Registry.md) - -**Description:** - -Defines the base class of the server proxy object. - -When the server provides cross-process system capabilities, it uses **INHERIT\_SERVER\_IPROXY** to define the server proxy. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

INHERIT_IUNKNOWN

-
  

Invoke )(IServerProxy *iProxy, int funcId, void *origin, IpcIo *req, IpcIo *reply)

-

int32(*

-

Unmarshals the IPC message received by the server.

-
- -## **Details** - -## **Field ** - -## INHERIT\_IUNKNOWN - -``` -IServerProxy::INHERIT_IUNKNOWN -``` - - **Description:** - -This class inherits from **[IUnknown](IUnknown.md)**. - -## Invoke - -``` -int32(* IServerProxy::Invoke) ([IServerProxy](IServerProxy.md) *iProxy, int funcId, void *origin, IpcIo *req, IpcIo *reply) -``` - - **Description:** - -Unmarshals the IPC message received by the server. - -This function is implemented by developers and called by the system. This function runs in the message processing thread of the service. Do not block the message processing thread; otherwise, the function may fail to be executed. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
ProxyIndicates the pointer to the server proxy object.
funcIdIndicates the ID of the server function to be invoked by the client.
originIndicates the original IPC message, from which the header information can be obtained.
reqipc Indicates the message body, from which data can be obtained.
replyIndicates the output parameter, which is used to respond to the message. The value can contain a maximum of five objects and 200 bytes.
- -**Returns:** - -Returns **EC\_SUCCESS** if the unmarshalling is successful; returns other error codes if the unmarshalling fails. - diff --git a/api/api-SmartVision-Devices/ISessionListener.md b/api/api-SmartVision-Devices/ISessionListener.md deleted file mode 100755 index 5359de1dc70cf20a9634083e9762ffbd8814a721..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/ISessionListener.md +++ /dev/null @@ -1,58 +0,0 @@ -# ISessionListener - -- [Overview](#section709738140165632) -- [Summary](#section1732391709165632) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[Softbus](Softbus.md) - -**Description:** - -Defines session callbacks. - -When a session is opened or closed, or there is data to process, the related callback is invoked. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

onSessionOpened )(int sessionId)

-

int(*

-

Called when a session is opened.

-

onSessionClosed )(int sessionId)

-

void(*

-

Called when a session is closed.

-

onBytesReceived )(int sessionId, const void *data, unsigned int dataLen)

-

void(*

-

Called when data is received.

-
- diff --git a/api/api-SmartVision-Devices/ISurface.md b/api/api-SmartVision-Devices/ISurface.md deleted file mode 100755 index e89999e15b8d8870bc3044fbc9a75b87dbfbe6bc..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/ISurface.md +++ /dev/null @@ -1,244 +0,0 @@ -# ISurface - -- [Overview](#section1540575515165631) -- [Summary](#section446071761165631) -- [Data Fields](#pub-attribs) -- [Details](#section20802730165631) -- [Field](#section1265100385165631) -- [alpha0](#ac2aa13d6c25df5d1a1fcfa92da425d29) -- [alpha1](#a4fd217bfeb9d0a73992c797a900ba632) -- [bAlphaExt1555](#a9d9ba9ee72ae25c0e84bfba10fe52f9a) -- [bAlphaMax255](#a17f87b9850f83633f427eeceb74c93a7) -- [bYCbCrClut](#ad2693b11b0cefeed40070364f9e31e84) -- [cbcrPhyAddr](#adc8bc02eb42a881adf57caf06ddff243) -- [cbcrStride](#a835f95df55db296dbf92061da1aa9627) -- [clutPhyAddr](#a98bca93c426df8030c0a67b8fba02525) -- [enColorFmt](#a260d540d41736284edc5a27c1ff46963) -- [height](#ae68d2e393fe150b1bde8c312c36945c6) -- [phyAddr](#aeac36e064994bcf2f2f1acc4b0f6a1ea) -- [stride](#a61ea4da3897aac944042e60df73554be) -- [width](#a3cc2e909bab924936e8273a237ddbb65) - -## **Overview** - -**Related Modules:** - -[Display](Display.md) - -**Description:** - -Stores surface information for hardware acceleration, such as draw image, and bit blit. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

phyAddr

-

uint64_t

-

height

-

int32_t

-

width

-

int32_t

-

stride

-

int32_t

-

enColorFmt

-

PixelFormat

-

bYCbCrClut

-

bool

-

bAlphaMax255

-

bool

-

bAlphaExt1555

-

bool

-

alpha0

-

uint8_t

-

alpha1

-

uint8_t

-

cbcrPhyAddr

-

uint64_t

-

cbcrStride

-

int32_t

-

clutPhyAddr

-

uint64_t

-
- -## **Details** - -## **Field ** - -## alpha0 - -``` -uint8_t ISurface::alpha0 -``` - - **Description:** - -Value of alpha0, ranging from 0 to 255 - -## alpha1 - -``` -uint8_t ISurface::alpha1 -``` - - **Description:** - -Value of alpha1, ranging from 0 to 255 - -## bAlphaExt1555 - -``` -bool ISurface::bAlphaExt1555 -``` - - **Description:** - -ARGB1555 alpha extension enable bit - -## bAlphaMax255 - -``` -bool ISurface::bAlphaMax255 -``` - - **Description:** - -Maximum alpha value of an image \(255 or 128\) - -## bYCbCrClut - -``` -bool ISurface::bYCbCrClut -``` - - **Description:** - -Whether the color lookup table \(CLUT\) is in the YCbCr space - -## cbcrPhyAddr - -``` -uint64_t ISurface::cbcrPhyAddr -``` - - **Description:** - -CbCr physical address - -## cbcrStride - -``` -int32_t ISurface::cbcrStride -``` - - **Description:** - -CbCr stride - -## clutPhyAddr - -``` -uint64_t ISurface::clutPhyAddr -``` - - **Description:** - -Start physical address of the CLUT, used for color extension or correction - -## enColorFmt - -``` -[PixelFormat](Codec.md#ga60883d4958a60b91661e97027a85072a) ISurface::enColorFmt -``` - - **Description:** - -Image format - -## height - -``` -int32_t ISurface::height -``` - - **Description:** - -Image height - -## phyAddr - -``` -uint64_t ISurface::phyAddr -``` - - **Description:** - -Start physical address of an image - -## stride - -``` -int32_t ISurface::stride -``` - - **Description:** - -Image stride - -## width - -``` -int32_t ISurface::width -``` - - **Description:** - -Image width - diff --git a/api/api-SmartVision-Devices/IUnknown.md b/api/api-SmartVision-Devices/IUnknown.md deleted file mode 100755 index fa9b78faaadc870b23af8e4b294319e738e5418d..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/IUnknown.md +++ /dev/null @@ -1,86 +0,0 @@ -# IUnknown - -- [Overview](#section1286749898165632) -- [Summary](#section172348923165632) -- [Data Fields](#pub-attribs) -- [Details](#section1203810746165632) -- [Field](#section217204763165632) -- [AddRef](#a4d778cd58b81b5f35f7704cbfc5fb3ef) -- [QueryInterface](#ab1eebb31d61b815123d65764134de2bc) -- [Release](#a5b8e564aec30767170a2c27380277715) - -## **Overview** - -**Related Modules:** - -[Samgr](Samgr.md) - -**Description:** - -Defines the **[IUnknown](IUnknown.md)** class. - -You need to inherit this structure when developing a subclass of the **[IUnknown](IUnknown.md)** interface. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

QueryInterface )(IUnknown *iUnknown, int version, void **target)

-

int(*

-

AddRef )(IUnknown *iUnknown)

-

int(*

-

Release )(IUnknown *iUnknown)

-

int(*

-
- -## **Details** - -## **Field ** - -## AddRef - -``` -int(* IUnknown::AddRef) ([IUnknown](IUnknown.md) *iUnknown) -``` - - **Description:** - -Adds the reference count. - -## QueryInterface - -``` -int(* IUnknown::QueryInterface) ([IUnknown](IUnknown.md) *iUnknown, int version, void **target) -``` - - **Description:** - -Queries the subclass object of the **[IUnknown](IUnknown.md)** interface of a specified version \(downcasting\). - -## Release - -``` -int(* IUnknown::Release) ([IUnknown](IUnknown.md) *iUnknown) -``` - - **Description:** - -Release the reference to an **[IUnknown](IUnknown.md)** interface. - diff --git a/api/api-SmartVision-Devices/IUnknownEntry.md b/api/api-SmartVision-Devices/IUnknownEntry.md deleted file mode 100755 index 6ba76ad70990b6b5b97cba3935584a0b2a6b4004..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/IUnknownEntry.md +++ /dev/null @@ -1,86 +0,0 @@ -# IUnknownEntry - -- [Overview](#section1603272145165632) -- [Summary](#section2118773644165632) -- [Data Fields](#pub-attribs) -- [Details](#section251707806165632) -- [Field](#section17328325165632) -- [iUnknown](#adb0c9a5863f934471bb2edf853690bb9) -- [ref](#afdf52f5e2c624790ab558ffb0c8aa9a9) -- [ver](#a5d0fd097aeef2c3a9766a47cf148d8b9) - -## **Overview** - -**Related Modules:** - -[Samgr](Samgr.md) - -**Description:** - -Defines the **[IUnknown](IUnknown.md)** implementation class. - -You need to inherit this structure when developing a subclass of the **[IUnknown](IUnknown.md)** implementation class. Each **[IUnknown](IUnknown.md)** interface must correspond to one or more **[IUnknown](IUnknown.md)** implementation classes. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

ver

-

uint16

-

ref

-

int16

-

iUnknown

-

IUnknown

-
- -## **Details** - -## **Field ** - -## iUnknown - -``` -[IUnknown](IUnknown.md) IUnknownEntry::iUnknown -``` - - **Description:** - -Implementation of **[IUnknown](IUnknown.md)** interface, which is related to the specific definition implementation. - -## ref - -``` -int16 IUnknownEntry::ref -``` - - **Description:** - -Reference count of **[IUnknown](IUnknown.md)** interface. - -## ver - -``` -uint16 IUnknownEntry::ver -``` - - **Description:** - -Version information of **[IUnknown](IUnknown.md)** interface. - diff --git a/api/api-SmartVision-Devices/Identity.md b/api/api-SmartVision-Devices/Identity.md deleted file mode 100755 index b33049777f5b3a4c1ea4a48d590f54b0d0c3de63..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Identity.md +++ /dev/null @@ -1,86 +0,0 @@ -# Identity - -- [Overview](#section1236276226165632) -- [Summary](#section1686359004165632) -- [Data Fields](#pub-attribs) -- [Details](#section852837605165632) -- [Field](#section231810944165632) -- [featureId](#a8a76b43d4bb4e3d861ff63e0716f178d) -- [queueId](#ad34d38c75a24903672bb64f29c1b1132) -- [serviceId](#a062375b8be3ad40e72263a7ce2268af3) - -## **Overview** - -**Related Modules:** - -[Samgr](Samgr.md) - -**Description:** - -Identifies a service and feature. - -You can use this structure to identity a [IUnknown](IUnknown.md) feature to which messages will be sent through the asynchronous function of [IUnknown](IUnknown.md). - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

serviceId

-

int16

-

featureId

-

int16

-

queueId

-

MQueueId

-
- -## **Details** - -## **Field ** - -## featureId - -``` -int16 Identity::featureId -``` - - **Description:** - -[Feature](Feature.md) ID - -## queueId - -``` -MQueueId Identity::queueId -``` - - **Description:** - -Message queue ID - -## serviceId - -``` -int16 Identity::serviceId -``` - - **Description:** - -[Service](Service.md) ID - diff --git a/api/api-SmartVision-Devices/Ieee80211Channel.md b/api/api-SmartVision-Devices/Ieee80211Channel.md deleted file mode 100755 index 63d9b47b6d94a4efa27d20d2ef809559a64af69f..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Ieee80211Channel.md +++ /dev/null @@ -1,89 +0,0 @@ -# Ieee80211Channel - -- [Overview](#section1507479398165632) -- [Summary](#section830081582165632) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Describes a communication channel. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

band

-

enum Ieee80211Band

-

centerFreq

-

uint16_t

-

hwValue

-

uint16_t

-

flags

-

uint32_t

-

maxAntennaGain

-

int32_t

-

maxPower

-

int32_t

-

beaconFound

-

int8_t

-

resv [IEEE80211_CHANNEL_RESV]

-

uint8_t

-

origFlags

-

uint32_t

-

origMag

-

int32_t

-

origMpwr

-

int32_t

-
- diff --git a/api/api-SmartVision-Devices/Ieee80211McsInfo.md b/api/api-SmartVision-Devices/Ieee80211McsInfo.md deleted file mode 100755 index d47bce8b2446279c769d86508e06a1f2bd2bd1b5..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Ieee80211McsInfo.md +++ /dev/null @@ -1,54 +0,0 @@ -# Ieee80211McsInfo - -- [Overview](#section1159537092165632) -- [Summary](#section409457069165632) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Describes IEEE 802.11 Modulation and Coding Scheme \(MCS\) information. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

rxMask [IEEE80211_HT_MCS_MASK_LEN]

-

uint8_t

-

rxHighest

-

uint16_t

-

txParams

-

uint8_t

-

reserved [IEEE80211_MACINFO_RESV]

-

uint8_t

-
- diff --git a/api/api-SmartVision-Devices/Ieee80211Mgmt.md b/api/api-SmartVision-Devices/Ieee80211Mgmt.md deleted file mode 100755 index 771e01c08f8d24544283bb6b592620d0482c2df9..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Ieee80211Mgmt.md +++ /dev/null @@ -1,64 +0,0 @@ -# Ieee80211Mgmt - -- [Overview](#section1249063487165632) -- [Summary](#section1921549662165632) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Defines management frame information. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

frameControl

-

uint16_t

-

duration

-

uint16_t

-

dstAddr [6]

-

uint8_t

-

srcAddr [6]

-

uint8_t

-

bssid [6]

-

uint8_t

-

seqCtrl

-

uint16_t

-
- diff --git a/api/api-SmartVision-Devices/Ieee80211Rate.md b/api/api-SmartVision-Devices/Ieee80211Rate.md deleted file mode 100755 index 5ab68036dffc987a1d78b12ce6ca7407a4fd1f73..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Ieee80211Rate.md +++ /dev/null @@ -1,59 +0,0 @@ -# Ieee80211Rate - -- [Overview](#section354885922165632) -- [Summary](#section2055037219165632) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Describes the IEEE 802.11 rate. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

flags

-

uint32_t

-

bitrate

-

uint16_t

-

hwValue

-

uint16_t

-

hwValueShort

-

uint16_t

-

rsv [IEEE80211_RATE_RESV]

-

uint8_t

-
- diff --git a/api/api-SmartVision-Devices/Ieee80211StaHtCap.md b/api/api-SmartVision-Devices/Ieee80211StaHtCap.md deleted file mode 100755 index 48942553be4e03fce081e899f543ae5c7dae9c46..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Ieee80211StaHtCap.md +++ /dev/null @@ -1,64 +0,0 @@ -# Ieee80211StaHtCap - -- [Overview](#section1831242773165632) -- [Summary](#section17998359165632) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Describes the IEEE 802.11 high-throughput \(HT\) capability. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

cap

-

uint16_t

-

htSupported

-

uint8_t

-

ampduFactor

-

uint8_t

-

ampduDensity

-

uint8_t

-

aucRsv [IEEE80211_STAHTCAP_RESV]

-

uint8_t

-

mcs

-

struct Ieee80211McsInfo

-
- diff --git a/api/api-SmartVision-Devices/Ieee80211SupportedBand.md b/api/api-SmartVision-Devices/Ieee80211SupportedBand.md deleted file mode 100755 index 33b012f2a52d32a5920e0a7f17212fc5439dd45d..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Ieee80211SupportedBand.md +++ /dev/null @@ -1,64 +0,0 @@ -# Ieee80211SupportedBand - -- [Overview](#section14902251165632) -- [Summary](#section1331534402165632) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Describes IEEE 802.11 band information. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

channels

-

struct Ieee80211Channel *

-

bitrates

-

struct Ieee80211Rate *

-

band

-

enum Ieee80211Band

-

nChannels

-

int32_t

-

nBitrates

-

int32_t

-

htCap

-

struct Ieee80211StaHtCap

-
- diff --git a/api/api-SmartVision-Devices/IfReq.md b/api/api-SmartVision-Devices/IfReq.md deleted file mode 100755 index df18dc55224d6023d588e5bcfb44d69c3f953558..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/IfReq.md +++ /dev/null @@ -1,44 +0,0 @@ -# IfReq - -- [Overview](#section172435762165632) -- [Summary](#section1553470873165632) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Defines ioctrl data. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

fake

-

uint32_t

-

ifrData

-

uint8_t *

-
- diff --git a/api/api-SmartVision-Devices/IfType.md b/api/api-SmartVision-Devices/IfType.md deleted file mode 100755 index fb36e991a0525a98858a67099af9f7695a46ac1f..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/IfType.md +++ /dev/null @@ -1,39 +0,0 @@ -# IfType - -- [Overview](#section1737731012165632) -- [Summary](#section646769492165632) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Defines the network port type, for example, the WLAN network port. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - -

Variable Name

-

Description

-

wlanType

-

Protocol80211IfType

-
- diff --git a/api/api-SmartVision-Devices/ImageTrackInfo.md b/api/api-SmartVision-Devices/ImageTrackInfo.md deleted file mode 100755 index dbf0eb85e1f4bdfaed363a90d6b56002ebd7abfd..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/ImageTrackInfo.md +++ /dev/null @@ -1,76 +0,0 @@ -# ImageTrackInfo - -- [Overview](#section1744552881165632) -- [Summary](#section123137755165632) -- [Data Fields](#pub-attribs) -- [Details](#section2111273362165632) -- [Field](#section1288122154165632) -- [subImageInfo](#a5c06f24e374fca6adc906aa90c837297) -- [subImageNum](#ace6e4d15cfb775f2cd22107fd726b677) - -## **Overview** - -**Related Modules:** - -[Format](Format.md) - -**Description:** - -Defines image stream information. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

subImageNum

-

int32_t

-

subImageInfo

-

SubImageInfo *

-
- -## **Details** - -## **Field ** - -## subImageInfo - -``` -[SubImageInfo](SubImageInfo.md)* ImageTrackInfo::subImageInfo -``` - - **Description:** - -Detailed information about a sub-image - -## subImageNum - -``` -int32_t ImageTrackInfo::subImageNum -``` - - **Description:** - -Number of sub-images - diff --git a/api/api-SmartVision-Devices/Input.md b/api/api-SmartVision-Devices/Input.md deleted file mode 100755 index 1e89ed14c350ef32357d31ef7158d89605b27b06..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Input.md +++ /dev/null @@ -1,382 +0,0 @@ -# Input - -- [Overview](#section1419845336165623) -- [Summary](#section300915032165623) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Enumerations](#enum-members) -- [Functions](#func-members) -- [Details](#section417783477165623) -- [Enumeration Type](#section150212759165623) -- [CapacitanceTest](#gae96e484cfd64ea37b5b7782f57f38a21) -- [InputDevType](#gaa8225ba155dfa1ef2c4119c832bc4dd3) -- [PowerStatus](#ga65e6bb4d942c22dba9975253b0a1d73f) -- [RetStatus](#ga85d58a5185669daa4995e332b63eba7a) -- [Function](#section882045796165623) -- [GetInputInterface\(\)](#ga3ca3e6b9bb859ba407b00a2175309cd3) - -## **Overview** - -**Description:** - -Provides driver interfaces for the input service. - -These driver interfaces can be used to open and close input device files, get input events, query device information, register callback functions, and control the feature status. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - - - - - - - - - - -

File Name

-

Description

-

input_controller.h

-

Declares the driver interfaces for controlling the business process of input devices.

-

input_manager.h

-

Declares the driver interfaces for managing input devices.

-

input_reporter.h

-

Declares the driver interfaces for reporting data of input devices.

-

input_type.h

-

Declares types of input devices as well as the structure and enumeration types used by driver interfaces.

-
- -## Data Structures - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

InputController

-

Provides interfaces for controlling the business process of input devices.

-

InputManager

-

Provides interfaces for managing input devices.

-

IInputInterface

-

Defines interfaces for providing driver capabilities of input devices.

-

InputReporter

-

Provides interfaces for reporting event data of input devices.

-

InputExtraCmd

-

Defines the extra commands.

-

InputEventData

-

Describes the input event data.

-

InputReportEventCb

-

Describes the input event callback registered by the input service.

-

DeviceInfo

-

Describes basic device information of the input device.

-
- -## Enumerations - - - - - - - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

RetStatus { INPUT_SUCCESS, INPUT_EINVAL, INPUT_EFAULT, INPUT_ENOMEM, INPUT_ETIMEOUT, INPUT_EUNSUPPORT, INPUT_EUNKNOWN }

-

Enumerates return values.

-

InputDevType { INDEV_TYPE_TOUCH, INDEV_TYPE_KEY, INDEV_TYPE_KEYBOARD, INDEV_TYPE_MOUSE, INDEV_TYPE_BUTTON, INDEV_TYPE_CROWN, INDEV_TYPE_ENCODER, INDEV_TYPE_UNKNOWN }

-

Enumerates input device types.

-

PowerStatus { INPUT_RESUME, INPUT_SUSPEND, INPUT_LOW_POWER, INPUT_POWER_STATUS_UNKNOWN }

-

Enumerates power statuses.

-

CapacitanceTest { BASE_TEST, FULL_TEST, MMI_TEST, RUNNING_TEST, TEST_TYPE_UNKNOWN }

-

Enumerates types of capacitance tests.

-
- -## Functions - - - - - - - - - - -

Function

-

Description

-

GetInputInterface (IInputInterface **interface)

-

int

-

Gets all interfaces for performing operations on input devices.

-
- -## **Details** - -## **Enumeration Type ** - -## CapacitanceTest - -``` -enum [CapacitanceTest](Input.md#gae96e484cfd64ea37b5b7782f57f38a21) -``` - - **Description:** - -Enumerates types of capacitance tests. - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
BASE_TEST

Basic capacitance test

-
FULL_TEST

Full capacitance self-test

-
MMI_TEST

Man-Machine Interface (MMI) capacitance test

-
RUNNING_TEST

Running capacitance test

-
TEST_TYPE_UNKNOWN

Unknown test type

-
- -## InputDevType - -``` -enum [InputDevType](Input.md#gaa8225ba155dfa1ef2c4119c832bc4dd3) -``` - - **Description:** - -Enumerates input device types. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
INDEV_TYPE_TOUCH

Touchscreen

-
INDEV_TYPE_KEY

Physical key

-
INDEV_TYPE_KEYBOARD

Keyboard

-
INDEV_TYPE_MOUSE

Mouse

-
INDEV_TYPE_BUTTON

Virtual button

-
INDEV_TYPE_CROWN

Watch crown

-
INDEV_TYPE_ENCODER

Customized type of a specific function or event

-
INDEV_TYPE_UNKNOWN

Unknown input device type

-
- -## PowerStatus - -``` -enum [PowerStatus](Input.md#ga65e6bb4d942c22dba9975253b0a1d73f) -``` - - **Description:** - -Enumerates power statuses. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
INPUT_RESUME

Resume status

-
INPUT_SUSPEND

Suspend status

-
INPUT_LOW_POWER

Low-power status

-
INPUT_POWER_STATUS_UNKNOWN

Unknown power status

-
- -## RetStatus - -``` -enum [RetStatus](Input.md#ga85d58a5185669daa4995e332b63eba7a) -``` - - **Description:** - -Enumerates return values. - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
INPUT_SUCCESS

Success

-
INPUT_EINVAL

Invalid value

-
INPUT_EFAULT

Runtime error

-
INPUT_ENOMEM

Failed to apply for memory

-
INPUT_ETIMEOUT

Execution timed out

-
INPUT_EUNSUPPORT

The feature is not supported

-
INPUT_EUNKNOWN

Unknown error

-
- -## **Function ** - -## GetInputInterface\(\) - -``` -int GetInputInterface ([IInputInterface](IInputInterface.md) ** interface) -``` - - **Description:** - -Gets all interfaces for performing operations on input devices. - -You can call this function after the input service is started. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
interfaceIndicates the double pointer to the interface for performing operations on input devices.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [RetStatus](Input.md#ga85d58a5185669daa4995e332b63eba7a) otherwise. - diff --git a/api/api-SmartVision-Devices/InputController.md b/api/api-SmartVision-Devices/InputController.md deleted file mode 100755 index 1001a2be29dbc2a8ccbe956a6e46ffd01b50cb75..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/InputController.md +++ /dev/null @@ -1,414 +0,0 @@ -# InputController - -- [Overview](#section38728142165631) -- [Summary](#section1909951786165631) -- [Data Fields](#pub-attribs) -- [Details](#section1347173943165631) -- [Field](#section1364095562165631) -- [GetChipInfo](#aa02ce599f0383c88e6efc301e31901b8) -- [GetChipName](#aaa131995539b4c0b783cdcbdd67b9687) -- [GetDeviceType](#aec8d8a22b37f572a9df8ef7ce988a6d3) -- [GetPowerStatus](#afd9ffc4a180609ad970df6fd79806372) -- [GetVendorName](#ab011f8433b9c5aa8493320dac9c4a683) -- [RunCapacitanceTest](#afc470fb6e33a07aaa179980a4ded39db) -- [RunExtraCommand](#a19c15b3b535f63fbc4e17bbad24492c9) -- [SetGestureMode](#a2a5b24dfc129b58ae4663ca44ab2ad91) -- [SetPowerStatus](#a38da915fec2698dff480ed686503f692) - -## **Overview** - -**Related Modules:** - -[Input](Input.md) - -**Description:** - -Provides interfaces for controlling the business process of input devices. - -The interfaces can be called to control the power status, enable or disable a feature, get driver chip information, and control the production test. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

SetPowerStatus )(uint32_t devIndex, uint32_t status)

-

int32_t(*

-

Sets the power status.

-

GetPowerStatus )(uint32_t devIndex, uint32_t *status)

-

int32_t(*

-

Gets the power status.

-

GetDeviceType )(uint32_t devIndex, uint32_t *deviceType)

-

int32_t(*

-

Gets the type of the input device based on the specified device index.

-

GetChipInfo )(uint32_t devIndex, char *chipInfo, uint32_t length)

-

int32_t(*

-

Gets the chip information of the specified device.

-

GetVendorName )(uint32_t devIndex, char *vendorName, uint32_t length)

-

int32_t(*

-

Gets the module vendor name of the specified device.

-

GetChipName )(uint32_t devIndex, char *chipName, uint32_t length)

-

int32_t(*

-

Gets the driver chip name of the specified device.

-

SetGestureMode )(uint32_t devIndex, uint32_t gestureMode)

-

int32_t(*

-

Sets the gesture mode.

-

RunCapacitanceTest )(uint32_t devIndex, uint32_t testType, char *result, uint32_t length)

-

int32_t(*

-

Conducts a capacitance self-test.

-

RunExtraCommand )(uint32_t devIndex, InputExtraCmd *cmd)

-

int32_t(*

-

Executes the extra command.

-
- -## **Details** - -## **Field ** - -## GetChipInfo - -``` -int32_t(* InputController::GetChipInfo) (uint32_t devIndex, char *chipInfo, uint32_t length) -``` - - **Description:** - -Gets the chip information of the specified device. - -A product is usually equipped with modules and driver ICs provided by multiple vendors. An input service can call this function to get the specific information if needed. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
devIndexIndicates the index of an input device. A maximum of 32 input devices are supported. The value ranges from 0 to 31, and value 0 represents the first input device.
chipInfoIndicates the pointer to the chip information.
lengthIndicates the length of the chip information.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [RetStatus](Input.md#ga85d58a5185669daa4995e332b63eba7a) otherwise. - -## GetChipName - -``` -int32_t(* InputController::GetChipName) (uint32_t devIndex, char *chipName, uint32_t length) -``` - - **Description:** - -Gets the driver chip name of the specified device. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
devIndexIndicates the index of an input device. A maximum of 32 input devices are supported. The value ranges from 0 to 31, and value 0 represents the first input device.
chipNameIndicates the pointer to the driver chip name.
lengthIndicates the length of the driver chip name.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [RetStatus](Input.md#ga85d58a5185669daa4995e332b63eba7a) otherwise. - -## GetDeviceType - -``` -int32_t(* InputController::GetDeviceType) (uint32_t devIndex, uint32_t *deviceType) -``` - - **Description:** - -Gets the type of the input device based on the specified device index. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
devIndexIndicates the index of an input device. A maximum of 32 input devices are supported. The value ranges from 0 to 31, and value 0 represents the first input device.
deviceTypeIndicates the pointer to the device type. For details, see InputDevType.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [RetStatus](Input.md#ga85d58a5185669daa4995e332b63eba7a) otherwise. - -## GetPowerStatus - -``` -int32_t(* InputController::GetPowerStatus) (uint32_t devIndex, uint32_t *status) -``` - - **Description:** - -Gets the power status. - -The input service or the power management module can set the power status for the input device when the OS is in the Resume or Suspend status, so that the driver IC of the device can normally enter the specified status. You can call this function to obtain the power status. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
devIndexIndicates the index of an input device. A maximum of 32 input devices are supported. The value ranges from 0 to 31, and value 0 represents the first input device.
statusIndicates the pointer to the power status of the device. For details, see PowerStatus.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [RetStatus](Input.md#ga85d58a5185669daa4995e332b63eba7a) otherwise. - -## GetVendorName - -``` -int32_t(* InputController::GetVendorName) (uint32_t devIndex, char *vendorName, uint32_t length) -``` - - **Description:** - -Gets the module vendor name of the specified device. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
devIndexIndicates the index of an input device. A maximum of 32 input devices are supported. The value ranges from 0 to 31, and value 0 represents the first input device.
vendorNameIndicates the pointer to the module vendor name.
lengthIndicates the length of the vendor name.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [RetStatus](Input.md#ga85d58a5185669daa4995e332b63eba7a) otherwise. - -## RunCapacitanceTest - -``` -int32_t(* InputController::RunCapacitanceTest) (uint32_t devIndex, uint32_t testType, char *result, uint32_t length) -``` - - **Description:** - -Conducts a capacitance self-test. - -The capacitance self-test items are defined by the component vendor, such as the tests on the raw data, short circuit, open circuit, interference, and row/column difference. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
devIndexIndicates the index of an input device. A maximum of 32 input devices are supported. The value ranges from 0 to 31, and value 0 represents the first input device.
testTypeIndicates the capacitance test type. For details, see CapacitanceTest.
resultIndicates the pointer to the capacitance test result. The value is SUCC for a successful operation and is an error code for a failed operation.
lengthIndicates the length of the test result.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [RetStatus](Input.md#ga85d58a5185669daa4995e332b63eba7a) otherwise. - -## RunExtraCommand - -``` -int32_t(* InputController::RunExtraCommand) (uint32_t devIndex, [InputExtraCmd](InputExtraCmd.md) *cmd) -``` - - **Description:** - -Executes the extra command. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
devIndexIndicates the index of an input device. A maximum of 32 input devices are supported. The value ranges from 0 to 31, and value 0 represents the first input device.
cmdIndicates the pointer to the extra command data packet, including the command codes and parameters. For details, see InputExtraCmd.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [RetStatus](Input.md#ga85d58a5185669daa4995e332b63eba7a) otherwise. - -## SetGestureMode - -``` -int32_t(* InputController::SetGestureMode) (uint32_t devIndex, uint32_t gestureMode) -``` - - **Description:** - -Sets the gesture mode. - -The input service can use this function to enable or disable the gesture mode by setting **EnableBit** of the gesture mode. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
devIndexIndicates the index of an input device. A maximum of 32 input devices are supported. The value ranges from 0 to 31, and value 0 represents the first input device.
gestureModeIndicates the gesture mode to set.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [RetStatus](Input.md#ga85d58a5185669daa4995e332b63eba7a) otherwise. - -## SetPowerStatus - -``` -int32_t(* InputController::SetPowerStatus) (uint32_t devIndex, uint32_t status) -``` - - **Description:** - -Sets the power status. - -This function is called only when the power status of the OS is changed. The input service or the power management module can call this function to set the power status for the input device when the OS is in the Resume or Suspend status, so that the driver integrated circuit \(IC\) of the device can normally enter the specified status. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
devIndexIndicates the index of an input device. A maximum of 32 input devices are supported. The value ranges from 0 to 31, and value 0 represents the first input device.
statusIndicates the power status to set. The input service will notify the input device of entering the Resume or Suspend state specified by PowerStatus.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [RetStatus](Input.md#ga85d58a5185669daa4995e332b63eba7a) otherwise. - diff --git a/api/api-SmartVision-Devices/InputEventData.md b/api/api-SmartVision-Devices/InputEventData.md deleted file mode 100755 index de2f860dba07e4c02c8dbd3b164015e8616cf195..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/InputEventData.md +++ /dev/null @@ -1,164 +0,0 @@ -# InputEventData - -- [Overview](#section1681739667165631) -- [Summary](#section1695957968165631) -- [Data Fields](#pub-attribs) -- [Details](#section2138103727165631) -- [Field](#section426995162165631) -- [definedEvent](#af96272ca27f818ad8dcb58475363101d) -- [fingerID](#ad40fe0acac67d262635f5eb1e6e69a2b) -- [moreDataFlag](#a658814930c4b4cccfe9a434322149704) -- [pointNum](#ab84237936381c935eb96634fd5c05918) -- [pressure](#a8cf135e67e3f5650bfb66365d8379f79) -- [timeStamp](#a0f5849a6cd26dfa2a9e9584f5e97cfdb) -- [x](#affbfe056ed2c7ea85a512b144a4d64ba) -- [y](#a8f1d6c23976289c3ba86c449b2ba86df) - -## **Overview** - -**Related Modules:** - -[Input](Input.md) - -**Description:** - -Describes the input event data. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

x

-

int32_t

-

y

-

int32_t

-

pressure

-

int32_t

-

definedEvent

-

int32_t

-

fingerID

-

uint32_t

-

pointNum

-

uint32_t

-

timeStamp

-

struct timeval

-

moreDataFlag

-

bool

-
- -## **Details** - -## **Field ** - -## definedEvent - -``` -int32_t InputEventData::definedEvent -``` - - **Description:** - -Specific input event, such as the pick-up or put-down event - -## fingerID - -``` -uint32_t InputEventData::fingerID -``` - - **Description:** - -Finger ID, used in multi-touch scenarios - -## moreDataFlag - -``` -bool InputEventData::moreDataFlag -``` - - **Description:** - -Flag of continuous data read - -## pointNum - -``` -uint32_t InputEventData::pointNum -``` - - **Description:** - -Total number of fingers touching the screen - -## pressure - -``` -int32_t InputEventData::pressure -``` - - **Description:** - -Z coordinate of a touch point, such as the pressure - -## timeStamp - -``` -struct [timeval](timeval.md) InputEventData::timeStamp -``` - - **Description:** - -Timestamp - -## x - -``` -int32_t InputEventData::x -``` - - **Description:** - -X coordinate of a touch point - -## y - -``` -int32_t InputEventData::y -``` - - **Description:** - -Y coordinate of a touch point - diff --git a/api/api-SmartVision-Devices/InputExtraCmd.md b/api/api-SmartVision-Devices/InputExtraCmd.md deleted file mode 100755 index 161ba7d5343236d171535d81c0c144a06c6e3f32..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/InputExtraCmd.md +++ /dev/null @@ -1,68 +0,0 @@ -# InputExtraCmd - -- [Overview](#section39017517165631) -- [Summary](#section133183127165631) -- [Data Fields](#pub-attribs) -- [Details](#section1480328139165631) -- [Field](#section1737464501165631) -- [cmdCode](#a5dd991078485ebcf347fe066deb13e38) -- [cmdValue](#aa299bd5b97f705071e42f5e5179a346d) - -## **Overview** - -**Related Modules:** - -[Input](Input.md) - -**Description:** - -Defines the extra commands. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

cmdCode

-

const char *

-

cmdValue

-

const char *

-
- -## **Details** - -## **Field ** - -## cmdCode - -``` -const char* InputExtraCmd::cmdCode -``` - - **Description:** - -Command code - -## cmdValue - -``` -const char* InputExtraCmd::cmdValue -``` - - **Description:** - -Data transmitted in the command - diff --git a/api/api-SmartVision-Devices/InputInfo.md b/api/api-SmartVision-Devices/InputInfo.md deleted file mode 100755 index 7e6ba1f8fc78294c78cbf1f7f2b70518d843f032..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/InputInfo.md +++ /dev/null @@ -1,100 +0,0 @@ -# InputInfo - -- [Overview](#section705319385165632) -- [Summary](#section2056514315165632) -- [Data Fields](#pub-attribs) -- [Details](#section1477004799165632) -- [Field](#section1236352740165632) -- [bufferCnt](#adf0831b639d3e7e3b99c5cb2de16fad5) -- [buffers](#ad759a3e9cef5806ffbf9dbff601d3897) -- [flag](#a80d14d367be6484c1487d4fd2cef7e5f) -- [pts](#acc69e5b615cd5fbe52626fb52cb1b90e) - -## **Overview** - -**Related Modules:** - -[Codec](Codec.md) - -**Description:** - -Describes input information. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

bufferCnt

-

uint32_t

-

buffers

-

CodecBufferInfo *

-

pts

-

int64_t

-

flag

-

int32_t

-
- -## **Details** - -## **Field ** - -## bufferCnt - -``` -uint32_t InputInfo::bufferCnt -``` - - **Description:** - -Number of buffers - -## buffers - -``` -[CodecBufferInfo](CodecBufferInfo.md)* InputInfo::buffers -``` - - **Description:** - -Pointer to the buffer description. For details, see [CodecBufferInfo](CodecBufferInfo.md). - -## flag - -``` -int32_t InputInfo::flag -``` - - **Description:** - -Input flag. For details, see [StreamFlagType](Codec.md#ga8a15793172118d64d8adeba0c8544e84). - -## pts - -``` -int64_t InputInfo::pts -``` - - **Description:** - -Input timestamp - diff --git a/api/api-SmartVision-Devices/InputManager.md b/api/api-SmartVision-Devices/InputManager.md deleted file mode 100755 index 7d8983ae4d4b04ba24c3af739b7fa670542bf0a6..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/InputManager.md +++ /dev/null @@ -1,191 +0,0 @@ -# InputManager - -- [Overview](#section1517000695165631) -- [Summary](#section1422849149165631) -- [Data Fields](#pub-attribs) -- [Details](#section1439023108165631) -- [Field](#section142390188165631) -- [CloseInputDevice](#a41f3a8a5d8995c9a08bd90c1d367209d) -- [GetInputDevice](#abf32ba302df150d952714776e1707bc5) -- [GetInputDeviceList](#a74f11b9e24d19413f5eb9b35700be078) -- [OpenInputDevice](#a9153e901b4811654d8dfc2e78aa29f07) - -## **Overview** - -**Related Modules:** - -[Input](Input.md) - -**Description:** - -Provides interfaces for managing input devices. - -The interfaces can be used to perform basic operations on the input devices, such as opening and closing the device files and querying information about the input device. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

OpenInputDevice )(uint32_t devIndex)

-

int32_t(*

-

Opens a specified input device file.

-

CloseInputDevice )(uint32_t devIndex)

-

int32_t(*

-

Closes a specified input device file.

-

GetInputDevice )(uint32_t devIndex, DeviceInfo **devInfo)

-

int32_t(*

-

Gets information about a specified input device.

-

GetInputDeviceList )(uint32_t *devNum, DeviceInfo **devList, uint32_t size)

-

int32_t(*

-

Gets information about all input devices in the device list.

-
- -## **Details** - -## **Field ** - -## CloseInputDevice - -``` -int32_t(* InputManager::CloseInputDevice) (uint32_t devIndex) -``` - - **Description:** - -Closes a specified input device file. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
devIndexIndicates the index of an input device. A maximum of 32 input devices are supported. The value ranges from 0 to 31, and value 0 represents the first input device.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [RetStatus](Input.md#ga85d58a5185669daa4995e332b63eba7a) otherwise. - -## GetInputDevice - -``` -int32_t(* InputManager::GetInputDevice) (uint32_t devIndex, [DeviceInfo](DeviceInfo.md) **devInfo) -``` - - **Description:** - -Gets information about a specified input device. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
devIndexIndicates the index of an input device. A maximum of 32 input devices are supported. The value ranges from 0 to 31, and value 0 represents the first input device.
devInfoIndicates the double pointer to information about the specified device. For details, see DeviceInfo.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [RetStatus](Input.md#ga85d58a5185669daa4995e332b63eba7a) otherwise. - -## GetInputDeviceList - -``` -int32_t(* InputManager::GetInputDeviceList) (uint32_t *devNum, [DeviceInfo](DeviceInfo.md) **devList, uint32_t size) -``` - - **Description:** - -Gets information about all input devices in the device list. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
devNumIndicates the pointer to the total number of input devices which have been registered.
devListIndicates the double pointer to information about all devices in the device list. For details, see DeviceInfo.
sizeIndicates the number of elements in the devList array.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [RetStatus](Input.md#ga85d58a5185669daa4995e332b63eba7a) otherwise. - -## OpenInputDevice - -``` -int32_t(* InputManager::OpenInputDevice) (uint32_t devIndex) -``` - - **Description:** - -Opens a specified input device file. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
devIndexIndicates the index of an input device. A maximum of 32 input devices are supported. The value ranges from 0 to 31, and value 0 represents the first input device.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [RetStatus](Input.md#ga85d58a5185669daa4995e332b63eba7a) otherwise. - diff --git a/api/api-SmartVision-Devices/InputReportEventCb.md b/api/api-SmartVision-Devices/InputReportEventCb.md deleted file mode 100755 index 8ca9647f695dce7c6a2946623a1b6cd369f51902..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/InputReportEventCb.md +++ /dev/null @@ -1,74 +0,0 @@ -# InputReportEventCb - -- [Overview](#section530819023165631) -- [Summary](#section533892924165631) -- [Data Fields](#pub-attribs) -- [Details](#section1103444491165631) -- [Field](#section1797037931165631) -- [ReportEventCallback](#a458c9d1bae3f36937db2977fcc777136) - -## **Overview** - -**Related Modules:** - -[Input](Input.md) - -**Description:** - -Describes the input event callback registered by the input service. - -## **Summary** - -## Data Fields - - - - - - - - - - -

Variable Name

-

Description

-

ReportEventCallback )(const InputEventData *eventData, uint32_t count, uint32_t devIndex)

-

void(*

-

Reports input event data by the registered callback.

-
- -## **Details** - -## **Field ** - -## ReportEventCallback - -``` -void(* InputReportEventCb::ReportEventCallback) (const [InputEventData](InputEventData.md) *eventData, uint32_t count, uint32_t devIndex) -``` - - **Description:** - -Reports input event data by the registered callback. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
eventDataIndicates the pointer to the input event data reported by the input driver.
countIndicates the number of input event data packets.
devIndexIndicates the index of an input device. A maximum of 32 input devices are supported. The value ranges from 0 to 31, and value 0 represents the first input device.
- diff --git a/api/api-SmartVision-Devices/InputReporter.md b/api/api-SmartVision-Devices/InputReporter.md deleted file mode 100755 index 5604292f1c863606fd59ade0b72c8605b30ff8f1..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/InputReporter.md +++ /dev/null @@ -1,156 +0,0 @@ -# InputReporter - -- [Overview](#section1071467766165631) -- [Summary](#section42665863165631) -- [Data Fields](#pub-attribs) -- [Details](#section1227693544165631) -- [Field](#section1743608718165631) -- [GetInputEvent](#a879d9272d932f566e667b7e768b5530e) -- [RegisterReportCallback](#a8cbea98a78a293bc8ab6f41c6adeb675) -- [UnregisterReportCallback](#a8c10af61e0c73c91292b806a7ea1d069) - -## **Overview** - -**Related Modules:** - -[Input](Input.md) - -**Description:** - -Provides interfaces for reporting event data of input devices. - -The interfaces include the callback for reporting the input event data and the functions for obtaining the data in polling mode. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

RegisterReportCallback )(uint32_t devIndex, InputReportEventCb *callback)

-

int32_t(*

-

Registers a callback for reporting subscribed data of specified input devices.

-

UnregisterReportCallback )(uint32_t devIndex)

-

int32_t(*

-

Unregisters the callback for reporting subscribed data of specified input devices.

-

GetInputEvent )(uint32_t devIndex, InputEventData *eventData)

-

int32_t(*

-

Gets the input event data.

-
- -## **Details** - -## **Field ** - -## GetInputEvent - -``` -int32_t(* InputReporter::GetInputEvent) (uint32_t devIndex, [InputEventData](InputEventData.md) *eventData) -``` - - **Description:** - -Gets the input event data. - -This function enables the input service to proactively obtain the input event data in polling mode. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
devIndexIndicates the index of an input device. A maximum of 32 input devices are supported. The value ranges from 0 to 31, and value 0 represents the first input device.
eventDataIndicates the pointer to the input event data reported by the input driver.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [RetStatus](Input.md#ga85d58a5185669daa4995e332b63eba7a) otherwise. - -## RegisterReportCallback - -``` -int32_t(* InputReporter::RegisterReportCallback) (uint32_t devIndex, [InputReportEventCb](InputReportEventCb.md) *callback) -``` - - **Description:** - -Registers a callback for reporting subscribed data of specified input devices. - -After this callback is successfully registered, the driver can report the input event data to the input service through this callback. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
devIndexIndicates the index of an input device. A maximum of 32 input devices are supported. The value ranges from 0 to 31, and value 0 represents the first input device.
callbackIndicates the pointer to the callback to register.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [RetStatus](Input.md#ga85d58a5185669daa4995e332b63eba7a) otherwise. - -## UnregisterReportCallback - -``` -int32_t(* InputReporter::UnregisterReportCallback) (uint32_t devIndex) -``` - - **Description:** - -Unregisters the callback for reporting subscribed data of specified input devices. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
devIndexIndicates the index of an input device. A maximum of 32 input devices are supported. The value ranges from 0 to 31, and value 0 represents the first input device.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [RetStatus](Input.md#ga85d58a5185669daa4995e332b63eba7a) otherwise. - diff --git a/api/api-SmartVision-Devices/InstallParam.md b/api/api-SmartVision-Devices/InstallParam.md deleted file mode 100755 index 94ad14cf03f54609ef4b94df84c841b7e116ee59..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/InstallParam.md +++ /dev/null @@ -1,68 +0,0 @@ -# InstallParam - -- [Overview](#section361803001165632) -- [Summary](#section557240139165632) -- [Data Fields](#pub-attribs) -- [Details](#section1016664112165632) -- [Field](#section48621244165632) -- [installLocation](#a6cc65611251ffed3269766afc02d5913) -- [keepData](#acb4b2f60f9c8fc37ad72331b7e75807c) - -## **Overview** - -**Related Modules:** - -[BundleManager](BundleManager.md) - -**Description:** - -Defines parameters used for application installation, update, or uninstallation. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

installLocation

-

int32_t

-

keepData

-

bool

-
- -## **Details** - -## **Field ** - -## installLocation - -``` -int32_t InstallParam::installLocation -``` - - **Description:** - -Installation or update path of the application - -## keepData - -``` -bool InstallParam::keepData -``` - - **Description:** - -Whether to retain particular data during application uninstallation - diff --git a/api/api-SmartVision-Devices/IpHeader.md b/api/api-SmartVision-Devices/IpHeader.md deleted file mode 100755 index dad5ec5635b7a0611fa4d43fc264f2cab20a0137..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/IpHeader.md +++ /dev/null @@ -1,84 +0,0 @@ -# IpHeader - -- [Overview](#section1856131933165632) -- [Summary](#section1052057861165632) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Defines the IP header information of a data frame, including the version number, service type, and total length. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

versionAndHl

-

uint8_t

-

tos

-

uint8_t

-

totLen

-

uint16_t

-

id

-

uint16_t

-

fragInfo

-

uint16_t

-

ttl

-

uint8_t

-

protocol

-

uint8_t

-

check

-

uint16_t

-

sAddr

-

uint32_t

-

dAddr

-

uint32_t

-
- diff --git a/api/api-SmartVision-Devices/IpV4Addr.md b/api/api-SmartVision-Devices/IpV4Addr.md deleted file mode 100755 index a9d881e6736af37a3417d6de0badb145060bfab1..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/IpV4Addr.md +++ /dev/null @@ -1,39 +0,0 @@ -# IpV4Addr - -- [Overview](#section2051257824165632) -- [Summary](#section422680665165632) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Defines an IPv4 address. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - -

Variable Name

-

Description

-

addr

-

uint32_t

-
- diff --git a/api/api-SmartVision-Devices/KeyParams.md b/api/api-SmartVision-Devices/KeyParams.md deleted file mode 100755 index d5c9f731402bcd7c999c66994c980b558bbea4eb..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/KeyParams.md +++ /dev/null @@ -1,59 +0,0 @@ -# KeyParams - -- [Overview](#section119960243165632) -- [Summary](#section1355468807165632) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Describes a key. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

key

-

uint8_t *

-

seq

-

uint8_t *

-

keyLen

-

int32_t

-

seqLen

-

int32_t

-

cipher

-

uint32_t

-
- diff --git a/api/api-SmartVision-Devices/Kv_store.md b/api/api-SmartVision-Devices/Kv_store.md deleted file mode 100755 index bf7f650374b1dd7269b00f99a57a62e2c4900d6f..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Kv_store.md +++ /dev/null @@ -1,202 +0,0 @@ -# Kv\_store - -- [Overview](#section2003898650165625) -- [Summary](#section324745041165625) -- [Files](#files) -- [Functions](#func-members) -- [Details](#section1972519997165625) -- [Function](#section178236753165625) -- [ClearKVCache\(\)](#gaebe12bab9a2e181d1fea1095a5ce4d5a) -- [UtilsDeleteValue\(\)](#ga803cc2bcb5206b0378ec25df7a179834) -- [UtilsGetValue\(\)](#ga6e7d17b85aeb91c0cfa912ac141d41eb) -- [UtilsSetValue\(\)](#ga32e7222aed175357499f5ced0e85775f) - -## **Overview** - -**Description:** - -Provides functions for obtaining, setting, and deleting a key-value pair. - -Key-value pairs can be permanently stored in the file system. If [FEATURE\_KV\_CACHE](Utils_config.md#gad3d71669516ef0bb50e2b105507a6b29) is enabled, key-value pairs can be stored in the cache. For details about cache specifications, see [MAX\_CACHE\_SIZE](Utils_config.md#ga6c8469dfe973ac952cf40394bd2c160b). For details about the number of key-value pairs that can be stored in an application, see [MAX\_KV\_SUM](Utils_config.md#ga4f258bd7d7d52c6770cce77f3e16ce72). - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - -

File Name

-

Description

-

kv_store.h

-

Provides functions for obtaining, setting, and deleting a key-value pair.

-
- -## Functions - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

UtilsGetValue (const char *key, char *value, unsigned int len)

-

int

-

Obtains the value matching a specified key from the file system or cache.

-

UtilsSetValue (const char *key, const char *value)

-

int

-

Adds or updates the value matching a specified key in the file system or cache.

-

UtilsDeleteValue (const char *key)

-

int

-

Deletes the value matching a specified key from the file system or cache.

-

ClearKVCache (void)

-

int

-

Clears all key-value pairs from the cache.

-
- -## **Details** - -## **Function ** - -## ClearKVCache\(\) - -``` -int ClearKVCache (void ) -``` - - **Description:** - -Clears all key-value pairs from the cache. - -**Attention:** - -This function is available only if [FEATURE\_KV\_CACHE](Utils_config.md#gad3d71669516ef0bb50e2b105507a6b29) is enabled. - -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - -## UtilsDeleteValue\(\) - -``` -int UtilsDeleteValue (const char * key) -``` - - **Description:** - -Deletes the value matching a specified key from the file system or cache. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
keyIndicates the key whose value is to be deleted. It allows only lowercase letters, digits, underscores (_), and dots (.). Its length cannot exceed 32 bytes (including the end-of-text character in the string).
- -**Returns:** - -Returns **0** if the operation is successful; returns **-9** if a parameter is incorrect; returns **-1** in other scenarios. - -## UtilsGetValue\(\) - -``` -int UtilsGetValue (const char * key, char * value, unsigned int len ) -``` - - **Description:** - -Obtains the value matching a specified key from the file system or cache. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the key to be indexed. It allows only lowercase letters, digits, underscores (_), and dots (.). Its length cannot exceed 32 bytes (including the end-of-text character in the string).
valueIndicates the buffer for storing the value that matches the key. This is an output parameter.
lenIndicates the size of the value space in the buffer.
- -**Returns:** - -Returns the length of the value if the operation is successful; returns **-9** if a parameter is incorrect; returns **-1** in other scenarios; returns **0** if the value is obtained from the cache. - -## UtilsSetValue\(\) - -``` -int UtilsSetValue (const char * key, const char * value ) -``` - - **Description:** - -Adds or updates the value matching a specified key in the file system or cache. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the key whose value is to be added or updated. It allows only lowercase letters, digits, underscores (_), and dots (.). Its length cannot exceed 32 bytes (including the end-of-text character in the string).
valueIndicates the value to be added or updated. Its length cannot exceed 128 bytes (including the end-of-text character in the string).
- -**Returns:** - -Returns **0** if the operation is successful; returns **-9** if a parameter is incorrect; returns **-1** in other scenarios. - diff --git a/api/api-SmartVision-Devices/LINKER.md b/api/api-SmartVision-Devices/LINKER.md deleted file mode 100755 index b45beb7f5442e0f030b94029b3789b6de87bcd5c..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/LINKER.md +++ /dev/null @@ -1,257 +0,0 @@ -# LINKER - -- [Overview](#section130839916165622) -- [Summary](#section1847008323165622) -- [Files](#files) -- [Macros](#define-members) -- [Functions](#func-members) -- [Details](#section2035573446165622) -- [Function](#section1817236284165622) -- [dlclose\(\)](#gaf483b6c4400965aa885f9f1a144138a5) -- [dlerror\(\)](#ga541c343ae5cdf90926014c65972c86cc) -- [dlopen\(\)](#gad559be443b3edb0af8835d6ec2c29a3a) -- [dlsym\(\)](#ga84cb8784df910bfcc3002dc5e9e2f406) - -## **Overview** - -**Description:** - -Provides functions and structures related to linking and loading. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - -

File Name

-

Description

-

dlfcn.h

-

Provides functions and structures related to linking and loading.

-
- -## Macros - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

RTLD_LAZY 1

-

All undefined symbols in the shared object are not resolved before dlopen() returns.

-

RTLD_NOW 2

-

All undefined symbols in the shared object are resolved before dlopen() returns.

-

RTLD_NOLOAD 4

-

The shared object is not loaded. It can be used to test whether the object resides in the memory.

-

RTLD_NODELETE 4096

-

The shared object is not deleted during dlclose().

-

RTLD_GLOBAL 256

-

The symbols defined by the loaded shared object can be resolved by other shared objects opened later.

-

RTLD_LOCAL 0

-

The symbols defined by the loaded shared object cannot be resolved by other shared objects opened later.

-

RTLD_NEXT ((void *)-1)

-

The next match of the required symbol is searched in the search order after the current object.

-

RTLD_DEFAULT ((void *)0)

-

The first match of the required symbol is searched in the default shared object search order. The search scope includes the global symbols of the program and its dependencies, and the global symbols loaded by the dlopen() function.

-

RTLD_DI_LINKMAP 2

-

The pointer to the link_map structure of the specified handle.

-
- -## Functions - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

dlclose (void *handle)

-

int

-

Closes the DLL of a specified handle.

-

dlerror (void)

-

char *

-

Obtains the latest error that occurred during a DLL function execution failure.

-

dlopen (const char *filename, int flags)

-

void *

-

Opens a DLL and returns its handle.

-

dlsym (void *handle, const char *symbol)

-

void *

-

Searches for a specified symbol based on the DLL handle.

-
- -## **Details** - -## **Function ** - -## dlclose\(\) - -``` -int dlclose (void * handle) -``` - - **Description:** - -Closes the DLL of a specified handle. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
handleIndicates the loaded DLL handle.
- -**Attention:** - -The symbols associated with the handle may not be removed from the caller's address space even if the **[dlclose\(\)](LINKER.md#gaf483b6c4400965aa885f9f1a144138a5)** function returns. The symbols are removed only when the reference count of the DLL is 0. The reference count is incremented \(by 1\) each time the **[dlopen\(\)](LINKER.md#gad559be443b3edb0af8835d6ec2c29a3a)** function is explicitly called. In addition, the reference of DLL depended on by other DLLs or programs will be counted if it has been implicitly loaded. A shared object can be removed from the address space only after all references are released. - -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value if the operation fails. - -## dlerror\(\) - -``` -char* dlerror (void ) -``` - - **Description:** - -Obtains the latest error that occurred during a DLL function execution failure. - -**Returns:** - -Returns the error if occurred; returns **NULL** if the DLL function execution is successful. - -## dlopen\(\) - -``` -void* dlopen (const char * filename, int flags ) -``` - - **Description:** - -Opens a DLL and returns its handle. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
filenameIndicates the pointer to the file name of the DLL.
flagsIndicates the flag of the DLL to be loaded.
- -**Returns:** - -Returns the DLL handle if the operation is successful; returns **NULL** if the operation fails. - -## dlsym\(\) - -``` -void* dlsym (void * handle, const char * symbol ) -``` - - **Description:** - -Searches for a specified symbol based on the DLL handle. - -You can also use this function to obtain the loading addresses of global variables. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the loaded DLL handle.
symbolIndicates the symbol name.
- -**Returns:** - -Returns the symbol address if the operation is successful; returns **NULL** if the operation fails. - diff --git a/api/api-SmartVision-Devices/LayerAlpha.md b/api/api-SmartVision-Devices/LayerAlpha.md deleted file mode 100755 index d1a32860dc75e5b355c5ffba20089e7f0f1680b5..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/LayerAlpha.md +++ /dev/null @@ -1,116 +0,0 @@ -# LayerAlpha - -- [Overview](#section1838686204165632) -- [Summary](#section300763369165632) -- [Data Fields](#pub-attribs) -- [Details](#section1045015011165632) -- [Field](#section677756790165632) -- [alpha0](#a3353553145a2a896ceaeef3b16149612) -- [alpha1](#a2b1d0f73d9ab9a17b2b41ef93c003e62) -- [enAlpha](#adcf7ccbaaabb8180fcc896bf251f56db) -- [enChnAlpha](#a079f3b69885e57b552016ba3c748522d) -- [gAlpha](#a4ad49522585efedeb70e86de72d84dc0) - -## **Overview** - -**Related Modules:** - -[Display](Display.md) - -**Description:** - -Defines alpha operations on a layer. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

enAlpha

-

bool

-

enChnAlpha

-

bool

-

alpha0

-

uint8_t

-

alpha1

-

uint8_t

-

gAlpha

-

uint8_t

-
- -## **Details** - -## **Field ** - -## alpha0 - -``` -uint8_t LayerAlpha::alpha0 -``` - - **Description:** - -Alpha0 value, ranging from 0 to 255 - -## alpha1 - -``` -uint8_t LayerAlpha::alpha1 -``` - - **Description:** - -Alpha1 value, ranging from 0 to 255 - -## enAlpha - -``` -bool LayerAlpha::enAlpha -``` - - **Description:** - -Pixel alpha enable bit - -## enChnAlpha - -``` -bool LayerAlpha::enChnAlpha -``` - - **Description:** - -Channel alpha enable bit - -## gAlpha - -``` -uint8_t LayerAlpha::gAlpha -``` - - **Description:** - -Global alpha value, ranging from 0 to 255 - diff --git a/api/api-SmartVision-Devices/LayerBuffer.md b/api/api-SmartVision-Devices/LayerBuffer.md deleted file mode 100755 index 1a8fbfe037806ec5d6e8bed6e90c3879dc735c78..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/LayerBuffer.md +++ /dev/null @@ -1,132 +0,0 @@ -# LayerBuffer - -- [Overview](#section1817957125165632) -- [Summary](#section635176130165632) -- [Data Fields](#pub-attribs) -- [Details](#section924765344165632) -- [Field](#section1571466726165632) -- [data](#a9a1831091916905de22145585cf8b682) -- [fenceId](#a46aa174ae3d0eb28fa7f3e53749fd5d1) -- [height](#aec2e142ea67776ec4e91fc3d8d3389ae) -- [pitch](#a62a06a9381ac2d6fa48115ce7d01920d) -- [pixFormat](#a1ac426fb1997d872b347cae9cce94eb6) -- [width](#a71196d704bd8a6a69b9bccf497b8224b) - -## **Overview** - -**Related Modules:** - -[Display](Display.md) - -**Description:** - -Defines the buffer, which is used to store layer data. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

fenceId

-

int32_t

-

width

-

int32_t

-

height

-

int32_t

-

pitch

-

int32_t

-

pixFormat

-

PixelFormat

-

data

-

BufferData

-
- -## **Details** - -## **Field ** - -## data - -``` -[BufferData](BufferData.md) LayerBuffer::data -``` - - **Description:** - -Layer buffer data - -## fenceId - -``` -int32_t LayerBuffer::fenceId -``` - - **Description:** - -Fence ID of the buffer - -## height - -``` -int32_t LayerBuffer::height -``` - - **Description:** - -Buffer height - -## pitch - -``` -int32_t LayerBuffer::pitch -``` - - **Description:** - -Number of bytes from one row of pixels in memory to the next - -## pixFormat - -``` -[PixelFormat](Codec.md#ga60883d4958a60b91661e97027a85072a) LayerBuffer::pixFormat -``` - - **Description:** - -Pixel format of the buffer - -## width - -``` -int32_t LayerBuffer::width -``` - - **Description:** - -Buffer width - diff --git a/api/api-SmartVision-Devices/LayerFuncs.md b/api/api-SmartVision-Devices/LayerFuncs.md deleted file mode 100755 index f3ee9f32cc2848a88b182649527965aa6ef2da7e..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/LayerFuncs.md +++ /dev/null @@ -1,1309 +0,0 @@ -# LayerFuncs - -- [Overview](#section818032663165632) -- [Summary](#section2061830316165632) -- [Data Fields](#pub-attribs) -- [Details](#section1254774471165632) -- [Field](#section842552881165632) -- [CloseLayer](#a2e375f75209da329f131b914377e9616) -- [DeinitDisplay](#a8d7a715d7d2b4bd5ab0db92c2a1eec93) -- [Flush](#abb480bf2b85e93841c49fdc9800bd1e7) -- [GetDisplayInfo](#aba57e2b79df0e774727d0c07ef90e715) -- [GetLayerAlpha](#acf1e01338eeb0fd957f53ed0d2551394) -- [GetLayerBuffer](#a40b406f6b4e6a812a36605041e0e81d6) -- [GetLayerColorKey](#aea882232b6279b8be82c45e889187b24) -- [GetLayerCompression](#ab0b5855ea4ee5228516303cba84907ce) -- [GetLayerPalette](#af713bc39e51dc8168c278e2f126bf4e3) -- [GetLayerPreMulti](#a4a0e26f8401da1232f03bb37502ff4bd) -- [GetLayerSize](#a56be84be25eba64497b2a842c1f68b26) -- [GetLayerVisibleState](#a6bbff71bb4f17eb84a4db4857a0b0985) -- [GetLayerZorder](#a5644645442e1d6943b55ce0a6a801b8c) -- [InitDisplay](#a0641c3b48542646daa80386122bed46a) -- [OpenLayer](#a795f4e168d5b284a9c33f636c278207f) -- [SetLayerAlpha](#a20e554afa2f7b1015fd23ce240344b13) -- [SetLayerColorKey](#a5701fe1e0e2414de577aa5329bd873c9) -- [SetLayerCompression](#a46c9750d8615dc874b66ac4b10796b24) -- [SetLayerCrop](#a4f925226529e27678df19423fa6f83ad) -- [SetLayerDirtyRegion](#a7aa2a7bf4c0aed948c8617adec2d91b6) -- [SetLayerPalette](#a3982c76e093852ef386fc372581be4af) -- [SetLayerPreMulti](#a456aa01ca3ffa81d2e49c0a9487f816f) -- [SetLayerSize](#ab58e66b0676b1baa1662c175d43bf219) -- [SetLayerVisible](#aaa5bf7f98e8dc47510a4f26fb38094b6) -- [SetLayerZorder](#aa3803c2a6395651d1538ffb62d29733d) -- [SetTransformMode](#a707a6ae5144ee329110822dd8301cb22) -- [SnapShot](#a751377d6d1877cd9e878208b94339407) -- [WaitForVBlank](#a62471eb83a24d0a84dabd53018666336) - -## **Overview** - -**Related Modules:** - -[Display](Display.md) - -**Description:** - -Defines pointers to the layer driver functions. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

InitDisplay )(uint32_t devId)

-

int32_t(*

-

Initializes a display device.

-

DeinitDisplay )(uint32_t devId)

-

int32_t(*

-

Deinitializes a display device.

-

GetDisplayInfo )(uint32_t devId, DisplayInfo *dispInfo)

-

int32_t(*

-

Obtains information about a display device.

-

OpenLayer )(uint32_t devId, const LayerInfo *layerInfo, uint32_t *layerId)

-

int32_t(*

-

Opens a layer on a specified display device.

-

CloseLayer )(uint32_t devId, uint32_t layerId)

-

int32_t(*

-

Closes a layer that is no longer required on a specified display device.

-

SetLayerVisible )(uint32_t devId, uint32_t layerId, bool visible)

-

int32_t(*

-

Sets whether a layer is visible.

-

GetLayerVisibleState )(uint32_t devId, uint32_t layerId, bool *visible)

-

int32_t(*

-

Checks whether a layer is visible.

-

SetLayerSize )(uint32_t devId, uint32_t layerId, IRect *rect)

-

int32_t(*

-

Sets the size of a layer.

-

GetLayerSize )(uint32_t devId, uint32_t layerId, IRect *rect)

-

int32_t(*

-

Obtains the size of a layer.

-

SetLayerCrop )(uint32_t devId, uint32_t layerId, IRect *rect)

-

int32_t(*

-

Sets the rectangular area to crop for a layer.

-

SetLayerZorder )(uint32_t devId, uint32_t layerId, uint32_t zorder)

-

int32_t(*

-

Sets the z-order for a layer.

-

GetLayerZorder )(uint32_t devId, uint32_t layerId, uint32_t *zorder)

-

int32_t(*

-

Obtains the z-order of a layer.

-

SetLayerPreMulti )(uint32_t devId, uint32_t layerId, bool preMul)

-

int32_t(*

-

Sets layer premultiplication.

-

GetLayerPreMulti )(uint32_t devId, uint32_t layerId, bool *preMul)

-

int32_t(*

-

Obtains the premultiplication flag of a layer.

-

SetLayerAlpha )(uint32_t devId, uint32_t layerid, LayerAlpha *alpha)

-

int32_t(*

-

Sets the alpha value for a layer.

-

GetLayerAlpha )(uint32_t devId, uint32_t layerId, LayerAlpha *alpha)

-

int32_t(*

-

Obtains the alpha value of a layer.

-

SetLayerColorKey )(uint32_t devId, uint32_t layerId, bool enable, uint32_t key)

-

int32_t(*

-

Sets the color key for a layer.

-

GetLayerColorKey )(uint32_t devId, uint32_t layerId, bool *enable, uint32_t *key)

-

int32_t(*

-

Obtains the color key of a layer.

-

SetLayerPalette )(uint32_t devId, uint32_t layerId, uint32_t *palette, uint32_t len)

-

int32_t(*

-

Sets the palette for a layer.

-

GetLayerPalette )(uint32_t devId, uint32_t layerId, uint32_t *palette, uint32_t len)

-

int32_t(*

-

Obtains the palette of a layer.

-

SetTransformMode )(uint32_t devId, uint32_t layerId, TransformType type)

-

int32_t(*

-

Sets the transform mode for a layer.

-

SetLayerCompression )(uint32_t devId, uint32_t layerId, int32_t compType)

-

int32_t(*

-

Sets the compression feature for a layer.

-

GetLayerCompression )(uint32_t devId, uint32_t layerId, int32_t *compType)

-

int32_t(*

-

Checks whether the compression feature is enabled for a layer.

-

SetLayerDirtyRegion )(uint32_t devId, uint32_t layerId, IRect *region)

-

int32_t(*

-

Sets the flushing area for a layer.

-

GetLayerBuffer )(uint32_t devId, uint32_t layerId, LayerBuffer *buffer)

-

int32_t(*

-

Obtains the buffer of a layer.

-

Flush )(uint32_t devId, uint32_t layerId, LayerBuffer *buffer)

-

int32_t(*

-

Flushes a layer.

-

WaitForVBlank )(uint32_t devId, uint32_t layerId)

-

int32_t(*

-

Waits for the arrival of vertical blanking.

-

SnapShot )(uint32_t devId, LayerBuffer *buffer)

-

int32_t(*

-

Implements the snapshot feature.

-
- -## **Details** - -## **Field ** - -## CloseLayer - -``` -int32_t(* LayerFuncs::CloseLayer) (uint32_t devId, uint32_t layerId) -``` - - **Description:** - -Closes a layer that is no longer required on a specified display device. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
devIdIndicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device.
layerIdIndicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -**See also:** - -[OpenLayer](LayerFuncs.md#a795f4e168d5b284a9c33f636c278207f) - -## DeinitDisplay - -``` -int32_t(* LayerFuncs::DeinitDisplay) (uint32_t devId) -``` - - **Description:** - -Deinitializes a display device. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
devIdIndicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -**See also:** - -[InitDisplay](LayerFuncs.md#a0641c3b48542646daa80386122bed46a) - -## Flush - -``` -int32_t(* LayerFuncs::Flush) (uint32_t devId, uint32_t layerId, [LayerBuffer](LayerBuffer.md) *buffer) -``` - - **Description:** - -Flushes a layer. - -Display data in the buffer is flushed to a specified layer so that the image data is displayed on the screen. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
devIdIndicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device.
layerIdIndicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID.
bufferIndicates the pointer to the buffer in which the display data is to flush.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -## GetDisplayInfo - -``` -int32_t(* LayerFuncs::GetDisplayInfo) (uint32_t devId, [DisplayInfo](DisplayInfo.md) *dispInfo) -``` - - **Description:** - -Obtains information about a display device. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
devIdIndicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device.
dispInfoIndicates the pointer to the display device information obtained.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -## GetLayerAlpha - -``` -int32_t(* LayerFuncs::GetLayerAlpha) (uint32_t devId, uint32_t layerId, [LayerAlpha](LayerAlpha.md) *alpha) -``` - - **Description:** - -Obtains the alpha value of a layer. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
devIdIndicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device.
layerIdIndicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID.
alphaIndicates the pointer to the obtained alpha value.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -**See also:** - -[SetLayerAlpha](LayerFuncs.md#a20e554afa2f7b1015fd23ce240344b13) - -## GetLayerBuffer - -``` -int32_t(* LayerFuncs::GetLayerBuffer) (uint32_t devId, uint32_t layerId, [LayerBuffer](LayerBuffer.md) *buffer) -``` - - **Description:** - -Obtains the buffer of a layer. - -After drawing a picture in the buffer, the application calls the [Flush](LayerFuncs.md#abb480bf2b85e93841c49fdc9800bd1e7) function to display the picture on the screen. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
devIdIndicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device.
layerIdIndicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID.
bufferIndicates the pointer to the obtained buffer.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -**See also:** - -[Flush](LayerFuncs.md#abb480bf2b85e93841c49fdc9800bd1e7) - -## GetLayerColorKey - -``` -int32_t(* LayerFuncs::GetLayerColorKey) (uint32_t devId, uint32_t layerId, bool *enable, uint32_t *key) -``` - - **Description:** - -Obtains the color key of a layer. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
devIdIndicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device.
layerIdIndicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID.
enableIndicates the pointer to the color key enable bit.
keyIndicates the pointer to the color key.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -**See also:** - -[SetLayerColorKey](LayerFuncs.md#a5701fe1e0e2414de577aa5329bd873c9) - -## GetLayerCompression - -``` -int32_t(* LayerFuncs::GetLayerCompression) (uint32_t devId, uint32_t layerId, int32_t *compType) -``` - - **Description:** - -Checks whether the compression feature is enabled for a layer. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
devIdIndicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device.
layerIdIndicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID.
compTypeIndicates the pointer to the variable specifying whether the compression feature is enabled.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -**See also:** - -[SetLayerCompression](LayerFuncs.md#a46c9750d8615dc874b66ac4b10796b24) - -## GetLayerPalette - -``` -int32_t(* LayerFuncs::GetLayerPalette) (uint32_t devId, uint32_t layerId, uint32_t *palette, uint32_t len) -``` - - **Description:** - -Obtains the palette of a layer. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
devIdIndicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device.
layerIdIndicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID.
paletteIndicates the pointer to the obtained palette.
lenIndicates the length of the palette.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -**See also:** - -[SetLayerPalette](LayerFuncs.md#a3982c76e093852ef386fc372581be4af) - -## GetLayerPreMulti - -``` -int32_t(* LayerFuncs::GetLayerPreMulti) (uint32_t devId, uint32_t layerId, bool *preMul) -``` - - **Description:** - -Obtains the premultiplication flag of a layer. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
devIdIndicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device.
layerIdIndicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID.
preMulIndicates the pointer to the obtained layer premultiplication flag.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -**See also:** - -[SetLayerPreMulti](LayerFuncs.md#a456aa01ca3ffa81d2e49c0a9487f816f) - -## GetLayerSize - -``` -int32_t(* LayerFuncs::GetLayerSize) (uint32_t devId, uint32_t layerId, [IRect](IRect.md) *rect) -``` - - **Description:** - -Obtains the size of a layer. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
devIdIndicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device.
layerIdIndicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID.
rectIndicates the pointer to the obtained layer size.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -**See also:** - -[SetLayerSize](LayerFuncs.md#ab58e66b0676b1baa1662c175d43bf219) - -## GetLayerVisibleState - -``` -int32_t(* LayerFuncs::GetLayerVisibleState) (uint32_t devId, uint32_t layerId, bool *visible) -``` - - **Description:** - -Checks whether a layer is visible. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
devIdIndicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device.
layerIdIndicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID.
visibleIndicates the pointer to the obtained layer visibility. The value true indicates that the layer is visible, and false indicates that the layer is invisible.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -**See also:** - -[SetLayerVisible](LayerFuncs.md#aaa5bf7f98e8dc47510a4f26fb38094b6) - -## GetLayerZorder - -``` -int32_t(* LayerFuncs::GetLayerZorder) (uint32_t devId, uint32_t layerId, uint32_t *zorder) -``` - - **Description:** - -Obtains the z-order of a layer. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
devIdIndicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device.
layerIdIndicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID.
zorderIndicates the pointer to the obtained z-order. The value is an integer ranging from 0 to 255. A larger z-order value indicates a higher layer.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -**See also:** - -[SetLayerZorder](LayerFuncs.md#aa3803c2a6395651d1538ffb62d29733d) - -## InitDisplay - -``` -int32_t(* LayerFuncs::InitDisplay) (uint32_t devId) -``` - - **Description:** - -Initializes a display device. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
devIdIndicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -**See also:** - -[DeinitDisplay](LayerFuncs.md#a8d7a715d7d2b4bd5ab0db92c2a1eec93) - -## OpenLayer - -``` -int32_t(* LayerFuncs::OpenLayer) (uint32_t devId, const [LayerInfo](LayerInfo.md) *layerInfo, uint32_t *layerId) -``` - - **Description:** - -Opens a layer on a specified display device. - -Before using a layer on the GUI, you must open the layer based on the layer information. After the layer is opened, you can obtain the layer ID and then use other functions based on the layer ID. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
devIdIndicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device.
layerInfoIndicates the pointer to the layer information passed to open a layer, including the layer type, layer size, and pixel format.
layerIdIndicates the pointer to the layer ID, which identifies a unique layer. The layer ID is returned to the GUI after the layer is successfully opened.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -**See also:** - -[CloseLayer](LayerFuncs.md#a2e375f75209da329f131b914377e9616) - -## SetLayerAlpha - -``` -int32_t(* LayerFuncs::SetLayerAlpha) (uint32_t devId, uint32_t layerid, [LayerAlpha](LayerAlpha.md) *alpha) -``` - - **Description:** - -Sets the alpha value for a layer. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
devIdIndicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device.
layerIdIndicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID.
alphaIndicates the pointer to the alpha value to set.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -**See also:** - -[GetLayerAlpha](LayerFuncs.md#acf1e01338eeb0fd957f53ed0d2551394) - -## SetLayerColorKey - -``` -int32_t(* LayerFuncs::SetLayerColorKey) (uint32_t devId, uint32_t layerId, bool enable, uint32_t key) -``` - - **Description:** - -Sets the color key for a layer. - -The color key is used during layer overlay. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
devIdIndicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device.
layerIdIndicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID.
enableSpecify whether to enable the color key.
keyIndicates the color key.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -**See also:** - -[GetLayerColorKey](LayerFuncs.md#aea882232b6279b8be82c45e889187b24) - -## SetLayerCompression - -``` -int32_t(* LayerFuncs::SetLayerCompression) (uint32_t devId, uint32_t layerId, int32_t compType) -``` - - **Description:** - -Sets the compression feature for a layer. - -In specific scenarios, images need to be compressed. You can set whether to enable layer compression. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
devIdIndicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device.
layerIdIndicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID.
compTypeSpecifies whether to enable the compression feature. The value true>/b> means to enable compression, and false> means the opposite.
- -**Returns:** - -**** Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. **** - -**See also:** - -**** [GetLayerCompression](LayerFuncs.md#ab0b5855ea4ee5228516303cba84907ce) **** - -## SetLayerCrop - -``` -int32_t(* LayerFuncs::SetLayerCrop) (uint32_t devId, uint32_t layerId, [IRect](IRect.md) *rect) -``` - - **Description:** - -Sets the rectangular area to crop for a layer. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
devIdIndicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device.
layerIdIndicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID.
rectIndicates the pointer to the rectangular area to crop.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -## SetLayerDirtyRegion - -``` -int32_t(* LayerFuncs::SetLayerDirtyRegion) (uint32_t devId, uint32_t layerId, [IRect](IRect.md) *region) -``` - - **Description:** - -Sets the flushing area for a layer. - -After the GUI draws an image, you must set the layer flushing area before calling the [Flush](LayerFuncs.md#abb480bf2b85e93841c49fdc9800bd1e7) function to flush the screen. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
devIdIndicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device.
layerIdIndicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID.
regionIndicates the pointer to the flushing area to set.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -## SetLayerPalette - -``` -int32_t(* LayerFuncs::SetLayerPalette) (uint32_t devId, uint32_t layerId, uint32_t *palette, uint32_t len) -``` - - **Description:** - -Sets the palette for a layer. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
devIdIndicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device.
layerIdIndicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID.
paletteIndicates the pointer to the palette to set.
lenIndicates the length of the palette.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -**See also:** - -[GetLayerPalette](LayerFuncs.md#af713bc39e51dc8168c278e2f126bf4e3) - -## SetLayerPreMulti - -``` -int32_t(* LayerFuncs::SetLayerPreMulti) (uint32_t devId, uint32_t layerId, bool preMul) -``` - - **Description:** - -Sets layer premultiplication. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
devIdIndicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device.
layerIdIndicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID.
preMulSpecifies whether to enable layer premultiplication. The value 1 means to enable layer premultiplication, and 0 means the opposite.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -**See also:** - -[GetLayerPreMulti](LayerFuncs.md#a4a0e26f8401da1232f03bb37502ff4bd) - -## SetLayerSize - -``` -int32_t(* LayerFuncs::SetLayerSize) (uint32_t devId, uint32_t layerId, [IRect](IRect.md) *rect) -``` - - **Description:** - -Sets the size of a layer. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
devIdIndicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device.
layerIdIndicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID.
rectIndicates the pointer to the layer size to set, in pixels.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -**See also:** - -[GetLayerSize](LayerFuncs.md#a56be84be25eba64497b2a842c1f68b26) - -## SetLayerVisible - -``` -int32_t(* LayerFuncs::SetLayerVisible) (uint32_t devId, uint32_t layerId, bool visible) -``` - - **Description:** - -Sets whether a layer is visible. - -A visible layer is displayed on the screen, whereas an invisible layer is not displayed on the screen. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
devIdIndicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device.
layerIdIndicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID.
visibleIndicates the visibility to set for the layer. The value true means to set the layer to be visible, and false means the opposite.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -**See also:** - -[GetLayerVisibleState](LayerFuncs.md#a6bbff71bb4f17eb84a4db4857a0b0985) - -## SetLayerZorder - -``` -int32_t(* LayerFuncs::SetLayerZorder) (uint32_t devId, uint32_t layerId, uint32_t zorder) -``` - - **Description:** - -Sets the z-order for a layer. - -A larger z-order value indicates a higher layer. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
devIdIndicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device.
layerIdIndicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID.
zorderIndicates the z-order to set. The value is an integer ranging from 0 to 255.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -**See also:** - -[GetLayerZorder](LayerFuncs.md#a5644645442e1d6943b55ce0a6a801b8c) - -## SetTransformMode - -``` -int32_t(* LayerFuncs::SetTransformMode) (uint32_t devId, uint32_t layerId, [TransformType](Display.md#gaa65f3b21a9a92ff022e435a7304126d2) type) -``` - - **Description:** - -Sets the transform mode for a layer. - -Using this function, you can rotate, scale, and move the layer. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
devIdIndicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device.
layerIdIndicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID.
typeIndicates the transformation mode to set.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -## SnapShot - -``` -int32_t(* LayerFuncs::SnapShot) (uint32_t devId, [LayerBuffer](LayerBuffer.md) *buffer) -``` - - **Description:** - -Implements the snapshot feature. - -This function saves the screenshot of image data on the display device to the buffer for debugging or as requested by applications. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
devIdIndicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device.
bufferIndicates the pointer to the buffer for saving screenshots.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - -## WaitForVBlank - -``` -int32_t(* LayerFuncs::WaitForVBlank) (uint32_t devId, uint32_t layerId) -``` - - **Description:** - -Waits for the arrival of vertical blanking. - -This function blocks the process until vertical blanking arrives, implementing the synchronization between software and hardware. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
devIdIndicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device.
layerIdIndicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID.
timeOutIndicates the maximum duration that the process waits for the arrival of vertical blanking.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [DispErrCode](Display.md#ga12a925dadef7573cd74d63d06824f9b0) otherwise. - diff --git a/api/api-SmartVision-Devices/LayerInfo.md b/api/api-SmartVision-Devices/LayerInfo.md deleted file mode 100755 index a98e5f3b0e69c6eb68e2356df5e85f8dd14c5e40..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/LayerInfo.md +++ /dev/null @@ -1,118 +0,0 @@ -# LayerInfo - -- [Overview](#section888913598165632) -- [Summary](#section1769336437165632) -- [Data Fields](#pub-attribs) -- [Details](#section1646535589165632) -- [Field](#section369910035165632) -- [bpp](#abf13f41732fac1713e51ab377c27922a) -- [height](#aab83825af07139338b4536e45fe6d8fc) -- [pixFormat](#a3a05038829a72f6afa87d504712f9117) -- [type](#ade3a008d2aeccc966c226a60eb59e7ae) -- [width](#a31b0ef7b0a83950c56dd1cafd20c9509) - -## **Overview** - -**Related Modules:** - -[Display](Display.md) - -**Description:** - -Defines layer information. - -**[LayerInfo](LayerInfo.md)** must be passed to the **OpenLayer** function, which creates a layer based on the layer information. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

width

-

int32_t

-

height

-

int32_t

-

type

-

LayerType

-

bpp

-

int32_t

-

pixFormat

-

PixelFormat

-
- -## **Details** - -## **Field ** - -## bpp - -``` -int32_t LayerInfo::bpp -``` - - **Description:** - -Number of bits occupied by each pixel - -## height - -``` -int32_t LayerInfo::height -``` - - **Description:** - -Layer height - -## pixFormat - -``` -[PixelFormat](Codec.md#ga60883d4958a60b91661e97027a85072a) LayerInfo::pixFormat -``` - - **Description:** - -Pixel format of the layer - -## type - -``` -[LayerType](Display.md#ga56943a0946e5f15e5e58054b8e7a04a4) LayerInfo::type -``` - - **Description:** - -Layer type, which can be a graphics layer, overlay layer, and sideband layer - -## width - -``` -int32_t LayerInfo::width -``` - - **Description:** - -Layer width - diff --git a/api/api-SmartVision-Devices/MATH.md b/api/api-SmartVision-Devices/MATH.md deleted file mode 100755 index a90fecb7971aa805a21fa338e8b9566832177ba2..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/MATH.md +++ /dev/null @@ -1,10975 +0,0 @@ -# MATH - -- [Overview](#section1668727741165622) -- [Summary](#section2135939735165622) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Macros](#define-members) -- [Typedefs](#typedef-members) -- [Functions](#func-members) -- [Details](#section561840359165622) -- [Macro Definition](#section1913429893165622) -- [isfinite](#ga256d70a32c03904ce13c999c1e9dc35d) -- [isgreater](#gada788e9d6ce0ca927874ec4e53af1f77) -- [isgreaterequal](#ga5a7f86a4d3e6139e4913e2e8eba52612) -- [isinf](#ga2a266c767456556e5c0da234b602b18b) -- [isless](#ga61079b32084130da4345c2eea93e0d61) -- [islessequal](#gabf3cb1e5a0aaa1c42dffa9ebb1d78c30) -- [islessgreater](#ga5e534756b747fd2e9ee19f8fdd93b30b) -- [isnan](#ga2e1baae9134e580910322362dc23290e) -- [isnormal](#gad83f5949c4b5d810225b9a834840bac9) -- [isunordered](#ga33daf51eb7138d477e0b0985c51e4fad) -- [signbit](#gaa63ffa98f213f62e536b073c28cb3cd8) -- [Function](#section948971469165622) -- [acos\(\)](#gae93afe22ff34c79ee97ea3eaf77557db) -- [acosf\(\)](#ga983a9e1aa7568df39153ea4d8e16653b) -- [acosh\(\)](#gac862445bcb46911b1782c284829d5e46) -- [acoshf\(\)](#ga84cfd14c3432390f70b6233d24ad173b) -- [acoshl\(\)](#ga104456314ba05665d6cbb805e823dd10) -- [acosl\(\)](#gae84dc6cff92b3417098f16a1811635e4) -- [asin\(\)](#gaa9528d92a3ae44ad6484da0774604454) -- [asinf\(\)](#ga7447a7400ca474ba42d127b04d6ee2b7) -- [asinh\(\)](#ga907297107e93ea9c8a0c8409a8e65079) -- [asinhf\(\)](#ga1131c65ac49f31ed6774d27106c6394d) -- [asinhl\(\)](#ga98df355372e19c11634992e4b7e35784) -- [asinl\(\)](#ga3ace56b4f2a4a9364993a5af676793c5) -- [atan\(\)](#ga1e2f8f6d64eaa95131bc63fee34970ea) -- [atan2\(\)](#ga349377202ca14f79eb335b1a421fe4d8) -- [atan2f\(\)](#gaf9e5469acf7a7bf82f29d86a77f539d4) -- [atan2l\(\)](#gaa983bf34c931b97d66be8b7bfd03dc48) -- [atanf\(\)](#gaa582bc257e477e805f4ec384a39a3a8e) -- [atanh\(\)](#gac07fd7b77fa341563abccf9efcc1a711) -- [atanhf\(\)](#ga626d9d6644848e74188f37f0f3ddd4f4) -- [atanhl\(\)](#gab25c31215118cd62672c38f80f010d66) -- [atanl\(\)](#ga650d8dd23c16c6699d84651a18827d37) -- [cabs\(\)](#ga82c65f6b05062b620716623ba49ff07f) -- [cabsf\(\)](#ga59a1f4977dfdf85b51a84bfd56737277) -- [cabsl\(\)](#ga7e37259e24f3384f376e4d3eb45a9ea8) -- [cacos\(\)](#ga51a9bcdc7791e50f879c79d64362d7c3) -- [cacosf\(\)](#ga238bc3dbd59adeb477af18c9a501e04e) -- [cacosh\(\)](#gaf7286142554fde4ba6316a2b64b96c5c) -- [cacoshf\(\)](#gabe9dbe34293eef409598b0559435c5ff) -- [cacoshl\(\)](#gad8e03bbb434b8a9af73e0e3daec045ac) -- [cacosl\(\)](#ga789143f2859142f58590b2726328025f) -- [carg\(\)](#ga4a1e5d839db7a1dc6013b2846b2432d9) -- [cargf\(\)](#ga66334f398567baa3648cd3111ed68d3b) -- [cargl\(\)](#ga74f3429f1b860581f4d15bea90533fd5) -- [casin\(\)](#gac43774f89411806a3e0695012cdb7f38) -- [casinf\(\)](#ga04d2cd1f0b47d3f1b782aeb517151033) -- [casinh\(\)](#ga6fc1a0c1cbac62ba63e799d7e8f488e0) -- [casinhf\(\)](#ga8b682e1c311efa5594ec0d0b39c9efe0) -- [casinhl\(\)](#ga174b8f2a00e771dbbad06fdf0e0ee449) -- [casinl\(\)](#ga8770350a79904ac151ebb3eebd736188) -- [catan\(\)](#ga1a77a3240b834af81a23b38f2af6c93d) -- [catanf\(\)](#ga4d0beef9b3994887e356c6b5c98388d9) -- [catanh\(\)](#ga376fef7890def8c0e7b2b5a5292be074) -- [catanhf\(\)](#ga480c29e0eeace893be77a2c61995d2ec) -- [catanhl\(\)](#gab2422355124f175a41ec092c3b8adf2b) -- [catanl\(\)](#gaf28ad2f006e49eaa6bbdb97dd143d6cb) -- [cbrt\(\)](#ga8af00e2203928978e0242b4afd1d899f) -- [cbrtf\(\)](#ga396c6a553500a355627741e234045bf4) -- [cbrtl\(\)](#ga521c2f4c10b7bb5363bad058ef56794c) -- [ccos\(\)](#ga6a25bcd38751910533efde6dad1499c3) -- [ccosf\(\)](#ga88df5eebfb10b88ed37e444f5b13fd6a) -- [ccosh\(\)](#ga62c8f7e0cce95bbf670af16376909324) -- [ccoshf\(\)](#gabe11c35bd81b278ab0e47196c5952662) -- [ccoshl\(\)](#gad2b7878b871c0266ecb1f58e5bf141a7) -- [ccosl\(\)](#ga785d8c7b2ac4283d4759dfa6a86779ab) -- [ceil\(\)](#ga1ea6d7b591132268abc2e843ababd084) -- [ceilf\(\)](#ga8c1a8db0710bb3f25f643a0fca68fc60) -- [ceill\(\)](#gae11b7781f057eb7ba5d7ed95be7fdbee) -- [cexp\(\)](#gab9c654c52efefb54d06d52aa1a1c1827) -- [cexpf\(\)](#ga8628a449a00228f124c9e53d2236611f) -- [cexpl\(\)](#ga31a965fe1790cace431516e53f7d0cb5) -- [cimag\(\)](#ga6c3d7c875ae93700b0a2a32db24b37d3) -- [cimagf\(\)](#gaac22dc2fffc4326595ff807d441f0675) -- [cimagl\(\)](#ga4237f0401b8123eaec284c995ced4b04) -- [clog\(\)](#gaa39c3557d8db10c19571bc0b63fd5529) -- [clogf\(\)](#ga0c9f343c7d1dabc91f6e4cb868b81152) -- [clogl\(\)](#ga48efe0bf63314044fafaeb32623fff17) -- [conj\(\)](#ga6fb30f37aa43eb2e0199ffdc38cac18a) -- [conjf\(\)](#ga471ecd8d25e722ecae510a635c1a2c53) -- [conjl\(\)](#ga5156353f4650ed7ee06b152790c1558b) -- [copysign\(\)](#gad8d1296592a3e783acdd0de21ff58e2e) -- [copysignf\(\)](#gaf7eb976cc28d0a9a6f0827d01611f979) -- [copysignl\(\)](#gae60d4866e88abf023d92d33c6351ae6f) -- [cos\(\)](#ga5e7b53a694b3cf0f2d7debd444140fbd) -- [cosf\(\)](#ga7b126b2344591e649c21c9ab0b8adb40) -- [cosh\(\)](#ga3795d3c1f1d30819be56da4e4d67f64b) -- [coshf\(\)](#ga498b368486b7ce8677820beeb78d8f66) -- [coshl\(\)](#ga57602cd20f8de2dceea4f05ffb516d82) -- [cosl\(\)](#ga659287f7399efa8d6bc66dc37c8e35f4) -- [cpow\(\)](#ga6fd1bd16c6de991f95a4e19e0f2f2a12) -- [cpowf\(\)](#ga58beb4a3ea7b6ab6bb942900f94179fa) -- [cpowl\(\)](#gae3ae7292dac86eeec3bb9a06b66f61cb) -- [cproj\(\)](#gac10f86edf0994d0ee834768633be644e) -- [cprojf\(\)](#ga9f435a71e44dd1e13eca358e2ca530e6) -- [cprojl\(\)](#ga2cc437f3ab8e77dbd8fb024c66474915) -- [creal\(\)](#ga24b1a511efdb973354d81646c5c3bb81) -- [crealf\(\)](#gad052a3eb4d9f32153173e6bcea9e42ce) -- [creall\(\)](#ga4ee2baa54a4e51877c59527d2be1a0da) -- [csin\(\)](#ga1b9030685d326e66a93a35ca8c4bb0f6) -- [csinf\(\)](#ga76dc89521e12096bc2104c9c0dcc20ea) -- [csinh\(\)](#ga0c782aa9258a4e11cc3ea57b2dcccfef) -- [csinhf\(\)](#ga268ba13d67a10e6667bd6b64a1a96351) -- [csinhl\(\)](#ga0d14ae39cd9a811e42e36512fe6c7e53) -- [csinl\(\)](#gad594fa6071ea5d383a0c7abaa0c32d80) -- [csqrt\(\)](#ga7ff172d72bc0474b93e27470ce94494b) -- [csqrtf\(\)](#gab8e425ba3e5d52d410afc3041bdeadce) -- [csqrtl\(\)](#ga94a429c220e400a1a6781d6e11cbfafd) -- [ctan\(\)](#ga665b5dfc1b1f51d3b444f049c6bd95dd) -- [ctanf\(\)](#ga4301d608cc419f1ba3177fae4f258f30) -- [ctanh\(\)](#ga9c5cf378e654f3aaed9fb0f5c8223585) -- [ctanhf\(\)](#gad68db7f429f2104acf52b096c5efb69a) -- [ctanhl\(\)](#ga2fbb0a9d578343f924c96faed3189805) -- [ctanl\(\)](#ga7aa0362acd67521c9aac791aa617f953) -- [erf\(\)](#gaa8b35382a71885eed509a5f87bf5e266) -- [erfc\(\)](#ga0b6c4cfae41124da64c9a2dcc09e6045) -- [erfcf\(\)](#gad948b9d3bfcb66c074ffe17326030d41) -- [erfcl\(\)](#ga8ac2c9e0246c0c8106d04762a9623594) -- [erff\(\)](#gaabebdd2dd548c14805831297ac129862) -- [erfl\(\)](#ga6ccdcbbc2f0b22de2add8955e415170e) -- [exp\(\)](#gae09128febbbe6372cde4fa0c65608a42) -- [exp10\(\)](#gaea673cadd2aef111e2ee7a813776b768) -- [exp10f\(\)](#gad27f10a0e30a7fe130c18786bf097e4b) -- [exp10l\(\)](#ga28c11df4d7b29c9f59ac733fba51bece) -- [exp2\(\)](#ga86e37219434c0b7978453b6ca88fc5fb) -- [exp2f\(\)](#gaed26c6708ff2027f9a8214d206eef0e7) -- [exp2l\(\)](#ga4618e032de8318b72df5cc71f15b5e45) -- [expf\(\)](#ga0c2bc89b8355a89542ac98d9e2120363) -- [expl\(\)](#gaed4eb11ef1397c751334311ce5b43920) -- [expm1\(\)](#gae4963ac40f96d4b1fe8af1b1e90a20bb) -- [expm1f\(\)](#ga5b8d8815f5c801fdbdb7f7767fbf9af4) -- [expm1l\(\)](#ga702b0680671cf9ef94017ac04f77358b) -- [fabs\(\)](#ga8fb5c0b9b43a108724b355136d29d2f9) -- [fabsf\(\)](#ga9b02e2f3ebf257ac4f4d3ca1da6147d7) -- [fabsl\(\)](#ga404c051ab9afd74c7ceed207683a235f) -- [fdim\(\)](#ga800522810eaaed28bd53798bff4b0bfa) -- [fdimf\(\)](#gaeee3a0bf2804c53c65199590ac4804cf) -- [fdiml\(\)](#gab88ba65d1861deddbbc5cb5384d6a02e) -- [finite\(\)](#ga08e754462e6ec13bc05fd41cff9cdd4a) -- [finitef\(\)](#gaea39ac813876c506f8c351e6c14a5cb7) -- [floor\(\)](#ga6de60a3e907dcf0bfe3ea8d64f1e8873) -- [floorf\(\)](#ga0bcc6aa4b3c37bfa73f06ebdecc0d247) -- [floorl\(\)](#ga211df53cdf5208b9bbfa92e2d9aef97f) -- [fma\(\)](#gac6df7bd41d198a70da3915a80de5452d) -- [fmaf\(\)](#gaa6b32a0b7f88680bb59bcfb9c6168ed2) -- [fmal\(\)](#gaf30b6b26252979964796ffa55dd30120) -- [fmax\(\)](#ga35e041615ac931b4d848a7b173049301) -- [fmaxf\(\)](#ga8849bfdbec18ded429fad4772cf60f4b) -- [fmaxl\(\)](#ga0e31e170115494fdc03b6556844232f3) -- [fmin\(\)](#gaf0a18b3ac9e461ac48b4cfffb4945a84) -- [fminf\(\)](#ga9b4132c27f31d39c91c3c6063f378103) -- [fminl\(\)](#ga8a301190384886aa4e327db265fb5c9f) -- [fmod\(\)](#ga537296d1a8f9fb621676038b99ba7edf) -- [fmodf\(\)](#gaf17ec425baca2b5f3882a05b5e19dfb5) -- [fmodl\(\)](#gaa927d9996fb40db42bd3a6cbe57da9a7) -- [frexp\(\)](#gae3fa88adf02f16a693f3dccea3c42ef0) -- [frexpf\(\)](#ga12c36e745d8a9eb4f01c7e0eeb426dd3) -- [frexpl\(\)](#ga239d50c0595ff8538b9aa3186ac4fd29) -- [hypot\(\)](#ga6d6a905f61d535f8454190433b8c0ea5) -- [hypotf\(\)](#ga9fa4a03d7c4abfda7d9ad7b6ff7f6456) -- [hypotl\(\)](#ga92a0e76d17c34fc1b3b2e7c0868aea6e) -- [ilogb\(\)](#ga600dd249210d15af31b9a29c2d09d255) -- [ilogbf\(\)](#gaf53f0f07bb80b1a38fb47773a190e7a7) -- [ilogbl\(\)](#gafbd166ed232a372f090b8f9fa8441423) -- [j0\(\)](#gaffb00730a1127dee798137075951ae21) -- [j0f\(\)](#gafa59b98550749c27995dfb7c70e6783a) -- [j1\(\)](#ga8cac4aa70c418eba481417f1878b4cee) -- [j1f\(\)](#ga4b50bbed127a1c57940d600498a3c5c7) -- [jn\(\)](#gadeff843dc8106ffda5caba6df44c591d) -- [jnf\(\)](#gac3fcdfd92a775eed4ebd673d7da02525) -- [ldexp\(\)](#gab3662815756f0bd419dc1b12f4ad905d) -- [ldexpf\(\)](#gaacd370a7830c29f47239dea1ea2eb7f9) -- [ldexpl\(\)](#ga454187039ef790629dab1e7724c3c3b2) -- [lgamma\(\)](#gacd3ebe923fa039624f0b7de3320816bf) -- [lgammaf\(\)](#ga5900f7bf0093757f1ba36b5940b1e10b) -- [lgammal\(\)](#ga4dafd3eb6952c8daabe8a98f4a64a7df) -- [lgammal\_r\(\)](#ga278e86e217081a0268107f0d6876cb9b) -- [llrint\(\)](#ga64a4201c82f6ee7043a270bbbc6a5e19) -- [llrintf\(\)](#ga33d95711621def731d3f88c4e606323e) -- [llrintl\(\)](#ga20e0da115f76608eff4695177f2f605a) -- [llround\(\)](#ga3e4957daeecea4e616ed1f1870fe4f31) -- [llroundf\(\)](#ga8259999687e8bd4b5509ca0d69b0ad9d) -- [llroundl\(\)](#ga82a6d70a29e839514b93bb0699f07bbe) -- [log\(\)](#gadb302c9aafbaa5e180d9f60ee954bb82) -- [log10\(\)](#ga6572e82a4891917a9ba7fb2a964f8182) -- [log10f\(\)](#gae207b1eb007a6c23394dcb6fc7f16adf) -- [log10l\(\)](#gae824e49a04221dcf66b9791c5df8d6b6) -- [log1p\(\)](#gac2aac20ab1347498e6e4f209148fea84) -- [log1pf\(\)](#gacbf820b74779ce35a3c726a3a62bc8ef) -- [log1pl\(\)](#ga2a632effaace01f30cba42725ae48dfa) -- [log2\(\)](#ga38bd88274dc5594b4826fd60c8054c8e) -- [log2f\(\)](#ga79fe62234001b88317245f7599158aaf) -- [log2l\(\)](#gaa383ae0cab6c24f1bcba661dee0fbd70) -- [logb\(\)](#gaa34bf5be5c3dab058c532adc2792113c) -- [logbf\(\)](#ga6939b8381c2f160d26913646ca7ab6c4) -- [logbl\(\)](#ga2f9c0448126d1a838624e3460217bb84) -- [logf\(\)](#ga8246b3e17a39b137d0c62670d0c6e336) -- [logl\(\)](#gaf67da1c28ce33b403f955103f201dfb8) -- [lrint\(\)](#ga3337db086394bad101bd8d42d891640a) -- [lrintf\(\)](#ga16173bca19eef93d0230bfb7c86b5740) -- [lrintl\(\)](#gac6d217e9b96a145f5eeb2a490e6496e6) -- [lround\(\)](#ga5936ef27aa03815e9c17d557e87a33d7) -- [lroundf\(\)](#ga0136619b503ddb8ce1a226cd34c9538c) -- [lroundl\(\)](#gafa865c5b70c9311f0f8701a1af60c715) -- [modf\(\)](#gafcfe25b77e975450988866fea9d3c9f0) -- [modff\(\)](#gad8314f66dfe8603f3a166eb466261ce1) -- [modfl\(\)](#gabacf3b74f8d7e30a70da8ae47c8e4e3e) -- [nan\(\)](#gaa4ee2f416f261bbd71cda3193c4884c9) -- [nanf\(\)](#ga7fe43d4c86419daea2c133e8c5c1a17d) -- [nanl\(\)](#gac92b1a3a1073a630ae0b7084e596d40f) -- [nearbyint\(\)](#ga61ba6b3078ccbd5aac518e6ca2a757bd) -- [nearbyintf\(\)](#gab3be3fdcb83a6d7cbd10aa5d891f88bf) -- [nearbyintl\(\)](#ga4b51faf338f7d4f31224d0c096a8859b) -- [nextafter\(\)](#gabed1b7ee913471448c2dbe58dff28db3) -- [nextafterf\(\)](#ga57d2446286a54227595950a2118b349b) -- [nextafterl\(\)](#ga38691f2f734e77206e4336cdcddd0e5b) -- [nexttoward\(\)](#gaeb7afe6d08d8daec35aa282c63d7647e) -- [nexttowardf\(\)](#ga634a1dabb08aa5a4fa6897920eff3c1d) -- [nexttowardl\(\)](#ga3930cfe4df009d7221db329b910d6e30) -- [pow\(\)](#gaa56c9494c95edf68386375e97d64159b) -- [pow10\(\)](#gafbbc60a3627a8de4845c7e99e6134ec8) -- [pow10f\(\)](#ga2cb598503b85d66abf59e9da06478f1a) -- [pow10l\(\)](#ga9baf71e9033dd73a9c225a2fc9cca61d) -- [powf\(\)](#gac6b287549be087f6f0bf03b6fe30499e) -- [powl\(\)](#ga2f4830e468138e1513b55ca6a92a0f9a) -- [remainder\(\)](#gaf7df01c4a9038dbf3562b41bc8c3be03) -- [remainderf\(\)](#ga370ff5cfa842822bfd8ea0a93d441a33) -- [remainderl\(\)](#gabadbe61e166bbf3031b979661f0e8336) -- [remquo\(\)](#gac836dc6a979229173eb3d6e2744d82de) -- [remquof\(\)](#ga15ec704e1894cfa573ac37a65afe009a) -- [remquol\(\)](#gaacadcc57a95279058f29e657dce4d285) -- [rint\(\)](#gae1f9edd5049d3ff63b0373a3c15c38c1) -- [rintf\(\)](#ga48f9341b9310fefa5dd1b0c8c84c99df) -- [rintl\(\)](#gaedc37bf10d69d2efa2a478f5f5d4b26b) -- [round\(\)](#ga7df19cf730447c00150569250a4b5e1d) -- [roundf\(\)](#gade09185c0cf8101fa9e2f25c15041b81) -- [roundl\(\)](#ga6565127c023ae8f392ce69e3b3f30aa1) -- [scalb\(\)](#ga14db57dcd8982430d12219bbecd08a05) -- [scalbf\(\)](#ga9c9db25d2ff9973e0d8638cf42df3999) -- [scalbln\(\)](#ga947d3d0739c0dc7c46d1eec778d4b6af) -- [scalblnf\(\)](#ga1aa3cc34e8f84a2a09400c25c578100d) -- [scalblnl\(\)](#gaeb098df94536b520ced9df59fd353848) -- [scalbn\(\)](#gaa2fbea1fca1faaebedf2deec71c47189) -- [scalbnf\(\)](#ga3849b86bb2f39ebccb79b91745f7883f) -- [scalbnl\(\)](#ga284717e9eceed5bc33389ce33170f907) -- [significand\(\)](#gafad3bf1f77c516fb8891c72beb51640f) -- [significandf\(\)](#gac57d7d88e1a9b57c9a129ee4d4a68c42) -- [sin\(\)](#gaad4af25633b071b0e2cdb8ebd87eca77) -- [sincos\(\)](#gaf4509ae544cecab0e9a61efdfccb7530) -- [sincosf\(\)](#gac59adab35511be68e92ad9013d63e866) -- [sincosl\(\)](#gaf877b78dbe8e265bdf4b975dbc713482) -- [sinf\(\)](#ga8a7dc2a88e109f4e15b661247665709a) -- [sinh\(\)](#ga862012e970c977c482507064e2793b45) -- [sinhf\(\)](#ga1976c7577fb97800f4b926bd042b64ac) -- [sinhl\(\)](#gad160d5d1bb3f113e96135a4bebe76abe) -- [sinl\(\)](#gaeb537bfea71fa91192234a666f3a6a25) -- [sqrt\(\)](#gab87521a75ef827a85807f89a6c10629a) -- [sqrtf\(\)](#ga46c9a8d40cde7c4d5ab40a67e55316bb) -- [sqrtl\(\)](#ga9c028a87917b3bb9bba9e75f66cdbd43) -- [tan\(\)](#gaa48fdfd5eea5f4f9c33496402b9e4039) -- [tanf\(\)](#ga67d5bfe80effce6adebf5fcbc5a7dae0) -- [tanh\(\)](#gaf85bcf153d7ae805733927f12329dac1) -- [tanhf\(\)](#ga74e8f87bb37a338d2cebbb6b1d696593) -- [tanhl\(\)](#ga94ee8c57b6b2d0bc5466c75bea2bffcf) -- [tanl\(\)](#ga2151fba6c1e9b4fa5d2af2dcb5c68b17) -- [tgamma\(\)](#ga54afbf509eea5e9d6f9efdebc572339a) -- [tgammaf\(\)](#ga2ab69de9110cc2c62ca78b5d20a3a3ae) -- [tgammal\(\)](#ga8eff39a57115761c5025e08ff2e08c6a) -- [trunc\(\)](#ga82a151adfde56b28fa8a50355c4f2ff6) -- [truncf\(\)](#gaa8bb2049c170c9ac5b131fdba029991a) -- [truncl\(\)](#ga8f9695496a9bb839eb5f728b6bf0c856) -- [y0\(\)](#gafca57fd80386476e5cd1dd52173103c5) -- [y0f\(\)](#gaba3cd2d73c1ae75ec2d01ebb2dfc108c) -- [y1\(\)](#ga369368526a105f3fba6776b11586070c) -- [y1f\(\)](#ga5f37c38e8985dafae6abca2d1782c160) -- [yn\(\)](#gae31b4c8c6af724eaa73ad2ebce1aa3ce) -- [ynf\(\)](#ga47f8750942b731456dd7f2cbf5f55806) - -## **Overview** - -**Description:** - -Provides math functions, such as trigonometric, exponential, logarithmic functions,and perform operations on complex numbers. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - - - - - - - -

File Name

-

Description

-

complex.h

-

Declares functions to perform operations on complex numbers.

-

fenv.h

-

Declares specific functions for performing operations for floating-point exceptions and rounding modes.

-

math.h

-

Provides common math functions.

-
- -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

fenv_t

-

Defines the floating-point environment.

-
- -## Macros - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

complex _Complex

-

Indicates the type of a complex number.

-

FE_INVALID 1

-

Indicates an invalid floating-point exception. At least one parameter value is not defined in the function.

-

FE_DIVBYZERO 2

-

Indicates a pole error exception. The return value is asymptotically infinite when the divisor is zero or the input is asymptotic to zero.

-

FE_OVERFLOW 4

-

Indicates an overflow floating-point exception. The result is too large to be represented in the normal return value.

-

FE_UNDERFLOW 8

-

Indicates an underflow floating-point exception. The result is too small to be represented in the normal return value.

-

FE_INEXACT 16

-

Indicates an inexact floating-point exception.

-

FE_ALL_EXCEPT 31

-

Indicates bitwise OR of all the preceding supported floating-point exceptions.

-

FE_TONEAREST 0

-

Indicates rounding towards the nearest integer.

-

FE_DOWNWARD 0x800000

-

Indicates rounding towards negative infinity.

-

FE_UPWARD 0x400000

-

Indicates rounding towards positive infinity.

-

FE_TOWARDZERO 0xc00000

-

Indicates rounding towards zero.

-

FE_DFL_ENV ((const fenv_t *) -1)

-

Defines the default floating-point environment.

-

NAN (0.0f/0.0f)

-

Indicates an undefined or unrepresentable value.

-

INFINITY 1e5000f

-

Indicates an infinity.

-

HUGE_VALF INFINITY

-

Indicates a float infinity.

-

HUGE_VAL ((double)INFINITY)

-

Indicates a double infinity.

-

HUGE_VALL ((long double)INFINITY)

-

Indicates a long double infinity.

-

MATH_ERRNO 1

-

Indicates an error that occurs in floating-point operations.

-

MATH_ERREXCEPT 2

-

Indicates a floating-point exception.

-

math_errhandling 2

-

Indicates the error handling mechanism employed by math functions.

-

FP_ILOGBNAN (-1-0x7fffffff)

-

Indicates the calculation result of ilogb(NAN).

-

FP_ILOGB0 FP_ILOGBNAN

-

Indicates the calculation result of ilogb(0).

-

FP_NAN 0

-

Indicates a Not-a-Number (NaN) value.

-

FP_INFINITE 1

-

Indicates an infinity.

-

FP_ZERO 2

-

Indicates value 0.

-

FP_SUBNORMAL 3

-

Indicates a subnormal.

-

FP_NORMAL 4

-

Indicates a normal value.

-

isinf(x)

-

Checks whether the floating-point value x is an infinity.

-

isnan(x)

-

Checks whether the floating-point value x is a NaN value.

-

isnormal(x)

-

Checks whether the floating-point value x is a normal value.

-

isfinite(x)

-

Checks whether the floating-point value x is finite.

-

signbit(x)

-

Checks whether the sign of the floating-point value x is negative.

-

isunordered(x, y) (isnan((x)) ? ((void)(y),1) : isnan((y)))

-

Checks whether floating-point value x or y is unordered.

-

isless(x, y) __tg_pred_2(x, y, __isless)

-

Checks whether floating-point value x is less than y.

-

islessequal(x, y) __tg_pred_2(x, y, __islessequal)

-

Checks whether floating-point value x is less than or equal to y.

-

islessgreater(x, y) __tg_pred_2(x, y, __islessgreater)

-

Checks whether floating-point value x is either less than or greater than y.

-

isgreater(x, y) __tg_pred_2(x, y, __isgreater)

-

Checks whether floating-point value x is greater than y.

-

isgreaterequal(x, y) __tg_pred_2(x, y, __isgreaterequal)

-

Checks whether floating-point value x is greater than or equal to y.

-

MAXFLOAT 3.40282346638528859812e+38F

-

Maximum value of type float.

-

M_E 2.7182818284590452354 /* e */

-

Base e of natural logarithms.

-

M_LOG2E 1.4426950408889634074 /* log_2 e */

-

Logarithm to base 2 of M_E

-

M_LOG10E 0.43429448190325182765 /* log_10 e */

-

Logarithm to base 10 of M_E

-

M_LN2 0.69314718055994530942 /* log_e 2 */

-

Natural logarithm of 2

-

M_LN10 2.30258509299404568402 /* log_e 10 */

-

Natural logarithm of 10

-

M_PI 3.14159265358979323846 /* pi */

-

Ratio of a circle's circumference to its diameter.

-

M_PI_2 1.57079632679489661923 /* pi/2 */

-

Pi divided by 2

-

M_PI_4 0.78539816339744830962 /* pi/4 */

-

Pi divided by 4

-

M_1_PI 0.31830988618379067154 /* 1/pi */

-

Reciprocal of pi.

-

M_2_PI 0.63661977236758134308 /* 2/pi */

-

Two times the reciprocal of pi.

-

M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */

-

Two times the reciprocal of the square root of pi.

-

M_SQRT2 1.41421356237309504880 /* sqrt(2) */

-

Square root of 2

-

M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */

-

Reciprocal of the square root of 2

-
- -## Typedefs - - - - - - - - - - -

Typedef Name

-

Description

-

fexcept_t

-

typedef unsigned long

-

Floating-point exception type.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

cacos (double complex z)

-

double complex

-

Calculates the arc cosine of the complex number z.

-

cacosf (float complex z)

-

float complex

-

Calculates the arc cosine of the complex number z.

-

cacosl (long double complex z)

-

long double complex

-

Calculates the arc cosine of the complex number z.

-

casin (double complex z)

-

double complex

-

Calculates the arc sine of the complex number z.

-

casinf (float complex z)

-

float complex

-

Calculates the arc sine of the complex number z.

-

casinl (long double complex z)

-

long double complex

-

Calculates the arc sine of the complex number z.

-

catan (double complex z)

-

double complex

-

Calculates the arc tangent of the complex number z.

-

catanf (float complex z)

-

float complex

-

Calculates the arc tangent of the complex number z.

-

catanl (long double complex z)

-

long double complex

-

Calculates the arc tangent of the complex number z.

-

ccos (double complex z)

-

double complex

-

Calculates the cosine of the complex number z.

-

ccosf (float complex z)

-

float complex

-

Calculates the cosine of the complex number z.

-

ccosl (long double complex z)

-

long double complex

-

Calculates the cosine of the complex number z.

-

csin (double complex z)

-

double complex

-

Calculates the sine of the complex number z.

-

csinf (float complex z)

-

float complex

-

Calculates the sine of the complex number z.

-

csinl (long double complex z)

-

long double complex

-

Calculates the sine of the complex number z.

-

ctan (double complex z)

-

double complex

-

Calculates the tangent of the complex number z.

-

ctanf (float complex z)

-

float complex

-

Calculates the tangent of the complex number z.

-

ctanl (long double complex z)

-

long double complex

-

Calculates the tangent of the complex number z.

-

cacosh (double complex z)

-

double complex

-

Calculates the inverse hyperbolic cosine of the complex number z.

-

cacoshf (float complex z)

-

float complex

-

Calculates the inverse hyperbolic cosine of the complex number z.

-

cacoshl (long double complex z)

-

long double complex

-

Calculates the inverse hyperbolic cosine of the complex number z.

-

casinh (double complex z)

-

double complex

-

Calculates the inverse hyperbolic sine of the complex number z.

-

casinhf (float complex z)

-

float complex

-

Calculates the inverse hyperbolic sine of the complex number z.

-

casinhl (long double complex z)

-

long double complex

-

Calculates the inverse hyperbolic sine of the complex number z.

-

catanh (double complex z)

-

double complex

-

Calculates the inverse hyperbolic tangent of the complex number z.

-

catanhf (float complex z)

-

float complex

-

Calculates the inverse hyperbolic tangent of the complex number z.

-

catanhl (long double complex z)

-

long double complex

-

Calculates the inverse hyperbolic tangent of the complex number z.

-

ccosh (double complex z)

-

double complex

-

Calculates the hyperbolic cosine of the complex number z.

-

ccoshf (float complex z)

-

float complex

-

Calculates the hyperbolic cosine of the complex number z.

-

ccoshl (long double complex z)

-

long double complex

-

Calculates the hyperbolic cosine of the complex number z.

-

csinh (double complex z)

-

double complex

-

Calculates the hyperbolic sine of the complex number z.

-

csinhf (float complex z)

-

float complex

-

Calculates the hyperbolic sine of the complex number z.

-

csinhl (long double complex z)

-

long double complex

-

Calculates the hyperbolic sine of the complex number z.

-

ctanh (double complex z)

-

double complex

-

Calculates the hyperbolic tangent of the complex number z.

-

ctanhf (float complex z)

-

float complex

-

Calculates the hyperbolic tangent of the complex number z.

-

ctanhl (long double complex z)

-

long double complex

-

Calculates the hyperbolic tangent of the complex number z.

-

cexp (double complex z)

-

double complex

-

Calculates the base-e exponential of the complex number z.

-

cexpf (float complex z)

-

float complex

-

Calculates the base-e exponential of the complex number z.

-

cexpl (long double complex z)

-

long double complex

-

Calculates the base-e exponential of the complex number z.

-

clog (double complex z)

-

double complex

-

Calculates the natural (base-e) logarithm of the complex number z.

-

clogf (float complex z)

-

float complex

-

Calculates the natural (base-e) logarithm of the complex number z.

-

clogl (long double complex z)

-

long double complex

-

Calculates the natural (base-e) logarithm of the complex number z.

-

cabs (double complex z)

-

double

-

Calculates the absolute value of the complex number z.

-

cabsf (float complex z)

-

float

-

Calculates the absolute value of the complex number z.

-

cabsl (long double complex z)

-

long double

-

Calculates the absolute value of the complex number z.

-

cpow (double complex x, double complex z)

-

double complex

-

Calculates the value of x raised to the z power.

-

cpowf (float complex x, float complex z)

-

float complex

-

Calculates the value of x raised to the z power.

-

cpowl (long double complex x, long double complex z)

-

long double complex

-

Calculates the value of x raised to the z power.

-

csqrt (double complex z)

-

double complex

-

Calculates the square root of the complex number z.

-

csqrtf (float complex z)

-

float complex

-

Calculates the square root of the complex number z.

-

csqrtl (long double complex z)

-

long double complex

-

Calculates the square root of the complex number z.

-

carg (double complex z)

-

double

-

Calculates the phase angle of the complex number z.

-

cargf (float complex z)

-

float

-

Calculates the phase angle of the complex number z.

-

cargl (long double complex z)

-

long double

-

Calculates the phase angle of the complex number z.

-

cimag (double complex z)

-

double

-

Calculates the imaginary part of the complex number z.

-

cimagf (float complex z)

-

float

-

Calculates the imaginary part of the complex number z.

-

cimagl (long double complex z)

-

long double

-

Calculates the imaginary part of the complex number z.

-

conj (double complex z)

-

double complex

-

Calculates the conjugate of the complex number z.

-

conjf (float complex z)

-

float complex

-

Calculates the conjugate of the complex number z.

-

conjl (long double complex z)

-

long double complex

-

Calculates the conjugate of the complex number z.

-

cproj (double complex z)

-

double complex

-

Calculates the projection of the complex number z onto the Riemann sphere.

-

cprojf (float complex z)

-

float complex

-

Calculates the projection of the complex number z onto the Riemann sphere.

-

cprojl (long double complex z)

-

long double complex

-

Calculates the projection of the complex number z onto the Riemann sphere.

-

creal (double complex z)

-

double

-

Calculates the real part of the complex number z.

-

crealf (float complex z)

-

float

-

Calculates the real part of the complex number z.

-

creall (long double complex z)

-

long double

-

Calculates the real part of the complex number z.

-

acos (double x)

-

double

-

Calculates the arc cosine of the double value x.

-

acosf (float x)

-

float

-

Calculates the arc cosine of the float value x.

-

acosl (long double x)

-

long double

-

Calculates the arc cosine of the long double value x.

-

acosh (double x)

-

double

-

Calculates the inverse hyperbolic cosine of the double value x.

-

acoshf (float x)

-

float

-

Calculates the inverse hyperbolic cosine of float value x.

-

acoshl (long double x)

-

long double

-

Calculates the inverse hyperbolic cosine of the long double value x.

-

asin (double x)

-

double

-

Calculates the arc sine of the double value x.

-

asinf (float x)

-

float

-

Calculates the arc sine of the float value x.

-

asinl (long double x)

-

long double

-

Calculates the arc sine of the long double value x.

-

asinh (double x)

-

double

-

Calculates the inverse hyperbolic sine of the double value x.

-

asinhf (float x)

-

float

-

Calculates the inverse hyperbolic sine of the float value x.

-

asinhl (long double x)

-

long double

-

Calculates the inverse hyperbolic sine of the long double value x.

-

atan (double x)

-

double

-

Calculates the arc tangent of the double value x.

-

atanf (float x)

-

float

-

Calculates the arc tangent of the float value x.

-

atanl (long double x)

-

long double

-

Calculates the arc tangent of the long double value x.

-

atan2 (double y, double x)

-

double

-

Calculates the arc tangent of two double values x and y.

-

atan2f (float y, float x)

-

float

-

Calculates the arc tangent of two float values x and y.

-

atan2l (long double y, long double x)

-

long double

-

Calculates the arc tangent of two long double values x and y.

-

atanh (double x)

-

double

-

Calculates the inverse hyperbolic tangent of the double value x.

-

atanhf (float x)

-

float

-

Calculates the inverse hyperbolic tangent of the float value x.

-

atanhl (long double x)

-

long double

-

Calculates the inverse hyperbolic tangent of the long double value x.

-

cbrt (double x)

-

double

-

Calculates the cube root of the double value x.

-

cbrtf (float x)

-

float

-

Calculates the cube root of the float value x.

-

cbrtl (long double x)

-

long double

-

Calculates the cube root of the long double value x.

-

ceil (double x)

-

double

-

Calculates the minimum integer greater than or equal to the double value x.

-

ceilf (float x)

-

float

-

Calculates the minimum integer greater than or equal to the float value x.

-

ceill (long double x)

-

long double

-

Calculates the minimum integer greater than or equal to the long double value x.

-

copysign (double x, double y)

-

double

-

Generates a value by combining the magnitude of the double value x and the sign of the double value y.

-

copysignf (float x, float y)

-

float

-

Generates a value by combining the magnitude of the float value x and the sign of the float value y.

-

copysignl (long double x, long double y)

-

long double

-

Generates a value by combining the magnitude of the long double value x and the sign of the long double value y.

-

cos (double x)

-

double

-

Calculates the cosine of the double value x.

-

cosf (float x)

-

float

-

Calculates the cosine of the float value x.

-

cosl (long double x)

-

long double

-

Calculates the cosine of the long double value x.

-

cosh (double x)

-

double

-

Calculates the hyperbolic cosine of the double value x.

-

coshf (float x)

-

float

-

Calculates the hyperbolic cosine of the float value x.

-

coshl (long double x)

-

long double

-

Calculates the hyperbolic cosine of the long double value x.

-

erf (double x)

-

double

-

Calculates the error function of the double value x.

-

erff (float x)

-

float

-

Calculates the error function of the float value x.

-

erfl (long double x)

-

long double

-

Calculates the error function of the long double value x.

-

erfc (double x)

-

double

-

Calculates the complementary error function of the double value x.

-

erfcf (float x)

-

float

-

Calculates the complementary error function of the float value x.

-

erfcl (long double x)

-

long double

-

Calculates the complementary error function of the long double value x.

-

exp (double x)

-

double

-

Calculates the base-e exponential function of the double value x.

-

expf (float x)

-

float

-

Calculates the base-e exponential function of the float value x.

-

expl (long double x)

-

long double

-

Calculates the base-e exponential function of the long double value x.

-

exp2 (double x)

-

double

-

Calculates the base-2 exponential function of the double value x.

-

exp2f (float x)

-

float

-

Calculates the base-2 exponential function of the float value x.

-

exp2l (long double x)

-

long double

-

Calculates the base-2 exponential function of the long double value x.

-

expm1 (double x)

-

double

-

Calculates e raised to the power of the double value x minus one, that is, (e^x)-1.

-

expm1f (float x)

-

float

-

Calculates e raised to the power of the float value x minus one.

-

expm1l (long double x)

-

long double

-

Calculates e raised to the power of the long double value x minus one.

-

fabs (double x)

-

double

-

Calculates the absolute value of the double value x.

-

fabsf (float x)

-

float

-

Calculates the absolute value of the float value x.

-

fabsl (long double x)

-

long double

-

Calculates the absolute value of the long double value x.

-

fdim (double x, double y)

-

double

-

Calculates the positive difference between the double value x and y.

-

fdimf (float x, float y)

-

float

-

Calculates the positive difference between the float value x and y.

-

fdiml (long double x, long double y)

-

long double

-

Calculates the positive difference between the long double value x and y.

-

floor (double x)

-

double

-

Obtains the largest integer less than or equal to the double value x.

-

floorf (float x)

-

float

-

Obtains the largest integer less than or equal to the float value x.

-

floorl (long double x)

-

long double

-

Obtains the largest integer less than or equal to the long double value x.

-

fma (double x, double y, double z)

-

double

-

Calculates the value of x*y+z and rounds the result up.

-

fmaf (float x, float y, float z)

-

float

-

Calculates the value of x*y+z and rounds the result up.

-

fmal (long double x, long double y, long double z)

-

long double

-

Calculates the value of x*y+z and rounds the result up.

-

fmax (double x, double y)

-

double

-

Obtains the larger value of two double values x and y.

-

fmaxf (float x, float y)

-

float

-

Obtains the larger value of two float values x and y.

-

fmaxl (long double x, long double y)

-

long double

-

Obtains the larger value of two long double values x and y.

-

fmin (double x, double y)

-

double

-

Obtains the smaller value of two double values x and y.

-

fminf (float x, float y)

-

float

-

Obtains the smaller value of two float values x and y.

-

fminl (long double x, long double y)

-

long double

-

Obtains the smaller value of two long double values x and y.

-

fmod (double x, double y)

-

double

-

Calculates the remainder of the double value x divided by the double value y.

-

fmodf (float x, float y)

-

float

-

Calculates the remainder of the float value x divided by the float value y.

-

fmodl (long double x, long double y)

-

long double

-

Calculates the remainder of the long double value x divided by the long double value y.

-

frexp (double x, int *exp)

-

double

-

Decomposes the double value x into a significand and an integral exponent for 2.

-

frexpf (float x, int *exp)

-

float

-

Decomposes float value x into a binary significand and an integral exponent for 2.

-

frexpl (long double x, int *exp)

-

long double

-

Decomposes long double value x into a binary significand and an integral exponent for 2.

-

hypot (double x, double y)

-

double

-

Calculates the hypotenuse of a right triangle whose legs are x and y.

-

hypotf (float x, float y)

-

float

-

Calculates the hypotenuse of a right triangle whose legs are x and y.

-

hypotl (long double x, long double y)

-

long double

-

Calculates the hypotenuse of a right triangle whose legs are x and y.

-

ilogb (double x)

-

int

-

Obtains the integral part of the logarithm of double value x.

-

ilogbf (float x)

-

int

-

Obtains the integral part of the logarithm of float value x.

-

ilogbl (long double x)

-

int

-

Obtains the integral part of the logarithm of the long double value x.

-

ldexp (double x, int exp)

-

double

-

Multiplies the double value x by 2 raised to the power of exp.

-

ldexpf (float x, int exp)

-

float

-

Multiplies the float value x by 2 raised to the power of exp.

-

ldexpl (long double x, int exp)

-

long double

-

Multiplies the long double value x by 2 raised to the power of exp.

-

lgamma (double x)

-

double

-

Calculates the natural logarithm of the absolute value of the gamma function of the double value x.

-

lgammaf (float x)

-

float

-

Calculates the natural logarithm of the absolute value of the gamma function of the float value x.

-

lgammal (long double x)

-

long double

-

Calculates the natural logarithm of the absolute value of the gamma function of the long double value x.

-

llrint (double x)

-

long long int

-

Rounds double value x to the nearest integer.

-

llrintf (float x)

-

long long int

-

Rounds float value x to the nearest integer.

-

llrintl (long double x)

-

long long int

-

Rounds long double value x to the nearest integer.

-

llround (double x)

-

long long int

-

Rounds double value x to the nearest integer, rounding away from 0.

-

llroundf (float x)

-

long long int

-

Rounds float value x to the nearest integer, rounding away from 0.

-

llroundl (long double x)

-

long long int

-

Rounds long double value x to the nearest integer, rounding away from 0.

-

log (double x)

-

double

-

Calculates the natural logarithm of the double value x.

-

logf (float x)

-

float

-

Calculates the natural logarithm of the float value x.

-

logl (long double x)

-

long double

-

Calculates the natural logarithm of the long double value x.

-

log10 (double x)

-

double

-

Calculates the common logarithm (logarithm with base 10) of the double value x.

-

log10f (float x)

-

float

-

Calculates the common logarithm (logarithm with base 10) of the float value x.

-

log10l (long double x)

-

long double

-

Calculates the common logarithm (logarithm with base 10) of the long double value x.

-

log1p (double x)

-

double

-

Calculates the natural logarithm of one plus the double value x.

-

log1pf (float x)

-

float

-

Calculates the natural logarithm of one plus the float value x.

-

log1pl (long double x)

-

long double

-

Calculates the natural logarithm of one plus the long double value x.

-

log2 (double x)

-

double

-

Calculates the binary logarithm (logarithm with base 2) of the double value x.

-

log2f (float x)

-

float

-

Calculates the binary logarithm (logarithm with base 2) of the float value x.

-

log2l (long double x)

-

long double

-

Calculates the binary logarithm (logarithm with base 2) of the long double value x.

-

logb (double x)

-

double

-

Calculates the logarithm of the absolute value of the double value x.

-

logbf (float x)

-

float

-

Calculates the logarithm of the absolute value of the float value x.

-

logbl (long double x)

-

long double

-

Calculates the logarithm of the absolute value of the long double value x.

-

lrint (double x)

-

long int

-

Rounds the double value x to the nearest integer.

-

lrintf (float x)

-

long int

-

Rounds the float value x to the nearest integer.

-

lrintl (long double x)

-

long int

-

Rounds the long double value x to the nearest integer.

-

lround (double x)

-

long int

-

Rounds double value x to the nearest integer, rounding away from 0.

-

lroundf (float x)

-

long int

-

Rounds the float value x to the nearest integer, rounding away from 0.

-

lroundl (long double x)

-

long int

-

Rounds the long double value x to the nearest integer, rounding away from 0.

-

modf (double x, double *iptr)

-

double

-

Breaks the double value x into a signed integral and a fractional part.

-

modff (float x, float *iptr)

-

float

-

Breaks the float value x into a signed integral and a fractional part.

-

modfl (long double x, long double *iptr)

-

long double

-

Breaks the long double value x into a signed integral and a fractional part.

-

nan (const char *tagp)

-

double

-

Obtains a quiet NaN value of the double type.

-

nanf (const char *tagp)

-

float

-

Obtains a quiet NaN value of the float type.

-

nanl (const char *tagp)

-

long double

-

Obtains a quiet NaN value of the long double type.

-

nearbyint (double x)

-

double

-

Rounds the double value x to an integer in floating-point format.

-

nearbyintf (float x)

-

float

-

Rounds the float value x to an integer in floating-point format.

-

nearbyintl (long double x)

-

long double

-

Rounds the long double value x to an integer in floating-point format.

-

nextafter (double x, double y)

-

double

-

Obtains the next representable value following the double value x in the direction of the double value y.

-

nextafterf (float x, float y)

-

float

-

Obtains the next representable value following the float value x in the direction of the float value y.

-

nextafterl (long double x, long double y)

-

long double

-

Obtains the next representable value following the long double value x in the direction of the long double value y.

-

nexttoward (double x, long double y)

-

double

-

Obtains the next representable value following the double value x in the direction of the long double value y.

-

nexttowardf (float x, long double y)

-

float

-

Obtains the next representable value following the float value x in the direction of the long double value y.

-

nexttowardl (long double x, long double y)

-

long double

-

Obtains the next representable value following the long double value x in the direction of the long double value y.

-

pow (double x, double y)

-

double

-

Obtains the double value x raised to the power of the double value y.

-

powf (float x, float y)

-

float

-

Obtains the float value x raised to the power of the float value y.

-

pow10f (float x)

-

float

-

Calculates the xth power of 10.

-

powl (long double x, long double y)

-

long double

-

Obtains the long double value x raised to the power of the long double value y.

-

pow10l (long double x)

-

long double

-

Calculates the xth power of 10.

-

remainder (double x, double y)

-

double

-

Calculates the remainder of the double value x divided by the double value y.

-

remainderf (float x, float y)

-

float

-

Calculates the remainder of the float value x divided by the float value y.

-

remainderl (long double x, long double y)

-

long double

-

Calculates the remainder of the long double value x divided by the long double value y.

-

remquo (double x, double y, int *quo)

-

double

-

Calculates the quotient and remainder of the double value x divided by the double value y.

-

remquof (float x, float y, int *quo)

-

float

-

Calculates the quotient and remainder of the float value x divided by the float value y.

-

remquol (long double x, long double y, int *quo)

-

long double

-

Calculates the quotient and remainder of the long double value x divided by the long double value y.

-

rint (double x)

-

double

-

Rounds the double value x to the nearest integer.

-

rintf (float x)

-

float

-

Rounds the float value x to the nearest integer.

-

rintl (long double x)

-

long double

-

Rounds the long double value x to the nearest integer.

-

round (double x)

-

double

-

Rounds the double value x to the nearest integer, rounding away from 0.

-

roundf (float x)

-

float

-

Rounds the float value x to the nearest integer, rounding away from 0.

-

roundl (long double x)

-

long double

-

Rounds the long double value x to the nearest integer, rounding away from 0.

-

scalbln (double x, long int exp)

-

double

-

Multiplies the double value x by FLT_RADIX raised to the power of the long int value exp, that is, x*(FLT_RADIX)^exp.

-

scalblnf (float x, long int exp)

-

float

-

Multiplies the float value x by FLT_RADIX raised to the power of the long int value exp, that is, x*(FLT_RADIX)^exp.

-

scalblnl (long double x, long int exp)

-

long double

-

Multiplies the long double value x by FLT_RADIX raised to the power of the long int value exp, that is, x*(FLT_RADIX)^exp.

-

scalbn (double x, int exp)

-

double

-

Multiplies the double value x by FLT_RADIX raised to the power of the int value exp, that is, x*(FLT_RADIX)^exp.

-

scalbnf (float x, int exp)

-

float

-

Multiplies the float value x by FLT_RADIX raised to the power of the int value exp, that is, x*(FLT_RADIX)^exp.

-

scalbnl (long double x, int exp)

-

long double

-

Multiplies the long double value x by FLT_RADIX raised to the power of the int value exp, that is, x*(FLT_RADIX)^exp.

-

sin (double x)

-

double

-

Calculates the sine of the double value x.

-

sinf (float x)

-

float

-

Calculates the sine of the float value x.

-

sinl (long double x)

-

long double

-

Calculates the sine of the long double value x.

-

sinh (double x)

-

double

-

Calculates the hyperbolic sine of the double value x.

-

sinhf (float x)

-

float

-

Calculates the hyperbolic sine of the float value x.

-

sinhl (long double x)

-

long double

-

Calculates the hyperbolic sine of the long double value x.

-

sqrt (double x)

-

double

-

Calculates the square root of double value x.

-

sqrtf (float x)

-

float

-

Calculates the square root of the float value x.

-

sqrtl (long double x)

-

long double

-

Calculates the square root of the long double value x.

-

tan (double x)

-

double

-

Calculates the tangent of the double value x.

-

tanf (float x)

-

float

-

Calculates the tangent of the float value x.

-

tanl (long double x)

-

long double

-

Calculates the tangent of the long double value x.

-

tanh (double x)

-

double

-

Calculates the hyperbolic tangent of the double value x.

-

tanhf (float x)

-

float

-

Calculates the hyperbolic tangent of the float value x.

-

tanhl (long double x)

-

long double

-

Calculates the hyperbolic tangent of the long double value x.

-

tgamma (double x)

-

double

-

Calculates the gamma function of the double value x.

-

tgammaf (float x)

-

float

-

Calculates the gamma function of the float value x.

-

tgammal (long double x)

-

long double

-

Calculates the gamma function of the long double value x.

-

trunc (double x)

-

double

-

Obtains the nearest integer whose absolute value is less than or equal to the absolute value of the double value x.

-

truncf (float x)

-

float

-

Obtains the nearest integer whose absolute value is less than or equal to the absolute value of the float value x.

-

truncl (long double x)

-

long double

-

Obtains the nearest integer whose absolute value is less than or equal to the absolute value of the long double value x.

-

j0 (double x)

-

double

-

Calculates the Bessel function of the first kind of order 0 for the double value x.

-

j1 (double x)

-

double

-

Calculates the Bessel function of the first kind of order 1 for the double value x.

-

jn (int n, double x)

-

double

-

Calculates the Bessel function of the first kind of order n for the double value x.

-

y0 (double x)

-

double

-

Calculates the Bessel function of the second kind of order 0 for the double value x.

-

y1 (double x)

-

double

-

Calculates the Bessel function of the second kind of order 1 for the double value x.

-

yn (int n, double x)

-

double

-

Calculates the Bessel function of the second kind of order n for the double value x.

-

finite (double x)

-

int

-

Checks whether the double value x is an infinity or a NaN value.

-

finitef (float x)

-

int

-

Checks whether the float value x is an infinity or a NaN value.

-

scalb (double x, double exp)

-

double

-

Multiplies the double value x by FLT_RADIX raised to the power of the double value exp, that is, x*FLT_RADIX^exp.

-

scalbf (float x, float exp)

-

float

-

Multiplies the float value x by FLT_RADIX raised to the power of the float value exp, that is, x*FLT_RADIX^exp.

-

significand (double x)

-

double

-

Obtains the significand of the double value x scaled to the range [1,2).

-

significandf (float x)

-

float

-

Obtains the significand of the float value x scaled to the range [1,2).

-

j0f (float x)

-

float

-

Calculates the Bessel function of the first kind of order 0 for the float value x.

-

j1f (float x)

-

float

-

Calculates the Bessel function of the first kind of order 1 for the float value x.

-

jnf (int n, float x)

-

float

-

Calculates the Bessel function of the first kind of order n for the float value x.

-

y0f (float x)

-

float

-

Calculates the Bessel function of the second kind of order 0 for the float value x.

-

y1f (float x)

-

float

-

Calculates the Bessel function of the second kind of order 1 for the float value x.

-

ynf (int n, float x)

-

float

-

Calculates the Bessel function of the second kind of order n for the float value x.

-

lgammal_r (long double x, int *signp)

-

long double

-

Calculates the natural logarithm of the absolute value of the gamma function of the double value x.

-

sincos (double x, double *sin, double *cos)

-

void

-

Calculates the sine and cosine of the double value x.

-

sincosf (float x, float *sin, float *cos)

-

void

-

Calculates the sine and cosine of the float value x.

-

sincosl (long double x, long double *sin, long double *cos)

-

void

-

Calculates the sine and cosine of the long double value x.

-

exp10 (double x)

-

double

-

Calculates the base-10 exponential function of the double value x.

-

exp10f (float x)

-

float

-

Calculates the base-10 exponential function of the float value x.

-

exp10l (long double x)

-

long double

-

Calculates the base-10 exponential function of the long double value x.

-

pow10 (double x)

-

double

-

Calculates the value of 10 raised to the power x, which is a double value.

-
- -## **Details** - -## **Macro Definition ** - -## isfinite - -``` -#define isfinite( x) -``` - -``` -Values:( \ - -sizeof(x) == sizeof(float) ? (__FLOAT_BITS(x) & 0x7fffffff) < 0x7f800000 : \ - -sizeof(x) == sizeof(double) ? (__DOUBLE_BITS(x) & -1ULL>>1) < 0x7ffULL<<52 : \ - -__fpclassifyl(x) > [FP_INFINITE](MATH.md#ga4f64bcc64f8b84dd9daf5a4e56abf0ca)) - - -``` - - **Description:** - -Checks whether the floating-point value **x** is finite. - -A finite value is any value that is neither an infinity nor a NaN value. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the floating-point value x to check.
- -**Returns:** - -Returns **1** if **x** is finite; returns **0** otherwise. - -## isgreater - -``` -#define isgreater( x, y ) __tg_pred_2(x, y, __isgreater) -``` - - **Description:** - -Checks whether floating-point value **x** is greater than **y**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the floating-point value x to check.
yIndicates the floating-point value y to check.
- -**Attention:** - -If either or both of **x** and **y** are a NaN value, an exception occurs. This function requires hardware support. - -**Returns:** - -Returns **1** if **x** is greater than **y**; returns **0** otherwise. - -## isgreaterequal - -``` -#define isgreaterequal( x, y ) __tg_pred_2(x, y, __isgreaterequal) -``` - - **Description:** - -Checks whether floating-point value **x** is greater than or equal to **y**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the floating-point value x to check.
yIndicates the floating-point value y to check.
- -**Attention:** - -If either or both of **x** and **y** are a NaN value, an exception occurs. This function requires hardware support. - -**Returns:** - -Returns **1** if **x** is greater than or equal to **y**; returns **0** otherwise. - -## isinf - -``` -#define isinf( x) -``` - -``` -Values:( \ - -sizeof(x) == sizeof(float) ? (__FLOAT_BITS(x) & 0x7fffffff) == 0x7f800000 : \ - -sizeof(x) == sizeof(double) ? (__DOUBLE_BITS(x) & -1ULL>>1) == 0x7ffULL<<52 : \ - -__fpclassifyl(x) == [FP_INFINITE](MATH.md#ga4f64bcc64f8b84dd9daf5a4e56abf0ca)) - - -``` - - **Description:** - -Checks whether the floating-point value **x** is an infinity. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the floating-point value x to check.
- -**Returns:** - -Returns **1** if **x** is an infinity; returns **0** otherwise. - -## isless - -``` -#define isless( x, y ) __tg_pred_2(x, y, __isless) -``` - - **Description:** - -Checks whether floating-point value **x** is less than **y**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the floating-point value x to check.
yIndicates the floating-point value y to check.
- -**Attention:** - -If either or both of **x** and **y** are a NaN value, an exception occurs. This function requires hardware support. - -**Returns:** - -Returns **1** if **x** is less than **y**; returns **0** otherwise. - -## islessequal - -``` -#define islessequal( x, y ) __tg_pred_2(x, y, __islessequal) -``` - - **Description:** - -Checks whether floating-point value **x** is less than or equal to **y**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the floating-point value x to check.
yIndicates the floating-point value y to check.
- -**Attention:** - -If either or both of **x** and **y** are a NaN value, an exception occurs. This function requires hardware support. - -**Returns:** - -Returns **1** if **x** is less than or equal to **y**; returns **0** otherwise. - -## islessgreater - -``` -#define islessgreater( x, y ) __tg_pred_2(x, y, __islessgreater) -``` - - **Description:** - -Checks whether floating-point value **x** is either less than or greater than **y**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the floating-point value x to check.
yIndicates the floating-point value y to check.
- -**Attention:** - -If either or both of **x** and **y** are a NaN value, an exception occurs. This function requires hardware support. - -**Returns:** - -Returns **1** if **x** is either less than or greater than **y**; returns **0** otherwise. - -## isnan - -``` -#define isnan( x) -``` - -``` -Values:( \ - -sizeof(x) == sizeof(float) ? (__FLOAT_BITS(x) & 0x7fffffff) > 0x7f800000 : \ - -sizeof(x) == sizeof(double) ? (__DOUBLE_BITS(x) & -1ULL>>1) > 0x7ffULL<<52 : \ - -__fpclassifyl(x) == [FP_NAN](MATH.md#ga1d481cc6e6a8ff729147ed46e61a4c9f)) - - -``` - - **Description:** - -Checks whether the floating-point value **x** is a NaN value. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the floating-point value x to check.
- -**Returns:** - -Returns a non-zero value if **x** is a NaN value; returns **0** otherwise. - -## isnormal - -``` -#define isnormal( x) -``` - -``` -Values:( \ - -sizeof(x) == sizeof(float) ? ((__FLOAT_BITS(x)+0x00800000) & 0x7fffffff) >= 0x01000000 : \ - -sizeof(x) == sizeof(double) ? ((__DOUBLE_BITS(x)+(1ULL<<52)) & -1ULL>>1) >= 1ULL<<53 : \ - -__fpclassifyl(x) == [FP_NORMAL](MATH.md#gab9e29bb9e853934c4ba647c840b7e5de)) - - -``` - - **Description:** - -Checks whether the floating-point value **x** is a normal value. - -A normal value refers to any value that is not an infinity, a NaN value, or **0**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the floating-point value x to check.
- -**Returns:** - -Returns a non-zero value if **x** is a normal value; returns **0** otherwise. - -## isunordered - -``` -#define isunordered( x, y ) ([isnan](MATH.md#ga2e1baae9134e580910322362dc23290e)((x)) ? ((void)(y),1) : [isnan](MATH.md#ga2e1baae9134e580910322362dc23290e)((y))) -``` - - **Description:** - -Checks whether floating-point value **x** or **y** is unordered. - -An unordered value refers to a NaN value. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the floating-point value x to check.
yIndicates the floating-point value y to check.
- -**Returns:** - -Returns **1** if either **x** or **y** is unordered; returns **0** otherwise. - -## signbit - -``` -#define signbit( x) -``` - -``` -Values:( \ - -sizeof(x) == sizeof(float) ? (int)(__FLOAT_BITS(x)>>31) : \ - -sizeof(x) == sizeof(double) ? (int)(__DOUBLE_BITS(x)>>63) : \ - -__signbitl(x) ) - - -``` - - **Description:** - -Checks whether the sign of the floating-point value **x** is negative. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the floating-point value x to check.
- -**Returns:** - -Returns a non-zero value if the sign of **x** is negative; returns **0** otherwise. - -## **Function ** - -## acos\(\) - -``` -double acos (double x) -``` - - **Description:** - -Calculates the arc cosine of the double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value whose arc cosine is to be calculated.
- -**Returns:** - -Returns the arc cosine of **x** in radians, ranging from 0 to [M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3). If **x** is a NaN value, this function returns a NaN value. If **x** is **+1**, this function returns **+0**. If **x** is a positive or negative infinity, this function returns a NaN value and reports a domain error. If **x** is out of the range \[-1, 1\], this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. - -## acosf\(\) - -``` -float acosf (float x) -``` - - **Description:** - -Calculates the arc cosine of the float value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value whose arc cosine is to be calculated.
- -**Returns:** - -Returns the arc cosine of **x** in radians, ranging from 0 to [M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3). If **x** is a NaN value, this function returns a NaN value. If **x** is **+1**, this function returns **+0**. If **x** is a positive or negative infinity, this function returns a NaN value and reports a domain error. If **x** is out of the range \[-1, 1\], this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. - -## acosh\(\) - -``` -double acosh (double x) -``` - - **Description:** - -Calculates the inverse hyperbolic cosine of the double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value whose inverse hyperbolic cosine is to be calculated.
- -**Returns:** - -Returns the inverse hyperbolic cosine of **x**. If **x** is a NaN value, this function returns a NaN value. If **x** is **+1**, this function returns **+0**. If **x** is a positive infinity, this function returns a positive infinity. If **x** is less than **1**, this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. - -## acoshf\(\) - -``` -float acoshf (float x) -``` - - **Description:** - -Calculates the inverse hyperbolic cosine of float value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value whose inverse hyperbolic cosine is to be calculated.
- -**Returns:** - -Returns the inverse hyperbolic cosine of **x**. If **x** is a NaN value, this function returns a NaN value. If **x** is **+1**, this function returns **+0**. If **x** is a positive infinity, this function returns a positive infinity. If **x** is less than **1**, this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. - -## acoshl\(\) - -``` -long double acoshl (long double x) -``` - - **Description:** - -Calculates the inverse hyperbolic cosine of the long double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value whose inverse hyperbolic cosine is to be calculated.
- -**Returns:** - -Returns the inverse hyperbolic cosine of **x**. If **x** is a NaN value, this function returns a NaN value. If **x** is **+1**, this function returns **+0**. If **x** is a positive infinity, this function returns a positive infinity. If **x** is less than **1**, this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. - -## acosl\(\) - -``` -long double acosl (long double x) -``` - - **Description:** - -Calculates the arc cosine of the long double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value whose arc cosine is to be calculated.
- -**Returns:** - -Returns the arc cosine of **x** in radians, ranging from 0 to [M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3). If **x** is a NaN value, this function returns a NaN value. If **x** is **+1**, this function returns **+0**. If **x** is a positive or negative infinity, this function returns a NaN value and reports a domain error. If **x** is out of the range \[-1, 1\], this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. - -## asin\(\) - -``` -double asin (double x) -``` - - **Description:** - -Calculates the arc sine of the double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value whose arc sine is to be calculated.
- -**Returns:** - -Returns the arc sine of **x** in radians, ranging from -[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f) to [M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f). If **x** is a NaN value, this function returns a NaN value. If **x** is **+0** or **-0**, this function returns **+0** or **-0**. If **x** is out of the range \[-1, 1\], this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. - -## asinf\(\) - -``` -float asinf (float x) -``` - - **Description:** - -Calculates the arc sine of the float value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value whose arc sine is to be calculated.
- -**Returns:** - -Returns the arc sine of **x** in radians, ranging from -[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f) to [M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f). If **x** is a NaN value, this function returns a NaN value. If **x** is **+0** or **-0**, this function returns **+0** or **-0**. If **x** is out of the range \[-1, 1\], this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. - -## asinh\(\) - -``` -double asinh (double x) -``` - - **Description:** - -Calculates the inverse hyperbolic sine of the double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value whose inverse hyperbolic sine is to be calculated.
- -**Returns:** - -Returns the inverse hyperbolic sine of **x**. If **x** is a NaN value, this function returns a NaN value. If **x** is **+0** or **-0**, this function returns **+0** or **-0**. If **x** is a positive or negative infinity, this function returns a positive or negative infinity. - -## asinhf\(\) - -``` -float asinhf (float x) -``` - - **Description:** - -Calculates the inverse hyperbolic sine of the float value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value whose inverse hyperbolic sine is to be calculated.
- -**Returns:** - -Returns the inverse hyperbolic sine of **x**. If **x** is a NaN value, this function returns a NaN value. If **x** is **+0** or **-0**, this function returns **+0** or **-0**. If **x** is a positive or negative infinity, this function returns a positive or negative infinity. - -## asinhl\(\) - -``` -long double asinhl (long double x) -``` - - **Description:** - -Calculates the inverse hyperbolic sine of the long double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value whose inverse hyperbolic sine is to be calculated.
- -**Returns:** - -Returns the inverse hyperbolic sine of **x**. If **x** is a NaN value, this function returns a NaN value. If **x** is **+0** or **-0**, this function returns **+0** or **-0**. If **x** is a positive or negative infinity, this function returns a positive or negative infinity. - -## asinl\(\) - -``` -long double asinl (long double x) -``` - - **Description:** - -Calculates the arc sine of the long double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value whose arc sine is to be calculated.
- -**Returns:** - -Returns the arc sine of **x** in radians, ranging from -[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f) to [M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f). If **x** is a NaN value, this function returns a NaN value. If **x** is **+0** or **-0**, this function returns **+0** or **-0**. If **x** is out of the range \[-1, 1\], this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. - -## atan\(\) - -``` -double atan (double x) -``` - - **Description:** - -Calculates the arc tangent of the double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value whose arc tangent is to be calculated.
- -**Returns:** - -Returns the principal value of the arc tangent of **x** in radians, ranging from -[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f) to [M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f). If **x** is a NaN value, this function returns a NaN value. If **x** is **+0** or **-0**, this function returns **+0** or **-0**, respectively. If **x** is a positive or negative infinity, this function returns [M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f). - -## atan2\(\) - -``` -double atan2 (double y, double x ) -``` - - **Description:** - -Calculates the arc tangent of two double values **x** and **y**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
yIndicates the double value y for calculating the arc tangent.
xIndicates the double value x for calculating the arc tangent.
- -**Returns:** - -Returns the principal value of the arc tangent of y/x in radians, ranging from **-[M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3)** to **[M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3)**. If **y** is **+0** or **-0**, and **x** is less than **0**, this function returns **+[M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3)** or **-[M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3)**, respectively. If **y** is **+0** or **-0**, and **x** is greater than **0**, this function returns **+0** or **-0**, respectively. If **y** is less than **0** and **x** is either **+0** or **-0**, this function returns **-[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)**. If **y** is greater than **0** and **x** is either **+0** or **-0**, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)**. If **x** or **y** is a NaN value, this function returns a NaN value. If **y** is **+0** or **-0**, and **x** is **-0**, this function returns **+[M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3)** or **-[M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3)**, respectively. If **y** is **+0** or **-0**, and **x** is **+0**, this function returns **+0** or **-0**, respectively. If **y** is a finite value greater than or less than **0**, and **x** is a negative infinity, this function returns **+[M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3)** or **-[M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3)**, respectively. If **y** is a finite value greater than or less than **0**, and **x** is a positive infinity, this function returns **+0** or **-0**, respectively. If **y** is a positive or negative infinity, and **x** is a finite value, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)** or **-[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)**, respectively. If **y** is a positive or negative infinity, and **x** is a negative infinity, this function returns **+3\*[M\_PI\_4](MATH.md#gaeb24420b096a677f3a2dc5a72b36bf22)** or **-3\*[M\_PI\_4](MATH.md#gaeb24420b096a677f3a2dc5a72b36bf22)**, respectively. If **y** is a positive or negative infinity, and **x** is a positive infinity, this function returns **+[M\_PI\_4](MATH.md#gaeb24420b096a677f3a2dc5a72b36bf22)** or **-[M\_PI\_4](MATH.md#gaeb24420b096a677f3a2dc5a72b36bf22)**, respectively. - -## atan2f\(\) - -``` -float atan2f (float y, float x ) -``` - - **Description:** - -Calculates the arc tangent of two float values **x** and **y**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
yIndicates the float value y for calculating the arc tangent.
xIndicates the float value x for calculating the arc tangent.
- -**Returns:** - -Returns the principal value of the arc tangent of y/x in radians, ranging from **-[M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3)** to **[M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3)**. If **y** is **+0** or **-0**, and **x** is less than **0**, this function returns **+[M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3)** or **-[M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3)**, respectively. If **y** is **+0** or **-0**, and **x** is greater than **0**, this function returns **+0** or **-0**, respectively. If **y** is less than **0** and **x** is either **+0** or **-0**, this function returns **-[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)**. If **y** is greater than **0** and **x** is either **+0** or **-0**, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)**. If **x** or **y** is a NaN value, this function returns a NaN value. If **y** is **+0** or **-0**, and **x** is **-0**, this function returns **+[M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3)** or **-[M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3)**, respectively. If **y** is **+0** or **-0**, and **x** is **+0**, this function returns **+0** or **-0**, respectively. If **y** is a finite value greater than or less than **0**, and **x** is a negative infinity, this function returns **+[M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3)** or **-[M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3)**, respectively. If **y** is a finite value greater than or less than **0**, and **x** is a positive infinity, this function returns **+0** or **-0**, respectively. If **y** is a positive or negative infinity, and **x** is a finite value, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)** or **-[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)**, respectively. If **y** is a positive or negative infinity, and **x** is a negative infinity, this function returns **+3\*[M\_PI\_4](MATH.md#gaeb24420b096a677f3a2dc5a72b36bf22)** or **-3\*[M\_PI\_4](MATH.md#gaeb24420b096a677f3a2dc5a72b36bf22)**, respectively. If **y** is a positive or negative infinity, and **x** is a positive infinity, this function returns **+[M\_PI\_4](MATH.md#gaeb24420b096a677f3a2dc5a72b36bf22)** or **-[M\_PI\_4](MATH.md#gaeb24420b096a677f3a2dc5a72b36bf22)**, respectively. - -## atan2l\(\) - -``` -long double atan2l (long double y, long double x ) -``` - - **Description:** - -Calculates the arc tangent of two long double values **x** and **y**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
yIndicates the long double value y for calculating the arc tangent.
xIndicates the long double value x for calculating the arc tangent.
- -**Returns:** - -Returns the principal value of the arc tangent of y/x in radians, ranging from **-[M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3)** to **[M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3)**. If **y** is **+0** or **-0**, and **x** is less than **0**, this function returns **+[M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3)** or **-[M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3)**, respectively. If **y** is **+0** or **-0**, and **x** is greater than **0**, this function returns **+0** or **-0**, respectively. If **y** is less than **0** and **x** is either **+0** or **-0**, this function returns **-[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)**. If **y** is greater than **0** and **x** is either **+0** or **-0**, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)**. If **x** or **y** is a NaN value, this function returns a NaN value. If **y** is **+0** or **-0**, and **x** is **-0**, this function returns **+[M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3)** or **-[M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3)**, respectively. If **y** is **+0** or **-0**, and **x** is **+0**, this function returns **+0** or **-0**, respectively. If **y** is a finite value greater than or less than **0**, and **x** is a negative infinity, this function returns **+[M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3)** or **-[M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3)**, respectively. If **y** is a finite value greater than or less than **0**, and **x** is a positive infinity, this function returns **+0** or **-0**, respectively. If **y** is a positive or negative infinity, and **x** is a finite value, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)** or **-[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)**, respectively. If **y** is a positive or negative infinity, and **x** is a negative infinity, this function returns **+3\*[M\_PI\_4](MATH.md#gaeb24420b096a677f3a2dc5a72b36bf22)** or **-3\*[M\_PI\_4](MATH.md#gaeb24420b096a677f3a2dc5a72b36bf22)**, respectively. If **y** is a positive or negative infinity, and **x** is a positive infinity, this function returns **+[M\_PI\_4](MATH.md#gaeb24420b096a677f3a2dc5a72b36bf22)** or **-[M\_PI\_4](MATH.md#gaeb24420b096a677f3a2dc5a72b36bf22)**, respectively. - -## atanf\(\) - -``` -float atanf (float x) -``` - - **Description:** - -Calculates the arc tangent of the float value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value whose arc tangent is to be calculated.
- -**Returns:** - -Returns the principal value of the arc tangent of **x** in radians, ranging from -[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f) to [M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f). If **x** is a NaN value, this function returns a NaN value. If **x** is **+0** or **-0**, this function returns **+0** or **-0**, respectively. If **x** is a positive or negative infinity, this function returns [M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f) or -[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f), respectively. - -## atanh\(\) - -``` -double atanh (double x) -``` - - **Description:** - -Calculates the inverse hyperbolic tangent of the double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value whose inverse hyperbolic tangent is to be calculated.
- -**Returns:** - -Returns the inverse hyperbolic tangent of **x**. If **x** is a NaN value, this function returns a NaN value. If **x** is **+0** or **-0**, this function returns **+0** or **-0**, respectively. If **x** is **+1** or **-1**, this function returns [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971), reports a pole error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If the absolute value of **x** is greater than **1**, this function returns a NaN value, reports a domain error, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_DIVBYZERO](MATH.md#gab1317930189d1a14841893fb4bd9b5a0) exception. - -## atanhf\(\) - -``` -float atanhf (float x) -``` - - **Description:** - -Calculates the inverse hyperbolic tangent of the float value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value whose inverse hyperbolic tangent is to be calculated.
- -**Returns:** - -Returns the inverse hyperbolic tangent of **x**. If **x** is a NaN value, this function returns a NaN value. If **x** is **+0** or **-0**, this function returns **+0** or **-0**, respectively. If **x** is **+1** or **-1**, this function returns [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971), reports a pole error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If the absolute value of **x** is greater than **1**, this function returns a NaN value, reports a domain error, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_DIVBYZERO](MATH.md#gab1317930189d1a14841893fb4bd9b5a0) exception. - -## atanhl\(\) - -``` -long double atanhl (long double x) -``` - - **Description:** - -Calculates the inverse hyperbolic tangent of the long double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value whose inverse hyperbolic tangent is to be calculated.
- -**Returns:** - -Returns the inverse hyperbolic tangent of **x**. If **x** is a NaN value, this function returns a NaN value. If **x** is **+0** or **-0**, this function returns **+0** or **-0**, respectively. If **x** is **+1** or **-1**, this function returns [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971), reports a pole error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If the absolute value of **x** is greater than **1**, this function returns a NaN value, reports a domain error, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_DIVBYZERO](MATH.md#gab1317930189d1a14841893fb4bd9b5a0) exception. - -## atanl\(\) - -``` -long double atanl (long double x) -``` - - **Description:** - -Calculates the arc tangent of the long double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value whose arc tangent is to be calculated.
- -**Returns:** - -Returns the principal value of the arc tangent of **x** in radians, ranging from -[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f) to [M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f). If **x** is a NaN value, this function returns a NaN value. If **x** is **+0** or **-0**, this function returns **+0** or **-0**, respectively. If **x** is a positive or negative infinity, this function returns [M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f) or -[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f), respectively. - -## cabs\(\) - -``` -double cabs (double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the absolute value of the complex number **z**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a double value) whose absolute value is to be obtained.
- -**Attention:** - -If an error occurs or **z** is a positive or negative infinity or [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), the returned value is calculated based on the formula [hypot](MATH.md#ga6d6a905f61d535f8454190433b8c0ea5)\([cimag](MATH.md#ga6c3d7c875ae93700b0a2a32db24b37d3)\(z\) + [creal](MATH.md#ga24b1a511efdb973354d81646c5c3bb81)\(z\)\). - -**Returns:** - -Returns the absolute value of **z** if the operation is successful. - -## cabsf\(\) - -``` -float cabsf (float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the absolute value of the complex number **z**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a float value) whose absolute value is to be obtained.
- -**Attention:** - -If an error occurs or **z** is a positive or negative infinity or [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), the returned value is calculated based on the formula [hypot](MATH.md#ga6d6a905f61d535f8454190433b8c0ea5)\([cimag](MATH.md#ga6c3d7c875ae93700b0a2a32db24b37d3)\(z\) + [creal](MATH.md#ga24b1a511efdb973354d81646c5c3bb81)\(z\)\). - -**Returns:** - -Returns the absolute value of **z** if the operation is successful. - -## cabsl\(\) - -``` -long double cabsl (long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the absolute value of the complex number **z**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a long double value) whose absolute value is to be obtained.
- -**Attention:** - -If an error occurs or **z** is a positive or negative infinity or [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), the returned value is calculated based on the formula [hypot](MATH.md#ga6d6a905f61d535f8454190433b8c0ea5)\([cimag](MATH.md#ga6c3d7c875ae93700b0a2a32db24b37d3)\(z\) + [creal](MATH.md#ga24b1a511efdb973354d81646c5c3bb81)\(z\)\). - -**Returns:** - -Returns the absolute value of **z** if the operation is successful. - -## cacos\(\) - -``` -double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) cacos (double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the arc cosine of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a double value) whose arc cosine is to be obtained.
- -**Returns:** - -Returns the arc cosine of **z** if the operation is successful. If **x** is **+0** or **-0** and **y** is **0**, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f) - 0i**. If **x** is **+0** or **-0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is not an infinity and **y** is an infinity, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f) - [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971)i**. If **x** is neither an infinity nor **0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a negative infinity and **y** is a positive finite value, this function returns **[M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3) - [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971)i**. If **x** is a negative infinity and **y** is a positive infinity, this function returns **3\*[M\_PI\_4](MATH.md#gaeb24420b096a677f3a2dc5a72b36bf22) - [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971)i**. If **x** and **y** are both positive infinity, this function returns **[M\_PI\_4](MATH.md#gaeb24420b096a677f3a2dc5a72b36bf22) - [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971)i**. If **x** is a positive or negative infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) +\(-\) [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971)i** \(the sign bit of the imaginary part of the returned value is uncertain\). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is not an infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is a positive infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) - [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971)i**. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## cacosf\(\) - -``` -float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) cacosf (float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the arc cosine of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a float value) whose arc cosine is to be obtained.
- -**Returns:** - -Returns the arc cosine of **z** if the operation is successful. If **x** is **+0** or **-0** and **y** is **0**, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f) - 0i**. If **x** is **+0** or **-0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is not an infinity and **y** is an infinity, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)-[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359)i**. If **x** is neither an infinity nor **0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a negative infinity and **y** is a positive finite value, this function returns **[M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3) - [HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359)i**. If **x** is a negative infinity and **y** is a positive infinity, this function returns **3\*[M\_PI\_4](MATH.md#gaeb24420b096a677f3a2dc5a72b36bf22) - [HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359)i**. If **x** and **y** are both positive infinity, this function returns **[M\_PI\_4](MATH.md#gaeb24420b096a677f3a2dc5a72b36bf22) - [HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359)i**. If **x** is a positive or negative infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) +\(-\) [HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359)i** \(the sign bit of the imaginary part of the returned value is uncertain\). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is not an infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is a positive infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) - [HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359)i**. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## cacosh\(\) - -``` -double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) cacosh (double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the inverse hyperbolic cosine of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a double value) whose inverse hyperbolic cosine is to be obtained.
- -**Returns:** - -Returns the inverse hyperbolic cosine of **z** if the operation is successful. If **x** is **0** and **y** is **0**, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** is **0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) +\(-\) [M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i** \(the sign bit of the imaginary part of the returned value is uncertain\). If **x** is not an infinity and **y** is a positive infinity, this function returns **[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) + [M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** is neither an infinity nor **0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a negative infinity and **y** is a positive finite value, this function returns **[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) + [M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3)i**. If **x** is a positive infinity and **y** is a positive finite value, this function returns **[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971)**. If **x** is a negative infinity and **y** is a positive infinity, this function returns **[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) + 3\*[M\_PI\_4](MATH.md#gaeb24420b096a677f3a2dc5a72b36bf22)i**. If **x** is an infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is not an infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is a positive infinity, this function returns **[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## cacoshf\(\) - -``` -float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) cacoshf (float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the inverse hyperbolic cosine of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a float value) whose inverse hyperbolic cosine is to be obtained.
- -**Returns:** - -Returns the inverse hyperbolic cosine of **z** if the operation is successful. If **x** is **0** and **y** is **0**, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** is **0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) +\(-\) [M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i** \(the sign bit of the imaginary part of the returned value is uncertain\). If **x** is not an infinity and **y** is a positive infinity, this function returns **[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) + [M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** is neither an infinity nor **0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a negative infinity and **y** is a positive finite value, this function returns **[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) + [M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3)i**. If **x** is a positive infinity and **y** is a positive finite value, this function returns **[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359)**. If **x** is a negative infinity and **y** is a positive infinity, this function returns **[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) + 3\*[M\_PI\_4](MATH.md#gaeb24420b096a677f3a2dc5a72b36bf22)i**. If **x** is an infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is not an infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is a positive infinity, this function returns **[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## cacoshl\(\) - -``` -long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) cacoshl (long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the inverse hyperbolic cosine of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a long double value) whose inverse hyperbolic cosine is to be obtained.
- -**Returns:** - -Returns the inverse hyperbolic cosine of **z** if the operation is successful. If **x** is **0** and **y** is **0**, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** is **0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) +\(-\) [M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i** \(the sign bit of the imaginary part of the returned value is uncertain\). If **x** is not an infinity and **y** is a positive infinity, this function returns **[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) + [M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** is neither an infinity nor **0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a negative infinity and **y** is a positive finite value, this function returns **[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) + [M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3)i**. If **x** is a positive infinity and **y** is a positive finite value, this function returns **[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182)**. If **x** is a negative infinity and **y** is a positive infinity, this function returns **[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) + 3\*[M\_PI\_4](MATH.md#gaeb24420b096a677f3a2dc5a72b36bf22)i**. If **x** is an infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is not an infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is a positive infinity, this function returns **[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## cacosl\(\) - -``` -long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) cacosl (long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the arc cosine of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a long double value) whose arc cosine is to be obtained.
- -**Returns:** - -Returns the arc cosine of **z** if the operation is successful. If **x** is **+0** or **-0** and **y** is **0**, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f) - 0i**. If **x** is **+0** or **-0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is not an infinity and **y** is an infinity, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)-[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182)i**. If **x** is neither an infinity nor **0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a negative infinity and **y** is a positive finite value, this function returns **[M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3) - [HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182)i**. If **x** is a negative infinity and **y** is a positive infinity, this function returns **3\*[M\_PI\_4](MATH.md#gaeb24420b096a677f3a2dc5a72b36bf22) - [HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182)i**. If **x** and **y** are both positive infinity, this function returns **[M\_PI\_4](MATH.md#gaeb24420b096a677f3a2dc5a72b36bf22) - [HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182)i**. If **x** is a positive or negative infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) +\(-\) [HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182)i** \(the sign bit of the imaginary part of the returned value is uncertain\). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is not an infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is a positive infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) - [HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182)i**. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## carg\(\) - -``` -double carg (double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the phase angle of the complex number **z**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a double value) whose phase angle is to be obtained.
- -**Attention:** - -If an error occurs or **z** is a positive or negative infinity or [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), the returned value is calculated based on the formula [atan2](MATH.md#ga349377202ca14f79eb335b1a421fe4d8)\([cimag](MATH.md#ga6c3d7c875ae93700b0a2a32db24b37d3)\(z\) + [creal](MATH.md#ga24b1a511efdb973354d81646c5c3bb81)\(z\)\). - -**Returns:** - -Returns the phase angle of **z** if the operation is successful. - -## cargf\(\) - -``` -float cargf (float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the phase angle of the complex number **z**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a float value) whose phase angle is to be obtained.
- -**Attention:** - -If an error occurs or **z** is a positive or negative infinity or [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), the returned value is calculated based on the formula [atan2](MATH.md#ga349377202ca14f79eb335b1a421fe4d8)\([cimag](MATH.md#ga6c3d7c875ae93700b0a2a32db24b37d3)\(z\) + [creal](MATH.md#ga24b1a511efdb973354d81646c5c3bb81)\(z\)\). - -**Returns:** - -Returns the phase angle of **z** if the operation is successful. - -## cargl\(\) - -``` -long double cargl (long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the phase angle of the complex number **z**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a long double value) whose hyperbolic sine is to be obtained.
- -**Attention:** - -If an error occurs or **z** is a positive or negative infinity or [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), the returned value is calculated based on the formula [atan2](MATH.md#ga349377202ca14f79eb335b1a421fe4d8)\([cimag](MATH.md#ga6c3d7c875ae93700b0a2a32db24b37d3)\(z\) + [creal](MATH.md#ga24b1a511efdb973354d81646c5c3bb81)\(z\)\). - -**Returns:** - -Returns the phase angle of **z** if the operation is successful. - -## casin\(\) - -``` -double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) casin (double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the arc sine of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a double value) whose arc sine is to be obtained.
- -**Returns:** - -Returns the arc sine of **z** if the operation is successful. If **x** and **y** are both **0**, this function returns **0**. If **x** is a positive finite value and **y** is a positive infinity, this function returns **[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) + [M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** is not an infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is a positive finite value, this function returns **[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971)**. If **x** and **y** are both positive infinity, this function returns **[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) + [M\_PI\_4](MATH.md#gaeb24420b096a677f3a2dc5a72b36bf22)i**. If **x** is a positive infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is **0**, this function returns [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is not **0**, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is a positive infinity, this function returns **+\(-\)[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** \(the sign bit of the real part of the returned value is uncertain. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## casinf\(\) - -``` -float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) casinf (float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the arc sine of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a float value) whose arc sine is to be obtained.
- -**Returns:** - -Returns the arc sine of **z** if the operation is successful. If **x** and **y** are both **0**, this function returns **0**. If **x** is a positive finite value and **y** is a positive infinity, this function returns **[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) + [M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** is not an infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is a positive finite value, this function returns **[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359)**. If **x** and **y** are both positive infinity, this function returns **[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) + [M\_PI\_4](MATH.md#gaeb24420b096a677f3a2dc5a72b36bf22)i**. If **x** is a positive infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is **0**, this function returns [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is not **0**, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is a positive infinity, this function returns **+\(-\)[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** \(the sign bit of the real part of the returned value is uncertain. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## casinh\(\) - -``` -double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) casinh (double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the inverse hyperbolic sine of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a double value) whose inverse hyperbolic sine is to be obtained.
- -**Returns:** - -Returns the inverse hyperbolic sine of **z** if the operation is successful. If **x** and **y** are both **0**, this function returns **0**. If **x** is a positive finite value and **y** is a positive infinity, this function returns **[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) + [M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** is not an infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is a positive finite value, this function returns **[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971)**. If **x** and **y** are both positive infinity, this function returns **[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) + [M\_PI\_4](MATH.md#gaeb24420b096a677f3a2dc5a72b36bf22)i**. If **x** is a positive infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is **0**, this function returns [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is not **0**, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is a positive infinity, this function returns **+\(-\)[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** \(the sign bit of the real part of the returned value is uncertain. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## casinhf\(\) - -``` -float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) casinhf (float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the inverse hyperbolic sine of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a float value) whose inverse hyperbolic sine is to be obtained.
- -**Returns:** - -Returns the inverse hyperbolic sine of **z** if the operation is successful. If **x** and **y** are both **0**, this function returns **0**. If **x** is a positive finite value and **y** is a positive infinity, this function returns **[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) + [M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** is not an infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is a positive finite value, this function returns **[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359)**. If **x** and **y** are both positive infinity, this function returns **[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) + [M\_PI\_4](MATH.md#gaeb24420b096a677f3a2dc5a72b36bf22)i**. If **x** is a positive infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is **0**, this function returns [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is not **0**, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is a positive infinity, this function returns **+\(-\)[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** \(the sign bit of the real part of the returned value is uncertain. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## casinhl\(\) - -``` -long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) casinhl (long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the inverse hyperbolic sine of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a long double value) whose inverse hyperbolic sine is to be obtained.
- -**Returns:** - -Returns the inverse hyperbolic sine of **z** if the operation is successful. If **x** and **y** are both **0**, this function returns **0**. If **x** is a positive finite value and **y** is a positive infinity, this function returns **[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) + [M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** is not an infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is a positive finite value, this function returns **[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182)**. If **x** and **y** are both positive infinity, this function returns **[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) + [M\_PI\_4](MATH.md#gaeb24420b096a677f3a2dc5a72b36bf22)i**. If **x** is a positive infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is **0**, this function returns [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is not **0**, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is a positive infinity, this function returns **+\(-\)[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** \(the sign bit of the real part of the returned value is uncertain. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## casinl\(\) - -``` -long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) casinl (long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the arc sine of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a long double value) whose arc sine is to be obtained.
- -**Returns:** - -Returns the arc sine of **z** if the operation is successful. If **x** and **y** are both **0**, this function returns **0**. If **x** is a positive finite value and **y** is a positive infinity, this function returns **[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) + [M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** is not an infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is a positive finite value, this function returns **[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182)**. If **x** and **y** are both positive infinity, this function returns **[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) + [M\_PI\_4](MATH.md#gaeb24420b096a677f3a2dc5a72b36bf22)i**. If **x** is a positive infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is **0**, this function returns [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is not **0**, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is a positive infinity, this function returns **+\(-\)[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** \(the sign bit of the real part of the returned value is uncertain. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## catan\(\) - -``` -double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) catan (double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the arc tangent of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a double value) whose arc tangent is to be obtained.
- -**Returns:** - -Returns the arc tangent of **z** if the operation is successful. If **x** and **y** are both **0**, this function returns **0**. If **x** is **0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is **1** and **y** is **0**, this function returns **[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971)** and throws the [FE\_DIVBYZERO](MATH.md#gab1317930189d1a14841893fb4bd9b5a0) exception. If **x** is a positive finite value and **y** is a positive infinity, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** is neither an infinity nor **0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is a positive finite value, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** and **y** are both positive infinity, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** is a positive infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is not an infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is a positive infinity, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## catanf\(\) - -``` -float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) catanf (float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the arc tangent of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a float value) whose arc tangent is to be obtained.
- -**Returns:** - -Returns the arc tangent of **z** if the operation is successful. If **x** and **y** are both **0**, this function returns **0**. If **x** is **0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is **1** and **y** is **0**, this function returns **[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359)** and throws the [FE\_DIVBYZERO](MATH.md#gab1317930189d1a14841893fb4bd9b5a0) exception. If **x** is a positive finite value and **y** is a positive infinity, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** is neither an infinity nor **0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is a positive finite value, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** and **y** are both positive infinity, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** is a positive infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is not an infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is a positive infinity, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## catanh\(\) - -``` -double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) catanh (double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the inverse hyperbolic tangent of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a double value) whose inverse hyperbolic tangent is to be obtained.
- -**Returns:** - -Returns the inverse hyperbolic tangent of **z** if the operation is successful. If **x** and **y** are both **0**, this function returns **0**. If **x** is **0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is **1** and **y** is **0**, this function returns **[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971)** and throws the [FE\_DIVBYZERO](MATH.md#gab1317930189d1a14841893fb4bd9b5a0) exception. If **x** is a positive finite value and **y** is a positive infinity, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** is neither an infinity nor **0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is a positive finite value, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** and **y** are both positive infinity, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** is a positive infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is not an infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is a positive infinity, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## catanhf\(\) - -``` -float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) catanhf (float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the inverse hyperbolic tangent of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a float value) whose inverse hyperbolic tangent is to be obtained.
- -**Returns:** - -Returns the inverse hyperbolic tangent of **z** if the operation is successful. If **x** and **y** are both **0**, this function returns **0**. If **x** is **0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is **1** and **y** is **0**, this function returns **[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359)** and throws the [FE\_DIVBYZERO](MATH.md#gab1317930189d1a14841893fb4bd9b5a0) exception. If **x** is a positive finite value and **y** is a positive infinity, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** is neither an infinity nor **0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is a positive finite value, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** and **y** are both positive infinity, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** is a positive infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is not an infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is a positive infinity, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## catanhl\(\) - -``` -long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) catanhl (long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the inverse hyperbolic tangent of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a long double value) whose inverse hyperbolic tangent is to be obtained.
- -**Returns:** - -Returns the inverse hyperbolic tangent of **z** if the operation is successful. If **x** and **y** are both **0**, this function returns **0**. If **x** is **0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is **1** and **y** is **0**, this function returns **[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182)** and throws the [FE\_DIVBYZERO](MATH.md#gab1317930189d1a14841893fb4bd9b5a0) exception. If **x** is a positive finite value and **y** is a positive infinity, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** is neither an infinity nor **0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is a positive finite value, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** and **y** are both positive infinity, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** is a positive infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is not an infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is a positive infinity, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## catanl\(\) - -``` -long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) catanl (long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the arc tangent of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a long double value) whose arc tangent is to be obtained.
- -**Returns:** - -Returns the arc tangent of **z** if the operation is successful. If **x** and **y** are both **0**, this function returns **0**. If **x** is **0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is **1** and **y** is **0**, this function returns **[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182)** and throws the [FE\_DIVBYZERO](MATH.md#gab1317930189d1a14841893fb4bd9b5a0) exception. If **x** is a positive finite value and **y** is a positive infinity, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** is neither an infinity nor **0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is a positive finite value, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** and **y** are both positive infinity, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** is a positive infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is not an infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is a positive infinity, this function returns **[M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## cbrt\(\) - -``` -double cbrt (double x) -``` - - **Description:** - -Calculates the cube root of the double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value whose cube root is to be calculated.
- -**Returns:** - -Returns the cube root if the operation is successful; returns the passed **x** if **x** is **+0**, **-0**, a positive or negative infinity, or a NaN value. - -## cbrtf\(\) - -``` -float cbrtf (float x) -``` - - **Description:** - -Calculates the cube root of the float value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value whose cube root is to be calculated.
- -**Returns:** - -Returns the cube root if the operation is successful; returns the passed **x** if **x** is **+0**, **-0**, a positive or negative infinity, or a NaN value. - -## cbrtl\(\) - -``` -long double cbrtl (long double x) -``` - - **Description:** - -Calculates the cube root of the long double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value whose cube root is to be calculated.
- -**Returns:** - -Returns the cube root if the operation is successful; returns the passed **x** if **x** is **+0**, **-0**, a positive or negative infinity, or a NaN value. - -## ccos\(\) - -``` -double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) ccos (double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the cosine of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a double value) whose cosine is to be obtained.
- -**Returns:** - -Returns the cosine of **z** if the operation is successful. If **x** and **y** are both **0**, this function returns **1**. If **x** is **0** and **y** is a positive infinity, this function returns [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971). If **x** is **0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc). If **x** is a negative infinity and **y** is **0**, this function returns [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a negative infinity and **y** is a positive infinity, this function returns **+\(-\)[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** \(the sign bit of the real part of the returned value is uncertain\) and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a negative infinity and **y** is neither an infinity nor **0**, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is **0**, this function returns [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is a positive infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is a positive or negative infinity, this function returns **[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is neither an infinity nor **0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## ccosf\(\) - -``` -float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) ccosf (float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the cosine of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a float value) whose cosine is to be obtained.
- -**Returns:** - -Returns the cosine of **z** if the operation is successful. If **x** and **y** are both **0**, this function returns **1**. If **x** is **0** and **y** is a positive infinity, this function returns [HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359). If **x** is **0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc). If **x** is a negative infinity and **y** is **0**, this function returns [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a negative infinity and **y** is a positive infinity, this function returns **+\(-\)[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** \(the sign bit of the real part of the returned value is uncertain\) and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a negative infinity and **y** is neither an infinity nor **0**, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is **0**, this function returns [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is a positive infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is a positive or negative infinity, this function returns **[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is neither an infinity nor **0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## ccosh\(\) - -``` -double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) ccosh (double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the hyperbolic cosine of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a double value) whose hyperbolic cosine is to be obtained.
- -**Returns:** - -Returns the hyperbolic cosine of **z** if the operation is successful. If **x** and **y** are both **0**, this function returns **1**. If **x** is **0** and **y** is a positive infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is **0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc). If **x** is neither an infinity nor **0** and **y** is a positive infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a negative infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is **0**, this function returns [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971). If **x** is a positive infinity and **y** is a positive infinity, this function returns **+\(-\)[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** \(the sign bit of the real part of the returned value is uncertain\) and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive or negative infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is **0**, this function returns [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is neither an infinity nor **0**, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## ccoshf\(\) - -``` -float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) ccoshf (float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the hyperbolic cosine of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a float value) whose hyperbolic cosine is to be obtained.
- -**Returns:** - -Returns the hyperbolic cosine of **z** if the operation is successful. If **x** and **y** are both **0**, this function returns **1**. If **x** is **0** and **y** is a positive infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is **0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc). If **x** is neither an infinity nor **0** and **y** is a positive infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a negative infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is **0**, this function returns [HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359). If **x** is a positive infinity and **y** is a positive infinity, this function returns **+\(-\)[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** \(the sign bit of the real part of the returned value is uncertain\) and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive or negative infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is **0**, this function returns [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is neither an infinity nor **0**, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## ccoshl\(\) - -``` -long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) ccoshl (long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the hyperbolic cosine of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a long double value) whose hyperbolic cosine is to be obtained.
- -**Returns:** - -Returns the hyperbolic cosine of **z** if the operation is successful. If **x** and **y** are both **0**, this function returns **1**. If **x** is **0** and **y** is a positive infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is **0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc). If **x** is neither an infinity nor **0** and **y** is a positive infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a negative infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is **0**, this function returns [HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182). If **x** is a positive infinity and **y** is a positive infinity, this function returns **+\(-\)[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** \(the sign bit of the real part of the returned value is uncertain\) and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive or negative infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is **0**, this function returns [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is neither an infinity nor **0**, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## ccosl\(\) - -``` -long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) ccosl (long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the cosine of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a long double value) whose cosine is to be obtained.
- -**Returns:** - -Returns the cosine of **z** if the operation is successful. If **x** and **y** are both **0**, this function returns **1**. If **x** is **0** and **y** is a positive infinity, this function returns [HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182). If **x** is **0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc). If **x** is a negative infinity and **y** is **0**, this function returns [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a negative infinity and **y** is a positive infinity, this function returns **+\(-\)[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** \(the sign bit of the real part of the returned value is uncertain\) and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a negative infinity and **y** is neither an infinity nor **0**, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is **0**, this function returns [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is a positive infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is a positive or negative infinity, this function returns **[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is neither an infinity nor **0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## ceil\(\) - -``` -double ceil (double x) -``` - - **Description:** - -Calculates the minimum integer greater than or equal to the double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value x to compare with.
- -**Returns:** - -Returns the minimum integer greater than or equal to **x** if the operation is successful; returns the passed **x** if **x** is an integer, **+0**, **-0**, a NaN value, or an infinity. - -## ceilf\(\) - -``` -float ceilf (float x) -``` - - **Description:** - -Calculates the minimum integer greater than or equal to the float value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value x to compare with.
- -**Returns:** - -Returns the minimum integer greater than or equal to **x** if the operation is successful; returns the passed **x** if **x** is an integer, **+0**, **-0**, a NaN value, or an infinity. - -## ceill\(\) - -``` -long double ceill (long double x) -``` - - **Description:** - -Calculates the minimum integer greater than or equal to the long double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value x to compare with.
- -**Returns:** - -Returns the minimum integer greater than or equal to **x** if the operation is successful; returns the passed **x** if **x** is an integer, **+0**, **-0**, a NaN value, or an infinity. - -## cexp\(\) - -``` -double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) cexp (double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the base-e exponential of the complex number **z**. - -The mathematical formula is e^z. z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a double value) whose base-e exponential is to be obtained.
- -**Returns:** - -Returns the base-e exponential of **z** if the operation is successful. If **x** and **y** are both **0**, this function returns **1**. If **x** is not an infinity and **y** is a positive infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is not an infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is **0**, this function returns [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971). If **x** is a negative infinity and **y** is an infinity or [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **0**. If **x** is a positive infinity and **y** is neither an infinity nor **0**, this function returns **[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971)\*\([cos](MATH.md#ga5e7b53a694b3cf0f2d7debd444140fbd)\(y\) + i[sin](MATH.md#gaad4af25633b071b0e2cdb8ebd87eca77)\(y\)\)**. If **x** and **y** are both positive infinity, this function returns **+\(-\)[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** \(the sign bit of the real part of the returned value is uncertain\) and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **+\(-\)[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** \(the sign bit of the real part of the returned value is uncertain\). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is **0**, this function returns [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is not **0**, this function returns **[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## cexpf\(\) - -``` -float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) cexpf (float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the base-e exponential of the complex number **z**. - -The mathematical formula is e^z. z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a float value) whose base-e exponential is to be obtained.
- -**Returns:** - -Returns the base-e exponential of **z** if the operation is successful. If **x** and **y** are both **0**, this function returns **1**. If **x** is not an infinity and **y** is a positive infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is not an infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is **0**, this function returns [HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359). If **x** is a negative infinity and **y** is an infinity or [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **0**. If **x** is a positive infinity and **y** is neither an infinity nor **0**, this function returns **[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359)\*\([cos](MATH.md#ga5e7b53a694b3cf0f2d7debd444140fbd)\(y\) + i[sin](MATH.md#gaad4af25633b071b0e2cdb8ebd87eca77)\(y\)\)**. If **x** and **y** are both positive infinity, this function returns **+\(-\)[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** \(the sign bit of the real part of the returned value is uncertain\) and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **+\(-\) [HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** \(the sign bit of the real part of the returned value is uncertain\). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is **0**, this function returns [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is not **0**, this function returns **[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## cexpl\(\) - -``` -long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) cexpl (long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the base-e exponential of the complex number **z**. - -The mathematical formula is e^z. z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a long double value) whose base-e exponential is to be obtained.
- -**Returns:** - -Returns the base-e exponential of **z** if the operation is successful. If **x** and **y** are both **0**, this function returns **1**. If **x** is not an infinity and **y** is a positive infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is not an infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is **0**, this function returns [HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182). If **x** is a negative infinity and **y** is an infinity or [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **0**. If **x** is a positive infinity and **y** is neither an infinity nor **0**, this function returns **[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182)\*\([cos](MATH.md#ga5e7b53a694b3cf0f2d7debd444140fbd)\(y\) + i[sin](MATH.md#gaad4af25633b071b0e2cdb8ebd87eca77)\(y\)\)**. If **x** and **y** are both positive infinity, this function returns **+\(-\)[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** \(the sign bit of the real part of the returned value is uncertain\) and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **+\(-\)[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** \(the sign bit of the real part of the returned value is uncertain\). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is **0**, this function returns [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is not **0**, this function returns **[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## cimag\(\) - -``` -double cimag (double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the imaginary part of the complex number **z**. - - - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a double value) whose imaginary part is to be obtained.
- -**Returns:** - -Returns the imaginary part of **z** if the operation is successful. - -## cimagf\(\) - -``` -float cimagf (float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the imaginary part of the complex number **z**. - - - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a float value) whose imaginary part is to be obtained.
- -**Returns:** - -Returns the imaginary part of **z** if the operation is successful. - -## cimagl\(\) - -``` -long double cimagl (long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the imaginary part of the complex number **z**. - - - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a long double value) whose imaginary part is to be obtained.
- -**Returns:** - -Returns the imaginary part of **z** if the operation is successful. - -## clog\(\) - -``` -double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) clog (double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the natural \(base-e\) logarithm of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a double value) whose natural (base-e) logarithm is to be obtained.
- -**Returns:** - -Returns the natural \(base-e\) logarithm of **z** if the operation is successful. If **x** is **-0** and **y** is **+0**, this function returns **-[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) + [M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3)i** and throws the [FE\_DIVBYZERO](MATH.md#gab1317930189d1a14841893fb4bd9b5a0) exception. If **x** and **y** are both **+0**, this function returns **-[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) + 0i** and throws the [FE\_DIVBYZERO](MATH.md#gab1317930189d1a14841893fb4bd9b5a0) exception. If **x** is not an infinity and **y** is a positive infinity, this function returns **[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) + [M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** is not an infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a negative infinity and **y** is a positive finite value, this function returns **[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) + [M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3)i**. If **x** is a negative infinity and **y** is a positive infinity, this function returns **[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) + 3\*[M\_PI\_4](MATH.md#gaeb24420b096a677f3a2dc5a72b36bf22)i**. If **x** is a positive infinity and **y** is a positive finite value, this function returns **[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) + 0i**. If **x** and **y** are both positive infinity, this function returns **[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) + [M\_PI\_4](MATH.md#gaeb24420b096a677f3a2dc5a72b36bf22)i**. If **x** is an infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is not an infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is a positive infinity, this function returns **[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## clogf\(\) - -``` -float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) clogf (float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the natural \(base-e\) logarithm of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a float value) whose natural (base-e) logarithm is to be obtained.
- -**Returns:** - -Returns the natural \(base-e\) logarithm of **z** if the operation is successful. If **x** is **-0** and **y** is **+0**, this function returns **-[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) + [M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3)i** and throws the [FE\_DIVBYZERO](MATH.md#gab1317930189d1a14841893fb4bd9b5a0) exception. If **x** and **y** are both **+0**, this function returns **-[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) + 0i** and throws the [FE\_DIVBYZERO](MATH.md#gab1317930189d1a14841893fb4bd9b5a0) exception. If **x** is not an infinity and **y** is a positive infinity, this function returns **[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) + [M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** is not an infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a negative infinity and **y** is a positive finite value, this function returns **[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) + [M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3)i**. If **x** is a negative infinity and **y** is a positive infinity, this function returns **[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) + 3\*[M\_PI\_4](MATH.md#gaeb24420b096a677f3a2dc5a72b36bf22)i**. If **x** is a positive infinity and **y** is a positive finite value, this function returns **[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) + 0i**. If **x** and **y** are both positive infinity, this function returns **[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) + [M\_PI\_4](MATH.md#gaeb24420b096a677f3a2dc5a72b36bf22)i**. If **x** is an infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is not an infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is a positive infinity, this function returns **[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## clogl\(\) - -``` -long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) clogl (long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the natural \(base-e\) logarithm of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a long double value) whose natural (base-e) logarithm is to be obtained.
- -**Returns:** - -Returns the natural \(base-e\) logarithm of **z** if the operation is successful. If **x** is **-0** and **y** is **+0**, this function returns **-[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) + [M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3)i** and throws the [FE\_DIVBYZERO](MATH.md#gab1317930189d1a14841893fb4bd9b5a0) exception. If **x** and **y** are both **+0**, this function returns **-[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) + 0i** and throws the [FE\_DIVBYZERO](MATH.md#gab1317930189d1a14841893fb4bd9b5a0) exception. If **x** is not an infinity and **y** is a positive infinity, this function returns **[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) + [M\_PI\_2](MATH.md#ga958e4508ed28ee5cc04249144312c15f)i**. If **x** is not an infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a negative infinity and **y** is a positive finite value, this function returns **[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) + [M\_PI](MATH.md#gae71449b1cc6e6250b91f539153a7a0d3)i**. If **x** is a negative infinity and **y** is a positive infinity, this function returns **[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) + 3\*[M\_PI\_4](MATH.md#gaeb24420b096a677f3a2dc5a72b36bf22)i**. If **x** is a positive infinity and **y** is a positive finite value, this function returns **[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) + 0i**. If **x** and **y** are both positive infinity, this function returns **[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) + [M\_PI\_4](MATH.md#gaeb24420b096a677f3a2dc5a72b36bf22)i**. If **x** is an infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is not an infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is a positive infinity, this function returns **[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## conj\(\) - -``` -double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) conj (double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the conjugate of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a double value) whose conjugate is to be obtained.
- -**Returns:** - -Returns the conjugate of **z**, which is equal to x - yi. - -## conjf\(\) - -``` -float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) conjf (float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the conjugate of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a float value) whose conjugate is to be obtained.
- -**Returns:** - -Returns the conjugate of **z**, which is equal to x - yi. - -## conjl\(\) - -``` -long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) conjl (long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the conjugate of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a long double value) whose conjugate is to be obtained.
- -**Returns:** - -Returns the conjugate of **z**, which is equal to x - yi. - -## copysign\(\) - -``` -double copysign (double x, double y ) -``` - - **Description:** - -Generates a value by combining the magnitude of the double value **x** and the sign of the double value **y**. - -For example, if **x** is **42.0** and **y** is **-1.0**, value **-42.0** will be generated. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value x whose magnitude will be used.
yIndicates the double value y whose sign will be used.
- -**Returns:** - -Returns the generated value if the operation is successful; returns a NaN value with the sign of **y** if **x** is a NaN value. - -## copysignf\(\) - -``` -float copysignf (float x, float y ) -``` - - **Description:** - -Generates a value by combining the magnitude of the float value **x** and the sign of the float value **y**. - -For example, if **x** is **42.0** and **y** is **-1.0**, value **-42.0** will be generated. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value x whose magnitude will be used.
yIndicates the float value y whose sign will be used.
- -**Returns:** - -Returns the generated value if the operation is successful; returns a NaN value with the sign of **y** if **x** is a NaN value. - -## copysignl\(\) - -``` -long double copysignl (long double x, long double y ) -``` - - **Description:** - -Generates a value by combining the magnitude of the long double value **x** and the sign of the long double value **y**. - -For example, if **x** is **42.0** and **y** is **-1.0**, value **-42.0** will be generated. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value x whose magnitude will be used.
yIndicates the long double value y whose magnitude will be used.
- -**Returns:** - -Returns the generated value if the operation is successful; returns a NaN value with the sign of **y** if **x** is a NaN value. - -## cos\(\) - -``` -double cos (double x) -``` - - **Description:** - -Calculates the cosine of the double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value.
- -**Returns:** - -Returns the cosine of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is a positive or negative infinity, this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. - -## cosf\(\) - -``` -float cosf (float x) -``` - - **Description:** - -Calculates the cosine of the float value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value.
- -**Returns:** - -Returns the cosine of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is a positive or negative infinity, this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. - -## cosh\(\) - -``` -double cosh (double x) -``` - - **Description:** - -Calculates the hyperbolic cosine of the double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value.
- -**Returns:** - -Returns the hyperbolic cosine of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is **+0** or **-0**, this function returns **1**. If **x** is a positive or negative infinity, this function returns a positive infinity. If an overflow range error occurs, this function returns [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971), sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_OVERFLOW](MATH.md#gad373306add36e7227d9c9620b6962323) exception. - -## coshf\(\) - -``` -float coshf (float x) -``` - - **Description:** - -Calculates the hyperbolic cosine of the float value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value.
- -**Returns:** - -Returns the hyperbolic cosine of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is **+0** or **-0**, this function returns **1**. If **x** is a positive or negative infinity, this function returns a positive infinity. If an overflow range error occurs, this function returns [HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359), sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_OVERFLOW](MATH.md#gad373306add36e7227d9c9620b6962323) exception. - -## coshl\(\) - -``` -long double coshl (long double x) -``` - - **Description:** - -Calculates the hyperbolic cosine of the long double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value.
- -**Returns:** - -Returns the hyperbolic cosine of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is **+0** or **-0**, this function returns **1**. If **x** is a positive or negative infinity, this function returns a positive infinity. If an overflow range error occurs, this function returns [HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182), sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_OVERFLOW](MATH.md#gad373306add36e7227d9c9620b6962323) exception. - -## cosl\(\) - -``` -long double cosl (long double x) -``` - - **Description:** - -Calculates the cosine of the long double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value.
- -**Returns:** - -Returns the cosine of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is a positive or negative infinity, this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. - -## cpow\(\) - -``` -double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) cpow (double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) x, double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z ) -``` - - **Description:** - -Calculates the value of **x** raised to the **z** power. - -The mathematical formula is x^z. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the base (a double complex number).
zIndicates the exponent (a double complex number).
- -**Attention:** - -If an error occurs or **x** or **z** is a positive or negative infinity or [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), the returned value is calculated based on the formula [cexp](MATH.md#gab9c654c52efefb54d06d52aa1a1c1827)\(z\*[clog](MATH.md#gaa39c3557d8db10c19571bc0b63fd5529)\(x\)\). - -**Returns:** - -Returns the value of **x** raised to the **z** power if the operation is successful. - -## cpowf\(\) - -``` -float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) cpowf (float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) x, float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z ) -``` - - **Description:** - -Calculates the value of **x** raised to the **z** power. - -The mathematical formula is x^z. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the base (a float complex number).
zIndicates the exponent (a float complex number).
- -**Attention:** - -If an error occurs or **x** or **z** is a positive or negative infinity or [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), the returned value is calculated based on the formula [cexp](MATH.md#gab9c654c52efefb54d06d52aa1a1c1827)\(z\*[clog](MATH.md#gaa39c3557d8db10c19571bc0b63fd5529)\(x\)\). - -**Returns:** - -Returns the value of **x** raised to the **z** power if the operation is successful. - -## cpowl\(\) - -``` -long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) cpowl (long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) x, long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z ) -``` - - **Description:** - -Calculates the value of **x** raised to the **z** power. - -The mathematical formula is x^z. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the base (a long double complex number).
zIndicates the exponent (a long double complex number).
- -**Attention:** - -If an error occurs or **x** or **z** is a positive or negative infinity or [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), the returned value is calculated based on the formula [cexp](MATH.md#gab9c654c52efefb54d06d52aa1a1c1827)\(z\*[clog](MATH.md#gaa39c3557d8db10c19571bc0b63fd5529)\(x\)\). - -**Returns:** - -Returns the value of **x** raised to the **z** power if the operation is successful. - -## cproj\(\) - -``` -double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) cproj (double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the projection of the complex number **z** onto the Riemann sphere. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a double value) whose projection onto the Riemann sphere is to be obtained.
- -**Returns:** - -Returns the projection of **z** onto the Riemann sphere if the operation is successful. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is an infinity, this function returns [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971). If **x** is an infinity, this function returns [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) + i\*[copysign](MATH.md#gad8d1296592a3e783acdd0de21ff58e2e)\(0.0, [cimag](MATH.md#ga6c3d7c875ae93700b0a2a32db24b37d3)\(z\)\). - -## cprojf\(\) - -``` -float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) cprojf (float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the projection of the complex number **z** onto the Riemann sphere. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a float value) whose projection onto the Riemann sphere is to be obtained.
- -**Returns:** - -Returns the projection of **z** onto the Riemann sphere if the operation is successful. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is an infinity, this function returns [HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359). If **x** is an infinity, this function returns [HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) + i\*[copysign](MATH.md#gad8d1296592a3e783acdd0de21ff58e2e)\(0.0, [cimag](MATH.md#ga6c3d7c875ae93700b0a2a32db24b37d3)\(z\)\). - -## cprojl\(\) - -``` -long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) cprojl (long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the projection of the complex number **z** onto the Riemann sphere. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a long double value) whose projection onto the Riemann sphere is to be obtained.
- -**Returns:** - -Returns the projection of **z** onto the Riemann sphere if the operation is successful. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is an infinity, this function returns [HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182). If **x** is an infinity, this function returns [HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) + i\*[copysign](MATH.md#gad8d1296592a3e783acdd0de21ff58e2e)\(0.0, [cimag](MATH.md#ga6c3d7c875ae93700b0a2a32db24b37d3)\(z\)\). - -## creal\(\) - -``` -double creal (double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the real part of the complex number **z**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a double value) whose real part is to be obtained.
- -**Returns:** - -Returns the real part of **z** if the operation is successful. - -## crealf\(\) - -``` -float crealf (float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the real part of the complex number **z**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a float value) whose real part is to be obtained.
- -**Returns:** - -Returns the real part of **z** if the operation is successful. - -## creall\(\) - -``` -long double creall (long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the real part of the complex number **z**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a long double value) whose real part is to be obtained.
- -**Returns:** - -Returns the real part of **z** if the operation is successful. - -## csin\(\) - -``` -double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) csin (double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the sine of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a double value) whose sine is to be obtained.
- -**Returns:** - -Returns the sine of **z** if the operation is successful. If **x** and **y** are both **0**, this function returns **0**. If **x** is **0** and **y** is a positive infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is **0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is a positive finite value and **y** is a positive infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive finite value and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is **0**, this function returns [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971). If **x** is a positive infinity and **y** is a positive finite value, this function returns **[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971)\*\([cos](MATH.md#ga5e7b53a694b3cf0f2d7debd444140fbd)\(y\) + i[sin](MATH.md#gaad4af25633b071b0e2cdb8ebd87eca77)\(y\)\)**. If **x** and **y** are both positive infinity, this function returns **+\(-\)[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** \(the sign bit of the real part of the returned value is uncertain\) and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **+\(-\)[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** \(the sign bit of the real part of the returned value is uncertain\). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is **0**, this function returns [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is not **0**, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## csinf\(\) - -``` -float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) csinf (float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the sine of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a float value) whose sine is to be obtained.
- -**Returns:** - -Returns the sine of **z** if the operation is successful. If **x** and **y** are both **0**, this function returns **0**. If **x** is **0** and **y** is a positive infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is **0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is a positive finite value and **y** is a positive infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive finite value and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is **0**, this function returns [HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359). If **x** is a positive infinity and **y** is a positive finite value, this function returns **[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359)\*\([cos](MATH.md#ga5e7b53a694b3cf0f2d7debd444140fbd)\(y\) + i[sin](MATH.md#gaad4af25633b071b0e2cdb8ebd87eca77)\(y\)\)**. If **x** and **y** are both positive infinity, this function returns **+\(-\)[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** \(the sign bit of the real part of the returned value is uncertain\) and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **+\(-\) [HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** \(the sign bit of the real part of the returned value is uncertain\). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is **0**, this function returns [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is not **0**, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## csinh\(\) - -``` -double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) csinh (double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the hyperbolic sine of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a double value) whose hyperbolic sine is to be obtained.
- -**Returns:** - -Returns the hyperbolic sine of **z** if the operation is successful. If **x** and **y** are both **0**, this function returns **0**. If **x** is **0** and **y** is a positive infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is **0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is a positive finite value and **y** is a positive infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive finite value and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is **0**, this function returns [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971). If **x** is a positive infinity and **y** is a positive finite value, this function returns **[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971)\*\([cos](MATH.md#ga5e7b53a694b3cf0f2d7debd444140fbd)\(y\) + i[sin](MATH.md#gaad4af25633b071b0e2cdb8ebd87eca77)\(y\)\)**. If **x** and **y** are both positive infinity, this function returns **+\(-\)[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** \(the sign bit of the real part of the returned value is uncertain\) and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **+\(-\)[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** \(the sign bit of the real part of the returned value is uncertain\). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is **0**, this function returns [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is not **0**, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## csinhf\(\) - -``` -float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) csinhf (float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the hyperbolic sine of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a float value) whose hyperbolic sine is to be obtained.
- -**Returns:** - -Returns the hyperbolic sine of **z** if the operation is successful. If **x** and **y** are both **0**, this function returns **0**. If **x** is **0** and **y** is a positive infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is **0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is a positive finite value and **y** is a positive infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive finite value and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is **0**, this function returns [HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359). If **x** is a positive infinity and **y** is a positive finite value, this function returns **[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359)\*\([cos](MATH.md#ga5e7b53a694b3cf0f2d7debd444140fbd)\(y\) + i[sin](MATH.md#gaad4af25633b071b0e2cdb8ebd87eca77)\(y\)\)**. If **x** and **y** are both positive infinity, this function returns **+\(-\)[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** \(the sign bit of the real part of the returned value is uncertain\) and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **+\(-\) [HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** \(the sign bit of the real part of the returned value is uncertain\). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is **0**, this function returns [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is not **0**, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## csinhl\(\) - -``` -long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) csinhl (long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the hyperbolic sine of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a long double value) whose hyperbolic sine is to be obtained.
- -**Returns:** - -Returns the hyperbolic sine of **z** if the operation is successful. If **x** and **y** are both **0**, this function returns **0**. If **x** is **0** and **y** is a positive infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is **0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is a positive finite value and **y** is a positive infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive finite value and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is **0**, this function returns [HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182). If **x** is a positive infinity and **y** is a positive finite value, this function returns **[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182)\*\([cos](MATH.md#ga5e7b53a694b3cf0f2d7debd444140fbd)\(y\) + i[sin](MATH.md#gaad4af25633b071b0e2cdb8ebd87eca77)\(y\)\)**. If **x** and **y** are both positive infinity, this function returns **+\(-\)[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** \(the sign bit of the real part of the returned value is uncertain\) and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **+\(-\)[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** \(the sign bit of the real part of the returned value is uncertain\). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is **0**, this function returns [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is not **0**, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## csinl\(\) - -``` -long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) csinl (long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the sine of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a long double value) whose sine is to be obtained.
- -**Returns:** - -Returns the sine of **z** if the operation is successful. If **x** and **y** are both **0**, this function returns **0**. If **x** is **0** and **y** is a positive infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is **0** and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is a positive finite value and **y** is a positive infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive finite value and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is **0**, this function returns [HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182). If **x** is a positive infinity and **y** is a positive finite value, this function returns **[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182)\*\([cos](MATH.md#ga5e7b53a694b3cf0f2d7debd444140fbd)\(y\) + i[sin](MATH.md#gaad4af25633b071b0e2cdb8ebd87eca77)\(y\)\)**. If **x** and **y** are both positive infinity, this function returns **+\(-\)[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** \(the sign bit of the real part of the returned value is uncertain\) and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **+\(-\)[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** \(the sign bit of the real part of the returned value is uncertain\). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is **0**, this function returns [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is not **0**, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## csqrt\(\) - -``` -double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) csqrt (double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the square root of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a double value) whose square root is to be obtained.
- -**Returns:** - -Returns the square root of **z** if the operation is successful. If **x** is **+0** or **-0** and **y** is **+0**, this function returns **+0 + 0i**. If **x** is neither an infinity nor [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is a positive infinity, this function returns **[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) + [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971)i**. If **x** is a finite value or [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a negative infinity and **y** is a positive finite value, this function returns **[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971)i**. If **x** is a negative infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) +\(-\) [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971)i** \(the sign bit of the imaginary part of the returned value is uncertain\). If **x** is a positive infinity and **y** is a positive finite value, this function returns **[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) + 0i**. If **x** is a positive infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is any value, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## csqrtf\(\) - -``` -float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) csqrtf (float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the square root of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a float value) whose square root is to be obtained.
- -**Returns:** - -Returns the square root of **z** if the operation is successful. If **x** is **+0** or **-0** and **y** is **+0**, this function returns **+0 + 0i**. If **x** is neither an infinity nor [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is a positive infinity, this function returns **[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) + [HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359)i**. If **x** is a finite value or [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a negative infinity and **y** is a positive finite value, this function returns **[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359)i**. If **x** is a negative infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) +\(-\) [HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359)i** \(the sign bit of the imaginary part of the returned value is uncertain\). If **x** is a positive infinity and **y** is a positive finite value, this function returns **[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) + 0i**. If **x** is a positive infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is any value, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## csqrtl\(\) - -``` -long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) csqrtl (long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the square root of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a long double value) whose square root is to be obtained.
- -**Returns:** - -Returns the square root of **z** if the operation is successful. If **x** is **+0** or **-0** and **y** is **+0**, this function returns **+0 + 0i**. If **x** is neither an infinity nor [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is a positive infinity, this function returns **[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) + [HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182)i**. If **x** is a finite value or [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a negative infinity and **y** is a positive finite value, this function returns **[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182)i**. If **x** is a negative infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) +\(-\) [HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182)i** \(the sign bit of the imaginary part of the returned value is uncertain\). If **x** is a positive infinity and **y** is a positive finite value, this function returns **[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) + 0i**. If **x** is a positive infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182)+[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is any value, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## ctan\(\) - -``` -double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) ctan (double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the tangent of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a double value) whose tangent is to be obtained.
- -**Returns:** - -Returns the tangent of **z** if the operation is successful. If **x** and **y** are both **0**, this function returns **0**. If **x** is not an infinity and **y** is a positive infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is not an infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is a positive finite value, this function returns **1**. If **x** and **y** are both positive infinity, this function returns **1**. If **x** is a positive infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **1**. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is **0**, this function returns [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is not **0**, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## ctanf\(\) - -``` -float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) ctanf (float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the tangent of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a float value) whose tangent is to be obtained.
- -**Returns:** - -Returns the tangent of **z** if the operation is successful. If **x** and **y** are both **0**, this function returns **0**. If **x** is not an infinity and **y** is a positive infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is not an infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is a positive finite value, this function returns **1**. If **x** and **y** are both positive infinity, this function returns **1**. If **x** is a positive infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **1**. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is **0**, this function returns [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is not **0**, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## ctanh\(\) - -``` -double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) ctanh (double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the hyperbolic tangent of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a double value) whose hyperbolic tangent is to be obtained.
- -**Returns:** - -Returns the hyperbolic tangent of **z** if the operation is successful. If **x** and **y** are both **0**, this function returns **0**. If **x** is not an infinity and **y** is a positive infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is not an infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is a positive finite value, this function returns **1**. If **x** and **y** are both positive infinity, this function returns **1**. If **x** is a positive infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **1**. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is **0**, this function returns [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is not **0**, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## ctanhf\(\) - -``` -float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) ctanhf (float [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the hyperbolic tangent of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a float value) whose hyperbolic tangent is to be obtained.
- -**Returns:** - -Returns the hyperbolic tangent of **z** if the operation is successful. If **x** and **y** are both **0**, this function returns **0**. If **x** is not an infinity and **y** is a positive infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is not an infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is a positive finite value, this function returns **1**. If **x** and **y** are both positive infinity, this function returns **1**. If **x** is a positive infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **1**. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is **0**, this function returns [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is not **0**, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## ctanhl\(\) - -``` -long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) ctanhl (long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the hyperbolic tangent of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a long double value) whose hyperbolic tangent is to be obtained.
- -**Returns:** - -Returns the hyperbolic tangent of **z** if the operation is successful. If **x** and **y** are both **0**, this function returns **0**. If **x** is not an infinity and **y** is a positive infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is not an infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is a positive finite value, this function returns **1**. If **x** and **y** are both positive infinity, this function returns **1**. If **x** is a positive infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **1**. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is **0**, this function returns [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is not **0**, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## ctanl\(\) - -``` -long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) ctanl (long double [complex](MATH.md#ga0fa4878c968311979d497ccc322e0b9b) z) -``` - - **Description:** - -Calculates the tangent of the complex number **z**. - -z = x + yi, where i = [sqrt](MATH.md#gab87521a75ef827a85807f89a6c10629a)\(-1\) - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
zIndicates the complex number (a long double value) whose tangent is to be obtained.
- -**Returns:** - -Returns the tangent of **z** if the operation is successful. If **x** and **y** are both **0**, this function returns **0**. If **x** is not an infinity and **y** is a positive infinity, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is not an infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and may throw the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a positive infinity and **y** is a positive finite value, this function returns **1**. If **x** and **y** are both positive infinity, this function returns **1**. If **x** is a positive infinity and **y** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **1**. If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is **0**, this function returns [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc). If **x** is [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) and **y** is not **0**, this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i** and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** and **y** are both [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc), this function returns **[NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc) + [NAN](MATH.md#ga8abfcc76130f3f991d124dd22d7e69bc)i**. - -## erf\(\) - -``` -double erf (double x) -``` - - **Description:** - -Calculates the error function of the double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value.
- -**Returns:** - -Returns the error function if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is **+0** or **-0**, this function returns **+0** or **-0**, respectively. If **x** is a positive or negative infinity, this function returns **+1** or **-1**, respectively. If an underflow range error occurs, this function returns **2\*x/sqrt\(pi\)** and throws the [FE\_UNDERFLOW](MATH.md#ga57b80dfe7d5ce60c3c76e517fce89ffe) exception. - -## erfc\(\) - -``` -double erfc (double x) -``` - - **Description:** - -Calculates the complementary error function of the double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value.
- -**Returns:** - -Returns the complementary error function if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is **+0** or **-0**, this function returns **1**. If **x** is a positive infinity, this function returns **+0**. If **x** is a negative infinity, this function returns **+2**. If an underflow range error occurs and an unrepresentable value is generated, this function returns **0.0**. If an underflow range error occurs and a representable value is generated, this function returns **0** and throws the [FE\_UNDERFLOW](MATH.md#ga57b80dfe7d5ce60c3c76e517fce89ffe) exception. - -## erfcf\(\) - -``` -float erfcf (float x) -``` - - **Description:** - -Calculates the complementary error function of the float value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value.
- -**Returns:** - -Returns the complementary error function if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is **+0** or **-0**, this function returns **1**. If **x** is a positive infinity, this function returns **+0**. If **x** is a negative infinity, this function returns **+2**. If an underflow range error occurs and an unrepresentable value is generated, this function returns **0.0**. If an underflow range error occurs and a representable value is generated, this function returns **0** and throws the [FE\_UNDERFLOW](MATH.md#ga57b80dfe7d5ce60c3c76e517fce89ffe) exception. - -## erfcl\(\) - -``` -long double erfcl (long double x) -``` - - **Description:** - -Calculates the complementary error function of the long double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value.
- -**Returns:** - -Returns the complementary error function if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is **+0** or **-0**, this function returns **1**. If **x** is a positive infinity, this function returns **+0**. If **x** is a negative infinity, this function returns **+2**. If an underflow range error occurs and an unrepresentable value is generated, this function returns **0.0**. If an underflow range error occurs and a representable value is generated, this function returns **0** and throws the [FE\_UNDERFLOW](MATH.md#ga57b80dfe7d5ce60c3c76e517fce89ffe) exception. - -## erff\(\) - -``` -float erff (float x) -``` - - **Description:** - -Calculates the error function of the float value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value.
- -**Returns:** - -Returns the error function if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is **+0** or **-0**, this function returns **+0** or **-0**, respectively. If **x** is a positive or negative infinity, this function returns **+1** or **-1**, respectively. If an underflow range error occurs, this function returns **2\*x/sqrt\(pi\)** and throws the [FE\_UNDERFLOW](MATH.md#ga57b80dfe7d5ce60c3c76e517fce89ffe) exception. - -## erfl\(\) - -``` -long double erfl (long double x) -``` - - **Description:** - -Calculates the error function of the long double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value.
- -**Returns:** - -Returns the error function if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is **+0** or **-0**, this function returns **+0** or **-0**, respectively. If **x** is a positive or negative infinity, this function returns **+1** or **-1**, respectively. If an underflow range error occurs, this function returns **2\*x/sqrt\(pi\)** and throws the [FE\_UNDERFLOW](MATH.md#ga57b80dfe7d5ce60c3c76e517fce89ffe) exception. - -## exp\(\) - -``` -double exp (double x) -``` - - **Description:** - -Calculates the base-e exponential function of the double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value.
- -**Returns:** - -Returns the base-e exponential function of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is a positive infinity, this function returns a positive infinity. If **x** is a negative infinity, this function returns **+0**. If an underflow range error occurs, this function returns **0**, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_UNDERFLOW](MATH.md#ga57b80dfe7d5ce60c3c76e517fce89ffe) exception. If an overflow range error occurs, this function returns **+[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971)**, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_OVERFLOW](MATH.md#gad373306add36e7227d9c9620b6962323) exception. - -## exp10\(\) - -``` -double exp10 (double x) -``` - - **Description:** - -Calculates the base-10 exponential function of the double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value x used as the exponent.
- -**Returns:** - -Returns the base-10 exponential function of **x** if the operation is successful. - -## exp10f\(\) - -``` -float exp10f (float x) -``` - - **Description:** - -Calculates the base-10 exponential function of the float value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value x used as the exponent.
- -**Returns:** - -Returns the base-10 exponential function of **x** if the operation is successful. - -## exp10l\(\) - -``` -long double exp10l (long double x) -``` - - **Description:** - -Calculates the base-10 exponential function of the long double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value x used as the exponent.
- -**Returns:** - -Returns the base-10 exponential function of **x** if the operation is successful. - -## exp2\(\) - -``` -double exp2 (double x) -``` - - **Description:** - -Calculates the base-2 exponential function of the double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value.
- -**Returns:** - -Returns the base-2 exponential function of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is a positive infinity, this function returns a positive infinity. If **x** is a negative infinity, this function returns **+0**. If an underflow range error occurs, this function returns **0**, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_UNDERFLOW](MATH.md#ga57b80dfe7d5ce60c3c76e517fce89ffe) exception. If an overflow range error occurs, this function returns **+[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182)**, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_OVERFLOW](MATH.md#gad373306add36e7227d9c9620b6962323) exception. - -## exp2f\(\) - -``` -float exp2f (float x) -``` - - **Description:** - -Calculates the base-2 exponential function of the float value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value.
- -**Returns:** - -Returns the base-2 exponential function of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is a positive infinity, this function returns a positive infinity. If **x** is a negative infinity, this function returns **+0**. If an underflow range error occurs, this function returns **0**, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_UNDERFLOW](MATH.md#ga57b80dfe7d5ce60c3c76e517fce89ffe) exception. If an overflow range error occurs, this function returns **+[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182)**, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_OVERFLOW](MATH.md#gad373306add36e7227d9c9620b6962323) exception. - -## exp2l\(\) - -``` -long double exp2l (long double x) -``` - - **Description:** - -Calculates the base-2 exponential function of the long double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value.
- -**Returns:** - -Returns the base-2 exponential function of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is a positive infinity, this function returns a positive infinity. If **x** is a negative infinity, this function returns **+0**. If an underflow range error occurs, this function returns **0**, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_UNDERFLOW](MATH.md#ga57b80dfe7d5ce60c3c76e517fce89ffe) exception. If an overflow range error occurs, this function returns **+[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182)**, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_OVERFLOW](MATH.md#gad373306add36e7227d9c9620b6962323) exception. - -## expf\(\) - -``` -float expf (float x) -``` - - **Description:** - -Calculates the base-e exponential function of the float value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value.
- -**Returns:** - -Returns the base-e exponential function of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is a positive infinity, this function returns a positive infinity. If **x** is a negative infinity, this function returns **+0**. If an underflow range error occurs, this function returns **0**, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_UNDERFLOW](MATH.md#ga57b80dfe7d5ce60c3c76e517fce89ffe) exception. If an overflow range error occurs, this function returns **+[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359)**, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_OVERFLOW](MATH.md#gad373306add36e7227d9c9620b6962323) exception. - -## expl\(\) - -``` -long double expl (long double x) -``` - - **Description:** - -Calculates the base-e exponential function of the long double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value.
- -**Returns:** - -Returns the base-e exponential function of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is a positive infinity, this function returns a positive infinity. If **x** is a negative infinity, this function returns **+0**. If an underflow range error occurs, this function returns **0**, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_UNDERFLOW](MATH.md#ga57b80dfe7d5ce60c3c76e517fce89ffe) exception. If an overflow range error occurs, this function returns **+[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182)**, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_OVERFLOW](MATH.md#gad373306add36e7227d9c9620b6962323) exception. - -## expm1\(\) - -``` -double expm1 (double x) -``` - - **Description:** - -Calculates e raised to the power of the double value **x** minus one, that is, \(e^x\)-1. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value.
- -**Returns:** - -Returns e raised to the power of **x** minus one if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is **+0** or **-0**, this function returns **+0** or **-0**, respectively. If **x** is a positive infinity, this function returns a positive infinity. If **x** is a negative infinity, this function returns **-1**. If an overflow range error occurs, this function returns **+[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971)**, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_OVERFLOW](MATH.md#gad373306add36e7227d9c9620b6962323) exception. - -## expm1f\(\) - -``` -float expm1f (float x) -``` - - **Description:** - -Calculates e raised to the power of the float value **x** minus one. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value.
- -**Returns:** - -Returns e raised to the power of **x** minus one if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is **+0** or **-0**, this function returns **+0** or **-0**, respectively. If **x** is a positive infinity, this function returns a positive infinity. If **x** is a negative infinity, this function returns **-1**. If an overflow range error occurs, this function returns **+[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359)**, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_OVERFLOW](MATH.md#gad373306add36e7227d9c9620b6962323) exception. - -## expm1l\(\) - -``` -long double expm1l (long double x) -``` - - **Description:** - -Calculates e raised to the power of the long double value **x** minus one. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value.
- -**Returns:** - -Returns e raised to the power of **x** minus one if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is **+0** or **-0**, this function returns **+0** or **-0**, respectively. If **x** is a positive infinity, this function returns a positive infinity. If **x** is a negative infinity, this function returns **-1**. If an overflow range error occurs, this function returns **+[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182)**, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_OVERFLOW](MATH.md#gad373306add36e7227d9c9620b6962323) exception. - -## fabs\(\) - -``` -double fabs (double x) -``` - - **Description:** - -Calculates the absolute value of the double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value.
- -**Returns:** - -Returns the absolute value of **x** if the operation is successful; returns a NaN value if **x** is a NaN value; returns **+0** if **x** is **-0**; returns a positive infinity if **x** is a positive or negative infinity. - -## fabsf\(\) - -``` -float fabsf (float x) -``` - - **Description:** - -Calculates the absolute value of the float value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value.
- -**Returns:** - -Returns the absolute value of **x** if the operation is successful; returns a NaN value if **x** is a NaN value; returns **+0** if **x** is **-0**; returns a positive infinity if **x** is a positive or negative infinity. - -## fabsl\(\) - -``` -long double fabsl (long double x) -``` - - **Description:** - -Calculates the absolute value of the long double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value.
- -**Returns:** - -Returns the absolute value of **x** if the operation is successful; returns a NaN value if **x** is a NaN value; returns **+0** if **x** is **-0**; returns a positive infinity if **x** is a positive or negative infinity. - -## fdim\(\) - -``` -double fdim (double x, double y ) -``` - - **Description:** - -Calculates the positive difference between the double value **x** and **y**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value x.
yIndicates the double value y.
- -**Returns:** - -Returns the positive difference between **x** and **y**. - -## fdimf\(\) - -``` -float fdimf (float x, float y ) -``` - - **Description:** - -Calculates the positive difference between the float value **x** and **y**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value x.
yIndicates the float value y.
- -**Returns:** - -Returns the positive difference between **x** and **y**. - -## fdiml\(\) - -``` -long double fdiml (long double x, long double y ) -``` - - **Description:** - -Calculates the positive difference between the long double value **x** and **y**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value x.
yIndicates the long double value y.
- -**Returns:** - -Returns the positive difference between **x** and **y**. - -## finite\(\) - -``` -int finite (double x) -``` - - **Description:** - -Checks whether the double value **x** is an infinity or a NaN value. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value to check.
- -**Returns:** - -Returns **0** if **x** is an infinity or a NaN value; returns **1** otherwise. - -## finitef\(\) - -``` -int finitef (float x) -``` - - **Description:** - -Checks whether the float value **x** is an infinity or a NaN value. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value to check.
- -**Returns:** - -Returns **0** if **x** is an infinity or a NaN value; returns **1** otherwise. - -## floor\(\) - -``` -double floor (double x) -``` - - **Description:** - -Obtains the largest integer less than or equal to the double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value x to compare with.
- -**Returns:** - -Returns the largest integer less than or equal to **x**. - -## floorf\(\) - -``` -float floorf (float x) -``` - - **Description:** - -Obtains the largest integer less than or equal to the float value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value x to compare with.
- -**Returns:** - -Returns the largest integer less than or equal to **x**. - -## floorl\(\) - -``` -long double floorl (long double x) -``` - - **Description:** - -Obtains the largest integer less than or equal to the long double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value x to compare with.
- -**Returns:** - -Returns the largest integer less than or equal to **x**. - -## fma\(\) - -``` -double fma (double x, double y, double z ) -``` - - **Description:** - -Calculates the value of **x\*y+z** and rounds the result up. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value x.
yIndicates the double value y.
zIndicates the double value z.
- -**Attention:** - -The rounding mode is the same as that set in the system. - -**Returns:** - -Returns the calculation result. - -## fmaf\(\) - -``` -float fmaf (float x, float y, float z ) -``` - - **Description:** - -Calculates the value of **x\*y+z** and rounds the result up. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value x.
yIndicates the float value y.
zIndicates the float value z.
- -**Attention:** - -The rounding mode is the same as that set in the system. - -**Returns:** - -Returns the calculation result. - -## fmal\(\) - -``` -long double fmal (long double x, long double y, long double z ) -``` - - **Description:** - -Calculates the value of **x\*y+z** and rounds the result up. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value x.
yIndicates the long double value y.
zIndicates the long double value z.
- -**Attention:** - -The rounding mode is the same as that set in the system. - -**Returns:** - -Returns the calculation result. - -## fmax\(\) - -``` -double fmax (double x, double y ) -``` - - **Description:** - -Obtains the larger value of two double values **x** and **y**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value x.
yIndicates the double value y.
- -**Returns:** - -Returns the larger value. - -## fmaxf\(\) - -``` -float fmaxf (float x, float y ) -``` - - **Description:** - -Obtains the larger value of two float values **x** and **y**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value x.
yIndicates the float value y.
- -**Returns:** - -Returns the larger value. - -## fmaxl\(\) - -``` -long double fmaxl (long double x, long double y ) -``` - - **Description:** - -Obtains the larger value of two long double values **x** and **y**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value x.
yIndicates the long double value y.
- -**Returns:** - -Returns the larger value. - -## fmin\(\) - -``` -double fmin (double x, double y ) -``` - - **Description:** - -Obtains the smaller value of two double values **x** and **y**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value x.
yIndicates the double value y.
- -**Returns:** - -Returns the smaller value. - -## fminf\(\) - -``` -float fminf (float x, float y ) -``` - - **Description:** - -Obtains the smaller value of two float values **x** and **y**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value x.
yIndicates the float value y.
- -**Returns:** - -Returns the smaller value. - -## fminl\(\) - -``` -long double fminl (long double x, long double y ) -``` - - **Description:** - -Obtains the smaller value of two long double values **x** and **y**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value x.
yIndicates the long double value y.
- -**Returns:** - -Returns the smaller value. - -## fmod\(\) - -``` -double fmod (double x, double y ) -``` - - **Description:** - -Calculates the remainder of the double value **x** divided by the double value **y**. - - - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value x, which is used as the numerator.
yIndicates the double value y, which is used as the denominator.
- -**Returns:** - -Returns the remainder. - -## fmodf\(\) - -``` -float fmodf (float x, float y ) -``` - - **Description:** - -Calculates the remainder of the float value **x** divided by the float value **y**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value x, which is used as the numerator.
yIndicates the float value y, which is used as the denominator.
- -**Returns:** - -Returns the remainder. - -## fmodl\(\) - -``` -long double fmodl (long double x, long double y ) -``` - - **Description:** - -Calculates the remainder of the long double value **x** divided by the long double value **y**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value x, which is used as the numerator.
yIndicates the long double value y, which is used as the denominator.
- -**Returns:** - -Returns the remainder. - -## frexp\(\) - -``` -double frexp (double x, int * exp ) -``` - - **Description:** - -Decomposes the double value **x** into a significand and an integral exponent for 2. - -The absolute value of the significand ranges from 0.5 \(included\) to 1 \(excluded\). x = significand \* 2^exponent - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value x to decompose.
expIndicates the pointer to the exponent.
- -**Returns:** - -Returns the binary significand of **x** if the operation is successful; returns **0** if **x** is **0** \(**exp** is also **0**\); returns a NaN value if **x** is a NaN value \(**exp** is not specified\); returns a positive or negative infinity if **x** is a positive or negative infinity, respectively \(**exp** is not specified\). - -## frexpf\(\) - -``` -float frexpf (float x, int * exp ) -``` - - **Description:** - -Decomposes float value **x** into a binary significand and an integral exponent for 2. - -The absolute value of the significand ranges from 0.5 \(included\) to 1 \(excluded\). x = significand \* 2^exponent - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value to decompose.
expIndicates the pointer to an integer where the exponent is stored.
- -**Returns:** - -Returns the binary significand of **x** if the operation is successful; returns **0** if **x** is **0** \(**exp** is also **0**\); returns a NaN value if **x** is a NaN value \(**exp** is not specified\); returns a positive or negative infinity if **x** is a positive or negative infinity \(**exp** is not specified\). - -## frexpl\(\) - -``` -long double frexpl (long double x, int * exp ) -``` - - **Description:** - -Decomposes long double value **x** into a binary significand and an integral exponent for 2. - -The absolute value of the significand ranges from 0.5 \(included\) to 1 \(excluded\). x = significand \* 2^exponent - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value to decompose.
expIndicates the pointer to an integer where the exponent is stored.
- -**Returns:** - -Returns the binary significand of **x** if the operation is successful; returns **0** if **x** is **0** \(**exp** is also **0**\); returns a NaN value if **x** is a NaN value \(**exp** is not specified\); returns a positive or negative infinity if **x** is a positive or negative infinity \(**exp** is not specified\). - -## hypot\(\) - -``` -double hypot (double x, double y ) -``` - - **Description:** - -Calculates the hypotenuse of a right triangle whose legs are **x** and **y**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the length of one side of the right triangle, represented using a double value.
yIndicates the length of the other side of the right triangle, represented using a double value.
- -**Returns:** - -Returns the hypotenuse of the right triangle. - -## hypotf\(\) - -``` -float hypotf (float x, float y ) -``` - - **Description:** - -Calculates the hypotenuse of a right triangle whose legs are **x** and **y**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the length of one side of the right triangle, represented using a float value.
yIndicates the length of the other side of the right triangle, represented using a float value.
- -**Returns:** - -Returns the hypotenuse of the right triangle. - -## hypotl\(\) - -``` -long double hypotl (long double x, long double y ) -``` - - **Description:** - -Calculates the hypotenuse of a right triangle whose legs are **x** and **y**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the length of one side of the right triangle, represented using a long double value.
yIndicates the length of the other side of the right triangle, represented using a long double value.
- -**Returns:** - -Returns the hypotenuse of the right triangle. - -## ilogb\(\) - -``` -int ilogb (double x) -``` - - **Description:** - -Obtains the integral part of the logarithm of double value **x**. - -**FLT\_RADIX** is used as the base for the logarithm. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value.
- -**Returns:** - -Returns the integral part of the logarithm of **x** if the operation is successful. If **x** is **0**, this function returns [FP\_ILOGB0](MATH.md#ga9ec0e31304d15c42262b2c4a3b58443c) and reports a domain error. If **x** is a NaN value, this function returns [FP\_ILOGBNAN](MATH.md#ga01e2e5be97c739a5bdcbc619b44f9742) and reports a domain error. If **x** is positive or negative infinity, this function returns [INT\_MAX](UTILS.md#ga9ec306f36d50c7375e74f0d1c55a3a67) and reports a domain error. - -## ilogbf\(\) - -``` -int ilogbf (float x) -``` - - **Description:** - -Obtains the integral part of the logarithm of float value **x**. - -**FLT\_RADIX** is used as the base for the logarithm. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value.
- -**Returns:** - -Returns the integral part of the logarithm of **x** if the operation is successful. If **x** is **0**, this function returns [FP\_ILOGB0](MATH.md#ga9ec0e31304d15c42262b2c4a3b58443c) and reports a domain error. If **x** is a NaN value, this function returns [FP\_ILOGBNAN](MATH.md#ga01e2e5be97c739a5bdcbc619b44f9742) and reports a domain error. If **x** is positive or negative infinity, this function returns [INT\_MAX](UTILS.md#ga9ec306f36d50c7375e74f0d1c55a3a67) and reports a domain error. - -## ilogbl\(\) - -``` -int ilogbl (long double x) -``` - - **Description:** - -Obtains the integral part of the logarithm of the long double value **x**. - -**FLT\_RADIX** is used as the base for the logarithm. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value.
- -**Returns:** - -Returns the integral part of the logarithm of **x** if the operation is successful. If **x** is **0**, this function returns [FP\_ILOGB0](MATH.md#ga9ec0e31304d15c42262b2c4a3b58443c) and reports a domain error. If **x** is a NaN value, this function returns [FP\_ILOGBNAN](MATH.md#ga01e2e5be97c739a5bdcbc619b44f9742) and reports a domain error. If **x** is positive or negative infinity, this function returns [INT\_MAX](UTILS.md#ga9ec306f36d50c7375e74f0d1c55a3a67) and reports a domain error. - -## j0\(\) - -``` -double j0 (double x) -``` - - **Description:** - -Calculates the Bessel function of the first kind of order **0** for the double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value.
- -**Returns:** - -Returns the Bessel function of the first kind of order **0** for **x** if the operation is successful; returns a NaN value if **x** is a NaN value; returns **0** and sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca) if **x** is too large or an overflow range error occurs. - -## j0f\(\) - -``` -float j0f (float x) -``` - - **Description:** - -Calculates the Bessel function of the first kind of order **0** for the float value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value.
- -**Returns:** - -Returns the calculation result if the operation is successful; returns a NaN value if **x** is a NaN value; returns **0** and sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca) if **x** is too large or an overflow range error occurs. - -## j1\(\) - -``` -double j1 (double x) -``` - - **Description:** - -Calculates the Bessel function of the first kind of order **1** for the double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value.
- -**Returns:** - -Returns the Bessel function of the first kind of order **1** for **x** if the operation is successful; returns a NaN value if **x** is a NaN value; returns **0** and sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca) if **x** is too large or an overflow range error occurs. - -## j1f\(\) - -``` -float j1f (float x) -``` - - **Description:** - -Calculates the Bessel function of the first kind of order **1** for the float value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value.
- -**Returns:** - -Returns the calculation result if the operation is successful; returns a NaN value if **x** is a NaN value; returns **0** and sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca) if **x** is too large or an overflow range error occurs. - -## jn\(\) - -``` -double jn (int n, double x ) -``` - - **Description:** - -Calculates the Bessel function of the first kind of order **n** for the double value **x**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
nIndicates the order of the Bessel function of the first kind.
xIndicates the double value.
- -**Returns:** - -Returns the Bessel function of the first kind of order **n** for **x** if the operation is successful; returns a NaN value if **x** is a NaN value; returns **0** and sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca) if **x** is too large or an overflow range error occurs. - -## jnf\(\) - -``` -float jnf (int n, float x ) -``` - - **Description:** - -Calculates the Bessel function of the first kind of order **n** for the float value **x**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
nIndicates the order of the Bessel function of the first kind.
xIndicates the float value.
- -**Returns:** - -Returns the calculation result if the operation is successful; returns a NaN value if **x** is a NaN value; returns **0** and sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca) if **x** is too large or an overflow range error occurs. - -## ldexp\(\) - -``` -double ldexp (double x, int exp ) -``` - - **Description:** - -Multiplies the double value **x** by 2 raised to the power of **exp**. - -The calculation formula is x\*2^exp. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value.
expIndicates the exponent.
- -**Returns:** - -Returns the calculation result. - -## ldexpf\(\) - -``` -float ldexpf (float x, int exp ) -``` - - **Description:** - -Multiplies the float value **x** by 2 raised to the power of **exp**. - -The calculation formula is x\*2^exp. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value.
expIndicates the exponent.
- -**Returns:** - -Returns the calculation result. - -## ldexpl\(\) - -``` -long double ldexpl (long double x, int exp ) -``` - - **Description:** - -Multiplies the long double value **x** by 2 raised to the power of **exp**. - -The calculation formula is x\*2^exp. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value.
expIndicates the exponent.
- -**Returns:** - -Returns the calculation result. - -## lgamma\(\) - -``` -double lgamma (double x) -``` - - **Description:** - -Calculates the natural logarithm of the absolute value of the gamma function of the double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value.
- -**Returns:** - -Returns the calculation result if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is **1** or **2**, this function returns **+0**. If **x** is a positive or negative infinity, this function returns a positive infinity. If **x** is **0** or a negative value, this function returns one of +[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971), reports a pole error, and sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca)\). If an overflow range error occurs, this function returns one of [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) \* and sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca). - -## lgammaf\(\) - -``` -float lgammaf (float x) -``` - - **Description:** - -Calculates the natural logarithm of the absolute value of the gamma function of the float value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value.
- -**Returns:** - -Returns the calculation result if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is **1** or **2**, this function returns **+0**. If **x** is a positive or negative infinity, this function returns a positive infinity. If **x** is **0** or a negative value, this function returns one of +[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359), reports a pole error, and sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca). If an overflow range error occurs, this function returns one of [HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) and sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca). - -## lgammal\(\) - -``` -long double lgammal (long double x) -``` - - **Description:** - -Calculates the natural logarithm of the absolute value of the gamma function of the long double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value.
- -**Returns:** - -Returns the calculation result if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is **1** or **2**, this function returns **+0**. If **x** is a positive or negative infinity, this function returns a positive infinity. If **x** is **0** or a negative value, this function returns one of +[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182), reports a pole error, and sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca). If an overflow range error occurs, this function returns one of [HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) and sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca). - -## lgammal\_r\(\) - -``` -long double lgammal_r (long double x, int * signp ) -``` - - **Description:** - -Calculates the natural logarithm of the absolute value of the gamma function of the double value **x**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value.
signpreturn value of sign.
- -**Returns:** - -Returns the calculation result if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is **1** or **2**, this function returns **+0**. If **x** is a positive or negative infinity, this function returns a positive infinity. If **x** is **0** or a negative value, this function returns one of +[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971), reports a pole error, and sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca)\). If an overflow range error occurs, this function returns one of [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) \* and sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca). - -## llrint\(\) - -``` -long long int llrint (double x) -``` - - **Description:** - -Rounds double value **x** to the nearest integer. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value to round.
- -**Attention:** - -The type of **x**, rounding mode, and rounding direction are specified by **fegetround**. - -**Returns:** - -Returns the nearest integer if the operation is successful; returns an unspecified value if **x** is a NaN value or an infinity, or the rounded value is outside the specified range, in which case a domain error or overflow range error occurs. - -## llrintf\(\) - -``` -long long int llrintf (float x) -``` - - **Description:** - -Rounds float value **x** to the nearest integer. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value.
- -**Attention:** - -The type of **x**, rounding mode, and rounding direction are specified by **fegetround**. - -**Returns:** - -Returns the nearest integer if the operation is successful; returns an unspecified value if **x** is a NaN value or an infinity, or the rounded value is outside the specified range, in which case a domain error or overflow range error occurs. - -## llrintl\(\) - -``` -long long int llrintl (long double x) -``` - - **Description:** - -Rounds long double value **x** to the nearest integer. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value.
- -**Attention:** - -The type of **x**, rounding mode, and rounding direction are specified by **fegetround**. - -**Returns:** - -Returns the nearest integer if the operation is successful; returns an unspecified value if **x** is a NaN value or an infinity, or the rounded value is outside the specified range, in which case a domain error or overflow range error occurs. - -## llround\(\) - -``` -long long int llround (double x) -``` - - **Description:** - -Rounds double value **x** to the nearest integer, rounding away from **0**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value.
- -**Attention:** - -Halfway values are rounded away from **0**. - -**Returns:** - -Returns the nearest integer if the operation is successful; returns an unspecified value if **x** is a NaN value or an infinity, or the rounded value is outside the specified range, in which case a domain error or overflow range error occurs. - -## llroundf\(\) - -``` -long long int llroundf (float x) -``` - - **Description:** - -Rounds float value **x** to the nearest integer, rounding away from **0**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value.
- -**Attention:** - -Halfway values are rounded away from **0**. - -**Returns:** - -Returns the nearest integer if the operation is successful; returns an unspecified value if **x** is a NaN value or an infinity, or the rounded value is outside the specified range, in which case a domain error or overflow range error occurs. - -## llroundl\(\) - -``` -long long int llroundl (long double x) -``` - - **Description:** - -Rounds long double value **x** to the nearest integer, rounding away from **0**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value.
- -**Attention:** - -Halfway values are rounded away from **0**. - -**Returns:** - -Returns the nearest integer if the operation is successful; returns an unspecified value if **x** is a NaN value or an infinity, or the rounded value is outside the specified range, in which case a domain error or overflow range error occurs. - -## log\(\) - -``` -double log (double x) -``` - - **Description:** - -Calculates the natural logarithm of the double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value.
- -**Returns:** - -Returns the natural logarithm of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is a positive infinity, this function returns a positive infinity. If **x** is **0**, this function returns **-[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971)**, reports a pole error, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a negative value \(including a negative infinity\), this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_DIVBYZERO](MATH.md#gab1317930189d1a14841893fb4bd9b5a0) exception. - -## log10\(\) - -``` -double log10 (double x) -``` - - **Description:** - -Calculates the common logarithm \(logarithm with base 10\) of the double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value.
- -**Returns:** - -Returns the natural logarithm of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is a positive infinity, this function returns a positive infinity. If **x** is **0**, this function returns **-[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971)**, reports a pole error, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a negative value \(including a negative infinity\), this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_DIVBYZERO](MATH.md#gab1317930189d1a14841893fb4bd9b5a0) exception. - -## log10f\(\) - -``` -float log10f (float x) -``` - - **Description:** - -Calculates the common logarithm \(logarithm with base 10\) of the float value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value.
- -**Returns:** - -Returns the natural logarithm of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is a positive infinity, this function returns a positive infinity. If **x** is **0**, this function returns **-[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359)**, reports a pole error, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a negative value \(including a negative infinity\), this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_DIVBYZERO](MATH.md#gab1317930189d1a14841893fb4bd9b5a0) exception. - -## log10l\(\) - -``` -long double log10l (long double x) -``` - - **Description:** - -Calculates the common logarithm \(logarithm with base 10\) of the long double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value.
- -**Returns:** - -Returns the natural logarithm of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is a positive infinity, this function returns a positive infinity. If **x** is **0**, this function returns **-[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182)**, reports a pole error, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a negative value \(including a negative infinity\), this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_DIVBYZERO](MATH.md#gab1317930189d1a14841893fb4bd9b5a0) exception. - -## log1p\(\) - -``` -double log1p (double x) -``` - - **Description:** - -Calculates the natural logarithm of one plus the double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value.
- -**Returns:** - -Returns the natural logarithm of one plus **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is a positive infinity, this function returns a positive infinity. If **x** is **-1**, this function returns **-[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971)**, reports a pole error, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is less than **-1** \(including a negative infinity\), this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_DIVBYZERO](MATH.md#gab1317930189d1a14841893fb4bd9b5a0) exception. - -## log1pf\(\) - -``` -float log1pf (float x) -``` - - **Description:** - -Calculates the natural logarithm of one plus the float value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value.
- -**Returns:** - -Returns the natural logarithm of one plus **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is a positive infinity, this function returns a positive infinity. If **x** is **-1**, this function returns **-[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359)**, reports a pole error, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is less than **-1** \(including a negative infinity\), this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_DIVBYZERO](MATH.md#gab1317930189d1a14841893fb4bd9b5a0) exception. - -## log1pl\(\) - -``` -long double log1pl (long double x) -``` - - **Description:** - -Calculates the natural logarithm of one plus the long double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value.
- -**Returns:** - -Returns the natural logarithm of one plus **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is a positive infinity, this function returns a positive infinity. If **x** is **-1**, this function returns **-[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182)**, reports a pole error, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is less than **-1** \(including a negative infinity\), this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_DIVBYZERO](MATH.md#gab1317930189d1a14841893fb4bd9b5a0) exception. - -## log2\(\) - -``` -double log2 (double x) -``` - - **Description:** - -Calculates the binary logarithm \(logarithm with base 2\) of the double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value.
- -**Returns:** - -Returns the binary logarithm of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is a positive infinity, this function returns a positive infinity. If **x** is **0**, this function returns **-[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971)**, reports a pole error, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a negative value \(including a negative infinity\), this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_DIVBYZERO](MATH.md#gab1317930189d1a14841893fb4bd9b5a0) exception. - -## log2f\(\) - -``` -float log2f (float x) -``` - - **Description:** - -Calculates the binary logarithm \(logarithm with base 2\) of the float value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value.
- -**Returns:** - -Returns the binary logarithm of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is a positive infinity, this function returns a positive infinity. If **x** is **0**, this function returns **-[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359)**, reports a pole error, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a negative value \(including a negative infinity\), this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_DIVBYZERO](MATH.md#gab1317930189d1a14841893fb4bd9b5a0) exception. - -## log2l\(\) - -``` -long double log2l (long double x) -``` - - **Description:** - -Calculates the binary logarithm \(logarithm with base 2\) of the long double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value.
- -**Returns:** - -Returns the binary \(base-2\) logarithm of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is a positive infinity, this function returns a positive infinity. If **x** is **0**, this function returns **-[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182)**, reports a pole error, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a negative value \(including a negative infinity\), this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_DIVBYZERO](MATH.md#gab1317930189d1a14841893fb4bd9b5a0) exception. - -## logb\(\) - -``` -double logb (double x) -``` - - **Description:** - -Calculates the logarithm of the absolute value of the double value **x**. - -**FLT\_RADIX** is used as the base for the logarithm. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value.
- -**Attention:** - -Set **FLT\_RADIX** to **2** in the **float.h** file. - -**Returns:** - -Returns the logarithm of the absolute value of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is a positive or negative infinity, this function returns a positive or negative infinity. If **x** is **0**, this function returns **-[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971)**, reports a pole error, and throws the [FE\_DIVBYZERO](MATH.md#gab1317930189d1a14841893fb4bd9b5a0) exception. - -## logbf\(\) - -``` -float logbf (float x) -``` - - **Description:** - -Calculates the logarithm of the absolute value of the float value **x**. - -**FLT\_RADIX** is used as the base for the logarithm. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value.
- -**Attention:** - -Set **FLT\_RADIX** to **2** in the **float.h** file. - -**Returns:** - -Returns the logarithm of the absolute value of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is a positive or negative infinity, this function returns a positive or negative infinity. If **x** is **0**, this function returns **-[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359)**, reports a pole error, and throws the [FE\_DIVBYZERO](MATH.md#gab1317930189d1a14841893fb4bd9b5a0) exception. - -## logbl\(\) - -``` -long double logbl (long double x) -``` - - **Description:** - -Calculates the logarithm of the absolute value of the long double value **x**. - -**FLT\_RADIX** is used as the base for the logarithm. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value.
- -**Attention:** - -Set **FLT\_RADIX** to **2** in the **float.h** file. - -**Returns:** - -Returns the logarithm of the absolute value of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is a positive or negative infinity, this function returns a positive or negative infinity. If **x** is **0**, this function returns **-[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182)**, reports a pole error, and throws the [FE\_DIVBYZERO](MATH.md#gab1317930189d1a14841893fb4bd9b5a0) exception. - -## logf\(\) - -``` -float logf (float x) -``` - - **Description:** - -Calculates the natural logarithm of the float value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value.
- -**Returns:** - -Returns the natural logarithm of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is a positive infinity, this function returns a positive infinity. If **x** is **0**, this function returns **-[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359)**, reports a pole error, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a negative value \(including a negative infinity\), this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_DIVBYZERO](MATH.md#gab1317930189d1a14841893fb4bd9b5a0) exception. - -## logl\(\) - -``` -long double logl (long double x) -``` - - **Description:** - -Calculates the natural logarithm of the long double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value.
- -**Returns:** - -Returns the natural logarithm of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is a positive infinity, this function returns a positive infinity. If **x** is **0**, this function returns **-[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182)**, reports a pole error, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is a negative value \(including a negative infinity\), this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_DIVBYZERO](MATH.md#gab1317930189d1a14841893fb4bd9b5a0) exception. - -## lrint\(\) - -``` -long int lrint (double x) -``` - - **Description:** - -Rounds the double value **x** to the nearest integer. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value to round.
- -**Attention:** - -The type of **x**, rounding mode, and rounding direction are specified by **fegetround**. - -**Returns:** - -Returns the nearest integer if the operation is successful; returns an unspecified value if **x** is a NaN value or an infinity, or the rounded value is outside the specified range, in which case a domain error or overflow range error occurs. - -## lrintf\(\) - -``` -long int lrintf (float x) -``` - - **Description:** - -Rounds the float value **x** to the nearest integer. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value to round.
- -**Attention:** - -The type of **x**, rounding mode, and rounding direction are specified by **fegetround**. - -**Returns:** - -Returns the nearest integer if the operation is successful; returns an unspecified value if **x** is a NaN value or an infinity, or the rounded value is outside the specified range, in which case a domain error or overflow range error occurs. - -## lrintl\(\) - -``` -long int lrintl (long double x) -``` - - **Description:** - -Rounds the long double value **x** to the nearest integer. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value.
- -**Attention:** - -The type of **x**, rounding mode, and rounding direction are specified by **fegetround**. - -**Returns:** - -Returns the nearest integer if the operation is successful; returns an unspecified value if **x** is a NaN value or an infinity, or the rounded value is outside the specified range, in which case a domain error or overflow range error occurs. - -## lround\(\) - -``` -long int lround (double x) -``` - - **Description:** - -Rounds double value **x** to the nearest integer, rounding away from **0**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value to round.
- -**Attention:** - -Halfway values are rounded away from **0**. - -**Returns:** - -Returns the nearest integer if the operation is successful; returns an unspecified value if **x** is a NaN value or an infinity, or the rounded value is outside the specified range, in which case a domain error or overflow range error occurs. - -## lroundf\(\) - -``` -long int lroundf (float x) -``` - - **Description:** - -Rounds the float value **x** to the nearest integer, rounding away from **0**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value to round.
- -**Attention:** - -Halfway values are rounded away from **0**. - -**Returns:** - -Returns the nearest integer if the operation is successful; returns an unspecified value if **x** is a NaN value or an infinity, or the rounded value is outside the specified range, in which case a domain error or overflow range error occurs. - -## lroundl\(\) - -``` -long int lroundl (long double x) -``` - - **Description:** - -Rounds the long double value **x** to the nearest integer, rounding away from **0**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value to round.
- -**Attention:** - -Halfway values are rounded away from **0**. - -**Returns:** - -Returns the nearest integer if the operation is successful; returns an unspecified value if **x** is a NaN value or an infinity, or the rounded value is outside the specified range, in which case a domain error or overflow range error occurs. - -## modf\(\) - -``` -double modf (double x, double * iptr ) -``` - - **Description:** - -Breaks the double value **x** into a signed integral and a fractional part. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value x.
iptrIndicates the pointer to the object where the signed integral part is stored.
- -**Returns:** - -Returns the fractional part of **x**. - -## modff\(\) - -``` -float modff (float x, float * iptr ) -``` - - **Description:** - -Breaks the float value **x** into a signed integral and a fractional part. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value x.
iptrIndicates the pointer to the object where the signed integral part is stored.
- -**Returns:** - -Returns the fractional part of **x**. - -## modfl\(\) - -``` -long double modfl (long double x, long double * iptr ) -``` - - **Description:** - -Breaks the long double value **x** into a signed integral and a fractional part. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value x.
iptrIndicates the pointer to the object where the signed integral part is stored.
- -**Returns:** - -Returns the fractional part of **x**. - -## nan\(\) - -``` -double nan (const char * tagp) -``` - - **Description:** - -Obtains a quiet NaN value of the double type. - -This function checks whether the input parameter is a NaN value and converts it to the double type. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
tagpIndicates the pointer to a character constant.
- -**Returns:** - -Returns a quiet NaN value if the operation is successful; returns a NaN value otherwise. - -## nanf\(\) - -``` -float nanf (const char * tagp) -``` - - **Description:** - -Obtains a quiet NaN value of the float type. - -This function checks whether the input parameter is a NaN value and converts it to the float type. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
tagpIndicates the pointer to a character constant.
- -**Returns:** - -Returns a quiet NaN value if the operation is successful; returns a NaN value otherwise. - -## nanl\(\) - -``` -long double nanl (const char * tagp) -``` - - **Description:** - -Obtains a quiet NaN value of the long double type. - -This function checks whether the input parameter is a NaN value and converts it to the long double type. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
tagpIndicates the pointer to a character constant.
- -**Returns:** - -Returns a quiet NaN value if the operation is successful; returns a NaN value otherwise. - -## nearbyint\(\) - -``` -double nearbyint (double x) -``` - - **Description:** - -Rounds the double value **x** to an integer in floating-point format. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value x.
- -**Attention:** - -The rounding mode is specified by **fegetround**. - -**Returns:** - -Returns the rounded value. - -## nearbyintf\(\) - -``` -float nearbyintf (float x) -``` - - **Description:** - -Rounds the float value **x** to an integer in floating-point format. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value x.
- -**Attention:** - -The rounding mode is specified by **fegetround**. - -**Returns:** - -Returns the rounded value. - -## nearbyintl\(\) - -``` -long double nearbyintl (long double x) -``` - - **Description:** - -Rounds the long double value **x** to an integer in floating-point format. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value.
- -**Attention:** - -The rounding mode is specified by **fegetround**. - -**Returns:** - -Returns the rounded value. - -## nextafter\(\) - -``` -double nextafter (double x, double y ) -``` - - **Description:** - -Obtains the next representable value following the double value **x** in the direction of the double value **y**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value x.
yIndicates the double value y.
- -**Attention:** - -If **y** is less than **x**, this function returns the maximum representable value less than **x**. - -**Returns:** - -Returns the next representable value after **x** in the direction of **y** if the operation is successful; returns the passed **y** if **x** is equal to **y**; returns a NaN value if **x** is a NaN value; returns [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) and reports an overflow range error if **x** is a finite value. - -## nextafterf\(\) - -``` -float nextafterf (float x, float y ) -``` - - **Description:** - -Obtains the next representable value following the float value **x** in the direction of the float value **y**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value x.
yIndicates the float value y.
- -**Attention:** - -If **y** is less than **x**, this function returns the maximum representable value less than **x**. - -**Returns:** - -Returns the next representable value following **x** in the direction of **y** if the operation is successful; returns the passed **y** if **x** is equal to **y**; returns a NaN value if **x** is a NaN value; returns [HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) and reports an overflow range error if **x** is a finite value. - -## nextafterl\(\) - -``` -long double nextafterl (long double x, long double y ) -``` - - **Description:** - -Obtains the next representable value following the long double value **x** in the direction of the long double value **y**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value x.
yIndicates the long double value y.
- -**Attention:** - -If **y** is less than **x**, this function returns the maximum representable value less than **x**. - -**Returns:** - -Returns the next representable value after **x** in the direction of **y** if the operation is successful; returns the passed **y** if **x** is equal to **y**; returns a NaN value if **x** is a NaN value; returns [HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) and reports an overflow range error if **x** is a finite value. - -## nexttoward\(\) - -``` -double nexttoward (double x, long double y ) -``` - - **Description:** - -Obtains the next representable value following the double value **x** in the direction of the long double value **y**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value x.
yIndicates the long double value y.
- -**Attention:** - -If **y** is less than **x**, this function returns the maximum representable value less than **x**. - -**Returns:** - -Returns the next representable value following **x** in the direction of **y** if the operation is successful; returns the passed **y** if **x** is equal to **y**; returns a NaN value if **x** is a NaN value; returns [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) and reports an overflow range error if **x** is a finite value. - -## nexttowardf\(\) - -``` -float nexttowardf (float x, long double y ) -``` - - **Description:** - -Obtains the next representable value following the float value **x** in the direction of the long double value **y**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value x.
yIndicates the long double value y.
- -**Attention:** - -If **y** is less than **x**, this function returns the maximum representable value less than **x**. - -**Returns:** - -Returns the next representable value after **x** in the direction of **y** if the operation is successful; returns the passed **y** if **x** is equal to **y**; returns a NaN value if **x** is a NaN value; returns [HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) and reports an overflow range error if **x** is a finite value. - -## nexttowardl\(\) - -``` -long double nexttowardl (long double x, long double y ) -``` - - **Description:** - -Obtains the next representable value following the long double value **x** in the direction of the long double value **y**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value x.
yIndicates the long double value y.
- -**Attention:** - -If **y** is less than **x**, this function returns the maximum representable value less than **x**. - -**Returns:** - -Returns the next representable value following **x** in the direction of **y** if the operation is successful; returns the passed **y** if **x** is equal to **y**; returns a NaN value if **x** is a NaN value; returns [HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) and reports an overflow range error if **x** is a finite value. - -## pow\(\) - -``` -double pow (double x, double y ) -``` - - **Description:** - -Obtains the double value **x** raised to the power of the double value **y**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value x, which is used as the base.
yIndicates the double value y, which is used as the exponent.
- -**Returns:** - -Returns the calculation result if the operation is successful. If **x** or **y** is a NaN value, this returns a NaN value, except as specified below. If **x** is **+1** \(even if **y** is a NaN value\), this function returns **1.0**. If **y** is **0** \(even if **x** is a NaN value\), this function returns **1.0**. If **x** is **+0** or **-0**, and **y** is an odd integer greater than **0**, this function returns **+0** or **-0**. If **x** is **0** and **y** is greater than **0** and not an odd integer, this function returns **+0**. If **x** is **-1** and **y** is a positive or negative infinity, this function returns **1.0**. If the absolute value of **x** is less than **1** and **y** is a negative infinity, this function returns a positive infinity. If the absolute value of **x** is greater than **1** and **y** is a negative infinity, this function returns **+0**. If the absolute value of **x** is less than **1** and **y** is a positive infinity, this function returns **+0**. If the absolute value of **x** is greater than **1** and **y** is a positive infinity, this function returns a positive infinity. If **x** is a negative infinity and **y** is an odd integer less than **0**, this function returns **-0**. If **x** is a negative infinity and **y** is less than **0** and not an odd integer, this function returns **+0**. If **x** is a negative infinity and **y** is an odd integer greater than **0**, this function returns a negative infinity. If **x** is a negative infinity and **y** is greater than **0** and not an odd integer, this function returns a positive infinity. If **x** is a positive infinity and **y** is less than **0**, this function returns **+0**. If **x** is a positive infinity and **y** is greater than **0**, this function returns a positive infinity. If **x** is a negative value and **y** is a finite non-integer, this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is **+0** or **-0** and **y** is a negative odd integer, this function returns [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971), reports a pole error, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_DIVBYZERO](MATH.md#gab1317930189d1a14841893fb4bd9b5a0) exception. If **x** is **+0** or **-0** and **y** is a negative non-odd integer, this function returns **+[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971)**, reports a pole error, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_DIVBYZERO](MATH.md#gab1317930189d1a14841893fb4bd9b5a0) exception. If an overflow range error occurs, this function returns [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971), sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_OVERFLOW](MATH.md#gad373306add36e7227d9c9620b6962323) exception. If an underflow range error occurs, this function returns **0.0**, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_UNDERFLOW](MATH.md#ga57b80dfe7d5ce60c3c76e517fce89ffe) exception. - -## pow10\(\) - -``` -double pow10 (double x) -``` - - **Description:** - -Calculates the value of 10 raised to the power **x**, which is a double value. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value x.
- -**Returns:** - -Returns the value of 10 raised to the power **x** if the operation is successful. - -## pow10f\(\) - -``` -float pow10f (float x) -``` - - **Description:** - -Calculates the xth power of 10. - -Calculates the value of 10 raised to the power **x**, which is a float value. - -**ParametersParameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value x, which is used as the exponent.
xIndicates the float value x.
- -**Returns:** - -Returns the calculation result if the operation is successful. If y is 0 \(even if x is a NaN value\), this function returns 1.0. If an overflow range error occurs, this function returns [HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359), sets errno to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_OVERFLOW](MATH.md#gad373306add36e7227d9c9620b6962323) exception. If an underflow range error occurs, this function returns 0.0, sets errno to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_UNDERFLOW](MATH.md#ga57b80dfe7d5ce60c3c76e517fce89ffe) exception. - -**Returns:** - -Returns the value of 10 raised to the power **x** if the operation is successful. - -## pow10l\(\) - -``` -long double pow10l (long double x) -``` - - **Description:** - -Calculates the xth power of 10. - -Calculates the value of 10 raised to the power **x**, which is a long double value. - -**ParametersParameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value x, which is used as the exponent.
xIndicates the long double value x.
- -**Returns:** - -Returns the calculation result if the operation is successful. If x is 0, this function returns 1.0. If an overflow range error occurs, this function returns [HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182), sets errno to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_OVERFLOW](MATH.md#gad373306add36e7227d9c9620b6962323) exception. If an underflow range error occurs, this function returns 0.0, sets errno to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_UNDERFLOW](MATH.md#ga57b80dfe7d5ce60c3c76e517fce89ffe) exception. - -**Returns:** - -Returns the value of 10 raised to the power **x** if the operation is successful. - -## powf\(\) - -``` -float powf (float x, float y ) -``` - - **Description:** - -Obtains the float value **x** raised to the power of the float value **y**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value x, which is used as the base.
yIndicates the float value y, which is used as the exponent.
- -**Returns:** - -Returns the calculation result if the operation is successful. If **x** or **y** is a NaN value, this returns a NaN value, except as specified below. If **x** is **+1** \(even if **y** is a NaN value\), this function returns **1.0**. If **y** is **0** \(even if **x** is a NaN value\), this function returns **1.0**. If **x** is **+0** or **-0**, and **y** is an odd integer greater than **0**, this function returns **+0** or **-0**. If **x** is **0** and **y** is greater than **0** and not an odd integer, this function returns **+0**. If **x** is **-1** and **y** is a positive or negative infinity, this function returns **1.0**. If the absolute value of **x** is less than **1** and **y** is a negative infinity, this function returns a positive infinity. If the absolute value of **x** is greater than **1** and **y** is a negative infinity, this function returns **+0**. If the absolute value of **x** is less than **1** and **y** is a positive infinity, this function returns **+0**. If the absolute value of **x** is greater than **1** and **y** is a positive infinity, this function returns a positive infinity. If **x** is a negative infinity and **y** is an odd integer less than **0**, this function returns **-0**. If **x** is a negative infinity and **y** is less than **0** and not an odd integer, this function returns **+0**. If **x** is a negative infinity and **y** is an odd integer greater than **0**, this function returns a negative infinity. If **x** is a negative infinity and **y** is greater than **0** and not an odd integer, this function returns a positive infinity. If **x** is a positive infinity and **y** is less than **0**, this function returns **+0**. If **x** is a positive infinity and **y** is greater than **0**, this function returns a positive infinity. If **x** is a negative value and **y** is a finite non-integer, this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is **+0** or **-0** and **y** is a negative odd integer, this function returns [HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359), reports a pole error, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_DIVBYZERO](MATH.md#gab1317930189d1a14841893fb4bd9b5a0) exception. If **x** is **+0** or **-0** and **y** is a negative non-odd integer, this function returns **+[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359)**, reports a pole error, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_DIVBYZERO](MATH.md#gab1317930189d1a14841893fb4bd9b5a0) exception. If an overflow range error occurs, this function returns [HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359), sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_OVERFLOW](MATH.md#gad373306add36e7227d9c9620b6962323) exception. If an underflow range error occurs, this function returns **0.0**, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_UNDERFLOW](MATH.md#ga57b80dfe7d5ce60c3c76e517fce89ffe) exception. - -## powl\(\) - -``` -long double powl (long double x, long double y ) -``` - - **Description:** - -Obtains the long double value **x** raised to the power of the long double value **y**. - - - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value x, which is used as the base.
yIndicates the long double value y, which is used as the exponent.
- -**Returns:** - -Returns the calculation result if the operation is successful. If **x** or **y** is a NaN value, this returns a NaN value, except as specified below. If **x** is **+1** \(even if **y** is a NaN value\), this function returns **1.0**. If **y** is **0** \(even if **x** is a NaN value\), this function returns **1.0**. If **x** is **+0** or **-0**, and **y** is an odd integer greater than **0**, this function returns **+0** or **-0**. If **x** is **0** and **y** is greater than **0** and not an odd integer, this function returns **+0**. If **x** is **-1** and **y** is a positive or negative infinity, this function returns **1.0**. If the absolute value of **x** is less than **1** and **y** is a negative infinity, this function returns a positive infinity. If the absolute value of **x** is greater than **1** and **y** is a negative infinity, this function returns **+0**. If the absolute value of **x** is less than **1** and **y** is a positive infinity, this function returns **+0**. If the absolute value of **x** is greater than **1** and **y** is a positive infinity, this function returns a positive infinity. If **x** is a negative infinity and **y** is an odd integer less than **0**, this function returns **-0**. If **x** is a negative infinity and **y** is less than **0** and not an odd integer, this function returns **+0**. If **x** is a negative infinity and **y** is an odd integer greater than **0**, this function returns a negative infinity. If **x** is a negative infinity and **y** is greater than **0** and not an odd integer, this function returns a positive infinity. If **x** is a positive infinity and **y** is less than **0**, this function returns **+0**. If **x** is a positive infinity and **y** is greater than **0**, this function returns a positive infinity. If **x** is a negative value and **y** is a finite non-integer, this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is **+0** or **-0** and **y** is a negative odd integer, this function returns [HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182), reports a pole error, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_DIVBYZERO](MATH.md#gab1317930189d1a14841893fb4bd9b5a0) exception. If **x** is **+0** or **-0** and **y** is a negative non-odd integer, this function returns **+[HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182)**, reports a pole error, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_DIVBYZERO](MATH.md#gab1317930189d1a14841893fb4bd9b5a0) exception. If an overflow range error occurs, this function returns [HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182), sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_OVERFLOW](MATH.md#gad373306add36e7227d9c9620b6962323) exception. If an underflow range error occurs, this function returns **0.0**, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_UNDERFLOW](MATH.md#ga57b80dfe7d5ce60c3c76e517fce89ffe) exception. - -## remainder\(\) - -``` -double remainder (double x, double y ) -``` - - **Description:** - -Calculates the remainder of the double value **x** divided by the double value **y**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value x, which is used as the numerator.
yIndicates the double value y, which is used as the denominator.
- -**Attention:** - -The return value is **x-n\*y**, where **n** is the value of **x**/**y**, rounded toward the nearest integer \(with halfway values rounded toward the even number\). For example, if the decimal part of **x**/**y** is **0.5**, the value is rounded to an even number and **0** is returned. - -**Returns:** - -Returns the remainder if the operation is successful. If **x** or **y** is a NaN value, this function returns a NaN value. If **x** is an infinity and **y** is not a NaN value, this function returns a NaN value, reports a domain error, and throws the **FE\_INVAID** exception. If **y** is **0** and **x** is not a NaN value, this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the **FE\_INVAID** exception. - -## remainderf\(\) - -``` -float remainderf (float x, float y ) -``` - - **Description:** - -Calculates the remainder of the float value **x** divided by the float value **y**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value x, which is used as the numerator.
yIndicates the float value y, which is used as the denominator.
- -**Attention:** - -The return value is **x-n\*y**, where **n** is the value of **x**/**y**, rounded toward the nearest integer \(with halfway values rounded toward the even number\). For example, if the decimal part of **x**/**y** is **0.5**, the value is rounded to an even number and **0** is returned. - -**Returns:** - -Returns the remainder if the operation is successful. If **x** or **y** is a NaN value, this function returns a NaN value. If **x** is an infinity and **y** is not a NaN value, this function returns a NaN value, reports a domain error, and throws the **FE\_INVAID** exception. If **y** is **0** and **x** is not a NaN value, this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the **FE\_INVAID** exception. - -## remainderl\(\) - -``` -long double remainderl (long double x, long double y ) -``` - - **Description:** - -Calculates the remainder of the long double value **x** divided by the long double value **y**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value x, which is used as the numerator.
yIndicates the long double value y, which is used as the denominator.
- -**Attention:** - -The return value is **x-n\*y**, where **n** is the value of **x**/**y**, rounded toward the nearest integer \(with halfway values rounded toward the even number\). For example, if the decimal part of **x**/**y** is **0.5**, the value is rounded to an even number and **0** is returned. - -**Returns:** - -Returns the remainder if the operation is successful. If **x** or **y** is a NaN value, this function returns a NaN value. If **x** is an infinity and **y** is not a NaN value, this function returns a NaN value, reports a domain error, and throws the **FE\_INVAID** exception. If **y** is **0** and **x** is not a NaN value, this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the **FE\_INVAID** exception. - -## remquo\(\) - -``` -double remquo (double x, double y, int * quo ) -``` - - **Description:** - -Calculates the quotient and remainder of the double value **x** divided by the double value **y**. - -The return value is **x-n\*y**, where **n** is the value of **x**/**y**, rounded toward the nearest integer \(with halfway values rounded toward the even number\). For example, if the decimal part of **x**/**y** is **0.5**, the value is rounded to an even number and **0** is returned. **n** is converted into a signed binary number, and the sign and the least significant three bits of the binary number are combined and stored to the pointer specified by **quo**. For example, if **x** is **29.0** and **y** is **3.0**, the return value is **-1.0** and **n** is **10**. **n** is converted into a signed binary number **00001010**. Therefore, **2** is stored to the pointer specified by **quo**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value x, which is used as the numerator.
yIndicates the double value y, which is used as the denominator.
quoIndicates the pointer that stores the quotient.
- -**Returns:** - -Returns the remainder if the operation is successful. If **x** or **y** is a NaN value, this function returns a NaN value. If **x** is an infinity and **y** is not a NaN value, this function returns a NaN value, reports a domain error, and throws the **FE\_INVAID** exception. If **y** is **0** and **x** is not a NaN value, this function returns a NaN value, reports a domain error, and throws the **FE\_INVAID** exception. - -## remquof\(\) - -``` -float remquof (float x, float y, int * quo ) -``` - - **Description:** - -Calculates the quotient and remainder of the float value **x** divided by the float value **y**. - -The return value is **x-n\*y**, where **n** is the value of **x**/**y**, rounded toward the nearest integer \(with halfway values rounded toward the even number\). For example, if the decimal part of **x**/**y** is **0.5**, the value is rounded to an even number and **0** is returned. **n** is converted into a signed binary number, and the sign and the least significant three bits of the binary number are combined and stored to the pointer specified by **quo**. For example, if **x** is **29.0** and **y** is **3.0**, the return value is **-1.0** and **n** is **10**. **n** is converted into a signed binary number **00001010**. Therefore, **2** is stored to the pointer specified by **quo**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value x, which is used as the numerator.
yIndicates the float value y, which is used as the denominator.
quoIndicates the pointer that stores the quotient.
- -**Returns:** - -Returns the remainder if the operation is successful. If **x** or **y** is a NaN value, this function returns a NaN value. If **x** is an infinity and **y** is not a NaN value, this function returns a NaN value, reports a domain error, and throws the **FE\_INVAID** exception. If **y** is **0** and **x** is not a NaN value, this function returns a NaN value, reports a domain error, and throws the **FE\_INVAID** exception. - -## remquol\(\) - -``` -long double remquol (long double x, long double y, int * quo ) -``` - - **Description:** - -Calculates the quotient and remainder of the long double value **x** divided by the long double value **y**. - -The return value is **x-n\*y**, where **n** is the value of **x**/**y**, rounded toward the nearest integer \(with halfway values rounded toward the even number\). For example, if the decimal part of **x**/**y** is **0.5**, the value is rounded to an even number and **0** is returned. **n** is converted into a signed binary number, and the sign and the least significant three bits of the binary number are combined and stored to the pointer specified by **quo**. For example, if **x** is **29.0** and **y** is **3.0**, the return value is **-1.0** and **n** is **10**. **n** is converted into a signed binary number **00001010**. Therefore, **2** is stored to the pointer specified by **quo**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value x, which is used as the numerator.
yIndicates the long double value y, which is used as the denominator.
quoIndicates the pointer that stores the quotient.
- -**Returns:** - -Returns the remainder if the operation is successful. If **x** or **y** is a NaN value, this function returns a NaN value. If **x** is an infinity and **y** is not a NaN value, this function returns a NaN value, reports a domain error, and throws the **FE\_INVAID** exception. If **y** is **0** and **x** is not a NaN value, this function returns a NaN value, reports a domain error, and throws the **FE\_INVAID** exception. - -## rint\(\) - -``` -double rint (double x) -``` - - **Description:** - -Rounds the double value **x** to the nearest integer. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value.
- -**Attention:** - -POSIX.1-2001 records overflow range errors. If there are two nearest integers, the even integer is returned. For example, if **x** is **0.5**, **0** is returned. - -**Returns:** - -Returns the nearest integer if the operation is successful; returns the passed **x** if **x** is an integer, **+0**, **-0**, a NaN value, or an infinity. - -## rintf\(\) - -``` -float rintf (float x) -``` - - **Description:** - -Rounds the float value **x** to the nearest integer. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value.
- -**Attention:** - -POSIX.1-2001 records overflow range errors. If there are two nearest integers, the even integer is returned. For example, if **x** is **0.5**, **0** is returned. - -**Returns:** - -Returns the nearest integer if the operation is successful; returns the passed **x** if **x** is an integer, **+0**, **-0**, a NaN value, or an infinity. - -## rintl\(\) - -``` -long double rintl (long double x) -``` - - **Description:** - -Rounds the long double value **x** to the nearest integer. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value.
- -**Attention:** - -POSIX.1-2001 records overflow range errors. If there are two nearest integers, the even integer is returned. For example, if **x** is **0.5**, **0** is returned. - -**Returns:** - -Returns the nearest integer if the operation is successful; returns the passed **x** if **x** is an integer, **+0**, **-0**, a NaN value, or an infinity. - -## round\(\) - -``` -double round (double x) -``` - - **Description:** - -Rounds the double value **x** to the nearest integer, rounding away from **0**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value x.
- -**Attention:** - -Halfway values are rounded away from **0**. For example, if **x** is **0.5**, the rounded value is **1**; if **x** is **-0.5**, the rounded value is **-1**. - -**Returns:** - -Returns the nearest integer if the operation is successful; returns the passed **x** if **x** is an integer, **+0**, **-0**, a NaN value, or an infinity. - -## roundf\(\) - -``` -float roundf (float x) -``` - - **Description:** - -Rounds the float value **x** to the nearest integer, rounding away from **0**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value x.
- -**Attention:** - -Halfway values are rounded away from **0**. For example, if **x** is **0.5**, the rounded value is **1**; if **x** is **-0.5**, the rounded value is **-1**. - -**Returns:** - -Returns the nearest integer if the operation is successful; returns the passed **x** if **x** is an integer, **+0**, **-0**, a NaN value, or an infinity. - -## roundl\(\) - -``` -long double roundl (long double x) -``` - - **Description:** - -Rounds the long double value **x** to the nearest integer, rounding away from **0**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value x.
- -**Attention:** - -Halfway values are rounded away from **0**. For example, if **x** is **0.5**, the rounded value is **1**; if **x** is **-0.5**, the rounded value is **-1**. - -**Returns:** - -Returns the nearest integer if the operation is successful; returns the passed **x** if **x** is an integer, **+0**, **-0**, a NaN value, or an infinity. - -## scalb\(\) - -``` -double scalb (double x, double exp ) -``` - - **Description:** - -Multiplies the double value **x** by **FLT\_RADIX** raised to the power of the double value **exp**, that is, x\***FLT\_RADIX**^exp. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value x.
expIndicates the double value used as the exponent.
- -**Attention:** - -**FLT\_RADIX** is defined in **float.h** and is generally **2**. - -**Returns:** - -Returns the calculation result if the operation is successful. If **x** or **exp** is a NaN value, this function returns a NaN value. If **x** is a positive or negative infinity, and **exp** is not a negative infinity, this function returns a positive or negative infinity. If **x** is **+0** or **-0**, and **exp** is not a positive infinity, this function returns **+0** or **-0**. If **x** is **0** and **exp** is a positive infinity, this function returns a NaN value, reports a domain error, and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is an infinity and **exp** is a negative infinity, this function returns a NaN value, reports a domain error, and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If an overflow range error occurs, this function returns [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) with the sign of **x** and throws the [FE\_OVERFLOW](MATH.md#gad373306add36e7227d9c9620b6962323) exception. If an underflow range error occurs, this function returns **0** and throws the [FE\_UNDERFLOW](MATH.md#ga57b80dfe7d5ce60c3c76e517fce89ffe) exception. - -## scalbf\(\) - -``` -float scalbf (float x, float exp ) -``` - - **Description:** - -Multiplies the float value **x** by **FLT\_RADIX** raised to the power of the float value **exp**, that is, x\***FLT\_RADIX**^exp. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value x.
expIndicates the float value used as the exponent.
- -**Attention:** - -**FLT\_RADIX** is defined in **float.h** and is generally **2**. - -**Returns:** - -Returns the calculation result if the operation is successful. If **x** or **exp** is a NaN value, this function returns a NaN value. If **x** is a positive or negative infinity, and **exp** is not a negative infinity, this function returns a positive or negative infinity. If **x** is **+0** or **-0**, and **exp** is not a positive infinity, this function returns **+0** or **-0**. If **x** is **0** and **exp** is a positive infinity, this function returns a NaN value, reports a domain error, and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is an infinity and **exp** is a negative infinity, this function returns a NaN value, reports a domain error, and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If an overflow range error occurs, this function returns [HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) with the sign of **x** and throws the [FE\_OVERFLOW](MATH.md#gad373306add36e7227d9c9620b6962323) exception. If an underflow range error occurs, this function returns **0** and throws the [FE\_UNDERFLOW](MATH.md#ga57b80dfe7d5ce60c3c76e517fce89ffe) exception. - -## scalbln\(\) - -``` -double scalbln (double x, long int exp ) -``` - - **Description:** - -Multiplies the double value **x** by **FLT\_RADIX** raised to the power of the long int value **exp**, that is, **x\*\(**FLT\_RADIX**\)^exp**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value x.
expIndicates the double value used as the exponent.
- -**Attention:** - -**FLT\_RADIX** is defined in **float.h** and is generally **2**. - -**Returns:** - -Returns the calculation result if the operation is successful. If **x** or **exp** is a NaN value, this function returns a NaN value. If **x** is a positive or negative infinity, and **exp** is not a negative infinity, this function returns a positive or negative infinity. If **x** is **+0** or **-0**, and **exp** is not a positive infinity, this function returns **+0** or **-0**. If **x** is **0** and **exp** is a positive infinity, this function returns a NaN value, reports a domain error, and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is an infinity and **exp** is a negative infinity, this function returns a NaN value, reports a domain error, and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If an overflow range error occurs, this function returns [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) with the sign of **x** and throws the [FE\_OVERFLOW](MATH.md#gad373306add36e7227d9c9620b6962323) exception. If an underflow range error occurs, this function returns **0** and throws the [FE\_UNDERFLOW](MATH.md#ga57b80dfe7d5ce60c3c76e517fce89ffe) exception. - -## scalblnf\(\) - -``` -float scalblnf (float x, long int exp ) -``` - - **Description:** - -Multiplies the float value **x** by **FLT\_RADIX** raised to the power of the long int value **exp**, that is, **x\*\(**FLT\_RADIX**\)^exp**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value x.
expIndicates the float value used as the exponent.
- -**Attention:** - -**FLT\_RADIX** is defined in **float.h** and is generally **2**. - -**Returns:** - -Returns the calculation result if the operation is successful. If **x** or **exp** is a NaN value, this function returns a NaN value. If **x** is a positive or negative infinity, and **exp** is not a negative infinity, this function returns a positive or negative infinity. If **x** is **+0** or **-0**, and **exp** is not a positive infinity, this function returns **+0** or **-0**. If **x** is **0** and **exp** is a positive infinity, this function returns a NaN value, reports a domain error, and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is an infinity and **exp** is a negative infinity, this function returns a NaN value, reports a domain error, and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If an overflow range error occurs, this function returns [HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) with the sign of **x** and throws the [FE\_OVERFLOW](MATH.md#gad373306add36e7227d9c9620b6962323) exception. If an underflow range error occurs, this function returns **0** and throws the [FE\_UNDERFLOW](MATH.md#ga57b80dfe7d5ce60c3c76e517fce89ffe) exception. - -## scalblnl\(\) - -``` -long double scalblnl (long double x, long int exp ) -``` - - **Description:** - -Multiplies the long double value **x** by **FLT\_RADIX** raised to the power of the long int value **exp**, that is, **x\*\(**FLT\_RADIX**\)^exp**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value x.
expIndicates the long double value used as the exponent.
- -**Attention:** - -**FLT\_RADIX** is defined in **float.h** and is generally **2**. - -**Returns:** - -Returns the calculation result if the operation is successful. If **x** or **exp** is a NaN value, this function returns a NaN value. If **x** is a positive or negative infinity, and **exp** is not a negative infinity, this function returns a positive or negative infinity. If **x** is **+0** or **-0**, and **exp** is not a positive infinity, this function returns **+0** or **-0**. If **x** is **0** and **exp** is a positive infinity, this function returns a NaN value, reports a domain error, and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is an infinity and **exp** is a negative infinity, this function returns a NaN value, reports a domain error, and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If an overflow range error occurs, this function returns [HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) with the sign of **x** and throws the [FE\_OVERFLOW](MATH.md#gad373306add36e7227d9c9620b6962323) exception. - -## scalbn\(\) - -``` -double scalbn (double x, int exp ) -``` - - **Description:** - -Multiplies the double value **x** by **FLT\_RADIX** raised to the power of the int value **exp**, that is, **x\*\(**FLT\_RADIX**\)^exp**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value x.
expIndicates the double value used as the exponent.
- -**Attention:** - -**FLT\_RADIX** is defined in **float.h** and is generally **2**. - -**Returns:** - -Returns the calculation result if the operation is successful. If **x** or **exp** is a NaN value, this function returns a NaN value. If **x** is a positive or negative infinity, and **exp** is not a negative infinity, this function returns a positive or negative infinity. If **x** is **+0** or **-0**, and **exp** is not a positive infinity, this function returns **+0** or **-0**. If **x** is **0** and **exp** is a positive infinity, this function returns a NaN value, reports a domain error, and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is an infinity and **exp** is a negative infinity, this function returns a NaN value, reports a domain error, and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If an overflow range error occurs, this function returns [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) with the sign of **x** and throws the [FE\_OVERFLOW](MATH.md#gad373306add36e7227d9c9620b6962323) exception. If an underflow range error occurs, this function returns **0** and throws the [FE\_UNDERFLOW](MATH.md#ga57b80dfe7d5ce60c3c76e517fce89ffe) exception. - -## scalbnf\(\) - -``` -float scalbnf (float x, int exp ) -``` - - **Description:** - -Multiplies the float value **x** by **FLT\_RADIX** raised to the power of the int value **exp**, that is, **x\*\(**FLT\_RADIX**\)^exp**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value x.
expIndicates the float value used as the exponent.
- -**Attention:** - -**FLT\_RADIX** is defined in **float.h** and is generally **2**. - -**Returns:** - -Returns the calculation result if the operation is successful. If **x** or **exp** is a NaN value, this function returns a NaN value. If **x** is a positive or negative infinity, and **exp** is not a negative infinity, this function returns a positive or negative infinity. If **x** is **+0** or **-0**, and **exp** is not a positive infinity, this function returns **+0** or **-0**. If **x** is **0** and **exp** is a positive infinity, this function returns a NaN value, reports a domain error, and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is an infinity and **exp** is a negative infinity, this function returns a NaN value, reports a domain error, and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If an overflow range error occurs, this function returns [HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) with the sign of **x** and throws the [FE\_OVERFLOW](MATH.md#gad373306add36e7227d9c9620b6962323) exception. If an underflow range error occurs, this function returns **0** and throws the [FE\_UNDERFLOW](MATH.md#ga57b80dfe7d5ce60c3c76e517fce89ffe) exception. - -## scalbnl\(\) - -``` -long double scalbnl (long double x, int exp ) -``` - - **Description:** - -Multiplies the long double value **x** by **FLT\_RADIX** raised to the power of the int value **exp**, that is, **x\*\(**FLT\_RADIX**\)^exp**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value x.
expIndicates the long double value used as the exponent.
- -**Attention:** - -**FLT\_RADIX** is defined in **float.h** and is generally **2**. - -**Returns:** - -Returns the calculation result if the operation is successful. If **x** or **exp** is a NaN value, this function returns a NaN value. If **x** is a positive or negative infinity, and **exp** is not a negative infinity, this function returns a positive or negative infinity. If **x** is **+0** or **-0**, and **exp** is not a positive infinity, this function returns **+0** or **-0**. If **x** is **0** and **exp** is a positive infinity, this function returns a NaN value, reports a domain error, and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If **x** is an infinity and **exp** is a negative infinity, this function returns a NaN value, reports a domain error, and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. If an overflow range error occurs, this function returns [HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) with the sign of **x** and throws the [FE\_OVERFLOW](MATH.md#gad373306add36e7227d9c9620b6962323) exception. - -## significand\(\) - -``` -double significand (double x) -``` - - **Description:** - -Obtains the significand of the double value **x** scaled to the range \[1,2\). - -The calculation formula is x\*2^-[ilogb](MATH.md#ga600dd249210d15af31b9a29c2d09d255)\(x\). This function is mainly used in certain standardized tests for IEEE 754 conformance. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value x.
- -**Returns:** - -Returns the significand of **x** if the operation is successful. - -## significandf\(\) - -``` -float significandf (float x) -``` - - **Description:** - -Obtains the significand of the float value **x** scaled to the range \[1,2\). - -The calculation formula is x\*2^-[ilogb](MATH.md#ga600dd249210d15af31b9a29c2d09d255)\(x\). This function is mainly used in certain standardized tests for IEEE 754 conformance. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value x.
- -**Returns:** - -Returns the significand of **x** if the operation is successful. - -## sin\(\) - -``` -double sin (double x) -``` - - **Description:** - -Calculates the sine of the double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value.
- -**Returns:** - -Returns the sine of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is a positive or negative infinity, this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. - -## sincos\(\) - -``` -void sincos (double x, double * sin, double * cos ) -``` - - **Description:** - -Calculates the sine and cosine of the double value **x**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value whose sine and cosine are to be calculated.
sinIndicates the pointer to the obtained sine.
cosIndicates the pointer to the obtained cosine.
- -**Attention:** - -A domain error occurs if **x** is an infinity. In this case, the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception is thrown, and **sin** and **cos** are both NaN values. If **x** is a NaN value, **sin** and **cos** are both NaN values. - -## sincosf\(\) - -``` -void sincosf (float x, float * sin, float * cos ) -``` - - **Description:** - -Calculates the sine and cosine of the float value **x**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value whose sine and cosine are to be calculated.
sinIndicates the pointer to the obtained sine.
cosIndicates the pointer to the obtained cosine.
- -**Attention:** - -A domain error occurs if **x** is an infinity. In this case, the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception is thrown, and **sin** and **cos** are both NaN values. If **x** is a NaN value, **sin** and **cos** are both NaN values. - -## sincosl\(\) - -``` -void sincosl (long double x, long double * sin, long double * cos ) -``` - - **Description:** - -Calculates the sine and cosine of the long double value **x**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value whose sine and cosine are to be calculated.
sinIndicates the pointer to the obtained sine.
cosIndicates the pointer to the obtained cosine.
- -**Attention:** - -A domain error occurs if **x** is an infinity. In this case, the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception is thrown, and **sin** and **cos** are both NaN values. If **x** is a NaN value, **sin** and **cos** are both NaN values. - -## sinf\(\) - -``` -float sinf (float x) -``` - - **Description:** - -Calculates the sine of the float value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value.
- -**Returns:** - -Returns the sine of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is a positive or negative infinity, this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. - -## sinh\(\) - -``` -double sinh (double x) -``` - - **Description:** - -Calculates the hyperbolic sine of the double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value.
- -**Returns:** - -Returns the hyperbolic sine of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is **+0** or **-0**, this function returns **+0** or **-0**, respectively. If **x** is a positive or negative infinity, this function returns a positive or negative infinity. If an overflow range error occurs, this function returns [HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) with the sign of **x**, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. - -## sinhf\(\) - -``` -float sinhf (float x) -``` - - **Description:** - -Calculates the hyperbolic sine of the float value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value.
- -**Returns:** - -Returns the hyperbolic sine of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is **+0** or **-0**, this function returns **+0** or **-0**, respectively. If **x** is a positive or negative infinity, this function returns a positive or negative infinity. If an overflow range error occurs, this function returns [HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) with the sign of **x**, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. - -## sinhl\(\) - -``` -long double sinhl (long double x) -``` - - **Description:** - -Calculates the hyperbolic sine of the long double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value.
- -**Returns:** - -Returns the hyperbolic sine of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is **+0** or **-0**, this function returns **+0** or **-0**, respectively. If **x** is a positive or negative infinity, this function returns a positive or negative infinity. If an overflow range error occurs, this function returns [HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) with the sign of **x**, sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. - -## sinl\(\) - -``` -long double sinl (long double x) -``` - - **Description:** - -Calculates the sine of the long double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value.
- -**Returns:** - -Returns the sine of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is a positive or negative infinity, this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. - -## sqrt\(\) - -``` -double sqrt (double x) -``` - - **Description:** - -Calculates the square root of double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value.
- -**Returns:** - -Returns the square root of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is **0**, this function returns **0**. If **x** is less than **-0**, this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. - -## sqrtf\(\) - -``` -float sqrtf (float x) -``` - - **Description:** - -Calculates the square root of the float value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value.
- -**Returns:** - -Returns the square root of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is **0**, this function returns **0**. If **x** is less than **-0**, this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. - -## sqrtl\(\) - -``` -long double sqrtl (long double x) -``` - - **Description:** - -Calculates the square root of the long double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value.
- -**Returns:** - -Returns the square root of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is **0**, this function returns **0**. If **x** is less than **-0**, this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. - -## tan\(\) - -``` -double tan (double x) -``` - - **Description:** - -Calculates the tangent of the double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value, which represents an angle in radians.
- -**Returns:** - -Returns the tangent of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is **0**, this function returns **0**. If **x** is less than **-0**, this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. - -## tanf\(\) - -``` -float tanf (float x) -``` - - **Description:** - -Calculates the tangent of the float value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value, which represents an angle in radians.
- -**Returns:** - -Returns the tangent of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is **0**, this function returns **0**. If **x** is less than **-0**, this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. - -## tanh\(\) - -``` -double tanh (double x) -``` - - **Description:** - -Calculates the hyperbolic tangent of the double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value.
- -**Returns:** - -Returns the hyperbolic tangent of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is **0**, this function returns **0**. If **x** is less than **-0**, this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. - -## tanhf\(\) - -``` -float tanhf (float x) -``` - - **Description:** - -Calculates the hyperbolic tangent of the float value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value.
- -**Returns:** - -Returns the hyperbolic tangent of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is **0**, this function returns **0**. If **x** is less than **-0**, this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. - -## tanhl\(\) - -``` -long double tanhl (long double x) -``` - - **Description:** - -Calculates the hyperbolic tangent of the long double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value.
- -**Returns:** - -Returns the hyperbolic tangent of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is **0**, this function returns **0**. If **x** is less than **-0**, this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. - -## tanl\(\) - -``` -long double tanl (long double x) -``` - - **Description:** - -Calculates the tangent of the long double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value, which represents an angle in radians.
- -**Returns:** - -Returns the tangent of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is **0**, this function returns **0**. If **x** is less than **-0**, this function returns a NaN value, reports a domain error, sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70), and throws the [FE\_INVALID](MATH.md#ga638c8489adb1fac7204b07ece42998ae) exception. - -## tgamma\(\) - -``` -double tgamma (double x) -``` - - **Description:** - -Calculates the gamma function of the double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value.
- -**Returns:** - -Returns the gamma function of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is a positive infinity, this function returns a positive infinity. If **x** is a negative integer or negative infinity, this function returns a NaN value, reports a domain error, and sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70). If an underflow range error occurs, this function returns **+0**. If **x** is **+0** or **-0**, this function returns [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) with the sign of **x**, reports a pole error, and sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca). If an overflow range error occurs, this function returns [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) and sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca). - -## tgammaf\(\) - -``` -float tgammaf (float x) -``` - - **Description:** - -Calculates the gamma function of the float value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value.
- -**Returns:** - -Returns the gamma function of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is a positive infinity, this function returns a positive infinity. If **x** is a negative integer or negative infinity, this function returns a NaN value, reports a domain error, and sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70). If an underflow range error occurs, this function returns **+0**. If **x** is **+0** or **-0**, this function returns [HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) with the sign of **x**, reports a pole error, and sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca). If an overflow range error occurs, this function returns [HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359) and sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca). - -## tgammal\(\) - -``` -long double tgammal (long double x) -``` - - **Description:** - -Calculates the gamma function of the long double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value.
- -**Returns:** - -Returns the gamma function of **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is a positive infinity, this function returns a positive infinity. If **x** is a negative integer or negative infinity, this function returns a NaN value, reports a domain error, and sets **errno** to [EDOM](UTILS.md#ga5fe247e079b591a68e0fdbf7caec5b70). If an underflow range error occurs, this function returns **+0**. If **x** is **+0** or **-0**, this function returns [HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) with the sign of **x**, reports a pole error, and sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca). If an overflow range error occurs, this function returns [HUGE\_VALL](MATH.md#gab8b359c356d4311bf5d4ae6c03f43182) and sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca). - -## trunc\(\) - -``` -double trunc (double x) -``` - - **Description:** - -Obtains the nearest integer whose absolute value is less than or equal to the absolute value of the double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value x.
- -**Returns:** - -Returns the nearest integer whose absolute value is less than or equal to the absolute value of **x**. - -## truncf\(\) - -``` -float truncf (float x) -``` - - **Description:** - -Obtains the nearest integer whose absolute value is less than or equal to the absolute value of the float value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value x.
- -**Returns:** - -Returns the nearest integer whose absolute value is less than or equal to the absolute value of **x**. - -## truncl\(\) - -``` -long double truncl (long double x) -``` - - **Description:** - -Obtains the nearest integer whose absolute value is less than or equal to the absolute value of the long double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the long double value x.
- -**Returns:** - -Returns the nearest integer whose absolute value is less than or equal to the absolute value of **x**. - -## y0\(\) - -``` -double y0 (double x) -``` - - **Description:** - -Calculates the Bessel function of the second kind of order **0** for the double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value.
- -**Returns:** - -Returns the Bessel function of the second kind of order **0** for **x** if the operation is successful . If **x** is a NaN value, this function returns a NaN value. If **x** is **0.0**, this function returns **-[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971)** and reports a pole error. If **x** is a negative value, this function returns **-[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971)** and reports a range error. If an overflow range error occurs, this function returns **0.0**. - -## y0f\(\) - -``` -float y0f (float x) -``` - - **Description:** - -Calculates the Bessel function of the second kind of order **0** for the float value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value.
- -**Returns:** - -Returns the calculation result if the operation is successful; returns a NaN value if **x** is a NaN value; returns **-[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359)** and reports a pole error if **x** is **0.0**; returns **-[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359)** and reports a domain error if **x** is a negative value; returns **0.0** if an overflow range error occurs. - -## y1\(\) - -``` -double y1 (double x) -``` - - **Description:** - -Calculates the Bessel function of the second kind of order **1** for the double value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the double value.
- -**Returns:** - -Returns the Bessel function of the second kind of order **1** for **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is **0.0**, this function returns **-[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971)** and reports a pole error. If **x** is a negative value, this function returns **-[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971)** and reports a range error. If an overflow range error occurs, this function returns **0.0**. - -## y1f\(\) - -``` -float y1f (float x) -``` - - **Description:** - -Calculates the Bessel function of the second kind of order **1** for the float value **x**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the float value.
- -**Returns:** - -Returns the calculation result if the operation is successful; returns a NaN value if **x** is a NaN value; returns **-[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359)** and reports a pole error if **x** is **0.0**; returns **-[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359)** and reports a domain error if **x** is a negative value; returns **0.0** if an overflow range error occurs. - -## yn\(\) - -``` -double yn (int n, double x ) -``` - - **Description:** - -Calculates the Bessel function of the second kind of order **n** for the double value **x**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
nIndicates the order of the Bessel function of the first kind.
xIndicates the double value.
- -**Returns:** - -Returns the Bessel function of the second kind of order **n** for **x** if the operation is successful. If **x** is a NaN value, this function returns a NaN value. If **x** is **0.0**, this function returns **-[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971)** and reports a pole error. If **x** is a negative value, this function returns **-[HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971)** and reports a range error. If an overflow range error occurs, this function returns **0.0**. - -## ynf\(\) - -``` -float ynf (int n, float x ) -``` - - **Description:** - -Calculates the Bessel function of the second kind of order **n** for the float value **x**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
nIndicates the order of the Bessel function of the second kind.
xIndicates the float value.
- -**Returns:** - -Returns the calculation result if the operation is successful; returns a NaN value if **x** is a NaN value; returns **-[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359)** and reports a pole error if **x** is **0.0**; returns **-[HUGE\_VALF](MATH.md#gacd69981d54c27fe0ff514645dbfc6359)** and reports a domain error if **x** is a negative value; returns **0.0** if an overflow range error occurs. - diff --git a/api/api-SmartVision-Devices/MEM.md b/api/api-SmartVision-Devices/MEM.md deleted file mode 100755 index a596e2207b06662f9d6db5f77661fbb225d883a5..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/MEM.md +++ /dev/null @@ -1,1318 +0,0 @@ -# MEM - -- [Overview](#section360371676165622) -- [Summary](#section1312273962165622) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Macros](#define-members) -- [Functions](#func-members) -- [Details](#section694393684165622) -- [Function](#section1544222630165622) -- [calloc\(\)](#ga62b7798461bd461da64c5f9d35feddf7) -- [free\(\)](#gafbedc913aa4651b3c3b4b3aecd9b4711) -- [malloc\(\)](#ga7ac38fce3243a7dcf448301ee9ffd392) -- [malloc\_usable\_size\(\)](#gaa011d7b7bfeba45c8c32e04204a0f565) -- [memalign\(\)](#ga6a1c0668b7069bb45fd6e69f301ed5b9) -- [mmap\(\)](#gadcdc6990a7641f7ba05f5dd2a603b992) -- [mprotect\(\)](#gaa0752189f14ca11ba413fc944ae08b9c) -- [mremap\(\)](#ga1b5acd27009fbbf05d18e90640f6ef64) -- [munmap\(\)](#ga1343e4aa663c9e8bb7d1b16d367f0b08) -- [realloc\(\)](#ga1a6b5e8d2f1c37e5b43e4345586075be) -- [shmat\(\)](#gac56f61130bf1ddd88ecd6a2e87b4c5cb) -- [shmctl\(\)](#gab2cfe9a9370d4c74b485876260e2e0fe) -- [shmdt\(\)](#ga934738fcc6c27c0d45cff9bb8cc38a7f) -- [shmget\(\)](#ga23e346182fc10c5286f37213e09fefb2) - -## **Overview** - -**Description:** - -Provides structures and functions for performing memory operations, including memory mapping, remapping, allocation, and release. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - - - - - - - -

File Name

-

Description

-

malloc.h

-

Declares APIs for allocating and releasing memory.

-

mman.h

-

Declares structures and functions for performing memory operations, including memory mapping, remapping, unmapping, and attribute setting.

-

shm.h

-

Declares APIs for creating, mapping, deleting, and controlling shared memory.

-
- -## Data Structures - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

shmid_ds

-

Stores information about a shared memory segment.

-

shminfo

-

Describes limitations and attributes of system-level shared memory.

-

shm_info

-

Describes system resource information about the shared memory.

-
- -## Macros - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

MAP_FAILED ((void *) -1)

-

Indicates the return value of functions such as mmap() when the operation fails.

-

MAP_SHARED 0x01

-

Indicates the mapping attribute that the updates to the mapping are visible to other processes mapping the same file and are carried through to the underlying file. This macro is used as an input parameter passed to functions such as mmap().

-

MAP_PRIVATE 0x02

-

Indicates the mapping attribute that the updates to the mapping are not visible to other mapping processes and are not carried through to the underlying file. This macro is used as an input parameter passed to functions such as mmap().

-

MAP_FIXED 0x10

-

Indicates the mapping attribute that specifies the mapping as fixed mapping. This macro is used as an input parameter passed to functions such as mmap().

-

MAP_ANON 0x20

-

Indicates the mapping attribute that specifies the mapping as anonymous mapping without a specified file or device. This macro is used as an input parameter passed to functions such as mmap().

-

MAP_ANONYMOUS MAP_ANON

-

Indicates the mapping attribute that specifies the mapping as anonymous mapping without a specified file or device. This macro is the synonym for MAP_ANON and is used as an input parameter passed to functions such as mmap().

-

PROT_NONE 0

-

Indicates that no permission is granted to the current process for accessing the mapping area. This macro is used as an input parameter passed to functions such as mmap().

-

PROT_READ 1

-

Indicates that the current process is granted the read permission on the mapping area. This macro is used as an input parameter passed to functions such as mmap().

-

PROT_WRITE 2

-

Indicates that the current process is granted the write permission on the mapping area. This macro is used as an input parameter passed to functions such as mmap().

-

PROT_EXEC 4

-

Indicates that the current process is granted the execute permission on the mapping area. This macro is used as an input parameter passed to functions such as mmap().

-

MREMAP_MAYMOVE 1

-

Indicates the remapping attribute that allows the mapping to be relocated to a new address. This macro is used as an input parameter passed to functions such as mremap().

-

MREMAP_FIXED 2

-

Indicates the remapping attribute that specifies the mapping as fixed mapping. This macro is used as an input parameter passed to functions such as mremap().

-

SHMLBA 4096

-

Aligns the shared memory address.

-

SHM_R 0400

-

Indicates that the shared memory segment is readable. This macro is used for setting the shmflg parameter passed to functions such as shmget().

-

SHM_W 0200

-

Indicates that the shared memory segment is writable. This macro is used for setting the shmflg parameter passed to functions such as shmget().

-

SHM_RDONLY 010000

-

Indicates that the attached shared memory segment is read-only. This macro is used for setting the shmflg parameter passed to functions such as shmat().

-

SHM_RND 020000

-

Indicates that the shared memory address can be rounded to a value meeting the requirement (SHMLBA). This macro is used for setting the shmflg parameter passed to functions such as shmat().

-

SHM_REMAP 040000

-

Indicates that the memory segment can be remapped. This macro is used for setting the shmflg parameter passed to functions such as shmat().

-

SHM_EXEC 0100000

-

Indicates that the attached shared memory segment is executable. This macro is used for setting the shmflg parameter passed to functions such as shmat().

-

SHM_LOCK 11

-

Locks the shared memory segment in memory so that it cannot be swapped to the swap partition. This macro is used for setting the shmflg parameter passed to functions such as shmget().

-

SHM_UNLOCK 12

-

Unlocks the shared memory segment. This macro is used for setting the shmflg parameter passed to functions such as shmget().

-

SHM_STAT (13 | (IPC_STAT & 0x100))

-

Obtains a shmid_ds data structure. This macro is used for setting the cmd parameter passed to shmctl().

-

SHM_INFO 14

-

Obtains a shm_info data structure that includes system resource information about this shared memory segment. This macro is used for setting the cmd parameter passed to shmctl().

-

SHM_STAT_ANY (15 | (IPC_STAT & 0x100))

-

Obtains a shmid_ds data structure without permission check. This macro is used for setting the cmd parameter passed to shmctl().

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

malloc (size_t size)

-

void *

-

Dynamically allocates a block of uninitialized memory with the specified size.

-

calloc (size_t nmemb, size_t size)

-

void *

-

Dynamically allocates multiple blocks of memory with the specified size.

-

realloc (void *ptr, size_t size)

-

void *

-

Changes the size of a previously allocated memory block pointed to by ptr to the specified size.

-

free (void *ptr)

-

void

-

Frees the memory space pointed to by ptr.

-

memalign (size_t alignment, size_t size)

-

void *

-

Allocates a block of memory with the specified size based on the given alignment mode.

-

malloc_usable_size (void *ptr)

-

size_t

-

Obtains the size of the memory block pointed to by ptr.

-

mmap (void *addr, size_t length, int prot, int flags, int fd, off_t offset)

-

void *

-

Creates a mapping between the virtual address space of the calling process and a file or device.

-

munmap (void *addr, size_t length)

-

int

-

Removes all mappings for the specified virtual address space.

-

mprotect (void *addr, size_t len, int prot)

-

int

-

Sets protection attributes for the memory pages contained in the memory region starting from addr with the specified length.

-

mremap (void *old_address, size_t old_size, size_t new_size, int flags,...)

-

void *

-

Remaps a virtual memory region.

-

shmat (int shmid, const void *shmaddr, int shmflg)

-

void *

-

Attaches the shared memory segment identified by shmid to the address space of the current process.

-

shmctl (int shmid, int cmd, struct shmid_ds *buf)

-

int

-

Performs a control operation specified by the cmd parameter on the shared memory segment identified by shmid.

-

shmdt (const void *shmaddr)

-

int

-

Detaches the shared memory segment attached to the address pointed to by shmaddr from the address space of the calling process.

-

shmget (key_t key, size_t size, int shmflg)

-

int

-

Obtains or creates a shared memory segment with the specified size based on the ID specified by key.

-
- -## **Details** - -## **Function ** - -## calloc\(\) - -``` -void* calloc (size_t nmemb, size_t size ) -``` - - **Description:** - -Dynamically allocates multiple blocks of memory with the specified size. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
nmembIndicates the number of memory blocks to allocate.
sizeIndicates the size of the memory block to allocate, in bytes.
- -**Returns:** - -Returns the pointer to the allocated memory block if the operation is successful; returns **NULL** and sets **errno** to a value in the following table if the operation fails or **nmemb** or **size** is set to **0**. - - - - - - - - - - -

errno

-

Description

-

ENOMEM

-

Insufficient memory.

-
- -## free\(\) - -``` -void free (void * ptr) -``` - - **Description:** - -Frees the memory space pointed to by **ptr**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
ptrIndicates the pointer to a memory block previously allocated with malloc, calloc or realloc.
- -## malloc\(\) - -``` -void* malloc (size_t size) -``` - - **Description:** - -Dynamically allocates a block of uninitialized memory with the specified size. - -The allocated memory can be initialized by calling [memset\(\)](UTILS.md#gace6ee45c30e71865e6eb635200379db9). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sizeIndicates the size of the memory block to allocate, in bytes.
- -**Returns:** - -Returns the pointer to the allocated memory block if the operation is successful; returns **NULL** and sets **errno** to a value in the following table if the operation fails or **size** is set to **0**. - - - - - - - - - - -

errno

-

Description

-

ENOMEM

-

Insufficient memory.

-
- -## malloc\_usable\_size\(\) - -``` -size_t malloc_usable_size (void * ptr) -``` - - **Description:** - -Obtains the size of the memory block pointed to by **ptr**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
ptrIndicates the pointer to a block of memory previously allocated by functions such as malloc().
- -**Returns:** - -Returns the number of usable bytes in the block of allocated memory pointed to by **ptr**; returns **0** if **ptr** is **NULL**. - -**See also:** - -[malloc\(\)](MEM.md#ga7ac38fce3243a7dcf448301ee9ffd392) | [calloc\(\)](MEM.md#ga62b7798461bd461da64c5f9d35feddf7) | [realloc\(\)](MEM.md#ga1a6b5e8d2f1c37e5b43e4345586075be) - -## memalign\(\) - -``` -void* memalign (size_t alignment, size_t size ) -``` - - **Description:** - -Allocates a block of memory with the specified size based on the given alignment mode. - -The value of **alignment** must be a power of two. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
alignmentIndicates the alignment size of the allocated memory.
sizeIndicates the size of the memory block to allocate, in bytes.
- -**Returns:** - -Returns the pointer to the allocated memory block if the operation is successful; returns **NULL** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid alignment value (not a power of two).

-

ENOMEM

-

Insufficient memory.

-
- -## mmap\(\) - -``` -void* mmap (void * addr, size_t length, int prot, int flags, int fd, off_t offset ) -``` - - **Description:** - -Creates a mapping between the virtual address space of the calling process and a file or device. - -The start address for the mapping is specified by **addr**, and the length to map is specified by **length**. The contents of the mapping are initialized starting at **offset** with the specified **length** in the file referred to by the file descriptor **fd**. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
addrIndicates the pointer to the start address of the mapping. If this parameter is NULL, the kernel determines the address to start.
lengthIndicates the length of the mapping, in bytes.
protIndicates the permission to be granted on the mapping area. The permission to grant must not conflict with the open mode of the file. The value of this parameter is the bitwise OR combination of one or more of the following constants:
flagsSpecifies whether updates are visible to other processes mapping the same segment, and whether updates are carried through to the underlying file. The following table describes available values.
fdIndicates the file or device to map.
offsetIndicates the offset into the file where the mapping will start.
- - - - - - - - - - - - - - - - -

prot

-

Description

-

PROT_EXEC

-

Executable

-

PROT_READ

-

Readable

-

PROT_WRITE

-

Writable

-
- - - - - - - - - - - - - - - - -

flags

-

Description

-

MAP_SHARED

-

Updates to the mapping are visible to other processes mapping the same file, and are carried through to the underlying file.

-

MAP_PRIVATE

-

Updates to the mapping are invisible to other processes mapping the same file, and are not carried through to the underlying file.

-

MAP_ANONYMOUS

-

No file or device is specified for the mapping (anonymous mapping). Both fd and offset are ignored.

-
- -**Attention:** - -If the file mapping is successful, **fd** cannot be closed before the mapping is deleted. \(This rule does not conform to the Portable Operating System Interface \(POSIX\) standard. You should pay special attention to this rule.\) - - This function can only be used to mapping a file in the JFFS2/NFS/FAT/RAMFS file systems. - -**Returns:** - -Returns the pointer to the address where the mapping is placed if the operation is successful; returns [MAP\_FAILED](MEM.md#ga8523dcf952f6ff059a3bed717e4f1296) and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EACCES

-

The file descriptor specified by fd refers to a non-regular file. Or a file mapping was requested, but fd is not open for reading. MAP_SHARED and PROT_WRITE are specified, but the file identified by fd is not opened in O_RDWR mode. PROT_WRITE is specified, but the file is append-only.

-

EBADF

-

The file descriptor specified by fd is invalid, and MAP_ANONYMOUS is not specified in flags.

-

EINVAL

-

The length and offset are too large, addr is not page-aligned with MAP_FIXED, or the length is 0. Neither MAP_SHARED nor MAP_PRIVATE is specified in flags, or both are specified.

-

EAGAIN

-

The file identified by fd has been locked.

-

ENFILE

-

The total number of open files exceeds the system limit.

-

ENODEV

-

The file identified by fd does not support memory mapping.

-

ENOMEM

-

Insufficient memory.

-

EPERM

-

PROT_EXEC is specified in prot, but the mapped area belongs to a file on a file system that was mounted non-executable, or the file seal does not allow this operation.

-
- -## mprotect\(\) - -``` -int mprotect (void * addr, size_t len, int prot ) -``` - - **Description:** - -Sets protection attributes for the memory pages contained in the memory region starting from **addr** with the specified length. - -The address specified by **addr** must be page-aligned. If the process attempts to access memory in a manner that violates the protection attributes, an access exception will occur, and the process will be terminated. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
addrIndicates the pointer to the start address of the memory region to modify, which must be a multiple of the page size.
lenIndicates the length of the memory region to modify, in bytes.
protIndicates the permission of the memory region to modify, which can be a bitwise OR combination of one or more of the constants listed in prot.
- - - - - - - - - - - - - - - - - - - -

prot

-

Description

-

PROT_EXEC

-

Executable

-

PROT_READ

-

Readable

-

PROT_WRITE

-

Writable

-

PROT_NONE

-

Not accessible

-
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - -

errno

-

Description

-

EACCES

-

The memory region cannot be granted the specified permission. This error can occur, for example, when you use mmap to map a file with prot set to PROT_READ and then use this function to set prot to PROT_WRITE.

-

EINVAL

-

addr is an invalid pointer or it points to an address that is not a multiple of the page size.

-

ENOMEM

-

Internal kernel structures cannot be allocated due to insufficient memory, or addresses in the specified range are invalid for the address space of the process. The total number of mappings with different attributes exceeds the maximum number allowed by the system if the protection attribute of the memory region is changed.

-
- -## mremap\(\) - -``` -void* mremap (void * old_address, size_t old_size, size_t new_size, int flags, ... ) -``` - - **Description:** - -Remaps a virtual memory region. - -This function expands or shrinks an existing memory mapping, and may also move the mapping at the same time depending on the settings of **flags** and the available virtual address space. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
old_addressIndicates the old address of the virtual memory region to expand or shrink.
old_sizeIndicates the old size of the virtual memory region.
new_sizeIndicates the requested size of the virtual memory region after the expansion or shrinking.
flagsSpecifies whether the existing memory can be mapped to a new or specified address.
new_addressIndicates the new address of the virtual memory region. This parameter is optional and is used when MREMAP_FIXED is specified in flags.
- - - - - - - - - - - - - -

flags

-

Description

-

MREMAP_MAYMOVE

-

By default, if no enough space is available to expand a mapping at its current location, the operation fails. If this flag is specified, the kernel is allowed to relocate the mapping to a new virtual address when necessary.

-

MREMAP_FIXED

-

If this flag is specified, the new_address parameter is enabled in this function and the memory is mapped to a new address. This flag must be used together with MREMAP_MAYMOVE.

-
- -**Returns:** - -Returns the pointer to the new mapping address if the operation is successful; returns [MAP\_FAILED](MEM.md#ga8523dcf952f6ff059a3bed717e4f1296) and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EAGAIN

-

The memory segment to expand is locked.

-

EFAULT

-

Some memory addresses in the range from old_address to old_address+old_size are invalid for this process.

-

EINVAL

-

old_address is not a multiple of the page size, or a value other than MREMAP_MAYMOVE and MREMAP_FIXED is specified in flags. new_size is 0, new_size or new_address is invalid, or MREMAP_FIXED is specified in flags without also specifying MREMAP_MAYMOVE. old_size is 0 but old_address does not point to a shared memory mapping; old_size is 0 but MREMAP_MAYMOVE is not specified in flags; or the new memory address range specified by new_address and new_size overlaps the old memory address range specified by old_address and old_size.

-

ENOMEM

-

Insufficient memory.

-
- -## munmap\(\) - -``` -int munmap (void * addr, size_t length ) -``` - - **Description:** - -Removes all mappings for the specified virtual address space. - -After all mappings are removed, any references to addresses within the specified range will generate invalid memory references. The memory region will also be automatically unmapped when the process is terminated. Closing the file descriptor does not remove mappings from the region. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
addrIndicates the pointer to the start address of the memory region to unmap, which is the return value of mmap().
lengthIndicates the length of the address range to unmap, which should be the length specified in mmap().
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid input parameters.

-
- -## realloc\(\) - -``` -void* realloc (void * ptr, size_t size ) -``` - - **Description:** - -Changes the size of a previously allocated memory block pointed to by **ptr** to the specified size. - -The contents of the memory block will be retained from the beginning of the memory pointed to by **ptr** to the lesser of the old and new sizes. If the new size is larger than the old size, the added memory portion will not be initialized. The behavior of this function varies depending on the input parameters: - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
ptrIndicates the pointer to a memory block previously allocated with malloc, calloc or realloc.
sizeIndicates the new size for the memory block, in bytes.
- -**Returns:** - -Returns the pointer to the new memory block if the operation is successful; returns **NULL** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

ENOMEM

-

Insufficient memory.

-
- -## shmat\(\) - -``` -void* shmat (int shmid, const void * shmaddr, int shmflg ) -``` - - **Description:** - -Attaches the shared memory segment identified by **shmid** to the address space of the current process. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
shmidIdentifies the shared memory segment to attach, which is obtained by shmget().
shmaddrIndicates the space address of the current process to attach. If this parameter is NULL, the system chooses an unused address to attach.
shmflgIndicates the attribute of the shared memory segment to attach, which is the bitwise OR combination of one or more of the following flags:
- - - - - - - - - - - - - - - - - - - -

shmflg

-

Description

-

SHM_RND

-

Round the attached address. If shmaddr is not NULL and SHM_RND is specified in shmflg, the address is rounded down to the nearest multiple of SHMLBA.

-

SHM_EXEC

-

Allow the contents of the attached shared memory segment to be executable.

-

SHM_RDONLY

-

Set the contents of the attached shared memory segment to be read-only.

-

SHM_REMAP

-

Replace any existing mapping in the address range starting at shmaddr and continuing for the size of the segment during the current memory mapping. When SHM_REMAP is not specified, an EINVAL error will be returned if a mapping exists in the address range.

-
- -**Returns:** - -Returns the pointer to the address of the attached shared memory segment if the operation is successful; returns **\(void \*\)-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EACCES

-

The current process does not have the required permission on the requested mapping type.

-

EIDRM

-

The shared memory segment specified by shmid has been removed.

-

EINVAL

-

The value of shmid is invalid. shmaddr is not aligned (not page-aligned and SHM_RND is not specified) or its value is invalid. SHM_REMAP is specified, but shmaddr is NULL.

-

ENOMEM

-

No page tables can be allocated.

-
- -## shmctl\(\) - -``` -int shmctl (int shmid, int cmd, struct [shmid_ds](shmid_ds.md) * buf ) -``` - - **Description:** - -Performs a control operation specified by the **cmd** parameter on the shared memory segment identified by **shmid**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
shmidIdentifies the shared memory segment to attach, which is obtained by shmget().
cmdIndicates the control operation to perform. The following table describes available values.
bufIndicates the pointer to the buffer for storing the information to set or obtain.
- - - - - - - - - - - - - - - - - - - - - - - - - -

cmd

-

Description

-

IPC_STAT

-

Copy information from the kernel data structure associated with the shared memory segment identified by shmid into the shmid_ds structure pointed to by buf.

-

SHM_STAT

-

Return a shmid_ds data structure. When SHM_STAT is specified, shmid does not identify a shared memory segment. Instead, it indicates the index to the kernel's internal array that maintains information about all shared memory segments.

-

IPC_SET

-

Write the values of some fields in the shmid_ds data structure pointed to by buf to the kernel data structure associated with the specified shared memory segment, updating also its shm_ctimemember. The following fields can be modified: shm_perm.uid, shm_perm.gid, and shm_perm.mode.

-

IPC_RMID

-

Mark the shared memory segment to be destroyed.

-

IPC_INFO

-

Return information about system-wide shared memory limits and parameters in the structure pointed to by buf. The returned structure is of the shminfo type, and a cast is required.

-

SHM_INFO

-

Return a shm_info structure that contains information about system resources consumed by the specified shared memory segment.

-
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EACCES

-

IPC_STAT or SHM_STAT is specified in cmb, but the mode field in shm_perm does not allow any read operation on the shared memory segment identified by shmid.

-

EFAULT

-

SHM_STAT or IPC_STAT is specified in cmd, but the address pointed to by buf is not accessible.

-

EIDRM

-

shmid points to a removed shared memory segment.

-

EINVAL

-

The value of shmid or cmd is invalid. When SHM_STAT is specified in cmd, the value is considered invalid if the index specified by shmid refers to an unused array slot.

-

ENOMEM

-

No page tables can be allocated.

-

EPERM

-

IPC_SET or IPC_RMID is attempted, but the effective user ID of the calling process is not that of the creator or the owner, and the process is not privileged.

-
- -## shmdt\(\) - -``` -int shmdt (const void * shmaddr) -``` - - **Description:** - -Detaches the shared memory segment attached to the address pointed to by **shmaddr** from the address space of the calling process. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
shmaddrIndicates the pointer to the address of the shared memory segment to detach. The value of this parameter should be the pointer previously returned by shmat().
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

No shared memory segment is attached to shmaddr, or shmaddr is not aligned.

-
- -## shmget\(\) - -``` -int shmget ([key_t](UTILS.md#ga4f8c894a6c2b415e55f3f858afd9e7f5) key, size_t size, int shmflg ) -``` - - **Description:** - -Obtains or creates a shared memory segment with the specified size based on the ID specified by **key**. - -If the shared memory segment associated with **key** does not exist and [IPC\_CREAT](IPC.md#gace43f23fcb66ddaad964bb8ea8de6e9c) is specified in **shmflg** or if **key** has the value [IPC\_PRIVATE](IPC.md#gae2b9b856a4a657c250b0b2e1cc0835d9), this function creates a shared memory segment with the size equal to the value of **size** rounded up to a multiple of [PAGE\_SIZE](UTILS.md#ga7d467c1d283fdfa1f2081ba1e0d01b6e). - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the key of the shared memory segment.
sizeIndicates the size of the shared memory segment to create. The actual size is rounded up to a multiple of PAGE_SIZE.
shmflgIndicates the attribute of the shared memory segment, which is the bitwise OR combination of one or more of the following flags:
- - - - - - - - - - - - - -

shmflg

-

Description

-

IPC_CREAT

-

Create a new shared memory segment. If this flag is not specified, this function will find the segment with the specified key and check to see whether the user has permission to access the segment.

-

IPC_EXCL

-

Used together with IPC_CREAT to ensure that this function is called to create a shared memory segment. The calling fails if the segment already exists.

-
- -**Returns:** - -Returns the ID of the shared memory segment if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EACCES

-

The current process does not have the permission to obtain the specified shared memory segment.

-

EEXIST

-

IPC_EXCL and IPC_CREAT are specified, but the shared memory segment associated with key already exists.

-

EINVAL

-

The size specified for the shared memory segment to create is less than the value of shmmin in shminfo or greater than the value of shmmax. The shared memory segment associated with key already exists, but the value of size is greater than the size of the segment.

-

ENOENT

-

No segment exists for the given key, and IPC_CREAT is not specified.

-

ENOMEM

-

Insufficient memory.

-

ENOSPC

-

Allocating a segment of the requested size would cause the system to exceed the system-wide limit on shared memory (shmall in shminfo).

-
- diff --git a/api/api-SmartVision-Devices/Mac80211DisconnectParam.md b/api/api-SmartVision-Devices/Mac80211DisconnectParam.md deleted file mode 100755 index 288221ee21a59c0930cc9aab1fab27159bdfa4c4..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Mac80211DisconnectParam.md +++ /dev/null @@ -1,44 +0,0 @@ -# Mac80211DisconnectParam - -- [Overview](#section1038643457165632) -- [Summary](#section1604791986165632) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Describes disconnection parameters. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

macAddr [WLAN_MAC_ADDR_LEN]

-

uint8_t

-

reasonCode

-

uint16_t

-
- diff --git a/api/api-SmartVision-Devices/Mac80211Ssids.md b/api/api-SmartVision-Devices/Mac80211Ssids.md deleted file mode 100755 index 4b3f0a6c928a386a950f32889e8377b5dcdb66bf..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Mac80211Ssids.md +++ /dev/null @@ -1,49 +0,0 @@ -# Mac80211Ssids - -- [Overview](#section580943953165632) -- [Summary](#section323170942165632) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Describes SSIDs. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

aucSsid [OAL_IEEE80211_MAX_SSID_LEN]

-

uint8_t

-

ssidLen

-

uint8_t

-

aucArry [MAC80211_SSIDS_AUC_SIZE]

-

uint8_t

-
- diff --git a/api/api-SmartVision-Devices/Mac80211beaconParam.md b/api/api-SmartVision-Devices/Mac80211beaconParam.md deleted file mode 100755 index 26b6163ccfe99c6c4b5834ab6cce3aa7f4f572d8..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Mac80211beaconParam.md +++ /dev/null @@ -1,59 +0,0 @@ -# Mac80211beaconParam - -- [Overview](#section1546710699165632) -- [Summary](#section1304229545165632) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Describes beacon parameters. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

interval

-

int32_t

-

dtimPeriod

-

int32_t

-

beaconData

-

WifiBeaconData *

-

hiddenSsid

-

uint8_t

-

operationType

-

uint8_t

-
- diff --git a/api/api-SmartVision-Devices/MacAddress.md b/api/api-SmartVision-Devices/MacAddress.md deleted file mode 100755 index 2e57de95762b790d86ff936c7af93f9d009fd645..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/MacAddress.md +++ /dev/null @@ -1,39 +0,0 @@ -# MacAddress - -- [Overview](#section1313641364165632) -- [Summary](#section806099061165632) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Describes the device MAC address. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - -

Variable Name

-

Description

-

addr [ETH_ADDR_LEN]

-

uint8_t

-
- diff --git a/api/api-SmartVision-Devices/MacConfigParam.md b/api/api-SmartVision-Devices/MacConfigParam.md deleted file mode 100755 index d11af5a0b9f2a67f68c4e4cc78261709dd35e894..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/MacConfigParam.md +++ /dev/null @@ -1,44 +0,0 @@ -# MacConfigParam - -- [Overview](#section564698036165632) -- [Summary](#section87239505165632) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Describes MAC configuration parameters. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

mac [WLAN_MAC_ADDR_LEN]

-

uint8_t

-

p2pMode

-

uint8_t

-
- diff --git a/api/api-SmartVision-Devices/MetaData.md b/api/api-SmartVision-Devices/MetaData.md deleted file mode 100755 index 6bacd2dee357fc23e6129d2d0ac1ef0e5691c0c8..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/MetaData.md +++ /dev/null @@ -1,84 +0,0 @@ -# MetaData - -- [Overview](#section746570942165632) -- [Summary](#section1210830936165632) -- [Data Fields](#pub-attribs) -- [Details](#section1583032792165632) -- [Field](#section61534876165632) -- [extra](#afb875615d3a2774cca2230a190815911) -- [name](#ab3fee0041d776544e4305bcab5ff992a) -- [value](#a33b9134160cc5481447142f021dd75ac) - -## **Overview** - -**Related Modules:** - -[BundleManager](BundleManager.md) - -**Description:** - -Defines the metadata information in a [ModuleInfo](ModuleInfo.md) object. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

name

-

char *

-

value

-

char *

-

extra

-

char *

-
- -## **Details** - -## **Field ** - -## extra - -``` -char* MetaData::extra -``` - - **Description:** - -Extra data. You can customize this field as required. - -## name - -``` -char* MetaData::name -``` - - **Description:** - -Pointer to the metadata name - -## value - -``` -char* MetaData::value -``` - - **Description:** - -Pointer to the metadata value - diff --git a/api/api-SmartVision-Devices/ModuleInfo.md b/api/api-SmartVision-Devices/ModuleInfo.md deleted file mode 100755 index a856029c45caa6ba2a3e4584b6d77bfbe66e7654..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/ModuleInfo.md +++ /dev/null @@ -1,148 +0,0 @@ -# ModuleInfo - -- [Overview](#section1742385662165632) -- [Summary](#section536720864165632) -- [Data Fields](#pub-attribs) -- [Details](#section1298459969165632) -- [Field](#section1622035535165632) -- [description](#af7211393306adaa07ad32c642539b7f6) -- [deviceType](#a7166c89b6815875afcafaca7cec21ae0) -- [isDeliveryInstall](#a6e76e2eb535e0d92a9e49652486c35ec) -- [metaData](#a6731b378fc6b34c7e94ab3c0d8d08e5b) -- [moduleName](#ae194862e3cf07df40e0d41b3aa9eb1c0) -- [moduleType](#af8f4264764394fb20c75a18a1a816ac6) -- [name](#adb9af8c6739aaf550e91119b146eb44e) - -## **Overview** - -**Related Modules:** - -[BundleManager](BundleManager.md) - -**Description:** - -Defines the HAP information. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

moduleName

-

char *

-

description

-

char *

-

name

-

char *

-

moduleType

-

char *

-

isDeliveryInstall

-

bool

-

deviceType [DEVICE_TYPE_SIZE]

-

char *

-

metaData [METADATA_SIZE]

-

MetaData *

-
- -## **Details** - -## **Field ** - -## description - -``` -char* ModuleInfo::description -``` - - **Description:** - -Pointer to the description of the HAP package - -## deviceType - -``` -char* ModuleInfo::deviceType[DEVICE_TYPE_SIZE] -``` - - **Description:** - -Pointer to the types of devices that can run the application. The maximum size of the device type array is **DEVICE\_TYPE\_SIZE**. - -## isDeliveryInstall - -``` -bool ModuleInfo::isDeliveryInstall -``` - - **Description:** - -Whether the HAP package is installed while the user is installing the application - -## metaData - -``` -[MetaData](MetaData.md)* ModuleInfo::metaData[METADATA_SIZE] -``` - - **Description:** - -Pointer to the metadata array whose maximum size is **METADATA\_SIZE** - -## moduleName - -``` -char* ModuleInfo::moduleName -``` - - **Description:** - -Pointer to the HAP package name - -## moduleType - -``` -char* ModuleInfo::moduleType -``` - - **Description:** - -Type of the HAP package, either **Entry.hap** or **Feature.hap** - -## name - -``` -char* ModuleInfo::name -``` - - **Description:** - -Pointer to the class name of the HAP package - diff --git a/api/api-SmartVision-Devices/MuiltiMedia_CameraDeviceCallback.md b/api/api-SmartVision-Devices/MuiltiMedia_CameraDeviceCallback.md deleted file mode 100755 index 3a962acb9a4d1142a9c3462183a31f0997079810..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/MuiltiMedia_CameraDeviceCallback.md +++ /dev/null @@ -1,132 +0,0 @@ -# MuiltiMedia\_CameraDeviceCallback - -## **Overview** - -Defines the **CameraDeviceCallback** class to response to device changes. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - -

File Name

-

Description

-

camera_device_callback.h

-

Declares functions in the CameraDeviceCallback class to response to device changes.

-
- -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

OHOS::Media::CameraDeviceCallback

-

Provides functions to response to device changes.

-
- -## Functions - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

OHOS::Media::CameraDeviceCallback::CameraDeviceCallback ()=default

-

 

-

A constructor used to create a CameraDeviceCallback instance.

-

OHOS::Media::CameraDeviceCallback::~CameraDeviceCallback ()=default

-

virtual 

-

A destructor used to delete the CameraDeviceCallback instance.

-

OHOS::Media::CameraDeviceCallback::OnCameraStatus (std::string cameraId, int32_t status)

-

virtual void 

-

Called when the camera state changes.

-
- -## **Details** - -## **Function Documentation** - -## CameraDeviceCallback\(\) - -``` -OHOS::Media::CameraDeviceCallback::CameraDeviceCallback () -``` - - **Description:** - -A constructor used to create a **[CameraDeviceCallback](OHOS-Media-CameraDeviceCallback.md)** instance. - -## OnCameraStatus\(\) - -``` -virtual void OHOS::Media::CameraDeviceCallback::OnCameraStatus (std::string cameraId, int32_t status ) -``` - - **Description:** - -Called when the camera state changes. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
cameraIdIndicates the camera ID.
statusIndicates the camera state.
- -## \~CameraDeviceCallback\(\) - -``` -virtual OHOS::Media::CameraDeviceCallback::~CameraDeviceCallback () -``` - - **Description:** - -A destructor used to delete the **[CameraDeviceCallback](OHOS-Media-CameraDeviceCallback.md)** instance. - diff --git a/api/api-SmartVision-Devices/MultiMedia_AudioCapturer.md b/api/api-SmartVision-Devices/MultiMedia_AudioCapturer.md deleted file mode 100755 index a4057bfa063fa06c5c29d582d9e80846a6ce96af..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/MultiMedia_AudioCapturer.md +++ /dev/null @@ -1,563 +0,0 @@ -# MultiMedia\_AudioCapturer - -- [Overview](#section684538670165625) -- [Summary](#section535185799165625) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Enumerations](#enum-members) -- [Functions](#func-members) -- [Details](#section2051307272165625) -- [Enumeration Type](#section1407711336165625) -- [State](#ga3d8d6798a2346e57e241d16da673d508) -- [Timebase](#gacdafb362a7da91799fa96163bca2a619) -- [Function](#section200639590165625) -- [GetAudioTime\(\)](#gae24a95aeba747852373ef408bb9bab12) -- [GetCapturerInfo\(\)](#ga3921932035bfa99f7e7d8d0241344fca) -- [GetFrameCount\(\)](#gaf603a793bb5e97f000b11f57fa944ce1) -- [GetMinFrameCount\(\)](#gac3f12dec86f94438758ba1a6ff6ed7da) -- [GetStatus\(\)](#gaf022f9b98b1776799e86b689f7544a5e) -- [Read\(\)](#ga75bccf0f21f7d9adc5e580f40abfc7d2) -- [Release\(\)](#gad68b60d6ca82d096cbfa0f4205f2ae9e) -- [SetCapturerInfo\(\)](#gae2cf055c840ece71e22cb64c98c68a19) -- [Start\(\)](#gac3391374f9a180d84aa5bd19236743a1) -- [Stop\(\)](#ga498a8a4d0a2c09418944eab7728bdc7b) -- [Variable](#section1593978958165625) -- [audioFormat](#ga6a222ecc5112fb2925879dba686c12a3) -- [bitRate](#gace7d68d68754fc267117003f7fc76522) -- [bitWidth](#ga110704c5058747a6180c250b0a77d685) -- [channelCount](#ga3219851b0a3e355a8519c9262f879e47) -- [inputSource](#ga9c14165a8197521b8a539bd5408f66ed) -- [sampleRate](#gab623e99855bc46fe9d3dbfacb67e419a) -- [streamType](#gaaa038f040e203e553aba28e80f26f733) - -## **Overview** - -**Description:** - -Declares APIs in the **AudioCapturer** class for audio capture. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - -

File Name

-

Description

-

audio_capturer.h

-

Provides the AudioCapturer class to implement operations related to audio capture.

-
- -## Data Structures - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

OHOS::Audio::AudioCapturerInfo

-

Defines information about audio capture parameters, including the input source, audio codec format,sampling rate (Hz), number of audio channels, bit rate, and bit width.

-

OHOS::Audio::Timestamp

-

Represents timestamp information, including the frame position information and high-resolution time source.

-

OHOS::Audio::AudioCapturer

-

Provides functions for applications to implement audio capturing.

-
- -## Enumerations - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

OHOS::Audio::Timestamp::Timebase : int32_t { OHOS::Audio::Timestamp::Timebase::MONOTONIC = 0, OHOS::Audio::Timestamp::Timebase::BOOTTIME = 1 }

-

Enumerates the time base of this Timestamp. Different timing methods are supported.

-

OHOS::Audio::State : uint32_t { OHOS::Audio::PREPPARED, OHOS::Audio::RECORDING, OHOS::Audio::STOPPED, OHOS::Audio::RELEASED }

-

Enumerates the recording states of the current device.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

OHOS::Audio::AudioCapturer::GetMinFrameCount (int32_t sampleRate, int32_t channelCount, AudioCodecFormat audioFormat, size_t &frameCount)

-

static bool

-

Obtains the minimum number of frames required in a specified condition, in bytes per sample.

-

OHOS::Audio::AudioCapturer::GetFrameCount ()

-

uint64_t

-

Obtains the number of frames required in the current condition, in bytes per sample.

-

OHOS::Audio::AudioCapturer::SetCapturerInfo (const AudioCapturerInfo info)

-

int32_t

-

Sets audio capture parameters.

-

OHOS::Audio::AudioCapturer::GetCapturerInfo (AudioCapturerInfo &info)

-

int32_t

-

Obtains audio capture parameters.

-

OHOS::Audio::AudioCapturer::Start ()

-

bool

-

Starts audio recording.

-

OHOS::Audio::AudioCapturer::Read (uint8_t *buffer, size_t userSize, bool isBlockingRead)

-

int32_t

-

Reads audio data.

-

OHOS::Audio::AudioCapturer::GetStatus ()

-

State

-

Obtains the audio capture state.

-

OHOS::Audio::AudioCapturer::GetAudioTime (Timestamp &timestamp, Timestamp::Timebase base)

-

bool

-

Obtains the timestamp.

-

OHOS::Audio::AudioCapturer::Stop ()

-

bool

-

Stops audio recording.

-

OHOS::Audio::AudioCapturer::Release ()

-

bool

-

Releases a local AudioCapturer object.

-
- -## **Details** - -## **Enumeration Type ** - -## State - -``` -enum [OHOS::Audio::State](MultiMedia_AudioCapturer.md#ga3d8d6798a2346e57e241d16da673d508) : uint32_t -``` - - **Description:** - -Enumerates the recording states of the current device. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
PREPPARED

Prepared

-
RECORDING

Recording

-
STOPPED

Stopped

-
RELEASED

Released

-
- -## Timebase - -``` -enum [OHOS::Audio::Timestamp::Timebase](MultiMedia_AudioCapturer.md#gacdafb362a7da91799fa96163bca2a619) : int32_t -``` - - **Description:** - -Enumerates the time base of this **[Timestamp](OHOS-Audio-Timestamp.md)**. Different timing methods are supported. - - - - - - - - - - - - - -

Enumerator

-

Description

-
MONOTONIC

Monotonically increasing time, excluding the system sleep time

-
BOOTTIME

Monotonically increasing time, including the system sleep time

-
- -## **Function ** - -## GetAudioTime\(\) - -``` -bool OHOS::Audio::AudioCapturer::GetAudioTime ([Timestamp](OHOS-Audio-Timestamp.md) & timestamp, [Timestamp::Timebase](MultiMedia_AudioCapturer.md#gacdafb362a7da91799fa96163bca2a619) base ) -``` - - **Description:** - -Obtains the timestamp. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
timestampIndicates a Timestamp instance reference provided by the caller.
baseIndicates the time base, which can be Timestamp.Timebase.BOOTTIME or Timestamp.Timebase.MONOTONIC.
- -**Returns:** - -Returns **true** if the timestamp is successfully obtained; returns **false** otherwise. - -## GetCapturerInfo\(\) - -``` -int32_t OHOS::Audio::AudioCapturer::GetCapturerInfo ([AudioCapturerInfo](OHOS-Audio-AudioCapturerInfo.md) & info) -``` - - **Description:** - -Obtains audio capture parameters. - -This function can be called after [SetCapturerInfo](MultiMedia_AudioCapturer.md#gae2cf055c840ece71e22cb64c98c68a19) is successful. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
infoIndicates information about audio capture parameters. For details, see AudioCapturerInfo.
- -**Returns:** - -Returns **SUCCESS** if the parameter information is successfully obtained; returns an error code defined in [media\_errors.h](media_errors-h.md) otherwise. - -## GetFrameCount\(\) - -``` -uint64_t OHOS::Audio::AudioCapturer::GetFrameCount () -``` - - **Description:** - -Obtains the number of frames required in the current condition, in bytes per sample. - -**Returns:** - -Returns the number of frames \(in bytes per sample\) if the operation is successful; returns **-1** if an exception occurs. - -## GetMinFrameCount\(\) - -``` -static bool OHOS::Audio::AudioCapturer::GetMinFrameCount (int32_t sampleRate, int32_t channelCount, [AudioCodecFormat](MultiMedia_MediaCommon.md#gaa4ea6f314644ed287e0704be26c768b7) audioFormat, size_t & frameCount ) -``` - - **Description:** - -Obtains the minimum number of frames required in a specified condition, in bytes per sample. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
sampleRateIndicates the audio sampling rate, in Hz.
channelCountIndicates the number of audio recording channels.
audioFormatIndicates the audio data format.
frameCountIndicates the minimum number of frames, in bytes per sample.
- -**Returns:** - -Returns **true** if the minimum number of frames is successfully obtained; returns **false** otherwise. - -## GetStatus\(\) - -``` -[State](MultiMedia_AudioCapturer.md#ga3d8d6798a2346e57e241d16da673d508) OHOS::Audio::AudioCapturer::GetStatus () -``` - - **Description:** - -Obtains the audio capture state. - -**Returns:** - -Returns the audio capture state defined in [State](AbilityKit.md#ga5d74787dedbc4e11c1ab15bf487e61f8). - -## Read\(\) - -``` -int32_t OHOS::Audio::AudioCapturer::Read (uint8_t * buffer, size_t userSize, bool isBlockingRead ) -``` - - **Description:** - -Reads audio data. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
bufferIndicates the pointer to the buffer into which the audio data is to be written.
userSizeIndicates the size of the buffer into which the audio data is to be written, in bytes. userSize >= frameCount * channelCount * BytesPerSample must evaluate to true. You can call GetFrameCount to obtain the frameCount value.
isBlockingReadSpecifies whether data reading will be blocked.
- -**Returns:** - -Returns the size of the audio data read from the device. The value ranges from **0** to **userSize**. If the reading fails, one of the following error codes is returned: **ERR\_INVALID\_PARAM**: The input parameter is incorrect. **ERR\_ILLEGAL\_STATE**: The **[AudioCapturer](OHOS-Audio-AudioCapturer.md)** instance is not initialized. **ERR\_SOURCE\_NOT\_SET**: The state of hardware device instance is abnormal. - -## Release\(\) - -``` -bool OHOS::Audio::AudioCapturer::Release () -``` - - **Description:** - -Releases a local **[AudioCapturer](OHOS-Audio-AudioCapturer.md)** object. - -**Returns:** - -Returns **true** if the object is successfully released; returns **false** otherwise. - -## SetCapturerInfo\(\) - -``` -int32_t OHOS::Audio::AudioCapturer::SetCapturerInfo (const [AudioCapturerInfo](OHOS-Audio-AudioCapturerInfo.md) info) -``` - - **Description:** - -Sets audio capture parameters. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
infoIndicates information about audio capture parameters to set. For details, see AudioCapturerInfo.
- -**Returns:** - -Returns **SUCCESS** if the setting is successful; returns an error code defined in [media\_errors.h](media_errors-h.md) otherwise. - -## Start\(\) - -``` -bool OHOS::Audio::AudioCapturer::Start () -``` - - **Description:** - -Starts audio recording. - -**Returns:** - -Returns **true** if the recording is successfully started; returns **false** otherwise. - -## Stop\(\) - -``` -bool OHOS::Audio::AudioCapturer::Stop () -``` - - **Description:** - -Stops audio recording. - -**Returns:** - -Returns **true** if the recording is successfully stopped; returns **false** otherwise. - -## **Variable ** - -## audioFormat - -``` -[AudioCodecFormat](MultiMedia_MediaCommon.md#gaa4ea6f314644ed287e0704be26c768b7) OHOS::Audio::AudioCapturerInfo::audioFormat = [AUDIO_DEFAULT](MultiMedia_MediaCommon.md#ggaa4ea6f314644ed287e0704be26c768b7a4c4c5829b054bc468274700c56d65546) -``` - - **Description:** - -Audio codec format - -## bitRate - -``` -int32_t OHOS::Audio::AudioCapturerInfo::bitRate = 0 -``` - - **Description:** - -Bit rate - -## bitWidth - -``` -[AudioBitWidth](MultiMedia_MediaCommon.md#gae3e35ee2a2222a667fdebbc5b793ca7c) OHOS::Audio::AudioCapturerInfo::bitWidth = [BIT_WIDTH_16](MultiMedia_MediaCommon.md#ggae3e35ee2a2222a667fdebbc5b793ca7ca036f0b45813f96cb6b0f90de1722a780) -``` - - **Description:** - -Bit width - -## channelCount - -``` -int32_t OHOS::Audio::AudioCapturerInfo::channelCount = 0 -``` - - **Description:** - -Number of audio channels - -## inputSource - -``` -[AudioSourceType](MultiMedia_MediaCommon.md#gadc3158e093b995ca7b9b6aa32388ccdd) OHOS::Audio::AudioCapturerInfo::inputSource = [AUDIO_MIC](MultiMedia_MediaCommon.md#ggadc3158e093b995ca7b9b6aa32388ccdda732604b3a24d137429e2b83b31849bce) -``` - - **Description:** - -Audio source type - -## sampleRate - -``` -int32_t OHOS::Audio::AudioCapturerInfo::sampleRate = 0 -``` - - **Description:** - -Sampling rate - -## streamType - -``` -[AudioStreamType](MultiMedia_MediaCommon.md#gae7077e4211e48131ae544adb20fc494a) OHOS::Audio::AudioCapturerInfo::streamType = [TYPE_MEDIA](MultiMedia_MediaCommon.md#ggae7077e4211e48131ae544adb20fc494aa431e273affaa22e18ec5a2a548b70e90) -``` - - **Description:** - -Audio stream type - diff --git a/api/api-SmartVision-Devices/MultiMedia_Camera.md b/api/api-SmartVision-Devices/MultiMedia_Camera.md deleted file mode 100755 index e64c9405c18acb90e54b14e50c49e93181824162..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/MultiMedia_Camera.md +++ /dev/null @@ -1,330 +0,0 @@ -# MultiMedia\_Camera - -- [Overview](#section1860299487165625) -- [Summary](#section982156197165625) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Functions](#func-members) -- [Details](#section461139492165625) -- [Function](#section1840478202165625) -- [Camera\(\)](#ga7df4eba3316a6fe7c623e420c0a295e5) -- [Configure\(\)](#ga5f240a74fefa168cbf94b4603b76ef7b) -- [GetCameraConfig\(\)](#ga04cc021b827824d0363037b630326264) -- [GetCameraId\(\)](#ga4b6fec3c9290e7d388147dcdd288b918) -- [GetFrameConfig\(\)](#ga4e3f97ac484b85cd221a996689a3de61) -- [Release\(\)](#ga7986d17e54fe9cd77df9465287fa5643) -- [StopLoopingCapture\(\)](#ga564c26b845affb1dbe05d4d7982ed1ad) -- [TriggerLoopingCapture\(\)](#ga1cd68b1b385da5224dbfdb6993c5cf08) -- [TriggerSingleCapture\(\)](#gac05d783b1655fe505a4afa23496d7e84) -- [\~Camera\(\)](#gab24c0e4ca1e15bb2a481fb1550955611) - -## **Overview** - -**Description:** - -Defines the **Camera** class for camera-related operations. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - -

File Name

-

Description

-

camera.h

-

Declares functions in the Camera class to implement camera operations.

-
- -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

OHOS::Media::Camera

-

Provides functions in the Camera class to implement camera operations. operations.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

OHOS::Media::Camera::~Camera ()=default

-

virtual

-

A destructor used to delete the Camera instance.

-

OHOS::Media::Camera::GetCameraId ()

-

virtual std::string

-

Obtains the camera ID.

-

OHOS::Media::Camera::GetCameraConfig () const

-

virtual const CameraConfig *

-

Obtains the camera configuration. You can use the obtained CameraConfig object to configure the camera.

-

OHOS::Media::Camera::GetFrameConfig (int32_t type)

-

virtual FrameConfig *

-

Obtains the frame configuration.

-

OHOS::Media::Camera::Configure (CameraConfig &config)

-

virtual void

-

Configures the camera using the CameraConfig object.

-

OHOS::Media::Camera::TriggerLoopingCapture (FrameConfig &frameConfig)

-

virtual int32_t

-

Triggers looping-frame capture.

-

OHOS::Media::Camera::StopLoopingCapture ()

-

virtual void

-

Stops looping-frame capture.

-

OHOS::Media::Camera::TriggerSingleCapture (FrameConfig &frameConfig)

-

virtual int32_t

-

Starts single-frame capture. The frame parameters are set through the FrameConfig object, and the captured image data is stored in the surface of the FrameConfig object.

-

OHOS::Media::Camera::Release ()

-

virtual void

-

Releases the Camera object and associated resources.

-

OHOS::Media::Camera::Camera ()=default

-

-

A constructor used to create a Camera instance.

-
- -## **Details** - -## **Function ** - -## Camera\(\) - -``` -OHOS::Media::Camera::Camera () -``` - - **Description:** - -A constructor used to create a **[Camera](OHOS-Media-Camera.md)** instance. - -## Configure\(\) - -``` -virtual void OHOS::Media::Camera::Configure ([CameraConfig](OHOS-Media-CameraConfig.md) & config) -``` - - **Description:** - -Configures the camera using the **[CameraConfig](OHOS-Media-CameraConfig.md)** object. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
configIndicates the pointer to the CameraConfig object.
- -## GetCameraConfig\(\) - -``` -virtual const [CameraConfig](OHOS-Media-CameraConfig.md)* OHOS::Media::Camera::GetCameraConfig () const -``` - - **Description:** - -Obtains the camera configuration. You can use the obtained **[CameraConfig](OHOS-Media-CameraConfig.md)** object to configure the camera. - -**Returns:** - -Returns the pointer to the **[CameraConfig](OHOS-Media-CameraConfig.md)** object if obtained; returns **NULL** otherwise. - -## GetCameraId\(\) - -``` -virtual std::string OHOS::Media::Camera::GetCameraId () -``` - - **Description:** - -Obtains the camera ID. - -**Returns:** - -Returns the camera ID if obtained; returns the "Error" string if the camera fails to be created. - -## GetFrameConfig\(\) - -``` -virtual [FrameConfig](OHOS-Media-FrameConfig.md)* OHOS::Media::Camera::GetFrameConfig (int32_t type) -``` - - **Description:** - -Obtains the frame configuration. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
typeIndicates the type of the frame configuration.
- -**Returns:** - -Returns the pointer to the **[FrameConfig](OHOS-Media-FrameConfig.md)** object if obtained; returns **NULL** otherwise. - -## Release\(\) - -``` -virtual void OHOS::Media::Camera::Release () -``` - - **Description:** - -Releases the **[Camera](OHOS-Media-Camera.md)** object and associated resources. - -## StopLoopingCapture\(\) - -``` -virtual void OHOS::Media::Camera::StopLoopingCapture () -``` - - **Description:** - -Stops looping-frame capture. - -**Returns:** - -Returns **true** if the looping-frame capture is successfully stopped; returns **false** otherwise. - -## TriggerLoopingCapture\(\) - -``` -virtual int32_t OHOS::Media::Camera::TriggerLoopingCapture ([FrameConfig](OHOS-Media-FrameConfig.md) & frameConfig) -``` - - **Description:** - -Triggers looping-frame capture. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
fcIndicates the frame configuration.
- -**Returns:** - -Returns **true** if the looping-frame capture is successfully started; returns **false** otherwise. - -## TriggerSingleCapture\(\) - -``` -virtual int32_t OHOS::Media::Camera::TriggerSingleCapture ([FrameConfig](OHOS-Media-FrameConfig.md) & frameConfig) -``` - - **Description:** - -Starts single-frame capture. The frame parameters are set through the **[FrameConfig](OHOS-Media-FrameConfig.md)** object, and the captured image data is stored in the surface of the **[FrameConfig](OHOS-Media-FrameConfig.md)** object. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
fcIndicates the frame configuration.
- -**Returns:** - -Returns **true** if the single-frame capture is successfully started and the data is stored; returns **false** otherwise. - -## \~Camera\(\) - -``` -virtual OHOS::Media::Camera::~Camera () -``` - - **Description:** - -A destructor used to delete the **[Camera](OHOS-Media-Camera.md)** instance. - diff --git a/api/api-SmartVision-Devices/MultiMedia_CameraAbility.md b/api/api-SmartVision-Devices/MultiMedia_CameraAbility.md deleted file mode 100755 index ddb28c1b8143bf68e2141a4437d8b9f4f38d5934..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/MultiMedia_CameraAbility.md +++ /dev/null @@ -1,221 +0,0 @@ -# MultiMedia\_CameraAbility - -- [Overview](#section59896362165625) -- [Summary](#section1342120614165625) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Functions](#func-members) -- [Details](#section1351292470165625) -- [Function](#section23304000165625) -- [CameraAbility\(\)](#ga7f1b94b32f7c7b121ea14b3147788497) -- [GetParameterRange\(\)](#ga3fb9142cc5bbeafef3201ecaaf50c737) -- [GetSupportedSizes\(\)](#ga840850d531b96cc5a829b257ade3c7e6) -- [SetParameterRange\(\)](#ga23410306b850fe7edcb736f50fe8048d) -- [\~CameraAbility\(\)](#ga797435bcd10278e33fb7b6f4951f0d7f) - -## **Overview** - -**Description:** - -Defines the camera capability set for applications to achieve and access the capabilities. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - -

File Name

-

Description

-

camera_ability.h

-

Declares functions of the CameraAbility class.

-
- -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

OHOS::Media::CameraAbility

-

Declares functions of the CameraAbility class.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

OHOS::Media::CameraAbility::CameraAbility ()

-

-

A constructor used to create a CameraAbility instance.

-

OHOS::Media::CameraAbility::~CameraAbility ()

-

virtual

-

A destructor used to delete the CameraAbility instance.

-

OHOS::Media::CameraAbility::GetSupportedSizes (int format) const

-

std::list< CameraPicSize >

-

Obtains the supported image sizes for a specified image format.

-

OHOS::Media::CameraAbility::SetParameterRange (uint32_t key, std::list< T > rangeList)

-

template<typename T > int32_t

-

Sets value ranges for a specified parameter.

-

OHOS::Media::CameraAbility::GetParameterRange (uint32_t key) const

-

template<typename T > std::list< T >

-

Obtains the parameter value range based on a specified parameter key.

-
- -## **Details** - -## **Function ** - -## CameraAbility\(\) - -``` -OHOS::Media::CameraAbility::CameraAbility () -``` - - **Description:** - -A constructor used to create a **[CameraAbility](OHOS-Media-CameraAbility.md)** instance. - -## GetParameterRange\(\) - -``` -std::list OHOS::Media::CameraAbility::GetParameterRange (uint32_t key) const -``` - - **Description:** - -Obtains the parameter value range based on a specified parameter key. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
keyIndicates the parameter key.
- -**Returns:** - -Returns the parameter value range if obtained; returns **NULL** otherwise. - -## GetSupportedSizes\(\) - -``` -std::list OHOS::Media::CameraAbility::GetSupportedSizes (int format) const -``` - - **Description:** - -Obtains the supported image sizes for a specified image format. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
formatIndicates the image format, which can be YUV, H.265, or H.264.
- -**Returns:** - -Returns the image size list if obtained; returns **NULL** otherwise. - -## SetParameterRange\(\) - -``` -int32_t OHOS::Media::CameraAbility::SetParameterRange (uint32_t key, std::list< T > rangeList ) -``` - - **Description:** - -Sets value ranges for a specified parameter. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the parameter key.
rangeListIndicates the list of parameter value ranges.
- -**Returns:** - -Returns **SUCCESS** if the setting is successful; returns **FAIL** otherwise. - -## \~CameraAbility\(\) - -``` -virtual OHOS::Media::CameraAbility::~CameraAbility () -``` - - **Description:** - -A destructor used to delete the **[CameraAbility](OHOS-Media-CameraAbility.md)** instance. - diff --git a/api/api-SmartVision-Devices/MultiMedia_CameraConfig.md b/api/api-SmartVision-Devices/MultiMedia_CameraConfig.md deleted file mode 100755 index ebc1153760e54eac2c08635f7a7557ac559801ae..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/MultiMedia_CameraConfig.md +++ /dev/null @@ -1,208 +0,0 @@ -# MultiMedia\_CameraConfig - -- [Overview](#section1789785181165625) -- [Summary](#section287889359165625) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Functions](#func-members) -- [Details](#section738387907165625) -- [Function](#section32055410165625) -- [CameraConfig\(\)](#ga6cca70f5dea34d6ede94d0b258c0a350) -- [CreateCameraConfig\(\)](#ga26f37610abb783b48d3e94662523fa94) -- [GetEventHandler\(\)](#ga65d8bb0bd5d996e51e4c6fa12a33931b) -- [GetFrameStateCb\(\)](#gae4864312836d34b9ad56675ed3e523a1) -- [SetFrameStateCallback\(\)](#gaf6d7f82e9439dce13b0213f84a35ab59) -- [\~CameraConfig\(\)](#ga6730b1ff3808a97fe7095c1cd016d47c) - -## **Overview** - -**Description:** - -Defines the **CameraConfig** class for operations on camera configurations. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - -

File Name

-

Description

-

camera_config.h

-

Declares functions in the CameraConfig class.

-
- -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

OHOS::Media::CameraConfig

-

Provides functions to configure camera parameters.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

OHOS::Media::CameraConfig::~CameraConfig ()

-

virtual

-

A destructor used to delete the CameraAbility instance.

-

OHOS::Media::CameraConfig::CreateCameraConfig ()

-

static CameraConfig *

-

Creates the CameraConfig instance of this singleton class to configure and read the required parameters.

-

OHOS::Media::CameraConfig::SetFrameStateCallback (FrameStateCallback *callback, EventHandler *handler)

-

virtual void

-

Sets a frame state callback to responds to state changes.

-

OHOS::Media::CameraConfig::GetEventHandler () const

-

virtual EventHandler *

-

Obtains the EventHandler object.

-

OHOS::Media::CameraConfig::GetFrameStateCb () const

-

virtual FrameStateCallback *

-

Obtains a FrameStateCallback object.

-

OHOS::Media::CameraConfig::CameraConfig ()

-

-

A constructor used to create a CameraConfig instance.

-
- -## **Details** - -## **Function ** - -## CameraConfig\(\) - -``` -OHOS::Media::CameraConfig::CameraConfig () -``` - - **Description:** - -A constructor used to create a **[CameraConfig](OHOS-Media-CameraConfig.md)** instance. - -## CreateCameraConfig\(\) - -``` -static [CameraConfig](OHOS-Media-CameraConfig.md)* OHOS::Media::CameraConfig::CreateCameraConfig () -``` - - **Description:** - -Creates the **[CameraConfig](OHOS-Media-CameraConfig.md)** instance of this singleton class to configure and read the required parameters. - -**Returns:** - -Returns the **[CameraConfig](OHOS-Media-CameraConfig.md)** instance if created; returns **NULL** otherwise. - -## GetEventHandler\(\) - -``` -virtual EventHandler* OHOS::Media::CameraConfig::GetEventHandler () const -``` - - **Description:** - -Obtains the **EventHandler** object. - -**Returns:** - -Returns the pointer to the **EventHandler** object if obtained; returns **NULL** otherwise. - -## GetFrameStateCb\(\) - -``` -virtual [FrameStateCallback](OHOS-Media-FrameStateCallback.md)* OHOS::Media::CameraConfig::GetFrameStateCb () const -``` - - **Description:** - -Obtains a **[FrameStateCallback](OHOS-Media-FrameStateCallback.md)** object. - -**Returns:** - -Returns the pointer to the **[FrameStateCallback](OHOS-Media-FrameStateCallback.md)** object if obtained; returns **NULL** otherwise. - -## SetFrameStateCallback\(\) - -``` -virtual void OHOS::Media::CameraConfig::SetFrameStateCallback ([FrameStateCallback](OHOS-Media-FrameStateCallback.md) * callback, EventHandler * handler ) -``` - - **Description:** - -Sets a frame state callback to responds to state changes. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
callbackIndicates the frame state callback.
handlerIndicates the event handler.
- -## \~CameraConfig\(\) - -``` -virtual OHOS::Media::CameraConfig::~CameraConfig () -``` - - **Description:** - -A destructor used to delete the **[CameraAbility](OHOS-Media-CameraAbility.md)** instance. - diff --git a/api/api-SmartVision-Devices/MultiMedia_CameraDeviceCallback.md b/api/api-SmartVision-Devices/MultiMedia_CameraDeviceCallback.md deleted file mode 100644 index 7c7556b0b3f9ac4b89118c1e5d5ce0732741fd92..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/MultiMedia_CameraDeviceCallback.md +++ /dev/null @@ -1,145 +0,0 @@ -# MultiMedia\_CameraDeviceCallback - -- [Overview](#section416119496165625) -- [Summary](#section1288812454165625) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Functions](#func-members) -- [Details](#section1524132779165625) -- [Function](#section2055406260165625) -- [CameraDeviceCallback\(\)](#ga5e81f9fa5dd53d9d1f8ca0cc4497fd59) -- [OnCameraStatus\(\)](#ga2ae4d3d8ae13f73986f8dc7cf4bb7960) -- [\~CameraDeviceCallback\(\)](#gac88b6972227ec2ba65feeb15c31aea83) - -## **Overview** - -**Description:** - -Defines the **CameraDeviceCallback** class to response to device changes. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - -

File Name

-

Description

-

camera_device_callback.h

-

Declares functions in the CameraDeviceCallback class to response to device changes.

-
- -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

OHOS::Media::CameraDeviceCallback

-

Provides functions to response to device changes.

-
- -## Functions - - - - - - - - - - - - - - - - -

Function

-

Description

-

OHOS::Media::CameraDeviceCallback::CameraDeviceCallback ()=default

-

-

A constructor used to create a CameraDeviceCallback instance.

-

OHOS::Media::CameraDeviceCallback::~CameraDeviceCallback ()=default

-

virtual

-

A destructor used to delete the CameraDeviceCallback instance.

-

OHOS::Media::CameraDeviceCallback::OnCameraStatus (std::string cameraId, int32_t status)

-

virtual void

-

Called when the camera state changes.

-
- -## **Details** - -## **Function ** - -## CameraDeviceCallback\(\) - -``` -OHOS::Media::CameraDeviceCallback::CameraDeviceCallback () -``` - - **Description:** - -A constructor used to create a **[CameraDeviceCallback](OHOS-Media-CameraDeviceCallback.md)** instance. - -## OnCameraStatus\(\) - -``` -virtual void OHOS::Media::CameraDeviceCallback::OnCameraStatus (std::string cameraId, int32_t status ) -``` - - **Description:** - -Called when the camera state changes. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
cameraIdIndicates the camera ID.
statusIndicates the camera state.
- -## \~CameraDeviceCallback\(\) - -``` -virtual OHOS::Media::CameraDeviceCallback::~CameraDeviceCallback () -``` - - **Description:** - -A destructor used to delete the **[CameraDeviceCallback](OHOS-Media-CameraDeviceCallback.md)** instance. - diff --git a/api/api-SmartVision-Devices/MultiMedia_CameraKit.md b/api/api-SmartVision-Devices/MultiMedia_CameraKit.md deleted file mode 100755 index 5a45df940662aaf009e14fd219e10fcfcc826c4c..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/MultiMedia_CameraKit.md +++ /dev/null @@ -1,276 +0,0 @@ -# MultiMedia\_CameraKit - -- [Overview](#section2120628768165625) -- [Summary](#section2055549443165625) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Functions](#func-members) -- [Details](#section1483794495165625) -- [Function](#section1531552527165625) -- [CreateCamera\(\)](#gaa21f4e248e3a46a4f78f4261cba82fe2) -- [GetCameraAbility\(\)](#gab4cfb051de29415d080a203ca4639448) -- [GetCameraIds\(\)](#ga8894d876198f2614d65b432a8a002163) -- [GetInstance\(\)](#ga1911ba8eca0e57ddc15df25cf2b21f7b) -- [RegisterCameraDeviceCallback\(\)](#ga4e6cd8787f06c4a82ad982d36029b3ec) -- [UnregisterCameraDeviceCallback\(\)](#ga4f0117575ee988f6d74a3636e01f0aba) -- [\~CameraKit\(\)](#ga7d36867ec1bd57e25d1c60b5de24cbe6) - -## **Overview** - -**Description:** - -Defines the **CameraKit** class for using camera functionalities. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - -

File Name

-

Description

-

camera_kit.h

-

Declares functions in the CameraKit class.

-
- -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

OHOS::Media::CameraKit

-

Provides functions in the CameraKit class.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

OHOS::Media::CameraKit::~CameraKit ()

-

-

A destructor used to delete the CameraKit instance.

-

OHOS::Media::CameraKit::GetInstance ()

-

static CameraKit *

-

Obtains a single instance of the CameraKit.

-

OHOS::Media::CameraKit::GetCameraIds ()

-

std::list< std::string >

-

Obtains IDs of cameras that are currently available.

-

OHOS::Media::CameraKit::GetCameraAbility (std::string cameraId)

-

const CameraAbility *

-

Obtains the camera capability, including the resolutions and frame rates.

-

OHOS::Media::CameraKit::RegisterCameraDeviceCallback (CameraDeviceCallback &callback, EventHandler &handler)

-

void

-

Registers a camera callback for camera status changes and an event callback to respond to a triggered event.

-

OHOS::Media::CameraKit::UnregisterCameraDeviceCallback (CameraDeviceCallback &callback)

-

void

-

Unregisters a camera callback.

-

OHOS::Media::CameraKit::CreateCamera (const std::string &cameraId, CameraStateCallback &callback, EventHandler &handler)

-

void

-

Creates a camera object.

-
- -## **Details** - -## **Function ** - -## CreateCamera\(\) - -``` -void OHOS::Media::CameraKit::CreateCamera (const std::string & cameraId, [CameraStateCallback](OHOS-Media-CameraStateCallback.md) & callback, EventHandler & handler ) -``` - - **Description:** - -Creates a camera object. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
cameraIdIndicates the camera ID.
callbackIndicates the camera callback.
handlerIndicates the event callback to register.
- -## GetCameraAbility\(\) - -``` -const [CameraAbility](OHOS-Media-CameraAbility.md)* OHOS::Media::CameraKit::GetCameraAbility (std::string cameraId) -``` - - **Description:** - -Obtains the camera capability, including the resolutions and frame rates. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
cameraIdIndicates the camera ID.
- -**Returns:** - -Returns the **[CameraAbility](OHOS-Media-CameraAbility.md)** object. - -## GetCameraIds\(\) - -``` -std::list OHOS::Media::CameraKit::GetCameraIds () -``` - - **Description:** - -Obtains IDs of cameras that are currently available. - -**Returns:** - -Returns the camera IDs if obtained; returns **NULL** otherwise. - -## GetInstance\(\) - -``` -static [CameraKit](OHOS-Media-CameraKit.md)* OHOS::Media::CameraKit::GetInstance () -``` - - **Description:** - -Obtains a single instance of the **[CameraKit](OHOS-Media-CameraKit.md)**. - -**Returns:** - -Returns the **[CameraKit](OHOS-Media-CameraKit.md)** instance if obtained; returns **NULL** otherwise. - -## RegisterCameraDeviceCallback\(\) - -``` -void OHOS::Media::CameraKit::RegisterCameraDeviceCallback ([CameraDeviceCallback](OHOS-Media-CameraDeviceCallback.md) & callback, EventHandler & handler ) -``` - - **Description:** - -Registers a camera callback for camera status changes and an event callback to respond to a triggered event. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
callbackIndicates the camera callback to register.
handlerIndicates the event callback to register.
- -## UnregisterCameraDeviceCallback\(\) - -``` -void OHOS::Media::CameraKit::UnregisterCameraDeviceCallback ([CameraDeviceCallback](OHOS-Media-CameraDeviceCallback.md) & callback) -``` - - **Description:** - -Unregisters a camera callback. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
callbackIndicates the camera callback to unregister.
- -## \~CameraKit\(\) - -``` -OHOS::Media::CameraKit::~CameraKit () -``` - - **Description:** - -A destructor used to delete the **[CameraKit](OHOS-Media-CameraKit.md)** instance. - diff --git a/api/api-SmartVision-Devices/MultiMedia_CameraStateCallback.md b/api/api-SmartVision-Devices/MultiMedia_CameraStateCallback.md deleted file mode 100755 index 757f6e274e220666df48c85058474d0c4259662e..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/MultiMedia_CameraStateCallback.md +++ /dev/null @@ -1,276 +0,0 @@ -# MultiMedia\_CameraStateCallback - -- [Overview](#section1165669900165625) -- [Summary](#section777205647165625) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Functions](#func-members) -- [Details](#section583980644165625) -- [Function](#section1662647736165625) -- [CameraStateCallback\(\)](#gaa9499b36ed4aac41a67065f62342df70) -- [OnConfigured\(\)](#ga5a0115afe9c5a7ddf8e9acd93a03fd21) -- [OnConfigureFailed\(\)](#gab334119760044ef810ce8ac2301c0d16) -- [OnCreated\(\)](#ga29901c517d444a013d44a99350905390) -- [OnCreateFailed\(\)](#ga9844a6e2c1d4295fe23537a918bdc683) -- [OnReleased\(\)](#ga4351c9011831fe3e93d986e5a287fe80) -- [\~CameraStateCallback\(\)](#ga80ba3b334f93c4d9cab07bc749813f9a) - -## **Overview** - -**Description:** - -Provides callbacks for camera states to configure responses to the states. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - -

File Name

-

Description

-

camera_state_callback.h

-

Declares functions in the CameraStateCallback class.

-
- -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

OHOS::Media::CameraStateCallback

-

Provides functions to response to camera states.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

OHOS::Media::CameraStateCallback::CameraStateCallback ()=default

-

-

A constructor used to create a CameraStateCallback instance.

-

OHOS::Media::CameraStateCallback::~CameraStateCallback ()

-

virtual

-

A destructor used to delete the CameraStateCallback instance.

-

OHOS::Media::CameraStateCallback::OnCreated (Camera &c)

-

virtual void

-

Called when the camera is successfully created.

-

OHOS::Media::CameraStateCallback::OnCreateFailed (const std::string cameraId, int32_t errorCode)

-

virtual void

-

Called when the camera fails to be created.

-

OHOS::Media::CameraStateCallback::OnReleased (Camera &c)

-

virtual void

-

Called when the camera is released.

-

OHOS::Media::CameraStateCallback::OnConfigured (Camera &c)

-

virtual void

-

Called when the camera is configured.

-

OHOS::Media::CameraStateCallback::OnConfigureFailed (const std::string cameraId, int32_t errorCode)

-

virtual void

-

Called when the camera fails to be configured.

-
- -## **Details** - -## **Function ** - -## CameraStateCallback\(\) - -``` -OHOS::Media::CameraStateCallback::CameraStateCallback () -``` - - **Description:** - -A constructor used to create a **[CameraStateCallback](OHOS-Media-CameraStateCallback.md)** instance. - -## OnConfigured\(\) - -``` -virtual void OHOS::Media::CameraStateCallback::OnConfigured ([Camera](OHOS-Media-Camera.md) & c) -``` - - **Description:** - -Called when the camera is configured. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
ccamera Indicates the Camera object.
- -## OnConfigureFailed\(\) - -``` -virtual void OHOS::Media::CameraStateCallback::OnConfigureFailed (const std::string cameraId, int32_t errorCode ) -``` - - **Description:** - -Called when the camera fails to be configured. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
cIndicates the Camera object.
errorCodeIndicates the error code.
- -## OnCreated\(\) - -``` -virtual void OHOS::Media::CameraStateCallback::OnCreated ([Camera](OHOS-Media-Camera.md) & c) -``` - - **Description:** - -Called when the camera is successfully created. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
cIndicates the Camera object.
- -## OnCreateFailed\(\) - -``` -virtual void OHOS::Media::CameraStateCallback::OnCreateFailed (const std::string cameraId, int32_t errorCode ) -``` - - **Description:** - -Called when the camera fails to be created. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
cameraIdIndicates the camera ID.
errorCodeIndicates the error code.
- -## OnReleased\(\) - -``` -virtual void OHOS::Media::CameraStateCallback::OnReleased ([Camera](OHOS-Media-Camera.md) & c) -``` - - **Description:** - -Called when the camera is released. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
cIndicates the Camera object.
- -## \~CameraStateCallback\(\) - -``` -virtual OHOS::Media::CameraStateCallback::~CameraStateCallback () -``` - - **Description:** - -A destructor used to delete the **[CameraStateCallback](OHOS-Media-CameraStateCallback.md)** instance. - diff --git a/api/api-SmartVision-Devices/MultiMedia_FrameConfig.md b/api/api-SmartVision-Devices/MultiMedia_FrameConfig.md deleted file mode 100755 index 46e8464411bdf45e7fcb8be5c5b117c3455b8731..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/MultiMedia_FrameConfig.md +++ /dev/null @@ -1,315 +0,0 @@ -# MultiMedia\_FrameConfig - -- [Overview](#section1826838220165625) -- [Summary](#section2063584699165625) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Functions](#func-members) -- [Details](#section562581684165625) -- [Function](#section1303191587165625) -- [AddSurface\(\)](#ga16760311713db03bf06ea0a6d6622013) -- [FrameConfig\(\) \[1/2\]](#ga043537d52f5db46d981f9e89848b0fba) -- [FrameConfig\(\) \[2/2\]](#gac8f74ff3689605a59a17997bdeaec1fc) -- [GetFrameConfigType\(\)](#ga382977445a583ed0424c5ccf581e824c) -- [GetParameter\(\)](#ga05147491c6e25df54d75d5ed0c201d65) -- [GetSurfaces\(\)](#ga955d04df96c009e4699ea6ed46d9e758) -- [RemoveSurface\(\)](#ga9ac4bc5e52840ee579482a3836774762) -- [SetParameter\(\)](#ga6b4ee39d1c1bf219e4a84df470f6007a) -- [\~FrameConfig\(\)](#gaa2e58c2ce602d9263b76596374823616) - -## **Overview** - -**Description:** - -Defines the **FrameConfig** class for operations related to frame configurations. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - -

File Name

-

Description

-

frame_config.h

-

Declares APIs of the FrameConfig class.

-
- -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

OHOS::Media::FrameConfig

-

Provides functions to configure frames.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

OHOS::Media::FrameConfig::FrameConfig ()=delete

-

-

A constructor used to create a FrameConfig instance.

-

OHOS::Media::FrameConfig::FrameConfig (int32_t type)

-

-

A constructor used to create a FrameConfig instance based on the configuration mode.

-

OHOS::Media::FrameConfig::~FrameConfig ()

-

-

A destructor used to delete the FrameConfig instance.

-

OHOS::Media::FrameConfig::GetFrameConfigType ()

-

int32_t

-

Obtains the frame configuration type.

-

OHOS::Media::FrameConfig::GetSurfaces ()

-

std::list< Surface * >

-

Obtains a list of shared memories (surface objects).

-

OHOS::Media::FrameConfig::AddSurface (Surface &surface)

-

void

-

Adds a surface (an object of shared memory).

-

OHOS::Media::FrameConfig::RemoveSurface (Surface &surface)

-

void

-

Removes a surface (an object of shared memory). You can call this function to release the surface when your application does not need to obtain data.

-

OHOS::Media::FrameConfig::SetParameter (uint32_t key, const T value)

-

template<typename T > void

-

Sets the common parameter.

-

OHOS::Media::FrameConfig::GetParameter (uint32_t key, T &value)

-

template<typename T > void

-

Obtains the value of a common parameter based on its key. For details, see CAMERA_FUC_KEY.

-
- -## **Details** - -## **Function ** - -## AddSurface\(\) - -``` -void OHOS::Media::FrameConfig::AddSurface ([Surface](OHOS-Surface.md) & surface) -``` - - **Description:** - -Adds a surface \(an object of shared memory\). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
surfaceIndicates the surface to add.
- -## FrameConfig\(\) \[1/2\] - -``` -OHOS::Media::FrameConfig::FrameConfig () -``` - - **Description:** - -A constructor used to create a **[FrameConfig](OHOS-Media-FrameConfig.md)** instance. - -## FrameConfig\(\) \[2/2\] - -``` -OHOS::Media::FrameConfig::FrameConfig (int32_t type) -``` - - **Description:** - -A constructor used to create a **[FrameConfig](OHOS-Media-FrameConfig.md)** instance based on the configuration mode. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
typeIndicates the frame configuration mode, which can be FRAME_CONFIG_PREVIEW, <b>FRAME_CONFIG_RECORD, or FRAME_CONFIG_CAPTURE.
- -## GetFrameConfigType\(\) - -``` -int32_t OHOS::Media::FrameConfig::GetFrameConfigType () -``` - - **Description:** - -Obtains the frame configuration type. - -**Returns:** - -Returns the frame configuration type if obtained; returns **-1** otherwise. - -## GetParameter\(\) - -``` -void OHOS::Media::FrameConfig::GetParameter (uint32_t key, T & value ) -``` - - **Description:** - -Obtains the value of a common parameter based on its key. For details, see **CAMERA\_FUC\_KEY**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
keyIndicates the common parameter key.
- -## GetSurfaces\(\) - -``` -std::list<[Surface](OHOS-Surface.md) *> OHOS::Media::FrameConfig::GetSurfaces () -``` - - **Description:** - -Obtains a list of shared memories \(surface objects\). - -**Returns:** - -Returns the list of shared memories if obtained; returns **NULL** otherwise. - -## RemoveSurface\(\) - -``` -void OHOS::Media::FrameConfig::RemoveSurface ([Surface](OHOS-Surface.md) & surface) -``` - - **Description:** - -Removes a surface \(an object of shared memory\). You can call this function to release the surface when your application does not need to obtain data. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
surfaceIndicates the surface to remove.
- -## SetParameter\(\) - -``` -void OHOS::Media::FrameConfig::SetParameter (uint32_t key, const T value ) -``` - - **Description:** - -Sets the common parameter. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the common parameter key to set.
valueIndicates the common parameter value to set.
- -## \~FrameConfig\(\) - -``` -OHOS::Media::FrameConfig::~FrameConfig () -``` - - **Description:** - -A destructor used to delete the **[FrameConfig](OHOS-Media-FrameConfig.md)** instance. - diff --git a/api/api-SmartVision-Devices/MultiMedia_FrameStateCallback.md b/api/api-SmartVision-Devices/MultiMedia_FrameStateCallback.md deleted file mode 100755 index 55f7cceece5bc33c14309fc37527edafefa749a1..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/MultiMedia_FrameStateCallback.md +++ /dev/null @@ -1,189 +0,0 @@ -# MultiMedia\_FrameStateCallback - -- [Overview](#section594449935165625) -- [Summary](#section1998256790165625) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Functions](#func-members) -- [Details](#section1902417098165625) -- [Function](#section543315877165625) -- [FrameStateCallback\(\)](#gab2557f65a2744911b66361a895450d67) -- [OnFrameError\(\)](#ga8692c0a7433e0a98b6a6e364081c3b6a) -- [OnFrameFinished\(\)](#gaad7c0bd2d27255a8b63d0f5fb75f3b1e) -- [\~FrameStateCallback\(\)](#gad9ee33e328b523316313b79979b93abb) - -## **Overview** - -**Description:** - -Provides callbacks for frame state changes, in which you can implement operations to response to the changes. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - -

File Name

-

Description

-

camera_kit.h

-

Declares functions in the CameraKit class.

-
- -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

OHOS::Media::FrameStateCallback

-

Provides functions to listen for frame states and response to the state changes.

-
- -## Functions - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

OHOS::Media::FrameStateCallback::FrameStateCallback ()=default

-

-

A constructor used to create a FrameStateCallback instance.

-

OHOS::Media::FrameStateCallback::~FrameStateCallback ()=default

-

-

A destructor used to delete the FrameStateCallback instance.

-

OHOS::Media::FrameStateCallback::OnFrameFinished (Camera &camera, FrameConfig &frameConfig, FrameResult &frameResult)

-

virtual void

-

Called when the frame capture is finished.

-

OHOS::Media::FrameStateCallback::OnFrameError (Camera &camera, FrameConfig &frameConfig, int32_t errorCode, FrameResult &frameResult)

-

virtual void

-

Called when the frame capture fails.

-
- -## **Details** - -## **Function ** - -## FrameStateCallback\(\) - -``` -OHOS::Media::FrameStateCallback::FrameStateCallback () -``` - - **Description:** - -A constructor used to create a **[FrameStateCallback](OHOS-Media-FrameStateCallback.md)** instance. - -## OnFrameError\(\) - -``` -virtual void OHOS::Media::FrameStateCallback::OnFrameError ([Camera](OHOS-Media-Camera.md) & camera, [FrameConfig](OHOS-Media-FrameConfig.md) & frameConfig, int32_t errorCode, FrameResult & frameResult ) -``` - - **Description:** - -Called when the frame capture fails. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
cameraIndicates the camera.
frameConfigIndicates the frame configuration.
errorCodeIndicates the error code.
frameResultIndicates the capture results.
- -## OnFrameFinished\(\) - -``` -virtual void OHOS::Media::FrameStateCallback::OnFrameFinished ([Camera](OHOS-Media-Camera.md) & camera, [FrameConfig](OHOS-Media-FrameConfig.md) & frameConfig, FrameResult & frameResult ) -``` - - **Description:** - -Called when the frame capture is finished. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
cameraIndicates the camera.
frameConfigIndicates the frame configuration.
frameResultIndicates the capture results.
- -## \~FrameStateCallback\(\) - -``` -OHOS::Media::FrameStateCallback::~FrameStateCallback () -``` - - **Description:** - -A destructor used to delete the **[FrameStateCallback](OHOS-Media-FrameStateCallback.md)** instance. - diff --git a/api/api-SmartVision-Devices/MultiMedia_MediaCommon.md b/api/api-SmartVision-Devices/MultiMedia_MediaCommon.md deleted file mode 100755 index 94eec88c5d3f6a149521504a5fb17ec0868554eb..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/MultiMedia_MediaCommon.md +++ /dev/null @@ -1,2069 +0,0 @@ -# MultiMedia\_MediaCommon - -- [Overview](#section1004268445165625) -- [Summary](#section131157484165625) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Enumerations](#enum-members) -- [Functions](#func-members) -- [Details](#section217873255165625) -- [Enumeration Type](#section1898325319165625) -- [AudioBitWidth](#gae3e35ee2a2222a667fdebbc5b793ca7c) -- [AudioCodecFormat](#gaa4ea6f314644ed287e0704be26c768b7) -- [AudioSourceType](#gadc3158e093b995ca7b9b6aa32388ccdd) -- [AudioStreamType](#gae7077e4211e48131ae544adb20fc494a) -- [BufferFlags](#ga6f4847f443de5cdf3641386011335e21) -- [FormatDataType](#gaa3bfacc6563d8ec8bc870f4b216b4f46) -- [SourceType](#ga4052b7b55dfd94f1d07678e79d80b507) -- [VideoCodecFormat](#ga797e6c5e38e23e730eff5bcc41427d7e) -- [Function](#section1996891878165625) -- [CopyFrom\(\)](#ga528134c9f87bf755077b3ef51d64e198) -- [ErrCodeOffset\(\)](#ga5534cc5ecbcb6eb719f55d8695bbb481) -- [Format\(\)](#ga42435567c8fd61fd2da4834465aca98e) -- [GetBuffer\(\)](#ga8f897b8b2d5baf06e15accfeb97892ae) -- [GetDoubleValue\(\) \[1/2\]](#gafe949ed0c2d9dcb5c5e57c7fde226f3e) -- [GetDoubleValue\(\) \[2/2\]](#gac1ed56f6d35982f770d083dc16e97dbd) -- [GetFloatValue\(\) \[1/2\]](#gac4e963a9fe320c0143ed33df5f737cb3) -- [GetFloatValue\(\) \[2/2\]](#gada31b9cf5daa944104417442a5e459dc) -- [GetFormatMap\(\)](#ga4adff4846515cef00987a360a4d117af) -- [GetInt32Value\(\)](#gac116d67e5e80f1f9c1c573ceb24df36a) -- [GetInt64Value\(\)](#ga1f24cb15577c40f7044f4beb96515cfc) -- [GetIntValue\(\)](#ga798ef733a253558757f49714090b3969) -- [GetLongValue\(\)](#ga7f1c503f40b78083cb9b9ae9ce93d3b4) -- [GetSourceStream\(\)](#ga395325402881ad38ef40c9ebd13f174d) -- [GetSourceStreamFormat\(\)](#gafbd3c732660124a1dc1d9dd0dfb51393) -- [GetSourceType\(\)](#ga93a8f8b86a9385436f6bbce10a860770) -- [GetSourceUri\(\)](#ga69ed2683ce3a632f6b2295fb398e4b7b) -- [GetStringValue\(\) \[1/2\]](#ga089a3e44e128fb662b72c56b53c7068b) -- [GetStringValue\(\) \[2/2\]](#ga9687bb5d98a92e7beb53dfe4ac44eec1) -- [GetType\(\)](#ga178a65e0d58071de84e2dbc09ac93407) -- [OnBufferAvailable\(\)](#gaaebd4fe9df44b434f410aec32cf23467) -- [PutDoubleValue\(\)](#ga9a98a92eb4436301853a049b5f3313c6) -- [PutFloatValue\(\)](#gabec9417120824f5bb9eb676be380016f) -- [PutIntValue\(\)](#ga66771efe315d001e79a14d316c58718e) -- [PutLongValue\(\)](#ga5b4477636095d80ec4e65c1be617c61c) -- [PutStringValue\(\)](#gabdc104597559320256930f420eaab82f) -- [QueueBuffer\(\)](#gaa62705632557f47f9fd9632157e53a21) -- [SetParameters\(\)](#ga29f8c86744bda61f84920654c5f40df0) -- [SetStreamCallback\(\)](#ga078516891396a86226c945e02c79c1f5) -- [SetValue\(\) \[1/5\]](#gacbbf1dca947de8bce2e1a323a1c2664a) -- [SetValue\(\) \[2/5\]](#ga5e9360adeb46e7b147757ca22c65c268) -- [SetValue\(\) \[3/5\]](#gaa5ca8643885118cd0b3668d5497a90da) -- [SetValue\(\) \[4/5\]](#gaa1a80e9075010faca14c5c71855efe2d) -- [SetValue\(\) \[5/5\]](#gabb73fee1739b96b402a430f7879b2ca6) -- [Source\(\) \[1/2\]](#gae3640fec3bb0f33f4076dc30e88dac61) -- [Source\(\) \[2/2\]](#gab9bfa209ae382e3ba5d5242e8dfe5b20) -- [Variable](#section357746916165625) -- [BITRATE\_MODE\_CBR](#gaec6a6f6857ff914973ae8dbd6d24435d) -- [BITRATE\_MODE\_CQ](#gaa1ea5c3322d75d18fbff0422b758d602) -- [BITRATE\_MODE\_VBR](#gad5d276721fde992fff0b3302a6d2c1dc) -- [CODEC\_MIME](#ga1b77959b9e9bb70ec3f3a85ddba29f81) -- [COLOR\_FORMAT\_ARGB8888\_32BIT](#gaf8f714899f0b11248ea310f8b682ca52) -- [COLOR\_FORMAT\_YUV420SP](#ga4a599efd2466cfef88ed7c8332341f28) -- [deviceId](#gae354490defc2b40c8aeb7b98700cbbd0) -- [deviceName](#gaa24e76abf7ecc4088c6888128109d3e8) -- [ERR\_EARLY\_PREPARE](#ga780504ecfc7b140c8fcac6000d21d2cc) -- [ERR\_ILLEGAL\_STATE](#ga7d62e4ebba157bb7891397f67686da20) -- [ERR\_INVALID\_OPERATION](#gaea6d0afbc7c159296297185d13289c45) -- [ERR\_INVALID\_PARAM](#gab54ceb09402da2ac1bec5e93a95dd5a2) -- [ERR\_INVALID\_READ](#gaa3475307553e2de4dd7ef799bdc98c14) -- [ERR\_NOFREE\_CHANNEL](#ga59c64e4fd1f5890b84e263cb8f1b4a86) -- [ERR\_NOT\_STARTED](#ga09c48c16cb88d0f8860fb7bded0d1369) -- [ERR\_READ\_BUFFER](#ga93ac3a083852a72b74871883236586ca) -- [ERR\_SOURCE\_NOT\_SET](#gafad29c0ac3ef7729944bb907c9abc139) -- [ERR\_UNKNOWN](#gaac1feac62b2f5501fb7ea1903c9f2cfc) -- [ERROR](#ga9881ac3b69915a2e0e9c401759f77952) -- [inputSourceType](#ga8c4f565aa744ec55a784529a843f853e) -- [KEY\_IS\_SYNC\_FRAME](#gaa0ad827cdc16d18a73f280911c009cf1) -- [KEY\_TIME\_US](#gadac31555c0ac0612c9f72356f9eb1685) -- [MIME\_AUDIO\_AAC](#ga9cfdd72ca1bf4a012f2307985a37871f) -- [MIME\_AUDIO\_RAW](#ga28a526cce33c93a3c3b797ca94fe03e9) -- [SUCCESS](#gaad1937270d3d6c2012ed0e014bd2dc28) - -## **Overview** - -**Description:** - -Provides data types and media formats required for recording and playing audio and videos. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - - - - - - - - - - -

File Name

-

Description

-

format.h

-

Declares the media formats provided in the Format class.

-

media_errors.h

-

Declares the media_errors class to define errors that may occur during media operations.

-

media_info.h

-

Declares the media_info class and provides various audio, video, and codec types.

-

source.h

-

Declares the Source class, which is used to implement source-related operations.

-
- -## Data Structures - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

OHOS::Media::FormatData

-

Represents the data format.

-

OHOS::Media::Format

-

Saves and sets media metadata, such as the media playback duration.

-

AudioDeviceDesc

-

Defines the audio Device Descriptor.

-

OHOS::Media::StreamCallback

-

Provides functions to obtain the address of a buffer memory and write the filled buffers into the playback queue. You need to implement the StreamCallback functions in a player object.

-

OHOS::Media::StreamSource

-

Provides functions related to the stream source for upper-layer applications.

-

OHOS::Media::Source

-

Provides functions to implement source-related operations.

-
- -## Enumerations - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

OHOS::Media::FormatDataType : uint32_t { OHOS::Media::FORMAT_TYPE_NONE, OHOS::Media::FORMAT_TYPE_INT32, OHOS::Media::FORMAT_TYPE_INT64, OHOS::Media::FORMAT_TYPE_FLOAT, OHOS::Media::FORMAT_TYPE_DOUBLE, OHOS::Media::FORMAT_TYPE_STRING }

-

Enumerates formats.

-

AudioSourceType { AUDIO_SOURCE_INVALID = -1, AUDIO_SOURCE_DEFAULT = 0, AUDIO_MIC = 1, AUDIO_VOICE_UPLINK = 2, AUDIO_VOICE_DOWNLINK = 3, AUDIO_VOICE_CALL = 4, AUDIO_CAMCORDER = 5, AUDIO_VOICE_RECOGNITION = 6, AUDIO_VOICE_COMMUNICATION = 7, AUDIO_REMOTE_SUBMIX = 8, AUDIO_UNPROCESSED = 9, AUDIO_VOICE_PERFORMANCE = 10, AUDIO_ECHO_REFERENCE = 1997, AUDIO_RADIO_TUNER = 1998, AUDIO_HOTWORD = 1999, AUDIO_REMOTE_SUBMIX_EXTEND = 10007 }

-

Enumerates audio source types.

-

AudioStreamType { TYPE_DEFAULT = -1, TYPE_MEDIA = 0, TYPE_VOICE_COMMUNICATION = 1, TYPE_SYSTEM = 2, TYPE_RING = 3, TYPE_MUSIC = 4, TYPE_ALARM = 5, TYPE_NOTIFICATION = 6, TYPE_BLUETOOTH_SCO = 7, TYPE_ENFORCED_AUDIBLE = 8, TYPE_DTMF = 9, TYPE_TTS = 10, TYPE_ACCESSIBILITY = 11 }

-

Enumerates audio stream types.

-

VideoCodecFormat { VIDEO_DEFAULT = 0, H264 = 2, HEVC = 5 }

-

Enumerates video codec formats.

-

AudioCodecFormat { AUDIO_DEFAULT = 0, AAC_LC = 1, AAC_HE_V1 = 2, AAC_HE_V2 = 3, AAC_LD = 4, AAC_ELD = 5, FORMAT_BUTT }

-

Enumerates audio codec formats.

-

AudioBitWidth { BIT_WIDTH_8 = 8, BIT_WIDTH_16 = 16, BIT_WIDTH_24 = 24, BIT_WIDTH_BUTT }

-

Enumerates audio bit widths.

-

OHOS::Media::SourceType : int32_t { OHOS::Media::SourceType::SOURCE_TYPE_URI = 0, OHOS::Media::SourceType::SOURCE_TYPE_FD, OHOS::Media::SourceType::SOURCE_TYPE_STREAM }

-

Enumerates media source types.

-

OHOS::Media::StreamCallback::BufferFlags : uint32_t { OHOS::Media::StreamCallback::STREAM_FLAG_SYNCFRAME = 1, OHOS::Media::StreamCallback::STREAM_FLAG_CODECCONFIG = 2, OHOS::Media::StreamCallback::STREAM_FLAG_EOS = 4, OHOS::Media::StreamCallback::STREAM_FLAG_PARTIAL_FRAME = 8, OHOS::Media::StreamCallback::STREAM_FLAG_ENDOFFRAME = 16, OHOS::Media::StreamCallback::STREAM_FLAG_MUXER_DATA = 32 }

-

Enumerates buffer types of stream sources.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

OHOS::Media::FormatData::GetType () const

-

FormatDataType

-

Obtains the format type.

-

OHOS::Media::FormatData::SetValue (int32_t val)

-

bool

-

Sets a 32-bit integer.

-

OHOS::Media::FormatData::SetValue (int64_t val)

-

bool

-

Sets a 64-bit long integer.

-

OHOS::Media::FormatData::SetValue (float val)

-

bool

-

Sets a single-precision floating-point number.

-

OHOS::Media::FormatData::SetValue (double val)

-

bool

-

Sets a double-precision floating-point number.

-

OHOS::Media::FormatData::SetValue (const std::string &val)

-

bool

-

Sets a string.

-

OHOS::Media::FormatData::GetInt32Value (int32_t &val) const

-

bool

-

Obtains a 32-bit integer.

-

OHOS::Media::FormatData::GetInt64Value (int64_t &val) const

-

bool

-

Obtains a long integer.

-

OHOS::Media::FormatData::GetFloatValue (float &val) const

-

bool

-

Obtains a single-precision floating-point number.

-

OHOS::Media::FormatData::GetDoubleValue (double &val) const

-

bool

-

Obtains a double-precision floating-point number.

-

OHOS::Media::FormatData::GetStringValue (std::string &val) const

-

bool

-

Obtains a string.

-

OHOS::Media::Format::Format ()

-

-

Default constructor of the Format instance.

-

OHOS::Media::Format::PutIntValue (const std::string &key, int32_t value)

-

bool

-

Sets metadata of the integer type.

-

OHOS::Media::Format::PutLongValue (const std::string &key, int64_t value)

-

bool

-

Sets metadata of the long integer type.

-

OHOS::Media::Format::PutFloatValue (const std::string &key, float value)

-

bool

-

Sets metadata of the single-precision floating-point type.

-

OHOS::Media::Format::PutDoubleValue (const std::string &key, double value)

-

bool

-

Sets metadata of the double-precision floating-point type.

-

OHOS::Media::Format::PutStringValue (const std::string &key, const std::string &value)

-

bool

-

Sets metadata of the string type.

-

OHOS::Media::Format::GetIntValue (const std::string &key, int32_t &value) const

-

bool

-

Obtains the metadata value of the integer type.

-

OHOS::Media::Format::GetLongValue (const std::string &key, int64_t &value) const

-

bool

-

Obtains the metadata value of the long integer type.

-

OHOS::Media::Format::GetFloatValue (const std::string &key, float &value) const

-

bool

-

Obtains the metadata value of the single-precision floating-point type.

-

OHOS::Media::Format::GetDoubleValue (const std::string &key, double &value) const

-

bool

-

Obtains the metadata value of the double-precision floating-point type.

-

OHOS::Media::Format::GetStringValue (const std::string &key, std::string &value) const

-

bool

-

Obtains the metadata value of the string type.

-

OHOS::Media::Format::GetFormatMap () const

-

const std::map< std::string, FormatData * > &

-

Obtains the metadata map.

-

OHOS::Media::Format::CopyFrom (const Format &format)

-

bool

-

Sets all metadata to a specified format.

-

OHOS::Media::ErrCodeOffset (unsigned int subsystem, unsigned int module=0)

-

constexpr ErrCode

-

Generates a start error code with a unique identifier based on specified subsystem and module bit numbers.

-

OHOS::Media::StreamCallback::GetBuffer (size_t index)=0

-

virtual uint8_t *

-

Obtains the virtual address of a buffer memory block based on its index.

-

OHOS::Media::StreamCallback::QueueBuffer (size_t index, size_t offset, size_t size, int64_t timestampUs, uint32_t flags)=0

-

virtual void

-

Writes the filled buffer memory block into the player memory.

-

OHOS::Media::StreamCallback::SetParameters (const Format &params)=0

-

virtual void

-

Sets additional information about a stream.

-

OHOS::Media::StreamSource::OnBufferAvailable (size_t index, size_t offset, size_t size)=0

-

virtual void

-

Notifies your application of the information about the buffer memory block that can be filled with data.

-

OHOS::Media::StreamSource::SetStreamCallback (const std::shared_ptr< StreamCallback > &callback)=0

-

virtual void

-

Sets a callback function for your application.

-

OHOS::Media::Source::Source (const std::string &uri)

-

-

A constructor used to create a Source instance based on a specified URI.

-

OHOS::Media::Source::Source (const std::shared_ptr< StreamSource > &stream, const Format &formats)

-

-

A constructor used to create a Source instance based on the stream source and format information.

-

OHOS::Media::Source::GetSourceType () const

-

SourceType

-

Obtains the source type.

-

OHOS::Media::Source::GetSourceUri () const

-

const std::string &

-

Obtains the media source URI.

-

OHOS::Media::Source::GetSourceStream () const

-

const std::shared_ptr< StreamSource > &

-

Obtains information about the media source stream.

-

OHOS::Media::Source::GetSourceStreamFormat () const

-

const Format &

-

Obtains the media source stream format.

-
- -## **Details** - -## **Enumeration Type ** - -## AudioBitWidth - -``` -enum [AudioBitWidth](MultiMedia_MediaCommon.md#gae3e35ee2a2222a667fdebbc5b793ca7c) -``` - - **Description:** - -Enumerates audio bit widths. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
BIT_WIDTH_8

8-bit width

-
BIT_WIDTH_16

16-bit width

-
BIT_WIDTH_24

24-bit width

-
BIT_WIDTH_BUTT

Invalid value

-
- -## AudioCodecFormat - -``` -enum [AudioCodecFormat](MultiMedia_MediaCommon.md#gaa4ea6f314644ed287e0704be26c768b7) -``` - - **Description:** - -Enumerates audio codec formats. - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
AUDIO_DEFAULT

Default format

-
AAC_LC

Advanced Audio Coding Low Complexity (AAC-LC)

-
AAC_HE_V1

High-Efficiency Advanced Audio Coding (AAC-HE), previously known as AAC+ or aacPlus v1

-
AAC_HE_V2

AAC++ or aacPlus v2

-
AAC_LD

Advanced Audio Coding Low Delay (AAC-LD)

-
AAC_ELD

Advanced Audio Coding Enhanced Low Delay (AAC-ELD)

-
FORMAT_BUTT

Invalid value

-
- -## AudioSourceType - -``` -enum [AudioSourceType](MultiMedia_MediaCommon.md#gadc3158e093b995ca7b9b6aa32388ccdd) -``` - - **Description:** - -Enumerates audio source types. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
AUDIO_SOURCE_INVALID

Invalid audio source

-
AUDIO_SOURCE_DEFAULT

Default audio source

-
AUDIO_MIC

Microphone

-
AUDIO_VOICE_UPLINK

Uplink voice

-
AUDIO_VOICE_DOWNLINK

Downlink voice

-
AUDIO_VOICE_CALL

Voice call

-
AUDIO_CAMCORDER

Camcorder

-
AUDIO_VOICE_RECOGNITION

Voice recognition

-
AUDIO_VOICE_COMMUNICATION

Voice communication

-
AUDIO_REMOTE_SUBMIX

Remote submix

-
AUDIO_UNPROCESSED

Unprocessed audio

-
AUDIO_VOICE_PERFORMANCE

Voice performance

-
AUDIO_ECHO_REFERENCE

Echo reference

-
AUDIO_RADIO_TUNER

Radio tuner

-
AUDIO_HOTWORD

Hotword

-
AUDIO_REMOTE_SUBMIX_EXTEND

Extended remote submix

-
- -## AudioStreamType - -``` -enum [AudioStreamType](MultiMedia_MediaCommon.md#gae7077e4211e48131ae544adb20fc494a) -``` - - **Description:** - -Enumerates audio stream types. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
TYPE_DEFAULT

Default audio stream type

-
TYPE_MEDIA

Media

-
TYPE_VOICE_COMMUNICATION

Voice call

-
TYPE_SYSTEM

System sound

-
TYPE_RING

Ringtone

-
TYPE_MUSIC

Music

-
TYPE_ALARM

Alarm

-
TYPE_NOTIFICATION

Notification

-
TYPE_BLUETOOTH_SCO

Bluetooth Synchronous Connection-Oriented (SCO)

-
TYPE_ENFORCED_AUDIBLE

Enforced audible

-
TYPE_DTMF

Dual-tone multi-frequency (DTMF)

-
TYPE_TTS

Text-To-Speech (TTS)

-
TYPE_ACCESSIBILITY

Accessibility

-
- -## BufferFlags - -``` -enum [OHOS::Media::StreamCallback::BufferFlags](MultiMedia_MediaCommon.md#ga6f4847f443de5cdf3641386011335e21) : uint32_t -``` - - **Description:** - -Enumerates buffer types of stream sources. - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
STREAM_FLAG_SYNCFRAME

Synchronous frame

-
STREAM_FLAG_CODECCONFIG

Codec configuration information

-
STREAM_FLAG_EOS

End of Stream (EOS)

-
STREAM_FLAG_PARTIAL_FRAME

Part of a frame

-
STREAM_FLAG_ENDOFFRAME

End of a frame. It is used in pair with STREAM_FLAG_PARTIAL_FRAME.

-
STREAM_FLAG_MUXER_DATA

Container file data, such as MP4 file data (not supported yet)

-
- -## FormatDataType - -``` -enum [OHOS::Media::FormatDataType](MultiMedia_MediaCommon.md#gaa3bfacc6563d8ec8bc870f4b216b4f46) : uint32_t -``` - - **Description:** - -Enumerates formats. - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
FORMAT_TYPE_NONE

None

-
FORMAT_TYPE_INT32

Int32

-
FORMAT_TYPE_INT64

Int64

-
FORMAT_TYPE_FLOAT

Float

-
FORMAT_TYPE_DOUBLE

Double

-
FORMAT_TYPE_STRING

String

-
- -## SourceType - -``` -enum [OHOS::Media::SourceType](MultiMedia_MediaCommon.md#ga4052b7b55dfd94f1d07678e79d80b507) : int32_t -``` - - **Description:** - -Enumerates media source types. - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
SOURCE_TYPE_URI

Local file path or network address

-
SOURCE_TYPE_FD

Local file descriptor

-
SOURCE_TYPE_STREAM

Stream data, such as Advanced Audio Coding (AAC) stream data

-
- -## VideoCodecFormat - -``` -enum [VideoCodecFormat](MultiMedia_MediaCommon.md#ga797e6c5e38e23e730eff5bcc41427d7e) -``` - - **Description:** - -Enumerates video codec formats. - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
VIDEO_DEFAULT

Default format

-
H264

H.264

-
HEVC

High Efficiency Video Coding (HEVC)

-
- -## **Function ** - -## CopyFrom\(\) - -``` -bool OHOS::Media::Format::CopyFrom (const [Format](OHOS-Media-Format.md) & format) -``` - - **Description:** - -Sets all metadata to a specified format. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
formatIndicates the format. For details, see Format.
- -**Returns:** - -Returns **true** if the setting is successful; returns **false** otherwise. - -## ErrCodeOffset\(\) - -``` -constexpr ErrCode OHOS::Media::ErrCodeOffset (unsigned int subsystem, unsigned int module = 0 ) -``` - - **Description:** - -Generates a start error code with a unique identifier based on specified subsystem and module bit numbers. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
subsystemIndicates the subsystem bit number.
moduleIndicates the module bit number.
- -**Returns:** - -## Format\(\) - -``` -OHOS::Media::Format::Format () -``` - - **Description:** - -Default constructor of the [Format](OHOS-Media-Format.md) instance. - -## GetBuffer\(\) - -``` -virtual uint8_t* OHOS::Media::StreamCallback::GetBuffer (size_t index) -``` - - **Description:** - -Obtains the virtual address of a buffer memory block based on its index. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
indexIndicates the index of the buffer memory block.
- -**Returns:** - -Returns the pointer to the virtual address of the buffer memory block. - -## GetDoubleValue\(\) \[1/2\] - -``` -bool OHOS::Media::Format::GetDoubleValue (const std::string & key, double & value ) const -``` - - **Description:** - -Obtains the metadata value of the double-precision floating-point type. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the metadata key.
valueIndicates the metadata value to obtain, which is a double-precision floating-point number.
- -**Returns:** - -Returns **true** if the double-precision number is successfully obtained; returns **false** otherwise. - -## GetDoubleValue\(\) \[2/2\] - -``` -bool OHOS::Media::FormatData::GetDoubleValue (double & val) const -``` - - **Description:** - -Obtains a double-precision floating-point number. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
valIndicates the double-precision floating-point number to obtain.
- -**Returns:** - -Returns **true** if the double-precision number is successfully obtained; returns **false** otherwise. - -## GetFloatValue\(\) \[1/2\] - -``` -bool OHOS::Media::Format::GetFloatValue (const std::string & key, float & value ) const -``` - - **Description:** - -Obtains the metadata value of the single-precision floating-point type. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the metadata key.
valueIndicates the metadata value to obtain, which is a single-precision floating-point number.
- -**Returns:** - -Returns **true** if the single-precision number is successfully obtained; returns **false** otherwise. - -## GetFloatValue\(\) \[2/2\] - -``` -bool OHOS::Media::FormatData::GetFloatValue (float & val) const -``` - - **Description:** - -Obtains a single-precision floating-point number. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
valIndicates the single-precision floating-point number to obtain.
- -**Returns:** - -Returns **true** if the single-precision number is successfully obtained; returns **false** otherwise. - -## GetFormatMap\(\) - -``` -const std::map& OHOS::Media::Format::GetFormatMap () const -``` - - **Description:** - -Obtains the metadata map. - -**Returns:** - -Returns the map object. - -## GetInt32Value\(\) - -``` -bool OHOS::Media::FormatData::GetInt32Value (int32_t & val) const -``` - - **Description:** - -Obtains a 32-bit integer. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
valIndicates the 32-bit integer to obtain.
- -**Returns:** - -Returns **true** if the integer is successfully obtained; returns **false** otherwise. - -## GetInt64Value\(\) - -``` -bool OHOS::Media::FormatData::GetInt64Value (int64_t & val) const -``` - - **Description:** - -Obtains a long integer. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
valIndicates the long integer to obtain.
- -**Returns:** - -Returns **true** if the integer is successfully obtained; returns **false** otherwise. - -## GetIntValue\(\) - -``` -bool OHOS::Media::Format::GetIntValue (const std::string & key, int32_t & value ) const -``` - - **Description:** - -Obtains the metadata value of the integer type. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the metadata key.
valueIndicates the metadata value to obtain, which is a 32-bit integer.
- -**Returns:** - -Returns **true** if the integer is successfully obtained; returns **false** otherwise. - -## GetLongValue\(\) - -``` -bool OHOS::Media::Format::GetLongValue (const std::string & key, int64_t & value ) const -``` - - **Description:** - -Obtains the metadata value of the long integer type. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the metadata key.
valueIndicates the metadata value to obtain, which is a 64-bit long integer.
- -**Returns:** - -Returns **true** if the integer is successfully obtained; returns **false** otherwise. - -## GetSourceStream\(\) - -``` -const std::shared_ptr<[StreamSource](OHOS-Media-StreamSource.md)>& OHOS::Media::Source::GetSourceStream () const -``` - - **Description:** - -Obtains information about the media source stream. - -This function is called only when the [SourceType](Format.md#ga3ae727773c367ac1041d72ac770a0ab1) is [SOURCE\_TYPE\_STREAM](Format.md#gga3ae727773c367ac1041d72ac770a0ab1a7f632a791d8f6dfbe5940b5648d29e6c). - -**Returns:** - -Returns information about the media source stream. For details, see [StreamSource](OHOS-Media-StreamSource.md). - -## GetSourceStreamFormat\(\) - -``` -const [Format](OHOS-Media-Format.md)& OHOS::Media::Source::GetSourceStreamFormat () const -``` - - **Description:** - -Obtains the media source stream format. - -**Returns:** - -Returns the media source stream format. For details, see [Format](OHOS-Media-Format.md). - -## GetSourceType\(\) - -``` -[SourceType](MultiMedia_MediaCommon.md#ga4052b7b55dfd94f1d07678e79d80b507) OHOS::Media::Source::GetSourceType () const -``` - - **Description:** - -Obtains the source type. - -**Returns:** - -Returns the source type. For details, see [SourceType](Format.md#ga3ae727773c367ac1041d72ac770a0ab1). - -## GetSourceUri\(\) - -``` -const std::string& OHOS::Media::Source::GetSourceUri () const -``` - - **Description:** - -Obtains the media source URI. - -This function is called only when the [SourceType](Format.md#ga3ae727773c367ac1041d72ac770a0ab1) is [SOURCE\_TYPE\_URI](Format.md#gga3ae727773c367ac1041d72ac770a0ab1a70d32ea5aeaa325764508722ba31403c). - -**Returns:** - -Returns the media source URI. - -## GetStringValue\(\) \[1/2\] - -``` -bool OHOS::Media::Format::GetStringValue (const std::string & key, std::string & value ) const -``` - - **Description:** - -Obtains the metadata value of the string type. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the metadata key.
valueIndicates the metadata value to obtain, which is a string.
- -**Returns:** - -Returns **true** if the string is successfully obtained; returns **false** otherwise. - -## GetStringValue\(\) \[2/2\] - -``` -bool OHOS::Media::FormatData::GetStringValue (std::string & val) const -``` - - **Description:** - -Obtains a string. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
valIndicates the string to obtain.
- -**Returns:** - -Returns **true** if the string is successfully obtained; returns **false** otherwise. - -## GetType\(\) - -``` -[FormatDataType](MultiMedia_MediaCommon.md#gaa3bfacc6563d8ec8bc870f4b216b4f46) OHOS::Media::FormatData::GetType () const -``` - - **Description:** - -Obtains the format type. - -**Returns:** - -Returns the format type. For details, see **OHOS::Media::FormatDataType**. - -## OnBufferAvailable\(\) - -``` -virtual void OHOS::Media::StreamSource::OnBufferAvailable (size_t index, size_t offset, size_t size ) -``` - - **Description:** - -Notifies your application of the information about the buffer memory block that can be filled with data. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
indexIndicates the index of the buffer memory block.
offsetIndicates the start offset into which the data will be written.
sizeIndicates the size of data that the buffer memory block can store.
- -## PutDoubleValue\(\) - -``` -bool OHOS::Media::Format::PutDoubleValue (const std::string & key, double value ) -``` - - **Description:** - -Sets metadata of the double-precision floating-point type. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the metadata key.
valueIndicates the metadata value, which is a double-precision floating-point number.
- -**Returns:** - -Returns **true** if the setting is successful; returns **false** otherwise. - -## PutFloatValue\(\) - -``` -bool OHOS::Media::Format::PutFloatValue (const std::string & key, float value ) -``` - - **Description:** - -Sets metadata of the single-precision floating-point type. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the metadata key.
valueIndicates the metadata value, which is a single-precision floating-point number.
- -**Returns:** - -Returns **true** if the metadata is successfully set; returns **false** otherwise. - -## PutIntValue\(\) - -``` -bool OHOS::Media::Format::PutIntValue (const std::string & key, int32_t value ) -``` - - **Description:** - -Sets metadata of the integer type. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the metadata key.
valueIndicates the metadata value, which is a 32-bit integer.
- -**Returns:** - -Returns **true** if the setting is successful; returns **false** otherwise. - -## PutLongValue\(\) - -``` -bool OHOS::Media::Format::PutLongValue (const std::string & key, int64_t value ) -``` - - **Description:** - -Sets metadata of the long integer type. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the metadata key.
valueIndicates the metadata value, which is a 64-bit integer.
- -**Returns:** - -Returns **true** if the setting is successful; returns **false** otherwise. - -## PutStringValue\(\) - -``` -bool OHOS::Media::Format::PutStringValue (const std::string & key, const std::string & value ) -``` - - **Description:** - -Sets metadata of the string type. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the metadata key.
valueIndicates the metadata value, which is a string.
- -**Returns:** - -Returns **true** if the metadata is successfully set; returns **false** otherwise. - -## QueueBuffer\(\) - -``` -virtual void OHOS::Media::StreamCallback::QueueBuffer (size_t index, size_t offset, size_t size, int64_t timestampUs, uint32_t flags ) -``` - - **Description:** - -Writes the filled buffer memory block into the player memory. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
indexIndicates the index of the buffer memory block.
offsetIndicates the start offset into which the buffer memory block will be written.
sizeIndicates the size of the data filled in the buffer memory block.
timestampUsIndicates the timestamp of the frame filled in the buffer memory block. As data in AAC streams can be filled not on a frame basis, set this parameter to 0 for AAC streams.
flagsIndicates the type of the current buffer memory block. For details, see BufferFlags.
- -## SetParameters\(\) - -``` -virtual void OHOS::Media::StreamCallback::SetParameters (const [Format](OHOS-Media-Format.md) & params) -``` - - **Description:** - -Sets additional information about a stream. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
paramsIndicates the parameters for additional stream information. For details, see Format.
- -## SetStreamCallback\(\) - -``` -virtual void OHOS::Media::StreamSource::SetStreamCallback (const std::shared_ptr< [StreamCallback](OHOS-Media-StreamCallback.md) > & callback) -``` - - **Description:** - -Sets a callback function for your application. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
callbackIndicates the StreamCallback function to set.
- -## SetValue\(\) \[1/5\] - -``` -bool OHOS::Media::FormatData::SetValue (const std::string & val) -``` - - **Description:** - -Sets a string. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
valIndicates the string to set.
- -**Returns:** - -Returns **true** if the setting is successful; returns **false** otherwise. - -## SetValue\(\) \[2/5\] - -``` -bool OHOS::Media::FormatData::SetValue (double val) -``` - - **Description:** - -Sets a double-precision floating-point number. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
valIndicates the double-precision floating-point number to set.
- -**Returns:** - -Returns **true** if the double-precision floating-point number is successfully set; returns **false** otherwise. - -## SetValue\(\) \[3/5\] - -``` -bool OHOS::Media::FormatData::SetValue (float val) -``` - - **Description:** - -Sets a single-precision floating-point number. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
valIndicates the single-precision floating-point number to set.
- -**Returns:** - -Returns **true** if the setting is successful; returns **false** otherwise. - -## SetValue\(\) \[4/5\] - -``` -bool OHOS::Media::FormatData::SetValue (int32_t val) -``` - - **Description:** - -Sets a 32-bit integer. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
valIndicates the 32-bit integer to set.
- -**Returns:** - -Returns **true** if the setting is successful; returns **false** otherwise. - -## SetValue\(\) \[5/5\] - -``` -bool OHOS::Media::FormatData::SetValue (int64_t val) -``` - - **Description:** - -Sets a 64-bit long integer. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
valIndicates the 64-bit long integer to set.
- -**Returns:** - -Returns **true** if the setting is successful; returns **false** otherwise. - -## Source\(\) \[1/2\] - -``` -OHOS::Media::Source::Source (const std::shared_ptr< [StreamSource](OHOS-Media-StreamSource.md) > & stream, const [Format](OHOS-Media-Format.md) & formats ) -``` - - **Description:** - -A constructor used to create a [Source](OHOS-Media-Source.md) instance based on the stream source and format information. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
streamIndicates the media source stream. For details, see StreamSource.
formatsIndicates stream data information, which is subject to the stream type. For example, the key is CODEC_MIME, and the value is MIME_AUDIO_AAC. For details, see Format. This parameter can be null if no information needs to be passed.
- -## Source\(\) \[2/2\] - -``` -OHOS::Media::Source::Source (const std::string & uri) -``` - - **Description:** - -A constructor used to create a [Source](OHOS-Media-Source.md) instance based on a specified URI. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
uriIndicates the media source URI, which can be a network URI or local file path.
- -## **Variable ** - -## BITRATE\_MODE\_CBR - -``` -const int BITRATE_MODE_CBR = 2 -``` - - **Description:** - -Indicates the constant bit rate mode. In this mode, the codec keeps the output bit rate as constant as possible. - -## BITRATE\_MODE\_CQ - -``` -const int BITRATE_MODE_CQ = 0 -``` - - **Description:** - -Indicates the constant quality mode. In this mode, the bit rate is not limited to guarantee the image quality to the largest extent. - -## BITRATE\_MODE\_VBR - -``` -const int BITRATE_MODE_VBR = 1 -``` - - **Description:** - -Indicates the variable bit rate mode. In this mode, the codec dynamically adjusts the output bit rate based on the image complexity. The codec increases the bit rate if the image is complex and decreases the bit rate if the image is simple. - -## CODEC\_MIME - -``` -const char* OHOS::Media::CODEC_MIME -``` - - **Description:** - -Indicates the key representing the codec type. - -## COLOR\_FORMAT\_ARGB8888\_32BIT - -``` -const int32_t COLOR_FORMAT_ARGB8888_32BIT = 16 -``` - - **Description:** - -Indicates the ARGB8888 color format. - -## COLOR\_FORMAT\_YUV420SP - -``` -const int32_t COLOR_FORMAT_YUV420SP = 21 -``` - - **Description:** - -Indicates the YUV420SP color format. - -## deviceId - -``` -uint32_t AudioDeviceDesc::deviceId -``` - - **Description:** - -Bits 31-24: reserved bits; bits 23-16: mode ID; bits 15-8: device ID; bits 7-0: channel ID - -## deviceName - -``` -std::string AudioDeviceDesc::deviceName -``` - - **Description:** - -Device name - -## ERR\_EARLY\_PREPARE - -``` -const int32_t OHOS::Media::ERR_EARLY_PREPARE = BASE_MEDIA_ERR_OFFSET + 3 -``` - - **Description:** - -Early media preparation - -## ERR\_ILLEGAL\_STATE - -``` -const int32_t OHOS::Media::ERR_ILLEGAL_STATE = BASE_MEDIA_ERR_OFFSET + 1 -``` - - **Description:** - -Status error - -## ERR\_INVALID\_OPERATION - -``` -const int32_t OHOS::Media::ERR_INVALID_OPERATION = BASE_MEDIA_ERR_OFFSET + 5 -``` - - **Description:** - -Invalid operation - -## ERR\_INVALID\_PARAM - -``` -const int32_t OHOS::Media::ERR_INVALID_PARAM = BASE_MEDIA_ERR_OFFSET + 2 -``` - - **Description:** - -Invalid parameter - -## ERR\_INVALID\_READ - -``` -const int32_t OHOS::Media::ERR_INVALID_READ = -1 -``` - - **Description:** - -Invalid data size that has been read - -## ERR\_NOFREE\_CHANNEL - -``` -const int32_t OHOS::Media::ERR_NOFREE_CHANNEL = BASE_MEDIA_ERR_OFFSET + 6 -``` - - **Description:** - -No idle channel - -## ERR\_NOT\_STARTED - -``` -const int32_t OHOS::Media::ERR_NOT_STARTED = BASE_MEDIA_ERR_OFFSET + 8 -``` - - **Description:** - -Device not started - -## ERR\_READ\_BUFFER - -``` -const int32_t OHOS::Media::ERR_READ_BUFFER = BASE_MEDIA_ERR_OFFSET + 7 -``` - - **Description:** - -Buffer reading failed - -## ERR\_SOURCE\_NOT\_SET - -``` -const int32_t OHOS::Media::ERR_SOURCE_NOT_SET = BASE_MEDIA_ERR_OFFSET + 4 -``` - - **Description:** - -No media source - -## ERR\_UNKNOWN - -``` -const int32_t OHOS::Media::ERR_UNKNOWN = BASE_MEDIA_ERR_OFFSET + 200 -``` - - **Description:** - -Unknown error - -## ERROR - -``` -const int32_t OHOS::Media::ERROR = BASE_MEDIA_ERR_OFFSET -``` - - **Description:** - -Fail - -## inputSourceType - -``` -[AudioSourceType](MultiMedia_MediaCommon.md#gadc3158e093b995ca7b9b6aa32388ccdd) AudioDeviceDesc::inputSourceType -``` - - **Description:** - -Type of the audio input source - -## KEY\_IS\_SYNC\_FRAME - -``` -const std::string KEY_IS_SYNC_FRAME = "is-sync-frame" -``` - - **Description:** - -Indicates that the current frame is an Instantaneous Decoder Refresh \(IDR\) frame. - -## KEY\_TIME\_US - -``` -const std::string KEY_TIME_US = "timeUs" -``` - - **Description:** - -Indicates the frame timestamp. - -## MIME\_AUDIO\_AAC - -``` -const char* OHOS::Media::MIME_AUDIO_AAC -``` - - **Description:** - -Indicates the codec for Advanced Audio Coding \(AAC\) streams, which is a value of the codec type key. - -## MIME\_AUDIO\_RAW - -``` -const char* OHOS::Media::MIME_AUDIO_RAW -``` - - **Description:** - -Indicates the codec for RAW audios \(not supported yet\), which is a value of the codec type key. - -## SUCCESS - -``` -const int32_t OHOS::Media::SUCCESS = 0 -``` - - **Description:** - -Success - diff --git a/api/api-SmartVision-Devices/MultiMedia_Player.md b/api/api-SmartVision-Devices/MultiMedia_Player.md deleted file mode 100755 index f385948e43ce1ebd233f68047a5adf41315131f7..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/MultiMedia_Player.md +++ /dev/null @@ -1,907 +0,0 @@ -# MultiMedia\_Player - -- [Overview](#section1987368586165625) -- [Summary](#section525725604165625) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Enumerations](#enum-members) -- [Functions](#func-members) -- [Details](#section1769927466165625) -- [Enumeration Type](#section40029736165625) -- [PlayerInfoType](#ga7dac9dac65cbbea7e411adcf2c314ac5) -- [PlayerSeekMode](#gad1574e5769b3174c2103a2a8b49e20d4) -- [PlayerStates](#ga8b1147e57c4a67f63f193836302da2b7) -- [Function](#section747638434165625) -- [EnableSingleLooping\(\)](#gae19989aa6e80b768acd4eb019a2b60d2) -- [GetCurrentTime\(\)](#ga8474b117a4c1bf5749406f26056b4802) -- [GetDuration\(\)](#ga24ae07f65da4dafc4ec5aa28321625d8) -- [GetVideoHeight\(\)](#ga726adc32a34134b30aabfbdb389c8357) -- [GetVideoWidth\(\)](#ga9ed94bd43d896fa10066497377d7fbda) -- [IsPlaying\(\)](#gaad6b2c35b1d5dfe453d158f7ff9e1379) -- [IsSingleLooping\(\)](#gae4dd5d8fb92c836f5304f181a40b34d2) -- [OnError\(\)](#ga3d0fdad57045f5e049b56de031d3e0fb) -- [OnInfo\(\)](#gad2d3466c8a17ee4d622b87fa6a31b2bb) -- [OnPlaybackComplete\(\)](#ga3b56f618340bf9a5590e6142b2311302) -- [OnRewindToComplete\(\)](#ga765c499e47dfaad5e557197e964eaca3) -- [OnVideoSizeChanged\(\)](#gac5b641f93621d90e616d18adaa016e8a) -- [Pause\(\)](#gae1d2225ce60a9737cc902e586138a44f) -- [Play\(\)](#gafecbbfe85c70cf4983f52d55b7205e3f) -- [Prepare\(\)](#gade9bff3268e1c409273749a90700e056) -- [Release\(\)](#ga00e24c0faed483c9d54e416ec2ffe6ac) -- [Reset\(\)](#ga75e17ee0068d46d44a30709609821b85) -- [Rewind\(\)](#ga406b6277d1e160e691d01f5f740480b3) -- [SetPlayerCallback\(\)](#gabb6eca611514d5fc0b66df5ff2d70c2b) -- [SetSource\(\)](#gacce284eac910970e405151fd3a1963c0) -- [SetVideoSurface\(\)](#gac9d62210915ebcf3b462574302018501) -- [SetVolume\(\)](#ga23ca57f0b1a288980e37153274c5f8b3) -- [Stop\(\)](#gafe518a5b909ac0f0f066781caa3b55aa) - -## **Overview** - -**Description:** - -Defines the **Player** class and provides functions related to media playback. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - -

File Name

-

Description

-

player.h

-

Declares the Player class, which is used to implement player-related operations.

-
- -## Data Structures - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

OHOS::Media::PlayerCallback

-

Provides listeners for events and exception notifications that occur during media playback.

-

OHOS::Media::Player

-

Provides functions for playing online movies, offline movies, and streams, for example, playing local movies and advanced audio coding (AAC) streams.

-
- -## Enumerations - - - - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

OHOS::Media::PlayerSeekMode : int32_t { OHOS::Media::PLAYER_SEEK_PREVIOUS_SYNC = 0, OHOS::Media::PLAYER_SEEK_NEXT_SYNC, OHOS::Media::PLAYER_SEEK_CLOSEST_SYNC, OHOS::Media::PLAYER_SEEK_CLOSEST, OHOS::Media::PLAYER_SEEK_FRAME_INDEX }

-

Enumerates player seek modes. You can move the current playback position of the media to a given time position using the specified mode.

-

OHOS::Media::PlayerStates : uint32_t { OHOS::Media::PLAYER_STATE_ERROR = 0, OHOS::Media::PLAYER_IDLE = 1 << 0, OHOS::Media::PLAYER_INITIALIZED = 1 << 1, OHOS::Media::PLAYER_PREPARING = 1 << 2, OHOS::Media::PLAYER_PREPARED = 1 << 3, OHOS::Media::PLAYER_STARTED = 1 << 4, OHOS::Media::PLAYER_PAUSED = 1 << 5, OHOS::Media::PLAYER_STOPPED = 1 << 6, OHOS::Media::PLAYER_PLAYBACK_COMPLETE = 1 << 7 }

-

Enumerates player states.

-

OHOS::Media::PlayerCallback::PlayerInfoType : int32_t { OHOS::Media::PlayerCallback::PLAYER_INFO_RENDER_START = 0 }

-
 
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

OHOS::Media::PlayerCallback::OnPlaybackComplete ()=0

-

virtual void

-

Called when the playback is complete.

-

OHOS::Media::PlayerCallback::OnError (int32_t errorType, int32_t errorCode)=0

-

virtual void

-

Called when a playback error occurs.

-

OHOS::Media::PlayerCallback::OnInfo (int type, int extra)=0

-

virtual void

-

Called when playback information is received.

-

OHOS::Media::PlayerCallback::OnVideoSizeChanged (int width, int height)=0

-

virtual void

-

Called when the video image size changes.

-

OHOS::Media::PlayerCallback::OnRewindToComplete ()=0

-

virtual void

-

Called when the rewind is complete.

-

OHOS::Media::Player::SetSource (const Source &source)

-

int32_t

-

Sets the playback source for the player. The corresponding source can be the file descriptor (FD) of the local file, local file URI, network URI, or media stream.

-

OHOS::Media::Player::Prepare ()

-

int32_t

-

Prepares the playback environment and buffers media data.

-

OHOS::Media::Player::Play ()

-

int32_t

-

Starts or resumes playback.

-

OHOS::Media::Player::IsPlaying ()

-

bool

-

Checks whether the player is playing.

-

OHOS::Media::Player::Pause ()

-

int32_t

-

Pauses playback.

-

OHOS::Media::Player::Stop ()

-

int32_t

-

Stops playback.

-

OHOS::Media::Player::Rewind (int64_t mSeconds, int32_t mode)

-

int32_t

-

Changes the playback position.

-

OHOS::Media::Player::SetVolume (float leftVolume, float rightVolume)

-

int32_t

-

Sets the volume of the player.

-

OHOS::Media::Player::SetVideoSurface (Surface *surface)

-

int32_t

-

Sets a surface for video playback.

-

OHOS::Media::Player::EnableSingleLooping (bool loop)

-

int32_t

-

Sets loop playback.

-

OHOS::Media::Player::IsSingleLooping ()

-

bool

-

Checks whether the player is looping.

-

OHOS::Media::Player::GetCurrentTime (int64_t &time) const

-

int32_t

-

Obtains the playback position, accurate to millisecond.

-

OHOS::Media::Player::GetDuration (int64_t &duration) const

-

int32_t

-

Obtains the total duration of media files, in milliseconds.

-

OHOS::Media::Player::GetVideoWidth (int32_t &videoWidth)

-

int32_t

-

Obtains the width of the video.

-

OHOS::Media::Player::GetVideoHeight (int32_t &videoHeight)

-

int32_t

-

Obtains the height of the video.

-

OHOS::Media::Player::Reset ()

-

int32_t

-

Restores the player to the initial state.

-

OHOS::Media::Player::Release ()

-

int32_t

-

Releases player resources.

-

OHOS::Media::Player::SetPlayerCallback (const std::shared_ptr< PlayerCallback > &cb)

-

void

-

Registers a listener to receive events and exception notifications from the player.

-
- -## **Details** - -## **Enumeration Type ** - -## PlayerInfoType - -``` -enum [OHOS::Media::PlayerCallback::PlayerInfoType](MultiMedia_Player.md#ga7dac9dac65cbbea7e411adcf2c314ac5) : int32_t -``` - - - - - - - - - - -

Enumerator

-

Description

-
PLAYER_INFO_RENDER_START

Pushed the first video frame for rendering

-
- -## PlayerSeekMode - -``` -enum [OHOS::Media::PlayerSeekMode](MultiMedia_Player.md#gad1574e5769b3174c2103a2a8b49e20d4) : int32_t -``` - - **Description:** - -Enumerates player seek modes. You can move the current playback position of the media to a given time position using the specified mode. - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
PLAYER_SEEK_PREVIOUS_SYNC

Moves the media position to the latest synchronization frame located before the given time position.

-
PLAYER_SEEK_NEXT_SYNC

Moves the media position to the latest synchronization frame located after the given time position.

-
PLAYER_SEEK_CLOSEST_SYNC

Moves the media position to the latest synchronization frame located before or after the given time position.

-
PLAYER_SEEK_CLOSEST

Moves the media position to the latest frame located before or after the given time position.

-
PLAYER_SEEK_FRAME_INDEX

Moves the media position to a given frame index.

-
- -## PlayerStates - -``` -enum [OHOS::Media::PlayerStates](MultiMedia_Player.md#ga8b1147e57c4a67f63f193836302da2b7) : uint32_t -``` - - **Description:** - -Enumerates player states. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
PLAYER_STATE_ERROR

Error

-
PLAYER_IDLE

Idle

-
PLAYER_INITIALIZED

Initialized

-
PLAYER_PREPARING

Preparing

-
PLAYER_PREPARED

Prepared

-
PLAYER_STARTED

Playback started

-
PLAYER_PAUSED

Playback paused

-
PLAYER_STOPPED

Playback stopped

-
PLAYER_PLAYBACK_COMPLETE

Playback completed

-
- -## **Function ** - -## EnableSingleLooping\(\) - -``` -int32_t OHOS::Media::Player::EnableSingleLooping (bool loop) -``` - - **Description:** - -Sets loop playback. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
loopSpecifies whether to enable loop playback. The value true means to enable loop playback, and false means to disable loop playback.
- -**Returns:** - -Returns **0** if the setting is successful; returns **-1** otherwise. - -## GetCurrentTime\(\) - -``` -int32_t OHOS::Media::Player::GetCurrentTime (int64_t & time) const -``` - - **Description:** - -Obtains the playback position, accurate to millisecond. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
timeIndicates the playback position.
- -**Returns:** - -Returns **0** if the playback position is obtained; returns **-1** otherwise. - -## GetDuration\(\) - -``` -int32_t OHOS::Media::Player::GetDuration (int64_t & duration) const -``` - - **Description:** - -Obtains the total duration of media files, in milliseconds. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
durationIndicates the total duration of media files.
- -**Returns:** - -Returns **0** if the total duration is obtained; returns **-1** otherwise. - -## GetVideoHeight\(\) - -``` -int32_t OHOS::Media::Player::GetVideoHeight (int32_t & videoHeight) -``` - - **Description:** - -Obtains the height of the video. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
videoHeightIndicates the video height.
- -**Returns:** - -Returns **0** if the video height is obtained; returns **-1** otherwise. - -## GetVideoWidth\(\) - -``` -int32_t OHOS::Media::Player::GetVideoWidth (int32_t & videoWidth) -``` - - **Description:** - -Obtains the width of the video. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
videoWidthIndicates the video width.
- -**Returns:** - -Returns **0** if the video width is obtained; returns **-1** otherwise. - -## IsPlaying\(\) - -``` -bool OHOS::Media::Player::IsPlaying () -``` - - **Description:** - -Checks whether the player is playing. - -**Returns:** - -Returns **true** if the player is playing; returns **false** otherwise. - -## IsSingleLooping\(\) - -``` -bool OHOS::Media::Player::IsSingleLooping () -``` - - **Description:** - -Checks whether the player is looping. - -**Returns:** - -Returns **true** if the player is looping; returns **false** otherwise. - -## OnError\(\) - -``` -virtual void OHOS::Media::PlayerCallback::OnError (int32_t errorType, int32_t errorCode ) -``` - - **Description:** - -Called when a playback error occurs. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
errorTypeIndicates the error type. For details, see PlayerErrorType.
errorCodeIndicates the error code.
- -## OnInfo\(\) - -``` -virtual void OHOS::Media::PlayerCallback::OnInfo (int type, int extra ) -``` - - **Description:** - -Called when playback information is received. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
typeIndicates the information type. For details, see PlayerInfoType.
extraIndicates the information code.
- -## OnPlaybackComplete\(\) - -``` -virtual void OHOS::Media::PlayerCallback::OnPlaybackComplete () -``` - - **Description:** - -Called when the playback is complete. - -## OnRewindToComplete\(\) - -``` -virtual void OHOS::Media::PlayerCallback::OnRewindToComplete () -``` - - **Description:** - -Called when the rewind is complete. - -## OnVideoSizeChanged\(\) - -``` -virtual void OHOS::Media::PlayerCallback::OnVideoSizeChanged (int width, int height ) -``` - - **Description:** - -Called when the video image size changes. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
widthIndicates the video width.
heightIndicates the video height.
- -## Pause\(\) - -``` -int32_t OHOS::Media::Player::Pause () -``` - - **Description:** - -Pauses playback. - -**Returns:** - -Returns **0** if the playback is paused; returns **-1** otherwise. - -## Play\(\) - -``` -int32_t OHOS::Media::Player::Play () -``` - - **Description:** - -Starts or resumes playback. - -This function must be called after [Prepare](MultiMedia_Player.md#gade9bff3268e1c409273749a90700e056). If the player state is **Prepared**, this function is called to start playback. If the player state is **Playback paused**, this function is called to resume playback. If the media is playing in an abnormal speed, this function is called to restore the playback speed to normal. - -**Returns:** - -Returns **0** if the playback starts or resumes; returns **-1** otherwise. - -## Prepare\(\) - -``` -int32_t OHOS::Media::Player::Prepare () -``` - - **Description:** - -Prepares the playback environment and buffers media data. - -This function must be called after [SetSource](MultiMedia_Player.md#gacce284eac910970e405151fd3a1963c0). - -**Returns:** - -Returns **0** if the playback environment is prepared and media data is buffered; returns **-1** otherwise. - -## Release\(\) - -``` -int32_t OHOS::Media::Player::Release () -``` - - **Description:** - -Releases player resources. - -**Returns:** - -Returns **0** if player resources are released; returns **-1** otherwise. - -## Reset\(\) - -``` -int32_t OHOS::Media::Player::Reset () -``` - - **Description:** - -Restores the player to the initial state. - -**Returns:** - -Returns **0** if the player is restored; returns **-1** otherwise. - -## Rewind\(\) - -``` -int32_t OHOS::Media::Player::Rewind (int64_t mSeconds, int32_t mode ) -``` - - **Description:** - -Changes the playback position. - -This function can be used during playback or pause. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
mSecondsIndicates the target playback position, accurate to second.
modeIndicates the player seek mode. For details, see PlayerSeekMode.
- -**Returns:** - -Returns **0** if the playback position is changed; returns **-1** otherwise. - -## SetPlayerCallback\(\) - -``` -void OHOS::Media::Player::SetPlayerCallback (const std::shared_ptr< [PlayerCallback](OHOS-Media-PlayerCallback.md) > & cb) -``` - - **Description:** - -Registers a listener to receive events and exception notifications from the player. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
cbIndicates the listener to register. For details, see PlayerCallback.
- -## SetSource\(\) - -``` -int32_t OHOS::Media::Player::SetSource (const [Source](OHOS-Media-Source.md) & source) -``` - - **Description:** - -Sets the playback source for the player. The corresponding source can be the file descriptor \(FD\) of the local file, local file URI, network URI, or media stream. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sourceIndicates the playback source. Currently, only local file URIs and media streams are supported. For details, see Source.
- -**Returns:** - -Returns **0** if the setting is successful; returns **-1** otherwise. - -## SetVideoSurface\(\) - -``` -int32_t OHOS::Media::Player::SetVideoSurface ([Surface](OHOS-Surface.md) * surface) -``` - - **Description:** - -Sets a surface for video playback. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
surfaceIndicates the surface to set. For details, see Surface.
- -**Returns:** - -Returns **0** if the setting is successful; returns **-1** otherwise. - -## SetVolume\(\) - -``` -int32_t OHOS::Media::Player::SetVolume (float leftVolume, float rightVolume ) -``` - - **Description:** - -Sets the volume of the player. - -This function can be used during playback or pause. The value **0** indicates no sound, and **100** indicates the original volume. If no audio device is started or no audio stream exists, the value **-1** is returned. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
leftVolumeIndicates the target volume of the left audio channel to set, ranging from 0 to 300.
rightVolumeIndicates the target volume of the right audio channel to set, ranging from 0 to 300.
- -**Returns:** - -Returns **0** if the setting is successful; returns **-1** otherwise. - -## Stop\(\) - -``` -int32_t OHOS::Media::Player::Stop () -``` - - **Description:** - -Stops playback. - -**Returns:** - -Returns **0** if the playback is stopped; returns **-1** otherwise. - diff --git a/api/api-SmartVision-Devices/MultiMedia_Recorder.md b/api/api-SmartVision-Devices/MultiMedia_Recorder.md deleted file mode 100755 index 3e77f050050beb4f4a4e9fa1692752819e577650..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/MultiMedia_Recorder.md +++ /dev/null @@ -1,1424 +0,0 @@ -# MultiMedia\_Recorder - -- [Overview](#section1628426640165625) -- [Summary](#section532867802165625) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Enumerations](#enum-members) -- [Functions](#func-members) -- [Details](#section1184400305165625) -- [Enumeration Type](#section1963998659165625) -- [DataSourceType](#gaccc05bb178cecd760369ea096dceae4c) -- [FileSplitType](#ga8759c7e5a74964a584a716f4ec0b7edb) -- [OutputFormatType](#ga3dfe2e61369bf1c081ce569e235354df) -- [RecorderErrorType](#ga5132172c298fc1497d12040b6bd511cf) -- [RecorderInfoType](#ga0db5cf9cc68d4b468e921a563248ffe0) -- [VideoSourceType](#gad252d27f9ce4b6ae0756bfeaa5f34490) -- [Function](#section552680935165625) -- [GetSurface\(\)](#gad633e33fbbd5efcf4057aff3cc6e2b38) -- [OnError\(\)](#ga822c915f1bfab8c380919f24f2ee4f54) -- [OnInfo\(\)](#gac1f8bb191d90aac50119ea7ae4108407) -- [Pause\(\)](#ga71da5cc2720b336f0daadbe09d61c695) -- [Prepare\(\)](#ga15d2f3416bb735a0715e1e79be226387) -- [Release\(\)](#ga116583c0d649f447c2dd272aae465cca) -- [Reset\(\)](#gaebb808d5dd73b94b769b69e2b464c744) -- [Resume\(\)](#gafd32ed157821800936a258a73af936be) -- [SetAudioChannels\(\)](#ga77d76e5657cb3359e85521e08a456c7d) -- [SetAudioEncoder\(\)](#gab37c9385fa1a56f686beb73c7dcc1b1b) -- [SetAudioEncodingBitRate\(\)](#gac21a1a00c40cf58df84f1ba281b79a36) -- [SetAudioSampleRate\(\)](#gab2b98616da55ec294053c0c25645c845) -- [SetAudioSource\(\)](#gae287f59da8b3f1b6ca9f1c0e58a6565a) -- [SetCaptureRate\(\)](#ga4f4a03fe881f48515874a699118fb84a) -- [SetFileSplitDuration\(\)](#ga952ce2fada10d701e38e4ee29139e2af) -- [SetMaxDuration\(\)](#gaf2806f0fddd17a3e59eb7c5c740470d6) -- [SetMaxFileSize\(\)](#gaeed9ee49d9d1ac1497ec79bf9639c0bc) -- [SetNextOutputFile\(\)](#ga8545fe87eb4bd399525e4c5fb414d7cb) -- [SetOutputFile\(\)](#ga500d2bc895852fe292d7397d8450d091) -- [SetOutputFormat\(\)](#gaffb7874aae331570ecedfe609a495468) -- [SetOutputPath\(\)](#gaa5c898c1ad051b5c9f115ef15d952f18) -- [SetParameter\(\)](#ga05cf279a460418b22d267527c83ede15) -- [SetRecorderCallback\(\)](#ga882585460b0538680954ce6692610376) -- [SetVideoEncoder\(\)](#gad9be6914af57fcf7acb7a5398118c614) -- [SetVideoEncodingBitRate\(\)](#ga4e05a76b50abf790f29f06a0c1d4ecb8) -- [SetVideoFrameRate\(\)](#gaeb90d4d75d80040aeaae354abd1d29d7) -- [SetVideoSize\(\)](#ga43c0ee5b76f58a12c2c745839184a96b) -- [SetVideoSource\(\)](#ga9e12ef9700d06c7620f9e3d7b4d844ca) -- [Start\(\)](#gac3aaa32627f0799dea65e51356b91bfb) -- [Stop\(\)](#ga1253f753cf9ed01dae5d57a37524dfa7) -- [Variable](#section1577650583165625) -- [RCORDER\_PRE\_CACHE\_DURATION](#gaaa77dd5c1745b9d5ba4b23c90206e936) - -## **Overview** - -**Description:** - -Defines the **Recorder** class and provides functions for audio and video recording. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - -

File Name

-

Description

-

recorder.h

-

Declares the Recorder class for audio and video recording.

-
- -## Data Structures - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

OHOS::Media::RecorderCallback

-

Provides listeners for recording errors and information events.

-

OHOS::Media::Recorder

-

Provides functions for audio and video recording.

-
- -## Enumerations - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

OHOS::Media::VideoSourceType : int32_t { OHOS::Media::VIDEO_SOURCE_SURFACE_YUV = 0, OHOS::Media::VIDEO_SOURCE_SURFACE_RGB, OHOS::Media::VIDEO_SOURCE_SURFACE_ES, OHOS::Media::VIDEO_SOURCE_BUTT }

-

Enumerates video source types.

-

OHOS::Media::DataSourceType : int32_t { OHOS::Media::IMAGE = 0 }

-

Enumerates data source types.

-

OHOS::Media::OutputFormatType : int32_t { OHOS::Media::FORMAT_DEFAULT = 0, OHOS::Media::FORMAT_MPEG_4, OHOS::Media::FORMAT_TS }

-

Enumerates output file formats.

-

OHOS::Media::FileSplitType : int32_t { OHOS::Media::FILE_SPLIT_POST = 0, OHOS::Media::FILE_SPLIT_PRE, OHOS::Media::FILE_SPLIT_NORMAL }

-

Enumerates file split types.

-

OHOS::Media::RecorderCallback::RecorderInfoType : int32_t { OHOS::Media::RecorderCallback::RECORDER_INFO_MAX_DURATION_APPROACHING = 0, OHOS::Media::RecorderCallback::RECORDER_INFO_MAX_FILESIZE_APPROACHING, OHOS::Media::RecorderCallback::RECORDER_INFO_MAX_DURATION_REACHED, OHOS::Media::RecorderCallback::RECORDER_INFO_MAX_FILESIZE_REACHED, OHOS::Media::RecorderCallback::RECORDER_INFO_NEXT_OUTPUT_FILE_STARTED, OHOS::Media::RecorderCallback::RECORDER_INFO_FILE_SPLIT_FINISHED, OHOS::Media::RecorderCallback::RECORDER_INFO_FILE_START_TIME_MS }

-

Enumerates recording information types.

-

OHOS::Media::RecorderCallback::RecorderErrorType : int32_t { OHOS::Media::RecorderCallback::RECORDER_ERROR_UNKNOWN = 0 }

-

Enumerates recording error types.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

OHOS::Media::RecorderCallback::OnError (int32_t errorType, int32_t errorCode)=0

-

virtual void

-

Called when an error occurs during recording. This callback is used to report recording errors.

-

OHOS::Media::RecorderCallback::OnInfo (int32_t type, int32_t extra)=0

-

virtual void

-

Called when an information event occurs during recording. This callback is used to report recording information.

-

OHOS::Media::Recorder::SetVideoSource (VideoSourceType source, int32_t &sourceId)

-

int32_t

-

Sets a video source for recording.

-

OHOS::Media::Recorder::SetVideoEncoder (int32_t sourceId, VideoCodecFormat encoder)

-

int32_t

-

Sets a video encoder for recording.

-

OHOS::Media::Recorder::SetVideoSize (int32_t sourceId, int32_t width, int32_t height)

-

int32_t

-

Sets the width and height of the video to record.

-

OHOS::Media::Recorder::SetVideoFrameRate (int32_t sourceId, int32_t frameRate)

-

int32_t

-

Sets the frame rate of the video to record.

-

OHOS::Media::Recorder::SetVideoEncodingBitRate (int32_t sourceId, int32_t rate)

-

int32_t

-

Sets the encoding bit rate of the video to record.

-

OHOS::Media::Recorder::SetCaptureRate (int32_t sourceId, double fps)

-

int32_t

-

Sets the video capture rate.

-

OHOS::Media::Recorder::GetSurface (int32_t sourceId)

-

std::shared_ptr< OHOS::Surface >

-

Obtains the surface of the video source.

-

OHOS::Media::Recorder::SetAudioSource (AudioSourceType source, int32_t &sourceId)

-

int32_t

-

Sets the audio source for recording.

-

OHOS::Media::Recorder::SetAudioEncoder (int32_t sourceId, AudioCodecFormat encoder)

-

int32_t

-

Sets an audio encoder for recording.

-

OHOS::Media::Recorder::SetAudioSampleRate (int32_t sourceId, int32_t rate)

-

int32_t

-

Sets the audio sampling rate for recording.

-

OHOS::Media::Recorder::SetAudioChannels (int32_t sourceId, int32_t num)

-

int32_t

-

Sets the number of audio channels to record.

-

OHOS::Media::Recorder::SetAudioEncodingBitRate (int32_t sourceId, int32_t bitRate)

-

int32_t

-

Sets the encoding bit rate of the audio to record.

-

OHOS::Media::Recorder::SetMaxDuration (int32_t duration)

-

int32_t

-

Sets the maximum duration of a recorded file, in seconds.

-

OHOS::Media::Recorder::SetOutputFormat (OutputFormatType format)

-

int32_t

-

Sets the output file format.

-

OHOS::Media::Recorder::SetOutputPath (const string &path)

-

int32_t

-

Sets the output file path.

-

OHOS::Media::Recorder::SetOutputFile (int32_t fd)

-

int32_t

-

Sets the file descriptor (FD) of the output file.

-

OHOS::Media::Recorder::SetNextOutputFile (int32_t fd)

-

int32_t

-

Sets the FD of the next output file.

-

OHOS::Media::Recorder::SetMaxFileSize (int64_t size)

-

int32_t

-

Sets the maximum size of a recorded file, in bytes.

-

OHOS::Media::Recorder::SetRecorderCallback (const std::shared_ptr< RecorderCallback > &callback)

-

int32_t

-

Registers a recording listener.

-

OHOS::Media::Recorder::Prepare ()

-

int32_t

-

Prepares for recording.

-

OHOS::Media::Recorder::Start ()

-

int32_t

-

Starts recording.

-

OHOS::Media::Recorder::Pause ()

-

int32_t

-

Pauses recording.

-

OHOS::Media::Recorder::Resume ()

-

int32_t

-

Resumes recording.

-

OHOS::Media::Recorder::Stop (bool block)

-

int32_t

-

Stops recording.

-

OHOS::Media::Recorder::Reset ()

-

int32_t

-

Resets the recording.

-

OHOS::Media::Recorder::Release ()

-

int32_t

-

Releases recording resources.

-

OHOS::Media::Recorder::SetFileSplitDuration (FileSplitType type, int64_t timestamp, uint32_t duration)

-

int32_t

-

Manually splits a video.

-

OHOS::Media::Recorder::SetParameter (int32_t sourceId, const Format &format)

-

int32_t

-

Sets an extended parameter for recording, for example, RCORDER_PRE_CACHE_DURATION.

-
- -## **Details** - -## **Enumeration Type ** - -## DataSourceType - -``` -enum [OHOS::Media::DataSourceType](MultiMedia_Recorder.md#gaccc05bb178cecd760369ea096dceae4c) : int32_t -``` - - **Description:** - -Enumerates data source types. - - - - - - - - - - -

Enumerator

-

Description

-
IMAGE

Image data source

-
- -## FileSplitType - -``` -enum [OHOS::Media::FileSplitType](MultiMedia_Recorder.md#ga8759c7e5a74964a584a716f4ec0b7edb) : int32_t -``` - - **Description:** - -Enumerates file split types. - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
FILE_SPLIT_POST

Delayed/Backward split

-
FILE_SPLIT_PRE

Advanced/Forward split

-
FILE_SPLIT_NORMAL

Normal split

-
- -## OutputFormatType - -``` -enum [OHOS::Media::OutputFormatType](MultiMedia_Recorder.md#ga3dfe2e61369bf1c081ce569e235354df) : int32_t -``` - - **Description:** - -Enumerates output file formats. - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
FORMAT_DEFAULT

Default format

-
FORMAT_MPEG_4

MPEG4 format

-
FORMAT_TS

TS format

-
- -## RecorderErrorType - -``` -enum [OHOS::Media::RecorderCallback::RecorderErrorType](MultiMedia_Recorder.md#ga5132172c298fc1497d12040b6bd511cf) : int32_t -``` - - **Description:** - -Enumerates recording error types. - - - - - - - - - - -

Enumerator

-

Description

-
RECORDER_ERROR_UNKNOWN

Unknown error

-
- -## RecorderInfoType - -``` -enum [OHOS::Media::RecorderCallback::RecorderInfoType](MultiMedia_Recorder.md#ga0db5cf9cc68d4b468e921a563248ffe0) : int32_t -``` - - **Description:** - -Enumerates recording information types. - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
RECORDER_INFO_MAX_DURATION_APPROACHING

The recording duration is reaching the threshold specified by SetMaxDuration. This type of information is reported when only one second or 10% is left to reach the allowed duration.

-
RECORDER_INFO_MAX_FILESIZE_APPROACHING

The recorded file size is reaching the threshold specified by SetMaxFileSize. This type of information is reported when only 100 KB or 10% is left to reach the allowed size.

-
RECORDER_INFO_MAX_DURATION_REACHED

The threshold specified by SetMaxDuration is reached, and the recording ends. Before calling SetOutputFile, you must close the file.

-
RECORDER_INFO_MAX_FILESIZE_REACHED

The threshold specified by SetMaxFileSize is reached, and the recording ends. Before calling SetOutputFile, you must close the file.

-
RECORDER_INFO_NEXT_OUTPUT_FILE_STARTED

Recording started for the next output file.

-
RECORDER_INFO_FILE_SPLIT_FINISHED

Manual file split completed.

-
RECORDER_INFO_FILE_START_TIME_MS

The start time position of the recording file is not supported.

-
- -## VideoSourceType - -``` -enum [OHOS::Media::VideoSourceType](MultiMedia_Recorder.md#gad252d27f9ce4b6ae0756bfeaa5f34490) : int32_t -``` - - **Description:** - -Enumerates video source types. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
VIDEO_SOURCE_SURFACE_YUV

YUV video data provided through Surface

-
VIDEO_SOURCE_SURFACE_RGB

RGB video data provided through Surface

-
VIDEO_SOURCE_SURFACE_ES

Raw encoded data provided through Surface

-
VIDEO_SOURCE_BUTT

Invalid value

-
- -## **Function ** - -## GetSurface\(\) - -``` -std::shared_ptr<[OHOS::Surface](OHOS-Surface.md)> OHOS::Media::Recorder::GetSurface (int32_t sourceId) -``` - - **Description:** - -Obtains the surface of the video source. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sourceIdIndicates the video source ID, which can be obtained from SetVideoSource.
- -**Returns:** - -Returns the pointer to the surface. - -## OnError\(\) - -``` -virtual void OHOS::Media::RecorderCallback::OnError (int32_t errorType, int32_t errorCode ) -``` - - **Description:** - -Called when an error occurs during recording. This callback is used to report recording errors. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
errorTypeIndicates the error type. For details, see RecorderErrorType.
errorCodeIndicates the error code.
- -## OnInfo\(\) - -``` -virtual void OHOS::Media::RecorderCallback::OnInfo (int32_t type, int32_t extra ) -``` - - **Description:** - -Called when an information event occurs during recording. This callback is used to report recording information. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
typeIndicates the information type. For details, see RecorderInfoType.
extraIndicates other information, for example, the start time position of a recording file.
- -## Pause\(\) - -``` -int32_t OHOS::Media::Recorder::Pause () -``` - - **Description:** - -Pauses recording. - -After [Start](MultiMedia_Recorder.md#gac3aaa32627f0799dea65e51356b91bfb) is called, you can call this function to pause recording. The audio and video source streams are not paused, and source data is discarded. - -**Returns:** - -Returns **SUCCESS** if the recording is paused; returns an error code defined in [media\_errors.h](media_errors-h.md) otherwise. - -## Prepare\(\) - -``` -int32_t OHOS::Media::Recorder::Prepare () -``` - - **Description:** - -Prepares for recording. - -This function must be called before [Start](MultiMedia_Recorder.md#gac3aaa32627f0799dea65e51356b91bfb). - -**Returns:** - -Returns **SUCCESS** if the preparation is successful; returns an error code defined in [media\_errors.h](media_errors-h.md) otherwise. - -## Release\(\) - -``` -int32_t OHOS::Media::Recorder::Release () -``` - - **Description:** - -Releases recording resources. - -**Returns:** - -Returns **SUCCESS** if recording resources are released; returns an error code defined in [media\_errors.h](media_errors-h.md) otherwise. - -## Reset\(\) - -``` -int32_t OHOS::Media::Recorder::Reset () -``` - - **Description:** - -Resets the recording. - -After the function is called, add a recording source by calling [SetVideoSource](MultiMedia_Recorder.md#ga9e12ef9700d06c7620f9e3d7b4d844ca) or [SetAudioSource](MultiMedia_Recorder.md#gae287f59da8b3f1b6ca9f1c0e58a6565a), set related parameters, and call [Start](MultiMedia_Recorder.md#gac3aaa32627f0799dea65e51356b91bfb) to start recording again after [Prepare](MultiMedia_Recorder.md#ga15d2f3416bb735a0715e1e79be226387) is called. - -**Returns:** - -Returns **SUCCESS** if the recording is reset; returns an error code defined in [media\_errors.h](media_errors-h.md) otherwise. - -## Resume\(\) - -``` -int32_t OHOS::Media::Recorder::Resume () -``` - - **Description:** - -Resumes recording. - -You can call this function to resume recording after [Pause](MultiMedia_Recorder.md#ga71da5cc2720b336f0daadbe09d61c695) is called. - -**Returns:** - -Returns **SUCCESS** if the recording is resumed; returns an error code defined in [media\_errors.h](media_errors-h.md) otherwise. - -## SetAudioChannels\(\) - -``` -int32_t OHOS::Media::Recorder::SetAudioChannels (int32_t sourceId, int32_t num ) -``` - - **Description:** - -Sets the number of audio channels to record. - -This function must be called after [SetAudioSource](MultiMedia_Recorder.md#gae287f59da8b3f1b6ca9f1c0e58a6565a) but before [Prepare](MultiMedia_Recorder.md#ga15d2f3416bb735a0715e1e79be226387). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sourceIdIndicates the audio source ID, which can be obtained from SetAudioSource.
numIndicates the number of audio channels to set.
- -**Returns:** - -Returns **SUCCESS** if the setting is successful; returns an error code defined in [media\_errors.h](media_errors-h.md) otherwise. - -## SetAudioEncoder\(\) - -``` -int32_t OHOS::Media::Recorder::SetAudioEncoder (int32_t sourceId, [AudioCodecFormat](MultiMedia_MediaCommon.md#gaa4ea6f314644ed287e0704be26c768b7) encoder ) -``` - - **Description:** - -Sets an audio encoder for recording. - -If this function is not called, the output file does not contain the audio track. This function must be called after [SetAudioSource](MultiMedia_Recorder.md#gae287f59da8b3f1b6ca9f1c0e58a6565a) but before [Prepare](MultiMedia_Recorder.md#ga15d2f3416bb735a0715e1e79be226387). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sourceIdIndicates the audio source ID, which can be obtained from SetAudioSource.
encoderIndicates the audio encoder to set.
- -**Returns:** - -Returns **SUCCESS** if the setting is successful; returns an error code defined in [media\_errors.h](media_errors-h.md) otherwise. - -## SetAudioEncodingBitRate\(\) - -``` -int32_t OHOS::Media::Recorder::SetAudioEncodingBitRate (int32_t sourceId, int32_t bitRate ) -``` - - **Description:** - -Sets the encoding bit rate of the audio to record. - -This function must be called after [SetAudioSource](MultiMedia_Recorder.md#gae287f59da8b3f1b6ca9f1c0e58a6565a) but before [Prepare](MultiMedia_Recorder.md#ga15d2f3416bb735a0715e1e79be226387). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sourceIdIndicates the audio source ID, which can be obtained from SetAudioSource.
bitRateIndicates the audio encoding bit rate, in bit/s.
- -**Returns:** - -Returns **SUCCESS** if the setting is successful; returns an error code defined in [media\_errors.h](media_errors-h.md) otherwise. - -## SetAudioSampleRate\(\) - -``` -int32_t OHOS::Media::Recorder::SetAudioSampleRate (int32_t sourceId, int32_t rate ) -``` - - **Description:** - -Sets the audio sampling rate for recording. - -This function must be called after [SetAudioSource](MultiMedia_Recorder.md#gae287f59da8b3f1b6ca9f1c0e58a6565a) but before [Prepare](MultiMedia_Recorder.md#ga15d2f3416bb735a0715e1e79be226387). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sourceIdIndicates the audio source ID, which can be obtained from SetAudioSource.
rateIndicates the sampling rate of the audio per second.
- -**Returns:** - -Returns **SUCCESS** if the setting is successful; returns an error code defined in [media\_errors.h](media_errors-h.md) otherwise. - -## SetAudioSource\(\) - -``` -int32_t OHOS::Media::Recorder::SetAudioSource ([AudioSourceType](MultiMedia_MediaCommon.md#gadc3158e093b995ca7b9b6aa32388ccdd) source, int32_t & sourceId ) -``` - - **Description:** - -Sets the audio source for recording. - -If this function is not called, the output file does not contain the audio track. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sourceIndicates the audio source type. For details, see AudioSourceType.
sourceIdIndicates the audio source ID. The value -1 indicates an invalid ID and the setting fails.
- -**Returns:** - -Returns **SUCCESS** if the setting is successful; returns an error code defined in [media\_errors.h](media_errors-h.md) otherwise. - -## SetCaptureRate\(\) - -``` -int32_t OHOS::Media::Recorder::SetCaptureRate (int32_t sourceId, double fps ) -``` - - **Description:** - -Sets the video capture rate. - -This function must be called after [SetVideoSource](MultiMedia_Recorder.md#ga9e12ef9700d06c7620f9e3d7b4d844ca) but before [Prepare](MultiMedia_Recorder.md#ga15d2f3416bb735a0715e1e79be226387). It is valid when the video source is YUV or RGB. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sourceIdIndicates the video source ID, which can be obtained from SetVideoSource.
fpsIndicates the rate at which frames are captured per second.
- -**Returns:** - -Returns **SUCCESS** if the setting is successful; returns an error code defined in [media\_errors.h](media_errors-h.md) otherwise. - -## SetFileSplitDuration\(\) - -``` -int32_t OHOS::Media::Recorder::SetFileSplitDuration ([FileSplitType](MultiMedia_Recorder.md#ga8759c7e5a74964a584a716f4ec0b7edb) type, int64_t timestamp, uint32_t duration ) -``` - - **Description:** - -Manually splits a video. - -This function must be called after [Start](MultiMedia_Recorder.md#gac3aaa32627f0799dea65e51356b91bfb). After this function is called, the file is split based on the manual split type. After the manual split is complete, the initial split type is used. This function can be called again only after **RECORDER\_INFO\_FILE\_SPLIT\_FINISHED** is reported. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
typeIndicates the file split type. For details, see FileSplitType.
timestampIndicates the file split timestamp. This parameter is not supported currently and can be set to -1. The recording module splits a file based on the call time.
durationIndicates the duration for splitting the file.
- -**Returns:** - -Returns **SUCCESS** if the video is manually split; returns an error code defined in [media\_errors.h](media_errors-h.md) otherwise. - -## SetMaxDuration\(\) - -``` -int32_t OHOS::Media::Recorder::SetMaxDuration (int32_t duration) -``` - - **Description:** - -Sets the maximum duration of a recorded file, in seconds. - -This method must be called before [Prepare](MultiMedia_Recorder.md#ga15d2f3416bb735a0715e1e79be226387). If the setting is valid, **RECORDER\_INFO\_MAX\_DURATION\_APPROACHING** is reported through **OnInfo** in the [RecorderCallback](OHOS-Media-RecorderCallback.md) class when only one second or 10% is left to reach the allowed duration. If the recording output file is set by calling [SetOutputFile](MultiMedia_Recorder.md#ga500d2bc895852fe292d7397d8450d091), call [SetNextOutputFile](MultiMedia_Recorder.md#ga8545fe87eb4bd399525e4c5fb414d7cb) to set the next output file. Otherwise, the current file will be overwritten when the allowed duration is reached. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
durationIndicates the maximum recording duration to set. If the value is 0 or a negative number, a failure message is returned. The default duration is 60s.
- -**Returns:** - -Returns **SUCCESS** if the setting is successful; returns an error code defined in [media\_errors.h](media_errors-h.md) otherwise. - -## SetMaxFileSize\(\) - -``` -int32_t OHOS::Media::Recorder::SetMaxFileSize (int64_t size) -``` - - **Description:** - -Sets the maximum size of a recorded file, in bytes. - -This function must be called before [Prepare](MultiMedia_Recorder.md#ga15d2f3416bb735a0715e1e79be226387). If the setting is valid, **RECORDER\_INFO\_MAX\_DURATION\_APPROACHING** is reported through **OnInfo** in the [RecorderCallback](OHOS-Media-RecorderCallback.md) class when only 100 KB or 10% is left to reach the allowed size. If the recording output file is set by calling [SetOutputFile](MultiMedia_Recorder.md#ga500d2bc895852fe292d7397d8450d091), call [SetNextOutputFile](MultiMedia_Recorder.md#ga8545fe87eb4bd399525e4c5fb414d7cb) to set the next output file. Otherwise, when the allowed size is reached, the current file will be overwritten. If **MaxDuration** is also set by calling [SetMaxDuration](MultiMedia_Recorder.md#gaf2806f0fddd17a3e59eb7c5c740470d6), **MaxDuration** or **MaxFileSize** prevails depending on which of them is first satisfied. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sizeIndicates the maximum file size to set. If the value is 0 or a negative number, a failure message is returned. By default, the maximum size of a single file supported by the current file system is used as the limit.
- -**Returns:** - -Returns **SUCCESS** if the setting is successful; returns an error code defined in [media\_errors.h](media_errors-h.md) otherwise. - -## SetNextOutputFile\(\) - -``` -int32_t OHOS::Media::Recorder::SetNextOutputFile (int32_t fd) -``` - - **Description:** - -Sets the FD of the next output file. - -If [SetOutputFile](MultiMedia_Recorder.md#ga500d2bc895852fe292d7397d8450d091) is successful, call this function to set the FD of the next output file after **RECORDER\_INFO\_MAX\_DURATION\_APPROACHING** or **RECORDER\_INFO\_MAX\_FILESIZE\_APPROACHING** is received. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
fdIndicates the FD of the next output file.
- -**Returns:** - -Returns **SUCCESS** if the setting is successful; returns an error code defined in [media\_errors.h](media_errors-h.md) otherwise. - -## SetOutputFile\(\) - -``` -int32_t OHOS::Media::Recorder::SetOutputFile (int32_t fd) -``` - - **Description:** - -Sets the file descriptor \(FD\) of the output file. - -This function must be called before [Prepare](MultiMedia_Recorder.md#ga15d2f3416bb735a0715e1e79be226387). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
fdIndicates the FD of the file.
- -**Returns:** - -Returns **SUCCESS** if the setting is successful; returns an error code defined in [media\_errors.h](media_errors-h.md) otherwise. - -## SetOutputFormat\(\) - -``` -int32_t OHOS::Media::Recorder::SetOutputFormat ([OutputFormatType](MultiMedia_Recorder.md#ga3dfe2e61369bf1c081ce569e235354df) format) -``` - - **Description:** - -Sets the output file format. - -This function must be called before [Prepare](MultiMedia_Recorder.md#ga15d2f3416bb735a0715e1e79be226387). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
formatIndicates the output file format. For details, see OutputFormatType.
- -**Returns:** - -Returns **SUCCESS** if the setting is successful; returns an error code defined in [media\_errors.h](media_errors-h.md) otherwise. - -## SetOutputPath\(\) - -``` -int32_t OHOS::Media::Recorder::SetOutputPath (const string & path) -``` - - **Description:** - -Sets the output file path. - -This function must be called before [Prepare](MultiMedia_Recorder.md#ga15d2f3416bb735a0715e1e79be226387) and One of them [SetOutputFile](MultiMedia_Recorder.md#ga500d2bc895852fe292d7397d8450d091) must be set. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
pathIndicates the output file path.
- -**Returns:** - -Returns **SUCCESS** if the setting is successful; returns an error code defined in [media\_errors.h](media_errors-h.md) otherwise. - -## SetParameter\(\) - -``` -int32_t OHOS::Media::Recorder::SetParameter (int32_t sourceId, const [Format](OHOS-Media-Format.md) & format ) -``` - - **Description:** - -Sets an extended parameter for recording, for example, **RCORDER\_PRE\_CACHE\_DURATION**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sourceIdIndicates the data source ID. The value -1 indicates all sources.
formatIndicates the string key and value. For details, see Format and RCORDER_PRE_CACHE_DURATION.
- -**Returns:** - -Returns **SUCCESS** if the setting is successful; returns an error code defined in [media\_errors.h](media_errors-h.md) otherwise. - -## SetRecorderCallback\(\) - -``` -int32_t OHOS::Media::Recorder::SetRecorderCallback (const std::shared_ptr< [RecorderCallback](OHOS-Media-RecorderCallback.md) > & callback) -``` - - **Description:** - -Registers a recording listener. - -This function must be called before [Prepare](MultiMedia_Recorder.md#ga15d2f3416bb735a0715e1e79be226387). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
callbackIndicates the recording listener to register. For details, see RecorderCallback.
- -**Returns:** - -Returns **SUCCESS** if the listener is registered; returns an error code defined in [media\_errors.h](media_errors-h.md) otherwise. - -## SetVideoEncoder\(\) - -``` -int32_t OHOS::Media::Recorder::SetVideoEncoder (int32_t sourceId, [VideoCodecFormat](MultiMedia_MediaCommon.md#ga797e6c5e38e23e730eff5bcc41427d7e) encoder ) -``` - - **Description:** - -Sets a video encoder for recording. - -If this function is not called, the output file does not contain the video track. This function must be called after [SetVideoSource](MultiMedia_Recorder.md#ga9e12ef9700d06c7620f9e3d7b4d844ca) but before [Prepare](MultiMedia_Recorder.md#ga15d2f3416bb735a0715e1e79be226387). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sourceIdIndicates the video source ID, which can be obtained from SetVideoSource.
encoderIndicates the video encoder to set.
- -**Returns:** - -Returns **SUCCESS** if the setting is successful; returns an error code defined in [media\_errors.h](media_errors-h.md) otherwise. - -## SetVideoEncodingBitRate\(\) - -``` -int32_t OHOS::Media::Recorder::SetVideoEncodingBitRate (int32_t sourceId, int32_t rate ) -``` - - **Description:** - -Sets the encoding bit rate of the video to record. - -This function must be called after [SetVideoSource](MultiMedia_Recorder.md#ga9e12ef9700d06c7620f9e3d7b4d844ca) but before [Prepare](MultiMedia_Recorder.md#ga15d2f3416bb735a0715e1e79be226387). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sourceIdIndicates the video source ID, which can be obtained from SetVideoSource.
rateIndicates the encoding bit rate to set.
- -**Returns:** - -Returns **SUCCESS** if the setting is successful; returns an error code defined in [media\_errors.h](media_errors-h.md) otherwise. - -## SetVideoFrameRate\(\) - -``` -int32_t OHOS::Media::Recorder::SetVideoFrameRate (int32_t sourceId, int32_t frameRate ) -``` - - **Description:** - -Sets the frame rate of the video to record. - -This function must be called after [SetVideoSource](MultiMedia_Recorder.md#ga9e12ef9700d06c7620f9e3d7b4d844ca) but before [Prepare](MultiMedia_Recorder.md#ga15d2f3416bb735a0715e1e79be226387). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sourceIdIndicates the video source ID, which can be obtained from SetVideoSource.
frameRateIndicates the frame rate to set.
- -**Returns:** - -Returns **SUCCESS** if the setting is successful; returns an error code defined in [media\_errors.h](media_errors-h.md) otherwise. - -## SetVideoSize\(\) - -``` -int32_t OHOS::Media::Recorder::SetVideoSize (int32_t sourceId, int32_t width, int32_t height ) -``` - - **Description:** - -Sets the width and height of the video to record. - -This function must be called after [SetVideoSource](MultiMedia_Recorder.md#ga9e12ef9700d06c7620f9e3d7b4d844ca) but before [Prepare](MultiMedia_Recorder.md#ga15d2f3416bb735a0715e1e79be226387). - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
sourceIdIndicates the video source ID, which can be obtained from SetVideoSource.
widthIndicates the video width to set.
heightIndicates the video height to set.
- -**Returns:** - -Returns **SUCCESS** if the setting is successful; returns an error code defined in [media\_errors.h](media_errors-h.md) otherwise. - -## SetVideoSource\(\) - -``` -int32_t OHOS::Media::Recorder::SetVideoSource ([VideoSourceType](MultiMedia_Recorder.md#gad252d27f9ce4b6ae0756bfeaa5f34490) source, int32_t & sourceId ) -``` - - **Description:** - -Sets a video source for recording. - -If this function is not called, the output file does not contain the video track. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sourceIndicates the video source type. For details, see VideoSourceType.
sourceIdIndicates the video source ID. The value -1 indicates an invalid ID and the setting fails.
- -**Returns:** - -Returns **SUCCESS** if the setting is successful; returns an error code defined in [media\_errors.h](media_errors-h.md) otherwise. - -## Start\(\) - -``` -int32_t OHOS::Media::Recorder::Start () -``` - - **Description:** - -Starts recording. - -This function must be called after [Prepare](MultiMedia_Recorder.md#ga15d2f3416bb735a0715e1e79be226387). - -**Returns:** - -Returns **SUCCESS** if the recording is started; returns an error code defined in [media\_errors.h](media_errors-h.md) otherwise. - -## Stop\(\) - -``` -int32_t OHOS::Media::Recorder::Stop (bool block) -``` - - **Description:** - -Stops recording. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
blockIndicates the stop mode. The value true indicates that the processing stops after all caches are processed, and false indicates that the processing stops immediately and all caches are discarded.
- -**Returns:** - -Returns **SUCCESS** if the recording is stopped; returns an error code defined in [media\_errors.h](media_errors-h.md) otherwise. - -## **Variable ** - -## RCORDER\_PRE\_CACHE\_DURATION - -``` -const string OHOS::Media::RCORDER_PRE_CACHE_DURATION = "pre-cache-duration" -``` - - **Description:** - -This constant can be used as the value of [Format](OHOS-Media-Format.md) in [SetParameter](Parameter.md#ga2779b5e59d43308c51f7be38b9c98ddb) to configure the duration for storing recorded data in the cache. - diff --git a/api/api-SmartVision-Devices/NET.md b/api/api-SmartVision-Devices/NET.md deleted file mode 100755 index 7dfef1cafbab70ebd524446b77b127b39d78239d..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/NET.md +++ /dev/null @@ -1,2666 +0,0 @@ -# NET - -- [Overview](#section1787027955165622) -- [Summary](#section1322897020165622) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Macros](#define-members) -- [Typedefs](#typedef-members) -- [Functions](#func-members) -- [Details](#section2074466484165622) -- [Function](#section1845007127165622) -- [accept\(\)](#ga0807af5ac9dfc2a63624e8c3e0ae95ef) -- [bind\(\)](#ga82199bcd81894331533a25f08e172480) -- [connect\(\)](#gacdfd99b6c59c833776412fbb0c539efb) -- [dn\_comp\(\)](#ga0438570faf515401bffa1a0d9c94a266) -- [dn\_expand\(\)](#ga91eb2055a64b28e4942a3a760d747243) -- [ether\_aton\(\)](#gaab4c5b65c36fc0ea96a017daabc3770a) -- [ether\_aton\_r\(\)](#gac0954821754bace30f674e61bb9f4e5f) -- [ether\_ntoa\(\)](#ga07e34e6ee9e272c4799780915d11677c) -- [ether\_ntoa\_r\(\)](#ga245e21de8e82756712a5182c2674c2ad) -- [freeifaddrs\(\)](#gabfdd6ca5469fe73ed88ba94bf8db57cc) -- [getpeername\(\)](#ga13d77555ad4ed62dfef0ce32dd16755c) -- [getprotobyname\(\)](#ga83ac8a97dd9d895cda658af3aa46fd55) -- [getprotobynumber\(\)](#gac01697dc4a5b8e434522220913bd46ea) -- [getprotoent\(\)](#gaca0da70657afbc3e723990bb229deec3) -- [getsockname\(\)](#ga62577da7dba23abb9c99cf5c2800ab24) -- [getsockopt\(\)](#gacfcf672e255123afb75ed4d326257073) -- [herror\(\)](#gaa68de2578d4e0849f82d70b2f5b9af70) -- [hstrerror\(\)](#gac1752c48d9cf2ff87e29f29df6caa585) -- [htonl\(\)](#gac7eed08cd3b67f42bf56063157c8fd55) -- [htons\(\)](#gaabce0f8d453c3380e5b8a3d4947eb48c) -- [if\_freenameindex\(\)](#ga7fe55c04ac2116fa501338fdcb279cc9) -- [inet\_addr\(\)](#ga617651ec952a1f4c9cbddbf78f4b2e2e) -- [inet\_aton\(\)](#ga26ee8e8e3949699a9c0e02ece272d370) -- [inet\_lnaof\(\)](#ga1facb1380b7657ca9c72fb2633b60e3b) -- [inet\_makeaddr\(\)](#gab28732d1d740597f53fb65a09d97800c) -- [inet\_netof\(\)](#ga3a96aa4e6abe8e6959ea63fe338174dd) -- [inet\_network\(\)](#ga6f478437c4810fce89cf0e77d94181f8) -- [inet\_ntoa\(\)](#ga08b9fff487151e004d9862cbf34a51ad) -- [inet\_ntop\(\)](#gae9a2182ca3255f16723adeea14665b55) -- [inet\_pton\(\)](#ga3f6e2b2dae98a409d77c6e3b0cebc04b) -- [listen\(\)](#ga5989c21d05cb17caba26cef496a7beea) -- [ntohl\(\)](#gae68530d41f32dfef707f20b2bbaa5a44) -- [ntohs\(\)](#gaf8c87af507c59bd8fef112e5e35fe537) -- [recv\(\)](#ga5d049263cd0e3206b93530e68dfd7403) -- [recvfrom\(\)](#ga3089d3ee59e26bd4def3ef870175540e) -- [recvmsg\(\)](#gaaba92f19a31c01b93e3391671a8b3dd5) -- [send\(\)](#ga4053f5c8e26fd490ef54e2a0abf5c89f) -- [sendmsg\(\)](#ga70c97d3a1eab72cba4461d66a1778570) -- [sendto\(\)](#ga2587b27d2c6014c6b568a974655f41c5) -- [setprotoent\(\)](#ga6a806414e4ae5bffb09e3a1d25d8db75) -- [setsockopt\(\)](#ga81983de50d79d797b2ac0f0d0f28953f) -- [shutdown\(\)](#ga402425b8e1ceab40ac38a949babcf1aa) -- [socket\(\)](#gaf4e0711877c45a41168ac677b0670ccd) - -## **Overview** - -**Description:** - -Provides functions and data structures related to network operations. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Name

-

Description

-

inet.h

-

Provides functions and data structures related to network operations.

-

ifaddrs.h

-

Provides functions and data structures related to network operations.

-

if.h

-

Provides functions and data structures related to network operations. For example, you can use the functions to send and receive network data, manage network addresses, and convert bytes.

-

netdb.h

-

Provides functions and data structures related to network operations. For example, you can use the functions to send and receive network data, manage network addresses, and convert bytes.

-

ether.h

-

Provides functions and data structures related to network operations. For example, you can use the functions to send and receive network data, manage network addresses, and convert bytes.

-

ethernet.h

-

Declares the structures related to an Ethernet address.

-

in.h

-

Declares the data structures and macros related to network operations.

-

resolv.h

-

Provides functions and data structures related to network operations. For example, you can use the functions to send and receive network data, manage network addresses, and convert bytes.

-

socket.h

-

Declares functions and data structures related to network sockets.

-
- -## Data Structures - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

ifaddrs

-

Defines the network interface information.

-

if_nameindex

-

Defines the network adapter information.

-

hostent

-

Describes the host name and address information.

-

protoent

-

Describes the protocol database information.

-

ether_addr

-

Defines the information about a 48-bit Ethernet address.

-

in_addr

-

Describes the network address information.

-

sockaddr

-

Describes the socket address information.

-
- -## Macros - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

h_addr h_addr_list[0]

-

Defines the first address in h_addr_list for compatibility.

-

ETH_ALEN 6

-

Defines the length of an Ethernet address.

-

SHUT_RD 0

-

Disables reading data from a socket.

-

SHUT_WR 1

-

Disables writing data to a socket.

-

SHUT_RDWR 2

-

Disables reading data from and writing data to a socket.

-

PF_INET 2

-

Defines the IPv4 internet protocol family.

-

PF_INET6 10

-

Defines the IPv6 internet protocol family.

-

AF_INET PF_INET

-

Defines the IPv4 internet address.

-

AF_INET6 PF_INET6

-

Defines the IPv6 internet address.

-

SOCK_STREAM 1

-

Defines stream sockets.

-

SOCK_DGRAM 2

-

Defines datagram sockets.

-

SOCK_RAW 3

-

Defines raw sockets.

-

MSG_DONTWAIT 0x0040

-

Defines the message type of a non-blocking operation.

-

MSG_NOSIGNAL 0x4000

-

Defines the message type that does not generate a signal.

-

MSG_MORE 0x8000

-

Defines the message type that more data is to be transferred.

-

SO_TYPE 3

-

Obtains the socket type.

-

SO_DONTROUTE 5

-

Prohibits messages from being sent via a gateway.

-

SO_BROADCAST 6

-

Enables sending broadcast messages.

-

SO_SNDBUF 7

-

Defines the size of the socket sending buffer, in bytes.

-

SO_RCVBUF 8

-

Defines the size of the socket receiving buffer, in bytes.

-

SO_RCVTIMEO 66

-

Defines the data receiving timeout interval.

-

SO_SNDTIMEO 67

-

Defines the data sending timeout interval.

-

SO_BINDTODEVICE 25

-

Binds the socket to a particular device.

-

SOL_SOCKET 1

-

Defines the layers of a socket.

-
- -## Typedefs - - - - - - - - - - -

Typedef Name

-

Description

-

in_addr_t

-

typedef uint32_t

-

Defines the data type of a network address.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

htonl (uint32_t n)

-

uint32_t

-

Converts an integer from the host byte order to the network byte order.

-

htons (uint16_t n)

-

uint16_t

-

Converts a 16-bit integer from the host byte order to the network byte order.

-

ntohl (uint32_t n)

-

uint32_t

-

Converts an integer from the network byte order to the host byte order.

-

ntohs (uint16_t n)

-

uint16_t

-

Converts a 16-bit integer from the network byte order to the host byte order.

-

inet_addr (const char *p)

-

in_addr_t

-

Converts a string from the IPv4 numbers-and-dots notation to the binary data in network byte order.

-

inet_network (const char *p)

-

in_addr_t

-

Converts a string from the IPv4 numbers-and-dots notation to the binary data in host byte order.

-

inet_ntoa (struct in_addr in)

-

char *

-

Converts a network address to a string in dotted-decimal format.

-

inet_pton (int af, const char *__restrict s, void *__restrict a0)

-

int

-

Converts a string to a network address in the specified address family.

-

inet_ntop (int af, const void *restrict a0, char *restrict s, socklen_t l)

-

const char *

-

Converts a network address in the specified address family to a string.

-

inet_aton (const char *s0, struct in_addr *dest)

-

int

-

Converts an IP address from the string format to the 32-bit binary format in network byte order.

-

inet_makeaddr (in_addr_t n, in_addr_t h)

-

struct in_addr

-

Converts the network number and host address to the network address.

-

inet_lnaof (struct in_addr in)

-

in_addr_t

-

Converts an IP address into a host ID in host byte order without network bits.

-

inet_netof (struct in_addr in)

-

in_addr_t

-

Extracts the network number from the in_addr structure and converts it to the host byte order.

-

freeifaddrs (struct ifaddrs *ifp)

-

void

-

Frees the network interface information obtained by getifaddrs.

-

if_freenameindex (struct if_nameindex *idx)

-

void

-

Frees the network adapter information obtained by if_nameindex.

-

setprotoent (int stayopen)

-

void

-

Opens a connection to the database and sets the next entry to the first entry.

-

getprotoent (void)

-

struct protoent *

-

Retrieves the current protocol information.

-

getprotobyname (const char *name)

-

struct protoent *

-

Retrieves the information about a specified protocol.

-

getprotobynumber (int num)

-

struct protoent *

-

Retrieves the information about a protocol with the specified number.

-

herror (const char *msg)

-

void

-

Prints error information.

-

hstrerror (int ecode)

-

const char *

-

Retrieves error information associated with the specified error number.

-

ether_ntoa (const struct ether_addr *p_a)

-

char *

-

Converts binary data in network byte order into a standard 48-bit Ethernet host address in the colon hexadecimal notation.

-

ether_aton (const char *x)

-

struct ether_addr *

-

Converts a standard 48-bit Ethernet host address in the colon hexadecimal notation into binary data in network byte order.

-

ether_ntoa_r (const struct ether_addr *p_a, char *x)

-

char *

-

Converts binary data in network byte order into a standard 48-bit Ethernet host address in the colon hexadecimal notation. This function is reentrant.

-

ether_aton_r (const char *x, struct ether_addr *p_a)

-

struct ether_addr *

-

Converts a standard 48-bit Ethernet host address in the colon hexadecimal notation into binary data in network byte order. This function is reentrant.

-

dn_comp (const char *src, unsigned char *dst, int space, unsigned char **dnptrs, unsigned char **lastdnptr)

-

int

-

Compresses a network domain name.

-

dn_expand (const unsigned char *base, const unsigned char *end, const unsigned char *src, char *dest, int space)

-

int

-

Expands a compressed domain name to a full domain name.

-

socket (int domain, int type, int protocol)

-

int

-

Creates a socket and returns its descriptor.

-

shutdown (int sockfd, int how)

-

int

-

Shuts down a socket.

-

bind (int sockfd, const struct sockaddr *addr, socklen_t addrlen)

-

int

-

Binds a local protocol address to a socket.

-

connect (int sockfd, const struct sockaddr *addr, socklen_t addrlen)

-

int

-

Connects a socket to the specified address.

-

listen (int sockfd, int backlog)

-

int

-

Listens for network connection requests on a socket.

-

accept (int sockfd, struct sockaddr *__restrict addr, socklen_t *__restrict addrlen)

-

int

-

Accepts a connection request on a socket.

-

getsockname (int fd, struct sockaddr *restrict addr, socklen_t *restrict len)

-

int

-

Retrieves the local address of the specified socket.

-

getpeername (int fd, struct sockaddr *restrict addr, socklen_t *restrict len)

-

int

-

Retrieves the peer address of the specified socket.

-

send (int fd, const void *buf, size_t len, int flags)

-

ssize_t

-

Sends data to another socket.

-

recv (int fd, void *buf, size_t len, int flags)

-

ssize_t

-

Receives data from another socket.

-

sendto (int fd, const void *buf, size_t len, int flags, const struct sockaddr *addr, socklen_t alen)

-

ssize_t

-

Sends data to another socket.

-

recvfrom (int fd, void *__restrict buf, size_t len, int flags, struct sockaddr *__restrict addr, socklen_t *__restrict alen)

-

ssize_t

-

Receives data from a specified socket.

-

sendmsg (int fd, const struct msghdr *msg, int flags)

-

ssize_t

-

Sends data to another socket.

-

recvmsg (int fd, struct msghdr *msg, int flags)

-

ssize_t

-

Receives data from a specified socket.

-

getsockopt (int fd, int level, int optname, void *__restrict optval, socklen_t *__restrict optlen)

-

int

-

Retrieves the socket options.

-

setsockopt (int fd, int level, int optname, const void *optval, socklen_t optlen)

-

int

-

Sets the socket options.

-
- -## **Details** - -## **Function ** - -## accept\(\) - -``` -int accept (int sockfd, struct [sockaddr](sockaddr.md) *__restrict addr, [socklen_t](UTILS.md#ga531675af4e35aaa1cc9aeefa6cc2ccc4) *__restrict addrlen ) -``` - - **Description:** - -Accepts a connection request on a socket. - -This function is used for waiting for a connection request from the client and for TCP only. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
sockfdIndicates the socket descriptor.
addrIndicates the pointer to the socket address requiring for the connection.
addrlenIndicates the length of the address structure pointed to by addr.
- -**Returns:** - -Returns a valid socket if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid input parameter

-

EOPNOTSUPP

-

The socket requiring for the connection is not of the NETCONN_TCP type.

-

EWOULDBLOCK

-

Failure to receive events in non-blocking mode.

-

ENFILE

-

Failure to creat a new socket.

-

ECONNABORTED

-

Failure to receive the remote information.

-

ENOMEM

-

Memory copy exception.

-
- -## bind\(\) - -``` -int bind (int sockfd, const struct [sockaddr](sockaddr.md) * addr, [socklen_t](UTILS.md#ga531675af4e35aaa1cc9aeefa6cc2ccc4) addrlen ) -``` - - **Description:** - -Binds a local protocol address to a socket. - -This function is called by the server. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
sockfdIndicates the socket descriptor.
addrIndicates the address to be bound to the socket.
addrlenIndicates the length of the address structure pointed to by addr.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid input parameter

-
- -## connect\(\) - -``` -int connect (int sockfd, const struct [sockaddr](sockaddr.md) * addr, [socklen_t](UTILS.md#ga531675af4e35aaa1cc9aeefa6cc2ccc4) addrlen ) -``` - - **Description:** - -Connects a socket to the specified address. - -This function is for a connection request from the client and for TCP only. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
sockfdIndicates the socket descriptor.
addrIndicates the pointer to the address to be connected.
addrlenIndicates the length of the address structure pointed to by addr.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid input parameter

-

EBADF

-

Invalid socket or socket status exception

-

EIO

-

Incorrect connection type obtained based on the socket descriptor

-

ECONNREFUSED

-

Restart due to connection failure

-

ECONNABORTED

-

Shut-down due to connection failure

-
- -## dn\_comp\(\) - -``` -int dn_comp (const char * src, unsigned char * dst, int space, unsigned char ** dnptrs, unsigned char ** lastdnptr ) -``` - - **Description:** - -Compresses a network domain name. - -To reduce the size of DNS messages, domain names in the messages are compressed. For details about the compression scheme, see RFC 1035. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
srcIndicates the pointer to the domain name to be compressed.
dstIndicates the pointer to the compressed domain name.
spaceIndicates the size of the compressed domain name.
dnptrsIndicates the pointer to an array of pointers to previously compressed domain names. If the value is NULL, the current domain name will not be compressed.
lastdnptrIndicates the pointer to the last element of the array. If the value is NULL, the array is not updated.
- -**Returns:** - -Returns the length of the compressed domain name if the operation is successful; returns **-1** otherwise. - -## dn\_expand\(\) - -``` -int dn_expand (const unsigned char * base, const unsigned char * end, const unsigned char * src, char * dest, int space ) -``` - - **Description:** - -Expands a compressed domain name to a full domain name. - -The compressed domain name is contained in a query or reply message. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
baseIndicates the pointer to the start of the DNS message body.
endIndicates the pointer to the end of the DNS message body.
srcIndicates the pointer to the compressed domain name.
destIndicates the pointer to the expanded domain name.
spaceIndicates the memory size of the dest address.
- -**Returns:** - -Returns the length of the compressed domain name if the operation is successful; returns **-1** otherwise. - -## ether\_aton\(\) - -``` -struct [ether_addr](ether_addr.md)* ether_aton (const char * x) -``` - - **Description:** - -Converts a standard 48-bit Ethernet host address in the colon hexadecimal notation into binary data in network byte order. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xIndicates the pointer to the host address to be converted.
- -**Returns:** - -Returns the binary data if the operation is successful; returns **0** otherwise. - -## ether\_aton\_r\(\) - -``` -struct [ether_addr](ether_addr.md)* ether_aton_r (const char * x, struct [ether_addr](ether_addr.md) * p_a ) -``` - - **Description:** - -Converts a standard 48-bit Ethernet host address in the colon hexadecimal notation into binary data in network byte order. This function is reentrant. - -This function is used in multitasking scenarios. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the pointer to the host address to be converted.
p_aIndicates the pointer to the temporary buffer during conversion.
- -**Returns:** - -Returns the binary data represented by **[ether\_addr](ether_addr.md)** if the operation is successful; returns **0** otherwise. - -## ether\_ntoa\(\) - -``` -char* ether_ntoa (const struct [ether_addr](ether_addr.md) * p_a) -``` - - **Description:** - -Converts binary data in network byte order into a standard 48-bit Ethernet host address in the colon hexadecimal notation. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
p_aIndicates the pointer to the binary data to be converted.
- -**Attention:** - -Different from glibc \(for example, 1:2:3:4:5:f\), 0 is prefixed and letters are capitalized \(for example, 01:02:03:04:05:0F\). - -**Returns:** - -Returns the host address if the operation is successful; returns **0** otherwise. - -## ether\_ntoa\_r\(\) - -``` -char* ether_ntoa_r (const struct [ether_addr](ether_addr.md) * p_a, char * x ) -``` - - **Description:** - -Converts binary data in network byte order into a standard 48-bit Ethernet host address in the colon hexadecimal notation. This function is reentrant. - -This function is used in multitasking scenarios. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
p_aIndicates the pointer to the binary data to be converted.
xIndicates the pointer to the temporary buffer during conversion.
- -**Attention:** - -Different from glibc \(for example, 1:2:3:4:5:f\), 0 is prefixed and letters are capitalized \(for example, 01:02:03:04:05:0F\). - -**Returns:** - -Returns the host address if the operation is successful; returns **0** otherwise. - -## freeifaddrs\(\) - -``` -void freeifaddrs (struct [ifaddrs](ifaddrs.md) * ifp) -``` - - **Description:** - -Frees the network interface information obtained by **getifaddrs**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
ifpIndicates the pointer to the network interface information to be freed.
- -## getpeername\(\) - -``` -int getpeername (int fd, struct [sockaddr](sockaddr.md) *restrict addr, [socklen_t](UTILS.md#ga531675af4e35aaa1cc9aeefa6cc2ccc4) *restrict len ) -``` - - **Description:** - -Retrieves the peer address of the specified socket. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
fdIndicates the socket descriptor.
addrIndicates the pointer to the address to be retrieved.
lenIndicates the pointer to the length of the address pointed to by addr.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid input parameter

-

EBADF

-

Invalid socket or socket status exception

-

ENOMEM

-

Memory copy exception

-
- -## getprotobyname\(\) - -``` -struct [protoent](protoent.md)* getprotobyname (const char * name) -``` - - **Description:** - -Retrieves the information about a specified protocol. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
nameIndicates the pointer to the protocol name.
- -**Attention:** - -The **/etc/protocols** configuration file is not supported. Only the following built-in protocols are supported: ip/icmp/igmp/ggp/ipencap/st/tcp/egp/pup/udp/hmp/xns-idp/rdp/iso-tp4/xtp/ ddp/idpr-cmtp/ipv6/ipv6-route/ipv6-frag/idrp/rsvp/gre/esp/ah/skip/ipv6-icmp/ ipv6-nonxt/ipv6-opts/rspf/vmtp/ospf/ipip/encap/pim/raw \(This protocol does not have the **aliases** attribute, that is, **aliases** is empty.\) - -**Returns:** - -Returns the pointer to the protocol information if the operation is successful; returns **NULL** otherwise. - -## getprotobynumber\(\) - -``` -struct [protoent](protoent.md)* getprotobynumber (int num) -``` - - **Description:** - -Retrieves the information about a protocol with the specified number. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
numIndicates the protocol number.
- -**Attention:** - -The **/etc/protocols** configuration file is not supported. Only the following built-in protocols are supported: ip/icmp/igmp/ggp/ipencap/st/tcp/egp/pup/udp/hmp/xns-idp/rdp/iso-tp4/xtp/ ddp/idpr-cmtp/ipv6/ipv6-route/ipv6-frag/idrp/rsvp/gre/esp/ah/skip/ipv6-icmp/ ipv6-nonxt/ipv6-opts/rspf/vmtp/ospf/ipip/encap/pim/raw \(This protocol does not have the **aliases** attribute, that is, **aliases** is empty.\) - -**Returns:** - -Returns the pointer to the protocol information if the operation is successful; returns **NULL** otherwise. - -## getprotoent\(\) - -``` -struct [protoent](protoent.md)* getprotoent (void ) -``` - - **Description:** - -Retrieves the current protocol information. - -**Attention:** - -The **/etc/protocols** configuration file is not supported. Only the following built-in protocols are supported: ip/icmp/igmp/ggp/ipencap/st/tcp/egp/pup/udp/hmp/xns-idp/rdp/iso-tp4/xtp/ ddp/idpr-cmtp/ipv6/ipv6-route/ipv6-frag/idrp/rsvp/gre/esp/ah/skip/ipv6-icmp/ ipv6-nonxt/ipv6-opts/rspf/vmtp/ospf/ipip/encap/pim/raw \(This protocol does not have the **aliases** attribute, that is, **aliases** is empty.\) - -**Returns:** - -Returns the pointer to the protocol information if the operation is successful; returns **NULL** otherwise. - -## getsockname\(\) - -``` -int getsockname (int fd, struct [sockaddr](sockaddr.md) *restrict addr, [socklen_t](UTILS.md#ga531675af4e35aaa1cc9aeefa6cc2ccc4) *restrict len ) -``` - - **Description:** - -Retrieves the local address of the specified socket. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
fdIndicates the socket descriptor.
addrIndicates the pointer to the address to be retrieved.
lenIndicates the pointer to the length of the address pointed to by addr.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid input parameter

-

EBADF

-

Invalid socket or socket status exception

-

ENOMEM

-

Memory copy exception

-
- -## getsockopt\(\) - -``` -int getsockopt (int fd, int level, int optname, void *__restrict optval, [socklen_t](UTILS.md#ga531675af4e35aaa1cc9aeefa6cc2ccc4) *__restrict optlen ) -``` - - **Description:** - -Retrieves the socket options. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
fdIndicates the socket descriptor.
levelIndicates the protocol level at which the option resides. Only SOL_SOCKET is supported.
optnameIndicates the socket options to be retrieved, which has the following values:
  • SO_BROADCAST: permits sending and receiving broadcast messages.
  • SO_RCVTIMEO: defines the data receiving timeout interval.
  • SO_RCVBUF: defines the size of the socket receiving buffer, in bytes.
  • SO_TYPE: defines the socket type.
  • SO_DONTROUTE: prohibits messages from being sent via a gateway.
  • SO_BINDTODEVICE: binds this socket to a particular device.
-
optvalIndicates the pointer to the option data.
optlenIndicates the pointer to the size of the buffer pointed to by optval.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Small optlen

-

EBADF

-

Invalid socket or socket status exception

-

EFAULT

-

The input parameter is a null pointer.

-

ENOBUFS

-

Retrieved length exception

-

ENOMEM

-

Memory copy exception

-
- -## herror\(\) - -``` -void herror (const char * msg) -``` - - **Description:** - -Prints error information. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
msgIndicates the pointer to the string to be printed together with the error information. This parameter can be null.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Incorrect symbols or parameters

-

EOVERFLOW

-

Long item for printing

-
- -## hstrerror\(\) - -``` -const char* hstrerror (int ecode) -``` - - **Description:** - -Retrieves error information associated with the specified error number. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
ecodeIndicates the error number.
- -**Returns:** - -Returns the string representing the error information. - -## htonl\(\) - -``` -uint32_t htonl (uint32_t n) -``` - - **Description:** - -Converts an integer from the host byte order to the network byte order. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
nIndicates the integer in host byte order.
- -**Returns:** - -Returns the original data if the system is in big-endian mode; returns the converted data otherwise. - -## htons\(\) - -``` -uint16_t htons (uint16_t n) -``` - - **Description:** - -Converts a 16-bit integer from the host byte order to the network byte order. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
nIndicates the integer in host byte order.
- -**Returns:** - -Returns the original data if the system is in big-endian mode; returns the converted data otherwise. - -## if\_freenameindex\(\) - -``` -void if_freenameindex (struct [if_nameindex](if_nameindex.md) * idx) -``` - - **Description:** - -Frees the network adapter information obtained by [if\_nameindex](if_nameindex.md). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
idxIndicates the pointer to the network adapter to be freed.
- -## inet\_addr\(\) - -``` -[in_addr_t](NET.md#ga98b38134a62f24554da0ffcabde8062c) inet_addr (const char * p) -``` - - **Description:** - -Converts a string from the IPv4 numbers-and-dots notation to the binary data in network byte order. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
pIndicates the pointer to the string to be converted.
- -**Returns:** - -Returns the converted data if the operation is successful; returns **-1** otherwise. - -## inet\_aton\(\) - -``` -int inet_aton (const char * s0, struct [in_addr](in_addr.md) * dest ) -``` - - **Description:** - -Converts an IP address from the string format to the 32-bit binary format in network byte order. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
s0Indicates the pointer to the IP address to be converted.
destIndicates the pointer to the structure for conversion.
- -**Returns:** - -Returns **1** if the operation is successful; returns **0** otherwise. - -## inet\_lnaof\(\) - -``` -[in_addr_t](NET.md#ga98b38134a62f24554da0ffcabde8062c) inet_lnaof (struct [in_addr](in_addr.md) in) -``` - - **Description:** - -Converts an IP address into a host ID in host byte order without network bits. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
inIndicates the network address structure.
- -**Returns:** - -Returns the converted host address. - -## inet\_makeaddr\(\) - -``` -struct [in_addr](in_addr.md) inet_makeaddr ([in_addr_t](NET.md#ga98b38134a62f24554da0ffcabde8062c) n, [in_addr_t](NET.md#ga98b38134a62f24554da0ffcabde8062c) h ) -``` - - **Description:** - -Converts the network number and host address to the network address. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
nIndicates the network number.
hIndicates the host address.
- -**Returns:** - -Returns the converted network address. - -## inet\_netof\(\) - -``` -[in_addr_t](NET.md#ga98b38134a62f24554da0ffcabde8062c) inet_netof (struct [in_addr](in_addr.md) in) -``` - - **Description:** - -Extracts the network number from the **[in\_addr](in_addr.md)** structure and converts it to the host byte order. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
inIndicates the network address structure.
- -**Returns:** - -Returns the converted network number. - -## inet\_network\(\) - -``` -[in_addr_t](NET.md#ga98b38134a62f24554da0ffcabde8062c) inet_network (const char * p) -``` - - **Description:** - -Converts a string from the IPv4 numbers-and-dots notation to the binary data in host byte order. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
pIndicates the pointer to the string to be converted.
- -**Returns:** - -Returns the converted data if the operation is successful; returns **-1** otherwise. - -## inet\_ntoa\(\) - -``` -char* inet_ntoa (struct [in_addr](in_addr.md) in) -``` - - **Description:** - -Converts a network address to a string in dotted-decimal format. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
inIndicates the network address to be converted.
- -**Returns:** - -Returns the string. - -## inet\_ntop\(\) - -``` -const char* inet_ntop (int af, const void *restrict a0, char *restrict s, [socklen_t](UTILS.md#ga531675af4e35aaa1cc9aeefa6cc2ccc4) l ) -``` - - **Description:** - -Converts a network address in the specified address family to a string. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
afIndicates the address family. Currently, only AF_INET and AF_INET6 are supported.
a0Indicates the pointer to the data to be converted.
sIndicates the pointer to the string to be converted.
lIndicates the size of the string to be converted.
- -**Returns:** - -Returns the converted string if the operation is successful; returns **NULL** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - -

errno

-

Description

-

ENOSPC

-

Insufficient space for conversion

-

EAFNOSUPPORT

-

Unsupported address family

-
- -## inet\_pton\(\) - -``` -int inet_pton (int af, const char *__restrict s, void *__restrict a0 ) -``` - - **Description:** - -Converts a string to a network address in the specified address family. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
afIndicates the address family. Currently, only AF_INET and AF_INET6 are supported.
sIndicates the pointer to the string to be converted.
a0Indicates the pointer to the converted data.
- -**Returns:** - -Returns **1** if the operation is successful; returns **0** if the input address family is invalid; returns **-1** if the operation fails. The error codes are set as follows: - - - - - - - - - - -

errno

-

Description

-

EAFNOSUPPORT

-

Unsupported address family

-
- -## listen\(\) - -``` -int listen (int sockfd, int backlog ) -``` - - **Description:** - -Listens for network connection requests on a socket. - -This function is for TCP only. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sockfdIndicates the socket descriptor.
backlogIndicates the maximum length of the queue to accept incoming connection requests.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid input parameter

-

EBADF

-

Invalid socket or socket status exception

-

EIO

-

Incorrect connection type obtained based on the socket descriptor

-
- -## ntohl\(\) - -``` -uint32_t ntohl (uint32_t n) -``` - - **Description:** - -Converts an integer from the network byte order to the host byte order. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
nIndicates the integer in network byte order.
- -**Returns:** - -Returns the original data if the system is in big-endian mode; returns the converted data otherwise. - -## ntohs\(\) - -``` -uint16_t ntohs (uint16_t n) -``` - - **Description:** - -Converts a 16-bit integer from the network byte order to the host byte order. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
nIndicates the integer in network byte order.
- -**Returns:** - -Returns the original data if the system is in big-endian mode; returns the converted data otherwise. - -## recv\(\) - -``` -ssize_t recv (int fd, void * buf, size_t len, int flags ) -``` - - **Description:** - -Receives data from another socket. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
fdIndicates the socket descriptor.
bufIndicates the pointer to a buffer for storing the data to be received.
lenIndicates the length of the buffer pointed to by buf.
flagsIndicates the socket flags. This parameter has the following values:
  • MSG_DONTWAIT: enables the non-blocking operation.
  • MSG_MORE: indicates that more messages are to be sent.
  • MSG_NOSIGNAL: indicates that no signals are generated.
-
- -**Returns:** - -Returns the length of the received data if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid input parameter

-

EBADF

-

Invalid socket or socket status exception

-

ENOMEM

-

Memory copy exception

-

EOPNOTSUPP

-

Unsupported message type

-

ENOTCONN

-

Socket not connected

-

EWOULDBLOCK

-

Blocking operation

-

ENOTCONN

-

Connection closed

-
- -## recvfrom\(\) - -``` -ssize_t recvfrom (int fd, void *__restrict buf, size_t len, int flags, struct [sockaddr](sockaddr.md) *__restrict addr, [socklen_t](UTILS.md#ga531675af4e35aaa1cc9aeefa6cc2ccc4) *__restrict alen ) -``` - - **Description:** - -Receives data from a specified socket. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
fdIndicates the socket descriptor.
bufIndicates the pointer to a buffer for storing the data to be received.
lenIndicates the length of the buffer pointed to by buf.
flagsIndicates the socket flags. This parameter has the following values:
  • MSG_DONTWAIT: enables the non-blocking operation.
  • MSG_MORE: indicates that more messages are to be sent.
  • MSG_NOSIGNAL: indicates that no signals are generated.
-
addrIndicates the pointer to the source address.
alenIndicates the size of the source address.
- -**Returns:** - -Returns the length of the received data if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid input parameter

-

EBADF

-

Invalid socket or socket status exception

-

ENOMEM

-

Memory copy exception

-

EOPNOTSUPP

-

Unsupported message type

-

ENOTCONN

-

Socket not connected

-

ENOTCONN

-

Connection closed

-
- -## recvmsg\(\) - -``` -ssize_t recvmsg (int fd, struct msghdr * msg, int flags ) -``` - - **Description:** - -Receives data from a specified socket. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
fdIndicates the socket descriptor.
msgIndicates the pointer to the address to receive the message header.
flagsIndicates the socket flags. This parameter has the following values:
  • MSG_DONTWAIT: enables the non-blocking operation.
  • MSG_MORE: indicates that more messages are to be sent.
  • MSG_NOSIGNAL: indicates that no signals are generated.
-
- -**Attention:** - -This function does not allow sending ancillary data. Currently, the length of the array defined by **msg\_iov** can only be **1**. - -**Returns:** - -Returns the length of the received data if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid input parameter

-

EBADF

-

Invalid socket or socket status exception

-

EDESTADDRREQ

-

Invalid connection

-

ENOMEM

-

Memory copy exception

-

EIO

-

Incorrect connection type obtained based on the socket descriptor

-
- -## send\(\) - -``` -ssize_t send (int fd, const void * buf, size_t len, int flags ) -``` - - **Description:** - -Sends data to another socket. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
fdIndicates the socket descriptor.
bufIndicates the pointer to a buffer for storing the data to be sent.
lenIndicates the length of the buffer pointed to by buf.
flagsIndicates the socket flags. This parameter has the following values:
  • MSG_DONTWAIT: enables the non-blocking operation.
  • MSG_MORE: indicates that more messages are to be sent.
  • MSG_NOSIGNAL: indicates that no signals are generated.
-
- -**Returns:** - -Returns the length of the sent data if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid input parameter

-

EBADF

-

Invalid socket or socket status exception

-

EDESTADDRREQ

-

Invalid connection

-

ENOMEM

-

Memory copy exception

-

EOPNOTSUPP

-

Unsupported message type

-

ENOTCONN

-

Socket not connected

-

EIO

-

Incorrect connection type obtained based on the socket descriptor

-
- -## sendmsg\(\) - -``` -ssize_t sendmsg (int fd, const struct msghdr * msg, int flags ) -``` - - **Description:** - -Sends data to another socket. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
fdIndicates the socket descriptor.
msgIndicates the pointer to the address of the message header to be sent.
flagsIndicates the socket flags. This parameter has the following values:
  • MSG_DONTWAIT: enables the non-blocking operation.
  • MSG_MORE: indicates that more messages are to be sent.
  • MSG_NOSIGNAL: indicates that no signals are generated.
-
- -**Attention:** - -This function does not support ancillary data. - -**Returns:** - -Returns the length of the sent data if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid input parameter

-

EBADF

-

Invalid socket or socket status exception

-

EDESTADDRREQ

-

Invalid connection

-

ENOMEM

-

Memory copy exception

-

EIO

-

Incorrect connection type obtained based on the socket descriptor

-

EOPNOTSUPP

-

Unsupported message type

-
- -## sendto\(\) - -``` -ssize_t sendto (int fd, const void * buf, size_t len, int flags, const struct [sockaddr](sockaddr.md) * addr, [socklen_t](UTILS.md#ga531675af4e35aaa1cc9aeefa6cc2ccc4) alen ) -``` - - **Description:** - -Sends data to another socket. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
fdIndicates the socket descriptor.
bufIndicates the pointer to a buffer for storing the data to be sent.
lenIndicates the length of the buffer pointed to by buf.
flagsIndicates the socket flags. This parameter has the following values:
  • MSG_DONTWAIT: enables the non-blocking operation.
  • MSG_MORE: indicates that more messages are to be sent.
  • MSG_NOSIGNAL: indicates that no signals are generated.
-
addrIndicates the pointer to the destination network address.
alenIndicates the length of the destination network address.
- -**Returns:** - -Returns the length of the sent data if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid input parameter

-

EBADF

-

Invalid socket or socket status exception

-

EDESTADDRREQ

-

Invalid connection

-

ENOMEM

-

Memory copy exception

-

EOPNOTSUPP

-

Unsupported message type

-

ENOTCONN

-

Socket not connected

-

EIO

-

Incorrect connection type obtained based on the socket descriptor

-
- -## setprotoent\(\) - -``` -void setprotoent (int stayopen) -``` - - **Description:** - -Opens a connection to the database and sets the next entry to the first entry. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
stayopenReserved for interface compatibility (not used currently).
- -**Attention:** - -The **stayopen** parameter does not take effect. It is equivalent to nonzero for [getprotoent](NET.md#gaca0da70657afbc3e723990bb229deec3) and zero for [getprotobyname](NET.md#ga83ac8a97dd9d895cda658af3aa46fd55) and **getprotobynumbmer**. - -## setsockopt\(\) - -``` -int setsockopt (int fd, int level, int optname, const void * optval, [socklen_t](UTILS.md#ga531675af4e35aaa1cc9aeefa6cc2ccc4) optlen ) -``` - - **Description:** - -Sets the socket options. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
fdIndicates the socket descriptor.
levelIndicates the protocol level at which the option resides. Only SOL_SOCKET is supported.
optnameIndicates the socket options to set, which has the following values:
  • SO_BROADCAST: permits sending and receiving broadcast messages.
  • SO_RCVTIMEO: defines the data receiving timeout interval.
  • SO_RCVBUF: defines the size of the socket receiving buffer, in bytes.
  • SO_DONTROUTE: prohibits messages from being sent via a gateway.
  • SO_BINDTODEVICE: binds this socket to a particular device.
-
optvalIndicates the pointer to the option data.
optlenIndicates the size of the buffer pointed to by optval.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Small optlen

-

EBADF

-

Invalid socket or socket status exception

-

EFAULT

-

The input parameter is a null pointer.

-

ENOBUFS

-

Retrieved length exception

-

ENOMEM

-

Memory copy exception

-
- -## shutdown\(\) - -``` -int shutdown (int sockfd, int how ) -``` - - **Description:** - -Shuts down a socket. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sockfdIndicates the socket descriptor.
howIndicates how to shut down the socket. You can disable either receptions by SHUT_RD or transmissions by SHUT_WR, or both by SHUT_RDWR.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid input parameter

-

ENOTCONN

-

Socket not connected

-

ENOMEM

-

Memory copy exception

-

EIO

-

Incorrect connection type obtained based on the socket descriptor

-
- -## socket\(\) - -``` -int socket (int domain, int type, int protocol ) -``` - - **Description:** - -Creates a socket and returns its descriptor. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
domainIndicates the socket family.
typeIndicates the socket type.
protocolIndicates the socket protocol.
- -**Attention:** - -The domain can only be [AF\_INET](NET.md#ga9930604d0e32588eae76f43ca38e7826) or [AF\_INET6](NET.md#gaa03706b2738b9a58d4985dfbe99e1bac). The socket type can only be [SOCK\_RAW](NET.md#ga346f84e37c42f88e91e7304c3d77fde8), [SOCK\_DGRAM](NET.md#ga4db8b9a846c67404db0b6f014f9a9fdf), or [SOCK\_STREAM](NET.md#ga249394484f9410a2e3f8eba24657feb9). - -**Returns:** - -Returns the descriptor for the new socket if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EAFNOSUPPORT

-

Invalid socket domain

-

ESOCKTNOSUPPORT

-

Unsupported socket domain

-

EPROTONOSUPPORT

-

Unsupported protocol

-

EINVAL

-

Invalid input parameter

-

ENOBUFS

-

Connection setup error

-

ENFILE

-

File table addition exception

-
- diff --git a/api/api-SmartVision-Devices/NetBuf.md b/api/api-SmartVision-Devices/NetBuf.md deleted file mode 100755 index 240d83b784d8957681ef27db533fdd6cc79b8da9..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/NetBuf.md +++ /dev/null @@ -1,76 +0,0 @@ -# NetBuf - -- [Overview](#section1797512922165632) -- [Summary](#section1216851582165632) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Records and saves a network data buffer. - -This structure is used to transmit network data between the protocol stack and network driver. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

dlist

-

struct DListHead

-

bufs [MAX_BUF_NUM]

-

struct BufField

-

mem

-

uint8_t *

-

len

-

uint32_t

-

dataLen

-

uint32_t

-

dev

-

void *

-

qmap

-

uint32_t

-

rsv [MAX_NETBUF_RESEVER_SIZE]

-

uint8_t

-
- diff --git a/api/api-SmartVision-Devices/NetBufQueue.md b/api/api-SmartVision-Devices/NetBufQueue.md deleted file mode 100755 index 6ccb8a701de219f3569ead836612c3f43a98b3a2..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/NetBufQueue.md +++ /dev/null @@ -1,51 +0,0 @@ -# NetBufQueue - -- [Overview](#section834705767165632) -- [Summary](#section1547105223165632) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Indicates the queues for storing network data. - -Queues can be used to process multiple pieces of network data in a centralized manner, improving efficiency. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

dlist

-

struct DListHead

-

size

-

uint32_t

-

lock

-

struct Spinlock

-
- diff --git a/api/api-SmartVision-Devices/NetDevNotify.md b/api/api-SmartVision-Devices/NetDevNotify.md deleted file mode 100755 index e647ab2da183c042d6ed160fa73de6465889cb27..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/NetDevNotify.md +++ /dev/null @@ -1,44 +0,0 @@ -# NetDevNotify - -- [Overview](#section1560983165632) -- [Summary](#section2141176403165632) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Defines a network device notification, including an IP address and the notification type. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

ipAddr

-

uint32_t

-

notifyType

-

uint32_t

-
- diff --git a/api/api-SmartVision-Devices/NetDevice.md b/api/api-SmartVision-Devices/NetDevice.md deleted file mode 100755 index 821db5e7509eb1d945e51e177e6d428cf4df43ba..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/NetDevice.md +++ /dev/null @@ -1,129 +0,0 @@ -# NetDevice - -- [Overview](#section1947383746165632) -- [Summary](#section1882882274165632) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Defines a network device, including the network interface category and name, and network port type. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

netifCateg

-

NetIfCategory

-

name [IFNAMSIZ]

-

char

-

LinkLayerType

-

NetLinkType

-

funType

-

IfType

-

macAddr [MAC_ADDR_SIZE]

-

char

-

flags

-

uint32_t

-

mtu

-

uint32_t

-

watchdogTime

-

int32_t

-

lastRxTime

-

uint32_t

-

hardHeaderLen

-

uint16_t

-

neededHeadRoom

-

uint16_t

-

neededTailRoom

-

uint16_t

-

addrLen

-

uint8_t

-

mlPriv

-

void *

-

ieee80211Ptr

-

struct WirelessDev *

-

specialProcPriv

-

void *

-

netDeviceIf

-

struct NetDeviceInterFace *

-

owner

-

struct NetDevice *

-

stats

-

struct NetDevStats

-
- diff --git a/api/api-SmartVision-Devices/NetDeviceInterFace.md b/api/api-SmartVision-Devices/NetDeviceInterFace.md deleted file mode 100755 index 04c960910a6348ead3db98be4a1d30d61e9291d4..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/NetDeviceInterFace.md +++ /dev/null @@ -1,99 +0,0 @@ -# NetDeviceInterFace - -- [Overview](#section28535630165632) -- [Summary](#section226138155165632) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Defines interfaces that need to be implemented externally by network devices, including initializing, opening, and closing a network device. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

init )(struct NetDevice *netDev)

-

int32_t(*

-

deInit )(struct NetDevice *netDev)

-

void(*

-

open )(struct NetDevice *netDev)

-

int32_t(*

-

stop )(struct NetDevice *netDev)

-

int32_t(*

-

xmit )(struct NetDevice *netDev, struct NetBuf *netBuff)

-

NetDevTxResult(*

-

ioctl )(struct NetDevice *netDev, IfReq *req, int32_t cmd)

-

int32_t(*

-

setMacAddr )(struct NetDevice *netDev, void *addr)

-

int32_t(*

-

getStats )(struct NetDevice *netDev)

-

struct NetDevStats *(*

-

setNetIfStatus )(struct NetDevice *netDev, NetIfStatus status)

-

void(*

-

selectQueue )(struct NetDevice *netDev, struct NetBuf *netBuff)

-

uint16_t(*

-

netifNotify )(struct NetDevice *netDev, NetDevNotify *notify)

-

uint32_t(*

-

changeMtu )(struct NetDevice *netDev, int32_t newMtu)

-

int32_t(*

-

specialEtherTypeProcess )(const struct NetDevice *netDev, struct NetBuf *buff)

-

ProcessingResult(*

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Ability.md b/api/api-SmartVision-Devices/OHOS-Ability.md deleted file mode 100755 index 790a54c135c3084f4a51f5081a0038af12906d30..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Ability.md +++ /dev/null @@ -1,136 +0,0 @@ -# OHOS::Ability - -- [Overview](#section686627827165632) -- [Summary](#section182016991165632) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[AbilityKit](AbilityKit.md) - -**Description:** - -Declares ability-related functions, including ability lifecycle callbacks and functions for connecting to or disconnecting from Particle Abilities. - -As the fundamental unit of OpenHarmony applications, abilities are classified into [Feature](Feature.md) Abilities and Particle Abilities. [Feature](Feature.md) Abilities support the Page template, and Particle Abilities support the [Service](Service.md) template. An ability using the Page template is called Page ability for short and that using the [Service](Service.md) template is called [Service](Service.md) ability. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

OnStart (const Want &want)

-

virtual void

-

Called when this ability is started. You must override this function if you want to perform some initialization operations during ability startup.

-

OnInactive ()

-

virtual void

-

Called when this ability enters the STATE_INACTIVE state.

-

OnActive (const Want &want)

-

virtual void

-

Called when this ability enters the STATE_ACTIVE state.

-

OnBackground ()

-

virtual void

-

Called when this ability enters the STATE_BACKGROUND state.

-

OnStop ()

-

virtual void

-

Called when this ability enters the STATE_STOP state.

-

OnConnect (const Want &want)

-

virtual const SvcIdentity *

-

Called when this Service ability is connected for the first time.

-

OnDisconnect (const Want &want)

-

virtual void

-

Called when all abilities connected to this Service ability are disconnected.

-

SetMainRoute (const std::string &entry)

-

void

-

Sets the main route for this ability.

-

SetUIContent (RootView *rootView)

-

void

-

Sets the UI layout for this ability. You can call GetWindowRootView() to create a layout and add controls.

-

MsgHandle (uint32_t funcId, IpcIo *request, IpcIo *reply)

-

virtual void

-

Handles a message sent by the client to this Service ability.

-

Dump (const std::string &extra)

-

virtual void

-

Prints ability information to the console.

-

StartAbility (const Want &want)

-

int

-

Starts an Ability based on the specified Want information.

-

StopAbility (const Want &want)

-

int

-

Stops an Ability based on the specified Want information.

-

TerminateAbility ()

-

int

-

Destroys this Ability.

-

ConnectAbility (const Want &want, const IAbilityConnection &conn, void *data)

-

int

-

Connects to a Service ability based on the specified Want information.

-

DisconnectAbility (const IAbilityConnection &conn)

-

int

-

Disconnects from a Service ability.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-AbilityContext.md b/api/api-SmartVision-Devices/OHOS-AbilityContext.md deleted file mode 100755 index a839b2a7f849c310ecbb7177296281b5e4c5ab61..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-AbilityContext.md +++ /dev/null @@ -1,70 +0,0 @@ -# OHOS::AbilityContext - -- [Overview](#section1121371199165632) -- [Summary](#section1151626780165632) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[AbilityKit](AbilityKit.md) - -**Description:** - -Provides functions for starting and stopping an ability. - -The [Ability](OHOS-Ability.md) and [AbilitySlice](OHOS-AbilitySlice.md) classes are inherited from the **[AbilityContext](OHOS-AbilityContext.md)** class for you to call functions in this class for application development. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

StartAbility (const Want &want)

-

int

-

Starts an Ability based on the specified Want information.

-

StopAbility (const Want &want)

-

int

-

Stops an Ability based on the specified Want information.

-

TerminateAbility ()

-

int

-

Destroys this Ability.

-

ConnectAbility (const Want &want, const IAbilityConnection &conn, void *data)

-

int

-

Connects to a Service ability based on the specified Want information.

-

DisconnectAbility (const IAbilityConnection &conn)

-

int

-

Disconnects from a Service ability.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-AbilityEventHandler.md b/api/api-SmartVision-Devices/OHOS-AbilityEventHandler.md deleted file mode 100755 index f417fc0ac627b942a6505ceb8556f30191286be9..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-AbilityEventHandler.md +++ /dev/null @@ -1,75 +0,0 @@ -# OHOS::AbilityEventHandler - -- [Overview](#section1945428263165632) -- [Summary](#section556883900165632) -- [Public Member Functions](#pub-methods) -- [Static Public Member Functions](#pub-static-methods) - -## **Overview** - -**Related Modules:** - -[AbilityKit](AbilityKit.md) - -**Description:** - -Declares functions for performing operations during inter-thread communication, including running and quitting the event loop of the current thread and posting tasks to an asynchronous thread. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - -

Function

-

Description

-

Run ()

-

void

-

Starts running the event loop of the current thread.

-

PostTask (const Task &task)

-

void

-

Posts a task to an asynchronous thread.

-

PostQuit ()

-

void

-

Quits the event loop of the current thread.

-
- -## Static Public Member Functions - - - - - - - - - - -

Function

-

Description

-

GetCurrentHandler ()

-

static AbilityEventHandler *

-

Obtains the event handler of the current thread.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-AbilityLoader.md b/api/api-SmartVision-Devices/OHOS-AbilityLoader.md deleted file mode 100755 index ec72f2eb837feffd80f7577e69dda85c8744e15b..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-AbilityLoader.md +++ /dev/null @@ -1,24 +0,0 @@ -# OHOS::AbilityLoader - -- [Overview](#section477824263165632) - -## **Overview** - -**Related Modules:** - -[AbilityKit](AbilityKit.md) - -**Description:** - -Declares functions for registering the class names of [Ability](OHOS-Ability.md) and [AbilitySlice](OHOS-AbilitySlice.md) with the ability management framework. - -After creating your own [Ability](OHOS-Ability.md) and [AbilitySlice](OHOS-AbilitySlice.md) child classes, you should register their class names with the ability management framework so that the application can start **[Ability](OHOS-Ability.md)** instances created in the background. - -**Since:** - -1.0 - -**Version:** - -1.0 - diff --git a/api/api-SmartVision-Devices/OHOS-AbilitySlice.md b/api/api-SmartVision-Devices/OHOS-AbilitySlice.md deleted file mode 100755 index 9981d8122b7340662d802bfa0057012b016ed517..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-AbilitySlice.md +++ /dev/null @@ -1,118 +0,0 @@ -# OHOS::AbilitySlice - -- [Overview](#section991440798165632) -- [Summary](#section1784243374165632) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[AbilityKit](AbilityKit.md) - -**Description:** - -Provides ability slice-related functions, including ability slice lifecycle callbacks and functions for connecting to or disconnecting from ability slices. - -**[AbilitySlice](OHOS-AbilitySlice.md)** instances, which are specific to [Feature](Feature.md) Abilities \(abilities using the Page template\), are used to present different screens on an application's user interface. A [Feature](Feature.md) [Ability](OHOS-Ability.md) can have multiple ability slices. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

OnStart (const Want &want)

-

virtual void

-

Called when this ability slice is started. You must override this function if you want to perform some initialization operations during ability slice startup.

-

OnInactive ()

-

virtual void

-

Called when this ability slice enters the STATE_INACTIVE state.

-

OnActive (const Want &want)

-

virtual void

-

Called when this ability slice enters the STATE_ACTIVE state.

-

OnBackground ()

-

virtual void

-

Called when this ability slice enters the STATE_BACKGROUND state.

-

OnStop ()

-

virtual void

-

Called when this ability slice enters the STATE_STOP state.

-

Present (AbilitySlice &abilitySlice, const Want &want)

-

void

-

Presents another ability slice, which can be an ability slice that is not started or an existing ability slice in the host ability.

-

Terminate ()

-

void

-

Destroys this ability slice.

-

SetUIContent (RootView *rootView)

-

void

-

Sets the UI layout for the host ability of this ability slice.

-

StartAbility (const Want &want)

-

int

-

Starts an Ability based on the specified Want information.

-

StopAbility (const Want &want)

-

int

-

Stops an Ability based on the specified Want information.

-

TerminateAbility ()

-

int

-

Destroys this Ability.

-

ConnectAbility (const Want &want, const IAbilityConnection &conn, void *data)

-

int

-

Connects to a Service ability based on the specified Want information.

-

DisconnectAbility (const IAbilityConnection &conn)

-

int

-

Disconnects from a Service ability.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-AbstractAdapter.md b/api/api-SmartVision-Devices/OHOS-AbstractAdapter.md deleted file mode 100755 index 91b0a9cadfd99e4bbbc9b56f4fbb78e798d39036..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-AbstractAdapter.md +++ /dev/null @@ -1,74 +0,0 @@ -# OHOS::AbstractAdapter - -- [Overview](#section1108330733165633) -- [Summary](#section508897820165633) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines the base class for adapters. You can derive **[AbstractAdapter](OHOS-AbstractAdapter.md)** based on actual requirements and use the **[GetView\(\)](Graphic.md#gab155b2f4a6d8fd97755dcd1e6d3d8361)** and **[GetCount\(\)](Graphic.md#ga67021b360d4097c475d5e24519b5276d)** functions to implement adapters of different data types. For details, see [TextAdapter](OHOS-TextAdapter.md). - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

AbstractAdapter ()

-

-

A constructor used to create an AbstractAdapter instance.

-

~AbstractAdapter ()

-

virtual

-

A destructor used to delete the AbstractAdapter instance.

-

GetCount ()=0

-

virtual uint16_t

-

Obtains the number of adapter data items.

-

GetView (UIView *inView, int16_t index)=0

-

virtual UIView *

-

Obtains a UIView instance to convert adapter data into another UIView instance.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Animator.md b/api/api-SmartVision-Devices/OHOS-Animator.md deleted file mode 100755 index f986ab3b2142e627ddbccedc89d9d125d55ddc0f..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Animator.md +++ /dev/null @@ -1,157 +0,0 @@ -# OHOS::Animator - -- [Overview](#section1147755146165633) -- [Summary](#section914359666165633) -- [Public Types](#pub-types) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Represents an animator. - -This class is used to set the animator attributes, such as the duration, whether an animator is repeated, start and stop of an animator. - -See also -: [Animator](OHOS-Animator.md) - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Types - - - - - - - - - - -

Public Type Name

-

Description

-

: uint8_t { STOP, START, PAUSE, RUNNING }

-

Enumerates the states of this animator.

-
- -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

Animator ()

-

-

A default constructor used to create an Animator instance.

-

Animator (AnimatorCallback *callback, UIView *view, uint32_t time, bool repeat)

-

-

A constructor used to create an Animator instance.

-

~Animator ()

-

virtual

-

A destructor used to delete the Animator instance.

-

Start ()

-

void

-

Starts this animator.

-

Stop ()

-

void

-

Stops this animator.

-

Pause ()

-

void

-

Pauses this animator.

-

Resume ()

-

void

-

Resumes this animator from where it was paused.

-

GetState () const

-

uint8_t

-

Obtains the current state of this animator.

-

SetState (uint8_t state)

-

void

-

Sets the current state for this animator.

-

GetTime () const

-

uint32_t

-

Obtains the total duration of this animator.

-

SetTime (uint32_t time)

-

void

-

Sets the total duration for this animator.

-

GetRunTime () const

-

uint32_t

-

Obtains the running time of this animator.

-

SetRunTime (uint32_t runTime)

-

void

-

Sets the running time for this animator.

-

IsRepeat () const

-

bool

-

Checks whether this animator is repeated.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-AnimatorCallback.md b/api/api-SmartVision-Devices/OHOS-AnimatorCallback.md deleted file mode 100755 index c300b1c3f306038273ac542d0845f64cb066b838..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-AnimatorCallback.md +++ /dev/null @@ -1,70 +0,0 @@ -# OHOS::AnimatorCallback - -- [Overview](#section1362939213165633) -- [Summary](#section1029534402165633) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Represents the animator callback. - -You need to implement the callback function to produce specific animator effects. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

Callback (UIView *view)=0

-

virtual void

-

Called when each frame starts. This is a pure virtual function, which needs your inheritance and implementation.

-

OnStop (UIView &view)

-

virtual void

-

Called when an animator stops. This is a pure virtual function, which needs your inheritance and implementation.

-

~AnimatorCallback ()

-

virtual

-

A default destructor used to delete an AnimatorCallback instance.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-AnimatorManager.md b/api/api-SmartVision-Devices/OHOS-AnimatorManager.md deleted file mode 100755 index cfe36b2318817a5d5c44b04c677259eb5260b0fb..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-AnimatorManager.md +++ /dev/null @@ -1,146 +0,0 @@ -# OHOS::AnimatorManager - -- [Overview](#section842818002165633) -- [Summary](#section981813086165633) -- [Public Member Functions](#pub-methods) -- [Static Public Member Functions](#pub-static-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Represents the animator manager. - -This is a singleton class used to manage **[Animator](OHOS-Animator.md)** instances. - -See also -: [Task](OHOS-Task.md) - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

Init () override

-

void

-

Initializes this task.

-

Add (Animator *animator)

-

void

-

Adds the Animator instance to the AnimatorManager linked list for management, so that the Run function of the Animator class is called once for each frame.

-

Remove (const Animator *animator)

-

void

-

Removes the Animator instance from the AnimatorManager linked list.

-

Callback () override

-

void

-

Called when this task is executed.

-

Task ()

-

-

A constructor used to create a Task instance.

-

Task (uint32_t period)

-

-

A constructor used to create a Task instance with the specified running period.

-

~Task ()

-

virtual

-

A destructor used to delete the Task instance.

-

SetPeriod (uint32_t period)

-

void

-

Sets the running period for this task.

-

SetLastRun (uint32_t lastRun)

-

void

-

Sets the end time for this task.

-

GetPeriod () const

-

uint32_t

-

Obtains the running period of this task.

-

GetLastRun () const

-

uint32_t

-

Obtains the end time of this task.

-

TaskExecute ()

-

void

-

Executes this task.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- -## Static Public Member Functions - - - - - - - - - - -

Function

-

Description

-

GetInstance ()

-

static AnimatorManager *

-

Obtains the AnimatorManager instance.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Audio-AudioCapturer.md b/api/api-SmartVision-Devices/OHOS-Audio-AudioCapturer.md deleted file mode 100755 index fb146b6f4d21f09b83beef2a4101cf5211438fae..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Audio-AudioCapturer.md +++ /dev/null @@ -1,111 +0,0 @@ -# OHOS::Audio::AudioCapturer - -- [Overview](#section384295052165635) -- [Summary](#section1434045264165635) -- [Public Member Functions](#pub-methods) -- [Static Public Member Functions](#pub-static-methods) - -## **Overview** - -**Related Modules:** - -[MultiMedia\_AudioCapturer](MultiMedia_AudioCapturer.md) - -**Description:** - -Provides functions for applications to implement audio capturing. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

GetFrameCount ()

-

uint64_t

-

Obtains the number of frames required in the current condition, in bytes per sample.

-

SetCapturerInfo (const AudioCapturerInfo info)

-

int32_t

-

Sets audio capture parameters.

-

GetCapturerInfo (AudioCapturerInfo &info)

-

int32_t

-

Obtains audio capture parameters.

-

Start ()

-

bool

-

Starts audio recording.

-

Read (uint8_t *buffer, size_t userSize, bool isBlockingRead)

-

int32_t

-

Reads audio data.

-

GetStatus ()

-

State

-

Obtains the audio capture state.

-

GetAudioTime (Timestamp &timestamp, Timestamp::Timebase base)

-

bool

-

Obtains the timestamp.

-

Stop ()

-

bool

-

Stops audio recording.

-

Release ()

-

bool

-

Releases a local AudioCapturer object.

-
- -## Static Public Member Functions - - - - - - - - - - -

Function

-

Description

-

GetMinFrameCount (int32_t sampleRate, int32_t channelCount, AudioCodecFormat audioFormat, size_t &frameCount)

-

static bool

-

Obtains the minimum number of frames required in a specified condition, in bytes per sample.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Audio-AudioCapturerInfo.md b/api/api-SmartVision-Devices/OHOS-Audio-AudioCapturerInfo.md deleted file mode 100755 index 835bee0329bad86407d42647ad307f6a866bcccf..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Audio-AudioCapturerInfo.md +++ /dev/null @@ -1,73 +0,0 @@ -# OHOS::Audio::AudioCapturerInfo - -- [Overview](#section684418868165635) -- [Summary](#section925744169165635) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[MultiMedia\_AudioCapturer](MultiMedia_AudioCapturer.md) - -**Description:** - -Defines information about audio capture parameters, including the input source, audio codec format,sampling rate \(Hz\), number of audio channels, bit rate, and bit width. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

inputSource = AUDIO_MIC

-

AudioSourceType

-

audioFormat = AUDIO_DEFAULT

-

AudioCodecFormat

-

sampleRate = 0

-

int32_t

-

channelCount = 0

-

int32_t

-

bitRate = 0

-

int32_t

-

streamType = TYPE_MEDIA

-

AudioStreamType

-

bitWidth = BIT_WIDTH_16

-

AudioBitWidth

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Audio-Timestamp.md b/api/api-SmartVision-Devices/OHOS-Audio-Timestamp.md deleted file mode 100755 index 54e3a1c4f483f3af560b47cc186614c3ad945bdb..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Audio-Timestamp.md +++ /dev/null @@ -1,43 +0,0 @@ -# OHOS::Audio::Timestamp - -- [Overview](#section1362188586165635) -- [Summary](#section1117362091165635) -- [Public Types](#pub-types) - -## **Overview** - -**Related Modules:** - -[MultiMedia\_AudioCapturer](MultiMedia_AudioCapturer.md) - -**Description:** - -Represents timestamp information, including the frame position information and high-resolution time source. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Types - - - - - - - - - - -

Public Type Name

-

Description

-

Timebase : int32_t { Timebase::MONOTONIC = 0, Timebase::BOOTTIME = 1 }

-

Enumerates the time base of this Timestamp. Different timing methods are supported.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-BinHeader.md b/api/api-SmartVision-Devices/OHOS-BinHeader.md deleted file mode 100755 index 27e2373190491cdb2c9135d5cffbe6e80809ba30..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-BinHeader.md +++ /dev/null @@ -1,2 +0,0 @@ -# OHOS::BinHeader - diff --git a/api/api-SmartVision-Devices/OHOS-ButtonStyle.md b/api/api-SmartVision-Devices/OHOS-ButtonStyle.md deleted file mode 100755 index b7dab80be52c450616a0b07995d9a22bf175d416..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-ButtonStyle.md +++ /dev/null @@ -1,45 +0,0 @@ -# OHOS::ButtonStyle - -- [Overview](#section1659725587165635) -- [Summary](#section285967993165635) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Stores styles of a button in its different states. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

released

-

Style

-

pressed

-

Style

-

inactive

-

Style

-
- diff --git a/api/api-SmartVision-Devices/OHOS-CancelEvent.md b/api/api-SmartVision-Devices/OHOS-CancelEvent.md deleted file mode 100755 index a139a924b6b1172102231310eba2ed22726f6cba..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-CancelEvent.md +++ /dev/null @@ -1,98 +0,0 @@ -# OHOS::CancelEvent - -- [Overview](#section1875250411165635) -- [Summary](#section917318045165635) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines a cancel event, which usually occurs when the target view changes due to user sliding. For example, this event is triggered if you, after pressing a button, does not release the button but slides. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

CancelEvent (const Point &pos)

-

-

A constructor used to create a CancelEvent instance.

-

~CancelEvent ()

-

virtual

-

A destructor used to delete the CancelEvent instance.

-

Event ()

-

-

A default constructor used to create an Event instance.

-

Event (const Point &curPos)

-

-

A constructor used to create an Event instance.

-

~Event ()

-

virtual

-

A destructor used to delete the Event instance.

-

GetCurrentPos () const

-

const Point &

-

Obtains the position where an event occurs.

-

GetTimeStamp () const

-

const TimeType &

-

Obtains the timestamp when an event occurs.

-

SetTimeStamp (const TimeType &timeStamp)

-

void

-

Sets the timestamp when an event occurs.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-ClickEvent.md b/api/api-SmartVision-Devices/OHOS-ClickEvent.md deleted file mode 100755 index dfae79b4f16f16acbde42aa0bdf9ef2baf3148ff..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-ClickEvent.md +++ /dev/null @@ -1,98 +0,0 @@ -# OHOS::ClickEvent - -- [Overview](#section963906420165635) -- [Summary](#section113641388165635) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines a click event, which indicates that a finger is pressed on the screen and then lifted within 1 second. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

ClickEvent (const Point &pos)

-

-

A constructor used to create a ClickEvent instance.

-

~ClickEvent ()

-

virtual

-

A destructor used to delete the ClickEvent instance.

-

Event ()

-

-

A default constructor used to create an Event instance.

-

Event (const Point &curPos)

-

-

A constructor used to create an Event instance.

-

~Event ()

-

virtual

-

A destructor used to delete the Event instance.

-

GetCurrentPos () const

-

const Point &

-

Obtains the position where an event occurs.

-

GetTimeStamp () const

-

const TimeType &

-

Obtains the timestamp when an event occurs.

-

SetTimeStamp (const TimeType &timeStamp)

-

void

-

Sets the timestamp when an event occurs.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Color.md b/api/api-SmartVision-Devices/OHOS-Color.md deleted file mode 100755 index c30dee7ac29880fe090b7ed85a59d8b97c72865a..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Color.md +++ /dev/null @@ -1,205 +0,0 @@ -# OHOS::Color - -- [Overview](#section1931634200165633) -- [Summary](#section1674582511165633) -- [Static Public Member Functions](#pub-static-methods) -- [Additional Inherited Members](#inherited) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Converts colors in different formats and defines common colors. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Static Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

GetMixColor (ColorType c1, ColorType c2, uint8_t mix)

-

static ColorType

-

Mixes two colors (color 1 and color 2) based on a specified opacity.

-

GetColorFromRGB (uint8_t r8, uint8_t g8, uint8_t b8)

-

static ColorType

-

Obtains the color based on the RGB color value.

-

GetColorFromRGBA (uint8_t r8, uint8_t g8, uint8_t b8, uint8_t alpha)

-

static ColorType

-

Obtains the color based on the RGBA color value.

-

ColorTo32 (ColorType color)

-

static uint32_t

-

Converts color data into the RGBA8888 format.

-

ColorTo32 (Color16 color, uint8_t alpha)

-

static uint32_t

-

Converts color data with the 16-bit color depth into the RGBA8888 format.

-

ColorTo16 (Color32 color)

-

static uint16_t

-

Converts color data from the RGBA8888 format into the RGB565 format.

-

White ()

-

static ColorType

-

Obtains the color data of white.

-

Silver ()

-

static ColorType

-

Obtains the color data of silver.

-

Gray ()

-

static ColorType

-

Obtains the color data of gray.

-

Black ()

-

static ColorType

-

Obtains the color data of black.

-

Red ()

-

static ColorType

-

Obtains the color data of red.

-

Maroon ()

-

static ColorType

-

Obtains the color data of maroon.

-

Yellow ()

-

static ColorType

-

Obtains the color data of yellow.

-

Olive ()

-

static ColorType

-

Obtains the color data of olive.

-

Lime ()

-

static ColorType

-

Obtains the color data of lime.

-

Green ()

-

static ColorType

-

Obtains the color data of green.

-

Cyan ()

-

static ColorType

-

Obtains the color data of cyan.

-

Aqua ()

-

static ColorType

-

Obtains the color data of aqua.

-

Teal ()

-

static ColorType

-

Obtains the color data of teal.

-

Blue ()

-

static ColorType

-

Obtains the color data of blue.

-

Navy ()

-

static ColorType

-

Obtains the color data of navy.

-

Magenta ()

-

static ColorType

-

Obtains the color data of magenta.

-

Purple ()

-

static ColorType

-

Obtains the color data of purple.

-

Orange ()

-

static ColorType

-

Obtains the color data of orange.

-
- -## Additional Inherited Members - - - - - - - - - - - - - -

Additional Inherited Member Name

-

Description

-

operator new (size_t size)

-

Overrides the new function.

-

operator delete (void *p)

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Color16.md b/api/api-SmartVision-Devices/OHOS-Color16.md deleted file mode 100755 index f07bd0597e1719652c60ab8f6f1a6b6883133cf8..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Color16.md +++ /dev/null @@ -1,35 +0,0 @@ -# OHOS::Color16 - -- [Overview](#section1239729817165633) -- [Summary](#section201392726165633) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines the color attribute when the color depth is **16**. - -## **Summary** - -## Data Fields - - - - - - - - - - -

Variable Name

-

Description

-

full

-

uint16_t

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Color24.md b/api/api-SmartVision-Devices/OHOS-Color24.md deleted file mode 100755 index 675138a14b1050dbb36c77ebc08d00272a54a627..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Color24.md +++ /dev/null @@ -1,45 +0,0 @@ -# OHOS::Color24 - -- [Overview](#section984382291165633) -- [Summary](#section128980410165633) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines the color attribute when the color depth is **24**. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

blue

-

uint8_t

-

green

-

uint8_t

-

red

-

uint8_t

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Color32.md b/api/api-SmartVision-Devices/OHOS-Color32.md deleted file mode 100755 index 3ae580de9618aab75b893b8824d37b836647d376..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Color32.md +++ /dev/null @@ -1,35 +0,0 @@ -# OHOS::Color32 - -- [Overview](#section257809687165633) -- [Summary](#section1962239531165633) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines the color attribute when the color depth is **32**. - -## **Summary** - -## Data Fields - - - - - - - - - - -

Variable Name

-

Description

-

full

-

uint32_t

-
- diff --git a/api/api-SmartVision-Devices/OHOS-DragEvent.md b/api/api-SmartVision-Devices/OHOS-DragEvent.md deleted file mode 100755 index ea716e8d9f7bb525bea7bfc313b45b4b23c34cd0..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-DragEvent.md +++ /dev/null @@ -1,140 +0,0 @@ -# OHOS::DragEvent - -- [Overview](#section1869934673165635) -- [Summary](#section855427081165635) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines a drag event, which indicates a certain movement \(more than 10 pixels\) after a view is pressed. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

DragEvent (const Point &newPos, const Point &lastPos, const Point &totalLen)

-

-

A constructor used to create a DragEvent instance.

-

~DragEvent ()

-

virtual

-

A destructor used to delete the DragEvent instance.

-

GetLastPoint () const

-

const Point &

-

Obtains the coordinates of the last position in the drag event.

-

GetStartPoint () const

-

const Point &

-

Obtains the start coordinates in the drag event.

-

SetPreLastPoint (const Point &preLastPos)

-

void

-

Sets the coordinates of the stay position before the last position in the drag event.

-

GetPreLastPoint () const

-

const Point &

-

Obtains the coordinates of the stay position before the last position in the drag event.

-

GetDragDirection () const

-

uint8_t

-

Obtains the direction in the drag event.

-

GetDeltaX () const

-

int16_t

-

Obtains the difference between the current position and the last position of the view in the x-axis.

-

GetDeltaY () const

-

int16_t

-

Obtains the difference between the current position and the last position of the view in the y-axis.

-

Event ()

-

-

A default constructor used to create an Event instance.

-

Event (const Point &curPos)

-

-

A constructor used to create an Event instance.

-

~Event ()

-

virtual

-

A destructor used to delete the Event instance.

-

GetCurrentPos () const

-

const Point &

-

Obtains the position where an event occurs.

-

GetTimeStamp () const

-

const TimeType &

-

Obtains the timestamp when an event occurs.

-

SetTimeStamp (const TimeType &timeStamp)

-

void

-

Sets the timestamp when an event occurs.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-EasingEquation.md b/api/api-SmartVision-Devices/OHOS-EasingEquation.md deleted file mode 100755 index a0474a81cf476ffecc84557926eff0100b579ba2..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-EasingEquation.md +++ /dev/null @@ -1,181 +0,0 @@ -# OHOS::EasingEquation - -- [Overview](#section1631699377165633) -- [Summary](#section847426664165633) -- [Static Public Member Functions](#pub-static-methods) -- [Additional Inherited Members](#inherited) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines functions for specifying the velocity of an animation. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Static Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

SetBackOvershoot (double overshoot)

-

static void

-

Sets the parameter s in the equation (s+1)*t^3 - s*t^2 for a back easing.

-

BackEaseIn (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

static int16_t

-

Eases in with an overshoot.

-

BackEaseOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

static int16_t

-

Eases out with an overshoot.

-

BackEaseInOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

static int16_t

-

Eases in and then out with an overshoot.

-

CircEaseIn (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

static int16_t

-

Eases in shaping like a circular curve.

-

CircEaseOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

static int16_t

-

Eases out shaping like a circular curve.

-

CircEaseInOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

static int16_t

-

Eases in and then out shaping like a circular curve.

-

CubicEaseIn (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

static int16_t

-

Eases in shaping like a cubic curve.

-

CubicEaseOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

static int16_t

-

Eases out shaping like a cubic curve.

-

CubicEaseInOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

static int16_t

-

Eases in and then out shaping like a cubic curve.

-

LinearEaseNone (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

static int16_t

-

Displays no linear easing effects.

-

QuadEaseIn (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

static int16_t

-

Eases in shaping like a quadratic curve.

-

QuadEaseOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

static int16_t

-

Eases out shaping like a quadratic curve.

-

QuadEaseInOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

static int16_t

-

Eases in and then out shaping like a quadratic curve.

-

QuintEaseIn (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

static int16_t

-

Eases in shaping like a quintic curve.

-

QuintEaseOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

static int16_t

-

Eases out shaping like a quintic curve.

-

QuintEaseInOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

static int16_t

-

Eases in and then out shaping like a quintic curve.

-

SineEaseIn (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

static int16_t

-

Eases in shaping like a sinusoidal curve.

-

SineEaseOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

static int16_t

-

Eases out shaping like a sinusoidal curve.

-

SineEaseInOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

static int16_t

-

Eases in and then out shaping like a sinusoidal curve.

-
- -## Additional Inherited Members - - - - - - - - - - - - - -

Additional Inherited Member Name

-

Description

-

operator new (size_t size)

-

Overrides the new function.

-

operator delete (void *p)

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Event.md b/api/api-SmartVision-Devices/OHOS-Event.md deleted file mode 100755 index 31cc3bcb374465a8f42b8acd6538cb622809ed82..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Event.md +++ /dev/null @@ -1,86 +0,0 @@ -# OHOS::Event - -- [Overview](#section421010522165635) -- [Summary](#section665395145165635) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines the base class of a user input event and provides functions to record information such as the event position and timestamp. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

Event ()

-

-

A default constructor used to create an Event instance.

-

Event (const Point &curPos)

-

-

A constructor used to create an Event instance.

-

~Event ()

-

virtual

-

A destructor used to delete the Event instance.

-

GetCurrentPos () const

-

const Point &

-

Obtains the position where an event occurs.

-

GetTimeStamp () const

-

const TimeType &

-

Obtains the timestamp when an event occurs.

-

SetTimeStamp (const TimeType &timeStamp)

-

void

-

Sets the timestamp when an event occurs.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-FlexLayout.md b/api/api-SmartVision-Devices/OHOS-FlexLayout.md deleted file mode 100755 index d2161a00d334222260d7cd4b3c1dd4b93468d512..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-FlexLayout.md +++ /dev/null @@ -1,733 +0,0 @@ -# OHOS::FlexLayout - -- [Overview](#section1219905753165635) -- [Summary](#section738607815165635) -- [Public Member Functions](#pub-methods) -- [Additional Inherited Members](#inherited) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines a flexible layout container. You can perform simple adaptive layout on child views that the container holds, for example, to evenly arrange all child views in the same row or column. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

FlexLayout ()

-

-

A default constructor used to create a FlexLayout instance.

-

~FlexLayout ()

-

virtual

-

A destructor used to delete the FlexLayout instance.

-

SetMajorAxisAlign (const AlignType &align)

-

void

-

Sets the alignment mode of the primary axis (the axis where the layout direction is located). The child views in the layout are placed in this mode in the direction of the primary axis.

-

SetSecondaryAxisAlign (const AlignType &align)

-

void

-

Sets the alignment mode of the secondary axis (the axis perpendicular to the set layout direction).

-

SetFlexWrap (uint8_t wrap)

-

void

-

Sets whether to support word wrap.

-

LayoutChildren (bool needInvalidate=false) override

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

Layout ()

-

-

A default constructor used to create a Layout instance.

-

~Layout ()

-

virtual

-

A destructor used to delete the Layout instance.

-

SetLayoutDirection (const DirectionType &direction)

-

void

-

Sets the layout direction.

-

UIViewGroup ()

-

-

A default constructor used to create a UIViewGroup instance.

-

~UIViewGroup ()

-

virtual

-

A destructor used to delete the UIViewGroup instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

Add (UIView *view)

-

virtual void

-

Adds a child view.

-

Insert (UIView *prevView, UIView *insertView)

-

virtual void

-

Inserts a new child view behind the current one.

-

Remove (UIView *view)

-

virtual void

-

Removes a child view.

-

RemoveAll ()

-

virtual void

-

Removes all child views.

-

GetTargetView (const Point &point, UIView **last) override

-

virtual void

-

Obtains the target child view that is visible and can respond to touch events based on given coordinates.

-

MoveChildByOffset (int16_t x, int16_t y)

-

virtual void

-

Moves all child views.

-

GetChildrenHead () const

-

UIView *

-

Obtains the first child view in this view group.

-

GetChildrenTail () const

-

UIView *

-

Obtains the last child view in this view group.

-

SetDisallowIntercept (bool flag)

-

void

-

Sets whether this view group is intercepted upon touch events.

-

GetChildById (const char *id) const override

-

UIView *

-

Obtains the target child view with a specified ID.

-

SetAutoSize (bool state)

-

void

-

Sets whether the size of this view group is adaptive to that of all child views.

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnPreDraw (const Rect &invalidatedArea)

-

virtual bool

-

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

-

OnDraw (const Rect &invalidatedArea)

-

virtual void

-

Called when a view is drawn.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void

-

Called after a view is drawn.

-

ReMeasure ()

-

virtual void

-

Remeasures the view size.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool

-

Called when the view stops dragging.

-

OnClickEvent (const ClickEvent &event)

-

virtual void

-

Called when the view is clicked.

-

OnPressEvent (const PressEvent &event)

-

virtual void

-

Called when the view is pressed.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void

-

Sets whether the view is visible.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

SetWidth (int16_t width)

-

virtual void

-

Sets the width for the view.

-

GetWidth ()

-

virtual int16_t

-

Obtains the width for the view.

-

SetHeight (int16_t height)

-

virtual void

-

Sets the height for the view.

-

GetHeight ()

-

virtual int16_t

-

Obtains the height for the view.

-

Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- -## Additional Inherited Members - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Additional Inherited Member Name

-

Description

-

GetAllChildRelativeRect () const

-

Obtains the rectangle area of a new view group after being adaptive to the size of all child views.

-

OnChildChanged ()

-

Performs operations needed after a child view is added or removed.

-

childrenHead_

-

Indicates the pointer to the first child view of this view group.

-

childrenTail_

-

Indicates the pointer to the last child view of this view group.

-

childrenNum_

-

Represents the number of child views.

-

isDragging_

-

Specifies the sliding state of this view group.

-

disallowIntercept_

-

Specifies whether this view group is intercepted upon touch events.

-

isAutoSize_

-

Specifies whether the size of this view group is adaptive to that of all child views.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-FontHeader.md b/api/api-SmartVision-Devices/OHOS-FontHeader.md deleted file mode 100755 index 807e3eb1ca14ae160bd45d1a67e58689ed684630..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-FontHeader.md +++ /dev/null @@ -1,2 +0,0 @@ -# OHOS::FontHeader - diff --git a/api/api-SmartVision-Devices/OHOS-GlyphHeader.md b/api/api-SmartVision-Devices/OHOS-GlyphHeader.md deleted file mode 100755 index 1a5953d7167d66b6a1dc0cf1478bfdbf37903b50..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-GlyphHeader.md +++ /dev/null @@ -1,2 +0,0 @@ -# OHOS::GlyphHeader - diff --git a/api/api-SmartVision-Devices/OHOS-GlyphNode.md b/api/api-SmartVision-Devices/OHOS-GlyphNode.md deleted file mode 100755 index 1ad4f42f6490fd1e6ae409995b492ae0a106495b..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-GlyphNode.md +++ /dev/null @@ -1,2 +0,0 @@ -# OHOS::GlyphNode - diff --git a/api/api-SmartVision-Devices/OHOS-GridLayout.md b/api/api-SmartVision-Devices/OHOS-GridLayout.md deleted file mode 100755 index e7d675782de84107143a61e9144dd3eb33e2c5c2..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-GridLayout.md +++ /dev/null @@ -1,727 +0,0 @@ -# OHOS::GridLayout - -- [Overview](#section1257456601165635) -- [Summary](#section106526950165635) -- [Public Member Functions](#pub-methods) -- [Additional Inherited Members](#inherited) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines a grid layout container. You can perform simple grid layout on child views that the container holds. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

GridLayout ()

-

-

A default constructor used to create a GridLayout instance.

-

~GridLayout ()

-

virtual

-

A destructor used to delete the GridLayout instance.

-

SetRows (const uint16_t &rows)

-

void

-

Sets the number of rows in a grid.

-

SetCols (const uint16_t &cols)

-

void

-

Sets the number of columns in a grid.

-

LayoutChildren (bool needInvalidate=false) override

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

Layout ()

-

-

A default constructor used to create a Layout instance.

-

~Layout ()

-

virtual

-

A destructor used to delete the Layout instance.

-

SetLayoutDirection (const DirectionType &direction)

-

void

-

Sets the layout direction.

-

UIViewGroup ()

-

-

A default constructor used to create a UIViewGroup instance.

-

~UIViewGroup ()

-

virtual

-

A destructor used to delete the UIViewGroup instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

Add (UIView *view)

-

virtual void

-

Adds a child view.

-

Insert (UIView *prevView, UIView *insertView)

-

virtual void

-

Inserts a new child view behind the current one.

-

Remove (UIView *view)

-

virtual void

-

Removes a child view.

-

RemoveAll ()

-

virtual void

-

Removes all child views.

-

GetTargetView (const Point &point, UIView **last) override

-

virtual void

-

Obtains the target child view that is visible and can respond to touch events based on given coordinates.

-

MoveChildByOffset (int16_t x, int16_t y)

-

virtual void

-

Moves all child views.

-

GetChildrenHead () const

-

UIView *

-

Obtains the first child view in this view group.

-

GetChildrenTail () const

-

UIView *

-

Obtains the last child view in this view group.

-

SetDisallowIntercept (bool flag)

-

void

-

Sets whether this view group is intercepted upon touch events.

-

GetChildById (const char *id) const override

-

UIView *

-

Obtains the target child view with a specified ID.

-

SetAutoSize (bool state)

-

void

-

Sets whether the size of this view group is adaptive to that of all child views.

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnPreDraw (const Rect &invalidatedArea)

-

virtual bool

-

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

-

OnDraw (const Rect &invalidatedArea)

-

virtual void

-

Called when a view is drawn.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void

-

Called after a view is drawn.

-

ReMeasure ()

-

virtual void

-

Remeasures the view size.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool

-

Called when the view stops dragging.

-

OnClickEvent (const ClickEvent &event)

-

virtual void

-

Called when the view is clicked.

-

OnPressEvent (const PressEvent &event)

-

virtual void

-

Called when the view is pressed.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void

-

Sets whether the view is visible.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

SetWidth (int16_t width)

-

virtual void

-

Sets the width for the view.

-

GetWidth ()

-

virtual int16_t

-

Obtains the width for the view.

-

SetHeight (int16_t height)

-

virtual void

-

Sets the height for the view.

-

GetHeight ()

-

virtual int16_t

-

Obtains the height for the view.

-

Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- -## Additional Inherited Members - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Additional Inherited Member Name

-

Description

-

GetAllChildRelativeRect () const

-

Obtains the rectangle area of a new view group after being adaptive to the size of all child views.

-

OnChildChanged ()

-

Performs operations needed after a child view is added or removed.

-

childrenHead_

-

Indicates the pointer to the first child view of this view group.

-

childrenTail_

-

Indicates the pointer to the last child view of this view group.

-

childrenNum_

-

Represents the number of child views.

-

isDragging_

-

Specifies the sliding state of this view group.

-

disallowIntercept_

-

Specifies whether this view group is intercepted upon touch events.

-

isAutoSize_

-

Specifies whether the size of this view group is adaptive to that of all child views.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-HeapBase.md b/api/api-SmartVision-Devices/OHOS-HeapBase.md deleted file mode 100755 index ceda8f584f63ed1c8998afe5400f110ac27e5e6b..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-HeapBase.md +++ /dev/null @@ -1,50 +0,0 @@ -# OHOS::HeapBase - -- [Overview](#section525567033165635) -- [Summary](#section1671315637165635) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines the base class, overriding the **new** and **delete** functions. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - -

Function

-

Description

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-IBufferConsumerListener.md b/api/api-SmartVision-Devices/OHOS-IBufferConsumerListener.md deleted file mode 100755 index fd39cd99718f3e182b10af114ff2eee077afefb3..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-IBufferConsumerListener.md +++ /dev/null @@ -1,44 +0,0 @@ -# OHOS::IBufferConsumerListener - -- [Overview](#section914293729165633) -- [Summary](#section127558488165633) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Surface](Surface.md) - -**Description:** - -Defines the consumer listener used to notify consumers when the surface status is updated. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - -

Function

-

Description

-

OnBufferAvailable ()=0

-

virtual void

-

Called to notify a consumer that a buffer is available for consumption.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Image.md b/api/api-SmartVision-Devices/OHOS-Image.md deleted file mode 100755 index 76512c5d76614febd8883a7ea35548814960ad9d..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Image.md +++ /dev/null @@ -1,98 +0,0 @@ -# OHOS::Image - -- [Overview](#section1667437066165633) -- [Summary](#section1743172949165633) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Represents basic image attributes, including the image type and path. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

Image ()

-

-

A constructor used to create an Image instance. You can use this constructor when a component requires a map.

-

~Image ()

-

virtual

-

A destructor used to delete the Image instance.

-

GetImageInfo () const

-

const ImageInfo *

-

Obtains the image information in an array.

-

GetPath () const

-

const char *

-

Obtains the image path in binary.

-

GetHeader (ImageHeader &header) const

-

void

-

Obtains the basic image information, including the image format, width, and height.

-

GetSrcType () const

-

uint8_t

-

Obtains the image type.

-

SetSrc (const char *src)

-

bool

-

Sets the image path.

-

SetSrc (const ImageInfo *src)

-

bool

-

Sets the image information.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-ImageAnimatorInfo.md b/api/api-SmartVision-Devices/OHOS-ImageAnimatorInfo.md deleted file mode 100755 index 73afb213c07617062fc64ac4147b5d1921af07d0..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-ImageAnimatorInfo.md +++ /dev/null @@ -1,50 +0,0 @@ -# OHOS::ImageAnimatorInfo - -- [Overview](#section1764826486165634) -- [Summary](#section1460868050165634) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Provides information about the images. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

imageInfo

-

const char *

-

pos

-

Point

-

width

-

int16_t

-

height

-

int16_t

-
- diff --git a/api/api-SmartVision-Devices/OHOS-ImageHeader.md b/api/api-SmartVision-Devices/OHOS-ImageHeader.md deleted file mode 100755 index a8a8037c9419dc0097cd00949654654c7f8466d1..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-ImageHeader.md +++ /dev/null @@ -1,45 +0,0 @@ -# OHOS::ImageHeader - -- [Overview](#section994151157165635) -- [Summary](#section543476196165635) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines image head node information. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

colorMode: 8

-

uint32_t

-

width

-

uint16_t

-

height

-

uint16_t

-
- diff --git a/api/api-SmartVision-Devices/OHOS-ImageInfo.md b/api/api-SmartVision-Devices/OHOS-ImageInfo.md deleted file mode 100755 index 750baa3505dfb916fa9bf0f8ea90fc648f41dc95..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-ImageInfo.md +++ /dev/null @@ -1,50 +0,0 @@ -# OHOS::ImageInfo - -- [Overview](#section596360138165635) -- [Summary](#section1196083428165635) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines image information. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

header

-

ImageHeader

-

dataSize

-

uint32_t

-

data

-

const uint8_t *

-

userData

-

void *

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Init.md b/api/api-SmartVision-Devices/OHOS-Init.md deleted file mode 100755 index d1b9c17a81c5b2b8bcdc453201c252424c1dc5fa..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Init.md +++ /dev/null @@ -1,612 +0,0 @@ -# OHOS Init - -- [Overview](#section109641664165625) -- [Summary](#section769899064165625) -- [Files](#files) -- [Macros](#define-members) -- [Details](#section1795684416165625) -- [Macro Definition](#section1830576969165625) -- [APP\_FEATURE\_INIT](#ga6ae79099e42a2ee7680cc9d5ae4817d6) -- [APP\_FEATURE\_INIT\_PRI](#ga16168eb42790a913932f1ebd92a76fc1) -- [APP\_SERVICE\_INIT](#gacd89f8f7d2c1e7490ae285f99f3a9d42) -- [APP\_SERVICE\_INIT\_PRI](#gac678e25b6b7d9949220139741ffa4233) -- [CORE\_INIT](#ga97a9cae685c8fe08b3ed438c4de4419d) -- [CORE\_INIT\_PRI](#ga028481fe849c821d876df662158d5122) -- [SYS\_FEATURE\_INIT](#ga0ade3a78723c48748ae5fbbb261538a2) -- [SYS\_FEATURE\_INIT\_PRI](#ga561c8a47e7b929c7300a0c2acb458459) -- [SYS\_RUN](#gaa6d9a034e9ee034240a023e8cb9c2c78) -- [SYS\_RUN\_PRI](#ga2371a43afede3e4840893448c9f97843) -- [SYS\_SERVICE\_INIT](#gaeecafaa1e903880d1d8570dc6b09aec7) -- [SYS\_SERVICE\_INIT\_PRI](#ga8200637c1413a8ddfb2997668d325ba7) -- [SYSEX\_FEATURE\_INIT](#ga7e321122cb4bfc41bfd266c39108e7c0) -- [SYSEX\_FEATURE\_INIT\_PRI](#gabb08dfd40bae014ab94f4a3a0ff2180b) -- [SYSEX\_SERVICE\_INIT](#ga0e8322b3ab1975d234bd7275b79ed7eb) -- [SYSEX\_SERVICE\_INIT\_PRI](#gae0c14aff58448d4a428ad55cfee7c89b) - -## **Overview** - -**Description:** - -Provides the entries for initializing and starting services and features. - -This module provides the entries for initializing services and features during service development. Services and features are initialized in the following sequence: core phase, core system service, core system feature, system startup, system service, system feature, application-layer service, and application-layer feature. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - -

File Name

-

Description

-

ohos_init.h

-

Provides the entries for initializing and starting services and features.

-
- -## Macros - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

CORE_INIT(func) LAYER_INITCALL_DEF(func, core, "core")

-

Identifies the entry for initializing and starting a core phase by the priority 2.

-

CORE_INIT_PRI(func, priority) LAYER_INITCALL(func, core, "core", priority)

-

Identifies the entry for initializing and starting a core phase by the specified priority.

-

SYS_SERVICE_INIT(func) LAYER_INITCALL_DEF(func, sys_service, "sys.service")

-

Identifies the entry for initializing and starting a core system service by the priority 2.

-

SYS_SERVICE_INIT_PRI(func, priority) LAYER_INITCALL(func, sys_service, "sys.service", priority)

-

Identifies the entry for initializing and starting a core system service by the specified priority.

-

SYS_FEATURE_INIT(func) LAYER_INITCALL_DEF(func, sys_feature, "sys.feature")

-

Identifies the entry for initializing and starting a core system feature by the priority 2.

-

SYS_FEATURE_INIT_PRI(func, priority) LAYER_INITCALL(func, sys_feature, "sys.feature", priority)

-

Identifies the entry for initializing and starting a core system feature by the specified priority.

-

SYS_RUN(func) LAYER_INITCALL_DEF(func, run, "run")

-

Identifies the entry for initializing and starting a system running phase by the priority 2.

-

SYS_RUN_PRI(func, priority) LAYER_INITCALL(func, run, "run", priority)

-

Identifies the entry for initializing and starting a system running phase by the specified priority.

-

SYSEX_SERVICE_INIT(func) LAYER_INITCALL_DEF(func, app_service, "app.service")

-

Identifies the entry for initializing and starting a system service by the priority 2.

-

SYSEX_SERVICE_INIT_PRI(func, priority) LAYER_INITCALL(func, app_service, "app.service", priority)

-

Identifies the entry for initializing and starting a system service by the specified priority.

-

SYSEX_FEATURE_INIT(func) LAYER_INITCALL_DEF(func, app_feature, "app.feature")

-

Identifies the entry for initializing and starting a system feature by the priority 2.

-

SYSEX_FEATURE_INIT_PRI(func, priority) LAYER_INITCALL(func, app_feature, "app.feature", priority)

-

Identifies the entry for initializing and starting a system feature by the specified priority.

-

APP_SERVICE_INIT(func) LAYER_INITCALL_DEF(func, app_service, "app.service")

-

Identifies the entry for initializing and starting an application-layer service by the priority 2.

-

APP_SERVICE_INIT_PRI(func, priority) LAYER_INITCALL(func, app_service, "app.service", priority)

-

Identifies the entry for initializing and starting an application-layer service by the specified priority.

-

APP_FEATURE_INIT(func) LAYER_INITCALL_DEF(func, app_feature, "app.feature")

-

Identifies the entry for initializing and starting an application-layer feature by the priority 2.

-

APP_FEATURE_INIT_PRI(func, priority) LAYER_INITCALL(func, app_feature, "app.feature", priority)

-

Identifies the entry for initializing and starting an application-layer feature by the specified priority.

-
- -## **Details** - -## **Macro Definition ** - -## APP\_FEATURE\_INIT - -``` -#define APP_FEATURE_INIT( func) LAYER_INITCALL_DEF(func, app_feature, "app.feature") -``` - - **Description:** - -Identifies the entry for initializing and starting an application-layer feature by the priority 2. - -This macro is used to identify the entry called at the priority 2 of the application-layer feature phase of the startup process. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
funcIndicates the entry function for initializing and starting an application-layer feature. The type is void (*)(void).
- -## APP\_FEATURE\_INIT\_PRI - -``` -#define APP_FEATURE_INIT_PRI( func, priority ) LAYER_INITCALL(func, app_feature, "app.feature", priority) -``` - - **Description:** - -Identifies the entry for initializing and starting an application-layer feature by the specified priority. - -This macro is used to identify the entry called at the specified priority of the application-layer feature phase of the startup process. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
funcIndicates the entry function for initializing and starting an application-layer feature. The type is void (*)(void).
priorityIndicates the calling priority when starting the application-layer feature. The value range is [0, 5), and the calling sequence is 0, 1, 2, 3, and 4.
- -## APP\_SERVICE\_INIT - -``` -#define APP_SERVICE_INIT( func) LAYER_INITCALL_DEF(func, app_service, "app.service") -``` - - **Description:** - -Identifies the entry for initializing and starting an application-layer service by the priority 2. - -This macro is used to identify the entry called at the priority 2 of the application-layer service phase of the startup process. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
funcIndicates the entry function for initializing and starting an application-layer service. The type is void (*)(void).
- -## APP\_SERVICE\_INIT\_PRI - -``` -#define APP_SERVICE_INIT_PRI( func, priority ) LAYER_INITCALL(func, app_service, "app.service", priority) -``` - - **Description:** - -Identifies the entry for initializing and starting an application-layer service by the specified priority. - -This macro is used to identify the entry called at the specified priority of the application-layer service phase of the startup process. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
funcIndicates the entry function for initializing and starting an application-layer service. The type is void (*)(void).
priorityIndicates the calling priority when starting the application-layer service phase. The value range is [0,5), and the calling sequence is 0, 1, 2, 3, and 4.
- -## CORE\_INIT - -``` -#define CORE_INIT( func) LAYER_INITCALL_DEF(func, core, "core") -``` - - **Description:** - -Identifies the entry for initializing and starting a core phase by the priority 2. - -This macro is used when Samgr is initialized and started. This macro is used to identify the entry called at the priority 2 of the core phase of the startup process. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
funcIndicates the entry function for initializing and starting a core phase. The type is void (*)(void).
- -## CORE\_INIT\_PRI - -``` -#define CORE_INIT_PRI( func, priority ) LAYER_INITCALL(func, core, "core", priority) -``` - - **Description:** - -Identifies the entry for initializing and starting a core phase by the specified priority. - -This macro is used when Samgr is initialized and started. This macro is used to identify the entry called at the specified priority of the core phase of the startup process. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
funcIndicates the entry function for initializing and starting a core phase. The type is void (*)(void).
priorityIndicates the calling priority when starting the core phase. The value range is [0,5), and the calling sequence is 0, 1, 2, 3, and 4.
- -## SYS\_FEATURE\_INIT - -``` -#define SYS_FEATURE_INIT( func) LAYER_INITCALL_DEF(func, sys_feature, "sys.feature") -``` - - **Description:** - -Identifies the entry for initializing and starting a core system feature by the priority 2. - -This macro is used to identify the entry called at the priority 2 in the core system feature phase of the startup process. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
funcIndicates the entry function for initializing and starting a core system service. The type is void (*)(void).
- -## SYS\_FEATURE\_INIT\_PRI - -``` -#define SYS_FEATURE_INIT_PRI( func, priority ) LAYER_INITCALL(func, sys_feature, "sys.feature", priority) -``` - - **Description:** - -Identifies the entry for initializing and starting a core system feature by the specified priority. - -This macro is used to identify the entry called at the specified priority in the core system feature phase of the startup process. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
funcIndicates the entry function for initializing and starting a core system feature. The type is void (*)(void).
priorityIndicates the calling priority when starting the core system feature phase. The value range is [0, 5), and the calling sequence is 0, 1, 2, 3, and 4.
- -## SYS\_RUN - -``` -#define SYS_RUN( func) LAYER_INITCALL_DEF(func, run, "run") -``` - - **Description:** - -Identifies the entry for initializing and starting a system running phase by the priority 2. - -This macro is used to identify the entry called at the priority 2 in the system startup phase of the startup process. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
funcIndicates the entry function for initializing and starting a system running phase. The type is void (*)(void).
- -## SYS\_RUN\_PRI - -``` -#define SYS_RUN_PRI( func, priority ) LAYER_INITCALL(func, run, "run", priority) -``` - - **Description:** - -Identifies the entry for initializing and starting a system running phase by the specified priority. - -This macro is used to identify the entry called at the specified priority in the system startup phase of the startup process. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
funcIndicates the entry function for initializing and starting a system running phase. The type is void (*)(void).
priorityIndicates the calling priority when starting the system startup phase. The value range is [0, 5), and the calling sequence is 0, 1, 2, 3, and 4.
- -## SYS\_SERVICE\_INIT - -``` -#define SYS_SERVICE_INIT( func) LAYER_INITCALL_DEF(func, sys_service, "sys.service") -``` - - **Description:** - -Identifies the entry for initializing and starting a core system service by the priority 2. - -This macro is used to identify the entry called at the priority 2 in the core system service phase of the startup process. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
funcIndicates the entry function for initializing and starting a core system service. The type is void (*)(void).
- -## SYS\_SERVICE\_INIT\_PRI - -``` -#define SYS_SERVICE_INIT_PRI( func, priority ) LAYER_INITCALL(func, sys_service, "sys.service", priority) -``` - - **Description:** - -Identifies the entry for initializing and starting a core system service by the specified priority. - -This macro is used to identify the entry called at the specified priority in the core system service phase of the startup process. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
funcIndicates the entry function for initializing and starting a core system service. The type is void (*)(void).
priorityIndicates the calling priority when starting the core system service in the startup phase. The value range is [0,5), and the calling sequence is 0, 1, 2, 3, and 4.
- -## SYSEX\_FEATURE\_INIT - -``` -#define SYSEX_FEATURE_INIT( func) LAYER_INITCALL_DEF(func, app_feature, "app.feature") -``` - - **Description:** - -Identifies the entry for initializing and starting a system feature by the priority 2. - -This macro is used to identify the entry called at the priority 2 of the system feature phase of the startup process. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
funcIndicates the entry function for initializing and starting a system feature. The type is void (*)(void).
- -## SYSEX\_FEATURE\_INIT\_PRI - -``` -#define SYSEX_FEATURE_INIT_PRI( func, priority ) LAYER_INITCALL(func, app_feature, "app.feature", priority) -``` - - **Description:** - -Identifies the entry for initializing and starting a system feature by the specified priority. - -This macro is used to identify the entry called at the specified priority of the system feature phase of the startup process. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
funcIndicates the entry function for initializing and starting a system feature. The type is void (*)(void).
priorityIndicates the calling priority when starting the system feature phase. The value range is [0,5), and the calling sequence is 0, 1, 2, 3, and 4.
- -## SYSEX\_SERVICE\_INIT - -``` -#define SYSEX_SERVICE_INIT( func) LAYER_INITCALL_DEF(func, app_service, "app.service") -``` - - **Description:** - -Identifies the entry for initializing and starting a system service by the priority 2. - -This macro is used to identify the entry called at the priority 2 in the system service phase of the startup process. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
funcIndicates the entry function for initializing and starting a system service. The type is void (*)(void).
- -## SYSEX\_SERVICE\_INIT\_PRI - -``` -#define SYSEX_SERVICE_INIT_PRI( func, priority ) LAYER_INITCALL(func, app_service, "app.service", priority) -``` - - **Description:** - -Identifies the entry for initializing and starting a system service by the specified priority. - -This macro is used to identify the entry called at the specified priority of the system service phase of the startup process. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
funcIndicates the entry function for initializing and starting a system service. The type is void (*)(void).
priorityIndicates the calling priority when starting the system service phase. The value range is [0,5), and the calling sequence is 0, 1, 2, 3, and 4.
- diff --git a/api/api-SmartVision-Devices/OHOS-Interpolation.md b/api/api-SmartVision-Devices/OHOS-Interpolation.md deleted file mode 100755 index e412932f1d70db688500a83592dda838392bfeec..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Interpolation.md +++ /dev/null @@ -1,67 +0,0 @@ -# OHOS::Interpolation - -- [Overview](#section1285276403165633) -- [Summary](#section731398620165633) -- [Static Public Member Functions](#pub-static-methods) -- [Additional Inherited Members](#inherited) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Calculates the Bezier interpolation. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Static Public Member Functions - - - - - - - - - - -

Function

-

Description

-

GetBezierInterpolation (int16_t t, int16_t u0, int16_t u1, int16_t u2, int16_t u3)

-

static int16_t

-

Obtains the value calculated by the cubic Bezier equation.

-
- -## Additional Inherited Members - - - - - - - - - - - - - -

Additional Inherited Member Name

-

Description

-

operator new (size_t size)

-

Overrides the new function.

-

operator delete (void *p)

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-KernNode.md b/api/api-SmartVision-Devices/OHOS-KernNode.md deleted file mode 100755 index 39f6e9b53010a93686b3f88ce2fce80a28f171c0..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-KernNode.md +++ /dev/null @@ -1,2 +0,0 @@ -# OHOS::KernNode - diff --git a/api/api-SmartVision-Devices/OHOS-KeyEvent.md b/api/api-SmartVision-Devices/OHOS-KeyEvent.md deleted file mode 100755 index f4be3bf381e070fe9f7000ef52cd15d2171bea55..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-KeyEvent.md +++ /dev/null @@ -1,110 +0,0 @@ -# OHOS::KeyEvent - -- [Overview](#section628384899165635) -- [Summary](#section1291846480165635) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines a key event, which indicates that a physical button is pressed or released. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

KeyEvent (uint16_t keyId, uint16_t state)

-

-

A constructor used to create a KeyEvent instance.

-

~KeyEvent ()

-

-

A destructor used to delete the KeyEvent instance.

-

GetKeyId () const

-

uint16_t

-

Obtains the key ID.

-

GetState () const

-

uint16_t

-

Obtains the key state.

-

Event ()

-

-

A default constructor used to create an Event instance.

-

Event (const Point &curPos)

-

-

A constructor used to create an Event instance.

-

~Event ()

-

virtual

-

A destructor used to delete the Event instance.

-

GetCurrentPos () const

-

const Point &

-

Obtains the position where an event occurs.

-

GetTimeStamp () const

-

const TimeType &

-

Obtains the timestamp when an event occurs.

-

SetTimeStamp (const TimeType &timeStamp)

-

void

-

Sets the timestamp when an event occurs.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-LangBinHeader.md b/api/api-SmartVision-Devices/OHOS-LangBinHeader.md deleted file mode 100755 index 2647c575690dd097b96ce0f9cd9a74a9efe14091..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-LangBinHeader.md +++ /dev/null @@ -1,2 +0,0 @@ -# OHOS::LangBinHeader - diff --git a/api/api-SmartVision-Devices/OHOS-LangFontBinHeader.md b/api/api-SmartVision-Devices/OHOS-LangFontBinHeader.md deleted file mode 100755 index 54fd1a96031f0ee38f020f73391a5f182617febe..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-LangFontBinHeader.md +++ /dev/null @@ -1,2 +0,0 @@ -# OHOS::LangFontBinHeader - diff --git a/api/api-SmartVision-Devices/OHOS-LangTexsTableHeader.md b/api/api-SmartVision-Devices/OHOS-LangTexsTableHeader.md deleted file mode 100755 index 2c480fc3107c84ca367c6868d32bef140c8c3e6c..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-LangTexsTableHeader.md +++ /dev/null @@ -1,2 +0,0 @@ -# OHOS::LangTexsTableHeader - diff --git a/api/api-SmartVision-Devices/OHOS-LangTexsUtf8Param.md b/api/api-SmartVision-Devices/OHOS-LangTexsUtf8Param.md deleted file mode 100755 index c6905dd5f879310e40f01156c3d5cc6047333f7f..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-LangTexsUtf8Param.md +++ /dev/null @@ -1,2 +0,0 @@ -# OHOS::LangTexsUtf8Param - diff --git a/api/api-SmartVision-Devices/OHOS-Layout.md b/api/api-SmartVision-Devices/OHOS-Layout.md deleted file mode 100755 index cb5590668de50336f8248c090dcfdb31d61a2150..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Layout.md +++ /dev/null @@ -1,703 +0,0 @@ -# OHOS::Layout - -- [Overview](#section833083656165635) -- [Summary](#section1992683037165635) -- [Public Member Functions](#pub-methods) -- [Additional Inherited Members](#inherited) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines the base class of the layout, which indicates the basic data types and operations that may be used in the layout. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

Layout ()

-

-

A default constructor used to create a Layout instance.

-

~Layout ()

-

virtual

-

A destructor used to delete the Layout instance.

-

SetLayoutDirection (const DirectionType &direction)

-

void

-

Sets the layout direction.

-

UIViewGroup ()

-

-

A default constructor used to create a UIViewGroup instance.

-

~UIViewGroup ()

-

virtual

-

A destructor used to delete the UIViewGroup instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

Add (UIView *view)

-

virtual void

-

Adds a child view.

-

Insert (UIView *prevView, UIView *insertView)

-

virtual void

-

Inserts a new child view behind the current one.

-

Remove (UIView *view)

-

virtual void

-

Removes a child view.

-

RemoveAll ()

-

virtual void

-

Removes all child views.

-

GetTargetView (const Point &point, UIView **last) override

-

virtual void

-

Obtains the target child view that is visible and can respond to touch events based on given coordinates.

-

MoveChildByOffset (int16_t x, int16_t y)

-

virtual void

-

Moves all child views.

-

GetChildrenHead () const

-

UIView *

-

Obtains the first child view in this view group.

-

GetChildrenTail () const

-

UIView *

-

Obtains the last child view in this view group.

-

SetDisallowIntercept (bool flag)

-

void

-

Sets whether this view group is intercepted upon touch events.

-

GetChildById (const char *id) const override

-

UIView *

-

Obtains the target child view with a specified ID.

-

SetAutoSize (bool state)

-

void

-

Sets whether the size of this view group is adaptive to that of all child views.

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnPreDraw (const Rect &invalidatedArea)

-

virtual bool

-

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

-

OnDraw (const Rect &invalidatedArea)

-

virtual void

-

Called when a view is drawn.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void

-

Called after a view is drawn.

-

ReMeasure ()

-

virtual void

-

Remeasures the view size.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool

-

Called when the view stops dragging.

-

OnClickEvent (const ClickEvent &event)

-

virtual void

-

Called when the view is clicked.

-

OnPressEvent (const PressEvent &event)

-

virtual void

-

Called when the view is pressed.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void

-

Sets whether the view is visible.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

SetWidth (int16_t width)

-

virtual void

-

Sets the width for the view.

-

GetWidth ()

-

virtual int16_t

-

Obtains the width for the view.

-

SetHeight (int16_t height)

-

virtual void

-

Sets the height for the view.

-

GetHeight ()

-

virtual int16_t

-

Obtains the height for the view.

-

Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- -## Additional Inherited Members - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Additional Inherited Member Name

-

Description

-

GetAllChildRelativeRect () const

-

Obtains the rectangle area of a new view group after being adaptive to the size of all child views.

-

OnChildChanged ()

-

Performs operations needed after a child view is added or removed.

-

childrenHead_

-

Indicates the pointer to the first child view of this view group.

-

childrenTail_

-

Indicates the pointer to the last child view of this view group.

-

childrenNum_

-

Represents the number of child views.

-

isDragging_

-

Specifies the sliding state of this view group.

-

disallowIntercept_

-

Specifies whether this view group is intercepted upon touch events.

-

isAutoSize_

-

Specifies whether the size of this view group is adaptive to that of all child views.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Line.md b/api/api-SmartVision-Devices/OHOS-Line.md deleted file mode 100755 index 83e990260cbfaa94bb2ee8e8b2a82c1572605a6a..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Line.md +++ /dev/null @@ -1,86 +0,0 @@ -# OHOS::Line - -- [Overview](#section1215086311165635) -- [Summary](#section62226344165635) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines a line, which consists of the start and end points. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

Line ()

-

-

The default constructor used to create a Line instance.

-

Line (const Vector2< int16_t > &a, const Vector2< int16_t > &b)

-

-

A constructor used to create a Line instance.

-

Line (int16_t x1, int16_t y1, int16_t x2, int16_t y2)

-

-

A constructor used to create a Line instance.

-

~Line ()

-

-

A destructor used to delete the Line instance.

-

operator[] (uint8_t index)

-

Vector2< int16_t > &

-

Obtains the start or end point of the line based on the value of index.

-

operator[] (uint8_t index) const

-

const Vector2< int16_t >

-

Obtains the start or end point of the line based on the value of index.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-List-T.md b/api/api-SmartVision-Devices/OHOS-List-T.md deleted file mode 100755 index 5c06d641f97aeef294428927529a1e9051ce4b9d..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-List-T.md +++ /dev/null @@ -1,161 +0,0 @@ -# OHOS::List< T \> - -- [Overview](#section112029841165635) -- [Summary](#section1952163899165635) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -template class OHOS::List< T \> - -Defines a linked list template class, which implements the data structure of bidirectional linked list and provides basic functions such as adding, deleting, inserting, clearing, popping up, and obtaining the size of the linked list. - -Parameters -: **Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

List ()

-

-

A default constructor used to create a List instance. The initial size is 0.

-

~List ()

-

virtual

-

A destructor used to delete the List instance.

-

Front () const

-

const T

-

Obtains the head node data of a linked list.

-

Back () const

-

const T

-

Obtains the tail node data of a linked list.

-

PushBack (T data)

-

void

-

Inserts data at the end of a linked list.

-

PushFront (T data)

-

void

-

Inserts data at the start of a linked list.

-

PopBack ()

-

void

-

Pops up a data record at the end of a linked list.

-

PopFront ()

-

void

-

Pops up a data record at the start of a linked list.

-

Insert (ListNode< T > *node, T data)

-

void

-

Inserts data before a specified node, which follows the inserted data node.

-

Remove (ListNode< T > *node)

-

void

-

Deletes a data node.

-

Clear ()

-

void

-

Deletes all nodes from a linked list.

-

Head () const

-

ListNode< T > *

-

Obtains the head node address of a linked list.

-

Tail () const

-

ListNode< T > *

-

Obtains the tail node address of a linked list.

-

Begin () const

-

ListNode< T > *

-

Obtains the head node address of a linked list.

-

End () const

-

const ListNode< T > *

-

Obtains the end node address of a linked list.

-

Next (const ListNode< T > *node) const

-

ListNode< T > *

-

Obtains the address of the node following the specified node.

-

IsEmpty () const

-

bool

-

Checks whether a linked list is empty.

-

Size () const

-

uint16_t

-

Obtains the size of a linked list.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-ListNode-T.md b/api/api-SmartVision-Devices/OHOS-ListNode-T.md deleted file mode 100755 index ad8fb67b29013ec278638bb9b50cece4886ef370..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-ListNode-T.md +++ /dev/null @@ -1,51 +0,0 @@ -# OHOS::ListNode< T \> - -- [Overview](#section723340838165635) -- [Summary](#section1190455368165635) -- [Additional Inherited Members](#inherited) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -template class OHOS::ListNode< T \> - -Stores linked list data and contains pointers to the previous node and the next node. - -Parameters -: **Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Additional Inherited Members - - - - - - - - - - - - - -

Additional Inherited Member Name

-

Description

-

operator new (size_t size)

-

Overrides the new function.

-

operator delete (void *p)

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-ListScrollListener.md b/api/api-SmartVision-Devices/OHOS-ListScrollListener.md deleted file mode 100755 index 585c9428719c85c237ca317ec3c853a2675e34de..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-ListScrollListener.md +++ /dev/null @@ -1,86 +0,0 @@ -# OHOS::ListScrollListener - -- [Overview](#section669334094165634) -- [Summary](#section1535020238165634) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Represents a listener that contains a callback to be invoked when the scroll state changes or when a new child view is selected at the preset position as this list scrolls. The scroll state can be \{**\} or SCROLL\_STATE\_MOVE\}. ** - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

ListScrollListener ()

-

-

A constructor used to create a ListScrollListener instance with the default state SCROLL_STATE_STOP.

-

~ListScrollListener ()

-

virtual

-

A destructor used to delete the ListScrollListener instance.

-

OnScrollStart (int16_t index, UIView *view)

-

virtual void

-

Called when a scroll starts.

-

OnScrollEnd (int16_t index, UIView *view)

-

virtual void

-

Called when a scroll ends.

-

OnItemSelected (int16_t index, UIView *view)

-

virtual void

-

Called when a new child view is selected at the preset position as this list scrolls. For details about how to set the position, see SetSelectPosition.

-

GetScrollState () const

-

uint8_t

-

Obtains the scroll state of this list.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-LongPressEvent.md b/api/api-SmartVision-Devices/OHOS-LongPressEvent.md deleted file mode 100755 index 444015cde307322e9bdb246b97c1a834331c7c15..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-LongPressEvent.md +++ /dev/null @@ -1,98 +0,0 @@ -# OHOS::LongPressEvent - -- [Overview](#section2143778696165635) -- [Summary](#section868741400165635) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines a long-press event, which indicates that the finger is not raised or moved within 1 second after a view is pressed. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

LongPressEvent (const Point &pos, const TimeType &timeStamp)

-

-

A constructor used to create a LongPressEvent instance.

-

~LongPressEvent ()

-

virtual

-

A destructor used to delete the LongPressEvent instance.

-

Event ()

-

-

A default constructor used to create an Event instance.

-

Event (const Point &curPos)

-

-

A constructor used to create an Event instance.

-

~Event ()

-

virtual

-

A destructor used to delete the Event instance.

-

GetCurrentPos () const

-

const Point &

-

Obtains the position where an event occurs.

-

GetTimeStamp () const

-

const TimeType &

-

Obtains the timestamp when an event occurs.

-

SetTimeStamp (const TimeType &timeStamp)

-

void

-

Sets the timestamp when an event occurs.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Matrix3-T.md b/api/api-SmartVision-Devices/OHOS-Matrix3-T.md deleted file mode 100755 index 34814f31ca9a82c535826d26a0c73da7984fdd28..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Matrix3-T.md +++ /dev/null @@ -1,119 +0,0 @@ -# OHOS::Matrix3< T \> - -- [Overview](#section386546175165635) -- [Summary](#section157087823165635) -- [Public Member Functions](#pub-methods) -- [Static Public Member Functions](#pub-static-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -template class OHOS::Matrix3< T \> - -Defines a 3 x 3 matrix. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

Matrix3 ()

-

-

Defines a Matrix3 instance and initializes the 3 x 3 matrix data.

-

Matrix3 (T m00, T m01, T m02, T m10, T m11, T m12, T m20, T m21, T m22)

-

-

Defines a Matrix3 instance and initializes the 3 x 3 matrix data.

-

~Matrix3 ()

-

-

A destructor used to delete the Matrix3 instance.

-

GetData () const

-

const T *

-

Obtains the 3 x 3 matrix data.

-

Determinant () const

-

T

-

Obtains the determinant of the matrix.

-

Inverse () const

-

Matrix3

-

Obtains the inverse matrix.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- -## Static Public Member Functions - - - - - - - - - - - - - - - - -

Function

-

Description

-

Rotate (T angle, const Vector2< T > &pivot)

-

static Matrix3

-

Obtains a rotation matrix. After a matrix is rotated, its data is shifted leftwards by 15 bits. Therefore, the result data needs to be shifted rightwards by 15 bits.

-

Scale (const Vector2< T > &scale, const Vector2< T > &fixed)

-

static Matrix3

-

Obtains the scaling matrix. After a matrix is scaled, its data is shifted leftwards by 8 bits. Therefore, the result data needs to be shifted rightwards by 8 bits.

-

Translate (const Vector2< T > &trans)

-

static Matrix3< T >

-

Obtains a matrix translation.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Media-Camera.md b/api/api-SmartVision-Devices/OHOS-Media-Camera.md deleted file mode 100755 index 1124d67651c9ff2c9e7ab2b6c129bba7fe5c5f90..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Media-Camera.md +++ /dev/null @@ -1,111 +0,0 @@ -# OHOS::Media::Camera - -- [Overview](#section782472257165632) -- [Summary](#section672881182165632) -- [Public Member Functions](#pub-methods) -- [Protected Member Functions](#pro-methods) - -## **Overview** - -**Related Modules:** - -[MultiMedia\_Camera](MultiMedia_Camera.md) - -**Description:** - -Provides functions in the **[Camera](OHOS-Media-Camera.md)** class to implement camera operations. operations. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

~Camera ()=default

-

virtual

-

A destructor used to delete the Camera instance.

-

GetCameraId ()

-

virtual std::string

-

Obtains the camera ID.

-

GetCameraConfig () const

-

virtual const CameraConfig *

-

Obtains the camera configuration. You can use the obtained CameraConfig object to configure the camera.

-

GetFrameConfig (int32_t type)

-

virtual FrameConfig *

-

Obtains the frame configuration.

-

Configure (CameraConfig &config)

-

virtual void

-

Configures the camera using the CameraConfig object.

-

TriggerLoopingCapture (FrameConfig &frameConfig)

-

virtual int32_t

-

Triggers looping-frame capture.

-

StopLoopingCapture ()

-

virtual void

-

Stops looping-frame capture.

-

TriggerSingleCapture (FrameConfig &frameConfig)

-

virtual int32_t

-

Starts single-frame capture. The frame parameters are set through the FrameConfig object, and the captured image data is stored in the surface of the FrameConfig object.

-

Release ()

-

virtual void

-

Releases the Camera object and associated resources.

-
- -## Protected Member Functions - - - - - - - - - - -

Function

-

Description

-

Camera ()=default

-

-

A constructor used to create a Camera instance.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Media-CameraAbility.md b/api/api-SmartVision-Devices/OHOS-Media-CameraAbility.md deleted file mode 100755 index 8029415fe03e67e0a5d9cd34a7b2632ebe46a7f4..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Media-CameraAbility.md +++ /dev/null @@ -1,68 +0,0 @@ -# OHOS::Media::CameraAbility - -- [Overview](#section1978665259165632) -- [Summary](#section2081471788165632) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[MultiMedia\_CameraAbility](MultiMedia_CameraAbility.md) - -**Description:** - -Declares functions of the **[CameraAbility](OHOS-Media-CameraAbility.md)** class. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

CameraAbility ()

-

-

A constructor used to create a CameraAbility instance.

-

~CameraAbility ()

-

virtual

-

A destructor used to delete the CameraAbility instance.

-

GetSupportedSizes (int format) const

-

std::list< CameraPicSize >

-

Obtains the supported image sizes for a specified image format.

-

SetParameterRange (uint32_t key, std::list< T > rangeList)

-

template<typename T > int32_t

-

Sets value ranges for a specified parameter.

-

GetParameterRange (uint32_t key) const

-

template<typename T > std::list< T >

-

Obtains the parameter value range based on a specified parameter key.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Media-CameraConfig.md b/api/api-SmartVision-Devices/OHOS-Media-CameraConfig.md deleted file mode 100755 index 8c7d25b8c3bec98ac149a0d6912bf2a2d79fcdba..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Media-CameraConfig.md +++ /dev/null @@ -1,100 +0,0 @@ -# OHOS::Media::CameraConfig - -- [Overview](#section367535151165632) -- [Summary](#section416551332165632) -- [Public Member Functions](#pub-methods) -- [Static Public Member Functions](#pub-static-methods) -- [Protected Member Functions](#pro-methods) - -## **Overview** - -**Related Modules:** - -[MultiMedia\_CameraConfig](MultiMedia_CameraConfig.md) - -**Description:** - -Provides functions to configure camera parameters. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

~CameraConfig ()

-

virtual

-

A destructor used to delete the CameraAbility instance.

-

SetFrameStateCallback (FrameStateCallback *callback, EventHandler *handler)

-

virtual void

-

Sets a frame state callback to responds to state changes.

-

GetEventHandler () const

-

virtual EventHandler *

-

Obtains the EventHandler object.

-

GetFrameStateCb () const

-

virtual FrameStateCallback *

-

Obtains a FrameStateCallback object.

-
- -## Static Public Member Functions - - - - - - - - - - -

Function

-

Description

-

CreateCameraConfig ()

-

static CameraConfig *

-

Creates the CameraConfig instance of this singleton class to configure and read the required parameters.

-
- -## Protected Member Functions - - - - - - - - - - -

Function

-

Description

-

CameraConfig ()

-

-

A constructor used to create a CameraConfig instance.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Media-CameraDeviceCallback.md b/api/api-SmartVision-Devices/OHOS-Media-CameraDeviceCallback.md deleted file mode 100755 index 934212707d50e2da975e4bf7f6adb58a784643d9..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Media-CameraDeviceCallback.md +++ /dev/null @@ -1,56 +0,0 @@ -# OHOS::Media::CameraDeviceCallback - -- [Overview](#section1981938762165632) -- [Summary](#section677004534165632) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[MultiMedia\_CameraDeviceCallback](MultiMedia_CameraDeviceCallback.md) - -**Description:** - -Provides functions to response to device changes. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - -

Function

-

Description

-

CameraDeviceCallback ()=default

-

-

A constructor used to create a CameraDeviceCallback instance.

-

~CameraDeviceCallback ()=default

-

virtual

-

A destructor used to delete the CameraDeviceCallback instance.

-

OnCameraStatus (std::string cameraId, int32_t status)

-

virtual void

-

Called when the camera state changes.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Media-CameraKit.md b/api/api-SmartVision-Devices/OHOS-Media-CameraKit.md deleted file mode 100755 index ed9fe8a34e0788f73c9a87c62a422c7f90b2dd2c..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Media-CameraKit.md +++ /dev/null @@ -1,93 +0,0 @@ -# OHOS::Media::CameraKit - -- [Overview](#section517282025165632) -- [Summary](#section1975045411165632) -- [Public Member Functions](#pub-methods) -- [Static Public Member Functions](#pub-static-methods) - -## **Overview** - -**Related Modules:** - -[MultiMedia\_CameraKit](MultiMedia_CameraKit.md) - -**Description:** - -Provides functions in the **[CameraKit](OHOS-Media-CameraKit.md)** class. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

~CameraKit ()

-

-

A destructor used to delete the CameraKit instance.

-

GetCameraIds ()

-

std::list< std::string >

-

Obtains IDs of cameras that are currently available.

-

GetCameraAbility (std::string cameraId)

-

const CameraAbility *

-

Obtains the camera capability, including the resolutions and frame rates.

-

RegisterCameraDeviceCallback (CameraDeviceCallback &callback, EventHandler &handler)

-

void

-

Registers a camera callback for camera status changes and an event callback to respond to a triggered event.

-

UnregisterCameraDeviceCallback (CameraDeviceCallback &callback)

-

void

-

Unregisters a camera callback.

-

CreateCamera (const std::string &cameraId, CameraStateCallback &callback, EventHandler &handler)

-

void

-

Creates a camera object.

-
- -## Static Public Member Functions - - - - - - - - - - -

Function

-

Description

-

GetInstance ()

-

static CameraKit *

-

Obtains a single instance of the CameraKit.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Media-CameraStateCallback.md b/api/api-SmartVision-Devices/OHOS-Media-CameraStateCallback.md deleted file mode 100755 index ac33f42936261a849f26afabc1dd434e79ca2ae1..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Media-CameraStateCallback.md +++ /dev/null @@ -1,80 +0,0 @@ -# OHOS::Media::CameraStateCallback - -- [Overview](#section807744296165632) -- [Summary](#section1866436241165632) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[MultiMedia\_CameraStateCallback](MultiMedia_CameraStateCallback.md) - -**Description:** - -Provides functions to response to camera states. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

CameraStateCallback ()=default

-

-

A constructor used to create a CameraStateCallback instance.

-

~CameraStateCallback ()

-

virtual

-

A destructor used to delete the CameraStateCallback instance.

-

OnCreated (Camera &c)

-

virtual void

-

Called when the camera is successfully created.

-

OnCreateFailed (const std::string cameraId, int32_t errorCode)

-

virtual void

-

Called when the camera fails to be created.

-

OnReleased (Camera &c)

-

virtual void

-

Called when the camera is released.

-

OnConfigured (Camera &c)

-

virtual void

-

Called when the camera is configured.

-

OnConfigureFailed (const std::string cameraId, int32_t errorCode)

-

virtual void

-

Called when the camera fails to be configured.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Media-Format.md b/api/api-SmartVision-Devices/OHOS-Media-Format.md deleted file mode 100755 index 0e4cfeaca7c84b54460ea53742da1929edd4d5f9..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Media-Format.md +++ /dev/null @@ -1,116 +0,0 @@ -# OHOS::Media::Format - -- [Overview](#section141884443165633) -- [Summary](#section2084623564165633) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[MultiMedia\_MediaCommon](MultiMedia_MediaCommon.md) - -**Description:** - -Saves and sets media metadata, such as the media playback duration. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

Format ()

-

-

Default constructor of the Format instance.

-

PutIntValue (const std::string &key, int32_t value)

-

bool

-

Sets metadata of the integer type.

-

PutLongValue (const std::string &key, int64_t value)

-

bool

-

Sets metadata of the long integer type.

-

PutFloatValue (const std::string &key, float value)

-

bool

-

Sets metadata of the single-precision floating-point type.

-

PutDoubleValue (const std::string &key, double value)

-

bool

-

Sets metadata of the double-precision floating-point type.

-

PutStringValue (const std::string &key, const std::string &value)

-

bool

-

Sets metadata of the string type.

-

GetIntValue (const std::string &key, int32_t &value) const

-

bool

-

Obtains the metadata value of the integer type.

-

GetLongValue (const std::string &key, int64_t &value) const

-

bool

-

Obtains the metadata value of the long integer type.

-

GetFloatValue (const std::string &key, float &value) const

-

bool

-

Obtains the metadata value of the single-precision floating-point type.

-

GetDoubleValue (const std::string &key, double &value) const

-

bool

-

Obtains the metadata value of the double-precision floating-point type.

-

GetStringValue (const std::string &key, std::string &value) const

-

bool

-

Obtains the metadata value of the string type.

-

GetFormatMap () const

-

const std::map< std::string, FormatData * > &

-

Obtains the metadata map.

-

CopyFrom (const Format &format)

-

bool

-

Sets all metadata to a specified format.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Media-FormatData.md b/api/api-SmartVision-Devices/OHOS-Media-FormatData.md deleted file mode 100755 index 566a05485b8ac429c93194ea9d7c34d63fd34d36..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Media-FormatData.md +++ /dev/null @@ -1,104 +0,0 @@ -# OHOS::Media::FormatData - -- [Overview](#section1749259609165633) -- [Summary](#section805307126165633) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[MultiMedia\_MediaCommon](MultiMedia_MediaCommon.md) - -**Description:** - -Represents the data format. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

GetType () const

-

FormatDataType

-

Obtains the format type.

-

SetValue (int32_t val)

-

bool

-

Sets a 32-bit integer.

-

SetValue (int64_t val)

-

bool

-

Sets a 64-bit long integer.

-

SetValue (float val)

-

bool

-

Sets a single-precision floating-point number.

-

SetValue (double val)

-

bool

-

Sets a double-precision floating-point number.

-

SetValue (const std::string &val)

-

bool

-

Sets a string.

-

GetInt32Value (int32_t &val) const

-

bool

-

Obtains a 32-bit integer.

-

GetInt64Value (int64_t &val) const

-

bool

-

Obtains a long integer.

-

GetFloatValue (float &val) const

-

bool

-

Obtains a single-precision floating-point number.

-

GetDoubleValue (double &val) const

-

bool

-

Obtains a double-precision floating-point number.

-

GetStringValue (std::string &val) const

-

bool

-

Obtains a string.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Media-FrameConfig.md b/api/api-SmartVision-Devices/OHOS-Media-FrameConfig.md deleted file mode 100755 index 4900c2bd2b92dfd38f0517b11548e5bb3a9f9109..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Media-FrameConfig.md +++ /dev/null @@ -1,92 +0,0 @@ -# OHOS::Media::FrameConfig - -- [Overview](#section2020073262165632) -- [Summary](#section1791407885165632) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[MultiMedia\_FrameConfig](MultiMedia_FrameConfig.md) - -**Description:** - -Provides functions to configure frames. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

FrameConfig ()=delete

-

-

A constructor used to create a FrameConfig instance.

-

FrameConfig (int32_t type)

-

-

A constructor used to create a FrameConfig instance based on the configuration mode.

-

~FrameConfig ()

-

-

A destructor used to delete the FrameConfig instance.

-

GetFrameConfigType ()

-

int32_t

-

Obtains the frame configuration type.

-

GetSurfaces ()

-

std::list< Surface * >

-

Obtains a list of shared memories (surface objects).

-

AddSurface (Surface &surface)

-

void

-

Adds a surface (an object of shared memory).

-

RemoveSurface (Surface &surface)

-

void

-

Removes a surface (an object of shared memory). You can call this function to release the surface when your application does not need to obtain data.

-

SetParameter (uint32_t key, const T value)

-

template<typename T > void

-

Sets the common parameter.

-

GetParameter (uint32_t key, T &value)

-

template<typename T > void

-

Obtains the value of a common parameter based on its key. For details, see CAMERA_FUC_KEY.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Media-FrameStateCallback.md b/api/api-SmartVision-Devices/OHOS-Media-FrameStateCallback.md deleted file mode 100755 index 512e91e21ed148660a7f270df7d83669beda4e5f..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Media-FrameStateCallback.md +++ /dev/null @@ -1,62 +0,0 @@ -# OHOS::Media::FrameStateCallback - -- [Overview](#section1027762142165632) -- [Summary](#section280971760165632) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[MultiMedia\_FrameStateCallback](MultiMedia_FrameStateCallback.md) - -**Description:** - -Provides functions to listen for frame states and response to the state changes. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

FrameStateCallback ()=default

-

-

A constructor used to create a FrameStateCallback instance.

-

~FrameStateCallback ()=default

-

-

A destructor used to delete the FrameStateCallback instance.

-

OnFrameFinished (Camera &camera, FrameConfig &frameConfig, FrameResult &frameResult)

-

virtual void

-

Called when the frame capture is finished.

-

OnFrameError (Camera &camera, FrameConfig &frameConfig, int32_t errorCode, FrameResult &frameResult)

-

virtual void

-

Called when the frame capture fails.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Media-Player.md b/api/api-SmartVision-Devices/OHOS-Media-Player.md deleted file mode 100755 index 68c518438892e535c919d8b9feeb830379a3b4fb..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Media-Player.md +++ /dev/null @@ -1,146 +0,0 @@ -# OHOS::Media::Player - -- [Overview](#section1269825086165632) -- [Summary](#section273161611165632) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[MultiMedia\_Player](MultiMedia_Player.md) - -**Description:** - -Provides functions for playing online movies, offline movies, and streams, for example, playing local movies and advanced audio coding \(AAC\) streams. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

SetSource (const Source &source)

-

int32_t

-

Sets the playback source for the player. The corresponding source can be the file descriptor (FD) of the local file, local file URI, network URI, or media stream.

-

Prepare ()

-

int32_t

-

Prepares the playback environment and buffers media data.

-

Play ()

-

int32_t

-

Starts or resumes playback.

-

IsPlaying ()

-

bool

-

Checks whether the player is playing.

-

Pause ()

-

int32_t

-

Pauses playback.

-

Stop ()

-

int32_t

-

Stops playback.

-

Rewind (int64_t mSeconds, int32_t mode)

-

int32_t

-

Changes the playback position.

-

SetVolume (float leftVolume, float rightVolume)

-

int32_t

-

Sets the volume of the player.

-

SetVideoSurface (Surface *surface)

-

int32_t

-

Sets a surface for video playback.

-

EnableSingleLooping (bool loop)

-

int32_t

-

Sets loop playback.

-

IsSingleLooping ()

-

bool

-

Checks whether the player is looping.

-

GetCurrentTime (int64_t &time) const

-

int32_t

-

Obtains the playback position, accurate to millisecond.

-

GetDuration (int64_t &duration) const

-

int32_t

-

Obtains the total duration of media files, in milliseconds.

-

GetVideoWidth (int32_t &videoWidth)

-

int32_t

-

Obtains the width of the video.

-

GetVideoHeight (int32_t &videoHeight)

-

int32_t

-

Obtains the height of the video.

-

Reset ()

-

int32_t

-

Restores the player to the initial state.

-

Release ()

-

int32_t

-

Releases player resources.

-

SetPlayerCallback (const std::shared_ptr< PlayerCallback > &cb)

-

void

-

Registers a listener to receive events and exception notifications from the player.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Media-PlayerCallback.md b/api/api-SmartVision-Devices/OHOS-Media-PlayerCallback.md deleted file mode 100755 index 772e016cadb04a6436a550c106c15083bf6ea750..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Media-PlayerCallback.md +++ /dev/null @@ -1,85 +0,0 @@ -# OHOS::Media::PlayerCallback - -- [Overview](#section512944021165632) -- [Summary](#section1995365483165632) -- [Public Types](#pub-types) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[MultiMedia\_Player](MultiMedia_Player.md) - -**Description:** - -Provides listeners for events and exception notifications that occur during media playback. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Types - - - - - - - - - - -

Public Type Name

-

Description

-

PlayerInfoType : int32_t { PLAYER_INFO_RENDER_START = 0 }

-
 
- -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

OnPlaybackComplete ()=0

-

virtual void

-

Called when the playback is complete.

-

OnError (int32_t errorType, int32_t errorCode)=0

-

virtual void

-

Called when a playback error occurs.

-

OnInfo (int type, int extra)=0

-

virtual void

-

Called when playback information is received.

-

OnVideoSizeChanged (int width, int height)=0

-

virtual void

-

Called when the video image size changes.

-

OnRewindToComplete ()=0

-

virtual void

-

Called when the rewind is complete.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Media-Recorder.md b/api/api-SmartVision-Devices/OHOS-Media-Recorder.md deleted file mode 100755 index 457c38e8826ca0ad8653c3688015de99a13b7dc5..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Media-Recorder.md +++ /dev/null @@ -1,206 +0,0 @@ -# OHOS::Media::Recorder - -- [Overview](#section467185584165633) -- [Summary](#section1317467736165633) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[MultiMedia\_Recorder](MultiMedia_Recorder.md) - -**Description:** - -Provides functions for audio and video recording. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

SetVideoSource (VideoSourceType source, int32_t &sourceId)

-

int32_t

-

Sets a video source for recording.

-

SetVideoEncoder (int32_t sourceId, VideoCodecFormat encoder)

-

int32_t

-

Sets a video encoder for recording.

-

SetVideoSize (int32_t sourceId, int32_t width, int32_t height)

-

int32_t

-

Sets the width and height of the video to record.

-

SetVideoFrameRate (int32_t sourceId, int32_t frameRate)

-

int32_t

-

Sets the frame rate of the video to record.

-

SetVideoEncodingBitRate (int32_t sourceId, int32_t rate)

-

int32_t

-

Sets the encoding bit rate of the video to record.

-

SetCaptureRate (int32_t sourceId, double fps)

-

int32_t

-

Sets the video capture rate.

-

GetSurface (int32_t sourceId)

-

std::shared_ptr< OHOS::Surface >

-

Obtains the surface of the video source.

-

SetAudioSource (AudioSourceType source, int32_t &sourceId)

-

int32_t

-

Sets the audio source for recording.

-

SetAudioEncoder (int32_t sourceId, AudioCodecFormat encoder)

-

int32_t

-

Sets an audio encoder for recording.

-

SetAudioSampleRate (int32_t sourceId, int32_t rate)

-

int32_t

-

Sets the audio sampling rate for recording.

-

SetAudioChannels (int32_t sourceId, int32_t num)

-

int32_t

-

Sets the number of audio channels to record.

-

SetAudioEncodingBitRate (int32_t sourceId, int32_t bitRate)

-

int32_t

-

Sets the encoding bit rate of the audio to record.

-

SetMaxDuration (int32_t duration)

-

int32_t

-

Sets the maximum duration of a recorded file, in seconds.

-

SetOutputFormat (OutputFormatType format)

-

int32_t

-

Sets the output file format.

-

SetOutputPath (const string &path)

-

int32_t

-

Sets the output file path.

-

SetOutputFile (int32_t fd)

-

int32_t

-

Sets the file descriptor (FD) of the output file.

-

SetNextOutputFile (int32_t fd)

-

int32_t

-

Sets the FD of the next output file.

-

SetMaxFileSize (int64_t size)

-

int32_t

-

Sets the maximum size of a recorded file, in bytes.

-

SetRecorderCallback (const std::shared_ptr< RecorderCallback > &callback)

-

int32_t

-

Registers a recording listener.

-

Prepare ()

-

int32_t

-

Prepares for recording.

-

Start ()

-

int32_t

-

Starts recording.

-

Pause ()

-

int32_t

-

Pauses recording.

-

Resume ()

-

int32_t

-

Resumes recording.

-

Stop (bool block)

-

int32_t

-

Stops recording.

-

Reset ()

-

int32_t

-

Resets the recording.

-

Release ()

-

int32_t

-

Releases recording resources.

-

SetFileSplitDuration (FileSplitType type, int64_t timestamp, uint32_t duration)

-

int32_t

-

Manually splits a video.

-

SetParameter (int32_t sourceId, const Format &format)

-

int32_t

-

Sets an extended parameter for recording, for example, RCORDER_PRE_CACHE_DURATION.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Media-RecorderCallback.md b/api/api-SmartVision-Devices/OHOS-Media-RecorderCallback.md deleted file mode 100755 index f5fc3ebbb4052a693d34cad6e210153b8c21ba47..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Media-RecorderCallback.md +++ /dev/null @@ -1,73 +0,0 @@ -# OHOS::Media::RecorderCallback - -- [Overview](#section1868969378165633) -- [Summary](#section2032999591165633) -- [Public Types](#pub-types) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[MultiMedia\_Recorder](MultiMedia_Recorder.md) - -**Description:** - -Provides listeners for recording errors and information events. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Types - - - - - - - - - - - - - -

Public Type Name

-

Description

-

RecorderInfoType : int32_t { RECORDER_INFO_MAX_DURATION_APPROACHING = 0, RECORDER_INFO_MAX_FILESIZE_APPROACHING, RECORDER_INFO_MAX_DURATION_REACHED, RECORDER_INFO_MAX_FILESIZE_REACHED, RECORDER_INFO_NEXT_OUTPUT_FILE_STARTED, RECORDER_INFO_FILE_SPLIT_FINISHED, RECORDER_INFO_FILE_START_TIME_MS }

-

Enumerates recording information types.

-

RecorderErrorType : int32_t { RECORDER_ERROR_UNKNOWN = 0 }

-

Enumerates recording error types.

-
- -## Public Member Functions - - - - - - - - - - - - - -

Function

-

Description

-

OnError (int32_t errorType, int32_t errorCode)=0

-

virtual void

-

Called when an error occurs during recording. This callback is used to report recording errors.

-

OnInfo (int32_t type, int32_t extra)=0

-

virtual void

-

Called when an information event occurs during recording. This callback is used to report recording information.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Media-Source.md b/api/api-SmartVision-Devices/OHOS-Media-Source.md deleted file mode 100755 index cf33a188ff388aed14b69a0646ac621ad5e1319e..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Media-Source.md +++ /dev/null @@ -1,74 +0,0 @@ -# OHOS::Media::Source - -- [Overview](#section255130152165632) -- [Summary](#section1546565473165632) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[MultiMedia\_MediaCommon](MultiMedia_MediaCommon.md) - -**Description:** - -Provides functions to implement source-related operations. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

Source (const std::string &uri)

-

-

A constructor used to create a Source instance based on a specified URI.

-

Source (const std::shared_ptr< StreamSource > &stream, const Format &formats)

-

-

A constructor used to create a Source instance based on the stream source and format information.

-

GetSourceType () const

-

SourceType

-

Obtains the source type.

-

GetSourceUri () const

-

const std::string &

-

Obtains the media source URI.

-

GetSourceStream () const

-

const std::shared_ptr< StreamSource > &

-

Obtains information about the media source stream.

-

GetSourceStreamFormat () const

-

const Format &

-

Obtains the media source stream format.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Media-StreamCallback.md b/api/api-SmartVision-Devices/OHOS-Media-StreamCallback.md deleted file mode 100755 index 0aa3af57b92d4c802f3d5bbed962e1e7032a68f0..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Media-StreamCallback.md +++ /dev/null @@ -1,74 +0,0 @@ -# OHOS::Media::StreamCallback - -- [Overview](#section1708185826165633) -- [Summary](#section1272339314165633) -- [Public Types](#pub-types) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[MultiMedia\_MediaCommon](MultiMedia_MediaCommon.md) - -**Description:** - -Provides functions to obtain the address of a buffer memory and write the filled buffers into the playback queue. You need to implement the **[StreamCallback](OHOS-Media-StreamCallback.md)** functions in a player object. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Types - - - - - - - - - - -

Public Type Name

-

Description

-

BufferFlags : uint32_t { STREAM_FLAG_SYNCFRAME = 1, STREAM_FLAG_CODECCONFIG = 2, STREAM_FLAG_EOS = 4, STREAM_FLAG_PARTIAL_FRAME = 8, STREAM_FLAG_ENDOFFRAME = 16, STREAM_FLAG_MUXER_DATA = 32 }

-

Enumerates buffer types of stream sources.

-
- -## Public Member Functions - - - - - - - - - - - - - - - - -

Function

-

Description

-

GetBuffer (size_t index)=0

-

virtual uint8_t *

-

Obtains the virtual address of a buffer memory block based on its index.

-

QueueBuffer (size_t index, size_t offset, size_t size, int64_t timestampUs, uint32_t flags)=0

-

virtual void

-

Writes the filled buffer memory block into the player memory.

-

SetParameters (const Format &params)=0

-

virtual void

-

Sets additional information about a stream.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Media-StreamSource.md b/api/api-SmartVision-Devices/OHOS-Media-StreamSource.md deleted file mode 100755 index 234b9436d1c14cc09008269972953e665129cb88..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Media-StreamSource.md +++ /dev/null @@ -1,52 +0,0 @@ -# OHOS::Media::StreamSource - -- [Overview](#section694824669165633) -- [Summary](#section1887496875165633) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[MultiMedia\_MediaCommon](MultiMedia_MediaCommon.md) - -**Description:** - -Provides functions related to the stream source for upper-layer applications. - -After the **SetSource** function is called, the player invokes [OnBufferAvailable](MultiMedia_MediaCommon.md#gaaebd4fe9df44b434f410aec32cf23467) to notify your application of the buffer memory block that can be filled with data. The player can invoke [SetStreamCallback](MultiMedia_MediaCommon.md#ga078516891396a86226c945e02c79c1f5) to register a callback for your application. For example, the **GetBuffer** callback obtains the address of the buffer block and sends the filled buffer memory block to the player. The buffer memory block is allocated and processed on the player. **[StreamSource](OHOS-Media-StreamSource.md)**is available only for the media source of the **SOURCE\_TYPE\_STREAM** type. For details, see [SourceType](Format.md#ga3ae727773c367ac1041d72ac770a0ab1). - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - -

Function

-

Description

-

OnBufferAvailable (size_t index, size_t offset, size_t size)=0

-

virtual void

-

Notifies your application of the information about the buffer memory block that can be filled with data.

-

SetStreamCallback (const std::shared_ptr< StreamCallback > &callback)=0

-

virtual void

-

Sets a callback function for your application.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Paint.md b/api/api-SmartVision-Devices/OHOS-Paint.md deleted file mode 100755 index c1ca6a625c8c7c14df66e7c34e644f51a3f5020b..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Paint.md +++ /dev/null @@ -1,140 +0,0 @@ -# OHOS::Paint - -- [Overview](#section1608281812165634) -- [Summary](#section757770120165634) -- [Public Types](#pub-types) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines the basic styles of graphs drawn on canvases. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Types - - - - - - - - - - -

Public Type Name

-

Description

-

PaintStyle { STROKE_STYLE = 1, FILL_STYLE, STROKE_FILL_STYLE }

-

Enumerates paint styles of a closed graph. The styles are invalid for non-closed graphs.

-
- -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

Paint ()

-

-

A constructor used to create a Paint instance.

-

~Paint ()

-

virtual

-

A destructor used to delete the Paint instance.

-

SetStyle (PaintStyle style)

-

void

-

Sets the paint style of a closed graph.

-

GetStyle () const

-

PaintStyle

-

Obtains the paint style of a closed graph.

-

SetStrokeWidth (uint16_t width)

-

void

-

Sets the width of a line or border.

-

GetStrokeWidth () const

-

uint16_t

-

Obtains the width of a line or border.

-

SetStrokeColor (ColorType color)

-

void

-

Sets the color of a line or border.

-

GetStrokeColor () const

-

ColorType

-

Obtains the color of a line or border.

-

SetFillColor (ColorType color)

-

void

-

Sets fill color.

-

GetFillColor () const

-

ColorType

-

Obtains the fill color.

-

SetOpacity (uint8_t opacity)

-

void

-

Sets the opacity.

-

GetOpacity () const

-

uint8_t

-

Obtains the opacity.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Point.md b/api/api-SmartVision-Devices/OHOS-Point.md deleted file mode 100755 index 2afec25a2ae76dfd3dd849cf2db59b8bc04165c7..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Point.md +++ /dev/null @@ -1,48 +0,0 @@ -# OHOS::Point - -- [Overview](#section1781125773165635) -- [Summary](#section1354986863165635) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines a point. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

x

-

int16_t

-

y

-

int16_t

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Polygon.md b/api/api-SmartVision-Devices/OHOS-Polygon.md deleted file mode 100755 index 50e2052b36d887c5b6c8e791fb2fa966cde417d1..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Polygon.md +++ /dev/null @@ -1,109 +0,0 @@ -# OHOS::Polygon - -- [Overview](#section1782396468165635) -- [Summary](#section1199869771165635) -- [Public Member Functions](#pub-methods) -- [Static Public Attributes](#pub-static-attribs) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines a polygon, including vertex coordinates and the maximum number of vertices \(defined by [MAX\_VERTEX\_NUM](Graphic.md#gafff78acb69e2b147b6f33d68e570ef54)\). - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

Polygon ()

-

-

The default constructor used to create a Polygon instance.

-

Polygon (const Rect &rect)

-

-

A constructor used to construct a Polygon instance based on a rectangle.

-

Polygon (const Vector2< int16_t > *vertexes, const uint8_t vertexNum)

-

-

A constructor used to create a Polygon instance based on the vertex coordinates and the number of coordinates.

-

~Polygon ()

-

-

A destructor used to delete the Polygon instance.

-

MakeAABB () const

-

Rect

-

Obtains the minimum rectangle that can contain the polygon. All vertices of the polygon are inside this rectangle.

-

GetVertexNum () const

-

uint8_t

-

Obtains the number of vertices of the polygon.

-

SetVertexNum (uint8_t vertexNum)

-

void

-

Sets the number of vertices of a polygon.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- -## Static Public Attributes - - - - - - - - - - -

Static Public Attribute Name

-

Description

-

MAX_VERTEX_NUM = 8

-
 
- diff --git a/api/api-SmartVision-Devices/OHOS-PressEvent.md b/api/api-SmartVision-Devices/OHOS-PressEvent.md deleted file mode 100755 index 9954f57bc0648a4c4b1d4aca1189f1149d720131..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-PressEvent.md +++ /dev/null @@ -1,98 +0,0 @@ -# OHOS::PressEvent - -- [Overview](#section1997459006165635) -- [Summary](#section616805296165635) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines a touch event, which indicates that the touchscreen or mouse is pressed. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

PressEvent (const Point &pos)

-

-

A constructor used to create a PressEvent instance.

-

~PressEvent ()

-

virtual

-

A destructor used to delete the PressEvent instance.

-

Event ()

-

-

A default constructor used to create an Event instance.

-

Event (const Point &curPos)

-

-

A constructor used to create an Event instance.

-

~Event ()

-

virtual

-

A destructor used to delete the Event instance.

-

GetCurrentPos () const

-

const Point &

-

Obtains the position where an event occurs.

-

GetTimeStamp () const

-

const TimeType &

-

Obtains the timestamp when an event occurs.

-

SetTimeStamp (const TimeType &timeStamp)

-

void

-

Sets the timestamp when an event occurs.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-RawEvent.md b/api/api-SmartVision-Devices/OHOS-RawEvent.md deleted file mode 100755 index 7a4e37dde1f2f54d17ebb8d4b07f802b4cbdce6a..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-RawEvent.md +++ /dev/null @@ -1,2 +0,0 @@ -# OHOS::RawEvent - diff --git a/api/api-SmartVision-Devices/OHOS-Rect.md b/api/api-SmartVision-Devices/OHOS-Rect.md deleted file mode 100755 index 3354e0dca0ea2acc19660a1680fc6c21a15deca0..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Rect.md +++ /dev/null @@ -1,242 +0,0 @@ -# OHOS::Rect - -- [Overview](#section1699044475165633) -- [Summary](#section1910666326165633) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines a rectangle, including the position data of the four boundaries of the rectangle, and provides functions for rectangle inclusion, intersection, and aggregation. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

Rect ()

-

-

A constructor used to create a Rect instance.

-

~Rect ()

-

-

A destructor used to delete the Rect instance.

-

Rect (int16_t left, int16_t top, int16_t right, int16_t bottom)

-

-

A constructor used to create a Rect instance based on the coordinates of the four boundaries.

-

Rect (const Rect &other)

-

-

A constructor used to create a Rect instance by copying another rectangle.

-

Rect (const Rect &&other)

-

-

A constructor used to create a Rect instance by copying another rectangle.

-

SetRect (int16_t left, int16_t top, int16_t right, int16_t bottom)

-

void

-

Sets the coordinates of the four boundaries of a rectangle.

-

GetWidth () const

-

int16_t

-

Obtains the rectangle width.

-

GetHeight () const

-

int16_t

-

Obtains the rectangle height.

-

GetX () const

-

int16_t

-

Obtains the left boundary coordinate of the rectangle.

-

GetY () const

-

int16_t

-

Obtains the top boundary coordinate of the rectangle.

-

GetLeft () const

-

int16_t

-

Obtains the left boundary coordinate of the rectangle.

-

GetTop () const

-

int16_t

-

Obtains the top boundary coordinate of the rectangle.

-

GetRight () const

-

int16_t

-

Obtains the right boundary coordinate of the rectangle.

-

GetBottom () const

-

int16_t

-

Obtains the bottom boundary coordinate of the rectangle.

-

SetX (int16_t x)

-

void

-

Changes the left boundary coordinate of the rectangle without changing the rectangle width.

-

SetY (int16_t y)

-

void

-

Changes the top boundary coordinate of the rectangle without changing the rectangle height.

-

SetPosition (int16_t x, int16_t y)

-

void

-

Changes the coordinates of the left and top boundaries of the rectangle without changing the rectangle width and height.

-

SetWidth (int16_t width)

-

void

-

Changes the width of the rectangle without changing the coordinate of the left boundary.

-

SetHeight (int16_t height)

-

void

-

Changes the height of the rectangle without changing the coordinate of the top boundary.

-

SetLeft (int16_t left)

-

void

-

Sets the coordinate of the left boundary of a rectangle.

-

SetTop (int16_t top)

-

void

-

Sets the coordinate of the top boundary of a rectangle.

-

SetRight (int16_t right)

-

void

-

Sets the coordinate of the right boundary of a rectangle.

-

SetBottom (int16_t bottom)

-

void

-

Sets the coordinate of the bottom boundary of a rectangle.

-

Resize (int16_t width, int16_t height)

-

void

-

Sets the width and height of a rectangle.

-

GetSize () const

-

uint32_t

-

Obtains the area of a rectangle.

-

Intersect (const Rect &rect1, const Rect &rect2)

-

bool

-

Checks whether two rectangles intersect.

-

Join (const Rect &rect1, const Rect &rect2)

-

void

-

Obtains the minimum rectangle that contains another two rectangles.

-

IsContains (const Vector2< int16_t > &point) const

-

bool

-

Checks whether the rectangle contains a coordinate point.

-

IsContains (const Point &point) const

-

bool

-

Checks whether the rectangle contains a coordinate point.

-

IsExtends (const Rect &other) const

-

bool

-

Checks whether the rectangle is adjacent to another rectangle horizontally or vertically.

-

IsIntersect (const Rect &other) const

-

bool

-

Checks whether the rectangle intersects with another rectangle.

-

IsContains (const Rect &other) const

-

bool

-

Checks whether the rectangle contains another rectangle.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-ReleaseEvent.md b/api/api-SmartVision-Devices/OHOS-ReleaseEvent.md deleted file mode 100755 index a0441b2aa61d600b5654793d48b48a673afc5d7b..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-ReleaseEvent.md +++ /dev/null @@ -1,98 +0,0 @@ -# OHOS::ReleaseEvent - -- [Overview](#section2088060145165635) -- [Summary](#section2137750071165635) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines a release event, which indicates that the touchscreen or mouse is released. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

ReleaseEvent (const Point &pos)

-

-

A constructor used to create a ReleaseEvent instance.

-

~ReleaseEvent ()

-

virtual

-

A destructor used to delete the ReleaseEvent instance.

-

Event ()

-

-

A default constructor used to create an Event instance.

-

Event (const Point &curPos)

-

-

A constructor used to create an Event instance.

-

~Event ()

-

virtual

-

A destructor used to delete the Event instance.

-

GetCurrentPos () const

-

const Point &

-

Obtains the position where an event occurs.

-

GetTimeStamp () const

-

const TimeType &

-

Obtains the timestamp when an event occurs.

-

SetTimeStamp (const TimeType &timeStamp)

-

void

-

Sets the timestamp when an event occurs.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-RootView-OnKeyActListener.md b/api/api-SmartVision-Devices/OHOS-RootView-OnKeyActListener.md deleted file mode 100755 index 1b086a3fae8915d9e95da53f64693f157894c2e2..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-RootView-OnKeyActListener.md +++ /dev/null @@ -1,56 +0,0 @@ -# OHOS::RootView::OnKeyActListener - -- [Overview](#section1624292213165633) -- [Summary](#section1603119504165633) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Represents the listener for monitoring physical key events. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - -

Function

-

Description

-

OnKeyAct (UIView &view, const KeyEvent &event)=0

-

virtual bool

-

Responds to a physical key event.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-RootView-OnVirtualDeviceEventListener.md b/api/api-SmartVision-Devices/OHOS-RootView-OnVirtualDeviceEventListener.md deleted file mode 100755 index ac2ac49cae30c43d05f60bae313500313ed2dbd4..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-RootView-OnVirtualDeviceEventListener.md +++ /dev/null @@ -1,56 +0,0 @@ -# OHOS::RootView::OnVirtualDeviceEventListener - -- [Overview](#section1074318899165633) -- [Summary](#section1843961137165633) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Listens for the input events triggered by a virtual device other than human touching or physical pressing. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - -

Function

-

Description

-

OnVirtualDeviceEvent (UIView &view, VirtualDeviceEvent event)=0

-

virtual bool

-

Responds to an input event triggered by a virtual device.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-RootView.md b/api/api-SmartVision-Devices/OHOS-RootView.md deleted file mode 100755 index 6d3e5e0187f0ccc0eddcf5abcbfbbd705ef0ab66..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-RootView.md +++ /dev/null @@ -1,775 +0,0 @@ -# OHOS::RootView - -- [Overview](#section651609870165632) -- [Summary](#section1820329393165632) -- [Data Structures](#nested-classes) -- [Public Member Functions](#pub-methods) -- [Static Public Member Functions](#pub-static-methods) -- [Additional Inherited Members](#inherited) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines the functions related to a root view which contains its child views and represents the root node in a tree structure. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

OnKeyActListener

-

Represents the listener for monitoring physical key events.

-

OnVirtualDeviceEventListener

-

Listens for the input events triggered by a virtual device other than human touching or physical pressing.

-
- -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

OnKeyEvent (const KeyEvent &event)

-

virtual void

-

Executes a physical key event.

-

SetOnKeyActListener (OnKeyActListener *onKeyActListener)

-

void

-

Sets the listener that contains a callback to be invoked upon a physical key event.

-

ClearOnKeyActListener ()

-

void

-

Clears the listener for monitoring physical key events.

-

OnVirtualDeviceEvent (const VirtualDeviceEvent &event)

-

virtual void

-

Executes an input event triggered by a virtual device.

-

SetOnVirtualDeviceEventListener (OnVirtualDeviceEventListener *onVirtualDeviceEventListener)

-

void

-

Sets a listener for monitoring the input events of a virtual device.

-

ClearOnVirtualDeviceEventListener ()

-

void

-

Clears the listener for monitoring the input events of a virtual device.

-

UIViewGroup ()

-

-

A default constructor used to create a UIViewGroup instance.

-

~UIViewGroup ()

-

virtual

-

A destructor used to delete the UIViewGroup instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

Add (UIView *view)

-

virtual void

-

Adds a child view.

-

Insert (UIView *prevView, UIView *insertView)

-

virtual void

-

Inserts a new child view behind the current one.

-

Remove (UIView *view)

-

virtual void

-

Removes a child view.

-

RemoveAll ()

-

virtual void

-

Removes all child views.

-

GetTargetView (const Point &point, UIView **last) override

-

virtual void

-

Obtains the target child view that is visible and can respond to touch events based on given coordinates.

-

MoveChildByOffset (int16_t x, int16_t y)

-

virtual void

-

Moves all child views.

-

GetChildrenHead () const

-

UIView *

-

Obtains the first child view in this view group.

-

GetChildrenTail () const

-

UIView *

-

Obtains the last child view in this view group.

-

SetDisallowIntercept (bool flag)

-

void

-

Sets whether this view group is intercepted upon touch events.

-

GetChildById (const char *id) const override

-

UIView *

-

Obtains the target child view with a specified ID.

-

SetAutoSize (bool state)

-

void

-

Sets whether the size of this view group is adaptive to that of all child views.

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnPreDraw (const Rect &invalidatedArea)

-

virtual bool

-

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

-

OnDraw (const Rect &invalidatedArea)

-

virtual void

-

Called when a view is drawn.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void

-

Called after a view is drawn.

-

ReMeasure ()

-

virtual void

-

Remeasures the view size.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool

-

Called when the view stops dragging.

-

OnClickEvent (const ClickEvent &event)

-

virtual void

-

Called when the view is clicked.

-

OnPressEvent (const PressEvent &event)

-

virtual void

-

Called when the view is pressed.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void

-

Sets whether the view is visible.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

SetWidth (int16_t width)

-

virtual void

-

Sets the width for the view.

-

GetWidth ()

-

virtual int16_t

-

Obtains the width for the view.

-

SetHeight (int16_t height)

-

virtual void

-

Sets the height for the view.

-

GetHeight ()

-

virtual int16_t

-

Obtains the height for the view.

-

Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- -## Static Public Member Functions - - - - - - - - - - - - - -

Function

-

Description

-

GetInstance ()

-

static RootView *

-

Obtains a singleton RootView instance.

-

FindSubView (const UIView &parentView, const UIView *subView)

-

static bool

-

Checks whether the target view is one of the child views of the specified parent view.

-
- -## Additional Inherited Members - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Additional Inherited Member Name

-

Description

-

GetAllChildRelativeRect () const

-

Obtains the rectangle area of a new view group after being adaptive to the size of all child views.

-

OnChildChanged ()

-

Performs operations needed after a child view is added or removed.

-

childrenHead_

-

Indicates the pointer to the first child view of this view group.

-

childrenTail_

-

Indicates the pointer to the last child view of this view group.

-

childrenNum_

-

Represents the number of child views.

-

isDragging_

-

Specifies the sliding state of this view group.

-

disallowIntercept_

-

Specifies whether this view group is intercepted upon touch events.

-

isAutoSize_

-

Specifies whether the size of this view group is adaptive to that of all child views.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Screen.md b/api/api-SmartVision-Devices/OHOS-Screen.md deleted file mode 100755 index c08a0e2b05b973fe700214547c595e8886c4b83d..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Screen.md +++ /dev/null @@ -1,69 +0,0 @@ -# OHOS::Screen - -- [Overview](#section852715497165633) -- [Summary](#section275300537165633) -- [Public Member Functions](#pub-methods) -- [Static Public Member Functions](#pub-static-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Represents the screen info of the device. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - -

Function

-

Description

-

GetWidth ()

-

uint16_t

-

Obtains the width of this screen.

-

GetHeight ()

-

uint16_t

-

Obtains the height of this screen.

-
- -## Static Public Member Functions - - - - - - - - - - -

Function

-

Description

-

GetInstance ()

-

static Screen &

-

Obtains a singleton Screen instance.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Style.md b/api/api-SmartVision-Devices/OHOS-Style.md deleted file mode 100755 index 3f08546b9a9697eb7730af8263d899f29fc249a8..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Style.md +++ /dev/null @@ -1,74 +0,0 @@ -# OHOS::Style - -- [Overview](#section1036123221165635) -- [Summary](#section2120768408165635) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines the basic attributes and functions of a style. You can use this class to set different styles. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

Style ()

-

-

A constructor used to create a Style instance.

-

~Style ()

-

virtual

-

A destructor used to delete the Style instance.

-

SetStyle (uint8_t key, int64_t value)

-

void

-

Sets a style.

-

GetStyle (uint8_t key) const

-

int64_t

-

Obtains the value of a style.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-StyleDefault.md b/api/api-SmartVision-Devices/OHOS-StyleDefault.md deleted file mode 100755 index 0252e30093fdb7d25af41b1ba1ea75455fdcf766..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-StyleDefault.md +++ /dev/null @@ -1,153 +0,0 @@ -# OHOS::StyleDefault - -- [Overview](#section500669560165635) -- [Summary](#section1376385147165635) -- [Public Member Functions](#pub-methods) -- [Static Public Member Functions](#pub-static-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Define some default style for [UIView](OHOS-UIView.md). - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

StyleDefault ()

-

-

A constructor used to create a StyleDefault instance.

-

~StyleDefault ()

-

-

A destructor used to delete the StyleDefault instance.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- -## Static Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

GetDefaultStyle ()

-

static Style &

-

Obtains the default style.

-

GetBrightStyle ()

-

static Style &

-

Obtains the bright style.

-

GetBrightColorStyle ()

-

static Style &

-

Obtains the bright color style.

-

GetButtonPressedStyle ()

-

static Style &

-

Obtains the button pressed style.

-

GetButtonReleasedStyle ()

-

static Style &

-

Obtains the button released style.

-

GetButtonInactivedStyle ()

-

static Style &

-

Obtains the button inactived style.

-

GetLabelStyle ()

-

static Style &

-

Obtains the label style.

-

GetBackgroundTransparentStyle ()

-

static Style &

-

Obtains the background transparent style.

-

GetProgressBackgroundStyle ()

-

static Style &

-

Obtains the progress background style.

-

GetProgressForegroundStyle ()

-

static Style &

-

Obtains the progress foreground style.

-

GetSliderKnobStyle ()

-

static Style &

-

Obtains the slider knob style.

-

GetPickerBackgroundStyle ()

-

static Style &

-

Obtains the picker background style.

-

GetPickerHighlightStyle ()

-

static Style &

-

Obtains the picker highlight style.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Surface.md b/api/api-SmartVision-Devices/OHOS-Surface.md deleted file mode 100755 index fa8e07e8571b9cf28f09fddac2a1e3288a059fe7..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Surface.md +++ /dev/null @@ -1,201 +0,0 @@ -# OHOS::Surface - -- [Overview](#section83217545165632) -- [Summary](#section1990804920165632) -- [Public Member Functions](#pub-methods) -- [Static Public Member Functions](#pub-static-methods) - -## **Overview** - -**Related Modules:** - -[Surface](Surface.md) - -**Description:** - -Defines the consumer listener used to notify consumers when the surface status is updated. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

~Surface ()

-

virtual

-

A destructor used to delete the Surface instance.

-

SetQueueSize (uint8_t queueSize)=0

-

virtual void

-

Sets the number of buffers that can be allocated to the surface. The default value is 1. The value range is [1, 10].

-

GetQueueSize ()=0

-

virtual uint8_t

-

Obtains the number of surface buffers that can be allocated to the surface. The default value is 1. The value range is [1, 10].

-

SetWidthAndHeight (uint32_t width, uint32_t height)=0

-

virtual void

-

Sets the width and height of the surface for calculating its stride and size. The default value range of width and height is (0,7680].

-

GetWidth ()=0

-

virtual uint32_t

-

Obtains the width of the surface.

-

GetHeight ()=0

-

virtual uint32_t

-

Obtains the height of the surface.

-

SetFormat (uint32_t format)=0

-

virtual void

-

Sets the pixel format of the surface. For details, see ImageFormat. The default pixel format is IMAGE_PIXEL_FORMAT_RGB565.

-

GetFormat ()=0

-

virtual uint32_t

-

Obtains the pixel format of the surface. For details, see ImageFormat. The default pixel format is IMAGE_PIXEL_FORMAT_RGB565.

-

SetStrideAlignment (uint32_t strideAlignment)=0

-

virtual void

-

Sets the number of bytes for stride alignment.

-

GetStrideAlignment ()=0

-

virtual uint32_t

-

Obtains the number of bytes for stride alignment. By default, 4-byte aligned is used.

-

GetStride ()=0

-

virtual uint32_t

-

Obtains the stride of the surface.

-

SetSize (uint32_t size)=0

-

virtual void

-

Sets the size of the shared memory to allocate.

-

GetSize ()=0

-

virtual uint32_t

-

Obtains the size of the shared memory to allocate.

-

SetUsage (uint32_t usage)=0

-

virtual void

-

Sets the usage scenario of the buffer. Physically contiguous memory and virtual memory (by default) are supported. By default, virtual memory is allocated.

-

GetUsage ()=0

-

virtual uint32_t

-

Obtains the usage scenario of the buffer. Physically contiguous memory and virtual memory are supported.

-

SetUserData (const std::string &key, const std::string &value)=0

-

virtual void

-

Sets surface user data, which is stored in the format of <key, value>.

-

GetUserData (const std::string &key)=0

-

virtual std::string

-

Obtains surface user data.

-

RequestBuffer (uint8_t wait=0)=0

-

virtual SurfaceBuffer *

-

Obtains a buffer to write data.

-

FlushBuffer (SurfaceBuffer *buffer)=0

-

virtual int32_t

-

Flushes a buffer to the dirty queue for consumers to use.

-

AcquireBuffer ()=0

-

virtual SurfaceBuffer *

-

Obtains a buffer.

-

ReleaseBuffer (SurfaceBuffer *buffer)=0

-

virtual bool

-

Releases the consumed buffer.

-

CancelBuffer (SurfaceBuffer *buffer)=0

-

virtual void

-

Releases a buffer to the free queue.

-

RegisterConsumerListener (IBufferConsumerListener &listener)=0

-

virtual void

-

Registers a consumer listener.

-

UnregisterConsumerListener ()=0

-

virtual void

-

Unregisters the consumer listener.

-
- -## Static Public Member Functions - - - - - - - - - - -

Function

-

Description

-

CreateSurface ()

-

static Surface *

-

A constructor used to create a Surface object for consumers to use.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-SurfaceBuffer.md b/api/api-SmartVision-Devices/OHOS-SurfaceBuffer.md deleted file mode 100755 index 24b52166667a842da87d414f4649cbd8929b8572..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-SurfaceBuffer.md +++ /dev/null @@ -1,86 +0,0 @@ -# OHOS::SurfaceBuffer - -- [Overview](#section977729523165633) -- [Summary](#section1163816034165633) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Surface](Surface.md) - -**Description:** - -Provides functions such as setting the virtual address, size, and additional attributes of shared memory. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

GetVirAddr () const =0

-

virtual void *

-

Obtains the virtual address of shared memory for producers and consumers.

-

GetPhyAddr () const =0

-

virtual uint64_t

-

Obtains the physical address of shared memory.

-

GetSize () const =0

-

virtual uint32_t

-

Obtains the size of shared memory.

-

SetSize (uint32_t size)=0

-

virtual void

-

Sets the size of shared memory.

-

SetInt32 (uint32_t key, int32_t value)=0

-

virtual int32_t

-

Sets an extra attribute value of the int32 type.

-

GetInt32 (uint32_t key, int32_t &value)=0

-

virtual int32_t

-

Obtains an extra attribute value of the int32 type.

-

SetInt64 (uint32_t key, int64_t value)=0

-

virtual int32_t

-

Sets an extra attribute value of the int64 type.

-

GetInt64 (uint32_t key, int64_t &value)=0

-

virtual int32_t

-

Obtains an extra attribute value of the int64 type.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-SysInfo-OnFPSChangedListener.md b/api/api-SmartVision-Devices/OHOS-SysInfo-OnFPSChangedListener.md deleted file mode 100755 index 498940d9d8dff068938878f142fafcd07f309b59..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-SysInfo-OnFPSChangedListener.md +++ /dev/null @@ -1,80 +0,0 @@ -# OHOS::SysInfo::OnFPSChangedListener - -- [Overview](#section1472841716165635) -- [Summary](#section1811819279165635) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Called when the FPS changes. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

OnFPSChangedListener ()

-

-

A constructor used to create an OnFPSChangedListener instance with the default sampling type FPS_CT_FIXED_TIME.

-

~OnFPSChangedListener ()

-

virtual

-

A destructor used to delete the OnFPSChangedListener instance.

-

OnFPSChanged (float newFPS)=0

-

virtual void

-

Called when the FPS data changes.

-

GetFPSCalculateType () const

-

FPSCalculateType

-

Obtains the FPS sampling type.

-

SetFPSCalculateType (FPSCalculateType type)

-

void

-

Sets the FPS sampling type.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-SysInfo.md b/api/api-SmartVision-Devices/OHOS-SysInfo.md deleted file mode 100755 index 96201826f985b9ab0d7901fde684bccdb9258a91..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-SysInfo.md +++ /dev/null @@ -1,86 +0,0 @@ -# OHOS::SysInfo - -- [Overview](#section86132521165635) -- [Summary](#section1337621223165635) -- [Data Structures](#nested-classes) -- [Public Types](#pub-types) -- [Static Public Member Functions](#pub-static-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Obtains the system information. Currently, the FPS information can be obtained. To enable the FPS feature, enable the **ENABLE\_FPS\_SUPPORT** macro. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

OnFPSChangedListener

-

Called when the FPS changes.

-
- -## Public Types - - - - - - - - - - -

Public Type Name

-

Description

-

FPSCalculateType { FPS_CT_FIXED_TIME, FPS_CT_AVERAGE_SAMPLING, FPS_CT_PRECISE_SAMPLING }

-

Enumerates the FPS capture types.

-
- -## Static Public Member Functions - - - - - - - - - - - - - -

Function

-

Description

-

GetFPS ()

-

static float

-

Obtains the FPS data.

-

RegisterFPSChangedListener (OnFPSChangedListener *onFPSChangedListener)

-

static void

-

Registers the listener for notifying the FPS changes.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Task.md b/api/api-SmartVision-Devices/OHOS-Task.md deleted file mode 100755 index 80e22a01564ab992a266b2c14cb8308a9fd831e7..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Task.md +++ /dev/null @@ -1,110 +0,0 @@ -# OHOS::Task - -- [Overview](#section1993709289165633) -- [Summary](#section1680911653165633) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Represents the **[Task](OHOS-Task.md)** class of the graphics module. This class provides functions for setting the running period and time of a task. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

Task ()

-

-

A constructor used to create a Task instance.

-

Task (uint32_t period)

-

-

A constructor used to create a Task instance with the specified running period.

-

~Task ()

-

virtual

-

A destructor used to delete the Task instance.

-

SetPeriod (uint32_t period)

-

void

-

Sets the running period for this task.

-

SetLastRun (uint32_t lastRun)

-

void

-

Sets the end time for this task.

-

GetPeriod () const

-

uint32_t

-

Obtains the running period of this task.

-

GetLastRun () const

-

uint32_t

-

Obtains the end time of this task.

-

TaskExecute ()

-

void

-

Executes this task.

-

Callback ()=0

-

virtual void

-

Called when this task is executed.

-

Init ()

-

virtual void

-

Initializes this task.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Text.md b/api/api-SmartVision-Devices/OHOS-Text.md deleted file mode 100755 index 3e24ff8a838dbe768db921643e46f516ef408307..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Text.md +++ /dev/null @@ -1,193 +0,0 @@ -# OHOS::Text - -- [Overview](#section287293264165633) -- [Summary](#section1477764112165633) -- [Public Member Functions](#pub-methods) -- [Static Public Attributes](#pub-static-attribs) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Represents the base class of **[Text](OHOS-Text.md)**, providing the text attribute setting and text drawing capabilities for components that require font display. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

Text ()

-

-

A constructor used to create a Text instance.

-

~Text ()

-

virtual

-

A destructor used to delete the Text instance.

-

SetText (const char *text)

-

void

-

Sets the content for this text.

-

GetText () const

-

const char *

-

Obtains the content of this text.

-

SetFont (const char *name, uint8_t size)

-

void

-

Sets the font name and size.

-

SetFontId (uint8_t fontId)

-

void

-

Sets the font ID.

-

GetFontId () const

-

uint8_t

-

Obtains the font ID.

-

SetDirect (UITextLanguageDirect direct)

-

void

-

Sets the direction for this text.

-

GetDirect () const

-

UITextLanguageDirect

-

Obtains the direction of this text.

-

SetAlign (UITextLanguageAlignment horizontalAlign, UITextLanguageAlignment verticalAlign=TEXT_ALIGNMENT_TOP)

-

void

-

Sets the alignment mode for this text.

-

GetHorAlign () const

-

UITextLanguageAlignment

-

Obtains the horizontal alignment mode.

-

GetVerAlign () const

-

UITextLanguageAlignment

-

Obtains the vertical alignment mode.

-

SetTextRotation (LabelRotateDegree angle)

-

void

-

Sets the clockwise rotation angle for this text.

-

GetTextRotation () const

-

LabelRotateDegree

-

Obtains the clockwise rotation degree of this text.

-

GetTextRotateDegree () const

-

uint16_t

-

Obtains the number of text rotation degrees.

-

GetTextSize () const

-

Point

-

Obtains the size of this text.

-

SetExpandWidth (bool expand)

-

void

-

Sets whether to adapt the component width to this text.

-

IsExpandWidth () const

-

bool

-

Checks whether the component width adapts to this text.

-

SetExpandHeight (bool expand)

-

void

-

Sets whether to adapt the component height to this text.

-

IsExpandHeight () const

-

bool

-

Checks whether the component height adapts to this text.

-

GetEllipsisIndex (const Rect &textRect, const Style &style)

-

uint16_t

-

Obtains the index of the character from where text will be replaced by ellipses based on the text rectangle and style.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- -## Static Public Attributes - - - - - - - - - - -

Static Public Attribute Name

-

Description

-

TEXT_ELLIPSIS_END_INV = 0xFFFF

-
 
- diff --git a/api/api-SmartVision-Devices/OHOS-TextAdapter.md b/api/api-SmartVision-Devices/OHOS-TextAdapter.md deleted file mode 100755 index 4275dc0f28f15c618f066f59dbd3840e111c87b1..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-TextAdapter.md +++ /dev/null @@ -1,158 +0,0 @@ -# OHOS::TextAdapter - -- [Overview](#section1319751186165633) -- [Summary](#section927771271165633) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines a text adapter, which implements [UILabel](OHOS-UILabel.md) instance construction and supports text data and continuous integer data. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

TextAdapter ()

-

-

A constructor used to create a UILabel instance.

-

~TextAdapter ()

-

virtual

-

A destructor used to delete the UILabel instance.

-

GetView (UIView *inView, int16_t index) override

-

UIView *

-

Obtains a UILabel instance to convert adapter data into another UILabel instance.

-

SetData (List< const char * > *data)

-

void

-

Sets the UILabel adapter data, which is a string linked list.

-

SetData (int16_t start, int16_t end)

-

void

-

Sets continuously increasing data. For example, if you need to set data 0, 1, 2, 3, 4, use this function to set start to 0 and end to 4.

-

SetFontId (uint8_t fontId)

-

void

-

Sets font ID.

-

GetFontId () const

-

uint8_t

-

Obtains font ID.

-

SetFont (const char *name, uint8_t size)

-

void

-

Sets the font.

-

GetStyle ()

-

Style &

-

Obtains the UILabel adapter style.

-

GetCount () override

-

virtual uint16_t

-

Obtains the data size of the UILabel adapter.

-

SetWidth (int16_t width)

-

void

-

Sets the width of UILabel constructed by the adapter.

-

SetDirect (UITextLanguageDirect direct)

-

void

-

Sets the direction of the UILabel constructed by the adapter.

-

SetHeight (int16_t height)

-

void

-

Sets the height of the UILabel constructed by the adapter.

-

SetLineBreakMode (const uint8_t lineBreakMode)

-

void

-

Sets the LineBreakMode attribute of UILabel constructed by the adapter. For details about the values of LineBreakMode, see LINE_BREAK_ADAPT, LINE_BREAK_WRAP, LINE_BREAK_ELLIPSIS, and LINE_BREAK_MARQUEE.

-

SetOnClickListener (UIView::OnClickListener *clickListener)

-

void

-

Sets the callback function to be invoked upon a click event.

-

SetTextFormatter (TextFormatter *formatter)

-

void

-

Sets the text formatter.

-

AbstractAdapter ()

-

-

A constructor used to create an AbstractAdapter instance.

-

~AbstractAdapter ()

-

virtual

-

A destructor used to delete the AbstractAdapter instance.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-TextFormatter.md b/api/api-SmartVision-Devices/OHOS-TextFormatter.md deleted file mode 100755 index 641e29dab4284bcd25856422b34618e56c5d2f75..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-TextFormatter.md +++ /dev/null @@ -1,56 +0,0 @@ -# OHOS::TextFormatter - -- [Overview](#section262028324165633) -- [Summary](#section596230424165633) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines a text formatter. You can inherit this class and implement the **[Format\(\)](Graphic.md#ga183cac282667493fa2a008f9a7f4f9d2)** function. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - -

Function

-

Description

-

Format (int16_t value, char *outText, uint16_t textLen)

-

virtual bool

-

Converts the input integer into a character string for output.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Theme.md b/api/api-SmartVision-Devices/OHOS-Theme.md deleted file mode 100755 index 15b5a1a96f4ac79c955c804363165d1920cd1f2f..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Theme.md +++ /dev/null @@ -1,110 +0,0 @@ -# OHOS::Theme - -- [Overview](#section1834621195165635) -- [Summary](#section1926324161165635) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines the theme class used to define the functions related to the styles of different components. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

Theme ()

-

-

A constructor used to create a Theme instance.

-

~Theme ()

-

virtual

-

A destructor used to delete the Theme instance.

-

GetMainStyle ()

-

Style &

-

Obtains the basic style.

-

GetButtonStyle ()

-

ButtonStyle &

-

Obtains the style of this button.

-

GetLabelStyle ()

-

Style &

-

Obtains the style of this label.

-

GetPickerBackgroundStyle ()

-

Style &

-

Obtains the background style of this picker.

-

GetPickerHighlightStyle ()

-

Style &

-

Obtains the highlight style of this picker.

-

GetProgressBackgroundStyle ()

-

Style &

-

Obtains the background style of this progress bar.

-

GetProgressForegroundStyle ()

-

Style &

-

Obtains the foreground style of this progress bar.

-

GetSliderKnobStyle ()

-

Style &

-

Obtains the style of this slider knob.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-ThemeManager.md b/api/api-SmartVision-Devices/OHOS-ThemeManager.md deleted file mode 100755 index 7922eba97151af2c7424647795ec8fcb6bd70432..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-ThemeManager.md +++ /dev/null @@ -1,81 +0,0 @@ -# OHOS::ThemeManager - -- [Overview](#section2010334454165635) -- [Summary](#section236495670165635) -- [Public Member Functions](#pub-methods) -- [Static Public Member Functions](#pub-static-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Declares the singleton class used to manage the current screen theme of an application. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

SetCurrent (Theme *theme)

-

void

-

Sets the current screen theme for this application.

-

GetCurrent ()

-

Theme *

-

Obtains the current screen theme of this application.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- -## Static Public Member Functions - - - - - - - - - - -

Function

-

Description

-

GetInstance ()

-

static ThemeManager &

-

Obtains the singleton instance of the ThemeManager class.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-TransformMap.md b/api/api-SmartVision-Devices/OHOS-TransformMap.md deleted file mode 100755 index 9f71125050980a42d5d6549ca7bbe96a7b1217a9..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-TransformMap.md +++ /dev/null @@ -1,116 +0,0 @@ -# OHOS::TransformMap - -- [Overview](#section1211423715165635) -- [Summary](#section827625912165635) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Transforms a rectangle, including rotation and scaling. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

TransformMap ()

-

-

The default constructor used to create a TransformMap instance.

-

TransformMap (const Rect &rect)

-

-

A constructor used to create a TransformMap instance.

-

~TransformMap ()

-

-

A destructor used to delete the TransformMap instance.

-

GetClockWise () const

-

bool

-

Checks whether the vertex coordinates of a polygon are clockwise.

-

SetPolygon (const Polygon &polygon)

-

void

-

Sets a polygon after rectangle transformation.

-

GetPolygon () const

-

Polygon

-

Obtains the polygon after rectangle transformation.

-

GetPivot () const

-

Point

-

Obtains the pivot for the rotation or scaling operation.

-

IsInvalid () const

-

bool

-

Checks whether the TransformMap instance is invalid. When the vertices are all 0, the TransformMap is invalid.

-

GetBoxRect () const

-

Rect

-

Obtains the minimum rectangle that can contain a polygon. All vertices of the polygon are inside this rectangle.

-

Rotate (int16_t angle, const Vector2< int16_t > &pivot)

-

void

-

Rotates the rectangle.

-

Scale (const Vector2< float > scale, const Vector2< int16_t > &pivot)

-

void

-

Scales the rectangle.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-TtfHeader.md b/api/api-SmartVision-Devices/OHOS-TtfHeader.md deleted file mode 100755 index 948e269ab50ed80a2834e879d1b2762932123c44..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-TtfHeader.md +++ /dev/null @@ -1,2 +0,0 @@ -# OHOS::TtfHeader - diff --git a/api/api-SmartVision-Devices/OHOS-UIAbstractClock.md b/api/api-SmartVision-Devices/OHOS-UIAbstractClock.md deleted file mode 100755 index 5da634db97c07328039d7eb088aff0b59da9a066..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UIAbstractClock.md +++ /dev/null @@ -1,847 +0,0 @@ -# OHOS::UIAbstractClock - -- [Overview](#section224969549165633) -- [Summary](#section2086266185165633) -- [Public Types](#pub-types) -- [Public Member Functions](#pub-methods) -- [Static Public Attributes](#pub-static-attribs) -- [Protected Attributes](#pro-attribs) -- [Additional Inherited Members](#inherited) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -An abstract class that contains functions for converting units of time \(hour, minute, and second\), setting and obtaining the time. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Types - - - - - - - - - - -

Public Type Name

-

Description

-

WorkMode { ALWAYS_ON, NORMAL }

-

Enumerates the working modes of this clock.

-
- -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

UIAbstractClock ()

-

-

A default constructor used to create a UIAbstractClock instance.

-

UIAbstractClock (uint8_t hour, uint8_t minute, uint8_t second)

-

-

A constructor used to create a UIAbstractClock instance with time elements (hour, minute and second).

-

~UIAbstractClock ()

-

virtual

-

A destructor used to delete the UIAbstractClock instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

SetTime24Hour (uint8_t hour, uint8_t minute, uint8_t second)

-

void

-

Sets the time in 24-hour format.

-

SetTime12Hour (uint8_t hour, uint8_t minute, uint8_t second, bool am)

-

void

-

Sets the time in 12-hour format.

-

GetCurrentHour () const

-

uint8_t

-

Obtains the current number of hours.

-

GetCurrentMinute () const

-

uint8_t

-

Obtains the current number of minutes.

-

GetCurrentSecond () const

-

uint8_t

-

Obtains the current number of seconds.

-

IncOneSecond ()

-

void

-

Increases the time by one second.

-

UpdateClock (bool clockInit)

-

virtual void

-

Updates this clock.

-

SetWorkMode (WorkMode newMode)

-

virtual void

-

Sets the working mode for this clock.

-

GetWorkMode () const

-

virtual WorkMode

-

Obtains the working mode of this clock.

-

UIViewGroup ()

-

-

A default constructor used to create a UIViewGroup instance.

-

~UIViewGroup ()

-

virtual

-

A destructor used to delete the UIViewGroup instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

Add (UIView *view)

-

virtual void

-

Adds a child view.

-

Insert (UIView *prevView, UIView *insertView)

-

virtual void

-

Inserts a new child view behind the current one.

-

Remove (UIView *view)

-

virtual void

-

Removes a child view.

-

RemoveAll ()

-

virtual void

-

Removes all child views.

-

GetTargetView (const Point &point, UIView **last) override

-

virtual void

-

Obtains the target child view that is visible and can respond to touch events based on given coordinates.

-

MoveChildByOffset (int16_t x, int16_t y)

-

virtual void

-

Moves all child views.

-

GetChildrenHead () const

-

UIView *

-

Obtains the first child view in this view group.

-

GetChildrenTail () const

-

UIView *

-

Obtains the last child view in this view group.

-

SetDisallowIntercept (bool flag)

-

void

-

Sets whether this view group is intercepted upon touch events.

-

GetChildById (const char *id) const override

-

UIView *

-

Obtains the target child view with a specified ID.

-

SetAutoSize (bool state)

-

void

-

Sets whether the size of this view group is adaptive to that of all child views.

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnPreDraw (const Rect &invalidatedArea)

-

virtual bool

-

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

-

OnDraw (const Rect &invalidatedArea)

-

virtual void

-

Called when a view is drawn.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void

-

Called after a view is drawn.

-

ReMeasure ()

-

virtual void

-

Remeasures the view size.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool

-

Called when the view stops dragging.

-

OnClickEvent (const ClickEvent &event)

-

virtual void

-

Called when the view is clicked.

-

OnPressEvent (const PressEvent &event)

-

virtual void

-

Called when the view is pressed.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void

-

Sets whether the view is visible.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

SetWidth (int16_t width)

-

virtual void

-

Sets the width for the view.

-

GetWidth ()

-

virtual int16_t

-

Obtains the width for the view.

-

SetHeight (int16_t height)

-

virtual void

-

Sets the height for the view.

-

GetHeight ()

-

virtual int16_t

-

Obtains the height for the view.

-

Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- -## Static Public Attributes - - - - - - - - - - - - - - - - - - - -

Static Public Attribute Name

-

Description

-

ONE_MINUTE_IN_SECOND = 60

-

Represents 60 seconds per minute.

-

ONE_HOUR_IN_MINUTE = 60

-

Represents 60 minutes per hour.

-

ONE_DAY_IN_HOUR = 24

-

Represents 24 hours per day.

-

HALF_DAY_IN_HOUR = 12

-

Represents 12 hours every half day.

-
- -## Protected Attributes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Protected Attribute Name

-

Description

-

currentHour_

-

Represents the current number of hours.

-

currentMinute_

-

Represents the current number of minutes.

-

currentSecond_

-

Represents the current number of seconds.

-

mode_

-

Represents the current working mode of this clock.

-

childrenHead_

-

Indicates the pointer to the first child view of this view group.

-

childrenTail_

-

Indicates the pointer to the last child view of this view group.

-

childrenNum_

-

Represents the number of child views.

-

isDragging_

-

Specifies the sliding state of this view group.

-

disallowIntercept_

-

Specifies whether this view group is intercepted upon touch events.

-

isAutoSize_

-

Specifies whether the size of this view group is adaptive to that of all child views.

-
- -## Additional Inherited Members - - - - - - - - - - - - - -

Additional Inherited Member Name

-

Description

-

GetAllChildRelativeRect () const

-

Obtains the rectangle area of a new view group after being adaptive to the size of all child views.

-

OnChildChanged ()

-

Performs operations needed after a child view is added or removed.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UIAbstractProgress.md b/api/api-SmartVision-Devices/OHOS-UIAbstractProgress.md deleted file mode 100755 index a5f2414f54e4deacfd1c23e97323a16a73baca57..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UIAbstractProgress.md +++ /dev/null @@ -1,695 +0,0 @@ -# OHOS::UIAbstractProgress - -- [Overview](#section1542664288165633) -- [Summary](#section346208303165633) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Represents the abstract base class which provides functions related to the progress bar. - -See also -: [UIView](OHOS-UIView.md) - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

UIAbstractProgress ()

-

-

A constructor used to create a UIAbstractProgress instance.

-

~UIAbstractProgress ()

-

virtual

-

A destructor used to delete the UIAbstractProgress instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the component type.

-

EnableBackground (bool enable)

-

void

-

Sets whether the background of the progress bar is visible.

-

SetValue (int16_t value)

-

void

-

Sets the current value for this progress bar.

-

GetValue () const

-

int16_t

-

Obtains the current value of this progress bar.

-

SetRange (int16_t rangeMax, int16_t rangeMin)

-

void

-

Sets the range for this progress bar.

-

GetRangeMin () const

-

int16_t

-

Obtains the minimum value of this progress bar.

-

GetRangeMax () const

-

int16_t

-

Obtains the maximum value of this progress bar.

-

SetImage (const char *foregroundImage, const char *backgroundImage=nullptr)

-

void

-

Sets the image for this progress bar.

-

SetImage (const ImageInfo *foregroundImage, const ImageInfo *backgroundImage=nullptr)

-

void

-

Sets the image as a pixel map for this progress bar.

-

SetStep (uint16_t step)

-

void

-

Sets the step for this progress bar.

-

GetStep () const

-

uint16_t

-

Obtains the current step of this progress bar.

-

SetBackgroundStyle (const Style &style)

-

void

-

Sets the background style for this progress bar.

-

SetBackgroundStyle (uint8_t key, int64_t value)

-

void

-

Sets a background style for this progress bar.

-

GetBackgroundStyle () const

-

const Style &

-

Obtains the background style of this progress bar.

-

GetBackgroundStyle (uint8_t key) const

-

int64_t

-

Obtains the value of a background style of this progress bar.

-

SetForegroundStyle (const Style &style)

-

void

-

Sets the foreground style for this progress bar.

-

SetForegroundStyle (uint8_t key, int64_t value)

-

void

-

Sets a foreground style for this progress bar.

-

GetForegroundStyle () const

-

const Style &

-

Obtains the foreground style of this progress bar.

-

GetForegroundStyle (uint8_t key) const

-

int64_t

-

Obtains the value of a foreground style of this progress bar.

-

SetCapType (CapType cap)

-

void

-

Sets the type of caps on the background and foreground of the progress bar.

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnPreDraw (const Rect &invalidatedArea)

-

virtual bool

-

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

-

OnDraw (const Rect &invalidatedArea)

-

virtual void

-

Called when a view is drawn.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void

-

Called after a view is drawn.

-

ReMeasure ()

-

virtual void

-

Remeasures the view size.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool

-

Called when the view stops dragging.

-

OnClickEvent (const ClickEvent &event)

-

virtual void

-

Called when the view is clicked.

-

OnPressEvent (const PressEvent &event)

-

virtual void

-

Called when the view is pressed.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

GetTargetView (const Point &point, UIView **last)

-

virtual void

-

Obtains the top-level view based on specified coordinates.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void

-

Sets whether the view is visible.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

SetWidth (int16_t width)

-

virtual void

-

Sets the width for the view.

-

GetWidth ()

-

virtual int16_t

-

Obtains the width for the view.

-

SetHeight (int16_t height)

-

virtual void

-

Sets the height for the view.

-

GetHeight ()

-

virtual int16_t

-

Obtains the height for the view.

-

Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

GetChildById (const char *id) const

-

virtual UIView *

-

Obtains the child view of a specified ID.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UIAbstractScroll.md b/api/api-SmartVision-Devices/OHOS-UIAbstractScroll.md deleted file mode 100755 index 2a598d3ef9cb91abee4732f1c23a6b5471035dbf..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UIAbstractScroll.md +++ /dev/null @@ -1,769 +0,0 @@ -# OHOS::UIAbstractScroll - -- [Overview](#section219622185165633) -- [Summary](#section1189512298165633) -- [Public Member Functions](#pub-methods) -- [Additional Inherited Members](#inherited) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines the attributes of a scroll, including the scroll direction, blank size of a scroll view, velocity and effects of a scroll animation. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

UIAbstractScroll ()

-

-

A constructor used to create a UIAbstractScroll instance.

-

~UIAbstractScroll ()

-

virtual

-

A destructor used to delete the UIAbstractScroll instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

GetDirection () const

-

uint8_t

-

Obtains the scroll direction.

-

SetScrollBlankSize (uint16_t size)

-

void

-

Sets the blank size for this scroll view.

-

SetMaxScrollDistance (uint16_t distance)

-

void

-

Sets the maximum scroll distance after a finger lifts the screen.

-

SetReboundSize (uint16_t size)

-

void

-

Sets the rebound size, which is the distance a knob moves after being released when it reaches the end of a scrollbar.

-

GetMaxScrollDistance () const

-

uint16_t

-

Obtains the maximum scroll distance after a finger lifts the screen.

-

SetDragFunc (EasingFunc func)

-

void

-

Sets the easing function that specifies a scroll animation after a finger lifts the screen.

-

SetThrowDrag (bool throwDrag)

-

void

-

Sets whether to continue scrolling after a finger lifts the screen.

-

MoveChildByOffset (int16_t offsetX, int16_t offsetY) override

-

void

-

Moves the position of all child views.

-

SetDragACCLevel (uint16_t value)

-

void

-

Sets the drag acceleration.

-

GetDragACCLevel () const

-

uint8_t

-

Obtains the drag acceleration.

-

SetSwipeACCLevel (uint16_t value)

-

void

-

Sets the compensation distance after a finger lifts the screen.

-

GetSwipeACCLevel () const

-

uint8_t

-

Obtains the compensation distance after a finger lifts the screen.

-

UIViewGroup ()

-

-

A default constructor used to create a UIViewGroup instance.

-

~UIViewGroup ()

-

virtual

-

A destructor used to delete the UIViewGroup instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

Add (UIView *view)

-

virtual void

-

Adds a child view.

-

Insert (UIView *prevView, UIView *insertView)

-

virtual void

-

Inserts a new child view behind the current one.

-

Remove (UIView *view)

-

virtual void

-

Removes a child view.

-

RemoveAll ()

-

virtual void

-

Removes all child views.

-

GetTargetView (const Point &point, UIView **last) override

-

virtual void

-

Obtains the target child view that is visible and can respond to touch events based on given coordinates.

-

GetChildrenHead () const

-

UIView *

-

Obtains the first child view in this view group.

-

GetChildrenTail () const

-

UIView *

-

Obtains the last child view in this view group.

-

SetDisallowIntercept (bool flag)

-

void

-

Sets whether this view group is intercepted upon touch events.

-

GetChildById (const char *id) const override

-

UIView *

-

Obtains the target child view with a specified ID.

-

SetAutoSize (bool state)

-

void

-

Sets whether the size of this view group is adaptive to that of all child views.

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnPreDraw (const Rect &invalidatedArea)

-

virtual bool

-

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

-

OnDraw (const Rect &invalidatedArea)

-

virtual void

-

Called when a view is drawn.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void

-

Called after a view is drawn.

-

ReMeasure ()

-

virtual void

-

Remeasures the view size.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool

-

Called when the view stops dragging.

-

OnClickEvent (const ClickEvent &event)

-

virtual void

-

Called when the view is clicked.

-

OnPressEvent (const PressEvent &event)

-

virtual void

-

Called when the view is pressed.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void

-

Sets whether the view is visible.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

SetWidth (int16_t width)

-

virtual void

-

Sets the width for the view.

-

GetWidth ()

-

virtual int16_t

-

Obtains the width for the view.

-

SetHeight (int16_t height)

-

virtual void

-

Sets the height for the view.

-

GetHeight ()

-

virtual int16_t

-

Obtains the height for the view.

-

Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- -## Additional Inherited Members - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Additional Inherited Member Name

-

Description

-

GetAllChildRelativeRect () const

-

Obtains the rectangle area of a new view group after being adaptive to the size of all child views.

-

OnChildChanged ()

-

Performs operations needed after a child view is added or removed.

-

childrenHead_

-

Indicates the pointer to the first child view of this view group.

-

childrenTail_

-

Indicates the pointer to the last child view of this view group.

-

childrenNum_

-

Represents the number of child views.

-

isDragging_

-

Specifies the sliding state of this view group.

-

disallowIntercept_

-

Specifies whether this view group is intercepted upon touch events.

-

isAutoSize_

-

Specifies whether the size of this view group is adaptive to that of all child views.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UIAnalogClock-Hand.md b/api/api-SmartVision-Devices/OHOS-UIAnalogClock-Hand.md deleted file mode 100755 index 920349b78bfb47042bc7b0ebaf1172f0479166f2..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UIAnalogClock-Hand.md +++ /dev/null @@ -1,153 +0,0 @@ -# OHOS::UIAnalogClock::Hand - -- [Overview](#section1493720273165633) -- [Summary](#section505005179165633) -- [Public Member Functions](#pub-methods) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines the basic attributes of the analog clock hands. This is an inner class of **[UIAbstractClock](OHOS-UIAbstractClock.md)**. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

Hand ()

-

-

A default constructor used to create a Hand instance.

-

~Hand ()

-

virtual

-

A destructor used to delete the Hand instance.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

center_

-

Point

-

Represents the rotation center of a clock hand.

-

initAngle_

-

uint16_t

-

Represents the initial clockwise rotation angle of a clock hand. The default value is 0, indicating that the hand direction is vertically upward.

-

preAngle_

-

uint16_t

-

Represents the latest rotation angle of this clock hand.

-

nextAngle_

-

uint16_t

-

Represents the next rotation angle of this clock hand.

-

position_

-

Point

-

Represents the position of a hand on this analog clock.

-

imageInfo_

-

ImageInfo

-

Represents the image information of this clock hand.

-

trans_

-

TransformMap

-

Represents the information about the rotation and translation of this clock hand.

-

target_

-

Rect

-

Represents the new rectangle area after the rotation and translation.

-

color_

-

ColorType

-

Represents the color of this clock hand.

-

width_

-

uint16_t

-

Represents the width of this clock hand.

-

height_

-

uint16_t

-

Represents the height of this clock hand.

-

opacity_

-

OpacityType

-

Represents the opacity of this clock hand.

-

drawtype_

-

DrawType

-

Represents the drawing type of this clock hand.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UIAnalogClock.md b/api/api-SmartVision-Devices/OHOS-UIAnalogClock.md deleted file mode 100755 index 9769c7894402d9b33972b00300f2420a214700cb..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UIAnalogClock.md +++ /dev/null @@ -1,912 +0,0 @@ -# OHOS::UIAnalogClock - -- [Overview](#section750660902165633) -- [Summary](#section305876497165633) -- [Data Structures](#nested-classes) -- [Public Types](#pub-types) -- [Public Member Functions](#pub-methods) -- [Additional Inherited Members](#inherited) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Provides the functions related to an analog clock. - -See also -: [UIAbstractClock](OHOS-UIAbstractClock.md) - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

Hand

-

Defines the basic attributes of the analog clock hands. This is an inner class of UIAbstractClock.

-
- -## Public Types - - - - - - - - - - - - - - - - -

Public Type Name

-

Description

-

HandType { HandType::HOUR_HAND, HandType::MINUTE_HAND, HandType::SECOND_HAND }

-

Enumerates the clock hand types.

-

DrawType { DrawType::DRAW_LINE, DrawType::DRAW_IMAGE }

-

Enumerates the drawing types of a clock hand.

-

WorkMode { ALWAYS_ON, NORMAL }

-

Enumerates the working modes of this clock.

-
- -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

UIAnalogClock ()

-

-

A default constructor used to create a UIAnalogClock instance.

-

~UIAnalogClock ()

-

virtual

-

A destructor used to delete the UIAnalogClock instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

SetHandImage (HandType type, const UIImageView &img, Point position, Point center)

-

void

-

Sets the image used to draw a clock hand.

-

SetHandLine (HandType type, Point position, Point center, ColorType color, uint16_t width, uint16_t height, OpacityType opacity)

-

void

-

Sets the line used to draw a clock hand.

-

GetHandRotateCenter (HandType type) const

-

Point

-

Obtains the rotation center of a specified clock hand.

-

GetHandPosition (HandType type) const

-

Point

-

Obtains the position of a specified clock hand.

-

GetHandInitAngle (HandType type) const

-

uint16_t

-

Obtains the initial rotation angle of the specified clock hand.

-

GetHandCurrentAngle (HandType type) const

-

uint16_t

-

Obtains the current rotation angle of the specified clock hand.

-

SetInitTime24Hour (uint8_t hour, uint8_t minute, uint8_t second)

-

void

-

Sets the initial time in the 24-hour format.

-

SetInitTime12Hour (uint8_t hour, uint8_t minute, uint8_t second, bool am)

-

void

-

Sets the initial time in the 12-hour format.

-

OnDraw (const Rect &invalidatedArea) override

-

void

-

Draws an analog clock.

-

OnPostDraw (const Rect &invalidatedArea) override

-

virtual void

-

Performs the operations needed after the drawing.

-

SetPosition (int16_t x, int16_t y) override

-

void

-

Sets the position for this analog clock.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height) override

-

void

-

Sets the position and size for this analog clock.

-

SetWorkMode (WorkMode newMode) override

-

void

-

Sets the working mode for this analog clock.

-

UpdateClock (bool clockInit) override

-

void

-

Updates the time of this analog clock.

-

UIAbstractClock ()

-

-

A default constructor used to create a UIAbstractClock instance.

-

UIAbstractClock (uint8_t hour, uint8_t minute, uint8_t second)

-

-

A constructor used to create a UIAbstractClock instance with time elements (hour, minute and second).

-

~UIAbstractClock ()

-

virtual

-

A destructor used to delete the UIAbstractClock instance.

-

SetTime24Hour (uint8_t hour, uint8_t minute, uint8_t second)

-

void

-

Sets the time in 24-hour format.

-

SetTime12Hour (uint8_t hour, uint8_t minute, uint8_t second, bool am)

-

void

-

Sets the time in 12-hour format.

-

GetCurrentHour () const

-

uint8_t

-

Obtains the current number of hours.

-

GetCurrentMinute () const

-

uint8_t

-

Obtains the current number of minutes.

-

GetCurrentSecond () const

-

uint8_t

-

Obtains the current number of seconds.

-

IncOneSecond ()

-

void

-

Increases the time by one second.

-

GetWorkMode () const

-

virtual WorkMode

-

Obtains the working mode of this clock.

-

UIViewGroup ()

-

-

A default constructor used to create a UIViewGroup instance.

-

~UIViewGroup ()

-

virtual

-

A destructor used to delete the UIViewGroup instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

Add (UIView *view)

-

virtual void

-

Adds a child view.

-

Insert (UIView *prevView, UIView *insertView)

-

virtual void

-

Inserts a new child view behind the current one.

-

Remove (UIView *view)

-

virtual void

-

Removes a child view.

-

RemoveAll ()

-

virtual void

-

Removes all child views.

-

GetTargetView (const Point &point, UIView **last) override

-

virtual void

-

Obtains the target child view that is visible and can respond to touch events based on given coordinates.

-

MoveChildByOffset (int16_t x, int16_t y)

-

virtual void

-

Moves all child views.

-

GetChildrenHead () const

-

UIView *

-

Obtains the first child view in this view group.

-

GetChildrenTail () const

-

UIView *

-

Obtains the last child view in this view group.

-

SetDisallowIntercept (bool flag)

-

void

-

Sets whether this view group is intercepted upon touch events.

-

GetChildById (const char *id) const override

-

UIView *

-

Obtains the target child view with a specified ID.

-

SetAutoSize (bool state)

-

void

-

Sets whether the size of this view group is adaptive to that of all child views.

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnPreDraw (const Rect &invalidatedArea)

-

virtual bool

-

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

-

ReMeasure ()

-

virtual void

-

Remeasures the view size.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool

-

Called when the view stops dragging.

-

OnClickEvent (const ClickEvent &event)

-

virtual void

-

Called when the view is clicked.

-

OnPressEvent (const PressEvent &event)

-

virtual void

-

Called when the view is pressed.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void

-

Sets whether the view is visible.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

SetWidth (int16_t width)

-

virtual void

-

Sets the width for the view.

-

GetWidth ()

-

virtual int16_t

-

Obtains the width for the view.

-

SetHeight (int16_t height)

-

virtual void

-

Sets the height for the view.

-

GetHeight ()

-

virtual int16_t

-

Obtains the height for the view.

-

Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- -## Additional Inherited Members - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Additional Inherited Member Name

-

Description

-

ONE_MINUTE_IN_SECOND = 60

-

Represents 60 seconds per minute.

-

ONE_HOUR_IN_MINUTE = 60

-

Represents 60 minutes per hour.

-

ONE_DAY_IN_HOUR = 24

-

Represents 24 hours per day.

-

HALF_DAY_IN_HOUR = 12

-

Represents 12 hours every half day.

-

GetAllChildRelativeRect () const

-

Obtains the rectangle area of a new view group after being adaptive to the size of all child views.

-

OnChildChanged ()

-

Performs operations needed after a child view is added or removed.

-

currentHour_

-

Represents the current number of hours.

-

currentMinute_

-

Represents the current number of minutes.

-

currentSecond_

-

Represents the current number of seconds.

-

mode_

-

Represents the current working mode of this clock.

-

childrenHead_

-

Indicates the pointer to the first child view of this view group.

-

childrenTail_

-

Indicates the pointer to the last child view of this view group.

-

childrenNum_

-

Represents the number of child views.

-

isDragging_

-

Specifies the sliding state of this view group.

-

disallowIntercept_

-

Specifies whether this view group is intercepted upon touch events.

-

isAutoSize_

-

Specifies whether the size of this view group is adaptive to that of all child views.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UIArcLabel-ArcTextInfo.md b/api/api-SmartVision-Devices/OHOS-UIArcLabel-ArcTextInfo.md deleted file mode 100755 index a9a0c65c64c159a9b040be649290695d63ead85c..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UIArcLabel-ArcTextInfo.md +++ /dev/null @@ -1,14 +0,0 @@ -# OHOS::UIArcLabel::ArcTextInfo - -- [Overview](#section384414866165633) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Stores the attribute information about this arc text to draw. - diff --git a/api/api-SmartVision-Devices/OHOS-UIArcLabel.md b/api/api-SmartVision-Devices/OHOS-UIArcLabel.md deleted file mode 100755 index 4fbc2ad50359f9f84e4b9d60fe2d92cc6eca2a53..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UIArcLabel.md +++ /dev/null @@ -1,710 +0,0 @@ -# OHOS::UIArcLabel - -- [Overview](#section934570625165633) -- [Summary](#section848097230165633) -- [Data Structures](#nested-classes) -- [Public Types](#pub-types) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines functions related to an arc label. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

ArcTextInfo

-

Stores the attribute information about this arc text to draw.

-
- -## Public Types - - - - - - - - - - -

Public Type Name

-

Description

-

TextOrientation : uint8_t { TextOrientation::INSIDE, TextOrientation::OUTSIDE }

-

Enumerates text orientations.

-
- -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

UIArcLabel ()

-

-

A default constructor used to create a UIArcLabel instance.

-

~UIArcLabel ()

-

virtual

-

A destructor used to delete the UIArcLabel instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

GetWidth () override

-

int16_t

-

Obtains the width of this arc text.

-

GetHeight () override

-

int16_t

-

Obtains the height of this arc text.

-

SetText (const char *text)

-

void

-

Sets the text content for this arc label.

-

GetText () const

-

const char *

-

Obtains the text of this arc label.

-

SetAlign (UITextLanguageAlignment horizontalAlign)

-

void

-

Sets the alignment mode for this text.

-

GetHorAlign () const

-

UITextLanguageAlignment

-

Obtains the horizontal alignment mode.

-

GetDirect ()

-

UITextLanguageDirect

-

Obtains the direction of this text.

-

SetFontId (uint8_t fontId)

-

void

-

Sets the font ID for this arc label.

-

GetFontId () const

-

uint8_t

-

Obtains the font ID composed of font name and size.

-

SetFont (const char *name, uint8_t size)

-

void

-

Sets the font for this arc label.

-

SetArcTextCenter (int16_t x, int16_t y)

-

void

-

Sets the center position for this arc text.

-

GetArcTextCenter () const

-

Point

-

Obtains the center position of this arc text.

-

SetArcTextRadius (uint16_t radius)

-

void

-

Sets the radius for this arc text.

-

GetArcTextRadius () const

-

uint16_t

-

Obtains the radius of this arc text.

-

SetArcTextAngle (int16_t startAngle, int16_t endAngle)

-

void

-

Sets the start angle and end angle for this arc text.

-

GetArcTextStartAngle () const

-

int16_t

-

Obtains the start angle of this arc text.

-

GetArcTextEndAngle () const

-

int16_t

-

Obtains the end angle of this arc text.

-

SetArcTextOrientation (TextOrientation orientation)

-

void

-

Sets the orientation for this arc text.

-

GetArcTextOrientation () const

-

TextOrientation

-

Obtains the orientation of this arc text.

-

OnDraw (const Rect &invalidatedArea) override

-

virtual void

-

Draws an arc text.

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnPreDraw (const Rect &invalidatedArea)

-

virtual bool

-

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void

-

Called after a view is drawn.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool

-

Called when the view stops dragging.

-

OnClickEvent (const ClickEvent &event)

-

virtual void

-

Called when the view is clicked.

-

OnPressEvent (const PressEvent &event)

-

virtual void

-

Called when the view is pressed.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

GetTargetView (const Point &point, UIView **last)

-

virtual void

-

Obtains the top-level view based on specified coordinates.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void

-

Sets whether the view is visible.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

SetWidth (int16_t width)

-

virtual void

-

Sets the width for the view.

-

SetHeight (int16_t height)

-

virtual void

-

Sets the height for the view.

-

Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

GetChildById (const char *id) const

-

virtual UIView *

-

Obtains the child view of a specified ID.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UIAxis.md b/api/api-SmartVision-Devices/OHOS-UIAxis.md deleted file mode 100755 index 527ed563b55282f37ba2ed9caf36cd15caa2258e..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UIAxis.md +++ /dev/null @@ -1,727 +0,0 @@ -# OHOS::UIAxis - -- [Overview](#section1917449989165633) -- [Summary](#section1016908688165633) -- [Public Member Functions](#pub-methods) -- [Additional Inherited Members](#inherited) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Represents the coordinate axis base class, which defines the basic attributes of coordinate axis, sets whether a coordinate axis is visible, and sets the number of scales on a coordinate axis. This class is used in [UIChart](OHOS-UIChart.md). - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

UIAxis ()

-

-

A constructor used to create a UIAxis instance.

-

~UIAxis ()

-

virtual

-

A destructor used to delete the UIAxis instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

SetDataRange (uint16_t min, uint16_t max)=0

-

virtual bool

-

Sets the value range of a coordinate axis.

-

SetMarkNum (uint16_t count)=0

-

virtual void

-

Sets the number of scales on a coordinate axis.

-

SetLineColor (const ColorType &color)

-

void

-

Sets the line color of the coordinate axis.

-

OnDraw (const Rect &invalidatedArea) override

-

void

-

Called when a view is drawn.

-

OnPreDraw (const Rect &invalidatedArea) override

-

bool

-

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

-

TranslateToPixel (int16_t &value)=0

-

virtual void

-

Translates data into pixel coordinates.

-

UIViewGroup ()

-

-

A default constructor used to create a UIViewGroup instance.

-

~UIViewGroup ()

-

virtual

-

A destructor used to delete the UIViewGroup instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

Add (UIView *view)

-

virtual void

-

Adds a child view.

-

Insert (UIView *prevView, UIView *insertView)

-

virtual void

-

Inserts a new child view behind the current one.

-

Remove (UIView *view)

-

virtual void

-

Removes a child view.

-

RemoveAll ()

-

virtual void

-

Removes all child views.

-

GetTargetView (const Point &point, UIView **last) override

-

virtual void

-

Obtains the target child view that is visible and can respond to touch events based on given coordinates.

-

MoveChildByOffset (int16_t x, int16_t y)

-

virtual void

-

Moves all child views.

-

GetChildrenHead () const

-

UIView *

-

Obtains the first child view in this view group.

-

GetChildrenTail () const

-

UIView *

-

Obtains the last child view in this view group.

-

SetDisallowIntercept (bool flag)

-

void

-

Sets whether this view group is intercepted upon touch events.

-

GetChildById (const char *id) const override

-

UIView *

-

Obtains the target child view with a specified ID.

-

SetAutoSize (bool state)

-

void

-

Sets whether the size of this view group is adaptive to that of all child views.

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void

-

Called after a view is drawn.

-

ReMeasure ()

-

virtual void

-

Remeasures the view size.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool

-

Called when the view stops dragging.

-

OnClickEvent (const ClickEvent &event)

-

virtual void

-

Called when the view is clicked.

-

OnPressEvent (const PressEvent &event)

-

virtual void

-

Called when the view is pressed.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void

-

Sets whether the view is visible.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

SetWidth (int16_t width)

-

virtual void

-

Sets the width for the view.

-

GetWidth ()

-

virtual int16_t

-

Obtains the width for the view.

-

SetHeight (int16_t height)

-

virtual void

-

Sets the height for the view.

-

GetHeight ()

-

virtual int16_t

-

Obtains the height for the view.

-

Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- -## Additional Inherited Members - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Additional Inherited Member Name

-

Description

-

GetAllChildRelativeRect () const

-

Obtains the rectangle area of a new view group after being adaptive to the size of all child views.

-

OnChildChanged ()

-

Performs operations needed after a child view is added or removed.

-

childrenHead_

-

Indicates the pointer to the first child view of this view group.

-

childrenTail_

-

Indicates the pointer to the last child view of this view group.

-

childrenNum_

-

Represents the number of child views.

-

isDragging_

-

Specifies the sliding state of this view group.

-

disallowIntercept_

-

Specifies whether this view group is intercepted upon touch events.

-

isAutoSize_

-

Specifies whether the size of this view group is adaptive to that of all child views.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UIBoxProgress.md b/api/api-SmartVision-Devices/OHOS-UIBoxProgress.md deleted file mode 100755 index a24f0145b340005081cd5cb76d2a66d72764e18c..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UIBoxProgress.md +++ /dev/null @@ -1,763 +0,0 @@ -# OHOS::UIBoxProgress - -- [Overview](#section378130425165634) -- [Summary](#section719337315165634) -- [Public Types](#pub-types) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Represents a linear progress bar. - -This class is used to set the range and current value to display the linear progress bar which can be in multiple directions. - -See also -: [UIAbstractProgress](OHOS-UIAbstractProgress.md) - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Types - - - - - - - - - - -

Public Type Name

-

Description

-

Direction : uint8_t { Direction::DIR_LEFT_TO_RIGHT, Direction::DIR_RIGHT_TO_LEFT, Direction::DIR_TOP_TO_BOTTOM, Direction::DIR_BOTTOM_TO_TOP }

-

Enumerates the directions of the progress bar.

-
- -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

UIBoxProgress ()

-

-

A constructor used to create a UIBoxProgress instance.

-

~UIBoxProgress ()

-

virtual

-

A destructor used to delete the UIBoxProgress instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

SetWidth (int16_t width) override

-

void

-

Sets the width for the view holding this progress bar.

-

SetHeight (int16_t height) override

-

void

-

Sets the height for this view.

-

SetDirection (const Direction &direction)

-

void

-

Sets the direction for this progress bar.

-

GetDirection () const

-

Direction

-

Obtains the direction of this progress bar.

-

SetValidWidth (int16_t width)

-

void

-

Sets the actual width for this progress bar.

-

GetValidWidth () const

-

int16_t

-

Obtains the actual width of this progress bar.

-

SetValidHeight (int16_t height)

-

void

-

Sets the actual height for this progress bar.

-

GetValidHeight () const

-

int16_t

-

Obtains the actual height of this progress bar.

-

OnDraw (const Rect &invalidatedArea) override

-

void

-

Called when a view is drawn.

-

UIAbstractProgress ()

-

-

A constructor used to create a UIAbstractProgress instance.

-

~UIAbstractProgress ()

-

virtual

-

A destructor used to delete the UIAbstractProgress instance.

-

EnableBackground (bool enable)

-

void

-

Sets whether the background of the progress bar is visible.

-

SetValue (int16_t value)

-

void

-

Sets the current value for this progress bar.

-

GetValue () const

-

int16_t

-

Obtains the current value of this progress bar.

-

SetRange (int16_t rangeMax, int16_t rangeMin)

-

void

-

Sets the range for this progress bar.

-

GetRangeMin () const

-

int16_t

-

Obtains the minimum value of this progress bar.

-

GetRangeMax () const

-

int16_t

-

Obtains the maximum value of this progress bar.

-

SetImage (const char *foregroundImage, const char *backgroundImage=nullptr)

-

void

-

Sets the image for this progress bar.

-

SetImage (const ImageInfo *foregroundImage, const ImageInfo *backgroundImage=nullptr)

-

void

-

Sets the image as a pixel map for this progress bar.

-

SetStep (uint16_t step)

-

void

-

Sets the step for this progress bar.

-

GetStep () const

-

uint16_t

-

Obtains the current step of this progress bar.

-

SetBackgroundStyle (const Style &style)

-

void

-

Sets the background style for this progress bar.

-

SetBackgroundStyle (uint8_t key, int64_t value)

-

void

-

Sets a background style for this progress bar.

-

GetBackgroundStyle () const

-

const Style &

-

Obtains the background style of this progress bar.

-

GetBackgroundStyle (uint8_t key) const

-

int64_t

-

Obtains the value of a background style of this progress bar.

-

SetForegroundStyle (const Style &style)

-

void

-

Sets the foreground style for this progress bar.

-

SetForegroundStyle (uint8_t key, int64_t value)

-

void

-

Sets a foreground style for this progress bar.

-

GetForegroundStyle () const

-

const Style &

-

Obtains the foreground style of this progress bar.

-

GetForegroundStyle (uint8_t key) const

-

int64_t

-

Obtains the value of a foreground style of this progress bar.

-

SetCapType (CapType cap)

-

void

-

Sets the type of caps on the background and foreground of the progress bar.

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnPreDraw (const Rect &invalidatedArea)

-

virtual bool

-

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void

-

Called after a view is drawn.

-

ReMeasure ()

-

virtual void

-

Remeasures the view size.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool

-

Called when the view stops dragging.

-

OnClickEvent (const ClickEvent &event)

-

virtual void

-

Called when the view is clicked.

-

OnPressEvent (const PressEvent &event)

-

virtual void

-

Called when the view is pressed.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

GetTargetView (const Point &point, UIView **last)

-

virtual void

-

Obtains the top-level view based on specified coordinates.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void

-

Sets whether the view is visible.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

GetWidth ()

-

virtual int16_t

-

Obtains the width for the view.

-

GetHeight ()

-

virtual int16_t

-

Obtains the height for the view.

-

Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

GetChildById (const char *id) const

-

virtual UIView *

-

Obtains the child view of a specified ID.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UIButton.md b/api/api-SmartVision-Devices/OHOS-UIButton.md deleted file mode 100755 index 62f1b6db3ee1148a0c2af68a230423b95aec8d33..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UIButton.md +++ /dev/null @@ -1,675 +0,0 @@ -# OHOS::UIButton - -- [Overview](#section1989894275165634) -- [Summary](#section566843452165634) -- [Public Types](#pub-types) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Represents a button. - -This component responds to the press and release events. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Types - - - - - - - - - - - - - -

Public Type Name

-

Description

-

ButtonImageSrc : uint8_t

-

Enumerates the images for different button states.

-

ButtonState : uint8_t

-

Enumerates the states of this button.

-
- -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

UIButton ()

-

-

A constructor used to create a UIButton instance.

-

UIButton (const char *id)

-

-

A constructor used to create a UIButton instance based on the button ID.

-

~UIButton ()

-

virtual

-

A destructor used to delete the UIButton instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the component type.

-

OnPreDraw (const Rect &invalidatedArea) override

-

bool

-

Do something before draw, this function will be invoked mainly to check if this view need to cover invalidate area so render manager can decide which layer to draw firstly.

-

OnDraw (const Rect &invalidatedArea) override

-

void

-

Executes the draw action.

-

OnPressEvent (const PressEvent &event) override

-

void

-

Executes the press event action.

-

OnReleaseEvent (const ReleaseEvent &event) override

-

void

-

Executes the press release event action.

-

OnCancelEvent (const CancelEvent &event) override

-

void

-

Executes the cancel event action.

-

SetImageSrc (const char *defaultImgSrc, const char *triggeredImgSrc)

-

void

-

Sets the image for this button.

-

SetImageSrc (const ImageInfo *defaultImgSrc, const ImageInfo *triggeredImgSrc)

-

void

-

Sets the image for this button.

-

SetImagePosition (const int16_t x, const int16_t y)

-

void

-

Sets the position for this image.

-

GetImageX () const

-

int16_t

-

Obtains the x-coordinate of this image.

-

GetImageY () const

-

int16_t

-

Obtains the y-coordinate of this image.

-

GetCurImageSrc () const

-

const Image *

-

Obtains the image for the current button state.

-

GetWidth () override

-

int16_t

-

Obtains the width of this image.

-

GetHeight () override

-

int16_t

-

Obtains the height of this image.

-

SetWidth (int16_t width) override

-

void

-

Sets the width for this image.

-

SetHeight (int16_t height) override

-

void

-

Sets the height for this image.

-

GetContentRect () override

-

virtual Rect

-

Obtains a rectangular area that contains coordinate information.

-

GetStyle (uint8_t key) const override

-

int64_t

-

Obtains the value of a style.

-

SetStyle (uint8_t key, int64_t value) override

-

void

-

Sets a style.

-

GetStyleForState (uint8_t key, ButtonState state) const

-

int64_t

-

Obtains the style of a button in a specific state.

-

SetStyleForState (uint8_t key, int64_t value, ButtonState state)

-

void

-

Sets the style for a button in a specific state.

-

Disable ()

-

void

-

Disables this button.

-

Enable ()

-

void

-

Enables this button.

-

SetStateForStyle (ButtonState state)

-

void

-

Sets the state for a button. After the setting, calling SetStyle will change the style of this button, but not its state.

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void

-

Called after a view is drawn.

-

ReMeasure ()

-

virtual void

-

Remeasures the view size.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool

-

Called when the view stops dragging.

-

OnClickEvent (const ClickEvent &event)

-

virtual void

-

Called when the view is clicked.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

GetTargetView (const Point &point, UIView **last)

-

virtual void

-

Obtains the top-level view based on specified coordinates.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void

-

Sets whether the view is visible.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

GetChildById (const char *id) const

-

virtual UIView *

-

Obtains the child view of a specified ID.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UICanvas-FontStyle.md b/api/api-SmartVision-Devices/OHOS-UICanvas-FontStyle.md deleted file mode 100755 index aa665181b83e3a341f1057e2400f193aae9f13e5..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UICanvas-FontStyle.md +++ /dev/null @@ -1,55 +0,0 @@ -# OHOS::UICanvas::FontStyle - -- [Overview](#section1395395650165634) -- [Summary](#section1047592401165634) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines the font style. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

direct

-

UITextLanguageDirect

-

align

-

UITextLanguageAlignment

-

fontSize

-

uint8_t

-

letterSpace

-

int16_t

-

fontName

-

const char *

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UICanvas.md b/api/api-SmartVision-Devices/OHOS-UICanvas.md deleted file mode 100755 index fbd99ff9282622b9f0ebffa2bb0f38cfc6806db9..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UICanvas.md +++ /dev/null @@ -1,674 +0,0 @@ -# OHOS::UICanvas - -- [Overview](#section1708912539165634) -- [Summary](#section1861402016165634) -- [Data Structures](#nested-classes) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines a canvas, which is used to draw multiple types of 2D graphs. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

FontStyle

-

Defines the font style.

-
- -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

UICanvas ()

-

-

A constructor used to create a UICanvas instance.

-

~UICanvas ()

-

virtual

-

A destructor used to delete the UICanvas instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

Clear ()

-

void

-

Clears the entire canvas.

-

SetStartPosition (const Point &startPoint)

-

void

-

Sets the coordinates of the start point for drawing a line. For example, if startPoint is set to {50, 50}, the line is drawn from this set of coordinates on the canvas.

-

GetStartPosition () const

-

const Point &

-

Obtains the coordinates of the start point of a line.

-

DrawLine (const Point &endPoint, const Paint &paint)

-

void

-

Draws a straight line.

-

DrawLine (const Point &startPoint, const Point &endPoint, const Paint &paint)

-

void

-

Draws a straight line from the coordinates of the start point.

-

DrawCurve (const Point &control1, const Point &control2, const Point &endPoint, const Paint &paint)

-

void

-

Draws a cubic Bezier curve.

-

DrawCurve (const Point &startPoint, const Point &control1, const Point &control2, const Point &endPoint, const Paint &paint)

-

void

-

Draws a cubic Bezier curve from the start point coordinates.

-

DrawRect (const Point &startPoint, int16_t height, int16_t width, const Paint &paint)

-

void

-

Draws a rectangle.

-

DrawCircle (const Point &center, uint16_t radius, const Paint &paint)

-

void

-

Draws a circle.

-

DrawSector (const Point &center, uint16_t radius, int16_t startAngle, int16_t endAngle, const Paint &paint)

-

void

-

Draws a sector.

-

DrawArc (const Point &center, uint16_t radius, int16_t startAngle, int16_t endAngle, const Paint &paint)

-

void

-

Draws an arc.

-

DrawImage (const Point &startPoint, const char *image, const Paint &paint)

-

void

-

Draws an image.

-

DrawLabel (const Point &startPoint, const char *text, uint16_t maxWidth, const FontStyle &fontStyle, const Paint &paint)

-

void

-

Draws text.

-

OnDraw (const Rect &invalidatedArea) override

-

virtual void

-

Called when a view is drawn.

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnPreDraw (const Rect &invalidatedArea)

-

virtual bool

-

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void

-

Called after a view is drawn.

-

ReMeasure ()

-

virtual void

-

Remeasures the view size.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool

-

Called when the view stops dragging.

-

OnClickEvent (const ClickEvent &event)

-

virtual void

-

Called when the view is clicked.

-

OnPressEvent (const PressEvent &event)

-

virtual void

-

Called when the view is pressed.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

GetTargetView (const Point &point, UIView **last)

-

virtual void

-

Obtains the top-level view based on specified coordinates.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void

-

Sets whether the view is visible.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

SetWidth (int16_t width)

-

virtual void

-

Sets the width for the view.

-

GetWidth ()

-

virtual int16_t

-

Obtains the width for the view.

-

SetHeight (int16_t height)

-

virtual void

-

Sets the height for the view.

-

GetHeight ()

-

virtual int16_t

-

Obtains the height for the view.

-

Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

GetChildById (const char *id) const

-

virtual UIView *

-

Obtains the child view of a specified ID.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UIChart.md b/api/api-SmartVision-Devices/OHOS-UIChart.md deleted file mode 100755 index 05440ff1b8b7a16f744307d176efd5e85f73dac7..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UIChart.md +++ /dev/null @@ -1,745 +0,0 @@ -# OHOS::UIChart - -- [Overview](#section1003665507165633) -- [Summary](#section1369937248165633) -- [Public Member Functions](#pub-methods) -- [Additional Inherited Members](#inherited) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines the chart class and provides functions such as adding and deleting data sets to display a chart. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

UIChart ()

-

-

A constructor used to create a UIChart instance.

-

~UIChart ()

-

virtual

-

A destructor used to delete the UIChart instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

SetHeight (int16_t height) override

-

void

-

Sets the height for this component.

-

SetWidth (int16_t width) override

-

void

-

Sets the width for this component.

-

OnPreDraw (const Rect &invalidatedArea) override

-

bool

-

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

-

OnDraw (const Rect &invalidatedArea) override

-

void

-

Called when a view is drawn.

-

AddDataSerial (UIChartDataSerial *dataSerial)

-

virtual bool

-

Adds a data set.

-

DeleteDataSerial (UIChartDataSerial *dataSerial)

-

virtual bool

-

Deletes a data set.

-

ClearDataSerial ()

-

virtual void

-

Clears all data sets.

-

RefreshChart ()=0

-

virtual void

-

Refreshes a chart and redraws the dirty region.

-

GetXAxis ()

-

UIXAxis &

-

Obtains the x-axis instance.

-

GetYAxis ()

-

UIYAxis &

-

Obtains the y-axis instance.

-

EnableReverse (bool enable)

-

void

-

Enables chart reverse.

-

UIViewGroup ()

-

-

A default constructor used to create a UIViewGroup instance.

-

~UIViewGroup ()

-

virtual

-

A destructor used to delete the UIViewGroup instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

Add (UIView *view)

-

virtual void

-

Adds a child view.

-

Insert (UIView *prevView, UIView *insertView)

-

virtual void

-

Inserts a new child view behind the current one.

-

Remove (UIView *view)

-

virtual void

-

Removes a child view.

-

RemoveAll ()

-

virtual void

-

Removes all child views.

-

GetTargetView (const Point &point, UIView **last) override

-

virtual void

-

Obtains the target child view that is visible and can respond to touch events based on given coordinates.

-

MoveChildByOffset (int16_t x, int16_t y)

-

virtual void

-

Moves all child views.

-

GetChildrenHead () const

-

UIView *

-

Obtains the first child view in this view group.

-

GetChildrenTail () const

-

UIView *

-

Obtains the last child view in this view group.

-

SetDisallowIntercept (bool flag)

-

void

-

Sets whether this view group is intercepted upon touch events.

-

GetChildById (const char *id) const override

-

UIView *

-

Obtains the target child view with a specified ID.

-

SetAutoSize (bool state)

-

void

-

Sets whether the size of this view group is adaptive to that of all child views.

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void

-

Called after a view is drawn.

-

ReMeasure ()

-

virtual void

-

Remeasures the view size.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool

-

Called when the view stops dragging.

-

OnClickEvent (const ClickEvent &event)

-

virtual void

-

Called when the view is clicked.

-

OnPressEvent (const PressEvent &event)

-

virtual void

-

Called when the view is pressed.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void

-

Sets whether the view is visible.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

GetWidth ()

-

virtual int16_t

-

Obtains the width for the view.

-

GetHeight ()

-

virtual int16_t

-

Obtains the height for the view.

-

Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- -## Additional Inherited Members - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Additional Inherited Member Name

-

Description

-

GetAllChildRelativeRect () const

-

Obtains the rectangle area of a new view group after being adaptive to the size of all child views.

-

OnChildChanged ()

-

Performs operations needed after a child view is added or removed.

-

childrenHead_

-

Indicates the pointer to the first child view of this view group.

-

childrenTail_

-

Indicates the pointer to the last child view of this view group.

-

childrenNum_

-

Represents the number of child views.

-

isDragging_

-

Specifies the sliding state of this view group.

-

disallowIntercept_

-

Specifies whether this view group is intercepted upon touch events.

-

isAutoSize_

-

Specifies whether the size of this view group is adaptive to that of all child views.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UIChartDataSerial-PointStyle.md b/api/api-SmartVision-Devices/OHOS-UIChartDataSerial-PointStyle.md deleted file mode 100755 index 876eecd5c197fa16b79d0afe21068fc0fe08c92b..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UIChartDataSerial-PointStyle.md +++ /dev/null @@ -1,73 +0,0 @@ -# OHOS::UIChartDataSerial::PointStyle - -- [Overview](#section564781387165634) -- [Summary](#section1993090021165634) -- [Data Fields](#pub-attribs) -- [Additional Inherited Members](#inherited) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines the style for the top, bottom, and frontmost points in a line chart. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

fillColor

-

ColorType

-

strokeColor

-

ColorType

-

radius

-

uint16_t

-

strokeWidth

-

uint16_t

-
- -## Additional Inherited Members - - - - - - - - - - - - - -

Additional Inherited Member Name

-

Description

-

operator new (size_t size)

-

Overrides the new function.

-

operator delete (void *p)

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UIChartDataSerial.md b/api/api-SmartVision-Devices/OHOS-UIChartDataSerial.md deleted file mode 100755 index e22df3acf0c940f454ada42c25e41bb23529f59b..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UIChartDataSerial.md +++ /dev/null @@ -1,266 +0,0 @@ -# OHOS::UIChartDataSerial - -- [Overview](#section1012289381165634) -- [Summary](#section2001841170165634) -- [Data Structures](#nested-classes) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines a data set and provides functions such as adding and deleting data points. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

PointStyle

-

Defines the style for the top, bottom, and frontmost points in a line chart.

-
- -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

UIChartDataSerial ()

-

-

A constructor used to create a UIChartDataSerial instance.

-

~UIChartDataSerial ()

-

virtual

-

A destructor used to delete the UIChartDataSerial instance.

-

SetMaxDataCount (uint16_t maxCount)

-

bool

-

Sets the maximum number of data points that can be stored in a data set.

-

ModifyPoint (uint16_t index, const Point &point)

-

bool

-

Modifies the value of a data point in the data set.

-

GetPoint (uint16_t index, Point &point)

-

bool

-

Obtains the coordinates in the chart for a data point in the data set.

-

AddPoints (const Point *data, uint16_t count)

-

bool

-

Adds data points.

-

ClearData ()

-

void

-

Clears all data points.

-

GetDataCount () const

-

uint16_t

-

Obtains the number of data points available in the data set.

-

EnableSmooth (bool smooth)

-

void

-

Sets whether to smooth a polyline.

-

IsSmooth () const

-

bool

-

Checks whether smoothing is performed on a polyline.

-

EnableGradient (bool enable)

-

void

-

Enables the fill color of a line chart.

-

IsGradient () const

-

bool

-

Checks whether a polyline has a fill color.

-

GetPeakIndex () const

-

uint16_t

-

Obtains the index of the top point in the data set.

-

GetLatestIndex () const

-

uint16_t

-

Obtains the index of the frontmost point (the latest added or modified data point in a data set).

-

GetValleyIndex () const

-

uint16_t

-

Obtains the index of the bottom point in a data set.

-

GetPeakData () const

-

int16_t

-

Obtains the Y value of the top point in a data set.

-

GetValleyData () const

-

int16_t

-

Obtains the Y value of the bottom point in a data set.

-

GetLineColor () const

-

ColorType

-

Obtains the polyline color of the data set in a line chart.

-

GetFillColor () const

-

ColorType

-

Obtains the fill color of the data set.

-

SetFillColor (const ColorType &color)

-

void

-

Sets the fill color of the data set.

-

SetLineColor (const ColorType &color)

-

void

-

Sets the polyline color of the data set in the line chart.

-

HidePoint (uint16_t index, uint16_t count)

-

void

-

Hides some points in the data set.

-

GetHideIndex () const

-

uint16_t

-

Obtains the index from which the data set starts to hide.

-

GetHideCount () const

-

uint16_t

-

Obtains the number of hidden points in the data set.

-

SetHeadPointStyle (const PointStyle &style)

-

void

-

Sets the style of the frontmost point on a polyline.

-

SetTopPointStyle (const PointStyle &style)

-

void

-

Sets the style of the top point of a polyline.

-

SetBottomPointStyle (const PointStyle &style)

-

void

-

Sets the style of the bottom point of a polyline.

-

GetHeadPointStyle () const

-

const PointStyle &

-

Obtains the style of the frontmost point on a polyline.

-

GetTopPointStyle () const

-

const PointStyle &

-

Obtains the style of the top point of a polyline.

-

GetBottomPointStyle () const

-

const PointStyle &

-

Obtains the style of the bottom point of a polyline.

-

EnableHeadPoint (bool enable)

-

void

-

Enables the feature of drawing the frontmost point on a polyline.

-

EnableTopPoint (bool enable)

-

void

-

Enables the feature of drawing the top point of a polyline. If there are multiple top points, only the first one is drawn.

-

EnableBottomPoint (bool enable)

-

void

-

Enables the feature of drawing the bottom point of a polyline. If there are multiple bottom points, only the first one is drawn.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UIChartPillar.md b/api/api-SmartVision-Devices/OHOS-UIChartPillar.md deleted file mode 100755 index f1390d050d6e4ec694db43e18af4c0f44ba78b78..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UIChartPillar.md +++ /dev/null @@ -1,757 +0,0 @@ -# OHOS::UIChartPillar - -- [Overview](#section1990708616165634) -- [Summary](#section356697000165634) -- [Public Member Functions](#pub-methods) -- [Additional Inherited Members](#inherited) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Provides special functions for implementing a bar chart. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

UIChartPillar ()

-

-

A constructor used to create a UIChartPillar instance.

-

~UIChartPillar ()

-

virtual

-

A destructor used to delete the UIChartPillar instance.

-

RefreshChart () override

-

void

-

Refreshes a bar chart and redraws the dirty region.

-

UIChart ()

-

-

A constructor used to create a UIChart instance.

-

~UIChart ()

-

virtual

-

A destructor used to delete the UIChart instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

SetHeight (int16_t height) override

-

void

-

Sets the height for this component.

-

SetWidth (int16_t width) override

-

void

-

Sets the width for this component.

-

OnPreDraw (const Rect &invalidatedArea) override

-

bool

-

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

-

OnDraw (const Rect &invalidatedArea) override

-

void

-

Called when a view is drawn.

-

AddDataSerial (UIChartDataSerial *dataSerial)

-

virtual bool

-

Adds a data set.

-

DeleteDataSerial (UIChartDataSerial *dataSerial)

-

virtual bool

-

Deletes a data set.

-

ClearDataSerial ()

-

virtual void

-

Clears all data sets.

-

GetXAxis ()

-

UIXAxis &

-

Obtains the x-axis instance.

-

GetYAxis ()

-

UIYAxis &

-

Obtains the y-axis instance.

-

EnableReverse (bool enable)

-

void

-

Enables chart reverse.

-

UIViewGroup ()

-

-

A default constructor used to create a UIViewGroup instance.

-

~UIViewGroup ()

-

virtual

-

A destructor used to delete the UIViewGroup instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

Add (UIView *view)

-

virtual void

-

Adds a child view.

-

Insert (UIView *prevView, UIView *insertView)

-

virtual void

-

Inserts a new child view behind the current one.

-

Remove (UIView *view)

-

virtual void

-

Removes a child view.

-

RemoveAll ()

-

virtual void

-

Removes all child views.

-

GetTargetView (const Point &point, UIView **last) override

-

virtual void

-

Obtains the target child view that is visible and can respond to touch events based on given coordinates.

-

MoveChildByOffset (int16_t x, int16_t y)

-

virtual void

-

Moves all child views.

-

GetChildrenHead () const

-

UIView *

-

Obtains the first child view in this view group.

-

GetChildrenTail () const

-

UIView *

-

Obtains the last child view in this view group.

-

SetDisallowIntercept (bool flag)

-

void

-

Sets whether this view group is intercepted upon touch events.

-

GetChildById (const char *id) const override

-

UIView *

-

Obtains the target child view with a specified ID.

-

SetAutoSize (bool state)

-

void

-

Sets whether the size of this view group is adaptive to that of all child views.

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void

-

Called after a view is drawn.

-

ReMeasure ()

-

virtual void

-

Remeasures the view size.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool

-

Called when the view stops dragging.

-

OnClickEvent (const ClickEvent &event)

-

virtual void

-

Called when the view is clicked.

-

OnPressEvent (const PressEvent &event)

-

virtual void

-

Called when the view is pressed.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void

-

Sets whether the view is visible.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

GetWidth ()

-

virtual int16_t

-

Obtains the width for the view.

-

GetHeight ()

-

virtual int16_t

-

Obtains the height for the view.

-

Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- -## Additional Inherited Members - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Additional Inherited Member Name

-

Description

-

GetAllChildRelativeRect () const

-

Obtains the rectangle area of a new view group after being adaptive to the size of all child views.

-

OnChildChanged ()

-

Performs operations needed after a child view is added or removed.

-

childrenHead_

-

Indicates the pointer to the first child view of this view group.

-

childrenTail_

-

Indicates the pointer to the last child view of this view group.

-

childrenNum_

-

Represents the number of child views.

-

isDragging_

-

Specifies the sliding state of this view group.

-

disallowIntercept_

-

Specifies whether this view group is intercepted upon touch events.

-

isAutoSize_

-

Specifies whether the size of this view group is adaptive to that of all child views.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UIChartPolyline.md b/api/api-SmartVision-Devices/OHOS-UIChartPolyline.md deleted file mode 100755 index ce7172c2cc23a53c579287b3cdf88fd065d804e2..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UIChartPolyline.md +++ /dev/null @@ -1,763 +0,0 @@ -# OHOS::UIChartPolyline - -- [Overview](#section1273317788165634) -- [Summary](#section570836943165634) -- [Public Member Functions](#pub-methods) -- [Additional Inherited Members](#inherited) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Provides special functions for implementing a polyline. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

UIChartPolyline ()

-

-

A constructor used to create a UIChartPolyline instance.

-

~UIChartPolyline ()

-

virtual

-

A destructor used to delete the UIChartPolyline instance.

-

RefreshChart () override

-

void

-

Refreshes a line chart and redraws the dirty region.

-

SetGradientOpacity (uint8_t minOpa, uint8_t maxOpa)

-

void

-

Sets the opacity range of the fill color gradient.

-

SetGradientBottom (uint16_t bottom)

-

void

-

Sets the distance between the bottom edge of the fill color range and the x-axis.

-

UIChart ()

-

-

A constructor used to create a UIChart instance.

-

~UIChart ()

-

virtual

-

A destructor used to delete the UIChart instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

SetHeight (int16_t height) override

-

void

-

Sets the height for this component.

-

SetWidth (int16_t width) override

-

void

-

Sets the width for this component.

-

OnPreDraw (const Rect &invalidatedArea) override

-

bool

-

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

-

OnDraw (const Rect &invalidatedArea) override

-

void

-

Called when a view is drawn.

-

AddDataSerial (UIChartDataSerial *dataSerial)

-

virtual bool

-

Adds a data set.

-

DeleteDataSerial (UIChartDataSerial *dataSerial)

-

virtual bool

-

Deletes a data set.

-

ClearDataSerial ()

-

virtual void

-

Clears all data sets.

-

GetXAxis ()

-

UIXAxis &

-

Obtains the x-axis instance.

-

GetYAxis ()

-

UIYAxis &

-

Obtains the y-axis instance.

-

EnableReverse (bool enable)

-

void

-

Enables chart reverse.

-

UIViewGroup ()

-

-

A default constructor used to create a UIViewGroup instance.

-

~UIViewGroup ()

-

virtual

-

A destructor used to delete the UIViewGroup instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

Add (UIView *view)

-

virtual void

-

Adds a child view.

-

Insert (UIView *prevView, UIView *insertView)

-

virtual void

-

Inserts a new child view behind the current one.

-

Remove (UIView *view)

-

virtual void

-

Removes a child view.

-

RemoveAll ()

-

virtual void

-

Removes all child views.

-

GetTargetView (const Point &point, UIView **last) override

-

virtual void

-

Obtains the target child view that is visible and can respond to touch events based on given coordinates.

-

MoveChildByOffset (int16_t x, int16_t y)

-

virtual void

-

Moves all child views.

-

GetChildrenHead () const

-

UIView *

-

Obtains the first child view in this view group.

-

GetChildrenTail () const

-

UIView *

-

Obtains the last child view in this view group.

-

SetDisallowIntercept (bool flag)

-

void

-

Sets whether this view group is intercepted upon touch events.

-

GetChildById (const char *id) const override

-

UIView *

-

Obtains the target child view with a specified ID.

-

SetAutoSize (bool state)

-

void

-

Sets whether the size of this view group is adaptive to that of all child views.

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void

-

Called after a view is drawn.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool

-

Called when the view stops dragging.

-

OnClickEvent (const ClickEvent &event)

-

virtual void

-

Called when the view is clicked.

-

OnPressEvent (const PressEvent &event)

-

virtual void

-

Called when the view is pressed.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void

-

Sets whether the view is visible.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

GetWidth ()

-

virtual int16_t

-

Obtains the width for the view.

-

GetHeight ()

-

virtual int16_t

-

Obtains the height for the view.

-

Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- -## Additional Inherited Members - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Additional Inherited Member Name

-

Description

-

GetAllChildRelativeRect () const

-

Obtains the rectangle area of a new view group after being adaptive to the size of all child views.

-

OnChildChanged ()

-

Performs operations needed after a child view is added or removed.

-

childrenHead_

-

Indicates the pointer to the first child view of this view group.

-

childrenTail_

-

Indicates the pointer to the last child view of this view group.

-

childrenNum_

-

Represents the number of child views.

-

isDragging_

-

Specifies the sliding state of this view group.

-

disallowIntercept_

-

Specifies whether this view group is intercepted upon touch events.

-

isAutoSize_

-

Specifies whether the size of this view group is adaptive to that of all child views.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UICheckBox-OnChangeListener.md b/api/api-SmartVision-Devices/OHOS-UICheckBox-OnChangeListener.md deleted file mode 100755 index e38f59562cf6bb6b6a3aa9fa4b2cd88b45204979..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UICheckBox-OnChangeListener.md +++ /dev/null @@ -1,67 +0,0 @@ -# OHOS::UICheckBox::OnChangeListener - -- [Overview](#section130697803165634) -- [Summary](#section1890884532165634) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Represents a listener for changes of a check box. - -This is an inner class of **[UICheckBox](OHOS-UICheckBox.md)**. It contains a callback function to be invoked when the check box state changes. - -See also -: [UICheckBox](OHOS-UICheckBox.md) - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

OnChange (UICheckBoxState state)=0

-

virtual bool

-

Called when the state of this check box is switched. This is a virtual function, which needs your implementation.

-

~OnChangeListener ()

-

virtual

-

A destructor used to delete the OnChangeListener instance.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UICheckBox.md b/api/api-SmartVision-Devices/OHOS-UICheckBox.md deleted file mode 100755 index 10220a10b60d3b817c400cdebc7e4b538d303e82..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UICheckBox.md +++ /dev/null @@ -1,646 +0,0 @@ -# OHOS::UICheckBox - -- [Overview](#section218109035165634) -- [Summary](#section1855116257165634) -- [Data Structures](#nested-classes) -- [Public Types](#pub-types) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Represents a check box. - -A check box permits users to make a binary choice. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

OnChangeListener

-

Represents a listener for changes of a check box.

-
- -## Public Types - - - - - - - - - - -

Public Type Name

-

Description

-

UICheckBoxState : uint8_t

-

Enumerates the states of a check box.

-
- -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

UICheckBox ()

-

-

A constructor used to create a UICheckBox instance.

-

~UICheckBox ()

-

virtual

-

A destructor used to delete the UICheckBox instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the component type.

-

SetOnChangeListener (OnChangeListener *onStateChangeListener)

-

void

-

Sets the listener for this check box.

-

OnPreDraw (const Rect &invalidatedArea) override

-

bool

-

Do something before draw, this function will be invoked mainly to check if this view need to cover invalidate area so render manager can decide which layer to draw firstly.

-

OnDraw (const Rect &invalidatedArea) override

-

void

-

Executes the draw action Ondraw invokes the rendering function provided by the underlying layer to draw pictures based on the selected status of the checkbox.

-

OnClickEvent (const ClickEvent &event) override

-

void

-

Executes the click event action OnClickEvent will reverse the selected state of checkbox. Example: If the check box is selected, the checkbox status is changed to Unselected after the click action is taken.

-

SetImages (const char *selectedImageSrc, const char *unselectedImageSrc)

-

virtual void

-

Sets the images for this check box.

-

SetImages (const ImageInfo *selectedImageSrc, const ImageInfo *unselectedImageSrc)

-

virtual void

-

Sets the images for this check box.

-

GetState () const

-

UICheckBoxState

-

Obtains the state of this check box.

-

SetState (UICheckBoxState state)

-

void

-

Sets the state for this check box.

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void

-

Called after a view is drawn.

-

ReMeasure ()

-

virtual void

-

Remeasures the view size.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool

-

Called when the view stops dragging.

-

OnPressEvent (const PressEvent &event)

-

virtual void

-

Called when the view is pressed.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

GetTargetView (const Point &point, UIView **last)

-

virtual void

-

Obtains the top-level view based on specified coordinates.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void

-

Sets whether the view is visible.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

SetWidth (int16_t width)

-

virtual void

-

Sets the width for the view.

-

GetWidth ()

-

virtual int16_t

-

Obtains the width for the view.

-

SetHeight (int16_t height)

-

virtual void

-

Sets the height for the view.

-

GetHeight ()

-

virtual int16_t

-

Obtains the height for the view.

-

Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

GetChildById (const char *id) const

-

virtual UIView *

-

Obtains the child view of a specified ID.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UICircleProgress.md b/api/api-SmartVision-Devices/OHOS-UICircleProgress.md deleted file mode 100755 index 7459cf69159e10b09e1689ad905158b9a6aa6be9..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UICircleProgress.md +++ /dev/null @@ -1,775 +0,0 @@ -# OHOS::UICircleProgress - -- [Overview](#section1613404856165634) -- [Summary](#section805614434165634) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Represents a circular progress bar. - -This class is used to set the start and end angles, range, and current value to display the circular progress bar. - -See also -: [UIAbstractProgress](OHOS-UIAbstractProgress.md) - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

UICircleProgress ()

-

-

A constructor used to create a UICircleProgress instance.

-

~UICircleProgress ()

-

virtual

-

A destructor used to delete the UICircleProgress instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

OnPreDraw (const Rect &invalidatedArea) override

-

bool

-

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

-

OnDraw (const Rect &invalidatedArea) override

-

void

-

Called when a view is drawn.

-

SetCenterPosition (int16_t x, int16_t y)

-

void

-

Sets the coordinates of the center point for this circular progress bar.

-

GetCenterPosition () const

-

Point

-

Obtains the coordinates of the center point for this circular progress bar.

-

SetRadius (uint16_t radius)

-

void

-

Sets the outer radius for this circular progress bar.

-

GetRadius () const

-

uint16_t

-

Obtains the outer radius of this circular progress bar.

-

SetStartAngle (int16_t startAngle)

-

void

-

Sets the start angle.

-

GetStartAngle () const

-

int16_t

-

Obtains the start angle.

-

SetEndAngle (int16_t endAngle)

-

void

-

Sets the end angle.

-

GetEndAngle () const

-

int16_t

-

Obtains the end angle.

-

SetProgressImagePosition (int16_t x, int16_t y)

-

void

-

Sets the coordinates of the foreground image for this progress bar relative to the view.

-

SetBackgroundImagePosition (int16_t x, int16_t y)

-

void

-

Sets the coordinates of the background image for this progress bar relative to the view.

-

SetLineColor (ColorType color)

-

void

-

Sets the foreground color for this progress bar.

-

UIAbstractProgress ()

-

-

A constructor used to create a UIAbstractProgress instance.

-

~UIAbstractProgress ()

-

virtual

-

A destructor used to delete the UIAbstractProgress instance.

-

EnableBackground (bool enable)

-

void

-

Sets whether the background of the progress bar is visible.

-

SetValue (int16_t value)

-

void

-

Sets the current value for this progress bar.

-

GetValue () const

-

int16_t

-

Obtains the current value of this progress bar.

-

SetRange (int16_t rangeMax, int16_t rangeMin)

-

void

-

Sets the range for this progress bar.

-

GetRangeMin () const

-

int16_t

-

Obtains the minimum value of this progress bar.

-

GetRangeMax () const

-

int16_t

-

Obtains the maximum value of this progress bar.

-

SetImage (const char *foregroundImage, const char *backgroundImage=nullptr)

-

void

-

Sets the image for this progress bar.

-

SetImage (const ImageInfo *foregroundImage, const ImageInfo *backgroundImage=nullptr)

-

void

-

Sets the image as a pixel map for this progress bar.

-

SetStep (uint16_t step)

-

void

-

Sets the step for this progress bar.

-

GetStep () const

-

uint16_t

-

Obtains the current step of this progress bar.

-

SetBackgroundStyle (const Style &style)

-

void

-

Sets the background style for this progress bar.

-

SetBackgroundStyle (uint8_t key, int64_t value)

-

void

-

Sets a background style for this progress bar.

-

GetBackgroundStyle () const

-

const Style &

-

Obtains the background style of this progress bar.

-

GetBackgroundStyle (uint8_t key) const

-

int64_t

-

Obtains the value of a background style of this progress bar.

-

SetForegroundStyle (const Style &style)

-

void

-

Sets the foreground style for this progress bar.

-

SetForegroundStyle (uint8_t key, int64_t value)

-

void

-

Sets a foreground style for this progress bar.

-

GetForegroundStyle () const

-

const Style &

-

Obtains the foreground style of this progress bar.

-

GetForegroundStyle (uint8_t key) const

-

int64_t

-

Obtains the value of a foreground style of this progress bar.

-

SetCapType (CapType cap)

-

void

-

Sets the type of caps on the background and foreground of the progress bar.

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void

-

Called after a view is drawn.

-

ReMeasure ()

-

virtual void

-

Remeasures the view size.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool

-

Called when the view stops dragging.

-

OnClickEvent (const ClickEvent &event)

-

virtual void

-

Called when the view is clicked.

-

OnPressEvent (const PressEvent &event)

-

virtual void

-

Called when the view is pressed.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

GetTargetView (const Point &point, UIView **last)

-

virtual void

-

Obtains the top-level view based on specified coordinates.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void

-

Sets whether the view is visible.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

SetWidth (int16_t width)

-

virtual void

-

Sets the width for the view.

-

GetWidth ()

-

virtual int16_t

-

Obtains the width for the view.

-

SetHeight (int16_t height)

-

virtual void

-

Sets the height for the view.

-

GetHeight ()

-

virtual int16_t

-

Obtains the height for the view.

-

Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

GetChildById (const char *id) const

-

virtual UIView *

-

Obtains the child view of a specified ID.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UIDialog.md b/api/api-SmartVision-Devices/OHOS-UIDialog.md deleted file mode 100755 index 322dbba2dc1ac4241eff4b35b933a50fc235307b..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UIDialog.md +++ /dev/null @@ -1,741 +0,0 @@ -# OHOS::UIDialog - -- [Overview](#section1747146483165634) -- [Summary](#section1479269648165634) -- [Public Types](#pub-types) -- [Public Member Functions](#pub-methods) -- [Additional Inherited Members](#inherited) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Represents a dialog box. - -A dialog box displays information for user input. After a button is clicked in the dialog box, the corresponding callback event is triggered. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Types - - - - - - - - - - -

Public Type Name

-

Description

-

DialogButtonType { DialogButtonType::BUTTON1, DialogButtonType::BUTTON2, DialogButtonType::BUTTON3 }

-

Enumerates buttons in a dialog box.

-
- -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

UIDialog ()

-

-

A constructor used to create a UIDialog instance.

-

~UIDialog ()

-

virtual

-

A destructor used to delete the UIDialog instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

SetTitle (const char *title)

-

void

-

Sets the title for this dialog box.

-

SetText (const char *text)

-

void

-

Sets the text for this dialog box.

-

OnPreDraw (const Rect &invalidatedArea) override

-

bool

-

Checks whether this label needs to be covered before drawing it.

-

SetButton (DialogButtonType buttonType, const char *text, OnClickListener *listener)

-

void

-

Sets a button for this dialog box.

-

SetVisible (bool visible) override

-

void

-

Sets whether a dialog box is visible.

-

UIViewGroup ()

-

-

A default constructor used to create a UIViewGroup instance.

-

~UIViewGroup ()

-

virtual

-

A destructor used to delete the UIViewGroup instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

Add (UIView *view)

-

virtual void

-

Adds a child view.

-

Insert (UIView *prevView, UIView *insertView)

-

virtual void

-

Inserts a new child view behind the current one.

-

Remove (UIView *view)

-

virtual void

-

Removes a child view.

-

RemoveAll ()

-

virtual void

-

Removes all child views.

-

GetTargetView (const Point &point, UIView **last) override

-

virtual void

-

Obtains the target child view that is visible and can respond to touch events based on given coordinates.

-

MoveChildByOffset (int16_t x, int16_t y)

-

virtual void

-

Moves all child views.

-

GetChildrenHead () const

-

UIView *

-

Obtains the first child view in this view group.

-

GetChildrenTail () const

-

UIView *

-

Obtains the last child view in this view group.

-

SetDisallowIntercept (bool flag)

-

void

-

Sets whether this view group is intercepted upon touch events.

-

GetChildById (const char *id) const override

-

UIView *

-

Obtains the target child view with a specified ID.

-

SetAutoSize (bool state)

-

void

-

Sets whether the size of this view group is adaptive to that of all child views.

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnDraw (const Rect &invalidatedArea)

-

virtual void

-

Called when a view is drawn.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void

-

Called after a view is drawn.

-

ReMeasure ()

-

virtual void

-

Remeasures the view size.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool

-

Called when the view stops dragging.

-

OnClickEvent (const ClickEvent &event)

-

virtual void

-

Called when the view is clicked.

-

OnPressEvent (const PressEvent &event)

-

virtual void

-

Called when the view is pressed.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

SetWidth (int16_t width)

-

virtual void

-

Sets the width for the view.

-

GetWidth ()

-

virtual int16_t

-

Obtains the width for the view.

-

SetHeight (int16_t height)

-

virtual void

-

Sets the height for the view.

-

GetHeight ()

-

virtual int16_t

-

Obtains the height for the view.

-

Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- -## Additional Inherited Members - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Additional Inherited Member Name

-

Description

-

GetAllChildRelativeRect () const

-

Obtains the rectangle area of a new view group after being adaptive to the size of all child views.

-

OnChildChanged ()

-

Performs operations needed after a child view is added or removed.

-

childrenHead_

-

Indicates the pointer to the first child view of this view group.

-

childrenTail_

-

Indicates the pointer to the last child view of this view group.

-

childrenNum_

-

Represents the number of child views.

-

isDragging_

-

Specifies the sliding state of this view group.

-

disallowIntercept_

-

Specifies whether this view group is intercepted upon touch events.

-

isAutoSize_

-

Specifies whether the size of this view group is adaptive to that of all child views.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UIDigitalClock.md b/api/api-SmartVision-Devices/OHOS-UIDigitalClock.md deleted file mode 100755 index c597e5beaffbe6650bb4b038c8aea6e31e0be817..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UIDigitalClock.md +++ /dev/null @@ -1,894 +0,0 @@ -# OHOS::UIDigitalClock - -- [Overview](#section758940546165634) -- [Summary](#section917645518165634) -- [Public Types](#pub-types) -- [Public Member Functions](#pub-methods) -- [Additional Inherited Members](#inherited) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Displays time digitally. - -See also -: [UIDigitalClock](OHOS-UIDigitalClock.md) - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Types - - - - - - - - - - - - - - - - -

Public Type Name

-

Description

-

DisplayMode { DISPLAY_12_HOUR_NO_SECONDS, DISPLAY_24_HOUR_NO_SECONDS, DISPLAY_12_HOUR, DISPLAY_24_HOUR }

-

Enumerates the display modes of this digital clock.

-

TimeElement { HOUR_ELEMENT, MINUTE_ELEMENT, SECOND_ELEMENT }

-

Enumerates the time elements of this digital clock.

-

WorkMode { ALWAYS_ON, NORMAL }

-

Enumerates the working modes of this clock.

-
- -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

UIDigitalClock ()

-

-

A default constructor used to create a UIDigitalClock instance.

-

~UIDigitalClock ()

-

virtual

-

A destructor used to delete the UIDigitalClock instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

SetFontId (uint8_t fontId)

-

void

-

Sets the dynamic font ID for this digital clock.

-

SetFont (const char *name, uint8_t size)

-

void

-

Sets the dynamic font for this digital clock.

-

SetColor (ColorType color)

-

void

-

Sets the font color for this digital clock.

-

SetDisplayMode (DisplayMode dm)

-

void

-

Sets the display mode for this digital clock.

-

GetDisplayMode () const

-

DisplayMode

-

Obtains the display mode of this digital clock.

-

DisplayLeadingZero (bool displayLeadingZero)

-

void

-

Sets whether to add 0 before the hour of this digital clock.

-

SetOpacity (uint8_t opacity)

-

void

-

Sets the opacity for this digital clock.

-

GetOpacity () const

-

uint8_t

-

Obtains the opacity of this digital clock.

-

UpdateClock (bool clockInit) override

-

void

-

Updates this digital clock.

-

UIAbstractClock ()

-

-

A default constructor used to create a UIAbstractClock instance.

-

UIAbstractClock (uint8_t hour, uint8_t minute, uint8_t second)

-

-

A constructor used to create a UIAbstractClock instance with time elements (hour, minute and second).

-

~UIAbstractClock ()

-

virtual

-

A destructor used to delete the UIAbstractClock instance.

-

SetTime24Hour (uint8_t hour, uint8_t minute, uint8_t second)

-

void

-

Sets the time in 24-hour format.

-

SetTime12Hour (uint8_t hour, uint8_t minute, uint8_t second, bool am)

-

void

-

Sets the time in 12-hour format.

-

GetCurrentHour () const

-

uint8_t

-

Obtains the current number of hours.

-

GetCurrentMinute () const

-

uint8_t

-

Obtains the current number of minutes.

-

GetCurrentSecond () const

-

uint8_t

-

Obtains the current number of seconds.

-

IncOneSecond ()

-

void

-

Increases the time by one second.

-

SetWorkMode (WorkMode newMode)

-

virtual void

-

Sets the working mode for this clock.

-

GetWorkMode () const

-

virtual WorkMode

-

Obtains the working mode of this clock.

-

UIViewGroup ()

-

-

A default constructor used to create a UIViewGroup instance.

-

~UIViewGroup ()

-

virtual

-

A destructor used to delete the UIViewGroup instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

Add (UIView *view)

-

virtual void

-

Adds a child view.

-

Insert (UIView *prevView, UIView *insertView)

-

virtual void

-

Inserts a new child view behind the current one.

-

Remove (UIView *view)

-

virtual void

-

Removes a child view.

-

RemoveAll ()

-

virtual void

-

Removes all child views.

-

GetTargetView (const Point &point, UIView **last) override

-

virtual void

-

Obtains the target child view that is visible and can respond to touch events based on given coordinates.

-

MoveChildByOffset (int16_t x, int16_t y)

-

virtual void

-

Moves all child views.

-

GetChildrenHead () const

-

UIView *

-

Obtains the first child view in this view group.

-

GetChildrenTail () const

-

UIView *

-

Obtains the last child view in this view group.

-

SetDisallowIntercept (bool flag)

-

void

-

Sets whether this view group is intercepted upon touch events.

-

GetChildById (const char *id) const override

-

UIView *

-

Obtains the target child view with a specified ID.

-

SetAutoSize (bool state)

-

void

-

Sets whether the size of this view group is adaptive to that of all child views.

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnPreDraw (const Rect &invalidatedArea)

-

virtual bool

-

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

-

OnDraw (const Rect &invalidatedArea)

-

virtual void

-

Called when a view is drawn.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void

-

Called after a view is drawn.

-

ReMeasure ()

-

virtual void

-

Remeasures the view size.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool

-

Called when the view stops dragging.

-

OnClickEvent (const ClickEvent &event)

-

virtual void

-

Called when the view is clicked.

-

OnPressEvent (const PressEvent &event)

-

virtual void

-

Called when the view is pressed.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void

-

Sets whether the view is visible.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

SetWidth (int16_t width)

-

virtual void

-

Sets the width for the view.

-

GetWidth ()

-

virtual int16_t

-

Obtains the width for the view.

-

SetHeight (int16_t height)

-

virtual void

-

Sets the height for the view.

-

GetHeight ()

-

virtual int16_t

-

Obtains the height for the view.

-

Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- -## Additional Inherited Members - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Additional Inherited Member Name

-

Description

-

ONE_MINUTE_IN_SECOND = 60

-

Represents 60 seconds per minute.

-

ONE_HOUR_IN_MINUTE = 60

-

Represents 60 minutes per hour.

-

ONE_DAY_IN_HOUR = 24

-

Represents 24 hours per day.

-

HALF_DAY_IN_HOUR = 12

-

Represents 12 hours every half day.

-

GetAllChildRelativeRect () const

-

Obtains the rectangle area of a new view group after being adaptive to the size of all child views.

-

OnChildChanged ()

-

Performs operations needed after a child view is added or removed.

-

currentHour_

-

Represents the current number of hours.

-

currentMinute_

-

Represents the current number of minutes.

-

currentSecond_

-

Represents the current number of seconds.

-

mode_

-

Represents the current working mode of this clock.

-

childrenHead_

-

Indicates the pointer to the first child view of this view group.

-

childrenTail_

-

Indicates the pointer to the last child view of this view group.

-

childrenNum_

-

Represents the number of child views.

-

isDragging_

-

Specifies the sliding state of this view group.

-

disallowIntercept_

-

Specifies whether this view group is intercepted upon touch events.

-

isAutoSize_

-

Specifies whether the size of this view group is adaptive to that of all child views.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UIDumpDomTree.md b/api/api-SmartVision-Devices/OHOS-UIDumpDomTree.md deleted file mode 100755 index c07c557f241204639c8d76a5e8225c3116082ae2..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UIDumpDomTree.md +++ /dev/null @@ -1,87 +0,0 @@ -# OHOS::UIDumpDomTree - -- [Overview](#section1195032736165635) -- [Summary](#section1107489991165635) -- [Public Member Functions](#pub-methods) -- [Static Public Member Functions](#pub-static-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Provides functions for exporting information about a specified DOM node or information about the DOM tree starting from a specified DOM node. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

DumpDomTree (const char *id, const char *path)

-

bool

-

Exports information about a DOM tree starting from a specified DOM node and saves the information to a specified path.

-

DumpDomTree (const char *id)

-

bool

-

Exports information about a DOM tree starting from a specified DOM node and saves the information to the default path. The default path is DEFAULT_DUMP_DOM_TREE_PATH.

-

DumpDomNode (const char *id)

-

char *

-

Exports information about a specified DOM node.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- -## Static Public Member Functions - - - - - - - - - - -

Function

-

Description

-

GetInstance ()

-

static UIDumpDomTree *

-

Obtains an instance in singleton pattern.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UIImageAnimatorView-AnimatorStopListener.md b/api/api-SmartVision-Devices/OHOS-UIImageAnimatorView-AnimatorStopListener.md deleted file mode 100755 index dbac5a3681c62dc6ae1398989d40568785ac8118..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UIImageAnimatorView-AnimatorStopListener.md +++ /dev/null @@ -1,62 +0,0 @@ -# OHOS::UIImageAnimatorView::AnimatorStopListener - -- [Overview](#section447808700165634) -- [Summary](#section438808062165634) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Represents a listener that contains a callback to be invoked when this animator stops. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

~AnimatorStopListener ()

-

virtual

-

A destructor used to delete an AnimatorStopListener instance.

-

OnAnimatorStop (UIView &view)

-

virtual void

-

Called when this animator stops.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UIImageAnimatorView.md b/api/api-SmartVision-Devices/OHOS-UIImageAnimatorView.md deleted file mode 100755 index 682a99fe0c865de4fa8837f47d3fff28876c89f8..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UIImageAnimatorView.md +++ /dev/null @@ -1,853 +0,0 @@ -# OHOS::UIImageAnimatorView - -- [Overview](#section2142144765165634) -- [Summary](#section176200730165634) -- [Data Structures](#nested-classes) -- [Public Member Functions](#pub-methods) -- [Additional Inherited Members](#inherited) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Represents an image animator. - -Images are switched at a specified interval to form an animator. - -See also -: [UIImageView](OHOS-UIImageView.md) - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

AnimatorStopListener

-

Represents a listener that contains a callback to be invoked when this animator stops.

-
- -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

UIImageAnimatorView ()

-

-

A constructor used to create a UIImageAnimatorView instance.

-

~UIImageAnimatorView ()

-

virtual

-

A destructor used to delete the UIImageAnimatorView instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

SetImageAnimatorSrc (const char *imageSrc, uint8_t imageNum, uint16_t timeOfUpdate)

-

void

-

Sets the images and speed for this animator.

-

SetImageAnimatorSrc (const char *imageSrc, uint8_t imageNum)

-

void

-

Sets the images for this animator.

-

SetTimeOfUpdate (uint16_t timeOfUpdate)

-

void

-

Sets the speed for this animator.

-

GetTimeOfUpdate () const

-

uint16_t

-

Obtains the speed of this animator.

-

SetTimeOfPause (uint16_t timeOfPause)

-

void

-

Sets the interval between two playbacks of an infinitely repeated animator.

-

GetTimeOfPause () const

-

uint16_t

-

Obtains the interval between two playbacks of an infinitely repeated animator.

-

GetImageAnimatorSrc () const

-

const ImageAnimatorInfo *

-

Obtains the image array of this frame animator.

-

GetImageAnimatorImageNum () const

-

uint8_t

-

Obtains the number of images.

-

SetSizeFixed (bool fixed)

-

void

-

Sets whether the image size is fixed to the view size.

-

IsSizeFixed () const

-

bool

-

Checks whether the image size is fixed to the view size.

-

SetRepeat (bool repeat)

-

void

-

Sets whether to play this animator for infinite times.

-

IsRepeat () const

-

bool

-

Checks whether this animator is played for infinite times.

-

SetRepeatTimes (uint32_t times)

-

void

-

Sets the playback times for this animator.

-

GetRepeatTimes () const

-

uint32_t

-

Obtains the playback times.

-

GetState () const

-

uint8_t

-

Obtains the current state of this animator.

-

SetReverse (bool reverse)

-

void

-

Sets the playback sequence for this animator.

-

IsReverse () const

-

bool

-

Obtains the playback sequence of this animator.

-

Start ()

-

void

-

Starts this animator.

-

Stop (bool needReset=true)

-

void

-

Stops this animator.

-

Pause ()

-

void

-

Pauses this animator at the current image.

-

Resume ()

-

void

-

Resumes this animator from the current image.

-

SetAnimatorStopListener (AnimatorStopListener *listener)

-

void

-

Sets the listener for the stop of this animator.

-

UIImageView ()

-

-

A default constructor used to create a UIImageView instance.

-

~UIImageView ()

-

virtual

-

A destructor used to delete the UIImageView instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

GetWidth () override

-

int16_t

-

Obtains the width of this image view.

-

GetHeight () override

-

int16_t

-

Obtains the height of this image view.

-

OnPreDraw (const Rect &invalidatedArea) override

-

bool

-

Checks whether this image view needs to be covered to optimize the drawing process.

-

OnDraw (const Rect &invalidatedArea) override

-

void

-

Draws this image view.

-

SetSrc (const char *src)

-

void

-

Sets the image path.

-

SetSrc (const ImageInfo *src)

-

void

-

Sets the image information.

-

SetAutoEnable (bool enable)

-

void

-

Sets whether the image view size needs to be adaptive to the image size.

-

SetBlurLevel (BlurLevel level)

-

void

-

Sets the blur level for this image when it is rotated or scaled.

-

GetBlurLevel () const

-

BlurLevel

-

Obtains the blur level of this image when it is rotated or scaled.

-

SetTransformAlgorithm (TransformAlgorithm algorithm)

-

void

-

Sets the algorithm used for image rotation and scaling.

-

GetTransformAlgorithm () const

-

TransformAlgorithm

-

Obtains the algorithm used for image rotation and scaling.

-

GetPath () const

-

const char *

-

获取图片路径

-

GetImageInfo () const

-

const ImageInfo *

-

获取图片信息

-

GetSrcType () const

-

uint8_t

-

获取图片类型

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void

-

Called after a view is drawn.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool

-

Called when the view stops dragging.

-

OnClickEvent (const ClickEvent &event)

-

virtual void

-

Called when the view is clicked.

-

OnPressEvent (const PressEvent &event)

-

virtual void

-

Called when the view is pressed.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

GetTargetView (const Point &point, UIView **last)

-

virtual void

-

Obtains the top-level view based on specified coordinates.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void

-

Sets whether the view is visible.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

SetWidth (int16_t width)

-

virtual void

-

Sets the width for the view.

-

SetHeight (int16_t height)

-

virtual void

-

Sets the height for the view.

-

Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

GetChildById (const char *id) const

-

virtual UIView *

-

Obtains the child view of a specified ID.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- -## Additional Inherited Members - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Additional Inherited Member Name

-

Description

-

imageWidth_

-

Represents the width of this image.

-

imageHeight_

-

Represents the height of this image.

-

autoEnable_

-

Specifies whether automatic adaptation is enabled.

-

needRefresh_

-

Specifies whether a refresh is needed.

-

colorFormat_: 4

-

Represents the color format of this image.

-

blurLevel_: 2

-

Represents the blur level of this image when it is rotated or scaled.

-

algorithm_: 1

-

Represents the algorithm used for image rotation and scaling.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UIImageView.md b/api/api-SmartVision-Devices/OHOS-UIImageView.md deleted file mode 100755 index 81c9d696c379e44084e0baf0a06ad85dfc24d449..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UIImageView.md +++ /dev/null @@ -1,680 +0,0 @@ -# OHOS::UIImageView - -- [Overview](#section1553377739165634) -- [Summary](#section1768561066165634) -- [Public Member Functions](#pub-methods) -- [Protected Attributes](#pro-attribs) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines the functions related to an image view. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

UIImageView ()

-

-

A default constructor used to create a UIImageView instance.

-

~UIImageView ()

-

virtual

-

A destructor used to delete the UIImageView instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

GetWidth () override

-

int16_t

-

Obtains the width of this image view.

-

GetHeight () override

-

int16_t

-

Obtains the height of this image view.

-

OnPreDraw (const Rect &invalidatedArea) override

-

bool

-

Checks whether this image view needs to be covered to optimize the drawing process.

-

OnDraw (const Rect &invalidatedArea) override

-

void

-

Draws this image view.

-

SetSrc (const char *src)

-

void

-

Sets the image path.

-

SetSrc (const ImageInfo *src)

-

void

-

Sets the image information.

-

SetAutoEnable (bool enable)

-

void

-

Sets whether the image view size needs to be adaptive to the image size.

-

SetBlurLevel (BlurLevel level)

-

void

-

Sets the blur level for this image when it is rotated or scaled.

-

GetBlurLevel () const

-

BlurLevel

-

Obtains the blur level of this image when it is rotated or scaled.

-

SetTransformAlgorithm (TransformAlgorithm algorithm)

-

void

-

Sets the algorithm used for image rotation and scaling.

-

GetTransformAlgorithm () const

-

TransformAlgorithm

-

Obtains the algorithm used for image rotation and scaling.

-

GetPath () const

-

const char *

-

获取图片路径

-

GetImageInfo () const

-

const ImageInfo *

-

获取图片信息

-

GetSrcType () const

-

uint8_t

-

获取图片类型

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void

-

Called after a view is drawn.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool

-

Called when the view stops dragging.

-

OnClickEvent (const ClickEvent &event)

-

virtual void

-

Called when the view is clicked.

-

OnPressEvent (const PressEvent &event)

-

virtual void

-

Called when the view is pressed.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

GetTargetView (const Point &point, UIView **last)

-

virtual void

-

Obtains the top-level view based on specified coordinates.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void

-

Sets whether the view is visible.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

SetWidth (int16_t width)

-

virtual void

-

Sets the width for the view.

-

SetHeight (int16_t height)

-

virtual void

-

Sets the height for the view.

-

Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

GetChildById (const char *id) const

-

virtual UIView *

-

Obtains the child view of a specified ID.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- -## Protected Attributes - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Protected Attribute Name

-

Description

-

imageWidth_

-

Represents the width of this image.

-

imageHeight_

-

Represents the height of this image.

-

autoEnable_

-

Specifies whether automatic adaptation is enabled.

-

needRefresh_

-

Specifies whether a refresh is needed.

-

colorFormat_: 4

-

Represents the color format of this image.

-

blurLevel_: 2

-

Represents the blur level of this image when it is rotated or scaled.

-

algorithm_: 1

-

Represents the algorithm used for image rotation and scaling.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UILabel.md b/api/api-SmartVision-Devices/OHOS-UILabel.md deleted file mode 100755 index 1234342223fcb876589cac85c4c1f51ca822d65e..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UILabel.md +++ /dev/null @@ -1,722 +0,0 @@ -# OHOS::UILabel - -- [Overview](#section1992058238165633) -- [Summary](#section1355340320165633) -- [Public Types](#pub-types) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines the functions for presenting a label in a specified area, setting the style and background color of a label, and setting the display mode of a long label text. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Types - - - - - - - - - - -

Public Type Name

-

Description

-

LineBreakMode : uint8_t { LINE_BREAK_ADAPT = 0, LINE_BREAK_STRETCH, LINE_BREAK_WRAP, LINE_BREAK_ELLIPSIS, LINE_BREAK_MARQUEE, LINE_BREAK_CLIP, LINE_BREAK_MAX }

-

Enumerates the display modes of a long text.

-
- -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

UILabel ()

-

-

A constructor used to create a UILabel instance.

-

~UILabel ()

-

virtual

-

A destructor used to delete the UILabel instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

GetWidth () override

-

int16_t

-

Obtains the width of this label.

-

GetHeight () override

-

int16_t

-

Obtains the height of this label.

-

OnPreDraw (const Rect &invalidatedArea) override

-

bool

-

Checks whether this label needs to be covered before drawing it.

-

OnDraw (const Rect &invalidatedArea) override

-

void

-

Draws this label.

-

SetText (const char *text)

-

void

-

Sets the text content for this label.

-

GetText () const

-

const char *

-

Obtains the text of this label.

-

SetLineBreakMode (const uint8_t lineBreakMode)

-

void

-

Sets the line break mode for this text.

-

GetLineBreakMode () const

-

uint8_t

-

Obtains the line break mode of this text.

-

SetTextColor (ColorType color)

-

void

-

Sets the color for this text.

-

GetTextColor () const

-

ColorType

-

Obtains the color of this text.

-

SetAlign (UITextLanguageAlignment horizontalAlign, UITextLanguageAlignment verticalAlign=TEXT_ALIGNMENT_TOP)

-

void

-

Sets the alignment mode for this text.

-

GetHorAlign () const

-

UITextLanguageAlignment

-

Obtains the horizontal alignment mode.

-

GetVerAlign () const

-

UITextLanguageAlignment

-

Obtains the vertical alignment mode.

-

SetDirect (UITextLanguageDirect direct)

-

void

-

Sets the direction for this text.

-

GetDirect () const

-

UITextLanguageDirect

-

Obtains the direction of this text.

-

SetFontId (uint8_t fontId)

-

void

-

Sets the font ID for this label.

-

GetFontId () const

-

uint8_t

-

Obtains the font ID composed of font name and size.

-

SetFont (const char *name, uint8_t size)

-

void

-

Sets the font for this label.

-

SetRollSpeed (uint16_t speed)

-

void

-

Sets the scroll speed for this text.

-

GetTextWidth ()

-

uint16_t

-

Obtains the width of this text.

-

GetTextHeight ()

-

uint16_t

-

Obtains the height of this text.

-

SetRollStartPos (int16_t pos)

-

void

-

Sets the position where this text starts to roll.

-

GetRollStartPos () const

-

int16_t

-

Obtains the position where this text starts to roll.

-

SetWidth (int16_t width) override

-

void

-

Sets the width for this label.

-

SetHeight (int16_t height) override

-

void

-

Sets the height for this label.

-

SetTextRotation (LabelRotateDegree angle)

-

void

-

Sets the clockwise rotation angle for this text.

-

GetTextRotation () const

-

LabelRotateDegree

-

Obtains the clockwise rotation degree of this text.

-

GetTextRotateDegree () const

-

uint16_t

-

Obtains the number of text rotation degrees.

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void

-

Called after a view is drawn.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool

-

Called when the view stops dragging.

-

OnClickEvent (const ClickEvent &event)

-

virtual void

-

Called when the view is clicked.

-

OnPressEvent (const PressEvent &event)

-

virtual void

-

Called when the view is pressed.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

GetTargetView (const Point &point, UIView **last)

-

virtual void

-

Obtains the top-level view based on specified coordinates.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void

-

Sets whether the view is visible.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

GetChildById (const char *id) const

-

virtual UIView *

-

Obtains the child view of a specified ID.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UILabelButton.md b/api/api-SmartVision-Devices/OHOS-UILabelButton.md deleted file mode 100755 index f4ee9a747f7357f4c465368a3577e1eb188f9f78..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UILabelButton.md +++ /dev/null @@ -1,781 +0,0 @@ -# OHOS::UILabelButton - -- [Overview](#section1326413647165634) -- [Summary](#section665276057165634) -- [Public Member Functions](#pub-methods) -- [Additional Inherited Members](#inherited) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Provides the functions related to a label button. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

UILabelButton ()

-

-

A constructor used to create a UILabelButton instance.

-

~UILabelButton ()

-

virtual

-

A destructor used to delete the UILabelButton instance.

-

OnDraw (const Rect &invalidatedArea) override

-

void

-

Draws a label button.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

SetText (const char *text)

-

void

-

Sets the text for this label button.

-

GetText () const

-

const char *

-

Obtains the text of this label button.

-

SetLablePosition (int16_t x, int16_t y)

-

void

-

Sets the position for this label relative to the button holding it.

-

GetLabelPosition () const

-

Point

-

Obtains the position of this label relative to the button holding it.

-

SetAlign (UITextLanguageAlignment align)

-

void

-

Sets the alignment mode for this text.

-

GetAlign () const

-

UITextLanguageAlignment

-

Obtains the alignment mode of this text.

-

SetDirect (UITextLanguageDirect direct)

-

void

-

Sets the direction for this text.

-

GetDirect () const

-

UITextLanguageDirect

-

Obtains the direction of this text.

-

SetLabelStyle (Style &labelStyle)

-

void

-

Sets the style for this label.

-

SetLabelStyle (uint8_t key, int64_t value)

-

void

-

Sets a style for this label.

-

GetLabelStyle () const

-

const Style &

-

Obtains the style of this label.

-

GetLabelStyle (uint8_t key) const

-

int64_t

-

Obtains the value of a style of this label.

-

SetTextColor (ColorType color)

-

void

-

Sets the color for this text.

-

SetFont (const char *name, uint8_t size)

-

void

-

Sets the font for this text.

-

SetFontId (uint8_t fontId)

-

void

-

Sets the font ID.

-

GetFontId () const

-

uint8_t

-

Obtains the font ID.

-

UIButton ()

-

-

A constructor used to create a UIButton instance.

-

UIButton (const char *id)

-

-

A constructor used to create a UIButton instance based on the button ID.

-

~UIButton ()

-

virtual

-

A destructor used to delete the UIButton instance.

-

OnPreDraw (const Rect &invalidatedArea) override

-

bool

-

Do something before draw, this function will be invoked mainly to check if this view need to cover invalidate area so render manager can decide which layer to draw firstly.

-

OnPressEvent (const PressEvent &event) override

-

void

-

Executes the press event action.

-

OnReleaseEvent (const ReleaseEvent &event) override

-

void

-

Executes the press release event action.

-

OnCancelEvent (const CancelEvent &event) override

-

void

-

Executes the cancel event action.

-

SetImageSrc (const char *defaultImgSrc, const char *triggeredImgSrc)

-

void

-

Sets the image for this button.

-

SetImageSrc (const ImageInfo *defaultImgSrc, const ImageInfo *triggeredImgSrc)

-

void

-

Sets the image for this button.

-

SetImagePosition (const int16_t x, const int16_t y)

-

void

-

Sets the position for this image.

-

GetImageX () const

-

int16_t

-

Obtains the x-coordinate of this image.

-

GetImageY () const

-

int16_t

-

Obtains the y-coordinate of this image.

-

GetCurImageSrc () const

-

const Image *

-

Obtains the image for the current button state.

-

GetWidth () override

-

int16_t

-

Obtains the width of this image.

-

GetHeight () override

-

int16_t

-

Obtains the height of this image.

-

SetWidth (int16_t width) override

-

void

-

Sets the width for this image.

-

SetHeight (int16_t height) override

-

void

-

Sets the height for this image.

-

GetContentRect () override

-

virtual Rect

-

Obtains a rectangular area that contains coordinate information.

-

GetStyle (uint8_t key) const override

-

int64_t

-

Obtains the value of a style.

-

SetStyle (uint8_t key, int64_t value) override

-

void

-

Sets a style.

-

GetStyleForState (uint8_t key, ButtonState state) const

-

int64_t

-

Obtains the style of a button in a specific state.

-

SetStyleForState (uint8_t key, int64_t value, ButtonState state)

-

void

-

Sets the style for a button in a specific state.

-

Disable ()

-

void

-

Disables this button.

-

Enable ()

-

void

-

Enables this button.

-

SetStateForStyle (ButtonState state)

-

void

-

Sets the state for a button. After the setting, calling SetStyle will change the style of this button, but not its state.

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void

-

Called after a view is drawn.

-

ReMeasure ()

-

virtual void

-

Remeasures the view size.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool

-

Called when the view stops dragging.

-

OnClickEvent (const ClickEvent &event)

-

virtual void

-

Called when the view is clicked.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

GetTargetView (const Point &point, UIView **last)

-

virtual void

-

Obtains the top-level view based on specified coordinates.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void

-

Sets whether the view is visible.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

GetChildById (const char *id) const

-

virtual UIView *

-

Obtains the child view of a specified ID.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- -## Additional Inherited Members - - - - - - - - - - - - - -

Additional Inherited Member Name

-

Description

-

ButtonImageSrc : uint8_t

-

Enumerates the images for different button states.

-

ButtonState : uint8_t

-

Enumerates the states of this button.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UIList.md b/api/api-SmartVision-Devices/OHOS-UIList.md deleted file mode 100755 index 0f763033694033d2a27e80d224ba17b93a47b2e0..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UIList.md +++ /dev/null @@ -1,861 +0,0 @@ -# OHOS::UIList - -- [Overview](#section412399980165634) -- [Summary](#section301810272165634) -- [Public Member Functions](#pub-methods) -- [Additional Inherited Members](#inherited) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Represents a scrollable list which is used with the adapter [AbstractAdapter](OHOS-AbstractAdapter.md) to implement scrolling, inertial scrolling, automatic alignment, and invoking of a callback when a child view is selected at the preset position as this list scrolls. - -You need to override [AbstractAdapter](OHOS-AbstractAdapter.md) to implement functions for setting and saving data, obtaining data quantity, and creating child views. **[UIList](OHOS-UIList.md)** is used when there is a large number of child views with a fixed format. This list automatically reclaims the child views removed out of the current view as it scrolls so that as many as child views can be displayed with a lower memory consumption. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

UIList ()

-

-

A constructor used to create a UIList instance in the vertical direction.

-

UIList (uint8_t direction)

-

-

A constructor used to create a UIList instance in the specified direction.

-

~UIList ()

-

virtual

-

A destructor used to delete the UIList instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

OnDragEvent (const DragEvent &event) override

-

bool

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event) override

-

bool

-

Called when the view stops dragging.

-

OnPressEvent (const PressEvent &event) override

-

void

-

Called when the view is pressed.

-

SetAdapter (AbstractAdapter *adapter)

-

void

-

Sets the adapter for this list. The content of this list is initialized when the adapter is set.

-

MoveChildByOffset (int16_t x, int16_t y) override

-

virtual void

-

Moves the position of all child views.

-

ScrollTo (uint16_t index)

-

void

-

Scrolls to change the index of the first row or column of the current view.

-

ScrollBy (int16_t distance)

-

void

-

Scrolls the content in this list.

-

SetStartIndex (uint16_t index)

-

void

-

Sets the start index for this list.

-

GetStartIndex () const

-

uint16_t

-

Obtains the start index of this list. The default value is 0.

-

SetLoopState (bool state)

-

void

-

Sets the loop state for this list, in which a loop scroll is possible since the top and bottom of the list are connected together.

-

GetLoopState () const

-

bool

-

Checks whether this list is in a loop state.

-

SetSelectPosition (uint16_t position)

-

void

-

Sets the position where a child view is selected as this list scrolls.

-

GetSelectView ()

-

UIView *

-

Obtains the child view being selected at the preset position.

-

SetScrollStateListener (ListScrollListener *scrollListener)

-

void

-

Sets the listener that contains a callback to be invoked when a child view is selected as this list scrolls.

-

RefreshList ()

-

void

-

Refreshes this list. The number of child views in the current view is fixed and the positions of those reserved child views as this list scrolls remain unchanged.

-

EnableAutoAlign (bool state)

-

void

-

Sets the automatic alignment state for this list. When a scroll stops, a child view is selected and its position is automatically aligned with the preset position.

-

RemoveAll () override

-

void

-

Removes all child views.

-

UIAbstractScroll ()

-

-

A constructor used to create a UIAbstractScroll instance.

-

~UIAbstractScroll ()

-

virtual

-

A destructor used to delete the UIAbstractScroll instance.

-

GetDirection () const

-

uint8_t

-

Obtains the scroll direction.

-

SetScrollBlankSize (uint16_t size)

-

void

-

Sets the blank size for this scroll view.

-

SetMaxScrollDistance (uint16_t distance)

-

void

-

Sets the maximum scroll distance after a finger lifts the screen.

-

SetReboundSize (uint16_t size)

-

void

-

Sets the rebound size, which is the distance a knob moves after being released when it reaches the end of a scrollbar.

-

GetMaxScrollDistance () const

-

uint16_t

-

Obtains the maximum scroll distance after a finger lifts the screen.

-

SetDragFunc (EasingFunc func)

-

void

-

Sets the easing function that specifies a scroll animation after a finger lifts the screen.

-

SetThrowDrag (bool throwDrag)

-

void

-

Sets whether to continue scrolling after a finger lifts the screen.

-

SetDragACCLevel (uint16_t value)

-

void

-

Sets the drag acceleration.

-

GetDragACCLevel () const

-

uint8_t

-

Obtains the drag acceleration.

-

SetSwipeACCLevel (uint16_t value)

-

void

-

Sets the compensation distance after a finger lifts the screen.

-

GetSwipeACCLevel () const

-

uint8_t

-

Obtains the compensation distance after a finger lifts the screen.

-

UIViewGroup ()

-

-

A default constructor used to create a UIViewGroup instance.

-

~UIViewGroup ()

-

virtual

-

A destructor used to delete the UIViewGroup instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

Add (UIView *view)

-

virtual void

-

Adds a child view.

-

Insert (UIView *prevView, UIView *insertView)

-

virtual void

-

Inserts a new child view behind the current one.

-

Remove (UIView *view)

-

virtual void

-

Removes a child view.

-

GetTargetView (const Point &point, UIView **last) override

-

virtual void

-

Obtains the target child view that is visible and can respond to touch events based on given coordinates.

-

GetChildrenHead () const

-

UIView *

-

Obtains the first child view in this view group.

-

GetChildrenTail () const

-

UIView *

-

Obtains the last child view in this view group.

-

SetDisallowIntercept (bool flag)

-

void

-

Sets whether this view group is intercepted upon touch events.

-

GetChildById (const char *id) const override

-

UIView *

-

Obtains the target child view with a specified ID.

-

SetAutoSize (bool state)

-

void

-

Sets whether the size of this view group is adaptive to that of all child views.

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnPreDraw (const Rect &invalidatedArea)

-

virtual bool

-

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

-

OnDraw (const Rect &invalidatedArea)

-

virtual void

-

Called when a view is drawn.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void

-

Called after a view is drawn.

-

ReMeasure ()

-

virtual void

-

Remeasures the view size.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnClickEvent (const ClickEvent &event)

-

virtual void

-

Called when the view is clicked.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void

-

Sets whether the view is visible.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

SetWidth (int16_t width)

-

virtual void

-

Sets the width for the view.

-

GetWidth ()

-

virtual int16_t

-

Obtains the width for the view.

-

SetHeight (int16_t height)

-

virtual void

-

Sets the height for the view.

-

GetHeight ()

-

virtual int16_t

-

Obtains the height for the view.

-

Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- -## Additional Inherited Members - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Additional Inherited Member Name

-

Description

-

GetAllChildRelativeRect () const

-

Obtains the rectangle area of a new view group after being adaptive to the size of all child views.

-

OnChildChanged ()

-

Performs operations needed after a child view is added or removed.

-

childrenHead_

-

Indicates the pointer to the first child view of this view group.

-

childrenTail_

-

Indicates the pointer to the last child view of this view group.

-

childrenNum_

-

Represents the number of child views.

-

isDragging_

-

Specifies the sliding state of this view group.

-

disallowIntercept_

-

Specifies whether this view group is intercepted upon touch events.

-

isAutoSize_

-

Specifies whether the size of this view group is adaptive to that of all child views.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UIPicker-SelectedListener.md b/api/api-SmartVision-Devices/OHOS-UIPicker-SelectedListener.md deleted file mode 100755 index 2258c41196ecb8126a906f10d15e3a9cbb01001b..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UIPicker-SelectedListener.md +++ /dev/null @@ -1,68 +0,0 @@ -# OHOS::UIPicker::SelectedListener - -- [Overview](#section141917058165634) -- [Summary](#section1299308475165634) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines the listener used by a picker. This listener is triggered when an item is selected after sliding stops. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

SelectedListener ()

-

-

A constructor used to create a SelectedListener instance.

-

~SelectedListener ()

-

virtual

-

A destructor used to delete the SelectedListener instance.

-

OnPickerStoped (UIPicker &picker)

-

virtual void

-

Called when an item is selected after sliding stops. This function is implemented by applications.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UIPicker.md b/api/api-SmartVision-Devices/OHOS-UIPicker.md deleted file mode 100755 index e8ea6a088ef223bcdf9f3b242f71a1cca87723e7..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UIPicker.md +++ /dev/null @@ -1,829 +0,0 @@ -# OHOS::UIPicker - -- [Overview](#section916326350165634) -- [Summary](#section320523960165634) -- [Data Structures](#nested-classes) -- [Public Member Functions](#pub-methods) -- [Additional Inherited Members](#inherited) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines a picker. Multiple texts or numbers can be put into a sliding list for selection. The selected text or numbers are highlighted. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

SelectedListener

-

Defines the listener used by a picker. This listener is triggered when an item is selected after sliding stops.

-
- -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

UIPicker ()

-

-

A constructor used to create a UIPicker instance.

-

~UIPicker ()

-

virtual

-

A destructor used to delete the UIPicker instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

OnPreDraw (const Rect &invalidatedArea) override

-

bool

-

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

-

SetValues (const char *value[], uint16_t count)

-

bool

-

Sets dynamic text data in the picker by using a string array.

-

SetValues (int16_t start, int16_t end)

-

bool

-

Sets the numeric data in the picker by using a given numeric range.

-

ClearValues ()

-

virtual void

-

Clears all values in the picker.

-

SetFontId (uint8_t backgroundFontId, uint8_t highlightFontId)

-

void

-

Sets the font IDs of dynamic text, which is the string array set through SetValues.

-

SetBackgroundFont (const char *name, uint8_t size)

-

void

-

Sets the font name and size for the background text.

-

SetHighlightFont (const char *name, uint8_t size)

-

void

-

Sets the font name and size for the highlighted text.

-

GetBackgroundFontId () const

-

uint16_t

-

Obtains the font ID of the background text.

-

GetHighlightFontId () const

-

uint16_t

-

Obtains the font ID of the highlighted text.

-

SetTextColor (ColorType backgroundColor, ColorType highlightColor)

-

void

-

Sets the text color.

-

GetBackgroundTextColor () const

-

ColorType

-

Obtains the color of the background text.

-

GetHighlightTextColor () const

-

ColorType

-

Obtains the color of the highlighted text.

-

SetSelected (uint16_t index)

-

bool

-

Sets the index of the item currently selected in the picker.

-

GetSelected () const

-

uint16_t

-

Obtains the index of the item currently selected in the picker.

-

SetItemHeight (int16_t height)

-

void

-

Sets the height of each item in the picker.

-

SetWidth (int16_t width) override

-

void

-

Sets the width for this component.

-

SetHeight (int16_t height) override

-

void

-

Sets the height for this component.

-

SetLoopState (bool state)

-

void

-

Sets whether a picker can slide cyclically.

-

RegisterSelectedListener (SelectedListener *pickerListener)

-

void

-

Registers a listener for a selected event.

-

SetDirect (UITextLanguageDirect direct)

-

void

-

Sets the text direction.

-

SetTextFormatter (TextFormatter *formatter)

-

void

-

Sets the text formatter.

-

UIViewGroup ()

-

-

A default constructor used to create a UIViewGroup instance.

-

~UIViewGroup ()

-

virtual

-

A destructor used to delete the UIViewGroup instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

Add (UIView *view)

-

virtual void

-

Adds a child view.

-

Insert (UIView *prevView, UIView *insertView)

-

virtual void

-

Inserts a new child view behind the current one.

-

Remove (UIView *view)

-

virtual void

-

Removes a child view.

-

RemoveAll ()

-

virtual void

-

Removes all child views.

-

GetTargetView (const Point &point, UIView **last) override

-

virtual void

-

Obtains the target child view that is visible and can respond to touch events based on given coordinates.

-

MoveChildByOffset (int16_t x, int16_t y)

-

virtual void

-

Moves all child views.

-

GetChildrenHead () const

-

UIView *

-

Obtains the first child view in this view group.

-

GetChildrenTail () const

-

UIView *

-

Obtains the last child view in this view group.

-

SetDisallowIntercept (bool flag)

-

void

-

Sets whether this view group is intercepted upon touch events.

-

GetChildById (const char *id) const override

-

UIView *

-

Obtains the target child view with a specified ID.

-

SetAutoSize (bool state)

-

void

-

Sets whether the size of this view group is adaptive to that of all child views.

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnDraw (const Rect &invalidatedArea)

-

virtual void

-

Called when a view is drawn.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void

-

Called after a view is drawn.

-

ReMeasure ()

-

virtual void

-

Remeasures the view size.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool

-

Called when the view stops dragging.

-

OnClickEvent (const ClickEvent &event)

-

virtual void

-

Called when the view is clicked.

-

OnPressEvent (const PressEvent &event)

-

virtual void

-

Called when the view is pressed.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void

-

Sets whether the view is visible.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

GetWidth ()

-

virtual int16_t

-

Obtains the width for the view.

-

GetHeight ()

-

virtual int16_t

-

Obtains the height for the view.

-

Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- -## Additional Inherited Members - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Additional Inherited Member Name

-

Description

-

GetAllChildRelativeRect () const

-

Obtains the rectangle area of a new view group after being adaptive to the size of all child views.

-

OnChildChanged ()

-

Performs operations needed after a child view is added or removed.

-

childrenHead_

-

Indicates the pointer to the first child view of this view group.

-

childrenTail_

-

Indicates the pointer to the last child view of this view group.

-

childrenNum_

-

Represents the number of child views.

-

isDragging_

-

Specifies the sliding state of this view group.

-

disallowIntercept_

-

Specifies whether this view group is intercepted upon touch events.

-

isAutoSize_

-

Specifies whether the size of this view group is adaptive to that of all child views.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UIRadioButton.md b/api/api-SmartVision-Devices/OHOS-UIRadioButton.md deleted file mode 100755 index d3a945a3606b2aad6d9facaa079fc03f912af66f..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UIRadioButton.md +++ /dev/null @@ -1,661 +0,0 @@ -# OHOS::UIRadioButton - -- [Overview](#section669252138165634) -- [Summary](#section343087513165634) -- [Public Member Functions](#pub-methods) -- [Additional Inherited Members](#inherited) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Represents a radio button. - -Only one option can be selected with the radio button. - -See also -: [UICheckBox](OHOS-UICheckBox.md) - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

UIRadioButton ()

-

-

A constructor used to create a UIRadioButton instance.

-

UIRadioButton (const char *name)

-

-

Default constructor.

-

~UIRadioButton ()

-

virtual

-

A destructor used to delete the UIRadioButton instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the component type.

-

OnPreDraw (const Rect &invalidatedArea) override

-

bool

-

Do something before draw, this function will be invoked mainly to check if this view need to cover invalidate area so render manager can decide which layer to draw firstly.

-

OnClickEvent (const ClickEvent &event) override

-

void

-

Executes the click event action OnClickEvent will reverse the selected state of checkbox. Example: If the check box is selected, the checkbox status is changed to Unselected after the click action is taken.

-

SetName (const char *name)

-

void

-

Sets the name for this radio button.

-

GetName () const

-

const char *

-

Obtains the name of this radio button.

-

UICheckBox ()

-

-

A constructor used to create a UICheckBox instance.

-

~UICheckBox ()

-

virtual

-

A destructor used to delete the UICheckBox instance.

-

SetOnChangeListener (OnChangeListener *onStateChangeListener)

-

void

-

Sets the listener for this check box.

-

OnDraw (const Rect &invalidatedArea) override

-

void

-

Executes the draw action Ondraw invokes the rendering function provided by the underlying layer to draw pictures based on the selected status of the checkbox.

-

SetImages (const char *selectedImageSrc, const char *unselectedImageSrc)

-

virtual void

-

Sets the images for this check box.

-

SetImages (const ImageInfo *selectedImageSrc, const ImageInfo *unselectedImageSrc)

-

virtual void

-

Sets the images for this check box.

-

GetState () const

-

UICheckBoxState

-

Obtains the state of this check box.

-

SetState (UICheckBoxState state)

-

void

-

Sets the state for this check box.

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void

-

Called after a view is drawn.

-

ReMeasure ()

-

virtual void

-

Remeasures the view size.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool

-

Called when the view stops dragging.

-

OnPressEvent (const PressEvent &event)

-

virtual void

-

Called when the view is pressed.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

GetTargetView (const Point &point, UIView **last)

-

virtual void

-

Obtains the top-level view based on specified coordinates.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void

-

Sets whether the view is visible.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

SetWidth (int16_t width)

-

virtual void

-

Sets the width for the view.

-

GetWidth ()

-

virtual int16_t

-

Obtains the width for the view.

-

SetHeight (int16_t height)

-

virtual void

-

Sets the height for the view.

-

GetHeight ()

-

virtual int16_t

-

Obtains the height for the view.

-

Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

GetChildById (const char *id) const

-

virtual UIView *

-

Obtains the child view of a specified ID.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- -## Additional Inherited Members - - - - - - - - - - -

Additional Inherited Member Name

-

Description

-

UICheckBoxState : uint8_t

-

Enumerates the states of a check box.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UIRepeatButton.md b/api/api-SmartVision-Devices/OHOS-UIRepeatButton.md deleted file mode 100755 index bd2316b01a78bdddbe53ff98a96b4f47f977a58b..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UIRepeatButton.md +++ /dev/null @@ -1,702 +0,0 @@ -# OHOS::UIRepeatButton - -- [Overview](#section385405716165634) -- [Summary](#section275248783165634) -- [Public Member Functions](#pub-methods) -- [Additional Inherited Members](#inherited) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Represents a repeat button. - -If a repeat button is clicked and hold, the click event is triggered continuously. - -See also -: [UIButton](OHOS-UIButton.md) - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

UIRepeatButton ()

-

-

A constructor used to create a UIRepeatButton instance.

-

~UIRepeatButton ()

-

virtual

-

A destructor used to delete the UIRepeatButton instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the component type.

-

SetInterval (uint16_t interval)

-

virtual void

-

Sets the interval between two consecutive click events.

-

GetInterval () const

-

virtual uint16_t

-

Obtains the interval between two consecutive click events.

-

OnClickEvent (const ClickEvent &event) override

-

virtual void

-

The action of click event.

-

OnReleaseEvent (const ReleaseEvent &event) override

-

virtual void

-

The action of release event.

-

OnLongPressEvent (const LongPressEvent &event) override

-

virtual bool

-

The action of long press event.

-

HandleTickEvent ()

-

void

-

handle the event of long pressing.

-

UIButton ()

-

-

A constructor used to create a UIButton instance.

-

UIButton (const char *id)

-

-

A constructor used to create a UIButton instance based on the button ID.

-

~UIButton ()

-

virtual

-

A destructor used to delete the UIButton instance.

-

OnPreDraw (const Rect &invalidatedArea) override

-

bool

-

Do something before draw, this function will be invoked mainly to check if this view need to cover invalidate area so render manager can decide which layer to draw firstly.

-

OnPressEvent (const PressEvent &event) override

-

void

-

Executes the press event action.

-

OnCancelEvent (const CancelEvent &event) override

-

void

-

Executes the cancel event action.

-

SetImageSrc (const char *defaultImgSrc, const char *triggeredImgSrc)

-

void

-

Sets the image for this button.

-

SetImageSrc (const ImageInfo *defaultImgSrc, const ImageInfo *triggeredImgSrc)

-

void

-

Sets the image for this button.

-

SetImagePosition (const int16_t x, const int16_t y)

-

void

-

Sets the position for this image.

-

GetImageX () const

-

int16_t

-

Obtains the x-coordinate of this image.

-

GetImageY () const

-

int16_t

-

Obtains the y-coordinate of this image.

-

GetCurImageSrc () const

-

const Image *

-

Obtains the image for the current button state.

-

GetWidth () override

-

int16_t

-

Obtains the width of this image.

-

GetHeight () override

-

int16_t

-

Obtains the height of this image.

-

SetWidth (int16_t width) override

-

void

-

Sets the width for this image.

-

SetHeight (int16_t height) override

-

void

-

Sets the height for this image.

-

GetContentRect () override

-

virtual Rect

-

Obtains a rectangular area that contains coordinate information.

-

GetStyle (uint8_t key) const override

-

int64_t

-

Obtains the value of a style.

-

SetStyle (uint8_t key, int64_t value) override

-

void

-

Sets a style.

-

GetStyleForState (uint8_t key, ButtonState state) const

-

int64_t

-

Obtains the style of a button in a specific state.

-

SetStyleForState (uint8_t key, int64_t value, ButtonState state)

-

void

-

Sets the style for a button in a specific state.

-

Disable ()

-

void

-

Disables this button.

-

Enable ()

-

void

-

Enables this button.

-

SetStateForStyle (ButtonState state)

-

void

-

Sets the state for a button. After the setting, calling SetStyle will change the style of this button, but not its state.

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void

-

Called after a view is drawn.

-

ReMeasure ()

-

virtual void

-

Remeasures the view size.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool

-

Called when the view stops dragging.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

GetTargetView (const Point &point, UIView **last)

-

virtual void

-

Obtains the top-level view based on specified coordinates.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void

-

Sets whether the view is visible.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

GetChildById (const char *id) const

-

virtual UIView *

-

Obtains the child view of a specified ID.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- -## Additional Inherited Members - - - - - - - - - - - - - -

Additional Inherited Member Name

-

Description

-

ButtonImageSrc : uint8_t

-

Enumerates the images for different button states.

-

ButtonState : uint8_t

-

Enumerates the states of this button.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UIScrollView-OnScrollListener.md b/api/api-SmartVision-Devices/OHOS-UIScrollView-OnScrollListener.md deleted file mode 100755 index 831a11b08a1d307857fc6541a0dc63161f164fab..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UIScrollView-OnScrollListener.md +++ /dev/null @@ -1,80 +0,0 @@ -# OHOS::UIScrollView::OnScrollListener - -- [Overview](#section756313590165634) -- [Summary](#section1844655871165634) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Represents a listener that contains a callback to be invoked upon scroll state changes. The state can either be **SCROLL\_STATE\_STOP** or **SCROLL\_STATE\_MOVE**. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

OnScrollListener ()

-

-

A constructor used to create an OnScrollListener instance with the default scroll state SCROLL_STATE_STOP.

-

~OnScrollListener ()

-

virtual

-

A destructor used to delete the OnScrollListener instance.

-

OnScrollStart ()

-

virtual void

-

Called when a scroll starts.

-

OnScrollEnd ()

-

virtual void

-

Called when a scroll ends.

-

GetScrollState () const

-

uint8_t

-

Obtains the scroll state of this view.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UIScrollView.md b/api/api-SmartVision-Devices/OHOS-UIScrollView.md deleted file mode 100755 index d31161be9585bf8a7c049c4ae4b7ad3f735bf60d..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UIScrollView.md +++ /dev/null @@ -1,850 +0,0 @@ -# OHOS::UIScrollView - -- [Overview](#section1047639352165634) -- [Summary](#section263081741165634) -- [Data Structures](#nested-classes) -- [Public Member Functions](#pub-methods) -- [Additional Inherited Members](#inherited) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Supports horizontal or vertical scroll of child views. This class is inherited from [UIAbstractScroll](OHOS-UIAbstractScroll.md). - -Horizontal or vertical scroll occurs only when the width or height of the child view is greater than that of the **[UIScrollView](OHOS-UIScrollView.md)**. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

OnScrollListener

-

Represents a listener that contains a callback to be invoked upon scroll state changes. The state can either be SCROLL_STATE_STOP or SCROLL_STATE_MOVE.

-
- -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

UIScrollView ()

-

-

A constructor used to create a UIScrollView instance, with both horizontal and vertical scrolls supported.

-

~UIScrollView ()

-

virtual

-

A destructor used to delete the UIScrollView instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

OnPostDraw (const Rect &invalidatedArea) override

-

void

-

Called after a view is drawn.

-

OnDragEvent (const DragEvent &event) override

-

bool

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event) override

-

bool

-

Called when the view stops dragging.

-

OnPressEvent (const PressEvent &event) override

-

void

-

Called when the view is pressed.

-

ScrollBy (int16_t xDistance, int16_t yDistance)

-

void

-

Scrolls the content of this view.

-

SetScrollbarWidth (uint8_t width)

-

void

-

Sets the width for this scroll bar.

-

SetHorizontalScrollState (bool state)

-

void

-

Sets whether a horizontal scroll is enabled.

-

GetHorizontalScrollState () const

-

bool

-

Checks whether a horizontal scroll is enabled.

-

SetVerticalScrollState (bool state)

-

void

-

Sets whether a vertical scroll is enabled.

-

GetVerticalScrollState () const

-

bool

-

Checks whether a vertical scroll is enabled.

-

SetXScrollBarVisible (bool state)

-

void

-

Sets whether the horizontal scroll bar is visible.

-

SetYScrollBarVisible (bool state)

-

void

-

Sets whether the vertical scroll bar is visible.

-

RegisterScrollListener (OnScrollListener *scrollListener)

-

void

-

Registers a listener that contains a callback to be invoked upon scroll state changes.

-

UIAbstractScroll ()

-

-

A constructor used to create a UIAbstractScroll instance.

-

~UIAbstractScroll ()

-

virtual

-

A destructor used to delete the UIAbstractScroll instance.

-

GetDirection () const

-

uint8_t

-

Obtains the scroll direction.

-

SetScrollBlankSize (uint16_t size)

-

void

-

Sets the blank size for this scroll view.

-

SetMaxScrollDistance (uint16_t distance)

-

void

-

Sets the maximum scroll distance after a finger lifts the screen.

-

SetReboundSize (uint16_t size)

-

void

-

Sets the rebound size, which is the distance a knob moves after being released when it reaches the end of a scrollbar.

-

GetMaxScrollDistance () const

-

uint16_t

-

Obtains the maximum scroll distance after a finger lifts the screen.

-

SetDragFunc (EasingFunc func)

-

void

-

Sets the easing function that specifies a scroll animation after a finger lifts the screen.

-

SetThrowDrag (bool throwDrag)

-

void

-

Sets whether to continue scrolling after a finger lifts the screen.

-

MoveChildByOffset (int16_t offsetX, int16_t offsetY) override

-

void

-

Moves the position of all child views.

-

SetDragACCLevel (uint16_t value)

-

void

-

Sets the drag acceleration.

-

GetDragACCLevel () const

-

uint8_t

-

Obtains the drag acceleration.

-

SetSwipeACCLevel (uint16_t value)

-

void

-

Sets the compensation distance after a finger lifts the screen.

-

GetSwipeACCLevel () const

-

uint8_t

-

Obtains the compensation distance after a finger lifts the screen.

-

UIViewGroup ()

-

-

A default constructor used to create a UIViewGroup instance.

-

~UIViewGroup ()

-

virtual

-

A destructor used to delete the UIViewGroup instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

Add (UIView *view)

-

virtual void

-

Adds a child view.

-

Insert (UIView *prevView, UIView *insertView)

-

virtual void

-

Inserts a new child view behind the current one.

-

Remove (UIView *view)

-

virtual void

-

Removes a child view.

-

RemoveAll ()

-

virtual void

-

Removes all child views.

-

GetTargetView (const Point &point, UIView **last) override

-

virtual void

-

Obtains the target child view that is visible and can respond to touch events based on given coordinates.

-

GetChildrenHead () const

-

UIView *

-

Obtains the first child view in this view group.

-

GetChildrenTail () const

-

UIView *

-

Obtains the last child view in this view group.

-

SetDisallowIntercept (bool flag)

-

void

-

Sets whether this view group is intercepted upon touch events.

-

GetChildById (const char *id) const override

-

UIView *

-

Obtains the target child view with a specified ID.

-

SetAutoSize (bool state)

-

void

-

Sets whether the size of this view group is adaptive to that of all child views.

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnPreDraw (const Rect &invalidatedArea)

-

virtual bool

-

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

-

OnDraw (const Rect &invalidatedArea)

-

virtual void

-

Called when a view is drawn.

-

ReMeasure ()

-

virtual void

-

Remeasures the view size.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnClickEvent (const ClickEvent &event)

-

virtual void

-

Called when the view is clicked.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void

-

Sets whether the view is visible.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

SetWidth (int16_t width)

-

virtual void

-

Sets the width for the view.

-

GetWidth ()

-

virtual int16_t

-

Obtains the width for the view.

-

SetHeight (int16_t height)

-

virtual void

-

Sets the height for the view.

-

GetHeight ()

-

virtual int16_t

-

Obtains the height for the view.

-

Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- -## Additional Inherited Members - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Additional Inherited Member Name

-

Description

-

GetAllChildRelativeRect () const

-

Obtains the rectangle area of a new view group after being adaptive to the size of all child views.

-

childrenHead_

-

Indicates the pointer to the first child view of this view group.

-

childrenTail_

-

Indicates the pointer to the last child view of this view group.

-

childrenNum_

-

Represents the number of child views.

-

isDragging_

-

Specifies the sliding state of this view group.

-

disallowIntercept_

-

Specifies whether this view group is intercepted upon touch events.

-

isAutoSize_

-

Specifies whether the size of this view group is adaptive to that of all child views.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UISlider-UISliderEventListener.md b/api/api-SmartVision-Devices/OHOS-UISlider-UISliderEventListener.md deleted file mode 100755 index b3c4fc6547eb4c48187089c69545a21f4eff5077..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UISlider-UISliderEventListener.md +++ /dev/null @@ -1,73 +0,0 @@ -# OHOS::UISlider::UISliderEventListener - -- [Overview](#section1283742170165634) -- [Summary](#section232933391165634) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Represents the listener for a slider change. - -This is an inner class of **[UISlider](OHOS-UISlider.md)** used to listen for slider events and invoke the callback function. - -See also -: [UISlider](OHOS-UISlider.md) - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

~UISliderEventListener ()

-

virtual

-

A destructor used to delete the UISliderEventListener instance.

-

OnChange (int16_t value)

-

virtual void

-

Called when the slider is dragged or clicked. This is a virtual function, which needs your implementation.

-

OnRelease (int16_t value)

-

virtual void

-

Called when the slider is released. This is a virtual function, which needs your implementation.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UISlider.md b/api/api-SmartVision-Devices/OHOS-UISlider.md deleted file mode 100755 index 8342f6ea87ef975818ad094d4330f29aa43a1b0f..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UISlider.md +++ /dev/null @@ -1,859 +0,0 @@ -# OHOS::UISlider - -- [Overview](#section1422396766165634) -- [Summary](#section229199819165634) -- [Data Structures](#nested-classes) -- [Public Member Functions](#pub-methods) -- [Additional Inherited Members](#inherited) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Represents a slider. - -Users can drag or click the knob to adjust the progress of an event. - -See also -: [UIBoxProgress](OHOS-UIBoxProgress.md) - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

UISliderEventListener

-

Represents the listener for a slider change.

-
- -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

UISlider ()

-

-

A constructor used to create a UISlider instance.

-

~UISlider ()

-

virtual

-

A destructor used to delete the UISlider instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

SetKnobWidth (int16_t width)

-

void

-

Sets the width for this knob.

-

GetKnobWidth ()

-

int16_t

-

Obtains the knob width.

-

SetImage (const ImageInfo *backgroundImage, const ImageInfo *foregroundImage, const ImageInfo *knobImage)

-

void

-

Sets the images as pixel maps for this slider, including the background, foreground, and knob images.

-

SetImage (const char *backgroundImage, const char *foregroundImage, const char *knobImage)

-

void

-

Sets the images for this slider, including the background, foreground, and knob images.

-

SetSliderColor (const ColorType backgroundColor, const ColorType foregroundColor, const ColorType knobColor)

-

void

-

Sets the colors for this slider, including the background, foreground, and knob colors.

-

SetSliderRadius (int16_t backgroundRadius, int16_t foregroundRadius, int16_t knobRadius)

-

void

-

Sets the corner radiuses for this slider, including the background, foreground, and knob corner radiuses.

-

SetKnobStyle (const Style &style)

-

void

-

Sets the knob style.

-

SetKnobStyle (uint8_t key, int64_t value)

-

void

-

Sets a knob style.

-

GetKnobStyle () const

-

const Style &

-

Obtains the knob style.

-

GetKnobStyle (uint8_t key) const

-

int64_t

-

Obtains the value of a knob style.

-

OnClickEvent (const ClickEvent &event) override

-

void

-

Called when the view is clicked.

-

OnDragEvent (const DragEvent &event) override

-

bool

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event) override

-

bool

-

Called when the view stops dragging.

-

OnPreDraw (const Rect &invalidatedArea) override

-

bool

-

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

-

OnDraw (const Rect &invalidatedArea) override

-

void

-

Called when a view is drawn.

-

SetSliderEventListener (UISliderEventListener *listener)

-

void

-

Sets the listener for a slider change.

-

UIBoxProgress ()

-

-

A constructor used to create a UIBoxProgress instance.

-

~UIBoxProgress ()

-

virtual

-

A destructor used to delete the UIBoxProgress instance.

-

SetWidth (int16_t width) override

-

void

-

Sets the width for the view holding this progress bar.

-

SetHeight (int16_t height) override

-

void

-

Sets the height for this view.

-

SetDirection (const Direction &direction)

-

void

-

Sets the direction for this progress bar.

-

GetDirection () const

-

Direction

-

Obtains the direction of this progress bar.

-

SetValidWidth (int16_t width)

-

void

-

Sets the actual width for this progress bar.

-

GetValidWidth () const

-

int16_t

-

Obtains the actual width of this progress bar.

-

SetValidHeight (int16_t height)

-

void

-

Sets the actual height for this progress bar.

-

GetValidHeight () const

-

int16_t

-

Obtains the actual height of this progress bar.

-

UIAbstractProgress ()

-

-

A constructor used to create a UIAbstractProgress instance.

-

~UIAbstractProgress ()

-

virtual

-

A destructor used to delete the UIAbstractProgress instance.

-

EnableBackground (bool enable)

-

void

-

Sets whether the background of the progress bar is visible.

-

SetValue (int16_t value)

-

void

-

Sets the current value for this progress bar.

-

GetValue () const

-

int16_t

-

Obtains the current value of this progress bar.

-

SetRange (int16_t rangeMax, int16_t rangeMin)

-

void

-

Sets the range for this progress bar.

-

GetRangeMin () const

-

int16_t

-

Obtains the minimum value of this progress bar.

-

GetRangeMax () const

-

int16_t

-

Obtains the maximum value of this progress bar.

-

SetImage (const char *foregroundImage, const char *backgroundImage=nullptr)

-

void

-

Sets the image for this progress bar.

-

SetImage (const ImageInfo *foregroundImage, const ImageInfo *backgroundImage=nullptr)

-

void

-

Sets the image as a pixel map for this progress bar.

-

SetStep (uint16_t step)

-

void

-

Sets the step for this progress bar.

-

GetStep () const

-

uint16_t

-

Obtains the current step of this progress bar.

-

SetBackgroundStyle (const Style &style)

-

void

-

Sets the background style for this progress bar.

-

SetBackgroundStyle (uint8_t key, int64_t value)

-

void

-

Sets a background style for this progress bar.

-

GetBackgroundStyle () const

-

const Style &

-

Obtains the background style of this progress bar.

-

GetBackgroundStyle (uint8_t key) const

-

int64_t

-

Obtains the value of a background style of this progress bar.

-

SetForegroundStyle (const Style &style)

-

void

-

Sets the foreground style for this progress bar.

-

SetForegroundStyle (uint8_t key, int64_t value)

-

void

-

Sets a foreground style for this progress bar.

-

GetForegroundStyle () const

-

const Style &

-

Obtains the foreground style of this progress bar.

-

GetForegroundStyle (uint8_t key) const

-

int64_t

-

Obtains the value of a foreground style of this progress bar.

-

SetCapType (CapType cap)

-

void

-

Sets the type of caps on the background and foreground of the progress bar.

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void

-

Called after a view is drawn.

-

ReMeasure ()

-

virtual void

-

Remeasures the view size.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnPressEvent (const PressEvent &event)

-

virtual void

-

Called when the view is pressed.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

GetTargetView (const Point &point, UIView **last)

-

virtual void

-

Obtains the top-level view based on specified coordinates.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void

-

Sets whether the view is visible.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

GetWidth ()

-

virtual int16_t

-

Obtains the width for the view.

-

GetHeight ()

-

virtual int16_t

-

Obtains the height for the view.

-

Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

GetChildById (const char *id) const

-

virtual UIView *

-

Obtains the child view of a specified ID.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- -## Additional Inherited Members - - - - - - - - - - -

Additional Inherited Member Name

-

Description

-

Direction : uint8_t { Direction::DIR_LEFT_TO_RIGHT, Direction::DIR_RIGHT_TO_LEFT, Direction::DIR_TOP_TO_BOTTOM, Direction::DIR_BOTTOM_TO_TOP }

-

Enumerates the directions of the progress bar.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UISnapShot.md b/api/api-SmartVision-Devices/OHOS-UISnapShot.md deleted file mode 100755 index a78019a9c21281bea5a4a4aa477893cdf34ef9e6..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UISnapShot.md +++ /dev/null @@ -1,754 +0,0 @@ -# OHOS::UISnapShot - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Represents the **[UISnapShot](OHOS-UISnapShot.md)** class. - -You can use the functions in this class to freeze the screen, take a snapshot, and save the screenshot as an image. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Member Function Name

-

Description

-

UISnapShot ()

-

 

-

A default constructor used to create a UISnapShot instance.

-

~UISnapShot ()

-

virtual 

-

A destructor used to delete the UISnapShot instance.

-

GetViewType () const override

-

UIViewType 

-

Obtains the view type.

-

Freeze (bool saveAsImage=false)

-

void 

-

Freezes the screen and takes a snapshot.

-

UnFreeze ()

-

void 

-

Unfreezes the screen and cancels a snapshot.

-

OnDraw (const Rect &invalidatedArea) override

-

void 

-

Draws a screenshot.

-

UIViewGroup ()

-

 

-

A default constructor used to create a UIViewGroup instance.

-

~UIViewGroup ()

-

virtual 

-

A destructor used to delete the UIViewGroup instance.

-

GetViewType () const override

-

UIViewType 

-

Obtains the view type.

-

Add (UIView *view)

-

virtual void 

-

Adds a child view.

-

Insert (UIView *prevView, UIView *insertView)

-

virtual void 

-

Inserts a new child view behind the current one.

-

Remove (UIView *view)

-

virtual void 

-

Removes a child view.

-

RemoveAll ()

-

virtual void 

-

Removes all child views.

-

GetTargetView (const Point &point, UIView **last) override

-

virtual void 

-

Obtains the target child view that is visible and can respond to touch events based on given coordinates.

-

MoveChildByOffset (int16_t x, int16_t y)

-

virtual void 

-

Moves all child views.

-

GetChildrenHead () const

-

UIView

-

Obtains the first child view in this view group.

-

GetChildrenTail () const

-

UIView

-

Obtains the last child view in this view group.

-

SetDisallowIntercept (bool flag)

-

void 

-

Sets whether this view group is intercepted upon touch events.

-

GetChildById (const char *id) const override

-

UIView

-

Obtains the target child view with a specified ID.

-

SetAutoSize (bool state)

-

void 

-

Sets whether the size of this view group is adaptive to that of all child views.

-

UIView ()

-

 

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

 

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual 

-

A destructor used to delete the UIView instance.

-

OnPreDraw (const Rect &invalidatedArea)

-

virtual bool 

-

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void 

-

Called after a view is drawn.

-

ReMeasure ()

-

virtual void 

-

Remeasures the view size.

-

Invalidate ()

-

void 

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void 

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool 

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool 

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool 

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool 

-

Called when the view stops dragging.

-

OnClickEvent (const ClickEvent &event)

-

virtual void 

-

Called when the view is clicked.

-

OnPressEvent (const PressEvent &event)

-

virtual void 

-

Called when the view is pressed.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void 

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void 

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void 

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *& 

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void 

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *& 

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void 

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *& 

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void 

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *& 

-

Obtains the touch event listener for the view.

-

SetParent (UIView *parent)

-

void 

-

Sets the parent view for the view.

-

GetParent () const

-

UIView

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void 

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void 

-

Sets whether the view is visible.

-

IsVisible () const

-

bool 

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void 

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool 

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void 

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool 

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void 

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool 

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect 

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect 

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect 

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect 

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect 

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect 

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void 

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

SetWidth (int16_t width)

-

virtual void 

-

Sets the width for the view.

-

GetWidth ()

-

virtual int16_t 

-

Obtains the width for the view.

-

SetHeight (int16_t height)

-

virtual void 

-

Sets the height for the view.

-

GetHeight ()

-

virtual int16_t 

-

Obtains the height for the view.

-

Resize (int16_t width, int16_t height)

-

virtual void 

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void 

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t 

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void 

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t 

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void 

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void 

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool 

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void 

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void 

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap

-

Obtains an affine transformation matrix.

-

SetViewId (const char *id)

-

void 

-

Sets the view ID.

-

GetViewId () const

-

const char * 

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void 

-

Sets the view index.

-

GetViewIndex () const

-

int16_t 

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void 

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void 

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void 

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void 

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void 

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void 

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void 

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void 

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void 

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void 

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void 

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void 

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void 

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void 

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void 

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void 

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

virtual void 

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void 

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t 

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style & 

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-
- -## Static Public Member Functions - - - - - - - - - -

Static Public Member Function Name

-

Description

-

ScreenshotToFile ()

-

static bool 

-

Saves the screenshot in a file.

-
- -## Static Protected Member Functions - - - - - - - - - - - - -

Static Protected Member Function Name

-

Description

-

SetSnapshotView (UISnapShot *toBeSnapshotted)

-

static void 

-

Sets the view to be snapshotted.

-

GetSnapshotView ()

-

static UISnapShot

-

Obtains the snapshotted view.

-
- -## Friends - - - - - - - - - -

Friend Name

-

Description

-

RenderManager

-

Represents a friend of the UISnapShot class.

-
- -## Additional Inherited Members - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Additional Inherited Member Name

-

Description

-

GetAllChildRelativeRect () const

-

Obtains the rectangle area of a new view group after being adaptive to the size of all child views.

-

OnChildChanged ()

-

Performs operations needed after a child view is added or removed.

-

childrenHead_

-

Indicates the pointer to the first child view of this view group.

-

childrenTail_

-

Indicates the pointer to the last child view of this view group.

-

childrenNum_

-

Represents the number of child views.

-

isDragging_

-

Specifies the sliding state of this view group.

-

disallowIntercept_

-

Specifies whether this view group is intercepted upon touch events.

-

isAutoSize_

-

Specifies whether the size of this view group is adaptive to that of all child views.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UISurfaceView.md b/api/api-SmartVision-Devices/OHOS-UISurfaceView.md deleted file mode 100755 index 07c262ea5235df69bc06f05acb5d0477e111b812..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UISurfaceView.md +++ /dev/null @@ -1,584 +0,0 @@ -# OHOS::UISurfaceView - -- [Overview](#section1163806064165634) -- [Summary](#section833176623165634) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Represents a surface view that interacts with the multimedia to achieve camera preview and video playback. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

UISurfaceView ()

-

-

A constructor used to create a UISurfaceView instance.

-

~UISurfaceView ()

-

-

A destructor used to delete the UISurfaceView instance.

-

GetSurface () const

-

Surface *

-

Obtains the surface, which should be used together with the camera and video modules.

-

SetPosition (int16_t x, int16_t y) override

-

void

-

Sets the position for this view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height) override

-

void

-

Sets the position and size for this view.

-

Resize (int16_t width, int16_t height) override

-

void

-

Adjusts the size of this view.

-

SetX (int16_t x) override

-

void

-

Sets the x-coordinate for this view.

-

SetY (int16_t y) override

-

void

-

Sets the y-coordinate for this view.

-

SetWidth (int16_t width) override

-

void

-

Sets the width for this view.

-

SetHeight (int16_t height) override

-

void

-

Sets the height for this view.

-

SetVisible (bool visible) override

-

void

-

Sets whether this view is visible.

-

OnPreDraw (const Rect &invalidatedArea) override

-

bool

-

Called before this view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so that the drawing process is optimized.

-

OnDraw (const Rect &invalidatedArea) override

-

void

-

Called when this view is drawn.

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void

-

Called after a view is drawn.

-

ReMeasure ()

-

virtual void

-

Remeasures the view size.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool

-

Called when the view stops dragging.

-

OnClickEvent (const ClickEvent &event)

-

virtual void

-

Called when the view is clicked.

-

OnPressEvent (const PressEvent &event)

-

virtual void

-

Called when the view is pressed.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

GetTargetView (const Point &point, UIView **last)

-

virtual void

-

Obtains the top-level view based on specified coordinates.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

GetWidth ()

-

virtual int16_t

-

Obtains the width for the view.

-

GetHeight ()

-

virtual int16_t

-

Obtains the height for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

GetChildById (const char *id) const

-

virtual UIView *

-

Obtains the child view of a specified ID.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

GetViewType () const

-

virtual UIViewType

-

Obtains the view type.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UISwipeView-OnSwipeListener.md b/api/api-SmartVision-Devices/OHOS-UISwipeView-OnSwipeListener.md deleted file mode 100755 index 872f47fee67ceb318c99a3a115b705f46df38a70..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UISwipeView-OnSwipeListener.md +++ /dev/null @@ -1,50 +0,0 @@ -# OHOS::UISwipeView::OnSwipeListener - -- [Overview](#section1571347265165634) -- [Summary](#section1973465949165634) -- [Additional Inherited Members](#inherited) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Represents a listener for changes of the swipe view. - -This is an inner class of **[UISwipeView](OHOS-UISwipeView.md)**. It contains a callback function to be invoked when the swipe view state changes. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Additional Inherited Members - - - - - - - - - - - - - -

Additional Inherited Member Name

-

Description

-

operator new (size_t size)

-

Overrides the new function.

-

operator delete (void *p)

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UISwipeView.md b/api/api-SmartVision-Devices/OHOS-UISwipeView.md deleted file mode 100755 index 1feb69ce9f5e2e209605c2e2936c592b86166e52..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UISwipeView.md +++ /dev/null @@ -1,936 +0,0 @@ -# OHOS::UISwipeView - -- [Overview](#section373833199165634) -- [Summary](#section344567888165634) -- [Data Structures](#nested-classes) -- [Public Member Functions](#pub-methods) -- [Static Public Attributes](#pub-static-attribs) -- [Protected Member Functions](#pro-methods) -- [Static Protected Attributes](#pro-static-attribs) -- [Additional Inherited Members](#inherited) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Represents a swipe view. - -Each swipe view consists of multiple child views, which can be navigated through swiping. The child views can be either horizontal or vertical. - -See also -: [UIAbstractScroll](OHOS-UIAbstractScroll.md) - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

OnSwipeListener

-

Represents a listener for changes of the swipe view.

-
- -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

UISwipeView (uint8_t direction=HORIZONTAL)

-

-

A constructor used to create a UISwipeView instance.

-

~UISwipeView ()

-

virtual

-

A destructor used to delete the UISwipeView instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the component type.

-

SetDirection (uint8_t direction)

-

void

-

Sets the dragging direction.

-

GetDirection () const

-

uint8_t

-

Obtains the dragging direction.

-

Add (UIView *view) override

-

void

-

Adds a view.

-

Insert (UIView *prevView, UIView *insertView) override

-

void

-

Inserts a view.

-

Remove (UIView *view) override

-

virtual void

-

Deletes a view.

-

SetCurrentPage (uint16_t index, bool needAnimator=false)

-

void

-

Sets the index for the current tab.

-

GetCurrentPage () const

-

uint16_t

-

Obtains the current tab index.

-

GetCurrentView () const

-

UIView *

-

Obtains the current view.

-

SetBlankSize (uint16_t size)

-

void

-

Sets a blank size, as defined in DEFAULT_BLANK_SIZE.

-

OnDragEvent (const DragEvent &event) override

-

bool

-

revice drag event, Switch to specified view when drag

-

OnDragEndEvent (const DragEvent &event) override

-

bool

-

Called when the view stops dragging.

-

SetAnimatorTime (uint16_t time)

-

void

-

Sets the time for the page being animated. The page will go beyond the blank during this time.

-

SetLoopState (bool loop)

-

void

-

Sets whether the swipe view supports a cycle swipe.

-

GetViewByIndex (uint16_t index) const

-

UIView *

-

Obtains a view based on its index.

-

GetOnSwipeListener ()

-

OnSwipeListener *&

-

Obtains the listener set for swipe events.

-

SetOnSwipeListener (OnSwipeListener *onSwipeListener)

-

void

-

Sets the listener that contains a callback to be invoked upon a swipe event.

-

UIAbstractScroll ()

-

-

A constructor used to create a UIAbstractScroll instance.

-

~UIAbstractScroll ()

-

virtual

-

A destructor used to delete the UIAbstractScroll instance.

-

GetDirection () const

-

uint8_t

-

Obtains the scroll direction.

-

SetScrollBlankSize (uint16_t size)

-

void

-

Sets the blank size for this scroll view.

-

SetMaxScrollDistance (uint16_t distance)

-

void

-

Sets the maximum scroll distance after a finger lifts the screen.

-

SetReboundSize (uint16_t size)

-

void

-

Sets the rebound size, which is the distance a knob moves after being released when it reaches the end of a scrollbar.

-

GetMaxScrollDistance () const

-

uint16_t

-

Obtains the maximum scroll distance after a finger lifts the screen.

-

SetDragFunc (EasingFunc func)

-

void

-

Sets the easing function that specifies a scroll animation after a finger lifts the screen.

-

SetThrowDrag (bool throwDrag)

-

void

-

Sets whether to continue scrolling after a finger lifts the screen.

-

SetDragACCLevel (uint16_t value)

-

void

-

Sets the drag acceleration.

-

GetDragACCLevel () const

-

uint8_t

-

Obtains the drag acceleration.

-

SetSwipeACCLevel (uint16_t value)

-

void

-

Sets the compensation distance after a finger lifts the screen.

-

GetSwipeACCLevel () const

-

uint8_t

-

Obtains the compensation distance after a finger lifts the screen.

-

UIViewGroup ()

-

-

A default constructor used to create a UIViewGroup instance.

-

~UIViewGroup ()

-

virtual

-

A destructor used to delete the UIViewGroup instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

RemoveAll ()

-

virtual void

-

Removes all child views.

-

GetTargetView (const Point &point, UIView **last) override

-

virtual void

-

Obtains the target child view that is visible and can respond to touch events based on given coordinates.

-

GetChildrenHead () const

-

UIView *

-

Obtains the first child view in this view group.

-

GetChildrenTail () const

-

UIView *

-

Obtains the last child view in this view group.

-

SetDisallowIntercept (bool flag)

-

void

-

Sets whether this view group is intercepted upon touch events.

-

GetChildById (const char *id) const override

-

UIView *

-

Obtains the target child view with a specified ID.

-

SetAutoSize (bool state)

-

void

-

Sets whether the size of this view group is adaptive to that of all child views.

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnPreDraw (const Rect &invalidatedArea)

-

virtual bool

-

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

-

OnDraw (const Rect &invalidatedArea)

-

virtual void

-

Called when a view is drawn.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void

-

Called after a view is drawn.

-

ReMeasure ()

-

virtual void

-

Remeasures the view size.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnClickEvent (const ClickEvent &event)

-

virtual void

-

Called when the view is clicked.

-

OnPressEvent (const PressEvent &event)

-

virtual void

-

Called when the view is pressed.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void

-

Sets whether the view is visible.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

SetWidth (int16_t width)

-

virtual void

-

Sets the width for the view.

-

GetWidth ()

-

virtual int16_t

-

Obtains the width for the view.

-

SetHeight (int16_t height)

-

virtual void

-

Sets the height for the view.

-

GetHeight ()

-

virtual int16_t

-

Obtains the height for the view.

-

Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- -## Static Public Attributes - - - - - - - - - - - - - -

Static Public Attribute Name

-

Description

-

HORIZONTAL = 0

-

Indicates the horizontal direction.

-

VERTICAL = 1

-

Indicates the vertical direction.

-
- -## Protected Member Functions - - - - - - - - - - - - - - - - -

Function

-

Description

-

MoveChildByOffset (int16_t xOffset, int16_t yOffset) override

-

void

-

Moves the position of all child views.

-

GetAllChildRelativeRect () const

-

Rect

-

Obtains the rectangle area of a new view group after being adaptive to the size of all child views.

-

OnChildChanged ()

-

virtual void

-

Performs operations needed after a child view is added or removed.

-
- -## Static Protected Attributes - - - - - - - - - - - - - - - - -

Static Protected Attribute Name

-

Description

-

ANIMATOR_TIME = 12

-

Indicates that the animation duration is 12 ticks.

-

STOP_DISTANCE = 5

-

Indicates the maximum distance of an invalid dragging. Dragging is not triggered if the distance is less than this value.

-

DEFAULT_BLANK_SIZE = 30

-

Indicates the maximum distance between the first and the last tab when the current view is not in a cycle swipe mode. The page can be rebound after the setting.

-
- -## Additional Inherited Members - - - - - - - - - - - - - - - - - - - - - - - - - -

Additional Inherited Member Name

-

Description

-

childrenHead_

-

Indicates the pointer to the first child view of this view group.

-

childrenTail_

-

Indicates the pointer to the last child view of this view group.

-

childrenNum_

-

Represents the number of child views.

-

isDragging_

-

Specifies the sliding state of this view group.

-

disallowIntercept_

-

Specifies whether this view group is intercepted upon touch events.

-

isAutoSize_

-

Specifies whether the size of this view group is adaptive to that of all child views.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UITextureMapper-AnimatorStopListener.md b/api/api-SmartVision-Devices/OHOS-UITextureMapper-AnimatorStopListener.md deleted file mode 100755 index feb09426dfba5dadd758cc4391143e2dd72338a3..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UITextureMapper-AnimatorStopListener.md +++ /dev/null @@ -1,62 +0,0 @@ -# OHOS::UITextureMapper::AnimatorStopListener - -- [Overview](#section1787132500165634) -- [Summary](#section903034545165634) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Represents a listener that contains a callback to be invoked when this animator stops. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

~AnimatorStopListener ()

-

virtual

-

A destructor used to delete an AnimatorStopListener instance.

-

OnAnimatorStop (UIView &view)=0

-

virtual void

-

Called when this animator stops. This is a pure virtual function, which needs your inheritance and implementation.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UITextureMapper.md b/api/api-SmartVision-Devices/OHOS-UITextureMapper.md deleted file mode 100755 index 3a130ac9046a40ba13fda9b69574642606c87dfd..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UITextureMapper.md +++ /dev/null @@ -1,785 +0,0 @@ -# OHOS::UITextureMapper - -- [Overview](#section165925275165634) -- [Summary](#section57266859165634) -- [Data Structures](#nested-classes) -- [Public Member Functions](#pub-methods) -- [Additional Inherited Members](#inherited) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Rotates and scales images. - -See also -: [UIImageView](OHOS-UIImageView.md) - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

AnimatorStopListener

-

Represents a listener that contains a callback to be invoked when this animator stops.

-
- -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

UITextureMapper ()

-

-

A constructor used to create a UITextureMapper instance.

-

~UITextureMapper ()

-

virtual

-

A destructor used to delete the UITextureMapper instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

Start ()

-

void

-

Starts this animator.

-

SetRotateStart (int16_t start)

-

void

-

Sets the start angle of rotation for this image.

-

SetRotateEnd (int16_t end)

-

void

-

Sets the end angle of rotation for this image.

-

SetScaleStart (float start)

-

void

-

Sets the start ratio for scaling this image.

-

SetScaleEnd (float end)

-

void

-

Sets the end ratio for scaling this image.

-

SetDurationTime (uint16_t durationTime)

-

void

-

Sets the duration for this animator, in milliseconds.

-

SetDelayTime (uint16_t delayTime)

-

void

-

Sets the delay time for this animator, in milliseconds.

-

SetEasingFunc (EasingFunc easingFunc)

-

void

-

Sets the easing function for this animator.

-

Cancel ()

-

void

-

Cancels this animator.

-

Reset ()

-

void

-

Displays the original image.

-

SetPivot (int16_t x, int16_t y)

-

void

-

Sets the coordinates of the rotation and scaling pivots for this image.

-

SetAnimatorStopListener (AnimatorStopListener *listener)

-

void

-

Sets the listener for the stop of this animator.

-

UIImageView ()

-

-

A default constructor used to create a UIImageView instance.

-

~UIImageView ()

-

virtual

-

A destructor used to delete the UIImageView instance.

-

GetWidth () override

-

int16_t

-

Obtains the width of this image view.

-

GetHeight () override

-

int16_t

-

Obtains the height of this image view.

-

OnPreDraw (const Rect &invalidatedArea) override

-

bool

-

Checks whether this image view needs to be covered to optimize the drawing process.

-

OnDraw (const Rect &invalidatedArea) override

-

void

-

Draws this image view.

-

SetSrc (const char *src)

-

void

-

Sets the image path.

-

SetSrc (const ImageInfo *src)

-

void

-

Sets the image information.

-

SetAutoEnable (bool enable)

-

void

-

Sets whether the image view size needs to be adaptive to the image size.

-

SetBlurLevel (BlurLevel level)

-

void

-

Sets the blur level for this image when it is rotated or scaled.

-

GetBlurLevel () const

-

BlurLevel

-

Obtains the blur level of this image when it is rotated or scaled.

-

SetTransformAlgorithm (TransformAlgorithm algorithm)

-

void

-

Sets the algorithm used for image rotation and scaling.

-

GetTransformAlgorithm () const

-

TransformAlgorithm

-

Obtains the algorithm used for image rotation and scaling.

-

GetPath () const

-

const char *

-

获取图片路径

-

GetImageInfo () const

-

const ImageInfo *

-

获取图片信息

-

GetSrcType () const

-

uint8_t

-

获取图片类型

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void

-

Called after a view is drawn.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool

-

Called when the view stops dragging.

-

OnClickEvent (const ClickEvent &event)

-

virtual void

-

Called when the view is clicked.

-

OnPressEvent (const PressEvent &event)

-

virtual void

-

Called when the view is pressed.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

GetTargetView (const Point &point, UIView **last)

-

virtual void

-

Obtains the top-level view based on specified coordinates.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void

-

Sets whether the view is visible.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

SetWidth (int16_t width)

-

virtual void

-

Sets the width for the view.

-

SetHeight (int16_t height)

-

virtual void

-

Sets the height for the view.

-

Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

GetChildById (const char *id) const

-

virtual UIView *

-

Obtains the child view of a specified ID.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- -## Additional Inherited Members - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Additional Inherited Member Name

-

Description

-

imageWidth_

-

Represents the width of this image.

-

imageHeight_

-

Represents the height of this image.

-

autoEnable_

-

Specifies whether automatic adaptation is enabled.

-

needRefresh_

-

Specifies whether a refresh is needed.

-

colorFormat_: 4

-

Represents the color format of this image.

-

blurLevel_: 2

-

Represents the blur level of this image when it is rotated or scaled.

-

algorithm_: 1

-

Represents the algorithm used for image rotation and scaling.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UITimePicker-SelectedListener.md b/api/api-SmartVision-Devices/OHOS-UITimePicker-SelectedListener.md deleted file mode 100755 index fab0849683e926ff0c061a998280051843b3c35e..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UITimePicker-SelectedListener.md +++ /dev/null @@ -1,68 +0,0 @@ -# OHOS::UITimePicker::SelectedListener - -- [Overview](#section1833975619165634) -- [Summary](#section667472833165634) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines the listener used by the time picker. This listener is triggered when an item is selected after sliding stops. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

SelectedListener ()

-

-

A constructor used to create a SelectedListener instance.

-

~SelectedListener ()

-

-

A destructor used to delete the SelectedListener instance.

-

OnTimePickerStoped (UITimePicker &picker)

-

virtual void

-

Called when an item is selected after sliding stops. This function is implemented by applications.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UITimePicker.md b/api/api-SmartVision-Devices/OHOS-UITimePicker.md deleted file mode 100755 index 0b8148cfd369e643170f128f10dac7c96af0ac47..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UITimePicker.md +++ /dev/null @@ -1,793 +0,0 @@ -# OHOS::UITimePicker - -- [Overview](#section1455977287165635) -- [Summary](#section816318413165635) -- [Data Structures](#nested-classes) -- [Public Member Functions](#pub-methods) -- [Additional Inherited Members](#inherited) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines the time picker. The time is in the format of "hour:minute" or "hour:minute:second". The selected time is highlighted. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

SelectedListener

-

Defines the listener used by the time picker. This listener is triggered when an item is selected after sliding stops.

-
- -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

UITimePicker ()

-

-

A constructor used to create a UITimePicker instance.

-

~UITimePicker ()

-

virtual

-

A destructor used to delete the UITimePicker instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

SetSelected (const char *value)

-

bool

-

Sets the time currently selected in the time picker.

-

GetSelectValue ()

-

const char *

-

Obtains the time currently selected in the time picker.

-

GetSelectHour () const

-

const char *

-

Obtains the hour currently selected in the time picker.

-

GetSelectMinute () const

-

const char *

-

Obtains the minute currently selected in the time picker.

-

GetSelectSecond () const

-

const char *

-

Obtains the second currently selected in the time picker.

-

SetItemHeight (int16_t height)

-

void

-

Sets the height of each item in the time picker.

-

EnableSecond (bool state)

-

void

-

Sets whether to enable seconds in the time picker.

-

SetTextStyle (uint8_t backgroundFontId, uint8_t highlightFontId, ColorType backgroundColor, ColorType highlightColor)

-

void

-

Sets the text format in the time picker, including the font ID and color.

-

SetTextColor (ColorType backgroundColor, ColorType highlightColor)

-

void

-

Sets the text color in the time picker.

-

SetBackgroundFont (const char *name, uint8_t size)

-

void

-

Sets the font name and size for the background text.

-

SetHighlightFont (const char *name, uint8_t size)

-

void

-

Sets the font name and size for the highlighted text.

-

SetWidth (int16_t width) override

-

void

-

Sets the width for the time picker.

-

SetHeight (int16_t height) override

-

void

-

Sets the height for the time picker.

-

RegisterSelectedListener (SelectedListener *timePickerListener)

-

void

-

Registers a listener for a selected event.

-

UIViewGroup ()

-

-

A default constructor used to create a UIViewGroup instance.

-

~UIViewGroup ()

-

virtual

-

A destructor used to delete the UIViewGroup instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

Add (UIView *view)

-

virtual void

-

Adds a child view.

-

Insert (UIView *prevView, UIView *insertView)

-

virtual void

-

Inserts a new child view behind the current one.

-

Remove (UIView *view)

-

virtual void

-

Removes a child view.

-

RemoveAll ()

-

virtual void

-

Removes all child views.

-

GetTargetView (const Point &point, UIView **last) override

-

virtual void

-

Obtains the target child view that is visible and can respond to touch events based on given coordinates.

-

MoveChildByOffset (int16_t x, int16_t y)

-

virtual void

-

Moves all child views.

-

GetChildrenHead () const

-

UIView *

-

Obtains the first child view in this view group.

-

GetChildrenTail () const

-

UIView *

-

Obtains the last child view in this view group.

-

SetDisallowIntercept (bool flag)

-

void

-

Sets whether this view group is intercepted upon touch events.

-

GetChildById (const char *id) const override

-

UIView *

-

Obtains the target child view with a specified ID.

-

SetAutoSize (bool state)

-

void

-

Sets whether the size of this view group is adaptive to that of all child views.

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnPreDraw (const Rect &invalidatedArea)

-

virtual bool

-

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

-

OnDraw (const Rect &invalidatedArea)

-

virtual void

-

Called when a view is drawn.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void

-

Called after a view is drawn.

-

ReMeasure ()

-

virtual void

-

Remeasures the view size.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool

-

Called when the view stops dragging.

-

OnClickEvent (const ClickEvent &event)

-

virtual void

-

Called when the view is clicked.

-

OnPressEvent (const PressEvent &event)

-

virtual void

-

Called when the view is pressed.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void

-

Sets whether the view is visible.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

GetWidth ()

-

virtual int16_t

-

Obtains the width for the view.

-

GetHeight ()

-

virtual int16_t

-

Obtains the height for the view.

-

Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- -## Additional Inherited Members - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Additional Inherited Member Name

-

Description

-

GetAllChildRelativeRect () const

-

Obtains the rectangle area of a new view group after being adaptive to the size of all child views.

-

OnChildChanged ()

-

Performs operations needed after a child view is added or removed.

-

childrenHead_

-

Indicates the pointer to the first child view of this view group.

-

childrenTail_

-

Indicates the pointer to the last child view of this view group.

-

childrenNum_

-

Represents the number of child views.

-

isDragging_

-

Specifies the sliding state of this view group.

-

disallowIntercept_

-

Specifies whether this view group is intercepted upon touch events.

-

isAutoSize_

-

Specifies whether the size of this view group is adaptive to that of all child views.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UIToggleButton.md b/api/api-SmartVision-Devices/OHOS-UIToggleButton.md deleted file mode 100755 index 8ac947e4a11dcf3252c49804558bd91d69e473b0..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UIToggleButton.md +++ /dev/null @@ -1,655 +0,0 @@ -# OHOS::UIToggleButton - -- [Overview](#section1816983910165635) -- [Summary](#section323334055165635) -- [Public Member Functions](#pub-methods) -- [Additional Inherited Members](#inherited) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Represents a toggle button. - -Each toggle button contains two images, one for pressing and the other for releasing. - -See also -: [UICheckBox](OHOS-UICheckBox.md) - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

UIToggleButton ()

-

-

A constructor used to create a UIToggleButton instance.

-

~UIToggleButton ()

-

virtual

-

A destructor used to delete the UIToggleButton instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the component type.

-

SetState (bool state)

-

void

-

Sets the state for this toggle button.

-

GetState () const

-

bool

-

Obtains the state of this toggle button.

-

UICheckBox ()

-

-

A constructor used to create a UICheckBox instance.

-

~UICheckBox ()

-

virtual

-

A destructor used to delete the UICheckBox instance.

-

SetOnChangeListener (OnChangeListener *onStateChangeListener)

-

void

-

Sets the listener for this check box.

-

OnPreDraw (const Rect &invalidatedArea) override

-

bool

-

Do something before draw, this function will be invoked mainly to check if this view need to cover invalidate area so render manager can decide which layer to draw firstly.

-

OnDraw (const Rect &invalidatedArea) override

-

void

-

Executes the draw action Ondraw invokes the rendering function provided by the underlying layer to draw pictures based on the selected status of the checkbox.

-

OnClickEvent (const ClickEvent &event) override

-

void

-

Executes the click event action OnClickEvent will reverse the selected state of checkbox. Example: If the check box is selected, the checkbox status is changed to Unselected after the click action is taken.

-

SetImages (const char *selectedImageSrc, const char *unselectedImageSrc)

-

virtual void

-

Sets the images for this check box.

-

SetImages (const ImageInfo *selectedImageSrc, const ImageInfo *unselectedImageSrc)

-

virtual void

-

Sets the images for this check box.

-

GetState () const

-

UICheckBoxState

-

Obtains the state of this check box.

-

SetState (UICheckBoxState state)

-

void

-

Sets the state for this check box.

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void

-

Called after a view is drawn.

-

ReMeasure ()

-

virtual void

-

Remeasures the view size.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool

-

Called when the view stops dragging.

-

OnPressEvent (const PressEvent &event)

-

virtual void

-

Called when the view is pressed.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

GetTargetView (const Point &point, UIView **last)

-

virtual void

-

Obtains the top-level view based on specified coordinates.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void

-

Sets whether the view is visible.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

SetWidth (int16_t width)

-

virtual void

-

Sets the width for the view.

-

GetWidth ()

-

virtual int16_t

-

Obtains the width for the view.

-

SetHeight (int16_t height)

-

virtual void

-

Sets the height for the view.

-

GetHeight ()

-

virtual int16_t

-

Obtains the height for the view.

-

Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

GetChildById (const char *id) const

-

virtual UIView *

-

Obtains the child view of a specified ID.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- -## Additional Inherited Members - - - - - - - - - - -

Additional Inherited Member Name

-

Description

-

UICheckBoxState : uint8_t

-

Enumerates the states of a check box.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UIView-OnClickListener.md b/api/api-SmartVision-Devices/OHOS-UIView-OnClickListener.md deleted file mode 100755 index 63923f5fffc862e2b21a42c9365b38a8a1df8723..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UIView-OnClickListener.md +++ /dev/null @@ -1,62 +0,0 @@ -# OHOS::UIView::OnClickListener - -- [Overview](#section1758902504165635) -- [Summary](#section79827609165635) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines a click event listener. You need to register this listener with the view to listen to click events. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

OnClick (UIView &view, const ClickEvent &event)

-

virtual bool

-

Called when a view is clicked.

-

~OnClickListener ()

-

virtual

-

A destructor used to delete the OnClickListener instance.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UIView-OnDragListener.md b/api/api-SmartVision-Devices/OHOS-UIView-OnDragListener.md deleted file mode 100755 index dd0a0f2eef6c034b4c5ffebf9cc1a7227c22f13e..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UIView-OnDragListener.md +++ /dev/null @@ -1,74 +0,0 @@ -# OHOS::UIView::OnDragListener - -- [Overview](#section1280632194165635) -- [Summary](#section1268837786165635) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines a drag event listener. You need to register this listener with the view to listen to drag events. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

OnDragStart (UIView &view, const DragEvent &event)

-

virtual bool

-

Called when a view starts to drag.

-

OnDrag (UIView &view, const DragEvent &event)

-

virtual bool

-

Called when a view is being dragged.

-

OnDragEnd (UIView &view, const DragEvent &event)

-

virtual bool

-

Called when a view stops dragging.

-

~OnDragListener ()

-

virtual

-

A destructor used to delete the OnDragListener instance.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UIView-OnLongPressListener.md b/api/api-SmartVision-Devices/OHOS-UIView-OnLongPressListener.md deleted file mode 100755 index 8d899801ee6b13e75a42429e2cc8440dc25c0b6c..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UIView-OnLongPressListener.md +++ /dev/null @@ -1,62 +0,0 @@ -# OHOS::UIView::OnLongPressListener - -- [Overview](#section2043894054165635) -- [Summary](#section1837107464165635) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines a long-press event listener. You need to register this listener with the view to listen to long-press events. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

OnLongPress (UIView &view, const LongPressEvent &event)

-

virtual bool

-

Called when a view is long pressed.

-

~OnLongPressListener ()

-

virtual

-

A destructor used to delete the OnLongPressListener instance.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UIView-OnTouchListener.md b/api/api-SmartVision-Devices/OHOS-UIView-OnTouchListener.md deleted file mode 100755 index 1585f5d35d55f850d67b5e0f7cdebb843f30d5d5..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UIView-OnTouchListener.md +++ /dev/null @@ -1,74 +0,0 @@ -# OHOS::UIView::OnTouchListener - -- [Overview](#section189944701165635) -- [Summary](#section1859733688165635) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines a touch event listener. You need to register this listener with the view to listen to touch events. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

OnPress (UIView &view, const PressEvent &event)

-

virtual bool

-

Called when a view is pressed.

-

OnRelease (UIView &view, const ReleaseEvent &event)

-

virtual bool

-

Called when a view is released.

-

OnCancel (UIView &view, const CancelEvent &event)

-

virtual bool

-

Called when a click event on a view is canceled.

-

~OnTouchListener ()

-

virtual

-

A destructor used to delete the OnTouchListener instance.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UIView.md b/api/api-SmartVision-Devices/OHOS-UIView.md deleted file mode 100755 index ecc91ab8d27a993b47c1e4f1b51729c5bfa88969..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UIView.md +++ /dev/null @@ -1,599 +0,0 @@ -# OHOS::UIView - -- [Overview](#section1312994240165635) -- [Summary](#section1344888661165635) -- [Data Structures](#nested-classes) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines the base class of a view, providing basic view attributes and operations. All views are derived from this class. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

OnClickListener

-

Defines a click event listener. You need to register this listener with the view to listen to click events.

-

OnDragListener

-

Defines a drag event listener. You need to register this listener with the view to listen to drag events.

-

OnLongPressListener

-

Defines a long-press event listener. You need to register this listener with the view to listen to long-press events.

-

OnTouchListener

-

Defines a touch event listener. You need to register this listener with the view to listen to touch events.

-
- -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnPreDraw (const Rect &invalidatedArea)

-

virtual bool

-

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

-

OnDraw (const Rect &invalidatedArea)

-

virtual void

-

Called when a view is drawn.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void

-

Called after a view is drawn.

-

ReMeasure ()

-

virtual void

-

Remeasures the view size.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool

-

Called when the view stops dragging.

-

OnClickEvent (const ClickEvent &event)

-

virtual void

-

Called when the view is clicked.

-

OnPressEvent (const PressEvent &event)

-

virtual void

-

Called when the view is pressed.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

GetTargetView (const Point &point, UIView **last)

-

virtual void

-

Obtains the top-level view based on specified coordinates.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void

-

Sets whether the view is visible.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

SetWidth (int16_t width)

-

virtual void

-

Sets the width for the view.

-

GetWidth ()

-

virtual int16_t

-

Obtains the width for the view.

-

SetHeight (int16_t height)

-

virtual void

-

Sets the height for the view.

-

GetHeight ()

-

virtual int16_t

-

Obtains the height for the view.

-

Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

GetChildById (const char *id) const

-

virtual UIView *

-

Obtains the child view of a specified ID.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

GetViewType () const

-

virtual UIViewType

-

Obtains the view type.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UIViewGroup.md b/api/api-SmartVision-Devices/OHOS-UIViewGroup.md deleted file mode 100755 index 577352216bce54a4d957e48b136577f0c3b3d4dc..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UIViewGroup.md +++ /dev/null @@ -1,702 +0,0 @@ -# OHOS::UIViewGroup - -- [Overview](#section255601631165635) -- [Summary](#section1539644998165635) -- [Public Member Functions](#pub-methods) -- [Protected Member Functions](#pro-methods) -- [Protected Attributes](#pro-attribs) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Represents a view group that consists of its child views. - -The child views can be added to, inserted in, and removed from the view group. Child views that are added later are displayed at the upper layer of this view group. All child views are stored in a linked list. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

UIViewGroup ()

-

-

A default constructor used to create a UIViewGroup instance.

-

~UIViewGroup ()

-

virtual

-

A destructor used to delete the UIViewGroup instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

Add (UIView *view)

-

virtual void

-

Adds a child view.

-

Insert (UIView *prevView, UIView *insertView)

-

virtual void

-

Inserts a new child view behind the current one.

-

Remove (UIView *view)

-

virtual void

-

Removes a child view.

-

RemoveAll ()

-

virtual void

-

Removes all child views.

-

GetTargetView (const Point &point, UIView **last) override

-

virtual void

-

Obtains the target child view that is visible and can respond to touch events based on given coordinates.

-

MoveChildByOffset (int16_t x, int16_t y)

-

virtual void

-

Moves all child views.

-

GetChildrenHead () const

-

UIView *

-

Obtains the first child view in this view group.

-

GetChildrenTail () const

-

UIView *

-

Obtains the last child view in this view group.

-

SetDisallowIntercept (bool flag)

-

void

-

Sets whether this view group is intercepted upon touch events.

-

GetChildById (const char *id) const override

-

UIView *

-

Obtains the target child view with a specified ID.

-

SetAutoSize (bool state)

-

void

-

Sets whether the size of this view group is adaptive to that of all child views.

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnPreDraw (const Rect &invalidatedArea)

-

virtual bool

-

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

-

OnDraw (const Rect &invalidatedArea)

-

virtual void

-

Called when a view is drawn.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void

-

Called after a view is drawn.

-

ReMeasure ()

-

virtual void

-

Remeasures the view size.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool

-

Called when the view stops dragging.

-

OnClickEvent (const ClickEvent &event)

-

virtual void

-

Called when the view is clicked.

-

OnPressEvent (const PressEvent &event)

-

virtual void

-

Called when the view is pressed.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void

-

Sets whether the view is visible.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

SetWidth (int16_t width)

-

virtual void

-

Sets the width for the view.

-

GetWidth ()

-

virtual int16_t

-

Obtains the width for the view.

-

SetHeight (int16_t height)

-

virtual void

-

Sets the height for the view.

-

GetHeight ()

-

virtual int16_t

-

Obtains the height for the view.

-

Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- -## Protected Member Functions - - - - - - - - - - - - - -

Function

-

Description

-

GetAllChildRelativeRect () const

-

Rect

-

Obtains the rectangle area of a new view group after being adaptive to the size of all child views.

-

OnChildChanged ()

-

virtual void

-

Performs operations needed after a child view is added or removed.

-
- -## Protected Attributes - - - - - - - - - - - - - - - - - - - - - - - - - -

Protected Attribute Name

-

Description

-

childrenHead_

-

Indicates the pointer to the first child view of this view group.

-

childrenTail_

-

Indicates the pointer to the last child view of this view group.

-

childrenNum_

-

Represents the number of child views.

-

isDragging_

-

Specifies the sliding state of this view group.

-

disallowIntercept_

-

Specifies whether this view group is intercepted upon touch events.

-

isAutoSize_

-

Specifies whether the size of this view group is adaptive to that of all child views.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UIXAxis.md b/api/api-SmartVision-Devices/OHOS-UIXAxis.md deleted file mode 100755 index f4efb8fe13ac8acc77e33e6e5bbe7c93ac05f9c7..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UIXAxis.md +++ /dev/null @@ -1,742 +0,0 @@ -# OHOS::UIXAxis - -- [Overview](#section1164065848165633) -- [Summary](#section1540662673165633) -- [Public Member Functions](#pub-methods) -- [Additional Inherited Members](#inherited) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines the unique attributes and functions for the x-axis. This class is used in [UIChart](OHOS-UIChart.md). - -See also -: [UIAxis](OHOS-UIAxis.md) - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

UIXAxis ()

-

-

A constructor used to create a UIXAxis instance.

-

~UIXAxis ()

-

virtual

-

A destructor used to delete the UIXAxis instance.

-

TranslateToPixel (int16_t &value) override

-

void

-

Translates data into the x coordinate of a pixel.

-

SetDataRange (uint16_t min, uint16_t max) override

-

bool

-

Sets the value range of the X axis.

-

SetMarkNum (uint16_t count) override

-

void

-

Sets the number of scales on the x-axis.

-

UIAxis ()

-

-

A constructor used to create a UIAxis instance.

-

~UIAxis ()

-

virtual

-

A destructor used to delete the UIAxis instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

SetLineColor (const ColorType &color)

-

void

-

Sets the line color of the coordinate axis.

-

OnDraw (const Rect &invalidatedArea) override

-

void

-

Called when a view is drawn.

-

OnPreDraw (const Rect &invalidatedArea) override

-

bool

-

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

-

UIViewGroup ()

-

-

A default constructor used to create a UIViewGroup instance.

-

~UIViewGroup ()

-

virtual

-

A destructor used to delete the UIViewGroup instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

Add (UIView *view)

-

virtual void

-

Adds a child view.

-

Insert (UIView *prevView, UIView *insertView)

-

virtual void

-

Inserts a new child view behind the current one.

-

Remove (UIView *view)

-

virtual void

-

Removes a child view.

-

RemoveAll ()

-

virtual void

-

Removes all child views.

-

GetTargetView (const Point &point, UIView **last) override

-

virtual void

-

Obtains the target child view that is visible and can respond to touch events based on given coordinates.

-

MoveChildByOffset (int16_t x, int16_t y)

-

virtual void

-

Moves all child views.

-

GetChildrenHead () const

-

UIView *

-

Obtains the first child view in this view group.

-

GetChildrenTail () const

-

UIView *

-

Obtains the last child view in this view group.

-

SetDisallowIntercept (bool flag)

-

void

-

Sets whether this view group is intercepted upon touch events.

-

GetChildById (const char *id) const override

-

UIView *

-

Obtains the target child view with a specified ID.

-

SetAutoSize (bool state)

-

void

-

Sets whether the size of this view group is adaptive to that of all child views.

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void

-

Called after a view is drawn.

-

ReMeasure ()

-

virtual void

-

Remeasures the view size.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool

-

Called when the view stops dragging.

-

OnClickEvent (const ClickEvent &event)

-

virtual void

-

Called when the view is clicked.

-

OnPressEvent (const PressEvent &event)

-

virtual void

-

Called when the view is pressed.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void

-

Sets whether the view is visible.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

SetWidth (int16_t width)

-

virtual void

-

Sets the width for the view.

-

GetWidth ()

-

virtual int16_t

-

Obtains the width for the view.

-

SetHeight (int16_t height)

-

virtual void

-

Sets the height for the view.

-

GetHeight ()

-

virtual int16_t

-

Obtains the height for the view.

-

Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- -## Additional Inherited Members - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Additional Inherited Member Name

-

Description

-

GetAllChildRelativeRect () const

-

Obtains the rectangle area of a new view group after being adaptive to the size of all child views.

-

OnChildChanged ()

-

Performs operations needed after a child view is added or removed.

-

childrenHead_

-

Indicates the pointer to the first child view of this view group.

-

childrenTail_

-

Indicates the pointer to the last child view of this view group.

-

childrenNum_

-

Represents the number of child views.

-

isDragging_

-

Specifies the sliding state of this view group.

-

disallowIntercept_

-

Specifies whether this view group is intercepted upon touch events.

-

isAutoSize_

-

Specifies whether the size of this view group is adaptive to that of all child views.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-UIYAxis.md b/api/api-SmartVision-Devices/OHOS-UIYAxis.md deleted file mode 100755 index 02b45c7f018e88af3de22e76ede1a76310c2f4a9..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-UIYAxis.md +++ /dev/null @@ -1,742 +0,0 @@ -# OHOS::UIYAxis - -- [Overview](#section1358605286165634) -- [Summary](#section1354342696165634) -- [Public Member Functions](#pub-methods) -- [Additional Inherited Members](#inherited) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines the unique attributes and functions for the y-axis. This class is used in [UIChart](OHOS-UIChart.md). - -See also -: [UIAxis](OHOS-UIAxis.md) - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

UIYAxis ()

-

-

A constructor used to create a UIYAxis instance.

-

~UIYAxis ()

-

virtual

-

A destructor used to delete the UIYAxis instance.

-

TranslateToPixel (int16_t &value) override

-

void

-

Translates data into the y coordinate of a pixel.

-

SetDataRange (uint16_t min, uint16_t max) override

-

bool

-

Sets the value range of the y-axis.

-

SetMarkNum (uint16_t count) override

-

void

-

Sets the number of scales on the Y axis.

-

UIAxis ()

-

-

A constructor used to create a UIAxis instance.

-

~UIAxis ()

-

virtual

-

A destructor used to delete the UIAxis instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

SetLineColor (const ColorType &color)

-

void

-

Sets the line color of the coordinate axis.

-

OnDraw (const Rect &invalidatedArea) override

-

void

-

Called when a view is drawn.

-

OnPreDraw (const Rect &invalidatedArea) override

-

bool

-

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

-

UIViewGroup ()

-

-

A default constructor used to create a UIViewGroup instance.

-

~UIViewGroup ()

-

virtual

-

A destructor used to delete the UIViewGroup instance.

-

GetViewType () const override

-

UIViewType

-

Obtains the view type.

-

Add (UIView *view)

-

virtual void

-

Adds a child view.

-

Insert (UIView *prevView, UIView *insertView)

-

virtual void

-

Inserts a new child view behind the current one.

-

Remove (UIView *view)

-

virtual void

-

Removes a child view.

-

RemoveAll ()

-

virtual void

-

Removes all child views.

-

GetTargetView (const Point &point, UIView **last) override

-

virtual void

-

Obtains the target child view that is visible and can respond to touch events based on given coordinates.

-

MoveChildByOffset (int16_t x, int16_t y)

-

virtual void

-

Moves all child views.

-

GetChildrenHead () const

-

UIView *

-

Obtains the first child view in this view group.

-

GetChildrenTail () const

-

UIView *

-

Obtains the last child view in this view group.

-

SetDisallowIntercept (bool flag)

-

void

-

Sets whether this view group is intercepted upon touch events.

-

GetChildById (const char *id) const override

-

UIView *

-

Obtains the target child view with a specified ID.

-

SetAutoSize (bool state)

-

void

-

Sets whether the size of this view group is adaptive to that of all child views.

-

UIView ()

-

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual

-

A destructor used to delete the UIView instance.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void

-

Called after a view is drawn.

-

ReMeasure ()

-

virtual void

-

Remeasures the view size.

-

Invalidate ()

-

void

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool

-

Called when the view stops dragging.

-

OnClickEvent (const ClickEvent &event)

-

virtual void

-

Called when the view is clicked.

-

OnPressEvent (const PressEvent &event)

-

virtual void

-

Called when the view is pressed.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *&

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *&

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *&

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *&

-

Obtains the touch event listener for the view.

-

SetParent (UIView *parent)

-

void

-

Sets the parent view for the view.

-

GetParent () const

-

UIView *

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView *

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void

-

Sets whether the view is visible.

-

IsVisible () const

-

bool

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

SetWidth (int16_t width)

-

virtual void

-

Sets the width for the view.

-

GetWidth ()

-

virtual int16_t

-

Obtains the width for the view.

-

SetHeight (int16_t height)

-

virtual void

-

Sets the height for the view.

-

GetHeight ()

-

virtual int16_t

-

Obtains the height for the view.

-

Resize (int16_t width, int16_t height)

-

virtual void

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap &

-

Obtains an affine transformation matrix.

-

SetViewId (const char *id)

-

void

-

Sets the view ID.

-

GetViewId () const

-

const char *

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void

-

Sets the view index.

-

GetViewIndex () const

-

int16_t

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

void

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style &

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- -## Additional Inherited Members - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Additional Inherited Member Name

-

Description

-

GetAllChildRelativeRect () const

-

Obtains the rectangle area of a new view group after being adaptive to the size of all child views.

-

OnChildChanged ()

-

Performs operations needed after a child view is added or removed.

-

childrenHead_

-

Indicates the pointer to the first child view of this view group.

-

childrenTail_

-

Indicates the pointer to the last child view of this view group.

-

childrenNum_

-

Represents the number of child views.

-

isDragging_

-

Specifies the sliding state of this view group.

-

disallowIntercept_

-

Specifies whether this view group is intercepted upon touch events.

-

isAutoSize_

-

Specifies whether the size of this view group is adaptive to that of all child views.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Vector2-T.md b/api/api-SmartVision-Devices/OHOS-Vector2-T.md deleted file mode 100755 index f85884260f6c09e90ead7cece89225fa984b05b8..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Vector2-T.md +++ /dev/null @@ -1,82 +0,0 @@ -# OHOS::Vector2< T \> - -- [Overview](#section1740720448165635) -- [Summary](#section197169423165635) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -template class OHOS::Vector2< T \> - -Defines the two-dimensional vector, and provides basic mathematical operations such as vector assignment, scalar product, cross product, addition, and subtraction. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

Vector2 ()

-

-

A constructor used to create a Vector2 instance.

-

Vector2 (T x, T y)

-

-

A constructor used to create a Vector2 instance based on the X and Y coordinates.

-

~Vector2 ()

-

-

A destructor used to delete the Vector2 instance.

-

Dot (const Vector2< T > &other) const

-

T

-

Calculates the scalar product of the two-dimensional vector and another two-dimensional vector.

-

Cross (const Vector2< T > &other) const

-

T

-

Calculates the cross product of the two-dimensional vector and another two-dimensional vector.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Vector3-T.md b/api/api-SmartVision-Devices/OHOS-Vector3-T.md deleted file mode 100755 index 26a634a3e09ea23c1c4c2ee9a458e910c468522d..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Vector3-T.md +++ /dev/null @@ -1,70 +0,0 @@ -# OHOS::Vector3< T \> - -- [Overview](#section476650071165635) -- [Summary](#section1687936492165635) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -template class OHOS::Vector3< T \> - -Defines the 3-dimensional vector, and provides basic operators such as \[\] and ==. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

Vector3 ()

-

-

A constructor used to create a Vector3 instance.

-

Vector3 (T x, T y, T z)

-

-

Defines a Vector3 instance and initializes the values of x, y, and z.

-

~Vector3 ()

-

-

A destructor used to delete the Vector3 instance.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-VirtualDeviceEvent.md b/api/api-SmartVision-Devices/OHOS-VirtualDeviceEvent.md deleted file mode 100755 index e652a22f91a55bb47db0900cf736609d00efd13a..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-VirtualDeviceEvent.md +++ /dev/null @@ -1,128 +0,0 @@ -# OHOS::VirtualDeviceEvent - -- [Overview](#section1554866722165635) -- [Summary](#section1594771562165635) -- [Public Types](#pub-types) -- [Public Member Functions](#pub-methods) - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines a virtual device event, which is used to receive a customized input event and call back the listening function registered. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Types - - - - - - - - - - -

Public Type Name

-

Description

-

DeviceType

-

Enumerates virtual device types.

-
- -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

VirtualDeviceEvent (uint16_t type, uint16_t value)

-

-

A constructor used to create a VirtualDeviceEvent instance.

-

~VirtualDeviceEvent ()

-

-

A destructor used to delete the VirtualDeviceEvent instance.

-

GetType () const

-

uint16_t

-

Obtains the type of the virtual device.

-

GetState () const

-

uint16_t

-

Obtains the state of the virtual event.

-

Event ()

-

-

A default constructor used to create an Event instance.

-

Event (const Point &curPos)

-

-

A constructor used to create an Event instance.

-

~Event ()

-

virtual

-

A destructor used to delete the Event instance.

-

GetCurrentPos () const

-

const Point &

-

Obtains the position where an event occurs.

-

GetTimeStamp () const

-

const TimeType &

-

Obtains the timestamp when an event occurs.

-

SetTimeStamp (const TimeType &timeStamp)

-

void

-

Sets the timestamp when an event occurs.

-

operator new (size_t size)

-

void *

-

Overrides the new function.

-

operator delete (void *p)

-

void

-

Overrides the delete function.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-Window.md b/api/api-SmartVision-Devices/OHOS-Window.md deleted file mode 100755 index e4f40bea1e20fd3387c11af67624e2be41ee28fe..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-Window.md +++ /dev/null @@ -1,131 +0,0 @@ -# OHOS::Window - -- [Overview](#section1231891241165632) -- [Summary](#section39354735165632) -- [Public Member Functions](#pub-methods) -- [Static Public Member Functions](#pub-static-methods) - -## **Overview** - -**Related Modules:** - -[Window](Window.md) - -**Description:** - -Provides a drawing canvas for the **[RootView](OHOS-RootView.md)**, which represents the root node of a view tree. - -Each window is bound to a **[RootView](OHOS-RootView.md)**. For details, see [RootView](OHOS-RootView.md). This class also provides window management capabilities, including creating, destroying, showing, hiding, moving, resizing a window, raising a window to the top, and lowering a window to the bottom. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

BindRootView (RootView *rootView)=0

-

virtual void

-

Binds the RootView to this window.

-

UnbindRootView ()=0

-

virtual void

-

Unbinds the RootView from this window.

-

GetRootView ()=0

-

virtual RootView *

-

Obtains the RootView bound to this window.

-

GetRect ()=0

-

virtual Rect

-

Obtains the rectangle information (position, width, and height) of this window.

-

Show ()=0

-

virtual void

-

Shows this window.

-

Hide ()=0

-

virtual void

-

Hides this window.

-

MoveTo (int16_t x, int16_t y)=0

-

virtual void

-

Moves this window to a specified position.

-

Resize (int16_t width, int16_t height)=0

-

virtual void

-

Resizes this window.

-

RaiseToTop ()=0

-

virtual void

-

Raises this window to the top.

-

LowerToBottom ()=0

-

virtual void

-

Lowers this window to the bottom.

-

GetWindowId ()=0

-

virtual int32_t

-

Obtains the unique ID of this window.

-
- -## Static Public Member Functions - - - - - - - - - - - - - -

Function

-

Description

-

CreateWindow (const WindowConfig &config)

-

static Window *

-

Creates a Window instance.

-

DestoryWindow (Window *window)

-

static void

-

Destroys a specified window.

-
- diff --git a/api/api-SmartVision-Devices/OHOS-WindowConfig.md b/api/api-SmartVision-Devices/OHOS-WindowConfig.md deleted file mode 100755 index d17716069855c0a276990033d935afca39f20763..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS-WindowConfig.md +++ /dev/null @@ -1,60 +0,0 @@ -# OHOS::WindowConfig - -- [Overview](#section948546250165632) -- [Summary](#section1253295620165632) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[Window](Window.md) - -**Description:** - -Sets the attributes for this window. - -This structure stores the attributes such as the rectangle, opacity, and pixel format of this window. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

rect

-

Rect

-

opacity

-

uint8_t

-

pixelFormat

-

WindowPixelFormat

-

option

-

uint32_t

-
- diff --git a/api/api-SmartVision-Devices/OHOS.md b/api/api-SmartVision-Devices/OHOS.md deleted file mode 100755 index ae1850df89b3cd723e9d6c95fd0f43e8c9bc412c..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OHOS.md +++ /dev/null @@ -1,893 +0,0 @@ -# OHOS - -## **Overview** - -**Related Modules:** - -[AbilityKit](AbilityKit.md) | [Graphic](Graphic.md) | [MultiMedia\_AudioCapturer](MultiMedia_AudioCapturer.md) | [MultiMedia\_Camera](MultiMedia_Camera.md) | [MultiMedia\_CameraAbility](MultiMedia_CameraAbility.md) | [MultiMedia\_CameraConfig](MultiMedia_CameraConfig.md) | [MuiltiMedia\_CameraDeviceCallback](MuiltiMedia_CameraDeviceCallback.md) | [MultiMedia\_CameraKit](MultiMedia_CameraKit.md) | [MultiMedia\_CameraStateCallback](MultiMedia_CameraStateCallback.md) | [MultiMedia\_MediaCommon](MultiMedia_MediaCommon.md) | [MultiMedia\_FrameConfig](MultiMedia_FrameConfig.md) | [MultiMedia\_FrameStateCallback](MultiMedia_FrameStateCallback.md) | [Surface](Surface.md) | [MultiMedia\_Player](MultiMedia_Player.md) | [MultiMedia\_Recorder](MultiMedia_Recorder.md) | [Window](Window.md) - -**Description:** - -Declares functions in the **CameraConfig** class. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

Ability

-

Declares ability-related functions, including ability lifecycle callbacks and functions for connecting to or disconnecting from AAs.

-

AbilityContext

-

Provides functions for starting and stopping an ability.

-

AbilityEventHandler

-

Declares functions for performing operations during inter-thread communication, including running and quitting the event loop of the current thread and posting tasks to an asynchronous thread.

-

AbilityLoader

-

Declares functions for registering the class names of Ability and AbilitySlice with the ability management framework.

-

AbilitySlice

-

Provides ability slice-related functions, including ability slice lifecycle callbacks and functions for connecting to or disconnecting from ability slices.

-

AbstractAdapter

-

Defines the base class for adapters. You can derive AbstractAdapter based on actual requirements and use the GetView() and GetCount() functions to implement adapters of different data types. For details, see TextAdapter.

-

Animator

-

Represents an animator.

-

AnimatorCallback

-

Represents the animator callback.

-

AnimatorManager

-

Represents the animator manager.

-

BinHeader

-

struct BinHeader for font refer to ui_font.h

-

ButtonStyle

-

Stores styles of a button in its different states.

-

CancelEvent

-

Defines a cancel event, which usually occurs when the target view changes due to user sliding. For example, this event is triggered if you, after pressing a button, does not release the button but slides.

-

ClickEvent

-

Defines a click event, which indicates that a finger is pressed on the screen and then lifted within 1 second.

-

Color

-

Converts colors in different formats and defines common colors.

-

Color16

-

Defines the color attribute when the color depth is 16.

-

Color24

-

Defines the color attribute when the color depth is 24.

-

Color32

-

Defines the color attribute when the color depth is 32.

-

DragEvent

-

Defines a drag event, which indicates a certain movement (more than 10 pixels) after a view is pressed.

-

EasingEquation

-

Defines functions for specifying the velocity of an animation.

-

Event

-

Defines the base class of a user input event and provides functions to record information such as the event position and timestamp.

-

FlexLayout

-

Defines a flexible layout container. You can perform simple adaptive layout on child views that the container holds, for example, to evenly arrange all child views in the same row or column.

-

FontHeader

-

struct FontHeader refer to ui_font.h

-

GlyphHeader

-

struct GlyphHeader for font, font tool using, not for bin file refer to ui_font.h

-

GlyphNode

-

struct GlyphNode for font refer to ui_font.h

-

GridLayout

-

Defines a grid layout container. You can perform simple grid layout on child views that the container holds.

-

IBufferConsumerListener

-

Defines the consumer listener used to notify consumers when the surface status is updated.

-

Image

-

Represents basic image attributes, including the image type and path.

-

ImageAnimatorInfo

-

Provides information about the images.

-

ImageHeader

-

Defines image head node information.

-

ImageInfo

-

Defines image information.

-

Interpolation

-

Calculates the Bezier interpolation.

-

KernNode

-

struct KernNode for kerning of font refer to ui_font.h

-

KeyEvent

-

Defines a key event, which indicates that a physical button is pressed or released.

-

LangBinHeader

-

struct LangBinHeader for font refer to ui_font.h

-

LangFontBinHeader

-

struct LangFontBinHeader for font refer to ui_font.h

-

LangTexsTableHeader

-

struct LangTexsTableHeader for font refer to ui_font.h

-

LangTexsUtf8Param

-

struct LangTexsUtf8Param for font refer to ui_font.h

-

Layout

-

Defines the base class of the layout, which indicates the basic data types and operations that may be used in the layout.

-

Line

-

Defines a line, which consists of the start and end points.

-

List

-

Defines a linked list template class, which implements the data structure of bidirectional linked list and provides basic functions such as adding, deleting, inserting, clearing, popping up, and obtaining the size of the linked list.

-

ListNode

-

Stores linked list data and contains pointers to the previous node and the next node.

-

ListScrollListener

-

Represents a listener that contains a callback to be invoked when the scroll state changes or when a new child view is selected at the preset position as this list scrolls. The scroll state can be SCROLL_STATE_STOP or SCROLL_STATE_MOVE.

-

LongPressEvent

-

Defines a long-press event, which indicates that the finger is not raised or moved within 1 second after a view is pressed.

-

Matrix3

-

Defines a 3 x 3 matrix.

-

Paint

-

Defines the basic styles of graphs drawn on canvases.

-

Point

-

Defines a point.

-

Polygon

-

Defines a polygon, including vertex coordinates and the maximum number of vertices (defined by MAX_VERTEX_NUM).

-

PressEvent

-

Defines a touch event, which indicates that the touchscreen or mouse is pressed.

-

RawEvent

-

struct of raw event

-

Rect

-

Defines a rectangle, including the position data of the four boundaries of the rectangle, and provides functions for rectangle inclusion, intersection, and aggregation.

-

ReleaseEvent

-

Defines a release event, which indicates that the touchscreen or mouse is released.

-

RootView

-

Defines the functions related to a root view which contains its child views and represents the root node in a tree structure.

-

StyleDefault

-

Define some default style for UIView.

-

Surface

-

Defines the consumer listener used to notify consumers when the surface status is updated.

-

SurfaceBuffer

-

Provides functions such as setting the virtual address, size, and additional attributes of shared memory.

-

SysInfo

-

Obtains the system information. Currently, the FPS information can be obtained. To enable the FPS feature, enable the ENABLE_FPS_SUPPORT macro.

-

Text

-

Represents the base class of Text, providing the text attribute setting and text drawing capabilities for components that require font display.

-

TextAdapter

-

Defines a text adapter, which implements UILabel instance construction and supports text data and continuous integer data.

-

TextFormatter

-

Defines a text formatter. You can inherit this class and implement the Format() function.

-

ThemeManager

-

Declares the singleton class used to manage the current screen theme of an application.

-

TransformMap

-

Transforms a rectangle, including rotation and scaling.

-

TtfHeader

-

struct TtfHeader for header of ttftab.bin refer to ui_font.h

-

UIAbstractClock

-

An abstract class that contains functions for converting units of time (hour, minute, and second), setting and obtaining the time.

-

UIAbstractProgress

-

Represents the abstract base class which provides functions related to the progress bar.

-

UIAbstractScroll

-

Defines the attributes of a scroll, including the scroll direction, blank size of a scroll view, velocity and effects of a scroll animation.

-

UIAnalogClock

-

Provides the functions related to an analog clock.

-

UIArcLabel

-

Defines functions related to an arc label.

-

UIAxis

-

Represents the coordinate axis base class, which defines the basic attributes of coordinate axis, sets whether a coordinate axis is visible, and sets the number of scales on a coordinate axis. This class is used in UIChart.

-

UIBoxProgress

-

Represents a linear progress bar.

-

UIButton

-

Represents a button.

-

UICanvas

-

Defines a canvas, which is used to draw multiple types of 2D graphs.

-

UIChart

-

Defines the chart class and provides functions such as adding and deleting data sets to display a chart.

-

UIChartDataSerial

-

Defines a data set and provides functions such as adding and deleting data points.

-

UIChartPillar

-

Provides special functions for implementing a bar chart.

-

UIChartPolyline

-

Provides special functions for implementing a polyline.

-

UICheckBox

-

Represents a check box.

-

UICircleProgress

-

Represents a circular progress bar.

-

UIDialog

-

Represents a dialog box.

-

UIDigitalClock

-

Displays time digitally.

-

UIDumpDomTree

-

Provides functions for exporting information about a specified DOM node or information about the DOM tree starting from a specified DOM node.

-

UIImageAnimatorView

-

Represents an image animator.

-

UIImageView

-

Defines the functions related to an image view.

-

UILabel

-

Defines the functions for presenting a label in a specified area, setting the style and background color of a label, and setting the display mode of a long label text.

-

UILabelButton

-

Provides the functions related to a label button.

-

UIList

-

Represents a scrollable list which is used with the adapter AbstractAdapter to implement scrolling, inertial scrolling, automatic alignment, and invoking of a callback when a child view is selected at the preset position as this list scrolls.

-

UIPicker

-

Defines a picker. Multiple texts or numbers can be put into a sliding list for selection. The selected text or numbers are highlighted.

-

UIRadioButton

-

Represents a radio button.

-

UIRepeatButton

-

Represents a repeat button.

-

UIScrollView

-

Supports horizontal or vertical scroll of child views. This class is inherited from UIAbstractScroll.

-

UISlider

-

Represents a slider.

-

UISnapShot

-

Represents the UISnapShot class.

-

UISwipeView

-

Represents a swipe view.

-

UITextureMapper

-

Rotates and scales images.

-

UITimePicker

-

Defines the time picker. The time is in the format of "hour:minute" or "hour:minute:second". The selected time is highlighted.

-

UIToggleButton

-

Represents a toggle button.

-

UIView

-

Defines the base class of a view, providing basic view attributes and operations. All views are derived from this class.

-

UIViewGroup

-

Represents a view group that consists of its child views.

-

UIXAxis

-

Defines the unique attributes and functions for the x-axis. This class is used in UIChart.

-

UIYAxis

-

Defines the unique attributes and functions for the y-axis. This class is used in UIChart.

-

Vector2

-

Defines the two-dimensional vector, and provides basic mathematical operations such as vector assignment, scalar product, cross product, addition, and subtraction.

-

Vector3

-

Defines the 3-dimensional vector, and provides basic operators such as [] and ==.

-

VirtualDeviceEvent

-

Defines a virtual device event, which is used to receive a customized input event and call back the listening function registered.

-

Window

-

Provides a drawing canvas for the RootView, which represents the root node of a view tree.

-

WindowConfig

-

Sets the attributes for this window.

-
- -## Typedefs - - - - - - - - - -

Typedef Name

-

Description

-

EasingFunc) (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

-

typedef int16_t(* 

-

Calculates the value for the current time of an animation.

-
- -## Enumerations - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

{ OPA_TRANSPARENT = 0, OPA_OPAQUE = 255 }

-

Enumerates opacity values.

-

UITextLanguageAlignment : uint8_t {   TEXT_ALIGNMENT_LEFT = 0, TEXT_ALIGNMENT_RIGHT, TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_TOP,   TEXT_ALIGNMENT_BOTTOM }

-

Enumerates text alignment modes.

-

UITextLanguageDirect : uint8_t { TEXT_DIRECT_LTR = 0, TEXT_DIRECT_RTL }

-

Enumerates text directions.

-

ColorMode : uint8_t {   ARGB8888 = 0, RGB888, RGB565, ARGB1555,   ARGB4444, AL44, AL88, L1,   L2, L4, L8, A1,   A2, A4, A8, UNKNOW }

-

colormode of image and font.

-

InputDevType { ,   InputDevType::INDEV_TYPE_KEY, InputDevType::INDEV_TYPE_KEYBOARD, InputDevType::INDEV_TYPE_MOUSE, InputDevType::INDEV_TYPE_BUTTON,   InputDevType::INDEV_TYPE_CROWN, InputDevType::INDEV_TYPE_ENCODER, InputDevType::INDEV_TYPE_UNKNOWN }

-
 

: uint8_t {   STYLE_BACKGROUND_COLOR, STYLE_BACKGROUND_OPA, STYLE_BORDER_RADIUS, STYLE_BORDER_COLOR,   STYLE_BORDER_OPA, STYLE_BORDER_WIDTH, STYLE_PADDING_LEFT, STYLE_PADDING_RIGHT,   STYLE_PADDING_TOP, STYLE_PADDING_BOTTOM, STYLE_MARGIN_LEFT, STYLE_MARGIN_RIGHT,   STYLE_MARGIN_TOP, STYLE_MARGIN_BOTTOM, STYLE_IMAGE_OPA, STYLE_TEXT_COLOR,   STYLE_TEXT_FONT, STYLE_LETTER_SPACE, STYLE_LINE_SPACE, STYLE_TEXT_OPA,   STYLE_LINE_COLOR, STYLE_LINE_WIDTH, STYLE_LINE_OPA, STYLE_LINE_CAP }

-

Enumerates keys of styles.

-

BufferConsumerUsage {   BUFFER_CONSUMER_USAGE_SORTWARE = 0, BUFFER_CONSUMER_USAGE_HARDWARE, BUFFER_CONSUMER_USAGE_HARDWARE_CONSUMER_CACHE, BUFFER_CONSUMER_USAGE_HARDWARE_PRODUCER_CACHE,   BUFFER_CONSUMER_USAGE_MAX }

-

Enumerates shared memory usage scenarios, including physically contiguous memory and virtual memory.

-

ImagePixelFormat {   IMAGE_PIXEL_FORMAT_NONE = 0, IMAGE_PIXEL_FORMAT_RGB565 = 101, IMAGE_PIXEL_FORMAT_ARGB1555, IMAGE_PIXEL_FORMAT_RGB888,   IMAGE_PIXEL_FORMAT_ARGB8888, IMAGE_PIXEL_FORMAT_YUYV = 201, IMAGE_PIXEL_FORMAT_YVYU, IMAGE_PIXEL_FORMAT_UYVY,   IMAGE_PIXEL_FORMAT_VYUY, IMAGE_PIXEL_FORMAT_AYUV, IMAGE_PIXEL_FORMAT_YUV410, IMAGE_PIXEL_FORMAT_YVU410,   IMAGE_PIXEL_FORMAT_YUV411, IMAGE_PIXEL_FORMAT_YVU411, IMAGE_PIXEL_FORMAT_YUV420, IMAGE_PIXEL_FORMAT_YVU420,   IMAGE_PIXEL_FORMAT_YUV422, IMAGE_PIXEL_FORMAT_YVU422, IMAGE_PIXEL_FORMAT_YUV444, IMAGE_PIXEL_FORMAT_YVU444,   IMAGE_PIXEL_FORMAT_NV12 = 301, IMAGE_PIXEL_FORMAT_NV21, IMAGE_PIXEL_FORMAT_NV16, IMAGE_PIXEL_FORMAT_NV61 }

-

Enumerates a pixel format.

-

WindowPixelFormat { WINDOW_PIXEL_FORMAT_RGB565 = 101, WINDOW_PIXEL_FORMAT_ARGB1555, WINDOW_PIXEL_FORMAT_RGB888, WINDOW_PIXEL_FORMAT_ARGB8888 }

-

Enumerates the pixel formats of this window.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

GetTextLangFontsTable (uint8_t langFontId)

-

UITextLanguageFontParam * 

-

Get the Text Lang Fonts Table.

-

GetTotalLangId ()

-

uint8_t 

-

Get the Total Lang Id.

-

GetTotalFontId ()

-

uint8_t 

-

Get the Total Font Id.

-

GetTotalTextId ()

-

uint16_t 

-

Get the Total Text Id.

-

GetLangTextDefaultParamTable ()

-

LangTextParam * 

-

Get the Lang Text default param table.

-

Intersect (const Line &a, const Line &b, Vector2< int16_t > &out)

-

bool 

-

Checks whether line segment a and line segment b intersect, and returns the intersection point (if available).

-

IsIntersect (const Line &a, const Line &b)

-

bool 

-

Chekcs whether line segment a and line segment b intersect.

-

Clip (Polygon &poly, const Line &line)

-

void 

-

Clips a polygon by using a line segment.

-

SuthHodgClip (const Rect &clipRect, const Polygon &polygon)

-

Polygon 

-

Implements Sutherland-Hodgman, an algorithm used for clipping polygons.

-

Clip (const Line &line, const Polygon &poly, Vector2< int16_t > *pOut, uint8_t *pNum)

-

void 

-

Clips a polygon by using a line segment and obtains the intersections.

-

ImageCacheMalloc (ImageInfo &info)

-

void * 

-

Applies for the image cache memory. You can customize the memory area when loading image resources.

-

ImageCacheFree (ImageInfo &info)

-

void 

-

Releases the image cache memory.

-

UIMalloc (uint32_t size)

-

void * 

-

Applies for memory for the graphics module. You can implement this function to override the malloc and new functions.

-

UIFree (void *buffer)

-

void 

-

Releases memory for the graphics module. You can implement this function to override the free and delete functions.

-

Rotate (const Vector2< int16_t > &point, int16_t angle, const Vector2< int16_t > &pivot, Vector2< int16_t > &out)

-

void 

-

Rotates a point around the pivot by a certain angle.

-

Rotate (const Line &origLine, int16_t angle, const Vector2< int16_t > &pivot, Line &out)

-

void 

-

Rotates a line around the pivot by a certain angle.

-

Rotate (const Rect &origRect, int16_t angle, const Vector2< int16_t > &pivot, Polygon &out)

-

void 

-

Rotates a rectangle around the pivot by a certain angle.

-

GetVersion ()

-

std::string 

-

Obtains the version number of the graphics module.

-

GetLibDsc ()

-

std::string 

-

Obtains the library description of the graphics module.

-
- -## **Details** - -## **Enumeration Type Documentation** - -## InputDevType - -``` -enum [OHOS::InputDevType](OHOS.md#ac4e2abaf935793b876fbe5905d560e92) -``` - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
INDEV_TYPE_KEY 

Touchscreen

-
INDEV_TYPE_KEYBOARD 

Physical key

-
INDEV_TYPE_MOUSE 

Keyboard

-
INDEV_TYPE_BUTTON 

Mouse

-
INDEV_TYPE_CROWN 

Virtual button

-
INDEV_TYPE_ENCODER 

Watch crown

-
INDEV_TYPE_UNKNOWN 

Customized type of a specific function or event

-
- -## **Function Documentation** - -## GetLangTextDefaultParamTable\(\) - -``` -LangTextParam* OHOS::GetLangTextDefaultParamTable () -``` - - **Description:** - -Get the Lang [Text](OHOS-Text.md) default param table. - -**Returns:** - -LangTextParam\* the param table, definition is in font tool - - - -## GetTextLangFontsTable\(\) - -``` -UITextLanguageFontParam* OHOS::GetTextLangFontsTable (uint8_t langFontId) -``` - - **Description:** - -Get the [Text](OHOS-Text.md) Lang Fonts Table. - -**Parameters:** - - - - - - - - - -

Name

-

Description

-
uint8_tlangFontId [in] the font id
- -**Returns:** - -UITextLanguageFontParam\* the font table, definition is in font tool - - - -## GetTotalFontId\(\) - -``` -uint8_t OHOS::GetTotalFontId () -``` - - **Description:** - -Get the Total Font Id. - -**Returns:** - -uint8\_t the total font id, definition is in font tool - - - -## GetTotalLangId\(\) - -``` -uint8_t OHOS::GetTotalLangId () -``` - - **Description:** - -Get the Total Lang Id. - -**Returns:** - -uint8\_t the total Lang id, definition is in font tool - - - -## GetTotalTextId\(\) - -``` -uint16_t OHOS::GetTotalTextId () -``` - - **Description:** - -Get the Total [Text](OHOS-Text.md) Id. - -**Returns:** - -uint8\_t the total text id, definition is in font tool - - - diff --git a/api/api-SmartVision-Devices/OSAL.md b/api/api-SmartVision-Devices/OSAL.md deleted file mode 100755 index 58d30c0374b3fcec6762402afd82c6f4064fc103..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OSAL.md +++ /dev/null @@ -1,3884 +0,0 @@ -# OSAL - -- [Overview](#section223828672165623) -- [Summary](#section1437972704165623) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Macros](#define-members) -- [Typedefs](#typedef-members) -- [Enumerations](#enum-members) -- [Functions](#func-members) -- [Details](#section281237531165623) -- [Macro Definition](#section1226510658165623) -- [OSAL\_READB](#ga3de1529efbdabd4fb2f144c6f48df70b) -- [OSAL\_READL](#ga14ce14451b2484b2e268a38757237f41) -- [OSAL\_READW](#ga8bd523f234f24415fe733addd113e60b) -- [OSAL\_WRITEB](#ga48e1f404639550c229aee3ec35a06d79) -- [OSAL\_WRITEL](#gaba47d67efad3ad9d1a33a35d2982bd49) -- [OSAL\_WRITEW](#ga3358a86c6bbb6f02ab108964962f441f) -- [Enumeration Type](#section1297392036165623) -- [OSAL\_IRQ\_TRIGGER\_MODE](#ga78cd126b10424753db6f39f9b72ea124) -- [OSAL\_THREAD\_PRIORITY](#gab8c099a9c39fdde73c74b3f7367be5d0) -- [Function](#section740670116165623) -- [OsalAtomicDec\(\)](#gaa411f380e6b21c8467260030ceee38ff) -- [OsalAtomicInc\(\)](#ga11214c11a9b875cb8ba0a67aeccc6ac9) -- [OsalAtomicRead\(\)](#gaf7b7a860f5cf11bda3008ce16a5d79d5) -- [OsalAtomicSet\(\)](#ga0b82ac10305c7ec5ae46707034b866c3) -- [OsalClearBit\(\)](#gae3e5b84f326aa1a2c4b8427509f80cd9) -- [OsalDiffTime\(\)](#ga36b0af6646f887175993e78391a5cabc) -- [OsalDisableIrq\(\)](#gaf6ae039d209e46d45c683aeda3e7cd28) -- [OsalEnableIrq\(\)](#ga7f27c6171678ab8cf925660068ac38ff) -- [OsalFileClose\(\)](#ga8786ab2baa8669e79173ab7ab47d67bb) -- [OsalFileLseek\(\)](#gaada4d66f4bb789bb4113e4084da6dea2) -- [OsalFileOpen\(\)](#ga6707125b6ac5e13912a181877f18f292) -- [OsalFileRead\(\)](#gac8ebc8dc4b9ce9725875868f69fd17a8) -- [OsalFileWrite\(\)](#ga305f575f875ff26bb907c67c23dfb16a) -- [OsalGetSysTimeMs\(\)](#gaf91cb1945b66e324fbb0761aa2f98ea3) -- [OsalGetTime\(\)](#ga649d3090dcf9ba0e22649e11ac40831f) -- [OsalIoRemap\(\)](#ga281757438906600ef89a13362151d955) -- [OsalIoUnmap\(\)](#ga0a845edb56df0a35beeea338dc5121aa) -- [OsalMDelay\(\)](#ga82ddd682a2441a22dd6148f634a6cea4) -- [OsalMemAlloc\(\)](#ga0a1c85eaad6c1588ed091e0e89b74ed2) -- [OsalMemAllocAlign\(\)](#gaf6d1b6e5583d9e1ca5abf5048bb3bad9) -- [OsalMemCalloc\(\)](#ga7a6d0f6400e835bcbe9ec655bc9f43ee) -- [OsalMemFree\(\)](#ga20dc9c415433effea4d481180a50cfa1) -- [OsalMSleep\(\)](#ga2361dc099952df28aaef8968f9f4b9a7) -- [OsalMutexDestroy\(\)](#gaa37328265ee97277516f6905f90a41b3) -- [OsalMutexInit\(\)](#ga9bbc55785f8a533b0b099956bcbe258e) -- [OsalMutexLock\(\)](#ga45d893bf49a8fb8caf76fa5d31822e0e) -- [OsalMutexTimedLock\(\)](#ga57162c8f2e812ef3e5ace498bb85a3b6) -- [OsalMutexUnlock\(\)](#gae76ffb4db66c988be5209e0dfdc7a35f) -- [OsalReadFirmware\(\)](#ga2b721d36c177786841cd05cecdb01034) -- [OsalRegisterIrq\(\)](#gade084a1942c1672f2148ccf8f6c06331) -- [OsalReleaseFirmware\(\)](#gadfccddc78411a76ae8f4af4282da12f0) -- [OsalRequestFirmware\(\)](#ga428b9de7fb95a20ab9e25b47a7d4272c) -- [OsalSeekFirmware\(\)](#ga41ae4dade9246f3b30efd276cbd43474) -- [OsalSemDestroy\(\)](#ga0b6642005b8a128ac01f69385bd6969f) -- [OsalSemInit\(\)](#ga7e4325c951479e93abe072290162da0b) -- [OsalSemPost\(\)](#gadc3205b416d3fc8e1fa9c332b82e634a) -- [OsalSemWait\(\)](#ga0000b9ee1421950d5b3a04cbc839c6af) -- [OsalSleep\(\)](#ga8b9ca3498c54b11dcbe88a2a456f23ab) -- [OsalSpinDestroy\(\)](#gacd3824f292ddef395bd1a4a7b5546470) -- [OsalSpinInit\(\)](#gae36a2d6e4e0191273c9f86a918befb5c) -- [OsalSpinLock\(\)](#gae1c4b9ac8ea2a4820d73c20ae017dbd7) -- [OsalSpinLockIrq\(\)](#ga7d409ec573a06078112a8ffae14afce5) -- [OsalSpinLockIrqSave\(\)](#gab711d8d56055e78dd85f84bc530a4d3f) -- [OsalSpinUnlock\(\)](#gada1f1826b19dc900af370a2bcd9681b9) -- [OsalSpinUnlockIrq\(\)](#ga7d7848d572fbda413b3b5770e95a234e) -- [OsalSpinUnlockIrqRestore\(\)](#ga3be4dbde6c9ae740b012e49ab90e7a8a) -- [OsalTestBit\(\)](#gaf02c15a3593cac4add3f661b63aebf81) -- [OsalTestClearBit\(\)](#ga8665e70c704921f443fd2db8193ff7cc) -- [OsalTestSetBit\(\)](#gac0ff99812a327a4a595802a23b41b46f) -- [OsalThreadCreate\(\)](#gad598b3f4b91f5e6aeeaf7b8a6e507f1e) -- [OsalThreadDestroy\(\)](#ga223ce6b94770348a93168525c536e6f9) -- [OsalThreadResume\(\)](#ga32f0b5c622518b7453f758d95b137a94) -- [OsalThreadStart\(\)](#ga74c93bd48d27cde830451f63b224307a) -- [OsalThreadSuspend\(\)](#gad556075f625d01557c0075a2c092a1da) -- [OsalTimerCreate\(\)](#ga879d9a437e1423021f95cb9341f0d6af) -- [OsalTimerDelete\(\)](#gab754f3522245e6b2f9ee1cdecae62b52) -- [OsalTimerSetTimeout\(\)](#ga49c2fe3f54d548fe5ec0d03a79691376) -- [OsalTimerStartLoop\(\)](#ga575e4f41359c737ab9690ab28838b99f) -- [OsalTimerStartOnce\(\)](#gaf2e49d5b01b49e5f64a7701da8667141) -- [OsalUDelay\(\)](#ga7ae78fa3318a82dbd769827d4f373958) -- [OsalUnregisterIrq\(\)](#gade4ec4496eb07f1ff0610b53ba419dba) - -## **Overview** - -**Description:** - -Defines the structures and interfaces for the Operating System Abstraction Layer \(OSAL\) module. - -The OSAL module harmonizes OS interface differences and provides unified OS interfaces externally, including the memory management, thread, mutex, spinlock, semaphore, timer, file, interrupt, time, atomic, firmware, and I/O operation modules. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Name

-

Description

-

osal_atomic.h

-

Declares atomic and bit operation interfaces.

-

osal_file.h

-

Declares the file structures and interfaces.

-

osal_firmware.h

-

Declares firmware structures and interfaces.

-

osal_io.h

-

Declares I/O interfaces.

-

osal_irq.h

-

Declares interrupt request (IRQ) interfaces and common IRQ trigger modes.

-

osal_mem.h

-

Declares the driver memory request and release interfaces.

-

osal_mutex.h

-

Declares mutex types and interfaces.

-

osal_sem.h

-

Declares semaphore structures and interfaces.

-

osal_spinlock.h

-

Declares spinlock types and interfaces.

-

osal_thread.h

-

Declares thread types and interfaces.

-

osal_time.h

-

Declares the time, sleep, and delay interfaces.

-

osal_timer.h

-

Declares timer types and interfaces.

-
- -## Data Structures - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

OsalAtomic

-

Describes an atomic.

-

OsalFile

-

Declares a file type.

-

OsalFirmware

-

Defines the data structure for operating a firmware file.

-

OsalFwBlock

-

Defines the data structure for reading a firmware file.

-

OsalMutex

-

Describes a mutex.

-

OsalSem

-

Describes a semaphore.

-

OsalSpinlock

-

Describes a spinlock.

-

OsalThreadParam

-

Describes thread parameters.

-

OsalThread

-

Describes a thread.

-

OsalTimespec

-

Defines time.

-

OsalTimer

-

Describes a timer.

-
- -## Macros - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

OSAL_O_RD_ONLY 0

-

Opens a file in read-only mode.

-

OSAL_O_WR_ONLY 1

-

Opens a file in write-only mode.

-

OSAL_O_RDWR 2

-

Opens a file in read and write mode.

-

OSAL_S_IREAD 00400

-

Defines the read permission for the owner.

-

OSAL_S_IWRITE 00200

-

Defines the write permission for the owner.

-

OSAL_S_IEXEC 00100

-

Defines the execution permission for the owner.

-

OSAL_S_IRGRP 00040

-

Defines the read permission for the group.

-

OSAL_S_IWGRP 00020

-

Defines the write permission for the group.

-

OSAL_S_IXGRP 00010

-

Defines the execution permission for the group.

-

OSAL_S_IROTH 00004

-

Defines the read permission for others.

-

OSAL_S_IWOTH 00002

-

Defines the write permission for others.

-

OSAL_S_IXOTH 00001

-

Defines the execution permission for others.

-

OSAL_SEEK_SET 0

-

Defines the offset from the file header.

-

OSAL_SEEK_CUR 1

-

Defines the offset from the current position.

-

OSAL_SEEK_END 2

-

Defines the offset from the end of the file.

-

OSAL_WRITEB(value, address) writeb(value, address)

-

Writes one byte of data into an I/O address space.

-

OSAL_WRITEW(value, address) writew(value, address)

-

Writes a short integer into an I/O address space.

-

OSAL_WRITEL(value, address) writel(value, address)

-

Writes an integer into an I/O address space.

-

OSAL_READB(address) readb(address)

-

Reads one byte of data from an I/O address space.

-

OSAL_READW(address) readw(address)

-

Reads a short integer from an I/O address space.

-

OSAL_READL(address) readl(address)

-

Reads an integer from an I/O address space.

-

OSAL_DECLARE_MUTEX (mutex) struct OsalMutex mutex

-

Defines a mutex.

-

OSAL_DECLARE_SEMAPHORE (sem) struct OsalSem sem

-

Defines a semaphore.

-

OSAL_DECLARE_SPINLOCK (spinlock) OsalSpinlock spinlock

-

Defines a spinlock.

-

OSAL_DECLARE_THREAD (thread) struct OsalThread thread

-

Defines a thread macro.

-

OSAL_DECLARE_TIMER (timer) OsalTimer timer

-

Defines a timer macro.

-
- -## Typedefs - - - - - - - - - - - - - - - - -

Typedef Name

-

Description

-

OsalIRQHandle ) (uint32_t irqId, void *dev)

-

typedef uint32_t(*

-

Defines an IRQ type.

-

OsalThreadEntry ) (void *)

-

typedef int(*

-

Defines a thread callback function type.

-

OsalTimerFunc ) (uintptr_t arg)

-

typedef void(*

-

Describes a timer execution function type.

-
- -## Enumerations - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

OSAL_IRQ_TRIGGER_MODE { OSAL_IRQF_TRIGGER_NONE = 0, OSAL_IRQF_TRIGGER_RISING = 1, OSAL_IRQF_TRIGGER_FALLING = 2, OSAL_IRQF_TRIGGER_HIGH = 4, OSAL_IRQF_TRIGGER_LOW = 8 }

-

Enumerates interrupt trigger modes.

-

OSAL_THREAD_PRIORITY { OSAL_THREAD_PRI_LOW, OSAL_THREAD_PRI_DEFAULT, OSAL_THREAD_PRI_HIGH, OSAL_THREAD_PRI_HIGHEST }

-

Enumerates thread priorities.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

OsalAtomicRead (const OsalAtomic *v)

-

int32_t

-

Reads the counter of an atomic.

-

OsalAtomicSet (OsalAtomic *v, int32_t counter)

-

void

-

Sets the counter for an atomic.

-

OsalAtomicInc (OsalAtomic *v)

-

void

-

Increments the counter of an atomic by 1.

-

OsalAtomicDec (OsalAtomic *v)

-

void

-

Decrements the counter of an atomic by 1.

-

OsalTestBit (unsigned long nr, const volatile unsigned long *addr)

-

int32_t

-

Tests the value of a specified bit of a variable.

-

OsalTestSetBit (unsigned long nr, volatile unsigned long *addr)

-

int32_t

-

Sets the value of a specified bit of the variable and returns the bit value before the setting.

-

OsalTestClearBit (unsigned long nr, volatile unsigned long *addr)

-

int32_t

-

Clears the value of a specified bit of the variable and returns the bit value before clearing.

-

OsalClearBit (unsigned long nr, volatile unsigned long *addr)

-

void

-

Clears the value of a specified bit of the variable.

-

OsalFileOpen (OsalFile *file, const char *path, int flags, uint32_t rights)

-

int32_t

-

Opens a file.

-

OsalFileWrite (OsalFile *file, const void *string, uint32_t length)

-

ssize_t

-

Writes a file.

-

OsalFileClose (OsalFile *file)

-

void

-

Closes a file.

-

OsalFileRead (OsalFile *file, void *buf, uint32_t length)

-

ssize_t

-

Reads a file.

-

OsalFileLseek (OsalFile *file, off_t offset, int32_t whence)

-

off_t

-

Sets the file read/write offset.

-

OsalRequestFirmware (struct OsalFirmware *fw, const char *fwName, void *device)

-

int32_t

-

Requests a firmware file based on its name and device information.

-

OsalSeekFirmware (struct OsalFirmware *fw, uint32_t offset)

-

int32_t

-

Reads a firmware file.

-

OsalReadFirmware (struct OsalFirmware *fw, struct OsalFwBlock *block)

-

int32_t

-

Releases a firmware file.

-

OsalReleaseFirmware (struct OsalFirmware *fw)

-

int32_t

-

OsalIoRemap (unsigned long phys_addr, unsigned long size)

-

static void *

-

Remaps an I/O physical address to its virtual address.

-

OsalIoUnmap (void *addr)

-

static void

-

Unmaps an I/O virtual address associated with the physical address.

-

OsalRegisterIrq (uint32_t irqId, uint32_t config, OsalIRQHandle handle, const char *name, void *dev)

-

int32_t

-

Registers an IRQ.

-

OsalUnregisterIrq (uint32_t irqId)

-

int32_t

-

Unregisters an IRQ.

-

OsalEnableIrq (uint32_t irqId)

-

int32_t

-

Enables an IRQ.

-

OsalDisableIrq (uint32_t irqId)

-

int32_t

-

Disables an IRQ.

-

OsalMemAlloc (size_t size)

-

void *

-

Allocates memory of a specified size.

-

OsalMemCalloc (size_t size)

-

void *

-

Allocates memory of a specified size, and clears the allocated memory.

-

OsalMemAllocAlign (size_t alignment, size_t size)

-

void *

-

Allocates memory of a specified size, and aligns the memory address on a given boundary.

-

OsalMemFree (void *mem)

-

void

-

Releases memory.

-

OsalMutexInit (struct OsalMutex *mutex)

-

int32_t

-

Initializes a mutex.

-

OsalMutexDestroy (struct OsalMutex *mutex)

-

int32_t

-

Destroys a mutex.

-

OsalMutexLock (struct OsalMutex *mutex)

-

int32_t

-

Locks a mutex.

-

OsalMutexTimedLock (struct OsalMutex *mutex, uint32_t ms)

-

int32_t

-

Locks a mutex with a specified timeout duration.

-

OsalMutexUnlock (struct OsalMutex *mutex)

-

int32_t

-

Unlocks a mutex.

-

OsalSemInit (struct OsalSem *sem, uint32_t value)

-

int32_t

-

Initializes a semaphore.

-

OsalSemWait (struct OsalSem *sem, uint32_t ms)

-

int32_t

-

Waits for a semaphore.

-

OsalSemPost (struct OsalSem *sem)

-

int32_t

-

Releases a semaphore.

-

OsalSemDestroy (struct OsalSem *sem)

-

int32_t

-

Destroys a semaphore.

-

OsalSpinInit (OsalSpinlock *spinlock)

-

int32_t

-

Initializes a spinlock.

-

OsalSpinDestroy (OsalSpinlock *spinlock)

-

int32_t

-

Destroys a spinlock.

-

OsalSpinLock (OsalSpinlock *spinlock)

-

int32_t

-

Obtains a spinlock.

-

OsalSpinUnlock (OsalSpinlock *spinlock)

-

int32_t

-

Releases a spinlock.

-

OsalSpinLockIrq (OsalSpinlock *spinlock)

-

int32_t

-

Obtains a spinlock and disables the IRQ.

-

OsalSpinUnlockIrq (OsalSpinlock *spinlock)

-

int32_t

-

Releases a spinlock and enables the IRQ.

-

OsalSpinLockIrqSave (OsalSpinlock *spinlock, uint32_t *flags)

-

int32_t

-

Obtains a spinlock, disables the IRQ, and saves its status.

-

OsalSpinUnlockIrqRestore (OsalSpinlock *spinlock, uint32_t *flags)

-

int32_t

-

Releases a spinlock, enables the IRQ, and restores the saved IRQ status.

-

OsalThreadCreate (struct OsalThread *thread, OsalThreadEntry threadEntry, void *entryPara)

-

int32_t

-

Creates a thread.

-

OsalThreadStart (struct OsalThread *thread, const struct OsalThreadParam *param)

-

int32_t

-

Starts a thread.

-

OsalThreadDestroy (struct OsalThread *thread)

-

int32_t

-

Destroys a thread.

-

OsalThreadSuspend (struct OsalThread *thread)

-

int32_t

-

Suspends a thread.

-

OsalThreadResume (struct OsalThread *thread)

-

int32_t

-

Resumes a thread.

-

OsalSleep (uint32_t sec)

-

void

-

Describes thread sleep, in seconds.

-

OsalMSleep (uint32_t ms)

-

void

-

Describes thread sleep, in milliseconds.

-

OsalGetTime (OsalTimespec *time)

-

int32_t

-

Obtains the second and microsecond time.

-

OsalDiffTime (const OsalTimespec *start, const OsalTimespec *end, OsalTimespec *diff)

-

int32_t

-

Obtains time difference.

-

OsalGetSysTimeMs (void)

-

uint64_t

-

Obtains the system time.

-

OsalMDelay (uint32_t ms)

-

void

-

Describes thread delay, in milliseconds.

-

OsalUDelay (uint32_t us)

-

void

-

Describes thread delay, in microseconds.

-

OsalTimerCreate (OsalTimer *timer, uint32_t interval, OsalTimerFunc func, uintptr_t arg)

-

int32_t

-

Creates a timer.

-

OsalTimerDelete (OsalTimer *timer)

-

int32_t

-

Deletes a timer.

-

OsalTimerStartOnce (OsalTimer *timer)

-

int32_t

-

Starts a timer.

-

OsalTimerStartLoop (OsalTimer *timer)

-

int32_t

-

Starts a periodic timer.

-

OsalTimerSetTimeout (OsalTimer *timer, uint32_t interval)

-

int32_t

-

Sets the interval of a timer.

-
- -## **Details** - -## **Macro Definition ** - -## OSAL\_READB - -``` -#define OSAL_READB( address) readb(address) -``` - - **Description:** - -Reads one byte of data from an I/O address space. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
addressIndicates the address to read.
- -**Returns:** - -Returns the byte. - -## OSAL\_READL - -``` -#define OSAL_READL( address) readl(address) -``` - - **Description:** - -Reads an integer from an I/O address space. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
addressIndicates the address to read.
- -**Returns:** - -Returns the integer. - -## OSAL\_READW - -``` -#define OSAL_READW( address) readw(address) -``` - - **Description:** - -Reads a short integer from an I/O address space. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
addressIndicates the address to read.
- -**Returns:** - -Returns the short integer. - -## OSAL\_WRITEB - -``` -#define OSAL_WRITEB( value, address ) writeb(value, address) -``` - - **Description:** - -Writes one byte of data into an I/O address space. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
valueIndicates the data to write.
addressIndicates the address to write.
- -## OSAL\_WRITEL - -``` -#define OSAL_WRITEL( value, address ) writel(value, address) -``` - - **Description:** - -Writes an integer into an I/O address space. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
valueIndicates the data to write.
addressIndicates the address to write.
- -## OSAL\_WRITEW - -``` -#define OSAL_WRITEW( value, address ) writew(value, address) -``` - - **Description:** - -Writes a short integer into an I/O address space. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
valueIndicates the data to write.
addressIndicates the address to write.
- -## **Enumeration Type ** - -## OSAL\_IRQ\_TRIGGER\_MODE - -``` -enum [OSAL_IRQ_TRIGGER_MODE](OSAL.md#ga78cd126b10424753db6f39f9b72ea124) -``` - - **Description:** - -Enumerates interrupt trigger modes. - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
OSAL_IRQF_TRIGGER_NONE

Edge-triggered is not set

-
OSAL_IRQF_TRIGGER_RISING

Rising edge triggered

-
OSAL_IRQF_TRIGGER_FALLING

Falling edge triggered

-
OSAL_IRQF_TRIGGER_HIGH

High-level triggered

-
OSAL_IRQF_TRIGGER_LOW

Low-level triggered

-
- -## OSAL\_THREAD\_PRIORITY - -``` -enum [OSAL_THREAD_PRIORITY](OSAL.md#gab8c099a9c39fdde73c74b3f7367be5d0) -``` - - **Description:** - -Enumerates thread priorities. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
OSAL_THREAD_PRI_LOW

Low priority

-
OSAL_THREAD_PRI_DEFAULT

Default priority

-
OSAL_THREAD_PRI_HIGH

High priority

-
OSAL_THREAD_PRI_HIGHEST

Highest priority

-
- -## **Function ** - -## OsalAtomicDec\(\) - -``` -void OsalAtomicDec ([OsalAtomic](OsalAtomic.md) * v) -``` - - **Description:** - -Decrements the counter of an atomic by 1. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
vIndicates the pointer to the atomic OsalAtomic.
- -## OsalAtomicInc\(\) - -``` -void OsalAtomicInc ([OsalAtomic](OsalAtomic.md) * v) -``` - - **Description:** - -Increments the counter of an atomic by 1. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
vIndicates the pointer to the atomic OsalAtomic.
- -## OsalAtomicRead\(\) - -``` -int32_t OsalAtomicRead (const [OsalAtomic](OsalAtomic.md) * v) -``` - - **Description:** - -Reads the counter of an atomic. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
vIndicates the pointer to the atomic OsalAtomic.
- -**Returns:** - -Returns the counter. - -## OsalAtomicSet\(\) - -``` -void OsalAtomicSet ([OsalAtomic](OsalAtomic.md) * v, int32_t counter ) -``` - - **Description:** - -Sets the counter for an atomic. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
vIndicates the pointer to the atomic OsalAtomic.
counterIndicates the counter to set.
- -## OsalClearBit\(\) - -``` -void OsalClearBit (unsigned long nr, volatile unsigned long * addr ) -``` - - **Description:** - -Clears the value of a specified bit of the variable. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
nrIndicates the bit of the variable. The value ranges from 0 to 31.
addrIndicates the pointer to the variable.
- -## OsalDiffTime\(\) - -``` -int32_t OsalDiffTime (const [OsalTimespec](OsalTimespec.md) * start, const [OsalTimespec](OsalTimespec.md) * end, [OsalTimespec](OsalTimespec.md) * diff ) -``` - - **Description:** - -Obtains time difference. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
startIndicates the pointer to the start time OsalTimespec.
endIndicates the pointer to the end time OsalTimespec.
diffIndicates the pointer to the time difference OsalTimespec.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-
- -## OsalDisableIrq\(\) - -``` -int32_t OsalDisableIrq (uint32_t irqId) -``` - - **Description:** - -Disables an IRQ. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
irqIdIndicates the IRQ ID.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-
- -## OsalEnableIrq\(\) - -``` -int32_t OsalEnableIrq (uint32_t irqId) -``` - - **Description:** - -Enables an IRQ. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
irqIdIndicates the IRQ ID.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-
- -## OsalFileClose\(\) - -``` -void OsalFileClose ([OsalFile](OsalFile.md) * file) -``` - - **Description:** - -Closes a file. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
fileIndicates the pointer to the file type OsalFile.
- -## OsalFileLseek\(\) - -``` -off_t OsalFileLseek ([OsalFile](OsalFile.md) * file, off_t offset, int32_t whence ) -``` - - **Description:** - -Sets the file read/write offset. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
fileIndicates the pointer to the file type OsalFile.
offsetIndicates the offset to set.
whenceIndicates the position from which the offset is to set. For details, see OSAL_SEEK_SET.
- -## OsalFileOpen\(\) - -``` -int32_t OsalFileOpen ([OsalFile](OsalFile.md) * file, const char * path, int flags, uint32_t rights ) -``` - - **Description:** - -Opens a file. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
fileIndicates the pointer to the file type OsalFile.
pathIndicates the pointer to the name of the file to open.
flagsIndicates the mode of opening the file. For details, see OSAL_O_RD_ONLY.
rightsIndicates the permissions required for opening the file. For details, see OSAL_S_IREAD.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_FAILURE

-

Failed to invoke the system function to open the file.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-
- -## OsalFileRead\(\) - -``` -ssize_t OsalFileRead ([OsalFile](OsalFile.md) * file, void * buf, uint32_t length ) -``` - - **Description:** - -Reads a file. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
fileIndicates the pointer to the file type OsalFile.
bufIndicates the pointer to the buffer for storing the content to read.
lengthIndicates the length of the content to read.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - -

ssize_t

-

Description

-

Greater than 0

-

The length of the file content is successfully read.

-

HDF_FAILURE HDF_STATUS

-

Failed to invoke the system function to read the file.

-

HDF_ERR_INVALID_PARAM HDF_STATUS

-

Invalid parameter.

-
- -## OsalFileWrite\(\) - -``` -ssize_t OsalFileWrite ([OsalFile](OsalFile.md) * file, const void * string, uint32_t length ) -``` - - **Description:** - -Writes a file. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
fileIndicates the pointer to the file type OsalFile.
stringIndicates the pointer to the content to write.
lengthIndicates the length of the content to write.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - -

ssize_t

-

Description

-

Greater than 0

-

The length of the file content is successfully written.

-

HDF_FAILURE HDF_STATUS

-

Failed to invoke the system function to write the file.

-

HDF_ERR_INVALID_PARAM HDF_STATUS

-

Invalid parameter.

-
- -## OsalGetSysTimeMs\(\) - -``` -uint64_t OsalGetSysTimeMs (void ) -``` - - **Description:** - -Obtains the system time. - -**Returns:** - -Returns the system time, in milliseconds. - -## OsalGetTime\(\) - -``` -int32_t OsalGetTime ([OsalTimespec](OsalTimespec.md) * time) -``` - - **Description:** - -Obtains the second and microsecond time. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
timeIndicates the pointer to the time structure OsalTimespec.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_FAILURE

-

Failed to invoke the system function to obtain time.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-
- -## OsalIoRemap\(\) - -``` -static void* OsalIoRemap (unsigned long phys_addr, unsigned long size ) -``` - - **Description:** - -Remaps an I/O physical address to its virtual address. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
phys_addrIndicates the I/O physical address.
sizeIndicates the size of the physical address to remap.
- -**Returns:** - -Returns the virtual address. - -## OsalIoUnmap\(\) - -``` -static void OsalIoUnmap (void * addr) -``` - - **Description:** - -Unmaps an I/O virtual address associated with the physical address. - -The virtual address is the one returned by calling [OsalIoRemap](OSAL.md#ga281757438906600ef89a13362151d955). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
addrIndicates the pointer to the virtual address to unmap.
- -## OsalMDelay\(\) - -``` -void OsalMDelay (uint32_t ms) -``` - - **Description:** - -Describes thread delay, in milliseconds. - -When a thread invokes this function, the CPU is not released. This function returns after waiting for milliseconds. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
msIndicates the delay time, in milliseconds.
- -## OsalMemAlloc\(\) - -``` -void* OsalMemAlloc (size_t size) -``` - - **Description:** - -Allocates memory of a specified size. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sizeIndicates the size of memory to allocate.
- -**Returns:** - -Returns the pointer to the allocated memory if the operation is successful; returns **NULL** otherwise. - -## OsalMemAllocAlign\(\) - -``` -void* OsalMemAllocAlign (size_t alignment, size_t size ) -``` - - **Description:** - -Allocates memory of a specified size, and aligns the memory address on a given boundary. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
alignmentIndicates the memory boundary alignment. The value must be a power of 2.
sizeIndicates the size of memory to allocate.
- -**Returns:** - -Returns the pointer to the allocated memory if the operation is successful; returns **NULL** otherwise. - -## OsalMemCalloc\(\) - -``` -void* OsalMemCalloc (size_t size) -``` - - **Description:** - -Allocates memory of a specified size, and clears the allocated memory. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sizeIndicates the size of memory to allocate.
- -**Returns:** - -Returns the pointer to the allocated memory if the operation is successful; returns **NULL** otherwise. - -## OsalMemFree\(\) - -``` -void OsalMemFree (void * mem) -``` - - **Description:** - -Releases memory. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
memIndicates the pointer to the memory to release.
- -## OsalMSleep\(\) - -``` -void OsalMSleep (uint32_t ms) -``` - - **Description:** - -Describes thread sleep, in milliseconds. - -When a thread invokes this function, the CPU is released and the thread enters the sleep state. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
msIndicates the sleep time, in milliseconds.
- -## OsalMutexDestroy\(\) - -``` -int32_t OsalMutexDestroy (struct [OsalMutex](OsalMutex.md) * mutex) -``` - - **Description:** - -Destroys a mutex. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
mutexIndicates the pointer to the mutex OsalMutex.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_FAILURE

-

Failed to invoke the system function to destroy the mutex.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-
- -## OsalMutexInit\(\) - -``` -int32_t OsalMutexInit (struct [OsalMutex](OsalMutex.md) * mutex) -``` - - **Description:** - -Initializes a mutex. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
mutexIndicates the pointer to the mutex OsalMutex.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_FAILURE

-

Failed to invoke the system function to initialize the mutex.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-
- -## OsalMutexLock\(\) - -``` -int32_t OsalMutexLock (struct [OsalMutex](OsalMutex.md) * mutex) -``` - - **Description:** - -Locks a mutex. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
mutexIndicates the pointer to the mutex OsalMutex.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_FAILURE

-

Failed to invoke the system function to lock the mutex.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-
- -## OsalMutexTimedLock\(\) - -``` -int32_t OsalMutexTimedLock (struct [OsalMutex](OsalMutex.md) * mutex, uint32_t ms ) -``` - - **Description:** - -Locks a mutex with a specified timeout duration. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
mutexIndicates the pointer to the mutex OsalMutex.
msIndicates the timeout duration, in milliseconds.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_FAILURE

-

Failed to invoke the system function to lock the mutex.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-

HDF_ERR_TIMEOUT

-

Timeout occurs.

-
- -## OsalMutexUnlock\(\) - -``` -int32_t OsalMutexUnlock (struct [OsalMutex](OsalMutex.md) * mutex) -``` - - **Description:** - -Unlocks a mutex. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
mutexIndicates the pointer to the mutex OsalMutex.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_FAILURE

-

Failed to invoke the system function to unlock the mutex.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-
- -## OsalReadFirmware\(\) - -``` -int32_t OsalReadFirmware (struct [OsalFirmware](OsalFirmware.md) * fw, struct [OsalFwBlock](OsalFwBlock.md) * block ) -``` - - **Description:** - -Releases a firmware file. - -After the firmware file is read, this function is called to release the firmware file. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
fwIndicates the pointer to the firmware file OsalFirmware.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_FAILURE

-

Failed to invoke the system function.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-
- -## OsalRegisterIrq\(\) - -``` -int32_t OsalRegisterIrq (uint32_t irqId, uint32_t config, [OsalIRQHandle](OSAL.md#gab671a9e177f622a98af9ca1bd93198eb) handle, const char * name, void * dev ) -``` - - **Description:** - -Registers an IRQ. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
irqIdIndicates the IRQ ID.
configIndicates the interrupt trigger mode. For details, see OSAL_IRQ_TRIGGER_MODE.
handleIndicates the interrupt processing function.
nameIndicates the pointer to the device name for registering an IRQ.
devIndicates the pointer to the parameter passed to the interrupt processing function.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_FAILURE

-

Failed to invoke the system function to register the IRQ.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-
- -## OsalReleaseFirmware\(\) - -``` -int32_t OsalReleaseFirmware (struct [OsalFirmware](OsalFirmware.md) * fw) -``` - - **Description:** - -Release firmware resource - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
 fw Firmware parameter, see detail in OsalFirmware block Firmware data block, see detail in hdf_FWBlock
- -**Returns:** - -: true or false - -## OsalRequestFirmware\(\) - -``` -int32_t OsalRequestFirmware (struct [OsalFirmware](OsalFirmware.md) * fw, const char * fwName, void * device ) -``` - - **Description:** - -Requests a firmware file based on its name and device information. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
fwIndicates the pointer to the firmware file OsalFirmware, which cannot be empty.
fwNameIndicates the pointer to the firmware file name, which cannot be empty.
deviceIndicates the pointer to the information about the device that requests the firmware file.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_FAILURE

-

Failed to invoke the system function.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-

HDF_ERR_MALLOC_FAIL

-

Memory allocation fails.

-
- -## OsalSeekFirmware\(\) - -``` -int32_t OsalSeekFirmware (struct [OsalFirmware](OsalFirmware.md) * fw, uint32_t offset ) -``` - - **Description:** - -Reads a firmware file. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
fwIndicates the pointer to the firmware file OsalFirmware.
blockIndicates the pointer to the firmware block to read. For details, see OsalFwBlock.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_FAILURE

-

Failed to invoke the system function.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-
- -## OsalSemDestroy\(\) - -``` -int32_t OsalSemDestroy (struct [OsalSem](OsalSem.md) * sem) -``` - - **Description:** - -Destroys a semaphore. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
semIndicates the pointer to the semaphore OsalSem.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_FAILURE

-

Failed to invoke the system function to destroy the semaphore.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-
- -## OsalSemInit\(\) - -``` -int32_t OsalSemInit (struct [OsalSem](OsalSem.md) * sem, uint32_t value ) -``` - - **Description:** - -Initializes a semaphore. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
semIndicates the pointer to the semaphore OsalSem.
valueIndicates the initial value of the semaphore.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_FAILURE

-

Failed to invoke the system function to initialize the semaphore.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-
- -## OsalSemPost\(\) - -``` -int32_t OsalSemPost (struct [OsalSem](OsalSem.md) * sem) -``` - - **Description:** - -Releases a semaphore. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
semIndicates the pointer to the semaphore OsalSem.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_FAILURE

-

Failed to invoke the system function to release the semaphore.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-
- -## OsalSemWait\(\) - -``` -int32_t OsalSemWait (struct [OsalSem](OsalSem.md) * sem, uint32_t ms ) -``` - - **Description:** - -Waits for a semaphore. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
semIndicates the pointer to the semaphore OsalSem.
msIndicates the timeout interval.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_FAILURE

-

Failed to invoke the system function to wait for the semaphore.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-

HDF_ERR_TIMEOUT

-

Timeout occurs.

-
- -## OsalSleep\(\) - -``` -void OsalSleep (uint32_t sec) -``` - - **Description:** - -Describes thread sleep, in seconds. - -When a thread invokes this function, the CPU is released and the thread enters the sleep state. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
secIndicates the sleep time, in seconds.
- -## OsalSpinDestroy\(\) - -``` -int32_t OsalSpinDestroy ([OsalSpinlock](OsalSpinlock.md) * spinlock) -``` - - **Description:** - -Destroys a spinlock. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
spinlockIndicates the pointer to the spinlock OsalSpinlock.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_FAILURE

-

Failed to invoke the system function to destroy the spinlock.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-
- -## OsalSpinInit\(\) - -``` -int32_t OsalSpinInit ([OsalSpinlock](OsalSpinlock.md) * spinlock) -``` - - **Description:** - -Initializes a spinlock. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
spinlockIndicates the pointer to the spinlock OsalSpinlock.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_FAILURE

-

Failed to invoke the system function to initialize the spinlock.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-

HDF_ERR_MALLOC_FAIL

-

Memory allocation fails.

-
- -## OsalSpinLock\(\) - -``` -int32_t OsalSpinLock ([OsalSpinlock](OsalSpinlock.md) * spinlock) -``` - - **Description:** - -Obtains a spinlock. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
spinlockIndicates the pointer to the spinlock OsalSpinlock.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_FAILURE

-

Failed to invoke the system function to obtain the spinlock.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-
- -## OsalSpinLockIrq\(\) - -``` -int32_t OsalSpinLockIrq ([OsalSpinlock](OsalSpinlock.md) * spinlock) -``` - - **Description:** - -Obtains a spinlock and disables the IRQ. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
spinlockIndicates the pointer to the spinlock OsalSpinlock.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_FAILURE

-

Failed to invoke the system function to obtain the spinlock.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-
- -## OsalSpinLockIrqSave\(\) - -``` -int32_t OsalSpinLockIrqSave ([OsalSpinlock](OsalSpinlock.md) * spinlock, uint32_t * flags ) -``` - - **Description:** - -Obtains a spinlock, disables the IRQ, and saves its status. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
spinlockIndicates the pointer to the spinlock OsalSpinlock.
flagsIndicates the pointer to the status of the IRQ register.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_FAILURE

-

Failed to invoke the system function to obtain the spinlock.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-
- -## OsalSpinUnlock\(\) - -``` -int32_t OsalSpinUnlock ([OsalSpinlock](OsalSpinlock.md) * spinlock) -``` - - **Description:** - -Releases a spinlock. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
spinlockIndicates the pointer to the spinlock OsalSpinlock.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_FAILURE

-

Failed to invoke the system function to release the spinlock.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-
- -## OsalSpinUnlockIrq\(\) - -``` -int32_t OsalSpinUnlockIrq ([OsalSpinlock](OsalSpinlock.md) * spinlock) -``` - - **Description:** - -Releases a spinlock and enables the IRQ. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
spinlockIndicates the pointer to the spinlock OsalSpinlock.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_FAILURE

-

Failed to invoke the system function to release the spinlock.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-
- -## OsalSpinUnlockIrqRestore\(\) - -``` -int32_t OsalSpinUnlockIrqRestore ([OsalSpinlock](OsalSpinlock.md) * spinlock, uint32_t * flags ) -``` - - **Description:** - -Releases a spinlock, enables the IRQ, and restores the saved IRQ status. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
spinlockIndicates the pointer to the spinlock OsalSpinlock.
flagsIndicates the pointer to the value used to restore the IRQ register.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_FAILURE

-

Failed to invoke the system function to release the spinlock.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-
- -## OsalTestBit\(\) - -``` -int32_t OsalTestBit (unsigned long nr, const volatile unsigned long * addr ) -``` - - **Description:** - -Tests the value of a specified bit of a variable. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
nrIndicates the bit of the variable. The value ranges from 0 to 31.
addrIndicates the pointer to the variable.
- -**Returns:** - -Returns the bit value. - -## OsalTestClearBit\(\) - -``` -int32_t OsalTestClearBit (unsigned long nr, volatile unsigned long * addr ) -``` - - **Description:** - -Clears the value of a specified bit of the variable and returns the bit value before clearing. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
nrIndicates the bit of the variable. The value ranges from 0 to 31.
addrIndicates the pointer to the variable.
- -**Returns:** - -Returns the bit value before the bit is cleared. - -## OsalTestSetBit\(\) - -``` -int32_t OsalTestSetBit (unsigned long nr, volatile unsigned long * addr ) -``` - - **Description:** - -Sets the value of a specified bit of the variable and returns the bit value before the setting. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
nrIndicates the bit of the variable. The value ranges from 0 to 31.
addrIndicates the pointer to the variable.
- -**Returns:** - -Returns the bit value before the setting. - -## OsalThreadCreate\(\) - -``` -int32_t OsalThreadCreate (struct [OsalThread](OsalThread.md) * thread, [OsalThreadEntry](OSAL.md#ga21ea0f87d53e65ec86a424c532d688d8) threadEntry, void * entryPara ) -``` - - **Description:** - -Creates a thread. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
threadIndicates the pointer to the thread OsalThread.
threadEntryIndicates the thread callback function OsalThreadEntry.
entryParaIndicates the pointer to the parameter passed to the thread callback function.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-

HDF_ERR_MALLOC_FAIL

-

Memory allocation fails.

-
- -## OsalThreadDestroy\(\) - -``` -int32_t OsalThreadDestroy (struct [OsalThread](OsalThread.md) * thread) -``` - - **Description:** - -Destroys a thread. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
threadIndicates the pointer to the thread OsalThread.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_FAILURE

-

Failed to invoke the system function to destroy the thread.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-
- -## OsalThreadResume\(\) - -``` -int32_t OsalThreadResume (struct [OsalThread](OsalThread.md) * thread) -``` - - **Description:** - -Resumes a thread. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
threadIndicates the pointer to the thread OsalThread.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_FAILURE

-

Failed to invoke the system function to resume the thread.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-
- -## OsalThreadStart\(\) - -``` -int32_t OsalThreadStart (struct [OsalThread](OsalThread.md) * thread, const struct [OsalThreadParam](OsalThreadParam.md) * param ) -``` - - **Description:** - -Starts a thread. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
threadIndicates the pointer to the thread OsalThread.
paramIndicates the pointer to the parameter used to start a thread. For details, see OsalThreadParam.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_FAILURE

-

Failed to invoke the system function to start the thread.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-
- -## OsalThreadSuspend\(\) - -``` -int32_t OsalThreadSuspend (struct [OsalThread](OsalThread.md) * thread) -``` - - **Description:** - -Suspends a thread. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
threadIndicates the pointer to the thread OsalThread.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_FAILURE

-

Failed to invoke the system function to suspend the thread.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-
- -## OsalTimerCreate\(\) - -``` -int32_t OsalTimerCreate ([OsalTimer](OsalTimer.md) * timer, uint32_t interval, [OsalTimerFunc](OSAL.md#gaf3e7a12075b25df5971049d8cd77c25c) func, uintptr_t arg ) -``` - - **Description:** - -Creates a timer. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
timerIndicates the pointer to the timer OsalTimer.
intervalIndicates the timer interval.
funcIndicates the timer execution function OsalTimerFunc.
argIndicates the argument passed to the timer execution function.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_FAILURE

-

Failed to invoke the system function.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-

HDF_ERR_MALLOC_FAIL

-

Memory allocation fails.

-
- -## OsalTimerDelete\(\) - -``` -int32_t OsalTimerDelete ([OsalTimer](OsalTimer.md) * timer) -``` - - **Description:** - -Deletes a timer. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
timerIndicates the pointer to the timer OsalTimer.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_FAILURE

-

Failed to invoke the system function to delete the timer.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-
- -## OsalTimerSetTimeout\(\) - -``` -int32_t OsalTimerSetTimeout ([OsalTimer](OsalTimer.md) * timer, uint32_t interval ) -``` - - **Description:** - -Sets the interval of a timer. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
timerIndicates the pointer to the timer OsalTimer.
intervalIndicates the timer interval, in milliseconds.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_FAILURE

-

Failed to invoke the system function.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-
- -## OsalTimerStartLoop\(\) - -``` -int32_t OsalTimerStartLoop ([OsalTimer](OsalTimer.md) * timer) -``` - - **Description:** - -Starts a periodic timer. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
timerIndicates the pointer to the timer OsalTimer.
intervalIndicates the timer interval, in milliseconds.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_FAILURE

-

Failed to invoke the system function to start the timer.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-
- -## OsalTimerStartOnce\(\) - -``` -int32_t OsalTimerStartOnce ([OsalTimer](OsalTimer.md) * timer) -``` - - **Description:** - -Starts a timer. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
timerIndicates the pointer to the timer OsalTimer.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_FAILURE

-

Failed to invoke the system function to start the timer.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-
- -## OsalUDelay\(\) - -``` -void OsalUDelay (uint32_t us) -``` - - **Description:** - -Describes thread delay, in microseconds. - -When a thread invokes this function, the CPU is not released. This function returns after waiting for microseconds. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
usIndicates the delay time, in microseconds.
- -## OsalUnregisterIrq\(\) - -``` -int32_t OsalUnregisterIrq (uint32_t irqId) -``` - - **Description:** - -Unregisters an IRQ. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
irqIdIndicates the IRQ ID.
- -**Returns:** - -Returns a value listed below: - - - - - - - - - - - - - - - - -

HDF_STATUS

-

Description

-

HDF_SUCCESS

-

The operation is successful.

-

HDF_FAILURE

-

Failed to invoke the system function to unregister the IRQ.

-

HDF_ERR_INVALID_PARAM

-

Invalid parameter.

-
- diff --git a/api/api-SmartVision-Devices/OTA.md b/api/api-SmartVision-Devices/OTA.md deleted file mode 100755 index d0b01db4a06c0dbc0bc79c619ab4794762fa97c1..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OTA.md +++ /dev/null @@ -1,320 +0,0 @@ -# OTA - -## **Overview** - -Provides system upgrades. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - -

File Name

-

Description

-

hota_updater.h

-

Defines the functions for system upgrades.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

HotaSetPackageType (unsigned int flag)

-

int 

-

Sets the switch for using the default upgrade package format.

-

HotaGetUpdateIndex (unsigned int *index)

-

int 

-

Obtains the index of the A/B partition to be upgraded.

-

HotaInit (ErrorCallBackFunc errorCallback, StatusCallBackFunc statusCallback)

-

int 

-

Initializes the OTA module.

-

HotaWrite (unsigned char *buffer, unsigned int offset, unsigned int buffSize)

-

int 

-

Writes specified data into flash memory.

-

HotaRead (unsigned int offset, unsigned int bufLen, unsigned char *buf)

-

int 

-

Reads the data that has been written into flash memory.

-

HotaCancel (void)

-

int 

-

Cancels an upgrade.

-

HotaSetBootSettings (void)

-

int 

-

Sets the system state to be upgrading after data has been written into flash memory by HotaWrite.

-

HotaRestart (void)

-

int 

-

Restarts the system after an upgrade.

-
- -## **Details** - -## **Function Documentation** - -## HotaCancel\(\) - -``` -int HotaCancel (void ) -``` - - **Description:** - -Cancels an upgrade. - -If an upgrade fails or is interrupted, you can use this function to cancel it. - -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - - - -## HotaGetUpdateIndex\(\) - -``` -int HotaGetUpdateIndex (unsigned int * index) -``` - - **Description:** - -Obtains the index of the A/B partition to be upgraded. - -In the A/B upgrade scenario, you can use this function to determine whether partition A or B will be upgraded. - -**Parameters:** - - - - - - - - - -

Name

-

Description

-
indexIndicates the index of a partition. The value 1 means partition A, and 2 means partition B.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - - - -## HotaInit\(\) - -``` -int HotaInit (ErrorCallBackFunc errorCallback, StatusCallBackFunc statusCallback ) -``` - - **Description:** - -Initializes the OTA module. - -**Parameters:** - - - - - - - - - - - - -

Name

-

Description

-
errorCallbackIndicates the callback invoked when an error occurs during the upgrade. This parameter can be null.
statusCallbackIndicates the callback invoked when the upgrade status changes. This parameter can be null.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - - - -## HotaRead\(\) - -``` -int HotaRead (unsigned int offset, unsigned int bufLen, unsigned char * buf ) -``` - - **Description:** - -Reads the data that has been written into flash memory. - -This function is required for verifying data correctness when the default upgrade package format is not used. It is not required when the default upgrade package format is used. - -**Parameters:** - - - - - - - - - - - - - - - -

Name

-

Description

-
offsetIndicates the offset from where to start reading data.
bufLenIndicates the length of the data to be read.
bufIndicates the buffer to store the data that has been read.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - - - -## HotaRestart\(\) - -``` -int HotaRestart (void ) -``` - - **Description:** - -Restarts the system after an upgrade. - -You need to call this function after you have called the [HotaSetBootSettings](OTA.md#ga017c1bd1166fd95dede1a28a87adb0fa) function. - -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - - - -## HotaSetBootSettings\(\) - -``` -int HotaSetBootSettings (void ) -``` - - **Description:** - -Sets the system state to be upgrading after data has been written into flash memory by [HotaWrite](OTA.md#ga3b2d7152e8898e5f1d95fcabaa181e40). - -After this operation is successful, you need to call the [HotaRestart](OTA.md#gad539df71d6fa124457e06badc0c05c46) function to complete the upgrade. - -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - - - -## HotaSetPackageType\(\) - -``` -int HotaSetPackageType (unsigned int flag) -``` - - **Description:** - -Sets the switch for using the default upgrade package format. - -You can call this function to choose the default upgrade package format when developing the system upgrade capability. If the default upgrade package format is used, the system ensures the security and integrity of the upgrade package. If it is not used, you need to ensure the security and integrity of the upgrade package you have chosen. To be specific, you need to call the [HotaRead](OTA.md#ga0972316900eaa074273a3c286c42d409) function to read the data that has been written into flash memory, and then verify the data. - -**Parameters:** - - - - - - - - - -

Name

-

Description

-
flagSpecifies whether to use the default system upgrade package format. The value 1 (default value) means to use it, and 0 means not to use it.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - - - -## HotaWrite\(\) - -``` -int HotaWrite (unsigned char * buffer, unsigned int offset, unsigned int buffSize ) -``` - - **Description:** - -Writes specified data into flash memory. - -**Parameters:** - - - - - - - - - - - - - - - -

Name

-

Description

-
bufferIndicates the data to be written into flash memory.
offsetIndicates the offset from where to start writing data.
buffSizeIndicates the size of the data to be written.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - - - diff --git "a/api/api-SmartVision-Devices/OpenHarmony\345\206\205\346\240\270.md" "b/api/api-SmartVision-Devices/OpenHarmony\345\206\205\346\240\270.md" deleted file mode 100755 index 7583436f70b2f4cee8e2e7b0642616ca6f454397..0000000000000000000000000000000000000000 --- "a/api/api-SmartVision-Devices/OpenHarmony\345\206\205\346\240\270.md" +++ /dev/null @@ -1,5 +0,0 @@ -# OpenHarmony内核 - -- **[内核子系统](内核子系统.md)** - - diff --git a/api/api-SmartVision-Devices/OsalAtomic.md b/api/api-SmartVision-Devices/OsalAtomic.md deleted file mode 100755 index cbaae83247256c28524a4961c2c75e200f961192..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OsalAtomic.md +++ /dev/null @@ -1,52 +0,0 @@ -# OsalAtomic - -- [Overview](#section269307788165633) -- [Summary](#section135936520165633) -- [Data Fields](#pub-attribs) -- [Details](#section1353513052165633) -- [Field](#section883573916165633) -- [counter](#a8ef74a726684b2743ed3d3008936b55c) - -## **Overview** - -**Related Modules:** - -[OSAL](OSAL.md) - -**Description:** - -Describes an atomic. - -## **Summary** - -## Data Fields - - - - - - - - - - -

Variable Name

-

Description

-

counter

-

volatile int32_t

-
- -## **Details** - -## **Field ** - -## counter - -``` -volatile int32_t OsalAtomic::counter -``` - - **Description:** - -Counter \(an atomic variable\). An operation on the atomic is to operate this variable. - diff --git a/api/api-SmartVision-Devices/OsalFile.md b/api/api-SmartVision-Devices/OsalFile.md deleted file mode 100755 index d54fc25be323ad1d5cc867d4e369f79d7799cee7..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OsalFile.md +++ /dev/null @@ -1,52 +0,0 @@ -# OsalFile - -- [Overview](#section2088462074165633) -- [Summary](#section805239512165633) -- [Data Fields](#pub-attribs) -- [Details](#section243941889165633) -- [Field](#section251976939165633) -- [realFile](#a5d2519eadb9e74fe2a1f68cbff176412) - -## **Overview** - -**Related Modules:** - -[OSAL](OSAL.md) - -**Description:** - -Declares a file type. - -## **Summary** - -## Data Fields - - - - - - - - - - -

Variable Name

-

Description

-

realFile

-

void *

-
- -## **Details** - -## **Field ** - -## realFile - -``` -void* OsalFile::realFile -``` - - **Description:** - -Pointer to a file object to access - diff --git a/api/api-SmartVision-Devices/OsalFirmware.md b/api/api-SmartVision-Devices/OsalFirmware.md deleted file mode 100755 index 122d016e60fd99fcaf4e247efbc8df2e26d97315..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OsalFirmware.md +++ /dev/null @@ -1,68 +0,0 @@ -# OsalFirmware - -- [Overview](#section521004557165633) -- [Summary](#section961483112165633) -- [Data Fields](#pub-attribs) -- [Details](#section1150528670165633) -- [Field](#section1475257401165633) -- [fwSize](#abc1fab9dde51713c504936594369d067) -- [para](#a11f428199ca9e9e4f94c1ef7c2bdea11) - -## **Overview** - -**Related Modules:** - -[OSAL](OSAL.md) - -**Description:** - -Defines the data structure for operating a firmware file. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

fwSize

-

uint32_t

-

para

-

void *

-
- -## **Details** - -## **Field ** - -## fwSize - -``` -uint32_t OsalFirmware::fwSize -``` - - **Description:** - -Firmware file size, which is returned by calling [OsalRequestFirmware](OSAL.md#ga428b9de7fb95a20ab9e25b47a7d4272c). - -## para - -``` -void* OsalFirmware::para -``` - - **Description:** - -Pointer to a firmware file, which is returned by calling [OsalRequestFirmware](OSAL.md#ga428b9de7fb95a20ab9e25b47a7d4272c). You do not need to allocate space. - diff --git a/api/api-SmartVision-Devices/OsalFwBlock.md b/api/api-SmartVision-Devices/OsalFwBlock.md deleted file mode 100755 index 4f804f10e3e892dd14ce6dfe906ae509f646b2e1..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OsalFwBlock.md +++ /dev/null @@ -1,102 +0,0 @@ -# OsalFwBlock - -- [Overview](#section1801840668165633) -- [Summary](#section655348150165633) -- [Data Fields](#pub-attribs) -- [Details](#section1615420802165633) -- [Field](#section576570456165633) -- [curOffset](#a74631bb4d6242a21146e6465c9640fa8) -- [data](#affee01298d0388b9e14da67fd17e6eba) -- [dataSize](#a383d93123b0d78a8031132d06ff035c5) -- [endFlag](#ada578cbe9c02da3ebef4e70835d42774) - -## **Overview** - -**Related Modules:** - -[OSAL](OSAL.md) - -**Description:** - -Defines the data structure for reading a firmware file. - -This structure declares the firmware block to read each time. The firmware file can be read in split mode. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

data

-

uint8_t *

-

endFlag

-

bool

-

dataSize

-

uint32_t

-

curOffset

-

int32_t

-
- -## **Details** - -## **Field ** - -## curOffset - -``` -int32_t OsalFwBlock::curOffset -``` - - **Description:** - -Offset in the firmware file - -## data - -``` -uint8_t* OsalFwBlock::data -``` - - **Description:** - -Firmware content read this time. You do not need to allocate space. - -## dataSize - -``` -uint32_t OsalFwBlock::dataSize -``` - - **Description:** - -Firmware block size read this time - -## endFlag - -``` -bool OsalFwBlock::endFlag -``` - - **Description:** - -Whether the firmware file is read completely - diff --git a/api/api-SmartVision-Devices/OsalMutex.md b/api/api-SmartVision-Devices/OsalMutex.md deleted file mode 100755 index 38190b9ff097f652fd3ad2a61f5f76004db49f43..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OsalMutex.md +++ /dev/null @@ -1,52 +0,0 @@ -# OsalMutex - -- [Overview](#section900452523165633) -- [Summary](#section1701690419165633) -- [Data Fields](#pub-attribs) -- [Details](#section1840170014165633) -- [Field](#section2109043868165633) -- [realMutex](#a0fed7926f0119dc3734b15701902dca8) - -## **Overview** - -**Related Modules:** - -[OSAL](OSAL.md) - -**Description:** - -Describes a mutex. - -## **Summary** - -## Data Fields - - - - - - - - - - -

Variable Name

-

Description

-

realMutex

-

void *

-
- -## **Details** - -## **Field ** - -## realMutex - -``` -void* OsalMutex::realMutex -``` - - **Description:** - -Pointer to a mutex object to operate - diff --git a/api/api-SmartVision-Devices/OsalSem.md b/api/api-SmartVision-Devices/OsalSem.md deleted file mode 100755 index 0b177c1052334ff04645626482d06a27af057551..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OsalSem.md +++ /dev/null @@ -1,52 +0,0 @@ -# OsalSem - -- [Overview](#section2126566152165633) -- [Summary](#section342043791165633) -- [Data Fields](#pub-attribs) -- [Details](#section1018333321165633) -- [Field](#section745122028165633) -- [realSemaphore](#aa75332b5aea77a106ec3542c9f692860) - -## **Overview** - -**Related Modules:** - -[OSAL](OSAL.md) - -**Description:** - -Describes a semaphore. - -## **Summary** - -## Data Fields - - - - - - - - - - -

Variable Name

-

Description

-

realSemaphore

-

void *

-
- -## **Details** - -## **Field ** - -## realSemaphore - -``` -void* OsalSem::realSemaphore -``` - - **Description:** - -Pointer to a semaphore to operate - diff --git a/api/api-SmartVision-Devices/OsalSpinlock.md b/api/api-SmartVision-Devices/OsalSpinlock.md deleted file mode 100755 index 414847e85db6a76aab394a2e00614d01daaf915a..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OsalSpinlock.md +++ /dev/null @@ -1,52 +0,0 @@ -# OsalSpinlock - -- [Overview](#section952106484165633) -- [Summary](#section1504229653165633) -- [Data Fields](#pub-attribs) -- [Details](#section1351325422165633) -- [Field](#section361550166165633) -- [realSpinlock](#aafdd935f8d0d61accfd05279f5001a05) - -## **Overview** - -**Related Modules:** - -[OSAL](OSAL.md) - -**Description:** - -Describes a spinlock. - -## **Summary** - -## Data Fields - - - - - - - - - - -

Variable Name

-

Description

-

realSpinlock

-

void *

-
- -## **Details** - -## **Field ** - -## realSpinlock - -``` -void* OsalSpinlock::realSpinlock -``` - - **Description:** - -Pointer to a spinlock - diff --git a/api/api-SmartVision-Devices/OsalThread.md b/api/api-SmartVision-Devices/OsalThread.md deleted file mode 100755 index a5ebcac8473eae6995e6cf94b5227db6ec8018b7..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OsalThread.md +++ /dev/null @@ -1,68 +0,0 @@ -# OsalThread - -- [Overview](#section499057880165633) -- [Summary](#section1787618970165633) -- [Data Fields](#pub-attribs) -- [Details](#section1199761491165633) -- [Field](#section187397808165633) -- [realThread](#a610e38635cc4f16cd3b274ae9351818f) -- [status](#ac7c4d7a09cb3a91c98dd04588a79d4d4) - -## **Overview** - -**Related Modules:** - -[OSAL](OSAL.md) - -**Description:** - -Describes a thread. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

status

-

int32_t

-

realThread

-

void *

-
- -## **Details** - -## **Field ** - -## realThread - -``` -void* OsalThread::realThread -``` - - **Description:** - -Pointer to a created thread object - -## status - -``` -int32_t OsalThread::status -``` - - **Description:** - -Thread running status - diff --git a/api/api-SmartVision-Devices/OsalThreadParam.md b/api/api-SmartVision-Devices/OsalThreadParam.md deleted file mode 100755 index 71174061016f760447ee2e0701922c593dacb842..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OsalThreadParam.md +++ /dev/null @@ -1,84 +0,0 @@ -# OsalThreadParam - -- [Overview](#section807159970165633) -- [Summary](#section1112501934165633) -- [Data Fields](#pub-attribs) -- [Details](#section180003492165633) -- [Field](#section1762739165633) -- [name](#a6bd1010a71ee937fa5fdbcbf11e733ab) -- [priority](#a11ba2334842664dce682fef5cadfbf30) -- [stackSize](#a658a540a5c27b8bbe7feb8f143364b18) - -## **Overview** - -**Related Modules:** - -[OSAL](OSAL.md) - -**Description:** - -Describes thread parameters. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

name

-

char *

-

stackSize

-

size_t

-

priority

-

OSAL_THREAD_PRIORITY

-
- -## **Details** - -## **Field ** - -## name - -``` -char* OsalThreadParam::name -``` - - **Description:** - -Thread name - -## priority - -``` -[OSAL_THREAD_PRIORITY](OSAL.md#gab8c099a9c39fdde73c74b3f7367be5d0) OsalThreadParam::priority -``` - - **Description:** - -Thread priority - -## stackSize - -``` -size_t OsalThreadParam::stackSize -``` - - **Description:** - -Stack size of a thread - diff --git a/api/api-SmartVision-Devices/OsalTimer.md b/api/api-SmartVision-Devices/OsalTimer.md deleted file mode 100755 index 26296c6ec9c96dc9252b1bf63f1fa613f8a662fd..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OsalTimer.md +++ /dev/null @@ -1,52 +0,0 @@ -# OsalTimer - -- [Overview](#section818355111165633) -- [Summary](#section741549746165633) -- [Data Fields](#pub-attribs) -- [Details](#section1751359620165633) -- [Field](#section1363292211165633) -- [realTimer](#ab9b7f33eab308cb96cac99c3b11d4928) - -## **Overview** - -**Related Modules:** - -[OSAL](OSAL.md) - -**Description:** - -Describes a timer. - -## **Summary** - -## Data Fields - - - - - - - - - - -

Variable Name

-

Description

-

realTimer

-

void *

-
- -## **Details** - -## **Field ** - -## realTimer - -``` -void* OsalTimer::realTimer -``` - - **Description:** - -Pointer to a timer object - diff --git a/api/api-SmartVision-Devices/OsalTimespec.md b/api/api-SmartVision-Devices/OsalTimespec.md deleted file mode 100755 index c0d1b54ce5f2dc97364060ab458a43797b31278e..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OsalTimespec.md +++ /dev/null @@ -1,68 +0,0 @@ -# OsalTimespec - -- [Overview](#section1083324194165633) -- [Summary](#section753470759165633) -- [Data Fields](#pub-attribs) -- [Details](#section420225540165633) -- [Field](#section1503176048165633) -- [sec](#ac4a32c1da3586df9dc42f1aefac3fe0a) -- [usec](#a767732d9496cf481818f157398c8755c) - -## **Overview** - -**Related Modules:** - -[OSAL](OSAL.md) - -**Description:** - -Defines time. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

sec

-

uint64_t

-

usec

-

uint64_t

-
- -## **Details** - -## **Field ** - -## sec - -``` -uint64_t OsalTimespec::sec -``` - - **Description:** - -Second - -## usec - -``` -uint64_t OsalTimespec::usec -``` - - **Description:** - -Microsecond - diff --git a/api/api-SmartVision-Devices/OutputInfo.md b/api/api-SmartVision-Devices/OutputInfo.md deleted file mode 100755 index a6220d717ff4a13d193de130562399deed4060ff..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/OutputInfo.md +++ /dev/null @@ -1,148 +0,0 @@ -# OutputInfo - -- [Overview](#section357683563165632) -- [Summary](#section1394105377165632) -- [Data Fields](#pub-attribs) -- [Details](#section748509999165632) -- [Field](#section1953417827165632) -- [bufferCnt](#ac131b4abc43415f000a0750e82bb881d) -- [buffers](#a5a8cc2acb5f2918dde6fa60562e54d00) -- [flag](#a56f914be981dd3a2f0ee8c65e501d8f1) -- [sequence](#a6ad161decc8e676690c66d2a6dbde468) -- [timeStamp](#ac160a64994059683a0fc0547ab734a87) -- [type](#ad3d70960789585a3b2014d83dddc448b) -- [vendorPrivate](#a751ecb0c55401f130bf1a5b6492e1f38) - -## **Overview** - -**Related Modules:** - -[Codec](Codec.md) - -**Description:** - -Describes output information. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

bufferCnt

-

uint32_t

-

buffers

-

CodecBufferInfo *

-

timeStamp

-

int64_t

-

sequence

-

uint32_t

-

flag

-

uint32_t

-

type

-

CodecType

-

vendorPrivate

-

void *

-
- -## **Details** - -## **Field ** - -## bufferCnt - -``` -uint32_t OutputInfo::bufferCnt -``` - - **Description:** - -Number of buffers - -## buffers - -``` -[CodecBufferInfo](CodecBufferInfo.md)* OutputInfo::buffers -``` - - **Description:** - -Pointer to the buffer description. For details, see [CodecBufferInfo](CodecBufferInfo.md). - -## flag - -``` -uint32_t OutputInfo::flag -``` - - **Description:** - -Output flag - -## sequence - -``` -uint32_t OutputInfo::sequence -``` - - **Description:** - -Corresponding input sequence number - -## timeStamp - -``` -int64_t OutputInfo::timeStamp -``` - - **Description:** - -Output timestamp - -## type - -``` -[CodecType](Codec.md#ga03b4b6ae5fb82af68d46aaea3d3e4d79) OutputInfo::type -``` - - **Description:** - -Codec type - -## vendorPrivate - -``` -void* OutputInfo::vendorPrivate -``` - - **Description:** - -Private information about a device vendor - diff --git a/api/api-SmartVision-Devices/PMS.md b/api/api-SmartVision-Devices/PMS.md deleted file mode 100755 index b0ab229ddeaac0b094a54533531a70bd8d518d29..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/PMS.md +++ /dev/null @@ -1,296 +0,0 @@ -# PMS - -- [Overview](#section458050375165625) -- [Summary](#section2001005409165625) -- [Files](#files) -- [Functions](#func-members) -- [Details](#section211281568165625) -- [Function](#section1914856096165625) -- [CheckPermission\(\)](#gaaaf2b952db3d8336c9b2309eaf67d1f7) -- [CheckSelfPermission\(\)](#ga099c9ba42ace42091cbd15d9d7f202fb) -- [GrantPermission\(\)](#gad6c5889b56e196477152bbf4ce9f462c) -- [GrantRuntimePermission\(\)](#ga5e1343c802844acc6b2d95181ca36b66) -- [QueryPermission\(\)](#gab279d23a1850f03e73de08b25e734679) -- [RevokePermission\(\)](#ga75cad2f174190a59d40e963481ddcbd7) - -## **Overview** - -**Description:** - -Manages permissions. - -This module provides interfaces for managing permissions of third-party applications. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - -

File Name

-

Description

-

pms_interface.h

-

Declares interfaces for managing permissions.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

CheckPermission (int uid, const char *permissionName)

-

int

-

Checks whether the caller (generally a third-party application) has a specified permission of a system service API.

-

CheckSelfPermission (const char *permissionName)

-

int

-

Checks whether the caller (generally a third-party application) has a specified permission of a system service API.

-

QueryPermission (const char *identifier, PermissionSaved **permissions, int *permNum)

-

int

-

Queries all permissions requested by the application and checks whether these permissions are granted.

-

GrantPermission (const char *identifier, const char *permName)

-

int

-

Grants a specified permission to the application.

-

RevokePermission (const char *identifier, const char *permName)

-

int

-

Revokes a specified permission from the application.

-

GrantRuntimePermission (int uid, const char *permissionName)

-

int

-

Grants a specified runtime permission to an application.

-
- -## **Details** - -## **Function ** - -## CheckPermission\(\) - -``` -int CheckPermission (int uid, const char * permissionName ) -``` - - **Description:** - -Checks whether the caller \(generally a third-party application\) has a specified permission of a system service API. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
uidIndicates the process uid of the caller. The range is [0, INT_MAX].
permissionNameIndicates the pointer to the permission name. For details, see the developer documentation.
- -**Returns:** - -Returns **1** if the caller has the permission; returns **0** otherwise. - -## CheckSelfPermission\(\) - -``` -int CheckSelfPermission (const char * permissionName) -``` - - **Description:** - -Checks whether the caller \(generally a third-party application\) has a specified permission of a system service API. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
permissionNameIndicates the pointer to the permission name. For details, see the developer documentation.
- -**Returns:** - -Returns **1** if the caller has the permission; returns **0** otherwise. - -## GrantPermission\(\) - -``` -int GrantPermission (const char * identifier, const char * permName ) -``` - - **Description:** - -Grants a specified permission to the application. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
identifierIndicates the pointer to the application bundle name.
permNameIndicates the pointer to the permission name. For details, see the developer documentation.
- -**Returns:** - -Returns **0** if the permission is successfully granted; returns an error code defined in [PmsErrorCode](Pms_types.md#gacb79d7f5cd64c73479e0bdd9525265a8) otherwise. - -## GrantRuntimePermission\(\) - -``` -int GrantRuntimePermission (int uid, const char * permissionName ) -``` - - **Description:** - -Grants a specified runtime permission to an application. - -This function applies to sensitive permissions that can be granted to the application only when the application is running. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
uidIndicates the user ID of the application. The range is [0, INT_MAX].
permissionNameIndicates the pointer to the permission name. For details, see the developer documentation.
- -**Returns:** - -Returns **0** if the permission is successfully granted; returns an error code defined in [PmsErrorCode](Pms_types.md#gacb79d7f5cd64c73479e0bdd9525265a8) otherwise. - -## QueryPermission\(\) - -``` -int QueryPermission (const char * identifier, [PermissionSaved](PermissionSaved.md) ** permissions, int * permNum ) -``` - - **Description:** - -Queries all permissions requested by the application and checks whether these permissions are granted. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
identifierIndicates the pointer to the application bundle name.
permissionsIndicates the double pointer to the array of permissions. You need to pass the PermissionSaved pointer and release it after finishing using it.
permNumIndicates the pointer to the number of permissions in the array, which is an integer.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code defined in [PmsErrorCode](Pms_types.md#gacb79d7f5cd64c73479e0bdd9525265a8) otherwise. - -## RevokePermission\(\) - -``` -int RevokePermission (const char * identifier, const char * permName ) -``` - - **Description:** - -Revokes a specified permission from the application. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
identifierIndicates the pointer to the application bundle name.
permNameIndicates the pointer to the permission name. For details, see the developer documentation.
- -**Returns:** - -Returns **0** if the permission is successfully revoked; returns an error code defined in [PmsErrorCode](Pms_types.md#gacb79d7f5cd64c73479e0bdd9525265a8) otherwise. - diff --git a/api/api-SmartVision-Devices/PROCESS.md b/api/api-SmartVision-Devices/PROCESS.md deleted file mode 100755 index ba298552e78d2e07da0e9c26456927c0d6aad453..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/PROCESS.md +++ /dev/null @@ -1,5541 +0,0 @@ -# PROCESS - -- [Overview](#section2028654109165622) -- [Summary](#section1425157668165622) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Macros](#define-members) -- [Typedefs](#typedef-members) -- [Functions](#func-members) -- [Details](#section2053292651165622) -- [Function](#section1655463262165622) -- [capget\(\)](#gaa284eba1654e9fc0672aca2a6d2cd0ce) -- [capset\(\)](#gaaa15be01b20aff9efb09de5a8ead207e) -- [getpriority\(\)](#gac2ee4921a8961060b4c7fcad8bf2b4e2) -- [ohos\_capget\(\)](#gaf254b29504e9733ff55014acdf5fbcc7) -- [ohos\_capset\(\)](#ga77ad7758babf522e7ffb28551332a659) -- [pthread\_atfork\(\)](#ga80008474c3d68e9880da960a53d2f430) -- [pthread\_attr\_destroy\(\)](#ga4bcdbf47c17c7dcc51e9f05f5cb56d81) -- [pthread\_attr\_getdetachstate\(\)](#ga391c34da42e68ddd24f5ee0c070d5c4f) -- [pthread\_attr\_getguardsize\(\)](#gaa8b692ecc3880fdd49a4d423ba1ce91e) -- [pthread\_attr\_getinheritsched\(\)](#ga79a77b688c30213e5e52e6be178cde4e) -- [pthread\_attr\_getschedparam\(\)](#gafd3d272d702481044f8a8cd253fd9b47) -- [pthread\_attr\_getschedpolicy\(\)](#gaec4d8127833d1a573aa82539f898a8ed) -- [pthread\_attr\_getscope\(\)](#gabfd252cd45081231018030e3878efa06) -- [pthread\_attr\_getstack\(\)](#gaec19ad460995a9fe8aeb4eaf2bb1ed1d) -- [pthread\_attr\_getstacksize\(\)](#gae23600d4670359ab12bfba20db2c9a37) -- [pthread\_attr\_init\(\)](#ga0b85ebb1e3aac081a4c0a5e85ae3cbe9) -- [pthread\_attr\_setdetachstate\(\)](#gae6ee78c307d8467b34a9b0c330993a54) -- [pthread\_attr\_setguardsize\(\)](#ga532b31c11a9d87663053c5342400758c) -- [pthread\_attr\_setinheritsched\(\)](#gad437fe8caa3ef9f0cb7d69f6f6479df9) -- [pthread\_attr\_setschedparam\(\)](#ga579e6529f0ce482312a5e77ac61cb4d5) -- [pthread\_attr\_setschedpolicy\(\)](#gab6cb2eb73f04abf328b2f39777c35dca) -- [pthread\_attr\_setscope\(\)](#ga294aaacf59f34effeef978242cf08cbe) -- [pthread\_attr\_setstack\(\)](#ga94ede89b99a3a4fa17e516d30aaf3409) -- [pthread\_attr\_setstacksize\(\)](#ga812a9a455ae2ef2bb0dca4fff201a281) -- [pthread\_barrier\_destroy\(\)](#gab05ae13769e61dea9c53ca7894743c8f) -- [pthread\_barrier\_init\(\)](#ga4a324cd758cae702213ea41882f4cf41) -- [pthread\_barrier\_wait\(\)](#gaf786372165ba080986ae4143928c5436) -- [pthread\_barrierattr\_destroy\(\)](#ga3bd99d89e352ccc51d5b94d157f1218b) -- [pthread\_barrierattr\_init\(\)](#ga2ff720e06488668dc0ae6779755946e6) -- [pthread\_cancel\(\)](#ga9e77a80c073787bf9a593e9c619dce27) -- [pthread\_cleanup\_pop\(\)](#gafbe33fb00cd24693796a0870a3374631) -- [pthread\_cleanup\_push\(\)](#ga68bc26522daf418f3cc78360925374ef) -- [pthread\_cond\_broadcast\(\)](#ga1c1ac7c8faaf8ad63e12bc3717f430f3) -- [pthread\_cond\_destroy\(\)](#ga7f2a7328ee3a7743686adcd2d51771c4) -- [pthread\_cond\_init\(\)](#gabdf02ed57b055f1920991e96e7d67043) -- [pthread\_cond\_signal\(\)](#ga9b0f2c7dead8c628e081d76c86a1addc) -- [pthread\_cond\_timedwait\(\)](#ga506c0350d597721ab24bba7129e8e0df) -- [pthread\_cond\_wait\(\)](#gaea601b8ce596a5c54fb12758c56b10a1) -- [pthread\_condattr\_destroy\(\)](#ga8ab009937339c899a5197eea2e48e6a1) -- [pthread\_condattr\_getclock\(\)](#gadcf908971c2ea15ced780025772084e3) -- [pthread\_condattr\_init\(\)](#ga487a919ab54fd47c8464507031957df0) -- [pthread\_condattr\_setclock\(\)](#gaaf7ac0f85233c0effaf850a9c65b6d68) -- [pthread\_create\(\)](#gae5d18438d4d20c8a2e42cd2500578d79) -- [pthread\_detach\(\)](#ga7c275c509c26566b6dd95a2de1668a2f) -- [pthread\_equal\(\)](#ga98ec817164a6641eda2341de473b659d) -- [pthread\_exit\(\)](#gaadfb4e5de5a20880c6a40d4e73ce2597) -- [pthread\_getaffinity\_np\(\)](#ga051df55ea1131f70f6f9356865a36798) -- [pthread\_getattr\_np\(\)](#ga6bdca4b2c8a436c4651fb5e8d462408b) -- [pthread\_getschedparam\(\)](#gaae9850b3759769c748727e171c4c6e61) -- [pthread\_getspecific\(\)](#ga31469375891078185bda93f0e4411a2c) -- [pthread\_join\(\)](#ga28a15bba47cab57cbc9f5dac9af99c8b) -- [pthread\_key\_create\(\)](#gaf4b7ced8ecff505380fe8216244a3764) -- [pthread\_key\_delete\(\)](#gaee96306dc79294927ee840bb4de2244b) -- [pthread\_kill\(\)](#ga5aafacc071cdfafd0eb992004dee3e62) -- [pthread\_mutex\_destroy\(\)](#gaf89d9cfa300f33b46720a96eac83d175) -- [pthread\_mutex\_init\(\)](#gadd99221596e95a55f70c59c1c712bbde) -- [pthread\_mutex\_lock\(\)](#gafd70d6f2c50e22b996c926fb9d6ad291) -- [pthread\_mutex\_timedlock\(\)](#gabc6a044b418e942b91121b1babb61708) -- [pthread\_mutex\_trylock\(\)](#gacc1ccbaf3d76572da85a8030bba1ede4) -- [pthread\_mutex\_unlock\(\)](#ga02a3c64dac70730e226c31c0e7dbb45c) -- [pthread\_mutexattr\_destroy\(\)](#ga2321aabf58224b06021185708d0f9658) -- [pthread\_mutexattr\_gettype\(\)](#ga4789e2d3ada7aab2af1458bfec53ee3c) -- [pthread\_mutexattr\_init\(\)](#gaf98f6b6c483077a39d1400b1de1577b8) -- [pthread\_mutexattr\_settype\(\)](#ga8387c80e660e9426f801ac0217ecfae5) -- [pthread\_once\(\)](#ga196103ac97710dad7a93fd6c188cc999) -- [pthread\_rwlock\_destroy\(\)](#gaa106bb55bdd0e120519d5412823f8b29) -- [pthread\_rwlock\_init\(\)](#ga1cf4bc49696c1a30db31219aef994401) -- [pthread\_rwlock\_rdlock\(\)](#ga6153aca32112735053e6cc4a2a290feb) -- [pthread\_rwlock\_timedrdlock\(\)](#ga8edbe14731fd79a80f72384334266715) -- [pthread\_rwlock\_timedwrlock\(\)](#ga3fb8fb33e16653c5ad7b7f092959738e) -- [pthread\_rwlock\_tryrdlock\(\)](#ga3ba2170f06184d12543c4a5b78715fa7) -- [pthread\_rwlock\_trywrlock\(\)](#ga2b5044e2da304ae9666fdd4e05479905) -- [pthread\_rwlock\_unlock\(\)](#gaffd8a19e83fc87d865d103d6fbce8c4f) -- [pthread\_rwlock\_wrlock\(\)](#gaf2ca5563676ae3ac35d3bc7b3547e7f7) -- [pthread\_rwlockattr\_destroy\(\)](#ga78a54e67f0afe2601dbda0a904fa0bdf) -- [pthread\_rwlockattr\_init\(\)](#ga9d831af0179ed16d1b6cbeba0304810b) -- [pthread\_self\(\)](#ga4c4f5f3b4f8f45d9d897847d53b11aaa) -- [pthread\_setaffinity\_np\(\)](#ga217f60f9431c453c74b675e72bba307d) -- [pthread\_setcancelstate\(\)](#ga37075410fbbaad7ee93c95375fc86e0e) -- [pthread\_setcanceltype\(\)](#gaab579bcfcf0662a0c1e35fd82162e61d) -- [pthread\_setname\_np\(\)](#ga185584d77295432838d8b839d916f160) -- [pthread\_setschedparam\(\)](#ga14f50e1f5d815c90f1f4225eca5d3a8c) -- [pthread\_setschedprio\(\)](#ga7a23cbcfc21a4e3edf531ed65f022370) -- [pthread\_setspecific\(\)](#ga2187333dd46ce08d9d2e044f79fad705) -- [pthread\_spin\_destroy\(\)](#ga822c2ff425ddad4c25b6a6092c6effff) -- [pthread\_spin\_init\(\)](#ga665a56a7bed60c8eaa6c28af40d13cd4) -- [pthread\_spin\_lock\(\)](#ga62cfd14d1f937a6e8f966e3a331bcf94) -- [pthread\_spin\_trylock\(\)](#ga084834fa2d06f173f086ce23ec1ea5d9) -- [pthread\_spin\_unlock\(\)](#ga3fe246007a85cee9d5f7af9b7d592b54) -- [pthread\_testcancel\(\)](#gaf1c95282ab2bea25f0888a19652cd41f) -- [sched\_get\_priority\_max\(\)](#gafaebd1698caeb9b9b9e614ad84edd609) -- [sched\_get\_priority\_min\(\)](#gaf1f370fc36ea6b22ed42b5ee3cf82a81) -- [sched\_getparam\(\)](#ga563c7ac53bac2c1b51379147e66c44ec) -- [sched\_getscheduler\(\)](#ga99fcb2532b1482d236dc04495a3f194d) -- [sched\_rr\_get\_interval\(\)](#ga484f0eb93529d29a66e24485725c4c7b) -- [sched\_setparam\(\)](#ga06b497c4ea6bbabd2b62ba1a8a848a1b) -- [sched\_setscheduler\(\)](#ga84ad29a6f2ad27370df09c664ac65eac) -- [sched\_yield\(\)](#ga357cd4b34c13011749dfffb42b489f09) -- [setpriority\(\)](#ga0a8d4c8043a7748c25dd551dc69dcad2) -- [wait\(\)](#gabf2fbcf6df59fd5234e9eed4db1a1804) -- [waitpid\(\)](#ga77de8005691d1f125540d66032a3cc62) -- [Variable](#section1588843235165622) -- [effective](#ga355bca6f4ddbe05cb7225ce1d7272ddd) -- [inheritable](#ga22c2f1389233789296db2b270b98b79a) -- [permitted](#ga39e42efd1f293a6c8cd0227cff1e7bb8) -- [pid](#ga7d063c33a2986f7351ce84e033e63765) -- [version](#ga75de99b99ceca627d834db0db344b609) - -## **Overview** - -**Description:** - -Provides process- and thread-related structures and functions. - -You can perform process- and thread-related operations, including creating and terminating a process, obtaining a process ID, creating or destroying a thread, and obtaining or modifying thread attributes, priorities, and scheduling policies. - -**Since:** - -1.0 - -**Version:** - -1.0 - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - - - - - - - - - - - - - -

File Name

-

Description

-

pthread.h

-

Provides process- and thread-related structures (providing fields such as thread attributes) and functions (including the functions for creating and destroying threads, and setting the thread detach state and blocking conditions).

-

sched.h

-

Provides process- and thread-related structures and functions (for example, obtaining scheduling policies and parameters).

-

capability.h

-

Declares functions and related data structures for obtaining and setting process capabilities.

-

resource.h

-

Declares process-related structures and functions.

-

wait.h

-

Provides process- and thread-related structures and functions (for example, waiting for child processes to end and reclaiming resources).

-
- -## Data Structures - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

sched_param

-

Defines process scheduling parameters.

-

__user_cap_header_struct

-

Defines the user capability header.

-

__user_cap_data_struct

-

Defines user capability data.

-
- -## Macros - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

CAP_CHOWN 0

-

Indicates the capability of changing the file ownership.

-

CAP_DAC_OVERRIDE 1

-

Indicates the capability of ignoring discretionary access control (DAC) restrictions on files.

-

CAP_DAC_READ_SEARCH 2

-

Indicates the capability of ignoring DAC restrictions on file read and search.

-

CAP_FOWNER 3

-

Indicates the capability of ignoring the restrictions on the matching between the user ID of the file owner and process ID.

-

CAP_KILL 5

-

Indicates the capability of ignoring the restrictions on sending signals to processes that do not belong to themselves.

-

CAP_SETGID 6

-

Indicates the capability of changing the group ID of a process.

-

CAP_SETUID 7

-

Indicates the capability of changing the user ID of a process.

-

CAP_SETPCAP 8

-

Indicates the capability of transferring capabilities to other processes and deleting capabilities.

-

CAP_NET_BIND_SERVICE 10

-

Indicates the capability of binding a port.

-

CAP_NET_BROADCAST 11

-

Indicates the capability of network broadcasting or multicasting.

-

CAP_NET_ADMIN 12

-

Indicates the capability of executing network management tasks.

-

CAP_NET_RAW 13

-

Indicates the capability of using raw sockets.

-

CAP_SYS_PTRACE 19

-

Indicates the capability of tracing any process.

-

CAP_SYS_ADMIN 21

-

Indicates the capability of executing system management tasks.

-

CAP_SYS_BOOT 22

-

Indicates the capability of rebooting system.

-

CAP_SYS_NICE 23

-

Indicates the capability of setting the priority.

-

CAP_SYS_TIME 25

-

Indicates the capability of changing the system clock.

-

OHOS_CAP_CHOWN 0

-

Indicates the capability of changing the file ownership. This macro is used by ohos_capset.

-

OHOS_CAP_DAC_EXECUTE 1

-

Indicates the capability of ignoring DAC restrictions on file execution. This macro is used by ohos_capset.

-

OHOS_CAP_DAC_WRITE 2

-

Indicates the capability of ignoring DAC restrictions on file write. This macro is used by ohos_capset.

-

OHOS_CAP_DAC_READ_SEARCH 3

-

Indicates the capability of ignoring DAC restrictions on file read and search. This macro is used by ohos_capset.

-

OHOS_CAP_FOWNER 4

-

Indicates the capability of ignoring the restrictions on the matching between the user ID of the file owner and process ID. This macro is used by ohos_capset.

-

OHOS_CAP_KILL 5

-

Indicates the capability of ignoring the restrictions on sending signals to processes that do not belong to themselves. This macro is used by ohos_capset.

-

OHOS_CAP_SETGID 6

-

Indicates the capability of changing the group ID of a process. This macro is used by ohos_capset.

-

OHOS_CAP_SETUID 7

-

Indicates the capability of changing the user ID of a process. This macro is used by ohos_capset.

-

OHOS_CAP_NET_BIND_SERVICE 8

-

Indicates the capability of binding a port. This macro is used by ohos_capset.

-

OHOS_CAP_NET_BROADCAST 9

-

Indicates the capability of network broadcasting or multicasting. This macro is used by ohos_capset.

-

OHOS_CAP_NET_ADMIN 10

-

Indicates the capability of executing network management tasks. This macro is used by ohos_capset.

-

OHOS_CAP_NET_RAW 11

-

Indicates the capability of using raw sockets. This macro is used by ohos_capset.

-

OHOS_CAP_FS_MOUNT 12

-

Indicates the capability of mounting the file system. This macro is used by ohos_capset.

-

OHOS_CAP_FS_FORMAT 13

-

Indicates the capability of formatting the file system. This macro is used by ohos_capset.

-

OHOS_CAP_SCHED_SETPRIORITY 14

-

Indicates the capability of setting the scheduling priority. This macro is used by ohos_capset.

-

OHOS_CAP_SET_TIMEOFDAY 15

-

Indicates the capability of setting the date. This macro is used by ohos_capset.

-

OHOS_CAP_CLOCK_SETTIME 16

-

Indicates the capability of setting the clock. This macro is used by ohos_capset.

-

OHOS_CAP_CAPSET 17

-

Indicates the capability of setting the capabilities. This macro is used by ohos_capset.

-

OHOS_CAP_REBOOT 18

-

Indicates the capability of rebooting system. This macro is used by ohos_capset.

-

OHOS_CAP_SHELL_EXEC 19

-

Indicates the capability of calling shell. This macro is used by ohos_capset.

-

PRIO_PROCESS 0

-

Defines a process ID.

-

PRIO_PGRP 1

-

Defines a process group ID.

-

PRIO_USER 2

-

Defines a valid user ID.

-
- -## Typedefs - - - - - - - - - - - - - -

Typedef Name

-

Description

-

cap_user_header_t

-

typedef struct __user_cap_header_struct *

-

Defines the user capability header.

-

cap_user_data_t

-

typedef struct __user_cap_data_struct *

-

Defines user capability data.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

pthread_create (pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)(void *), void *arg)

-

int

-

Creates a thread.

-

pthread_detach (pthread_t thread)

-

int

-

Detaches a thread.

-

pthread_exit (void *retval)

-

_Noreturn void

-

Terminates the calling thread.

-

pthread_join (pthread_t thread, void **retval)

-

int

-

Waits for a thread to terminate.

-

pthread_self (void)

-

pthread_t

-

Obtains the ID of the calling thread.

-

pthread_equal (pthread_t t1, pthread_t t2)

-

int

-

Compares whether two thread IDs are equal.

-

pthread_setcancelstate (int state, int *oldstate)

-

int

-

Sets the cancelability state for the calling thread.

-

pthread_setcanceltype (int type, int *oldtype)

-

int

-

Sets the cancelability type for the calling thread.

-

pthread_testcancel (void)

-

void

-

Requests delivery of any pending cancellation request.

-

pthread_cancel (pthread_t thread)

-

int

-

Sends a cancellation request to a thread.

-

pthread_kill (pthread_t thread, int sig)

-

int

-

Sends a signal to a thread.

-

pthread_getschedparam (pthread_t thread, int *policy, struct sched_param *param)

-

int

-

Obtains the scheduling policy and parameters of a thread.

-

pthread_setschedparam (pthread_t thread, int policy, const struct sched_param *param)

-

int

-

Sets a scheduling policy and parameters for a thread.

-

pthread_setschedprio (pthread_t thread, int prio)

-

int

-

Sets a static scheduling priority for a thread.

-

pthread_once (pthread_once_t *once_control, void(*init_routine)(void))

-

int

-

Enables the initialization function to be called only once.

-

pthread_mutex_init (pthread_mutex_t *__restrict m, const pthread_mutexattr_t *__restrict a)

-

int

-

Initializes a mutex.

-

pthread_mutex_lock (pthread_mutex_t *m)

-

int

-

Locks a mutex.

-

pthread_mutex_unlock (pthread_mutex_t *m)

-

int

-

Unlocks a mutex.

-

pthread_mutex_trylock (pthread_mutex_t *m)

-

int

-

Attempts to lock a mutex.

-

pthread_mutex_timedlock (pthread_mutex_t *__restrict m, const struct timespec *__restrict at)

-

int

-

Blocks the calling thread to lock a mutex.

-

pthread_mutex_destroy (pthread_mutex_t *m)

-

int

-

Destroys a mutex.

-

pthread_cond_init (pthread_cond_t *__restrict c, const pthread_condattr_t *__restrict a)

-

int

-

Initializes a condition variable.

-

pthread_cond_destroy (pthread_cond_t *c)

-

int

-

Destroys a condition variable.

-

pthread_cond_wait (pthread_cond_t *__restrict c, pthread_mutex_t *__restrict m)

-

int

-

Blocks the calling thread to wait for the condition set by pthread_con_signal().

-

pthread_cond_timedwait (pthread_cond_t *__restrict c, pthread_mutex_t *__restrict m, const struct timespec *__restrict ts)

-

int

-

Blocks the calling thread to wait for the condition set by pthread_con_signal() for a period of time specified by ts.

-

pthread_cond_broadcast (pthread_cond_t *c)

-

int

-

Unblocks all threads that are currently blocked on the condition variable cond.

-

pthread_cond_signal (pthread_cond_t *c)

-

int

-

Unblocks a thread.

-

pthread_rwlock_init (pthread_rwlock_t *__restrict rw, const pthread_rwlockattr_t *__restrict a)

-

int

-

Initializes a read-write lock.

-

pthread_rwlock_destroy (pthread_rwlock_t *rw)

-

int

-

Destroys a read-write lock.

-

pthread_rwlock_rdlock (pthread_rwlock_t *rw)

-

int

-

Applies a read lock to a read-write lock.

-

pthread_rwlock_tryrdlock (pthread_rwlock_t *rw)

-

int

-

Attempts to apply a read lock to a read-write lock.

-

pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict rw, const struct timespec *__restrict at)

-

int

-

Blocks the calling thread to lock a read-write lock for reading.

-

pthread_rwlock_wrlock (pthread_rwlock_t *rw)

-

int

-

Applies a write lock to a read-write lock.

-

pthread_rwlock_trywrlock (pthread_rwlock_t *rw)

-

int

-

Attempts to apply a write lock to a read-write lock.

-

pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict rw, const struct timespec *__restrict at)

-

int

-

Blocks the calling thread to lock a read-write lock for writing.

-

pthread_rwlock_unlock (pthread_rwlock_t *rw)

-

int

-

Unlocks a read-write lock.

-

pthread_spin_init (pthread_spinlock_t *s, int shared)

-

int

-

Initializes a spin lock.

-

pthread_spin_destroy (pthread_spinlock_t *s)

-

int

-

Destroys a spin lock.

-

pthread_spin_lock (pthread_spinlock_t *s)

-

int

-

Locks a spin lock.

-

pthread_spin_trylock (pthread_spinlock_t *s)

-

int

-

Attempts to lock a spin lock.

-

pthread_spin_unlock (pthread_spinlock_t *s)

-

int

-

Unlocks a spin lock.

-

pthread_barrier_init (pthread_barrier_t *__restrict b, const pthread_barrierattr_t *__restrict a, unsigned count)

-

int

-

Initializes a barrier.

-

pthread_barrier_destroy (pthread_barrier_t *b)

-

int

-

Destroys a barrier.

-

pthread_barrier_wait (pthread_barrier_t *b)

-

int

-

Synchronizes participating threads at a barrier.

-

pthread_key_create (pthread_key_t *key, void(*destructor)(void *))

-

int

-

Creates a key for thread data.

-

pthread_key_delete (pthread_key_t key)

-

int

-

Deletes a key for thread data.

-

pthread_getspecific (pthread_key_t key)

-

void *

-

Obtains specific thread data.

-

pthread_setspecific (pthread_key_t key, const void *value)

-

int

-

Sets specific thread data.

-

pthread_attr_init (pthread_attr_t *attr)

-

int

-

Initializes a thread attribute object.

-

pthread_attr_destroy (pthread_attr_t *attr)

-

int

-

Destroys a thread attribute object.

-

pthread_attr_getguardsize (const pthread_attr_t *attr, size_t *guardsize)

-

int

-

Obtains the guard size of a thread attribute object.

-

pthread_attr_setguardsize (pthread_attr_t *attr, size_t guardsize)

-

int

-

Sets the guard size for a thread attribute object.

-

pthread_attr_getstacksize (const pthread_attr_t *attr, size_t *stacksize)

-

int

-

Obtains the stack size of a thread attribute object.

-

pthread_attr_setstacksize (pthread_attr_t *attr, size_t stacksize)

-

int

-

Sets the stack size for a thread attribute object.

-

pthread_attr_getdetachstate (const pthread_attr_t *attr, int *detachstate)

-

int

-

Obtains the detach state of a thread attribute object.

-

pthread_attr_setdetachstate (pthread_attr_t *attr, int detachstate)

-

int

-

Sets the detach state for a thread attribute object.

-

pthread_attr_getstack (const pthread_attr_t *attr, void **stackaddr, size_t *stacksize)

-

int

-

Obtains stack attributes of a thread attribute object.

-

pthread_attr_setstack (pthread_attr_t *attr, void *stackaddr, size_t stacksize)

-

int

-

Sets stack attributes for a thread attribute object.

-

pthread_attr_getscope (const pthread_attr_t *attr, int *scope)

-

int

-

Obtains contention scope attributes of a thread attribute object.

-

pthread_attr_setscope (pthread_attr_t *attr, int scope)

-

int

-

Sets contention scope attributes for a thread attribute object.

-

pthread_attr_getschedpolicy (const pthread_attr_t *attr, int *schedpolicy)

-

int

-

Obtains scheduling policy attributes of a thread attribute object.

-

pthread_attr_setschedpolicy (pthread_attr_t *attr, int schedpolicy)

-

int

-

Sets scheduling policy attributes for a thread attribute object.

-

pthread_attr_getschedparam (const pthread_attr_t *attr, struct sched_param *param)

-

int

-

Obtains scheduling parameter attributes of a thread attribute object.

-

pthread_attr_setschedparam (pthread_attr_t *attr, const struct sched_param *param)

-

int

-

Sets scheduling parameter attributes for a thread attribute object.

-

pthread_attr_getinheritsched (const pthread_attr_t *attr, int *inheritsched)

-

int

-

Obtains inherit scheduler attributes of a thread attribute object.

-

pthread_attr_setinheritsched (pthread_attr_t *attr, int inheritsched)

-

int

-

Sets inherit scheduler attributes for a thread attribute object.

-

pthread_mutexattr_destroy (pthread_mutexattr_t *attr)

-

int

-

Destroys a mutex attribute object.

-

pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict attr, int *__restrict type)

-

int

-

Obtains the mutex type attribute.

-

pthread_mutexattr_init (pthread_mutexattr_t *attr)

-

int

-

Initializes a mutex attribute object.

-

pthread_mutexattr_settype (pthread_mutexattr_t *attr, int type)

-

int

-

Sets the mutex type attribute.

-

pthread_condattr_init (pthread_condattr_t *a)

-

int

-

Initializes a condition variable attribute object.

-

pthread_condattr_destroy (pthread_condattr_t *a)

-

int

-

Destroys a condition variable attribute object.

-

pthread_condattr_setclock (pthread_condattr_t *a, clockid_t clk)

-

int

-

Sets a clock for a condition variable attribute object.

-

pthread_condattr_getclock (const pthread_condattr_t *__restrict a, clockid_t *__restrict clk)

-

int

-

Obtains the clock of a condition variable attribute object.

-

pthread_rwlockattr_init (pthread_rwlockattr_t *attr)

-

int

-

Initializes a read-write lock attribute object.

-

pthread_rwlockattr_destroy (pthread_rwlockattr_t *attr)

-

int

-

Destroys a read-write lock attribute object.

-

pthread_barrierattr_destroy (pthread_barrierattr_t *a)

-

int

-

Destroys a barrier attribute object.

-

pthread_barrierattr_init (pthread_barrierattr_t *a)

-

int

-

Initializes a barrier attribute object.

-

pthread_atfork (void(*prepare)(void), void(*parent)(void), void(*child)(void))

-

int

-

Registers a fork handler to be called before and after fork().

-

pthread_cleanup_push (void(*routine)(void *), void *arg)

-

void

-

Pushes the routine to the top of the clean-up handler stack.

-

pthread_cleanup_pop (int execute)

-

void

-

Removes the routine at the top of the clean-up handler stack.

-

pthread_getattr_np (pthread_t thread, pthread_attr_t *attr)

-

int

-

Obtains the attributes of a created thread.

-

pthread_setname_np (pthread_t pthread, const char *name)

-

int

-

Sets the thread name.

-

pthread_getaffinity_np (pthread_t td, size_t size, cpu_set_t *set)

-

int

-

Gets the thread affinity.

-

pthread_setaffinity_np (pthread_t td, size_t size, const cpu_set_t *set)

-

int

-

Sets the thread affinity.

-

sched_get_priority_max (int policy)

-

int

-

Obtains the maximum static priority that can be used for a process.

-

sched_get_priority_min (int policy)

-

int

-

Obtains the minimum static priority that can be used for a process.

-

sched_getparam (pid_t pid, struct sched_param *param)

-

int

-

Obtains scheduling parameters of a process.

-

sched_getscheduler (pid_t pid)

-

int

-

Obtains the scheduling policy of a process.

-

sched_rr_get_interval (pid_t pid, struct timespec *interval)

-

int

-

Obtains the execution time limit of a process.

-

sched_setparam (pid_t pid, const struct sched_param *param)

-

int

-

Sets scheduling parameters related to a scheduling policy for a process.

-

sched_setscheduler (pid_t pid, int policy, const struct sched_param *param)

-

int

-

Sets a scheduling policy for a process.

-

sched_yield (void)

-

int

-

Yields the running process.

-

capget (cap_user_header_t hdr_ptr, cap_user_data_t data_ptr)

-

int

-

Obtains the capability information of a specified process based on the input parameters (compatible with the Linux API format).

-

capset (cap_user_header_t hdr_ptr, const cap_user_data_t data_ptr)

-

int

-

Sets the capability information for a specified process based on the input parameters (compatible with the Linux API format).

-

ohos_capget (pid_t pid, unsigned int *caps)

-

int

-

Obtains the capability information of the specified process process based on the input parameters.

-

ohos_capset (unsigned int caps)

-

int

-

Sets the capability information of the current process based on the input parameters.

-

getpriority (int which, id_t who)

-

int

-

Obtains the static priority of a specified ID.

-

setpriority (int which, id_t who, int value)

-

int

-

Sets the static priority of a specified ID.

-

wait (int *status)

-

pid_t

-

Waits for any child process to end and reclaims its resources.

-

waitpid (pid_t pid, int *status, int options)

-

pid_t

-

Waits for a specified child process to end and reclaims its resources.

-
- -## **Details** - -## **Function ** - -## capget\(\) - -``` -int capget ([cap_user_header_t](PROCESS.md#gaf042e68224162d4eb2ce7668904831d9) hdr_ptr, [cap_user_data_t](PROCESS.md#gaafd3aaf8bb3f786614fee86c2fa93667) data_ptr ) -``` - - **Description:** - -Obtains the capability information of a specified process based on the input parameters \(compatible with the Linux API format\). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
hdr_ptrIndicates the data structure required for this function call, including the API version and the target PID.
data_ptrIndicates the buffer space for storing the process capabilities.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Incorrect parameter.

-

EPERM

-

No permission.

-

EFAULT

-

Invalid memory address.

-
- -## capset\(\) - -``` -int capset ([cap_user_header_t](PROCESS.md#gaf042e68224162d4eb2ce7668904831d9) hdr_ptr, const [cap_user_data_t](PROCESS.md#gaafd3aaf8bb3f786614fee86c2fa93667) data_ptr ) -``` - - **Description:** - -Sets the capability information for a specified process based on the input parameters \(compatible with the Linux API format\). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
hdr_ptrIndicates the data structure required for this function call, including the API version and the target PID. The PID can only be set to 0, representing the current process.
data_ptrIndicates the buffer space for storing the customized process capabilities. Currently, the following capabilities are supported (other values do not take effect):
  • CAP_CHOWN: changes the file ownership.
  • CAP_DAC_OVERRIDE: ignores DAC restrictions.
  • CAP_DAC_READ_SEARCH: ignores DAC restrictions on file read and search.
  • CAP_FOWNER: allows other users (not the file owner) to modify file permission configurations.
  • CAP_KILL: allows the current process to send signals to other processes with different UIDs.
  • CAP_SETGID: allows changing the group ID of a process.
  • CAP_SETUID: allows changing the user ID of a process.
  • CAP_SETPCAP: allows changing the capabilities.
  • CAP_NET_BIND_SERVICE: allows the process to be bound to a port whose number is smaller than 1024.
  • CAP_NET_BROADCAST: allows network broadcast or multicast.
  • CAP_NET_ADMIN: allows network-related management functions.
  • CAP_NET_RAW: allows raw sockets to be used.
  • CAP_SYS_PTRACE: allows system commissioning.
  • CAP_SYS_ADMIN: allows system management operations.
  • CAP_SYS_BOOT: allows rebooting system.
  • CAP_SYS_NICE: allows priority increase and priority setting for other processes.
  • CAP_SYS_TIME: allows changing the system clock.
- The cap_user_data_t structure contains three members: effective, permitted, and inheritable. Currently, only effective is valid.
- -**Attention:** - -The difference between this function and the same function defined in Linux is that you can only use this function to disable capabilities for a process. - -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the creation fails. - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Incorrect parameter.

-

EPERM

-

No permission.

-
- -## getpriority\(\) - -``` -int getpriority (int which, [id_t](UTILS.md#gab66157aef1dc726dccc825f07239da53) who ) -``` - - **Description:** - -Obtains the static priority of a specified ID. - -The ID type is determined by **which**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
whichIndicates a specified value, which can be:
  • PRIO_PROCESS: represents a process ID specified by who.
  • PRIO_PGRP: represents a process group ID specified by who. This value is not supported yet.
  • PRIO_USER: represents a valid user ID specified by who. This value is not supported yet.
-
whoIndicates the specified ID.
- -**Returns:** - -Returns the scheduling priority if the operation is successful; returns **-1** and sets **errno** to a value in the following table otherwise. - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid parameter.

-

EOPNOTSUPP

-

Unsupported value.

-
- -## ohos\_capget\(\) - -``` -int ohos_capget ([pid_t](UTILS.md#ga30c34d3eead853c44f459f21b932984c) pid, unsigned int * caps ) -``` - - **Description:** - -Obtains the capability information of the specified process process based on the input parameters. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
pidIndicates the specified process.
capsIndicates the pointer to the memory address for storing the obtained capability information of a specified process.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EFAULT

-

Invalid memory address.

-
- -## ohos\_capset\(\) - -``` -int ohos_capset (unsigned int caps) -``` - - **Description:** - -Sets the capability information of the current process based on the input parameters. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
capsIndicates the customized capability information of the process. Currently, the following capabilities are supported (other values do not take effect):
  • OHOS_CAP_CHOWN: changes the file ownership.
  • OHOS_CAP_DAC_EXECUTE: ignores discretionary access control (DAC) restrictions on file execution.
  • OHOS_CAP_DAC_WRITE: ignores DAC restrictions on file write.
  • OHOS_CAP_DAC_READ_SEARCH: ignores DAC restrictions on file read and search.
  • OHOS_CAP_FOWNER: allows other users (not the file owner) to modify file permission configurations.
  • OHOS_CAP_KILL: allows the current process to send signals to other processes with different UIDs.
  • OHOS_CAP_SETGID: allows changing the group ID of the process.
  • OHOS_CAP_SETUID: allows changing the user ID of the process.
  • OHOS_CAP_NET_BIND_SERVICE: allows the process to be bound to a port whose number is smaller than 1024.
  • OHOS_CAP_NET_BROADCAST: allows network broadcast and multicast.
  • OHOS_CAP_NET_ADMIN: allows network-related management functions.
  • OHOS_CAP_NET_RAW: allows raw sockets to be used.
  • OHOS_CAP_FS_MOUNT: allows mounting operations.
  • OHOS_CAP_FS_FORMAT: allows storage formatting operations.
  • OHOS_CAP_SCHED_SETPRIORITY: allows priority increase and priority setting for other processes.
  • OHOS_CAP_SET_TIMEOFDAY: allows calling of the timeofday API.
  • OHOS_CAP_CLOCK_SETTIME: allows calling of the clock_settime API.
  • OHOS_CAP_CAPSET: allows changing the capabilities.
  • OHOS_CAP_REBOOT: allows rebooting system.
  • OHOS_CAP_SHELL_EXEC: allows calling of the shellexec API.
-
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the creation fails. - - - - - - - - - - -

errno

-

Description

-

EPERM

-

No permission.

-
- -## pthread\_atfork\(\) - -``` -int pthread_atfork (void(*)(void) prepare, void(*)(void) parent, void(*)(void) child ) -``` - - **Description:** - -Registers a fork handler to be called before and after [fork\(\)](UTILS.md#gaa4e4714e6e8927c80b2553a40094b6d9). - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
prepareIndicates the pointer to the fork handler to be called before fork().
parentIndicates the pointer to the fork handler to be called after fork() in the parent process.
childIndicates the pointer to the fork handler to be called after fork() in the child process.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - -## pthread\_attr\_destroy\(\) - -``` -int pthread_attr_destroy ([pthread_attr_t](UTILS.md#gac8ee4471bbc35deb7589ac3615deb486) * attr) -``` - - **Description:** - -Destroys a thread attribute object. - -This function always succeeds. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
attrIndicates the pointer to the thread attribute object to destroy.
- -**Returns:** - -Returns **0**. - -## pthread\_attr\_getdetachstate\(\) - -``` -int pthread_attr_getdetachstate (const [pthread_attr_t](UTILS.md#gac8ee4471bbc35deb7589ac3615deb486) * attr, int * detachstate ) -``` - - **Description:** - -Obtains the detach state of a thread attribute object. - -This function always succeeds. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
attrIndicates the pointer to the target thread attribute object.
detachstateIndicates the pointer to the obtained detach state.
- -**Returns:** - -Returns **0**. - -## pthread\_attr\_getguardsize\(\) - -``` -int pthread_attr_getguardsize (const [pthread_attr_t](UTILS.md#gac8ee4471bbc35deb7589ac3615deb486) * attr, size_t * guardsize ) -``` - - **Description:** - -Obtains the guard size of a thread attribute object. - -This function always succeeds. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
attrIndicates the pointer to the target thread attribute object.
guardsizeIndicates the pointer to the obtained guard size.
- -**Returns:** - -Returns **0**. - -## pthread\_attr\_getinheritsched\(\) - -``` -int pthread_attr_getinheritsched (const [pthread_attr_t](UTILS.md#gac8ee4471bbc35deb7589ac3615deb486) * attr, int * inheritsched ) -``` - - **Description:** - -Obtains inherit scheduler attributes of a thread attribute object. - -This function always succeeds. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
attrIndicates the pointer to the target thread attribute object.
inheritschedIndicates the pointer to the obtained inherit scheduler attributes.
- -**Returns:** - -Returns **0**. - -## pthread\_attr\_getschedparam\(\) - -``` -int pthread_attr_getschedparam (const [pthread_attr_t](UTILS.md#gac8ee4471bbc35deb7589ac3615deb486) * attr, struct [sched_param](sched_param.md) * param ) -``` - - **Description:** - -Obtains scheduling parameter attributes of a thread attribute object. - -This function always succeeds. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
attrIndicates the pointer to the target thread attribute object.
paramIndicates the pointer to the obtained scheduling parameter attributes. Only the thread priority is supported. The priority ranges from 0 (highest priority) to 31 (lowest priority).
- -**Returns:** - -Returns **0**. - -## pthread\_attr\_getschedpolicy\(\) - -``` -int pthread_attr_getschedpolicy (const [pthread_attr_t](UTILS.md#gac8ee4471bbc35deb7589ac3615deb486) * attr, int * schedpolicy ) -``` - - **Description:** - -Obtains scheduling policy attributes of a thread attribute object. - -This function always succeeds. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
attrIndicates the pointer to the target thread attribute object.
schedpolicyIndicates the pointer to the obtained scheduling policy attributes. Only SCHED_FIFO and SCHED_RR are supported.
- -**Returns:** - -Returns **0**. - -## pthread\_attr\_getscope\(\) - -``` -int pthread_attr_getscope (const [pthread_attr_t](UTILS.md#gac8ee4471bbc35deb7589ac3615deb486) * attr, int * scope ) -``` - - **Description:** - -Obtains contention scope attributes of a thread attribute object. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
attrIndicates the pointer to the target thread attribute object.
scopeIndicates the pointer to the start address of the buffer that stores the target thread attribute object.
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid scope value.

-
- -## pthread\_attr\_getstack\(\) - -``` -int pthread_attr_getstack (const [pthread_attr_t](UTILS.md#gac8ee4471bbc35deb7589ac3615deb486) * attr, void ** stackaddr, size_t * stacksize ) -``` - - **Description:** - -Obtains stack attributes of a thread attribute object. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
attrIndicates the pointer to the target thread attribute object.
stackaddrIndicates the double pointer to the start address of the buffer that stores the obtained stack attributes.
stacksizeIndicates the pointer to the size of the buffer that stores the obtained stack attributes.
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid start address.

-
- -## pthread\_attr\_getstacksize\(\) - -``` -int pthread_attr_getstacksize (const [pthread_attr_t](UTILS.md#gac8ee4471bbc35deb7589ac3615deb486) * attr, size_t * stacksize ) -``` - - **Description:** - -Obtains the stack size of a thread attribute object. - -Obtains the stack size of the thread attribute object. The stack size of a thread has been specified when creating the thread. Only the main thread can have its stack size dynamically increased. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
attrIndicates the pointer to the target thread attribute object.
stacksizeIndicates the pointer to the obtained stack size.
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

The stack size has not been specified.

-
- -## pthread\_attr\_init\(\) - -``` -int pthread_attr_init ([pthread_attr_t](UTILS.md#gac8ee4471bbc35deb7589ac3615deb486) * attr) -``` - - **Description:** - -Initializes a thread attribute object. - -This function always succeeds. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
attrIndicates the pointer to the thread attribute object that is successfully initialized.
- -**Returns:** - -Returns **0**. - -## pthread\_attr\_setdetachstate\(\) - -``` -int pthread_attr_setdetachstate ([pthread_attr_t](UTILS.md#gac8ee4471bbc35deb7589ac3615deb486) * attr, int detachstate ) -``` - - **Description:** - -Sets the detach state for a thread attribute object. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
attrIndicates the pointer to the target thread attribute object.
detachstateIndicates the detach state to set. Available values are as follows:
- - - - - - - - - - - - - -

detachstate

-

Description

-

PTHREAD_CREATE_DETACHED

-

Threads using attr are created in the detached state.

-

PTHREAD_CREATE_JOINABLE

-

Threads using attr are created in the joinable state.

-
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid detach state.

-
- -## pthread\_attr\_setguardsize\(\) - -``` -int pthread_attr_setguardsize ([pthread_attr_t](UTILS.md#gac8ee4471bbc35deb7589ac3615deb486) * attr, size_t guardsize ) -``` - - **Description:** - -Sets the guard size for a thread attribute object. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
attrIndicates the pointer to the target thread attribute object.
guardsizeIndicates the guard size to set.
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid guard size.

-
- -## pthread\_attr\_setinheritsched\(\) - -``` -int pthread_attr_setinheritsched ([pthread_attr_t](UTILS.md#gac8ee4471bbc35deb7589ac3615deb486) * attr, int inheritsched ) -``` - - **Description:** - -Sets inherit scheduler attributes for a thread attribute object. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
attrIndicates the pointer to the target thread attribute object.
inheritschedIndicates the inherit scheduler attributes to set.
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid inherit scheduler attribute.

-
- -## pthread\_attr\_setschedparam\(\) - -``` -int pthread_attr_setschedparam ([pthread_attr_t](UTILS.md#gac8ee4471bbc35deb7589ac3615deb486) * attr, const struct [sched_param](sched_param.md) * param ) -``` - - **Description:** - -Sets scheduling parameter attributes for a thread attribute object. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
attrIndicates the pointer to the target thread attribute object.
paramIndicates the pointer to the scheduling parameter attributes to set. Only the thread priority is supported. The priority ranges from 0 (highest priority) to 31 (lowest priority).
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid scheduling parameter attributes.

-
- -## pthread\_attr\_setschedpolicy\(\) - -``` -int pthread_attr_setschedpolicy ([pthread_attr_t](UTILS.md#gac8ee4471bbc35deb7589ac3615deb486) * attr, int schedpolicy ) -``` - - **Description:** - -Sets scheduling policy attributes for a thread attribute object. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
attrIndicates the pointer to the target thread attribute object.
schedpolicyIndicates the scheduling policy attributes to set. Only SCHED_FIFO and SCHED_RR are supported.
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid scheduling policy attribute.

-
- -## pthread\_attr\_setscope\(\) - -``` -int pthread_attr_setscope ([pthread_attr_t](UTILS.md#gac8ee4471bbc35deb7589ac3615deb486) * attr, int scope ) -``` - - **Description:** - -Sets contention scope attributes for a thread attribute object. - -The contention scope attribute defines a set of threads against which a thread competes for resources such as the CPU. POSIX.1-2001 specifies two values for **scope**: - -POSIX.1-2001 does not specify how these threads contend with other threads in other process on the system or with other threads in the same process that were created with the **PTHREAD\_SCOPE\_SYSTEM** contention scope. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
attrIndicates the pointer to the target thread attribute object.
scopeIndicates the start address of the buffer that stores the target thread attribute object. By default, only PTHREAD_SCOPE_PROCESS is supported.
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid scope value.

-
- -## pthread\_attr\_setstack\(\) - -``` -int pthread_attr_setstack ([pthread_attr_t](UTILS.md#gac8ee4471bbc35deb7589ac3615deb486) * attr, void * stackaddr, size_t stacksize ) -``` - - **Description:** - -Sets stack attributes for a thread attribute object. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
attrIndicates the pointer to the thread attribute object.
stackaddrIndicates the pointer to the start address of the buffer that stores the stack attributes to set.
stacksizeIndicates the size of the buffer that stores the stack attributes to set.
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid start address.

-
- -## pthread\_attr\_setstacksize\(\) - -``` -int pthread_attr_setstacksize ([pthread_attr_t](UTILS.md#gac8ee4471bbc35deb7589ac3615deb486) * attr, size_t stacksize ) -``` - - **Description:** - -Sets the stack size for a thread attribute object. - -This function always succeeds. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
attrIndicates the pointer to the target thread attribute object.
stacksizeIndicates the stack size.
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid stack size.

-
- -## pthread\_barrier\_destroy\(\) - -``` -int pthread_barrier_destroy ([pthread_barrier_t](UTILS.md#ga2f6d30b3b873012dbd361d3f7d52db59) * b) -``` - - **Description:** - -Destroys a barrier. - -This function always succeeds. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
bIndicates the pointer to the barrier to destroy.
- -**Returns:** - -Returns **0**. - -## pthread\_barrier\_init\(\) - -``` -int pthread_barrier_init ([pthread_barrier_t](UTILS.md#ga2f6d30b3b873012dbd361d3f7d52db59) *__restrict b, const [pthread_barrierattr_t](UTILS.md#ga506b5743098d9d38526b2fd1e21f9457) *__restrict a, unsigned count ) -``` - - **Description:** - -Initializes a barrier. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
bIndicates the pointer to the barrier to initialize.
aIndicates the pointer to the barrier attribute object. If this parameter is set to NULL, the default barrier attributes are used.
countIndicates the number of threads that must call pthread_barrier_wait() before any of them successfully returns from the call.
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

The value of count is greater than the maximum number of threads to block.

-
- -## pthread\_barrier\_wait\(\) - -``` -int pthread_barrier_wait ([pthread_barrier_t](UTILS.md#ga2f6d30b3b873012dbd361d3f7d52db59) * b) -``` - - **Description:** - -Synchronizes participating threads at a barrier. - -The call is blocked until the required number of threads have called this function with the specified barrier. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
bIndicates the pointer to the barrier to be used for synchronization.
- -**Returns:** - -Returns **PTHREAD\_BARRIER\_SERIAL\_THREAD** for the first restored thread and **0** for other threads. - -## pthread\_barrierattr\_destroy\(\) - -``` -int pthread_barrierattr_destroy ([pthread_barrierattr_t](UTILS.md#ga506b5743098d9d38526b2fd1e21f9457) * a) -``` - - **Description:** - -Destroys a barrier attribute object. - -This function always succeeds. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
aIndicates the pointer to the barrier attribute object to destroy.
- -**Returns:** - -Returns **0**. - -## pthread\_barrierattr\_init\(\) - -``` -int pthread_barrierattr_init ([pthread_barrierattr_t](UTILS.md#ga506b5743098d9d38526b2fd1e21f9457) * a) -``` - - **Description:** - -Initializes a barrier attribute object. - -This function always succeeds. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
aIndicates the pointer to the barrier attribute object to initialize.
- -**Returns:** - -Returns **0**. - -## pthread\_cancel\(\) - -``` -int pthread_cancel ([pthread_t](UTILS.md#ga5250f47a8a0402a78bb51a2133e13c1f) thread) -``` - - **Description:** - -Sends a cancellation request to a thread. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
threadIndicates the thread to receive the cancellation request.
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid parameter.

-
- -## pthread\_cleanup\_pop\(\) - -``` -void pthread_cleanup_pop (int execute) -``` - - **Description:** - -Removes the routine at the top of the clean-up handler stack. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
executeSpecifies whether the routine at the top of the clean-up handler stack should be executed. If this parameter is set to a non-zero value, the routine at the top of the clean-up handler stack must be popped and executed.
- -## pthread\_cleanup\_push\(\) - -``` -void pthread_cleanup_push (void(*)(void *) routine, void * arg ) -``` - - **Description:** - -Pushes the routine to the top of the clean-up handler stack. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
routineIndicates the pointer to the routine used to complete the clean-up.
argIndicates the parameter to be passed to the routine.
- -## pthread\_cond\_broadcast\(\) - -``` -int pthread_cond_broadcast ([pthread_cond_t](UTILS.md#gaf2111a9da165bafea75dabf5cb131042) * c) -``` - - **Description:** - -Unblocks all threads that are currently blocked on the condition variable **cond**. - -This function always succeeds. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
cIndicates the pointer to the condition variable to broadcast.
- -**Returns:** - -Returns **0**. - -## pthread\_cond\_destroy\(\) - -``` -int pthread_cond_destroy ([pthread_cond_t](UTILS.md#gaf2111a9da165bafea75dabf5cb131042) * c) -``` - - **Description:** - -Destroys a condition variable. - -This function always succeeds. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
cIndicates the pointer to the condition variable to destroy.
- -**Returns:** - -Returns **0**. - -## pthread\_cond\_init\(\) - -``` -int pthread_cond_init ([pthread_cond_t](UTILS.md#gaf2111a9da165bafea75dabf5cb131042) *__restrict c, const [pthread_condattr_t](UTILS.md#gaa992c0a75a463b1c095248eec28086d3) *__restrict a ) -``` - - **Description:** - -Initializes a condition variable. - -This function always succeeds. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
cIndicates the pointer to the condition variable to initialize.
aIndicates the pointer to the condition variable attribute object. If this parameter is set to NULL, the default condition variable attributes are used.
- -**Returns:** - -Returns **0**. - -## pthread\_cond\_signal\(\) - -``` -int pthread_cond_signal ([pthread_cond_t](UTILS.md#gaf2111a9da165bafea75dabf5cb131042) * c) -``` - - **Description:** - -Unblocks a thread. - -If multiple threads are blocked on the condition variable **cond**, this function unblocks at least one thread. This function always succeeds. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
cIndicates the pointer to the condition variable to signal.
- -**Returns:** - -Returns **0**. - -## pthread\_cond\_timedwait\(\) - -``` -int pthread_cond_timedwait ([pthread_cond_t](UTILS.md#gaf2111a9da165bafea75dabf5cb131042) *__restrict c, [pthread_mutex_t](UTILS.md#ga75eeb2460f33f5f74cec3ff583ad9e94) *__restrict m, const struct [timespec](timespec.md) *__restrict ts ) -``` - - **Description:** - -Blocks the calling thread to wait for the condition set by **pthread\_con\_signal\(\)** for a period of time specified by **ts**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
cIndicates the pointer to the condition variable to wait for.
mIndicates the pointer to the mutex associated with the condition variable.
tsIndicates the pointer to the absolute system time when the calling thread stops blocking.
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid ts value.

-

EPERM

-

The associated mutex is invalid.

-

ETIMEDOUT

-

The time specified by abstime has passed.

-
- -## pthread\_cond\_wait\(\) - -``` -int pthread_cond_wait ([pthread_cond_t](UTILS.md#gaf2111a9da165bafea75dabf5cb131042) *__restrict c, [pthread_mutex_t](UTILS.md#ga75eeb2460f33f5f74cec3ff583ad9e94) *__restrict m ) -``` - - **Description:** - -Blocks the calling thread to wait for the condition set by **pthread\_con\_signal\(\)**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
cIndicates the pointer to the condition variable to wait for.
mIndicates the pointer to the mutex associated with the condition variable.
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - -

errno

-

Description

-

EPERM

-

The associated mutex is invalid.

-
- -## pthread\_condattr\_destroy\(\) - -``` -int pthread_condattr_destroy ([pthread_condattr_t](UTILS.md#gaa992c0a75a463b1c095248eec28086d3) * a) -``` - - **Description:** - -Destroys a condition variable attribute object. - -This function always succeeds. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
aIndicates the pointer to the variable that contains the condition variable attributes.
- -**Returns:** - -Returns **0**. - -## pthread\_condattr\_getclock\(\) - -``` -int pthread_condattr_getclock (const [pthread_condattr_t](UTILS.md#gaa992c0a75a463b1c095248eec28086d3) *__restrict a, [clockid_t](UTILS.md#ga391e4a62662054e5d3e1e071b8e54329) *__restrict clk ) -``` - - **Description:** - -Obtains the clock of a condition variable attribute object. - -This function always succeeds. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
aIndicates the pointer to the variable that contains the condition variable attributes.
clkIndicates the pointer to the obtained clock ID.
- -**Returns:** - -Returns **0**. - -## pthread\_condattr\_init\(\) - -``` -int pthread_condattr_init ([pthread_condattr_t](UTILS.md#gaa992c0a75a463b1c095248eec28086d3) * a) -``` - - **Description:** - -Initializes a condition variable attribute object. - -This function always succeeds. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
aIndicates the pointer to the variable that contains the condition variable attributes.
- -**Returns:** - -Returns **0**. - -## pthread\_condattr\_setclock\(\) - -``` -int pthread_condattr_setclock ([pthread_condattr_t](UTILS.md#gaa992c0a75a463b1c095248eec28086d3) * a, [clockid_t](UTILS.md#ga391e4a62662054e5d3e1e071b8e54329) clk ) -``` - - **Description:** - -Sets a clock for a condition variable attribute object. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
aIndicates the pointer to the variable that contains the condition variable attributes.
clkIndicates the ID of the clock to set.
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid clk> value.

-
- -## pthread\_create\(\) - -``` -int pthread_create ([pthread_t](UTILS.md#ga5250f47a8a0402a78bb51a2133e13c1f) * thread, const [pthread_attr_t](UTILS.md#gac8ee4471bbc35deb7589ac3615deb486) * attr, void *(*)(void *) start_routine, void * arg ) -``` - - **Description:** - -Creates a thread. - -This function creates a thread in the calling process. The new thread starts execution from the entry point **star\_routine**. **arg** is passed as the unique argument of the entry point. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
threadIndicates the pointer to the buffer for storing the thread ID.
attrIndicates the pointer to the thread attribute object. If this parameter is set to NULL, the default thread attributes are used.
start_routineIndicates the pointer to the entry point of the thread.
argFunctions as the unique argument of start_routine.
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid parameter.

-

EAGAIN

-

Insufficient resource, or the maximum number of threads allowed by the system reached.

-
- -## pthread\_detach\(\) - -``` -int pthread_detach ([pthread_t](UTILS.md#ga5250f47a8a0402a78bb51a2133e13c1f) thread) -``` - - **Description:** - -Detaches a thread. - - - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
threadIndicates the ID of the user-level thread to detach.
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

The thread is not joinable.

-

ESRCH

-

Invalid thread ID.

-
- -## pthread\_equal\(\) - -``` -int pthread_equal ([pthread_t](UTILS.md#ga5250f47a8a0402a78bb51a2133e13c1f) t1, [pthread_t](UTILS.md#ga5250f47a8a0402a78bb51a2133e13c1f) t2 ) -``` - - **Description:** - -Compares whether two thread IDs are equal. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
t1Indicates the first thread.
t2Indicates the second thread.
- -**Returns:** - -Returns **0** if the two are not equal; returns a non-zero value otherwise. - -## pthread\_exit\(\) - -``` -_Noreturn void pthread_exit (void * retval) -``` - - **Description:** - -Terminates the calling thread. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
retvalIndicates the pointer to the return value after the thread is terminated.
- -## pthread\_getaffinity\_np\(\) - -``` -int pthread_getaffinity_np ([pthread_t](UTILS.md#ga5250f47a8a0402a78bb51a2133e13c1f) td, size_t size, cpu_set_t * set ) -``` - - **Description:** - -Gets the thread affinity. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
tdIndicates the thread whose affinity is to be obtained.
sizeThe size of the cpu_set_t struct.
setThe pointer to the cpu_set_t struct recording the getting affinity.
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

The size is not equal to the cpu_set_t or the td is invalid.

-
- -## pthread\_getattr\_np\(\) - -``` -int pthread_getattr_np ([pthread_t](UTILS.md#ga5250f47a8a0402a78bb51a2133e13c1f) thread, [pthread_attr_t](UTILS.md#gac8ee4471bbc35deb7589ac3615deb486) * attr ) -``` - - **Description:** - -Obtains the attributes of a created thread. - -This function always succeeds. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
threadIndicates the thread that has been created.
attrIndicates the pointer to the attribute values that describe the running thread.
- -**Returns:** - -Returns **0**. - -## pthread\_getschedparam\(\) - -``` -int pthread_getschedparam ([pthread_t](UTILS.md#ga5250f47a8a0402a78bb51a2133e13c1f) thread, int * policy, struct [sched_param](sched_param.md) * param ) -``` - - **Description:** - -Obtains the scheduling policy and parameters of a thread. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
threadIndicates the target thread.
policyIndicates the pointer to the scheduling policy. The value can only be SCHED_FIFO or SCHED_RR.
paramIndicates the pointer to the scheduling parameters. Only the thread priority is supported. The priority ranges from 0 (highest priority) to 31 (lowest priority).
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - - - - - - - -

errno

-

Description

-

ESRCH

-

Invalid thread ID.

-

EINVAL

-

Invalid parameter.

-

EPERM

-

No permission to obtain the specified scheduling policy and parameters.

-
- -## pthread\_getspecific\(\) - -``` -void* pthread_getspecific ([pthread_key_t](UTILS.md#gafeedfceab43831b6771f80aff6a519be) key) -``` - - **Description:** - -Obtains specific thread data. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
keyIndicates the key bound to the thread data.
- -**Returns:** - -Returns the thread data value associated with the given key. - -## pthread\_join\(\) - -``` -int pthread_join ([pthread_t](UTILS.md#ga5250f47a8a0402a78bb51a2133e13c1f) thread, void ** retval ) -``` - - **Description:** - -Waits for a thread to terminate. - -This function returns a value immediately if the thread has already terminated. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
threadIndicates the target thread.
retvalIndicates the double pointer to the exit or cancellation status of the target thread. This parameter can be NULL.
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

The thread is not joinable, or the target thread is the calling thread.

-
- -## pthread\_key\_create\(\) - -``` -int pthread_key_create ([pthread_key_t](UTILS.md#gafeedfceab43831b6771f80aff6a519be) * key, void(*)(void *) destructor ) -``` - - **Description:** - -Creates a key for thread data. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the pointer to the key to set for the thread data.
destructorIndicates the pointer to the function to be bound to the key.
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - -

errno

-

Description

-

EAGAIN

-

The system lacks the necessary resources to create another thread-specific key, or the number of keys exceeds the limit specified by PTHREAD_KEYS_MAX for each process.

-
- -## pthread\_key\_delete\(\) - -``` -int pthread_key_delete ([pthread_key_t](UTILS.md#gafeedfceab43831b6771f80aff6a519be) key) -``` - - **Description:** - -Deletes a key for thread data. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
keyIndicates the pointer to the key to delete for the thread data.
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - -## pthread\_kill\(\) - -``` -int pthread_kill ([pthread_t](UTILS.md#ga5250f47a8a0402a78bb51a2133e13c1f) thread, int sig ) -``` - - **Description:** - -Sends a signal to a thread. - -If **sig** is **0**, no signal is sent, but error checking is still performed. Therefore, you can call this function with **sig** set to **0** to check whether a thread exists. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
threadIndicates the thread to receive the signal.
sigIndicates the signal to send.
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid signal.

-

ESRCH

-

Invalid thread ID.

-
- -## pthread\_mutex\_destroy\(\) - -``` -int pthread_mutex_destroy ([pthread_mutex_t](UTILS.md#ga75eeb2460f33f5f74cec3ff583ad9e94) * m) -``` - - **Description:** - -Destroys a mutex. - -This function always succeeds. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
mIndicates the pointer to the mutex to destroy.
- -**Returns:** - -Returns **0**. - -## pthread\_mutex\_init\(\) - -``` -int pthread_mutex_init ([pthread_mutex_t](UTILS.md#ga75eeb2460f33f5f74cec3ff583ad9e94) *__restrict m, const [pthread_mutexattr_t](UTILS.md#gaf2212c79151cc55f3a41c430908f3909) *__restrict a ) -``` - - **Description:** - -Initializes a mutex. - -This function dynamically creates a mutex. The parameter **a** specifies the attributes of the mutex. This function always succeeds. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
mIndicates the pointer to the mutex to initialize.
aIndicates the pointer to the mutex attribute object. If this parameter is set to NULL, the default mutex attributes are used. The default attributes indicate a fast mutex.
- -**Returns:** - -Returns **0**. - -## pthread\_mutex\_lock\(\) - -``` -int pthread_mutex_lock ([pthread_mutex_t](UTILS.md#ga75eeb2460f33f5f74cec3ff583ad9e94) * m) -``` - - **Description:** - -Locks a mutex. - -If the mutex is already locked by a thread, the call is blocked until the holding thread unlocks the mutex by calling [pthread\_mutex\_unlock\(\)](PROCESS.md#ga02a3c64dac70730e226c31c0e7dbb45c). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
mIndicates the pointer to the mutex to lock.
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Incorrect parameter value.

-

EBADF

-

The mutex has been damaged during the waiting.

-

EDEADLK

-

The thread attempts to relock the mutex that it has already locked, and the mutex is of the error check mutex type.

-

EAGAIN

-

The maximum number of recursive locks for the mutex has been exceeded.

-
- -## pthread\_mutex\_timedlock\(\) - -``` -int pthread_mutex_timedlock ([pthread_mutex_t](UTILS.md#ga75eeb2460f33f5f74cec3ff583ad9e94) *__restrict m, const struct [timespec](timespec.md) *__restrict at ) -``` - - **Description:** - -Blocks the calling thread to lock a mutex. - -If the mutex is already locked, the call is blocked until the specified timeout duration expires or the holding thread unlocks the mutex by calling [pthread\_mutex\_unlock\(\)](PROCESS.md#ga02a3c64dac70730e226c31c0e7dbb45c). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
mIndicates the pointer to the mutex to lock.
atIndicates the pointer to the maximum duration that the calling thread waits for the mutex.
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Incorrect parameter value.

-

EBADF

-

The mutex has been damaged during the waiting.

-

EBUSY

-

The mutex is already locked.

-

EAGAIN

-

The maximum number of recursive locks for the mutex has been exceeded.

-

ETIMEDOUT

-

The mutex cannot be acquired within the specified period of time.

-
- -## pthread\_mutex\_trylock\(\) - -``` -int pthread_mutex_trylock ([pthread_mutex_t](UTILS.md#ga75eeb2460f33f5f74cec3ff583ad9e94) * m) -``` - - **Description:** - -Attempts to lock a mutex. - -This function attempts to acquire a mutex, without blocking the calling thread. If the mutex is already locked, the error code **EBUSY** is returned immediately. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
mIndicates the pointer to the mutex to lock.
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Incorrect parameter value.

-

EBADF

-

The mutex has been damaged during the waiting.

-

EBUSY

-

The mutex is already locked.

-

EAGAIN

-

The maximum number of recursive locks for the mutex has been exceeded.

-
- -## pthread\_mutex\_unlock\(\) - -``` -int pthread_mutex_unlock ([pthread_mutex_t](UTILS.md#ga75eeb2460f33f5f74cec3ff583ad9e94) * m) -``` - - **Description:** - -Unlocks a mutex. - -If the calling thread attempts to unlock a mutex that it has not locked \(by calling [pthread\_mutex\_lock\(\)](PROCESS.md#gafd70d6f2c50e22b996c926fb9d6ad291), [pthread\_mutex\_trylock\(\)](PROCESS.md#gacc1ccbaf3d76572da85a8030bba1ede4), or **pthread\_mutex\_timedlock\_np\(\)**, the unlock request fails and the error code **EPERM** is returned. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
mIndicates the pointer to the mutex to unlock.
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Incorrect parameter value.

-

EPERM

-

The mutex has not been locked by the calling thread.

-
- -## pthread\_mutexattr\_destroy\(\) - -``` -int pthread_mutexattr_destroy ([pthread_mutexattr_t](UTILS.md#gaf2212c79151cc55f3a41c430908f3909) * attr) -``` - - **Description:** - -Destroys a mutex attribute object. - -This function always succeeds. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
attrIndicates the pointer to the target mutex attribute object.
- -**Returns:** - -Returns **0**. - -## pthread\_mutexattr\_gettype\(\) - -``` -int pthread_mutexattr_gettype (const [pthread_mutexattr_t](UTILS.md#gaf2212c79151cc55f3a41c430908f3909) *__restrict attr, int *__restrict type ) -``` - - **Description:** - -Obtains the mutex type attribute. - -This function always succeeds. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
attrIndicates the pointer to the mutex attribute object.
typeIndicates the pointer to the obtained mutex type attribute.
- -**Returns:** - -Returns **0**. - -## pthread\_mutexattr\_init\(\) - -``` -int pthread_mutexattr_init ([pthread_mutexattr_t](UTILS.md#gaf2212c79151cc55f3a41c430908f3909) * attr) -``` - - **Description:** - -Initializes a mutex attribute object. - -This function always succeeds. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
attrIndicates the pointer to the target mutex attribute object.
- -**Returns:** - -Returns **0**. - -## pthread\_mutexattr\_settype\(\) - -``` -int pthread_mutexattr_settype ([pthread_mutexattr_t](UTILS.md#gaf2212c79151cc55f3a41c430908f3909) * attr, int type ) -``` - - **Description:** - -Sets the mutex type attribute. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
attrIndicates the pointer to the mutex attribute object.
typeIndicates the type of the mutex.
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid mutex type attribute.

-
- -## pthread\_once\(\) - -``` -int pthread_once ([pthread_once_t](UTILS.md#gaf46ecab6116bf15713b10ddfab67bc07) * once_control, void(*)(void) init_routine ) -``` - - **Description:** - -Enables the initialization function to be called only once. - -This function dynamically initializes the function specified by **init\_routine** and ensures that it will be called only once. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
once_controlIndicates the pointer to a variable specifying the execution status. The value 0 means NEVER, 1 means IN PROGRESS, and 2 means DONE.
init_routineIndicates the pointer to the function that you want to call for any required initialization.
- -**Returns:** - -Returns **0** if **once\_control** is set to **0** or **2**. If **once\_control** is **1**, the calling thread waits until the other thread completes initialization. - -## pthread\_rwlock\_destroy\(\) - -``` -int pthread_rwlock_destroy ([pthread_rwlock_t](UTILS.md#gadc0b6b9df00a6c3ed0d7f9afe8934d05) * rw) -``` - - **Description:** - -Destroys a read-write lock. - -This function always succeeds. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
rwIndicates the pointer to the read-write lock to destroy.
- -**Returns:** - -Returns **0**. - -## pthread\_rwlock\_init\(\) - -``` -int pthread_rwlock_init ([pthread_rwlock_t](UTILS.md#gadc0b6b9df00a6c3ed0d7f9afe8934d05) *__restrict rw, const [pthread_rwlockattr_t](UTILS.md#gaac7b93dc39852a3374d6c0802ceb7aa5) *__restrict a ) -``` - - **Description:** - -Initializes a read-write lock. - -This function always succeeds. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
rwIndicates the pointer to the read-write lock to initialize.
aIndicates the pointer to the read-write lock attribute object. If this parameter is set to NULL, the default read-write lock attributes are used.
- -**Returns:** - -Returns **0**. - -## pthread\_rwlock\_rdlock\(\) - -``` -int pthread_rwlock_rdlock ([pthread_rwlock_t](UTILS.md#gadc0b6b9df00a6c3ed0d7f9afe8934d05) * rw) -``` - - **Description:** - -Applies a read lock to a read-write lock. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
rwIndicates the pointer to the target read-write lock.
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Incorrect parameter value.

-

EBADF

-

The read-write lock has been damaged during the waiting.

-
- -## pthread\_rwlock\_timedrdlock\(\) - -``` -int pthread_rwlock_timedrdlock ([pthread_rwlock_t](UTILS.md#gadc0b6b9df00a6c3ed0d7f9afe8934d05) *__restrict rw, const struct [timespec](timespec.md) *__restrict at ) -``` - - **Description:** - -Blocks the calling thread to lock a read-write lock for reading. - -If the read-write lock is already locked, the calling thread is blocked until the specified timeout duration expires or the holding thread unlocks the read-write lock by calling [pthread\_rwlock\_unlock\(\)](PROCESS.md#gaffd8a19e83fc87d865d103d6fbce8c4f). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
rwIndicates the pointer to the read-write lock to lock.
atIndicates the maximum duration that the calling thread waits for the read-write lock.
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Incorrect parameter value.

-

EBADF

-

The read-write lock has been damaged during the waiting.

-

EBUSY

-

The read-write lock is already locked.

-

ETIMEDOUT

-

The read-write lock cannot be acquired within the specified period of time.

-
- -## pthread\_rwlock\_timedwrlock\(\) - -``` -int pthread_rwlock_timedwrlock ([pthread_rwlock_t](UTILS.md#gadc0b6b9df00a6c3ed0d7f9afe8934d05) *__restrict rw, const struct [timespec](timespec.md) *__restrict at ) -``` - - **Description:** - -Blocks the calling thread to lock a read-write lock for writing. - -If the read-write lock is already locked, the calling thread is blocked until the specified timeout duration expires or the holding thread unlocks the read-write lock by calling [pthread\_rwlock\_unlock\(\)](PROCESS.md#gaffd8a19e83fc87d865d103d6fbce8c4f). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
rwIndicates the pointer to the read-write lock to lock.
atIndicates the pointer to the maximum duration that the calling thread waits for the read-write lock.
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Incorrect parameter value.

-

EBADF

-

The read-write lock has been damaged during the waiting.

-

EBUSY

-

The read-write lock is already locked.

-

ETIMEDOUT

-

The read-write lock cannot be acquired within the specified period of time.

-
- -## pthread\_rwlock\_tryrdlock\(\) - -``` -int pthread_rwlock_tryrdlock ([pthread_rwlock_t](UTILS.md#gadc0b6b9df00a6c3ed0d7f9afe8934d05) * rw) -``` - - **Description:** - -Attempts to apply a read lock to a read-write lock. - -This function attempts to lock a read-write lock for reading, without blocking the calling thread. If the read-write lock is already locked, the error code **EBUSY** is returned immediately. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
rwIndicates the pointer to the target read-write lock.
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Incorrect parameter value.

-

EBADF

-

The read-write lock has been damaged during the waiting.

-

EBUSY

-

The read-write lock is already locked.

-
- -## pthread\_rwlock\_trywrlock\(\) - -``` -int pthread_rwlock_trywrlock ([pthread_rwlock_t](UTILS.md#gadc0b6b9df00a6c3ed0d7f9afe8934d05) * rw) -``` - - **Description:** - -Attempts to apply a write lock to a read-write lock. - -This function attempts to lock a read-write lock for writing, without blocking the calling thread. If the read-write lock is already locked, the error code **EBUSY** is returned immediately. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
rwIndicates the pointer to the read-write lock to lock.
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Incorrect parameter value.

-

EBADF

-

The read-write lock has been damaged during the waiting.

-

EBUSY

-

The read-write lock is already locked.

-
- -## pthread\_rwlock\_unlock\(\) - -``` -int pthread_rwlock_unlock ([pthread_rwlock_t](UTILS.md#gadc0b6b9df00a6c3ed0d7f9afe8934d05) * rw) -``` - - **Description:** - -Unlocks a read-write lock. - -If the calling thread attempts to unlock a read-write lock that it has not locked, the unlock request fails and the error code **EPERM** is returned. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
rwIndicates the pointer to the read-write lock to unlock.
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Incorrect parameter value.

-

EPERM

-

The read-write lock is not held by the calling thread.

-
- -## pthread\_rwlock\_wrlock\(\) - -``` -int pthread_rwlock_wrlock ([pthread_rwlock_t](UTILS.md#gadc0b6b9df00a6c3ed0d7f9afe8934d05) * rw) -``` - - **Description:** - -Applies a write lock to a read-write lock. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
rwIndicates the pointer to the read-write lock to lock.
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Incorrect parameter value.

-

EBADF

-

The read-write lock has been damaged during the waiting.

-

EBUSY

-

The read-write lock is already locked.

-
- -## pthread\_rwlockattr\_destroy\(\) - -``` -int pthread_rwlockattr_destroy ([pthread_rwlockattr_t](UTILS.md#gaac7b93dc39852a3374d6c0802ceb7aa5) * attr) -``` - - **Description:** - -Destroys a read-write lock attribute object. - -This function always succeeds. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
attrIndicates the pointer to the read-write lock attribute object to destroy.
- -**Returns:** - -Returns **0**. - -## pthread\_rwlockattr\_init\(\) - -``` -int pthread_rwlockattr_init ([pthread_rwlockattr_t](UTILS.md#gaac7b93dc39852a3374d6c0802ceb7aa5) * attr) -``` - - **Description:** - -Initializes a read-write lock attribute object. - -This function always succeeds. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
attrIndicates the pointer to the read-write lock attribute object to initialize.
- -**Returns:** - -Returns **0**. - -## pthread\_self\(\) - -``` -[pthread_t](UTILS.md#ga5250f47a8a0402a78bb51a2133e13c1f) pthread_self (void ) -``` - - **Description:** - -Obtains the ID of the calling thread. - -This function always succeeds. - -**Returns:** - -Returns the thread ID. - -## pthread\_setaffinity\_np\(\) - -``` -int pthread_setaffinity_np ([pthread_t](UTILS.md#ga5250f47a8a0402a78bb51a2133e13c1f) td, size_t size, const cpu_set_t * set ) -``` - - **Description:** - -Sets the thread affinity. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
tdIndicates the thread whose affinity is to be changed.
sizeThe size of the cpu_set_t struct.
setThe pointer to the cpu_set_t struct recording the setting affinity.
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

The size is not equal to the cpu_set_t or the td is invalid.

-
- -## pthread\_setcancelstate\(\) - -``` -int pthread_setcancelstate (int state, int * oldstate ) -``` - - **Description:** - -Sets the cancelability state for the calling thread. - -This function sets the cancelability state of the calling thread to the value specified by **state**. The previous cancelability state is stored in the buffer pointed to by oldstate. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
stateIndicates the cancelability state to set. Available values are as follows:
oldstateIndicates the pointer to the previous cancelability state before the setting.
- - - - - - - - - - - - - -

state

-

Description

-

PTHREAD_CANCEL_ENABLE

-

The thread is cancelable.

-

PTHREAD_CANCEL_DISABLE

-

The thread is not cancelable.

-
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid parameter.

-
- -## pthread\_setcanceltype\(\) - -``` -int pthread_setcanceltype (int type, int * oldtype ) -``` - - **Description:** - -Sets the cancelability type for the calling thread. - -This function sets the cancelability type of the calling thread to the value specified by **type**. The previous cancelability type is stored in the buffer pointed to by oldtype. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
typeIndicates the cancelability type to set. Available values are as follows:
oldtypeIndicates the pointer to the previous cancelability type before the setting.
- - - - - - - - - - - - - -

type

-

Description

-

PTHREAD_CANCEL_DEFERRED

-

The thread is canceled until the next cancellation point.

-

PTHREAD_CANCEL_ASYNCHRONOUS

-

The thread is canceled immediately upon receiving a cancellation request.

-
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid parameter.

-
- -## pthread\_setname\_np\(\) - -``` -int pthread_setname_np ([pthread_t](UTILS.md#ga5250f47a8a0402a78bb51a2133e13c1f) pthread, const char * name ) -``` - - **Description:** - -Sets the thread name. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
threadIndicates the thread whose name is to be changed.
nameIndicates the pointer to the thread name to set. The value contains a maximum of 16 characters, including the terminating null byte ('\0').
- -**Attention:** - -Currently, a thread can change its own thread name only. - -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - - - - -

errno

-

Description

-

ERANGE

-

The name is too long.

-

EPERM

-

Failed to copy data from the user-level thread.

-
- -## pthread\_setschedparam\(\) - -``` -int pthread_setschedparam ([pthread_t](UTILS.md#ga5250f47a8a0402a78bb51a2133e13c1f) thread, int policy, const struct [sched_param](sched_param.md) * param ) -``` - - **Description:** - -Sets a scheduling policy and parameters for a thread. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
threadIndicates the target thread.
policyIndicates the scheduling policy to set. The value can only be SCHED_FIFO or SCHED_RR.
paramIndicates the pointer to the scheduling parameters to set. Only the thread priority is supported. The priority ranges from 0 (highest priority) to 31 (lowest priority).
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. If the operation fails, the scheduling policy and parameters of the target thread remain unchanged. - - - - - - - - - - - - - - - - -

errno

-

Description

-

ESRCH

-

Invalid thread ID.

-

EINVAL

-

Invalid parameter.

-

EPERM

-

No permission to set the specified scheduling policy and parameters.

-
- -## pthread\_setschedprio\(\) - -``` -int pthread_setschedprio ([pthread_t](UTILS.md#ga5250f47a8a0402a78bb51a2133e13c1f) thread, int prio ) -``` - - **Description:** - -Sets a static scheduling priority for a thread. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
threadIndicates the target thread.
priorityIndicates the static scheduling priority to set. The value ranges from 0 (highest priority) to 31 (lowest priority).
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. If the operation fails, the scheduling policy of the target thread remains unchanged. - - - - - - - - - - - - - - - - -

errno

-

Description

-

ESRCH

-

Invalid thread ID.

-

EINVAL

-

Invalid parameter.

-

EPERM

-

No permission to set the specified scheduling policy and parameters.

-
- -## pthread\_setspecific\(\) - -``` -int pthread_setspecific ([pthread_key_t](UTILS.md#gafeedfceab43831b6771f80aff6a519be) key, const void * value ) -``` - - **Description:** - -Sets specific thread data. - -This function always succeeds. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the key bound to the thread data.
valueIndicates the pointer to the thread data to be bound to the key.
- -**Returns:** - -Returns **0**. - -## pthread\_spin\_destroy\(\) - -``` -int pthread_spin_destroy ([pthread_spinlock_t](UTILS.md#gae13db7661b1f8f7028dd7a88c8185fd2) * s) -``` - - **Description:** - -Destroys a spin lock. - -This function always succeeds. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sIndicates the pointer to the spin lock to destroy.
- -**Returns:** - -Returns **0**. - -## pthread\_spin\_init\(\) - -``` -int pthread_spin_init ([pthread_spinlock_t](UTILS.md#gae13db7661b1f8f7028dd7a88c8185fd2) * s, int shared ) -``` - - **Description:** - -Initializes a spin lock. - -This function always succeeds. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sIndicates the pointer to the spin lock to initialize.
sharedIndicates thread process-shared synchronization, which is not supported.
- -**Returns:** - -Returns **0**. - -## pthread\_spin\_lock\(\) - -``` -int pthread_spin_lock ([pthread_spinlock_t](UTILS.md#gae13db7661b1f8f7028dd7a88c8185fd2) * s) -``` - - **Description:** - -Locks a spin lock. - -This function always succeeds. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sIndicates the pointer to the spin lock to lock.
- -**Returns:** - -Returns **0**. - -## pthread\_spin\_trylock\(\) - -``` -int pthread_spin_trylock ([pthread_spinlock_t](UTILS.md#gae13db7661b1f8f7028dd7a88c8185fd2) * s) -``` - - **Description:** - -Attempts to lock a spin lock. - -This function attempts to lock the spin lock, without blocking the calling thread. If the spin lock is already locked, the error code **EBUSY** is returned immediately. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sIndicates the pointer to the spin lock to lock.
- -**Returns:** - -Returns **0** if the operation is successful; returns a value listed in **errno** otherwise. - - - - - - - - - - -

errno

-

Description

-

EBUSY

-

The spin lock has been held by another thread.

-
- -## pthread\_spin\_unlock\(\) - -``` -int pthread_spin_unlock ([pthread_spinlock_t](UTILS.md#gae13db7661b1f8f7028dd7a88c8185fd2) * s) -``` - - **Description:** - -Unlocks a spin lock. - -This function always succeeds. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sIndicates the pointer to the spin lock to unlock.
- -**Returns:** - -Returns **0**. - -## pthread\_testcancel\(\) - -``` -void pthread_testcancel (void ) -``` - - **Description:** - -Requests delivery of any pending cancellation request. - -This function creates a cancellation point in the calling thread. In this way, the thread executing code that contains no cancellation point responds to the cancellation request. This function always succeeds. - -**Returns:** - -Returns the cancellation point. - -## sched\_get\_priority\_max\(\) - -``` -int sched_get_priority_max (int policy) -``` - - **Description:** - -Obtains the maximum static priority that can be used for a process. - -This function returns the lowest priority of process scheduling in a scheduling policy specified by **policy**. The value of **policy** must be a value defined in [sched.h](sched-h.md). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
policyIndicates the scheduling policy. The value can be SCHED_FIFO or SCHED_RR, but not SCHED_OTHER, SCHED_BATCH, SCHED_IDLE, or SCHED_DEADLINE.
- -**Returns:** - -Returns the lowest priority of the scheduling policy if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid parameter. The value of policy is not a defined scheduling policy.

-
- -## sched\_get\_priority\_min\(\) - -``` -int sched_get_priority_min (int policy) -``` - - **Description:** - -Obtains the minimum static priority that can be used for a process. - -This function returns the highest priority of process scheduling in a scheduling policy specified by **policy**. The value of **policy** must be a value defined in [sched.h](sched-h.md). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
policyIndicates the scheduling policy. The value can be SCHED_FIFO or SCHED_RR, but not SCHED_OTHER, SCHED_BATCH, SCHED_IDLE, or SCHED_DEADLINE.
- -**Returns:** - -Returns the highest priority of the scheduling policy if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid parameter. The value of policy is not a defined scheduling policy.

-
- -## sched\_getparam\(\) - -``` -int sched_getparam ([pid_t](UTILS.md#ga30c34d3eead853c44f459f21b932984c) pid, struct [sched_param](sched_param.md) * param ) -``` - - **Description:** - -Obtains scheduling parameters of a process. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
pidIndicates the ID of the process for which the scheduling parameters are to be obtained. If this parameter is set to 0, the scheduling parameters of the calling process are to be obtained.
paramIndicates the pointer to the scheduling parameters. Only the static priority is supported. The priority ranges from 10 (highest priority) to 31 (lowest priority).
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid parameter.

-

ESRCH

-

The process specified by pid cannot be found.

-
- -## sched\_getscheduler\(\) - -``` -int sched_getscheduler ([pid_t](UTILS.md#ga30c34d3eead853c44f459f21b932984c) pid) -``` - - **Description:** - -Obtains the scheduling policy of a process. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
pidIndicates the ID of the process for which the scheduling policy is to be obtained. If this parameter is set to 0, the scheduling policy of the calling process is to be obtained.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid parameter.

-

EPERM

-

No permission.

-

ESRCH

-

The process specified by pid cannot be found.

-
- -## sched\_rr\_get\_interval\(\) - -``` -int sched_rr_get_interval ([pid_t](UTILS.md#ga30c34d3eead853c44f459f21b932984c) pid, struct [timespec](timespec.md) * interval ) -``` - - **Description:** - -Obtains the execution time limit of a process. - -This function updates the **timespec** structure referenced by the parameter **interval** to record the execution time limit of a process. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
pidIndicates the ID of the process for which the execution time limit is to be obtained. If this parameter is <0>0, the time quantum of the calling process is obtained and written into the parameter interval.
intervalIndicates the pointer to the time structure that records the time limit. The time structure supports only seconds and nanoseconds.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - -

errno

-

Description

-

EFAULT

-

An error occurred when copying information to the user space.

-

EINVAL

-

Invalid parameter.

-

ESRCH

-

The process specified by pid cannot be found.

-
- -## sched\_setparam\(\) - -``` -int sched_setparam ([pid_t](UTILS.md#ga30c34d3eead853c44f459f21b932984c) pid, const struct [sched_param](sched_param.md) * param ) -``` - - **Description:** - -Sets scheduling parameters related to a scheduling policy for a process. - - - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
pidIndicates the ID of the process for which the scheduling parameters are to be set. If this parameter is set to 0, the scheduling parameters of the calling process are to be set.
paramIndicates the pointer to the scheduling parameters to set. Only the static priority can be set. The priority ranges from 10 (highest priority) to 31 (lowest priority).
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid parameter.

-

EPERM

-

No permission.

-

ESRCH

-

The process specified by pid cannot be found.

-
- -## sched\_setscheduler\(\) - -``` -int sched_setscheduler ([pid_t](UTILS.md#ga30c34d3eead853c44f459f21b932984c) pid, int policy, const struct [sched_param](sched_param.md) * param ) -``` - - **Description:** - -Sets a scheduling policy for a process. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
pidIndicates the ID of the process for which the scheduling policy and parameters are to be set. If this parameter is set to 0, the scheduling policy and parameters of the calling process are to be set.
policyIndicates the scheduling policy to set. The value can be SCHED_FIFO or SCHED_RR, but not SCHED_OTHER, SCHED_BATCH, SCHED_IDLE, or SCHED_DEADLINE.
paramIndicates the pointer to the scheduling parameters to set. Only the static priority can be set. The priority ranges from 10 (highest priority) to 31 (lowest priority).
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid parameter.

-

EPERM

-

No permission.

-

ESRCH

-

The process specified by pid cannot be found.

-
- -## sched\_yield\(\) - -``` -int sched_yield (void ) -``` - - **Description:** - -Yields the running process. - -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - -## setpriority\(\) - -``` -int setpriority (int which, [id_t](UTILS.md#gab66157aef1dc726dccc825f07239da53) who, int value ) -``` - - **Description:** - -Sets the static priority of a specified ID. - -The ID type is determined by **which**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
whichIndicates a specified value, which can be:
  • PRIO_PROCESS: represents a process ID specified by who.
  • PRIO_PGRP: represents a process group ID specified by who. This value is not supported yet.
  • PRIO_USER: represents a valid user ID specified by who. This value is not supported yet.
-
whoIndicates the specified ID.
valueIndicates the target priority to set.
- -**Returns:** - -Returns 0 if the operation is successful; returns **-1** and sets **errno** to a value in the following table otherwise. - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid parameter.

-

EPERM

-

The operation is not allowed.

-

EOPNOTSUPP

-

Unsupported value.

-
- -## wait\(\) - -``` -[pid_t](UTILS.md#ga30c34d3eead853c44f459f21b932984c) wait (int * status) -``` - - **Description:** - -Waits for any child process to end and reclaims its resources. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
statusIndicates the pointer to the obtained status information. If this parameter is not NULL, the status information is stored in the int value that it points to. You can use the following macros defined in private.h to check the integer (the macro uses the integer as a parameter instead of the pointer that points to it):
  • WIFEXITED(status): If the child process ends normally, true is returned. Otherwise, false is returned.
  • WEXITSTATUS(status): If WIFEXITED(status) is true, this macro can be used to obtain the exit code that the child process passed to exit().
  • WTERMSIG(status): After a child process ends abnormally, the parent process can obtain the child process exit code SIGUSR2 through WTERMSIG, indicating that the child process ends abnormally. This is the only case supported.
-
- -**Returns:** - -Returns the child process ID if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - -

errno

-

Description

-

ECHILD

-

The child process does not exist, or the specified process group does not exist.

-

ESRCH

-

The child process ends abnormally.

-
- -## waitpid\(\) - -``` -[pid_t](UTILS.md#ga30c34d3eead853c44f459f21b932984c) waitpid ([pid_t](UTILS.md#ga30c34d3eead853c44f459f21b932984c) pid, int * status, int options ) -``` - - **Description:** - -Waits for a specified child process to end and reclaims its resources. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
pidIndicates the ID of the child process to wait for.
  • If this parameter is less than -1, the system waits for any child process whose process group ID is the absolute value of pid.
  • If this parameter is -1, the system waits for any child process. In this case, this function is equivalent to wait().
  • If this parameter is 0, the system waits for a child process whose process group ID is the same as the calling process (any process that is in the same process group as the calling process).
  • If this parameter is greater than 0, the system waits for the child process whose process ID is the value of pid.
-
statusIndicates the pointer to the obtained status information. If this parameter is not NULL, the status information is stored in the int value that it points to. You can use the following macros defined in private.h to check the integer (the macro uses the integer as a parameter instead of the pointer that points to it):
  • WIFEXITED(status): If the child process ends normally, true is returned. Otherwise, false is returned.
  • WEXITSTATUS(status): If WIFEXITED(status) is true, this macro can be used to obtain the exit code that the child process passed to exit().
  • WTERMSIG(status): After a child process ends abnormally, the parent process can obtain the child process exit code SIGUSR2 through WTERMSIG, indicating that the child process ends abnormally. This is the only case supported.
- WIFSIGNALED, WIFSTOPPED, WSTOPSIG, WCOREDUMP, WIFCONTINUED, and WUNTRACED are not supported.
optionsProvides some options to control the behavior of this function. If you do not want to use these options, set this parameter to 0. WNOHANG: If the child process specified by pid is not ended, this function returns 0 immediately instead of blocking the calling process. If the child process is ended, the process ID of the child process is returned. WUNTRACED, WEXITED, WSTOPPED, WCONTINUED, and WNOWAIT are not supported.
- -**Returns:** - -Returns the child process ID if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid options.

-

EOPNOTSUPP

-

Unsupported options.

-

ECHILD

-

The child process does not exist, or the specified process group does not exist.

-

ESRCH

-

The child process ends abnormally.

-
- -## **Variable ** - -## effective - -``` -__u32 __user_cap_data_struct::effective -``` - - **Description:** - -Current effective capability - -## inheritable - -``` -__u32 __user_cap_data_struct::inheritable -``` - - **Description:** - -Inheritable capability set - -## permitted - -``` -__u32 __user_cap_data_struct::permitted -``` - - **Description:** - -Permitted capability of the process - -## pid - -``` -int __user_cap_header_struct::pid -``` - - **Description:** - -Process ID - -## version - -``` -__u32 __user_cap_header_struct::version -``` - - **Description:** - -Version - diff --git a/api/api-SmartVision-Devices/Param.md b/api/api-SmartVision-Devices/Param.md deleted file mode 100755 index f9712ca0ad0fc53ab7f8a5485c99a8be1e5024e4..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Param.md +++ /dev/null @@ -1,84 +0,0 @@ -# Param - -- [Overview](#section1918344634165635) -- [Summary](#section1254589222165635) -- [Data Fields](#pub-attribs) -- [Details](#section990879802165635) -- [Field](#section745735996165635) -- [key](#ace6f19effda894bc68afd60d5425a4a8) -- [size](#a4f68079ff933352feeef5364436bc402) -- [val](#a375689df3cbcede96a3fb20ab6e0a086) - -## **Overview** - -**Related Modules:** - -[Codec](Codec.md) - -**Description:** - -Describes the dynamic parameter structure, which is mainly used by [CodecCreate](Codec.md#ga74aa0395a51f004390f7a92fb68faddd) and [CodecSetParameter](Codec.md#gaa080cf23aa5f77b30f3b90a026d97cc0). - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

key

-

ParamKey

-

val

-

void *

-

size

-

int

-
- -## **Details** - -## **Field ** - -## key - -``` -[ParamKey](Codec.md#ga575c56a2d6b42c48881cf47b0008d5a6) Param::key -``` - - **Description:** - -Parameter type index - -## size - -``` -int Param::size -``` - - **Description:** - -Parameter value size - -## val - -``` -void* Param::val -``` - - **Description:** - -Pointer to the parameter value - diff --git a/api/api-SmartVision-Devices/Parameter.md b/api/api-SmartVision-Devices/Parameter.md deleted file mode 100755 index 0491b3b5befd49f3615efbff2d94dabc99cdaeae..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Parameter.md +++ /dev/null @@ -1,768 +0,0 @@ -# Parameter - -- [Overview](#section462213396165625) -- [Summary](#section766550006165625) -- [Files](#files) -- [Functions](#func-members) -- [Details](#section1594484957165625) -- [Function](#section932383220165625) -- [GetAbiList\(\)](#gaa5e3d6179f398e407b632cc53410cd1a) -- [GetBootloaderVersion\(\)](#gab033380f4acabc3304c401ea40034a3b) -- [GetBrand\(\)](#gaba787cc6f740d7d8f5e7ccd5a98fc7ed) -- [GetBuildHost\(\)](#ga54aad44d8a1c01ee1a3af82b5464e616) -- [GetBuildRootHash\(\)](#ga26f28a1bf6f0f3c550c716223397673c) -- [GetBuildTime\(\)](#ga6707dd0565fd65ab18149aa70ec233ac) -- [GetBuildType\(\)](#gad1a95a2a073bf7f78c6a8513e29c3ddc) -- [GetBuildUser\(\)](#gaa49edb9e675d928790a8ca7332905659) -- [GetDisplayVersion\(\)](#gaacd61c8a367a307d5b5c3e907822f271) -- [GetFirstApiLevel\(\)](#ga6f62d683d76a160775b3ac46e856955e) -- [GetHardwareModel\(\)](#ga0ff61721ab17eb07fcece1ccaf40293a) -- [GetHardwareProfile\(\)](#gaf98290ad8bd5328aff40293ff42d6a9b) -- [GetIncrementalVersion\(\)](#ga3d52b0a354555dbb16c265d5d5923546) -- [GetManufacture\(\)](#gad6d21dda3b027eb603dd24c7315ee6ea) -- [GetMarketName\(\)](#gaa3adb204e5affd0a9e18828c1fbf2b0b) -- [GetOsName\(\)](#ga1402657e793875973f8801f631c29781) -- [GetParameter\(\)](#gae6a476fa36d2b1876eee0e4f256db6a6) -- [GetProductModel\(\)](#gaa62644b77184644fac848f54837f4e5b) -- [GetProductSeries\(\)](#ga8a0d394075a3cbafe7ef0f51d08319a8) -- [GetProductType\(\)](#ga2d6e83004da9cfdef6f3162d484163f1) -- [GetSdkApiLevel\(\)](#ga4720291ec5700581109e2f7943e2e371) -- [GetSecurityPatchTag\(\)](#gaa2407d8ce39e4a151b7e9d45123794c2) -- [GetSerial\(\)](#gacc29ceeab6d312f3becdf19b28b9185d) -- [GetSoftwareModel\(\)](#ga309a7fb6d9a60f6d6453e3faea030d7a) -- [GetVersionId\(\)](#gaea3cb294680fcef18a0a52f35fdaa124) -- [SetParameter\(\)](#ga2779b5e59d43308c51f7be38b9c98ddb) - -## **Overview** - -**Description:** - -Provides functions for obtaining system parameters. - -This module can obtain device information such as device type and manufacturer. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - -

File Name

-

Description

-

parameter.h

-

Declares functions for obtaining system parameters.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

GetParameter (const char *key, const char *def, char *value, unsigned int len)

-

int

-

Obtains a system parameter matching the specified key.

-

SetParameter (const char *key, const char *value)

-

int

-

Sets or updates a system parameter.

-

GetProductType (void)

-

char *

-

Obtains the device type.

-

GetManufacture (void)

-

char *

-

Obtains the device manufacturer.

-

GetBrand (void)

-

char *

-

Obtains the device brand.

-

GetMarketName (void)

-

char *

-

Obtains the device marketing name.

-

GetProductSeries (void)

-

char *

-

Obtains the device series name.

-

GetProductModel (void)

-

char *

-

Obtains the device authentication model.

-

GetSoftwareModel (void)

-

char *

-

Obtains the device software model.

-

GetHardwareModel (void)

-

char *

-

Obtains the device hardware model.

-

GetHardwareProfile (void)

-

char *

-

Obtains the device hardware profile.

-

GetSerial (void)

-

char *

-

Obtains the device serial number (SN).

-

GetOsName (void)

-

char *

-

Obtains the operating system (OS) name.

-

GetDisplayVersion (void)

-

char *

-

Obtains the software version visible to users.

-

GetBootloaderVersion (void)

-

char *

-

Obtains the bootloader version of this device.

-

GetSecurityPatchTag (void)

-

char *

-

Obtains the security patch tag.

-

GetAbiList (void)

-

char *

-

Obtains the list of application binary interfaces (ABIs) supported on this device.

-

GetSdkApiLevel (void)

-

char *

-

Obtains the SDK API level that matches the current system software.

-

GetFirstApiLevel (void)

-

char *

-

Obtains the first SDK API level of the system software.

-

GetIncrementalVersion (void)

-

char *

-

Obtains the incremental version.

-

GetVersionId (void)

-

char *

-

Obtains the version ID.

-

GetBuildType (void)

-

char *

-

Obtains the build type.

-

GetBuildUser (void)

-

char *

-

Obtains the build account user name.

-

GetBuildHost (void)

-

char *

-

Obtains the build host name.

-

GetBuildTime (void)

-

char *

-

Obtains the version build time.

-

GetBuildRootHash (void)

-

char *

-

Obtains the buildroot hash value of this version.

-
- -## **Details** - -## **Function ** - -## GetAbiList\(\) - -``` -char* GetAbiList (void ) -``` - - **Description:** - -Obtains the list of application binary interfaces \(ABIs\) supported on this device. - -The interfaces in the ABI list are separated by commas \(,\). This function is available only for an OS with an ecosystem accommodating native applications. - -**Returns:** - -Returns the ABI list if a result is found; returns **NULL** otherwise. The return result is released by the caller. - -## GetBootloaderVersion\(\) - -``` -char* GetBootloaderVersion (void ) -``` - - **Description:** - -Obtains the bootloader version of this device. - -The bootloader version can have a maximum length of 64 characters. - -**Returns:** - -Returns the bootloader version if a result is found; returns **NULL** otherwise. The return result is released by the caller. - -## GetBrand\(\) - -``` -char* GetBrand (void ) -``` - - **Description:** - -Obtains the device brand. - -The device brand can have a maximum length of 32 characters. - -**Returns:** - -Returns the device brand if a result is found; returns **NULL** otherwise. The return result is released by the caller. - -## GetBuildHost\(\) - -``` -char* GetBuildHost (void ) -``` - - **Description:** - -Obtains the build host name. - -The build host name can have a maximum length of 32 characters. - -**Returns:** - -Returns the build host name if a result is found; returns **NULL** otherwise. The return result is released by the caller. - -## GetBuildRootHash\(\) - -``` -char* GetBuildRootHash (void ) -``` - - **Description:** - -Obtains the buildroot hash value of this version. - -The buildroot hash value is represented by the root hash value in the software version hash tree. - -**Returns:** - -Returns the buildroot hash value if a result is found; returns **NULL** otherwise. The return result is released by the caller. - -## GetBuildTime\(\) - -``` -char* GetBuildTime (void ) -``` - - **Description:** - -Obtains the version build time. - -The version build time is represented by the number of milliseconds elapsed since 1970-01-01 00:00:00 GMT. - -**Returns:** - -Returns the version build time if a result is found; returns **NULL** otherwise. The return result is released by the caller. - -## GetBuildType\(\) - -``` -char* GetBuildType (void ) -``` - - **Description:** - -Obtains the build type. - -Different build types with the same baseline codes will be returned, for example, **debug/release** and **log/nolog**. Multiple build types can be separated by semicolons \(;\). - -**Returns:** - -Returns the build type if a result is found; returns **NULL** otherwise. The return result is released by the caller. - -## GetBuildUser\(\) - -``` -char* GetBuildUser (void ) -``` - - **Description:** - -Obtains the build account user name. - -The build account user name can have a maximum length of 32 characters. - -**Returns:** - -Returns the build account user name if a result is found; returns **NULL** otherwise. The return result is released by the caller. - -## GetDisplayVersion\(\) - -``` -char* GetDisplayVersion (void ) -``` - - **Description:** - -Obtains the software version visible to users. - -The software version visible to users can have a maximum length of 64 characters. - -**Returns:** - -Returns the software version visible to users if a result is found; returns **NULL** otherwise. The return result is released by the caller. - -## GetFirstApiLevel\(\) - -``` -char* GetFirstApiLevel (void ) -``` - - **Description:** - -Obtains the first SDK API level of the system software. - -In general, the first SDK API level is an integer. This function is only available for an OS with an ecosystem. - -**Returns:** - -Returns the first SDK API level if a result is found; returns **NULL** otherwise. The return result is released by the caller. - -## GetHardwareModel\(\) - -``` -char* GetHardwareModel (void ) -``` - - **Description:** - -Obtains the device hardware model. - -The device hardware model can have a maximum length of 32 characters. - -**Returns:** - -Returns the device hardware model if a result is found; returns **NULL** otherwise. The return result is released by the caller. - -## GetHardwareProfile\(\) - -``` -char* GetHardwareProfile (void ) -``` - - **Description:** - -Obtains the device hardware profile. - -The device hardware profile is a string in JSON format and has a maximum length of 1000 characters. - -**Returns:** - -Returns the device hardware profile if a result is found; returns **NULL** otherwise. The return result is released by the caller. The JSON field in the device hardware profile is defined as follows: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Description

-

key

-

Audio playback

-

aout

-

Display

-

display

-

Camera

-

camera

-

2D acceleration capability

-

DMA_2D

-

Random-access memory

-

RAM

-

Read-only memory

-

ROM

-

Graphics processing unit

-

GPU

-

Neural-network processing unit

-

NPU

-

Radio

-

radio

-

Bluetooth

-

bluetooth

-

Wi-Fi

-

WIFI

-

USB

-

usbhost

-
- -## GetIncrementalVersion\(\) - -``` -char* GetIncrementalVersion (void ) -``` - - **Description:** - -Obtains the incremental version. - -The incremental version can be used as the unique software version when the device model is the same. - -**Returns:** - -Returns the incremental version if a result is found; returns **NULL** otherwise. The return result is released by the caller. - -## GetManufacture\(\) - -``` -char* GetManufacture (void ) -``` - - **Description:** - -Obtains the device manufacturer. - -The device manufacturer can have a maximum length of 32 characters. - -**Returns:** - -Returns the device manufacturer if a result is found; returns **NULL** otherwise. The return result is released by the caller. - -## GetMarketName\(\) - -``` -char* GetMarketName (void ) -``` - - **Description:** - -Obtains the device marketing name. - -The device marketing name can have a maximum length of 32 characters. - -**Returns:** - -Returns the device marketing name if a result is found; returns **NULL** otherwise. The return result is released by the caller. - -## GetOsName\(\) - -``` -char* GetOsName (void ) -``` - - **Description:** - -Obtains the operating system \(OS\) name. - -The device OS name can have a maximum length of 32 characters. - -**Returns:** - -Returns the device OS name if a result is found; returns **NULL** otherwise. The return result is released by the caller. - -## GetParameter\(\) - -``` -int GetParameter (const char * key, const char * def, char * value, unsigned int len ) -``` - - **Description:** - -Obtains a system parameter matching the specified **key**. - -If no system parameter is found, the **def** parameter will be returned. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the key for the system parameter to query. The value can contain lowercase letters, digits, underscores (_), and dots (.). Its length cannot exceed 32 bytes (including the end-of-text character in the string).
defIndicates the default value to return when no query result is found. This parameter is specified by the caller.
valueIndicates the data buffer that stores the query result. This parameter is applied for and released by the caller and can be used as an output parameter.
lenIndicates the length of the data in the buffer.
- -**Returns:** - -Returns the number of bytes of the system parameter if the operation is successful; returns **-9** if a parameter is incorrect; returns **-1** in other scenarios. - -## GetProductModel\(\) - -``` -char* GetProductModel (void ) -``` - - **Description:** - -Obtains the device authentication model. - -The device authentication model can have a maximum length of 32 characters. - -**Returns:** - -Returns the device authentication model if a result is found; returns **NULL** otherwise. The return result is released by the caller. - -## GetProductSeries\(\) - -``` -char* GetProductSeries (void ) -``` - - **Description:** - -Obtains the device series name. - -The device series name can have a maximum length of 32 characters. - -**Returns:** - -Returns the device series name if a result is found; returns **NULL** otherwise. The return result is released by the caller. - -## GetProductType\(\) - -``` -char* GetProductType (void ) -``` - - **Description:** - -Obtains the device type. - -The device type can have a maximum length of 32 characters. - -**Returns:** - -Returns the device type if a result is found, for example, returns **wifiiot** if the application is running on a Wi-Fi connected IoT device; returns **NULL** otherwise. The return result is released by the caller. - -## GetSdkApiLevel\(\) - -``` -char* GetSdkApiLevel (void ) -``` - - **Description:** - -Obtains the SDK API level that matches the current system software. - -In general, the SDK API level is an integer. This function is only available for an OS with an ecosystem. - -**Returns:** - -Returns the SDK API level if a result is found; returns **NULL** otherwise. The return result is released by the caller. - -## GetSecurityPatchTag\(\) - -``` -char* GetSecurityPatchTag (void ) -``` - - **Description:** - -Obtains the security patch tag. - -**Returns:** - -Returns the security patch tag if a result is found; returns **NULL** otherwise. The return result is released by the caller. - -## GetSerial\(\) - -``` -char* GetSerial (void ) -``` - - **Description:** - -Obtains the device serial number \(SN\). - -The device SN can have a maximum length of 64 characters. - -**Returns:** - -Returns the device SN if a result is found; returns **NULL** otherwise. The return result is released by the caller. - -## GetSoftwareModel\(\) - -``` -char* GetSoftwareModel (void ) -``` - - **Description:** - -Obtains the device software model. - -The device software model can have a maximum length of 32 characters. - -**Returns:** - -Returns the device software model if a result is found; returns **NULL** otherwise. The return result is released by the caller. - -## GetVersionId\(\) - -``` -char* GetVersionId (void ) -``` - - **Description:** - -Obtains the version ID. - -The version ID can have a maximum length of 127 characters. It is the unique identifier of a device. - -**Returns:** - -Returns the version ID if a result is found; returns **NULL** otherwise. The return result is released by the caller. - -## SetParameter\(\) - -``` -int SetParameter (const char * key, const char * value ) -``` - - **Description:** - -Sets or updates a system parameter. - -You can use this function to set a system parameter that matches **key** as **value**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the key for the parameter to set or update. The value can contain lowercase letters, digits, underscores (_), and dots (.). Its length cannot exceed 32 bytes (including the end-of-text character in the string).
valueIndicates the system parameter value. Its length cannot exceed 128 bytes (including the end-of-text character in the string).
- -**Returns:** - -Returns **0** if the operation is successful; returns **-9** if a parameter is incorrect; returns **-1** in other scenarios. - diff --git a/api/api-SmartVision-Devices/ParameterItem.md b/api/api-SmartVision-Devices/ParameterItem.md deleted file mode 100755 index b133d927ff32bdb6501a2e469bb7ea37d5e88e2b..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/ParameterItem.md +++ /dev/null @@ -1,183 +0,0 @@ -# ParameterItem - -- [Overview](#section1277844240165635) -- [Summary](#section1337305937165635) -- [Data Fields](#pub-attribs) -- [Details](#section1974216673165635) -- [Field](#section648134752165635) -- [dValue](#af4be109572705fcd01778c2af5ad1868) -- [fValue](#ae6d56dc8bd3f5a206fdd085ce65a9e33) -- [key](#a7fd3dd0c0ddbf9e4cf04d214fae1a857) -- [pValue](#a7bd2066c1aa644f4cd7a88a4fa0f9776) -- [s32Value](#a67b4403be08a141554d8974be14c9ec4) -- [s64Value](#af7566b817d49b505e9a3f25be6feafe3) -- [size](#ad708dec0457cddcc56f1955f80ea2dfe) -- [u32Value](#a20cbcbc7418ac8d885418d09a4041e00) -- [u64Value](#a4f04b2e5166d5e39142a16b6a1ae2392) - -## **Overview** - -**Related Modules:** - -[Format](Format.md) - -**Description:** - -Defines a structure for configuring and obtaining dynamic parameters. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

key

-

uint32_t

-

size

-

int32_t

-
  

union {

-
  

int32_t s32Value

-
  

uint32_t u32Value

-
  

int64_t s64Value

-
  

uint64_t u64Value

-
  

float fValue

-
  

double dValue

-
  

const void * pValue

-

value

-

}

-

Defines value types of the parameters.

-
- -## **Details** - -## **Field ** - -## dValue - -``` -double ParameterItem::dValue -``` - - **Description:** - -Double-precision floating point number - -## fValue - -``` -float ParameterItem::fValue -``` - - **Description:** - -Single-precision floating point number - -## key - -``` -uint32_t ParameterItem::key -``` - - **Description:** - -Key type. For details, see [KeyType](Format.md#gaab0feaba617470cb4aa830dc5935238c) - -## pValue - -``` -const void* ParameterItem::pValue -``` - - **Description:** - -Pointer - -## s32Value - -``` -int32_t ParameterItem::s32Value -``` - - **Description:** - -32-bit integer - -## s64Value - -``` -int64_t ParameterItem::s64Value -``` - - **Description:** - -64-bit integer - -## size - -``` -int32_t ParameterItem::size -``` - - **Description:** - -Data size, which indicates the size of the buffer memory pointed by **pValue** - -## u32Value - -``` -uint32_t ParameterItem::u32Value -``` - - **Description:** - -32-bit unsigned integer - -## u64Value - -``` -uint64_t ParameterItem::u64Value -``` - - **Description:** - -64-bit unsigned integer - diff --git a/api/api-SmartVision-Devices/PermissionSaved.md b/api/api-SmartVision-Devices/PermissionSaved.md deleted file mode 100755 index 0440507ac6865634c9da6df922897956a429b2ff..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/PermissionSaved.md +++ /dev/null @@ -1,45 +0,0 @@ -# PermissionSaved - -- [Overview](#section376804071165635) -- [Summary](#section1931769999165635) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[Pms\_types](Pms_types.md) - -**Description:** - -Defines the permission, including the name, description, and whether the permission is granted. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

name [PERM_NAME_LEN]

-

char

-

desc [PERM_DESC_LEN]

-

char

-

granted

-

enum IsGranted

-
- diff --git a/api/api-SmartVision-Devices/Pms_types.md b/api/api-SmartVision-Devices/Pms_types.md deleted file mode 100755 index 49417eb964a8bc6fba2493cdf6d7f4245461d927..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Pms_types.md +++ /dev/null @@ -1,300 +0,0 @@ -# Pms\_types - -- [Overview](#section87665533165625) -- [Summary](#section1423129036165625) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Macros](#define-members) -- [Enumerations](#enum-members) -- [Details](#section1304863685165625) -- [Macro Definition](#section1103827987165625) -- [PERM\_DESC\_LEN](#gafb859b51e2b9552103cf1ba665e8eb7a) -- [PERM\_NAME\_LEN](#ga1d7d82a3741ecedc4d993b523d95c0c8) -- [Enumeration Type](#section488131239165625) -- [IsGranted](#ga56644f429963f015addb12e36e2344f7) -- [PmsErrorCode](#gacb79d7f5cd64c73479e0bdd9525265a8) -- [Variable](#section149054169165625) -- [desc](#gac30cf9ead0186519b49c3ecd58e39937) -- [granted](#ga1b618be368f56d0d8c857aacc5b42baf) -- [name](#gad57ecbb6ba51b1ab7f7b1533e5f8bbff) - -## **Overview** - -**Description:** - -Defines variables and data structures used by the permission management module. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - -

File Name

-

Description

-

pms_types.h

-

Declares variables and data structures used by the permission management module.

-
- -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

PermissionSaved

-

Defines the permission, including the name, description, and whether the permission is granted.

-
- -## Macros - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

PERM_NAME_LEN 64

-

Indicates the length of a permission name.

-

PERM_DESC_LEN 128

-

Indicates the length of a permission description.

-
- -## Enumerations - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

IsGranted { NOT_GRANTED = 0, GRANTED = 1 }

-

Enumerates granting statuses of the permission.

-

PmsErrorCode { PERM_ERRORCODE_SUCCESS = 0, PERM_ERRORCODE_INVALID_PARAMS = 10, PERM_ERRORCODE_INVALID_PERMNAME, PERM_ERRORCODE_MALLOC_FAIL, PERM_ERRORCODE_OPENFD_FAIL, PERM_ERRORCODE_READFD_FAIL, PERM_ERRORCODE_WRITEFD_FAIL, PERM_ERRORCODE_JSONPARSE_FAIL, PERM_ERRORCODE_COPY_ERROR, PERM_ERRORCODE_FIELD_TOO_LONG, PERM_ERRORCODE_PERM_NOT_EXIST, PERM_ERRORCODE_UNLINK_ERROR, PERM_ERRORCODE_FILE_NOT_EXIST, PERM_ERRORCODE_MEMSET_FAIL, PERM_ERRORCODE_STAT_FAIL, PERM_ERRORCODE_PATH_INVALID, PERM_ERRORCODE_TOO_MUCH_PERM, PERM_ERRORCODE_TASKID_NOT_EXIST, PERM_ERRORCODE_PERM_NUM_ERROR }

-

Enumerates error codes of the permission management module.

-
- -## **Details** - -## **Macro Definition ** - -## PERM\_DESC\_LEN - -``` -#define PERM_DESC_LEN 128 -``` - - **Description:** - -Indicates the length of a permission description. - -The default length is 128 bytes, including the terminating null byte **'\\0'**. - -## PERM\_NAME\_LEN - -``` -#define PERM_NAME_LEN 64 -``` - - **Description:** - -Indicates the length of a permission name. - -The default length is 64 bytes, including the terminating null byte **'\\0'**. - -## **Enumeration Type ** - -## IsGranted - -``` -enum [IsGranted](Pms_types.md#ga56644f429963f015addb12e36e2344f7) -``` - - **Description:** - -Enumerates granting statuses of the permission. - - - - - - - - - - - - - -

Enumerator

-

Description

-
NOT_GRANTED

Not granted

-
GRANTED

Granted

-
- -## PmsErrorCode - -``` -enum [PmsErrorCode](Pms_types.md#gacb79d7f5cd64c73479e0bdd9525265a8) -``` - - **Description:** - -Enumerates error codes of the permission management module. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
PERM_ERRORCODE_SUCCESS

Success

-
PERM_ERRORCODE_INVALID_PARAMS

Invalid parameters

-
PERM_ERRORCODE_INVALID_PERMNAME

Invalid permission name

-
PERM_ERRORCODE_MALLOC_FAIL

Failed to allocate memory using the malloc function.

-
PERM_ERRORCODE_OPENFD_FAIL

Failed to open the file descriptor.

-
PERM_ERRORCODE_READFD_FAIL

Failed to read the file descriptor.

-
PERM_ERRORCODE_WRITEFD_FAIL

Failed to write the file descriptor.

-
PERM_ERRORCODE_JSONPARSE_FAIL

Failed to parse the JSON string.

-
PERM_ERRORCODE_COPY_ERROR

Failed to copy the string.

-
PERM_ERRORCODE_FIELD_TOO_LONG

The permission name or description is too long.

-
PERM_ERRORCODE_PERM_NOT_EXIST

The permission does not exist.

-
PERM_ERRORCODE_UNLINK_ERROR

Failed to delete the permission file.

-
PERM_ERRORCODE_FILE_NOT_EXIST

The file does not exist.

-
PERM_ERRORCODE_MEMSET_FAIL

Failed to set memory using the memset function.

-
PERM_ERRORCODE_STAT_FAIL

Failed to obtain information about the named file using the stat function.

-
PERM_ERRORCODE_PATH_INVALID

Invalid path

-
PERM_ERRORCODE_TOO_MUCH_PERM

Too many permissions

-
PERM_ERRORCODE_TASKID_NOT_EXIST

The process ID does not exist.

-
PERM_ERRORCODE_PERM_NUM_ERROR

Abnormal number of permissions

-
- -## **Variable ** - -## desc - -``` -char PermissionSaved::desc[[PERM_DESC_LEN](Pms_types.md#gafb859b51e2b9552103cf1ba665e8eb7a)] -``` - - **Description:** - -Permission description. For details about its length, see [PERM\_DESC\_LEN](Pms_types.md#gafb859b51e2b9552103cf1ba665e8eb7a). - -## granted - -``` -enum [IsGranted](Pms_types.md#ga56644f429963f015addb12e36e2344f7) PermissionSaved::granted -``` - - **Description:** - -Whether the permission is granted - -## name - -``` -char PermissionSaved::name[[PERM_NAME_LEN](Pms_types.md#ga1d7d82a3741ecedc4d993b523d95c0c8)] -``` - - **Description:** - -Permission name. For details about its length, see [PERM\_NAME\_LEN](Pms_types.md#ga1d7d82a3741ecedc4d993b523d95c0c8). - diff --git a/api/api-SmartVision-Devices/ProbeResp.md b/api/api-SmartVision-Devices/ProbeResp.md deleted file mode 100755 index 1bb5abd5118814571d6adf09ba3a2e09f9424e11..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/ProbeResp.md +++ /dev/null @@ -1,54 +0,0 @@ -# ProbeResp - -- [Overview](#section1479330065165635) -- [Summary](#section1811377773165635) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Defines scanning response. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

timestamp

-

uint64_t

-

beaconInt

-

uint16_t

-

capabInfo

-

uint16_t

-

variable [0]

-

uint8_t

-
- diff --git a/api/api-SmartVision-Devices/ProgramInfo.md b/api/api-SmartVision-Devices/ProgramInfo.md deleted file mode 100755 index c27bc601f0990130db9533305dd56c634e71f005..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/ProgramInfo.md +++ /dev/null @@ -1,108 +0,0 @@ -# ProgramInfo - -- [Overview](#section1946451835165635) -- [Summary](#section255717250165635) -- [Data Fields](#pub-attribs) -- [Details](#section400338988165635) -- [Field](#section781250091165635) -- [durationMs](#a652dc8e396a6c8337f24ef19a60ff8d5) -- [programId](#a37665885745484c665fd7c3f7c4e0257) -- [track](#a7464c64a9cdbd91debb2e0dc3ae494bd) -- [trackNum](#a63ffbb3059e57c139cb3801c8188c662) - -## **Overview** - -**Related Modules:** - -[Format](Format.md) - -**Description:** - -Defines program information. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

programId

-

int32_t

-

durationMs

-

int64_t

-

trackNum

-

uint32_t

-

track

-

TrackInfo *

-
- -## **Details** - -## **Field ** - -## durationMs - -``` -int64_t ProgramInfo::durationMs -``` - - **Description:** - -Program duration - -## programId - -``` -int32_t ProgramInfo::programId -``` - - **Description:** - -Program index - -## track - -``` -[TrackInfo](TrackInfo.md)* ProgramInfo::track -``` - - **Description:** - -Pointer to the array of current program information - -## trackNum - -``` -uint32_t ProgramInfo::trackNum -``` - - **Description:** - -Number of tracks of the current program - diff --git a/api/api-SmartVision-Devices/Provider.md b/api/api-SmartVision-Devices/Provider.md deleted file mode 100755 index 549dfb1cfc26d212b8ba730cd1524db3d7aeb57b..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Provider.md +++ /dev/null @@ -1,83 +0,0 @@ -# Provider - -- [Overview](#section94821796165635) -- [Summary](#section1262804507165635) -- [Data Fields](#pub-attribs) -- [Details](#section344628975165635) -- [Field](#section984770604165635) -- [Publish](#afbce5ffb04137a55e45161a7ba8577b7) - -## **Overview** - -**Related Modules:** - -[Broadcast](Broadcast.md) - -**Description:** - -Defines the provider of events and data of a topic. - -## **Summary** - -## Data Fields - - - - - - - - - - -

Variable Name

-

Description

-

Publish )(IUnknown *iUnknown, const Topic *topic, uint8 *data, int16 len)

-

BOOL(*

-

Publishes events and data of a specified topic.

-
- -## **Details** - -## **Field ** - -## Publish - -``` -BOOL(* Provider::Publish) ([IUnknown](IUnknown.md) *iUnknown, const [Topic](Broadcast.md#gaf03f5bc94cad32ab628a6cdee09b0542) *topic, uint8 *data, int16 len) -``` - - **Description:** - -Publishes events and data of a specified topic. - -The events or data is published by the publisher, sent to all consumers who have subscribed to the topic, and processed by the consumers. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
iUnknownIndicates external interface of the pub/sub feature.
topicIndicates the pointer to the topic to publish.
dataIndicates the pointer to the data to publish.
lenIndicates the length of the data to be published. The length must be the same as the data length. The caller must ensure the validity of this parameter.
- -**Returns:** - -Returns **TRUE** if the topic is successfully published; returns **FALSE** otherwise. - diff --git a/api/api-SmartVision-Devices/PublishInfo.md b/api/api-SmartVision-Devices/PublishInfo.md deleted file mode 100755 index f8b73e6ae0acd849903ece92f784279491c8672a..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/PublishInfo.md +++ /dev/null @@ -1,65 +0,0 @@ -# PublishInfo - -- [Overview](#section1247996641165635) -- [Summary](#section2023144910165635) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[Softbus](Softbus.md) - -**Description:** - -Defines service provisioning information sent to a discovering device. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

publishId

-

int

-

mode

-

int

-

medium

-

ExchanageMedium

-

freq

-

ExchangeFre

-

capability

-

const char *

-

capabilityData

-

unsigned char *

-

dataLen

-

unsigned int

-
- diff --git a/api/api-SmartVision-Devices/RTC.md b/api/api-SmartVision-Devices/RTC.md deleted file mode 100755 index e771a4d435dc97dc6b84417eae7c20db0b62f87a..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/RTC.md +++ /dev/null @@ -1,676 +0,0 @@ -# RTC - -- [Overview](#section471241871165623) -- [Summary](#section162759248165623) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Typedefs](#typedef-members) -- [Enumerations](#enum-members) -- [Functions](#func-members) -- [Details](#section1063913536165623) -- [Typedef](#section1614801129165623) -- [RtcAlarmCallback](#gaf9932b7e647bce0503f1314bbe5eef8d) -- [Enumeration Type](#section1322628777165623) -- [RtcAlarmIndex](#gad7b3a575c848e2669db5e5b6f7e74330) -- [Function](#section173008276165623) -- [RtcAlarmInterruptEnable\(\)](#ga8b0f2951646ebd17313d905553bd8e0e) -- [RtcClose\(\)](#ga395aa79ef260bfcd603ed56f9839d73b) -- [RtcGetFreq\(\)](#ga766e2df8045177cd030e1133df4cba12) -- [RtcOpen\(\)](#ga35004a866f23081ce2a446f1b0f88e32) -- [RtcReadAlarm\(\)](#gabc4a137f0aed13e41da2db2dccc32b08) -- [RtcReadReg\(\)](#gaec39316c639860a032f802628276d366) -- [RtcReadTime\(\)](#gae8b242769eacd00b71eb1debce9be4de) -- [RtcRegisterAlarmCallback\(\)](#ga0c42d787adde8d56a82b0c21624049d5) -- [RtcReset\(\)](#ga7eb8a5ecf1058b9f90a133e2caa14573) -- [RtcSetFreq\(\)](#ga17fdfb7ba3c876974cf9099aab092345) -- [RtcWriteAlarm\(\)](#gaf4dd53c3e5b6c7a1766f6b15a77c96e9) -- [RtcWriteReg\(\)](#gab8cc20f50b103acef06aa7887610be1c) -- [RtcWriteTime\(\)](#ga7b6da87bfe9af2bcbfeebe9793876eb8) - -## **Overview** - -**Description:** - -Provides standard real-time clock \(RTC\) APIs. - -These APIs allow you to perform operations such as reading or writing system time, reading or writing alarm time, setting alarm interrupts, registering alarm callbacks, setting the external frequency, resetting the RTC driver, and customizing RTC configurations. The RTC driver provides precise real time for the operating system \(OS\). If the OS is powered off, the RTC driver continues to keep track of the system time using an external battery. - -**Since:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - -

File Name

-

Description

-

rtc_if.h

-

Declares the standard RTC APIs.

-
- -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

RtcTime

-

Defines the RTC information.

-
- -## Typedefs - - - - - - - - - - -

Typedef Name

-

Description

-

RtcAlarmCallback) (enum RtcAlarmIndex)

-

typedef int32_t(*

-

Defines a callback that will be invoked when an alarm is generated at the specified time.

-
- -## Enumerations - - - - - - - - - - -

Enumeration Name

-

Description

-

RtcAlarmIndex { RTC_ALARM_INDEX_A = 0, RTC_ALARM_INDEX_B = 1 }

-

Enumerates alarm indexes.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

RtcOpen (void)

-

DevHandle

-

Opens the RTC device to obtain its handle.

-

RtcClose (DevHandle handle)

-

void

-

Releases a specified handle of the RTC device.

-

RtcReadTime (DevHandle handle, struct RtcTime *time)

-

int32_t

-

Reads time from the RTC driver.

-

RtcWriteTime (DevHandle handle, const struct RtcTime *time)

-

int32_t

-

Writes format-compliant time to the RTC driver.

-

RtcReadAlarm (DevHandle handle, enum RtcAlarmIndex alarmIndex, struct RtcTime *time)

-

int32_t

-

Reads the RTC alarm time that was set last time.

-

RtcWriteAlarm (DevHandle handle, enum RtcAlarmIndex alarmIndex, const struct RtcTime *time)

-

int32_t

-

Writes the RTC alarm time based on the alarm index.

-

RtcRegisterAlarmCallback (DevHandle handle, enum RtcAlarmIndex alarmIndex, RtcAlarmCallback cb)

-

int32_t

-

Registers RtcAlarmCallback that will be invoked when an alarm is generated at the specified time.

-

RtcAlarmInterruptEnable (DevHandle handle, enum RtcAlarmIndex alarmIndex, uint8_t enable)

-

int32_t

-

Enables or disables alarm interrupts.

-

RtcGetFreq (DevHandle handle, uint32_t *freq)

-

int32_t

-

Reads the RTC external frequency.

-

RtcSetFreq (DevHandle handle, uint32_t freq)

-

int32_t

-

Sets the frequency of the external crystal oscillator connected to the RTC driver.

-

RtcReset (DevHandle handle)

-

int32_t

-

Resets the RTC driver.

-

RtcReadReg (DevHandle handle, uint8_t usrDefIndex, uint8_t *value)

-

int32_t

-

Reads the configuration of a custom RTC register based on the register index.

-

RtcWriteReg (DevHandle handle, uint8_t usrDefIndex, uint8_t value)

-

int32_t

-

Writes the configuration of a custom RTC register based on the register index.

-
- -## **Details** - -## **Typedef ** - -## RtcAlarmCallback - -``` -typedef int32_t(* RtcAlarmCallback) (enum [RtcAlarmIndex](RTC.md#gad7b3a575c848e2669db5e5b6f7e74330)) -``` - - **Description:** - -Defines a callback that will be invoked when an alarm is generated at the specified time. - -## **Enumeration Type ** - -## RtcAlarmIndex - -``` -enum [RtcAlarmIndex](RTC.md#gad7b3a575c848e2669db5e5b6f7e74330) -``` - - **Description:** - -Enumerates alarm indexes. - -The alarm indexes will be used when you perform operations related to alarms. - - - - - - - - - - - - - -

Enumerator

-

Description

-
RTC_ALARM_INDEX_A

Index of alarm A

-
RTC_ALARM_INDEX_B

Index of alarm B

-
- -## **Function ** - -## RtcAlarmInterruptEnable\(\) - -``` -int32_t RtcAlarmInterruptEnable ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle, enum [RtcAlarmIndex](RTC.md#gad7b3a575c848e2669db5e5b6f7e74330) alarmIndex, uint8_t enable ) -``` - - **Description:** - -Enables or disables alarm interrupts. - -Before performing alarm operations, you need to call this function to enable alarm interrupts, so that the [RtcRegisterAlarmCallback](RTC.md#ga0c42d787adde8d56a82b0c21624049d5) will be called when the alarm is not generated upon a timeout. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the RTC device handle, which is obtained via RtcGetHandle.
alarmIndexIndicates the RTC alarm index. For details, see RtcAlarmIndex.
enableSpecifies whether to enable RTC alarm interrupts. The value 1 means to enable alarm interrupts and value 0 means to disable alarm interrupts.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value if the operation fails. For details, see [HDF\_STATUS](DriverUtils.md#ga7e01536ecbe9b17563dd3fe256202a67). - -## RtcClose\(\) - -``` -void RtcClose ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle) -``` - - **Description:** - -Releases a specified handle of the RTC device. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the RTC device handle to release, which is created via RtcGetHandle.
- -## RtcGetFreq\(\) - -``` -int32_t RtcGetFreq ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle, uint32_t * freq ) -``` - - **Description:** - -Reads the RTC external frequency. - -This function reads the frequency of the external crystal oscillator connected to the RTC driver. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the RTC device handle, which is obtained via RtcGetHandle.
freqIndicates the pointer to the frequency of the external crystal oscillator, in Hz.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value if the operation fails. For details, see [HDF\_STATUS](DriverUtils.md#ga7e01536ecbe9b17563dd3fe256202a67). - -## RtcOpen\(\) - -``` -[DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) RtcOpen (void ) -``` - - **Description:** - -Opens the RTC device to obtain its handle. - -The OS supports only one RTC device. - -**Returns:** - -Returns [DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) if the operation is successful; returns **NULL** if the operation fails. - -## RtcReadAlarm\(\) - -``` -int32_t RtcReadAlarm ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle, enum [RtcAlarmIndex](RTC.md#gad7b3a575c848e2669db5e5b6f7e74330) alarmIndex, struct [RtcTime](RtcTime.md) * time ) -``` - - **Description:** - -Reads the RTC alarm time that was set last time. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the RTC device handle, which is obtained via RtcGetHandle.
alarmIndexIndicates the RTC alarm index. For details, see RtcAlarmIndex.
timeIndicates the pointer to the RTC alarm time information. For details, see RtcTime.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value if the operation fails. For details, see [HDF\_STATUS](DriverUtils.md#ga7e01536ecbe9b17563dd3fe256202a67). - -## RtcReadReg\(\) - -``` -int32_t RtcReadReg ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle, uint8_t usrDefIndex, uint8_t * value ) -``` - - **Description:** - -Reads the configuration of a custom RTC register based on the register index. - -One index corresponds to one byte of the configuration value. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the RTC device handle, which is obtained via RtcGetHandle.
usrDefIndexIndicates the index of the custom register.
valueIndicates the pointer to the configuration value of the specified register index.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value if the operation fails. For details, see [HDF\_STATUS](DriverUtils.md#ga7e01536ecbe9b17563dd3fe256202a67). - -## RtcReadTime\(\) - -``` -int32_t RtcReadTime ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle, struct [RtcTime](RtcTime.md) * time ) -``` - - **Description:** - -Reads time from the RTC driver. - -The time information includes the year, month, day, day of the week, hour, minute, second, and millisecond. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the RTC device handle, which is obtained via RtcGetHandle.
timeIndicates the pointer to the time information read from the RTC driver. For details, see RtcTime.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value if the operation fails. For details, see [HDF\_STATUS](DriverUtils.md#ga7e01536ecbe9b17563dd3fe256202a67). - -## RtcRegisterAlarmCallback\(\) - -``` -int32_t RtcRegisterAlarmCallback ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle, enum [RtcAlarmIndex](RTC.md#gad7b3a575c848e2669db5e5b6f7e74330) alarmIndex, [RtcAlarmCallback](RTC.md#gaf9932b7e647bce0503f1314bbe5eef8d) cb ) -``` - - **Description:** - -Registers [RtcAlarmCallback](RTC.md#gaf9932b7e647bce0503f1314bbe5eef8d) that will be invoked when an alarm is generated at the specified time. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the RTC device handle, which is obtained via RtcGetHandle.
alarmIndexIndicates the RTC alarm index. For details, see RtcAlarmIndex.
cbIndicates the callback to register. For details, see RtcAlarmCallback.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value if the operation fails. For details, see [HDF\_STATUS](DriverUtils.md#ga7e01536ecbe9b17563dd3fe256202a67). - -## RtcReset\(\) - -``` -int32_t RtcReset ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle) -``` - - **Description:** - -Resets the RTC driver. - -After the reset, the configuration registers are restored to the default values. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the RTC device handle, which is obtained via RtcGetHandle.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value if the operation fails. For details, see [HDF\_STATUS](DriverUtils.md#ga7e01536ecbe9b17563dd3fe256202a67). - -## RtcSetFreq\(\) - -``` -int32_t RtcSetFreq ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle, uint32_t freq ) -``` - - **Description:** - -Sets the frequency of the external crystal oscillator connected to the RTC driver. - -Note that the frequency must be configured in accordance with the requirements specified in the product manual of the in-use component. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the RTC device handle, which is obtained via RtcGetHandle.
freqIndicates the frequency to set for the external crystal oscillator, in Hz.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value if the operation fails. For details, see [HDF\_STATUS](DriverUtils.md#ga7e01536ecbe9b17563dd3fe256202a67). - -## RtcWriteAlarm\(\) - -``` -int32_t RtcWriteAlarm ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle, enum [RtcAlarmIndex](RTC.md#gad7b3a575c848e2669db5e5b6f7e74330) alarmIndex, const struct [RtcTime](RtcTime.md) * time ) -``` - - **Description:** - -Writes the RTC alarm time based on the alarm index. - -Note that the RTC start time is 1970/01/01 Thursday 00:00:00 \(UTC\). Set the maximum value of **year** based on the requirements specified in the product manual of the in-use component. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the RTC device handle, which is obtained via RtcGetHandle.
alarmIndexIndicates the RTC alarm index. For details, see RtcAlarmIndex.
tmIndicates the pointer to the RTC alarm time information. For details, see RtcTime.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value if the operation fails. For details, see [HDF\_STATUS](DriverUtils.md#ga7e01536ecbe9b17563dd3fe256202a67). - -## RtcWriteReg\(\) - -``` -int32_t RtcWriteReg ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle, uint8_t usrDefIndex, uint8_t value ) -``` - - **Description:** - -Writes the configuration of a custom RTC register based on the register index. - -One index corresponds to one byte of the configuration value. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the RTC device handle, which is obtained via RtcGetHandle.
usrDefIndexIndicates the index of the custom register.
valueIndicates the configuration value to write at the index of the register.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value if the operation fails. For details, see [HDF\_STATUS](DriverUtils.md#ga7e01536ecbe9b17563dd3fe256202a67). - -## RtcWriteTime\(\) - -``` -int32_t RtcWriteTime ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle, const struct [RtcTime](RtcTime.md) * time ) -``` - - **Description:** - -Writes format-compliant time to the RTC driver. - -Note that the RTC start time is 1970/01/01 Thursday 00:00:00 \(UTC\). Set the maximum value of **year** based on the requirements specified in the product manual of the in-use component. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the RTC device handle, which is obtained via RtcGetHandle.
timeIndicates the pointer to the time information to write. For details, see RtcTime.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value if the operation fails. For details, see [HDF\_STATUS](DriverUtils.md#ga7e01536ecbe9b17563dd3fe256202a67). - diff --git a/api/api-SmartVision-Devices/RateInfo.md b/api/api-SmartVision-Devices/RateInfo.md deleted file mode 100755 index e5a834b4e641151d77387bb3ef50d252f88bca67..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/RateInfo.md +++ /dev/null @@ -1,59 +0,0 @@ -# RateInfo - -- [Overview](#section842723827165636) -- [Summary](#section629804982165636) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Defines the rate information received or sent over WLAN. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

flags

-

uint8_t

-

mcs

-

uint8_t

-

legacy

-

uint16_t

-

nss

-

uint8_t

-

resv

-

uint8_t

-
- diff --git a/api/api-SmartVision-Devices/Readme-CN.md b/api/api-SmartVision-Devices/Readme-CN.md deleted file mode 100755 index ba7c07524e7d1dd6fe483a418abbed3d31d6f95b..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Readme-CN.md +++ /dev/null @@ -1,728 +0,0 @@ -# 智慧视觉设备API - -- [标准库](标准库.md) - - [标准C库](标准C库.md) - - [FS](FS.md) - - [IO](IO.md) - - [IPC](IPC.md) - - [LINKER](LINKER.md) - - [MATH](MATH.md) - - [MEM](MEM.md) - - [NET](NET.md) - - [PROCESS](PROCESS.md) - - [TIME](TIME.md) - - [UTILS](UTILS.md) - -- [驱动](驱动.md) - - [驱动框架](驱动框架.md) - - [Core](Core.md) - - [DriverConfig](DriverConfig.md) - - [DriverUtils](DriverUtils.md) - - [OSAL](OSAL.md) - - - [HDI](HDI.md) - - [Audio](Audio.md) - - [Codec](Codec.md) - - [Display](Display.md) - - [Format](Format.md) - - [Input](Input.md) - - - [平台](平台.md) - - [COMMON](COMMON.md) - - [GPIO](GPIO.md) - - [I2C](I2C.md) - - [RTC](RTC.md) - - [SDIO](SDIO.md) - - [SPI](SPI.md) - - [UART](UART.md) - - [WATCHDOG](WATCHDOG.md) - - - [模型](模型.md) - - [WLAN](WLAN.md) - -- [系统基础能力子系统集](系统基础能力子系统集.md) - - [用户程序框架](用户程序框架.md) - - [AbilityKit](AbilityKit.md) - - [BundleManager](BundleManager.md) - - - [公共通信子系统](公共通信子系统.md) - - [Softbus](Softbus.md) - - - [图形及UI子系统](图形及UI子系统.md) - - [Graphic](Graphic.md) - - [Surface](Surface.md) - - [Window](Window.md) - - - [服务框架子系统](服务框架子系统.md) - - [Broadcast](Broadcast.md) - - [OHOS Init](OHOS-Init.md) - - [Registry](Registry.md) - - [Samgr](Samgr.md) - - - [多媒体子系统](多媒体子系统.md) - - [MultiMedia\_AudioCapturer](MultiMedia_AudioCapturer.md) - - [MultiMedia\_Camera](MultiMedia_Camera.md) - - [MultiMedia\_CameraAbility](MultiMedia_CameraAbility.md) - - [MultiMedia\_CameraConfig](MultiMedia_CameraConfig.md) - - [MultiMedia\_CameraDeviceCallback](MultiMedia_CameraDeviceCallback.md) - - [MultiMedia\_CameraKit](MultiMedia_CameraKit.md) - - [MultiMedia\_CameraStateCallback](MultiMedia_CameraStateCallback.md) - - [MultiMedia\_FrameConfig](MultiMedia_FrameConfig.md) - - [MultiMedia\_FrameStateCallback](MultiMedia_FrameStateCallback.md) - - [MultiMedia\_MediaCommon](MultiMedia_MediaCommon.md) - - [MultiMedia\_Player](MultiMedia_Player.md) - - [MultiMedia\_Recorder](MultiMedia_Recorder.md) - -- [基础软件服务子系统集及硬件服务子系统集](基础软件服务子系统集及硬件服务子系统集.md) - - [安全子系统](安全子系统.md) - - [Pms\_types](Pms_types.md) - - [PMS](PMS.md) - - - [DFX子系统](DFX子系统.md) - - [HiLog](HiLog.md) - -- [公共基础库](公共基础库.md) - - [Utils子系统](Utils子系统.md) - - [Kv\_store](Kv_store.md) - - [Parameter](Parameter.md) - - [Utils\_config](Utils_config.md) - -- [头文件和结构体](头文件和结构体.md) - - [头文件](头文件.md) - - [ability.h](ability-h.md) - - [ability\_connection.h](ability_connection-h.md) - - [ability\_context.h](ability_context-h.md) - - [ability\_env.h](ability_env-h.md) - - [ability\_errors.h](ability_errors-h.md) - - [ability\_event\_handler.h](ability_event_handler-h.md) - - [ability\_loader.h](ability_loader-h.md) - - [ability\_manager.h](ability_manager-h.md) - - [ability\_slice.h](ability_slice-h.md) - - [ability\_state.h](ability_state-h.md) - - [ability\_info.h](ability_info-h.md) - - [appexecfwk\_errors.h](appexecfwk_errors-h.md) - - [alltypes.h](alltypes-h.md) - - [animator.h](animator-h.md) - - [abstract\_adapter.h](abstract_adapter-h.md) - - [aod\_callback.h](aod_callback-h.md) - - [audio\_adapter.h](audio_adapter-h.md) - - [audio\_attribute.h](audio_attribute-h.md) - - [audio\_capture.h](audio_capture-h.md) - - [audio\_control.h](audio_control-h.md) - - [audio\_manager.h](audio_manager-h.md) - - [audio\_render.h](audio_render-h.md) - - [audio\_scene.h](audio_scene-h.md) - - [audio\_types.h](audio_types-h.md) - - [audio\_volume.h](audio_volume-h.md) - - [audio\_capturer.h](audio_capturer-h.md) - - [bundle\_info.h](bundle_info-h.md) - - [bundle\_manager.h](bundle_manager-h.md) - - [bundle\_status\_callback.h](bundle_status_callback-h.md) - - [bitsperlong.h](bitsperlong-h.md) - - [camera\_state\_callback.h](camera_state_callback-h.md) - - [codec\_interface.h](codec_interface-h.md) - - [codec\_type.h](codec_type-h.md) - - [camera.h](camera-h.md) - - [camera\_ability.h](camera_ability-h.md) - - [camera\_config.h](camera_config-h.md) - - [camera\_device\_callback.h](camera_device_callback-h.md) - - [camera\_kit.h](camera_kit-h.md) - - [common.h](common-h.md) - - [capability.h](capability-h.md) - - [complex.h](complex-h.md) - - [crypt.h](crypt-h.md) - - [ctype.h](ctype-h.md) - - [color.h](color-h.md) - - [cancel\_event.h](cancel_event-h.md) - - [click\_event.h](click_event-h.md) - - [display\_gfx.h](display_gfx-h.md) - - [display\_gralloc.h](display_gralloc-h.md) - - [display\_layer.h](display_layer-h.md) - - [display\_type.h](display_type-h.md) - - [dlfcn.h](dlfcn-h.md) - - [device\_resource\_if.h](device_resource_if-h.md) - - [dirent.h](dirent-h.md) - - [discovery\_service.h](discovery_service-h.md) - - [drag\_event.h](drag_event-h.md) - - [element\_name.h](element_name-h.md) - - [err.h](err-h.md) - - [errno.h](errno-h.md) - - [easing\_equation.h](easing_equation-h.md) - - [event\_injector.h](event_injector-h.md) - - [event.h](event-h.md) - - [ether.h](ether-h.md) - - [ethernet.h](ethernet-h.md) - - [feature.h](feature-h.md) - - [format.h](format-h.md) - - [format\_interface.h](format_interface-h.md) - - [format\_type.h](format_type-h.md) - - [frame\_config.h](frame_config-h.md) - - [fenv.h](fenv-h.md) - - [fcntl.h](fcntl-h.md) - - [ftw.h](ftw-h.md) - - [fmtmsg.h](fmtmsg-h.md) - - [fnmatch.h](fnmatch-h.md) - - [flex\_layout.h](flex_layout-h.md) - - [gpio\_if.h](gpio_if-h.md) - - [glob.h](glob-h.md) - - [getopt.h](getopt-h.md) - - [geometry2d.h](geometry2d-h.md) - - [graphic\_assert.h](graphic_assert-h.md) - - [graphic\_config.h](graphic_config-h.md) - - [graphic\_math.h](graphic_math-h.md) - - [graphic\_types.h](graphic_types-h.md) - - [grid\_layout.h](grid_layout-h.md) - - [hdf\_base.h](hdf_base-h.md) - - [hdf\_dlist.h](hdf_dlist-h.md) - - [hdf\_log.h](hdf_log-h.md) - - [hdf\_workqueue.h](hdf_workqueue-h.md) - - [hdf\_device\_desc.h](hdf_device_desc-h.md) - - [hdf\_io\_service\_if.h](hdf_io_service_if-h.md) - - [hdf\_object.h](hdf_object-h.md) - - [hdf\_sbuf.h](hdf_sbuf-h.md) - - [hdf\_netbuf.h](hdf_netbuf-h.md) - - [hdf\_wifi\_event.h](hdf_wifi_event-h.md) - - [hdf\_wifi\_product.h](hdf_wifi_product-h.md) - - [hdf\_platform.h](hdf_platform-h.md) - - [heap\_base.h](heap_base-h.md) - - [input\_controller.h](input_controller-h.md) - - [input\_manager.h](input_manager-h.md) - - [input\_reporter.h](input_reporter-h.md) - - [input\_type.h](input_type-h.md) - - [iproxy\_client.h](iproxy_client-h.md) - - [iproxy\_server.h](iproxy_server-h.md) - - [ipcstat.h](ipcstat-h.md) - - [ipc.h](ipc-h.md) - - [iunknown.h](iunknown-h.md) - - [iconv.h](iconv-h.md) - - [i2c\_if.h](i2c_if-h.md) - - [ibuffer\_consumer\_listener.h](ibuffer_consumer_listener-h.md) - - [ioctl.h](ioctl-h.md) - - [inttypes.h](inttypes-h.md) - - [interpolation.h](interpolation-h.md) - - [image.h](image-h.md) - - [image\_info.h](image_info-h.md) - - [inet.h](inet-h.md) - - [ifaddrs.h](ifaddrs-h.md) - - [if.h](if-h.md) - - [in.h](in-h.md) - - [kv\_store.h](kv_store-h.md) - - [key\_event.h](key_event-h.md) - - [locale.h](locale-h.md) - - [libgen.h](libgen-h.md) - - [limits.h](limits-h.md) - - [long\_press\_event.h](long_press_event-h.md) - - [layout.h](layout-h.md) - - [list.h](list-h.md) - - [malloc.h](malloc-h.md) - - [mman.h](mman-h.md) - - [mqueue.h](mqueue-h.md) - - [module\_info.h](module_info-h.md) - - [message.h](message-h.md) - - [media\_errors.h](media_errors-h.md) - - [media\_info.h](media_info-h.md) - - [math.h](math-h.md) - - [mount.h](mount-h.md) - - [monetary.h](monetary-h.md) - - [mem\_api.h](mem_api-h.md) - - [nl\_types.h](nl_types-h.md) - - [net\_device.h](net_device-h.md) - - [netdb.h](netdb-h.md) - - [ohos\_init.h](ohos_init-h.md) - - [osal\_atomic.h](osal_atomic-h.md) - - [osal\_file.h](osal_file-h.md) - - [osal\_firmware.h](osal_firmware-h.md) - - [osal\_io.h](osal_io-h.md) - - [osal\_irq.h](osal_irq-h.md) - - [osal\_mem.h](osal_mem-h.md) - - [osal\_mutex.h](osal_mutex-h.md) - - [osal\_sem.h](osal_sem-h.md) - - [osal\_spinlock.h](osal_spinlock-h.md) - - [osal\_thread.h](osal_thread-h.md) - - [osal\_time.h](osal_time-h.md) - - [osal\_timer.h](osal_timer-h.md) - - [parameter.h](parameter-h.md) - - [player.h](player-h.md) - - [pms\_interface.h](pms_interface-h.md) - - [pms\_types.h](pms_types-h.md) - - [poll.h](poll-h.md) - - [pthread.h](pthread-h.md) - - [parameter\_item.h](parameter_item-h.md) - - [press\_event.h](press_event-h.md) - - [registry.h](registry-h.md) - - [resource.h](resource-h.md) - - [recorder.h](recorder-h.md) - - [rtc\_if.h](rtc_if-h.md) - - [regex.h](regex-h.md) - - [root\_view.h](root_view-h.md) - - [release\_event.h](release_event-h.md) - - [rect.h](rect-h.md) - - [resolv.h](resolv-h.md) - - [sdio\_if.h](sdio_if-h.md) - - [spi\_if.h](spi_if-h.md) - - [shm.h](shm-h.md) - - [semaphore.h](semaphore-h.md) - - [signal.h](signal-h.md) - - [sys/time.h](sys-time-h.md) - - [samgr\_lite.h](samgr_lite-h.md) - - [service.h](service-h.md) - - [stdio.h](stdio-h.md) - - [select.h](select-h.md) - - [sched.h](sched-h.md) - - [source.h](source-h.md) - - [surface.h](surface-h.md) - - [surface\_buffer.h](surface_buffer-h.md) - - [surface\_type.h](surface_type-h.md) - - [stat.h](stat-h.md) - - [statfs.h](statfs-h.md) - - [statvfs.h](statvfs-h.md) - - [session.h](session-h.md) - - [search.h](search-h.md) - - [stdarg.h](stdarg-h.md) - - [stdlib.h](stdlib-h.md) - - [string.h](string-h.md) - - [strings.h](strings-h.md) - - [screen.h](screen-h.md) - - [style.h](style-h.md) - - [sys\_info.h](sys_info-h.md) - - [socket.h](socket-h.md) - - [timeb.h](timeb-h.md) - - [time.h](time-h.md) - - [task.h](task-h.md) - - [text.h](text-h.md) - - [text\_adapter.h](text_adapter-h.md) - - [theme.h](theme-h.md) - - [theme\_manager.h](theme_manager-h.md) - - [transform.h](transform-h.md) - - [uart\_if.h](uart_if-h.md) - - [utils\_config.h](utils_config-h.md) - - [uio.h](uio-h.md) - - [utime.h](utime-h.md) - - [unistd.h](unistd-h.md) - - [utsname.h](utsname-h.md) - - [ui\_abstract\_clock.h](ui_abstract_clock-h.md) - - [ui\_abstract\_progress.h](ui_abstract_progress-h.md) - - [ui\_abstract\_scroll.h](ui_abstract_scroll-h.md) - - [ui\_analog\_clock.h](ui_analog_clock-h.md) - - [ui\_arc\_label.h](ui_arc_label-h.md) - - [ui\_axis.h](ui_axis-h.md) - - [ui\_box\_progress.h](ui_box_progress-h.md) - - [ui\_button.h](ui_button-h.md) - - [ui\_canvas.h](ui_canvas-h.md) - - [ui\_chart.h](ui_chart-h.md) - - [ui\_checkbox.h](ui_checkbox-h.md) - - [ui\_circle\_progress.h](ui_circle_progress-h.md) - - [ui\_dialog.h](ui_dialog-h.md) - - [ui\_digital\_clock.h](ui_digital_clock-h.md) - - [ui\_image\_animator.h](ui_image_animator-h.md) - - [ui\_image\_view.h](ui_image_view-h.md) - - [ui\_label.h](ui_label-h.md) - - [ui\_label\_button.h](ui_label_button-h.md) - - [ui\_list.h](ui_list-h.md) - - [ui\_picker.h](ui_picker-h.md) - - [ui\_radiobutton.h](ui_radiobutton-h.md) - - [ui\_scroll\_view.h](ui_scroll_view-h.md) - - [ui\_slider.h](ui_slider-h.md) - - [ui\_surface\_view.h](ui_surface_view-h.md) - - [ui\_swipe\_view.h](ui_swipe_view-h.md) - - [ui\_texture\_mapper.h](ui_texture_mapper-h.md) - - [ui\_time\_picker.h](ui_time_picker-h.md) - - [ui\_toggle\_button.h](ui_toggle_button-h.md) - - [ui\_view.h](ui_view-h.md) - - [ui\_view\_group.h](ui_view_group-h.md) - - [ui\_dump\_dom\_tree.h](ui_dump_dom_tree-h.md) - - [ui\_screenshot.h](ui_screenshot-h.md) - - [virtual\_device\_event.h](virtual_device_event-h.md) - - [version.h](version-h.md) - - [want.h](want-h.md) - - [watchdog\_if.h](watchdog_if-h.md) - - [window.h](window-h.md) - - [wordexp.h](wordexp-h.md) - - [wait.h](wait-h.md) - - [wifi\_inc.h](wifi_inc-h.md) - - [wifi\_mac80211\_ops.h](wifi_mac80211_ops-h.md) - - [wifi\_module.h](wifi_module-h.md) - - [wifi\_module\_config.h](wifi_module_config-h.md) - - [wchar.h](wchar-h.md) - - [wctype.h](wctype-h.md) - - - [结构体](结构体.md) - - [Alginment](Alginment.md) - - [AbilityInfo](AbilityInfo.md) - - [AudioDeviceDesc](AudioDeviceDesc.md) - - [AudioTrackInfo](AudioTrackInfo.md) - - [AudioTrackSourceInfo](AudioTrackSourceInfo.md) - - [Auth](Auth.md) - - [AssocReq](AssocReq.md) - - [AssocResp](AssocResp.md) - - [AudioAdapter](AudioAdapter.md) - - [AudioAttribute](AudioAttribute.md) - - [AudioCapture](AudioCapture.md) - - [AudioControl](AudioControl.md) - - [AudioManager](AudioManager.md) - - [AudioRender](AudioRender.md) - - [AudioScene](AudioScene.md) - - [AudioPort](AudioPort.md) - - [AudioAdapterDescriptor](AudioAdapterDescriptor.md) - - [AudioDeviceDescriptor](AudioDeviceDescriptor.md) - - [AudioSceneDescriptor](AudioSceneDescriptor.md) - - [AudioSceneDescriptor::SceneDesc](AudioSceneDescriptor-SceneDesc.md) - - [AudioSampleAttributes](AudioSampleAttributes.md) - - [AudioTimeStamp](AudioTimeStamp.md) - - [AudioSubPortCapability](AudioSubPortCapability.md) - - [AudioPortCapability](AudioPortCapability.md) - - [AudioVolume](AudioVolume.md) - - [BufferHandle](BufferHandle.md) - - [BufferData](BufferData.md) - - [BundleInfo](BundleInfo.md) - - [BundleStatusCallback](BundleStatusCallback.md) - - [BufferStream](BufferStream.md) - - [Beacon](Beacon.md) - - [CodecBufferInfo](CodecBufferInfo.md) - - [Capbility](Capbility.md) - - [CodecCallback](CodecCallback.md) - - [Consumer](Consumer.md) - - [ConnetResult](ConnetResult.md) - - [ChannelDef](ChannelDef.md) - - [CryptoSettings](CryptoSettings.md) - - [CapabilityMap](CapabilityMap.md) - - [CommonDeviceInfo](CommonDeviceInfo.md) - - [DeviceInfo](DeviceInfo.md) - - [DisplayInfo](DisplayInfo.md) - - [DListHead](DListHead.md) - - [DataTrackSourceInfo](DataTrackSourceInfo.md) - - [Deauth](Deauth.md) - - [Disassoc](Disassoc.md) - - [DeviceResourceAttr](DeviceResourceAttr.md) - - [DeviceResourceNode](DeviceResourceNode.md) - - [DeviceResourceIface](DeviceResourceIface.md) - - [DeviceMap](DeviceMap.md) - - [ElementName](ElementName.md) - - [EtherHeader](EtherHeader.md) - - [Feature](Feature.md) - - [FormatBufferSetting](FormatBufferSetting.md) - - [FormatFrame](FormatFrame.md) - - [FileInfo](FileInfo.md) - - [FormatSource](FormatSource.md) - - [FormatOutputConfig](FormatOutputConfig.md) - - [FormatCallback](FormatCallback.md) - - [FTW](FTW.md) - - [GfxFuncs](GfxFuncs.md) - - [GrallocFuncs](GrallocFuncs.md) - - [GrallocBuffer](GrallocBuffer.md) - - [GfxOpt](GfxOpt.md) - - [HdfWork](HdfWork.md) - - [HdfWorkQueue](HdfWorkQueue.md) - - [HdfSBuf](HdfSBuf.md) - - [HdfDeviceObject](HdfDeviceObject.md) - - [HdfDeviceIoClient](HdfDeviceIoClient.md) - - [HdfDriverEntry](HdfDriverEntry.md) - - [HdfDevEventlistener](HdfDevEventlistener.md) - - [HdfIoDispatcher](HdfIoDispatcher.md) - - [HdfIoService](HdfIoService.md) - - [HdfObject](HdfObject.md) - - [HdfWifiProductData](HdfWifiProductData.md) - - [HdfWifiChipData](HdfWifiChipData.md) - - [InputController](InputController.md) - - [InputManager](InputManager.md) - - [IInputInterface](IInputInterface.md) - - [InputReporter](InputReporter.md) - - [InputExtraCmd](InputExtraCmd.md) - - [InputEventData](InputEventData.md) - - [InputReportEventCb](InputReportEventCb.md) - - [IClientProxy](IClientProxy.md) - - [IServerProxy](IServerProxy.md) - - [IRect](IRect.md) - - [ISurface](ISurface.md) - - [ILine](ILine.md) - - [ICircle](ICircle.md) - - [IAbilityConnection](IAbilityConnection.md) - - [InputInfo](InputInfo.md) - - [IDeviceIoService](IDeviceIoService.md) - - [IPowerEventListener](IPowerEventListener.md) - - [InstallParam](InstallParam.md) - - [IUnknown](IUnknown.md) - - [IUnknownEntry](IUnknownEntry.md) - - [Identity](Identity.md) - - [ImageTrackInfo](ImageTrackInfo.md) - - [Ieee80211Mgmt](Ieee80211Mgmt.md) - - [IpHeader](IpHeader.md) - - [IpV4Addr](IpV4Addr.md) - - [IfType](IfType.md) - - [IfReq](IfReq.md) - - [Ieee80211Channel](Ieee80211Channel.md) - - [Ieee80211Rate](Ieee80211Rate.md) - - [Ieee80211McsInfo](Ieee80211McsInfo.md) - - [Ieee80211StaHtCap](Ieee80211StaHtCap.md) - - [Ieee80211SupportedBand](Ieee80211SupportedBand.md) - - [I2cMsg](I2cMsg.md) - - [IPublishCallback](IPublishCallback.md) - - [ISessionListener](ISessionListener.md) - - [KeyParams](KeyParams.md) - - [LayerFuncs](LayerFuncs.md) - - [LayerInfo](LayerInfo.md) - - [LayerAlpha](LayerAlpha.md) - - [LayerBuffer](LayerBuffer.md) - - [MetaData](MetaData.md) - - [ModuleInfo](ModuleInfo.md) - - [MacAddress](MacAddress.md) - - [MacConfigParam](MacConfigParam.md) - - [Mac80211DisconnectParam](Mac80211DisconnectParam.md) - - [Mac80211Ssids](Mac80211Ssids.md) - - [Mac80211beaconParam](Mac80211beaconParam.md) - - [NetBuf](NetBuf.md) - - [NetBufQueue](NetBufQueue.md) - - [NetDevNotify](NetDevNotify.md) - - [NetDevice](NetDevice.md) - - [NetDeviceInterFace](NetDeviceInterFace.md) - - [OHOS::Media::CameraStateCallback](OHOS-Media-CameraStateCallback.md) - - [OHOS::Media::Camera](OHOS-Media-Camera.md) - - [OHOS::Media::PlayerCallback](OHOS-Media-PlayerCallback.md) - - [OHOS::Media::Player](OHOS-Media-Player.md) - - [OHOS::Media::Source](OHOS-Media-Source.md) - - [OHOS::Surface](OHOS-Surface.md) - - [OHOS::Ability](OHOS-Ability.md) - - [OHOS::AbilityContext](OHOS-AbilityContext.md) - - [OHOS::AbilityEventHandler](OHOS-AbilityEventHandler.md) - - [OHOS::AbilityLoader](OHOS-AbilityLoader.md) - - [OHOS::AbilitySlice](OHOS-AbilitySlice.md) - - [OHOS::RootView](OHOS-RootView.md) - - [OutputInfo](OutputInfo.md) - - [OHOS::Media::CameraConfig](OHOS-Media-CameraConfig.md) - - [OHOS::Media::FrameConfig](OHOS-Media-FrameConfig.md) - - [OHOS::Media::CameraAbility](OHOS-Media-CameraAbility.md) - - [OHOS::Media::FrameStateCallback](OHOS-Media-FrameStateCallback.md) - - [OHOS::Media::CameraDeviceCallback](OHOS-Media-CameraDeviceCallback.md) - - [OHOS::Media::CameraKit](OHOS-Media-CameraKit.md) - - [OHOS::WindowConfig](OHOS-WindowConfig.md) - - [OHOS::Window](OHOS-Window.md) - - [OHOS::Rect](OHOS-Rect.md) - - [OsalAtomic](OsalAtomic.md) - - [OsalFile](OsalFile.md) - - [OsalFirmware](OsalFirmware.md) - - [OsalFwBlock](OsalFwBlock.md) - - [OsalMutex](OsalMutex.md) - - [OsalSem](OsalSem.md) - - [OsalSpinlock](OsalSpinlock.md) - - [OsalThreadParam](OsalThreadParam.md) - - [OsalThread](OsalThread.md) - - [OsalTimespec](OsalTimespec.md) - - [OsalTimer](OsalTimer.md) - - [OHOS::Media::FormatData](OHOS-Media-FormatData.md) - - [OHOS::Media::Format](OHOS-Media-Format.md) - - [OHOS::Media::StreamCallback](OHOS-Media-StreamCallback.md) - - [OHOS::Media::StreamSource](OHOS-Media-StreamSource.md) - - [OHOS::Media::RecorderCallback](OHOS-Media-RecorderCallback.md) - - [OHOS::Media::Recorder](OHOS-Media-Recorder.md) - - [OHOS::IBufferConsumerListener](OHOS-IBufferConsumerListener.md) - - [OHOS::SurfaceBuffer](OHOS-SurfaceBuffer.md) - - [OHOS::AnimatorCallback](OHOS-AnimatorCallback.md) - - [OHOS::Animator](OHOS-Animator.md) - - [OHOS::AnimatorManager](OHOS-AnimatorManager.md) - - [OHOS::EasingEquation](OHOS-EasingEquation.md) - - [OHOS::Interpolation](OHOS-Interpolation.md) - - [OHOS::Color16](OHOS-Color16.md) - - [OHOS::Color24](OHOS-Color24.md) - - [OHOS::Color32](OHOS-Color32.md) - - [OHOS::Color](OHOS-Color.md) - - [OHOS::Image](OHOS-Image.md) - - [OHOS::Screen](OHOS-Screen.md) - - [OHOS::Task](OHOS-Task.md) - - [OHOS::Text](OHOS-Text.md) - - [OHOS::AbstractAdapter](OHOS-AbstractAdapter.md) - - [OHOS::TextAdapter](OHOS-TextAdapter.md) - - [OHOS::RootView::OnKeyActListener](OHOS-RootView-OnKeyActListener.md) - - [OHOS::RootView::OnVirtualDeviceEventListener](OHOS-RootView-OnVirtualDeviceEventListener.md) - - [OHOS::TextFormatter](OHOS-TextFormatter.md) - - [OHOS::UILabel](OHOS-UILabel.md) - - [OHOS::UIAbstractClock](OHOS-UIAbstractClock.md) - - [OHOS::UIAbstractProgress](OHOS-UIAbstractProgress.md) - - [OHOS::UIAbstractScroll](OHOS-UIAbstractScroll.md) - - [OHOS::UIAnalogClock::Hand](OHOS-UIAnalogClock-Hand.md) - - [OHOS::UIAnalogClock](OHOS-UIAnalogClock.md) - - [OHOS::UIArcLabel::ArcTextInfo](OHOS-UIArcLabel-ArcTextInfo.md) - - [OHOS::UIArcLabel](OHOS-UIArcLabel.md) - - [OHOS::UIAxis](OHOS-UIAxis.md) - - [OHOS::UIChart](OHOS-UIChart.md) - - [OHOS::UIXAxis](OHOS-UIXAxis.md) - - [OHOS::UIYAxis](OHOS-UIYAxis.md) - - [OHOS::UIBoxProgress](OHOS-UIBoxProgress.md) - - [OHOS::UIButton](OHOS-UIButton.md) - - [OHOS::Paint](OHOS-Paint.md) - - [OHOS::UICanvas::FontStyle](OHOS-UICanvas-FontStyle.md) - - [OHOS::UICanvas](OHOS-UICanvas.md) - - [OHOS::UIChartDataSerial::PointStyle](OHOS-UIChartDataSerial-PointStyle.md) - - [OHOS::UIChartDataSerial](OHOS-UIChartDataSerial.md) - - [OHOS::UIChartPillar](OHOS-UIChartPillar.md) - - [OHOS::UIChartPolyline](OHOS-UIChartPolyline.md) - - [OHOS::UICheckBox::OnChangeListener](OHOS-UICheckBox-OnChangeListener.md) - - [OHOS::UICheckBox](OHOS-UICheckBox.md) - - [OHOS::UICircleProgress](OHOS-UICircleProgress.md) - - [OHOS::UIDialog](OHOS-UIDialog.md) - - [OHOS::UIDigitalClock](OHOS-UIDigitalClock.md) - - [OHOS::ImageAnimatorInfo](OHOS-ImageAnimatorInfo.md) - - [OHOS::UIImageAnimatorView::AnimatorStopListener](OHOS-UIImageAnimatorView-AnimatorStopListener.md) - - [OHOS::UIImageAnimatorView](OHOS-UIImageAnimatorView.md) - - [OHOS::UIImageView](OHOS-UIImageView.md) - - [OHOS::UILabelButton](OHOS-UILabelButton.md) - - [OHOS::ListScrollListener](OHOS-ListScrollListener.md) - - [OHOS::UIList](OHOS-UIList.md) - - [OHOS::UIPicker::SelectedListener](OHOS-UIPicker-SelectedListener.md) - - [OHOS::UIPicker](OHOS-UIPicker.md) - - [OHOS::UIRadioButton](OHOS-UIRadioButton.md) - - [OHOS::UIRepeatButton](OHOS-UIRepeatButton.md) - - [OHOS::UIScrollView::OnScrollListener](OHOS-UIScrollView-OnScrollListener.md) - - [OHOS::UIScrollView](OHOS-UIScrollView.md) - - [OHOS::UISlider::UISliderEventListener](OHOS-UISlider-UISliderEventListener.md) - - [OHOS::UISlider](OHOS-UISlider.md) - - [OHOS::UISurfaceView](OHOS-UISurfaceView.md) - - [OHOS::UISwipeView::OnSwipeListener](OHOS-UISwipeView-OnSwipeListener.md) - - [OHOS::UISwipeView](OHOS-UISwipeView.md) - - [OHOS::UITextureMapper::AnimatorStopListener](OHOS-UITextureMapper-AnimatorStopListener.md) - - [OHOS::UITextureMapper](OHOS-UITextureMapper.md) - - [OHOS::UITimePicker::SelectedListener](OHOS-UITimePicker-SelectedListener.md) - - [OHOS::UITimePicker](OHOS-UITimePicker.md) - - [OHOS::UIToggleButton](OHOS-UIToggleButton.md) - - [OHOS::UIView::OnClickListener](OHOS-UIView-OnClickListener.md) - - [OHOS::UIView::OnLongPressListener](OHOS-UIView-OnLongPressListener.md) - - [OHOS::UIView::OnDragListener](OHOS-UIView-OnDragListener.md) - - [OHOS::UIView::OnTouchListener](OHOS-UIView-OnTouchListener.md) - - [OHOS::UIView](OHOS-UIView.md) - - [OHOS::UIViewGroup](OHOS-UIViewGroup.md) - - [OHOS::UIDumpDomTree](OHOS-UIDumpDomTree.md) - - [OHOS::CancelEvent](OHOS-CancelEvent.md) - - [OHOS::ClickEvent](OHOS-ClickEvent.md) - - [OHOS::DragEvent](OHOS-DragEvent.md) - - [OHOS::Event](OHOS-Event.md) - - [OHOS::KeyEvent](OHOS-KeyEvent.md) - - [OHOS::LongPressEvent](OHOS-LongPressEvent.md) - - [OHOS::PressEvent](OHOS-PressEvent.md) - - [OHOS::ReleaseEvent](OHOS-ReleaseEvent.md) - - [OHOS::VirtualDeviceEvent](OHOS-VirtualDeviceEvent.md) - - [OHOS::Line](OHOS-Line.md) - - [OHOS::Polygon](OHOS-Polygon.md) - - [OHOS::Vector2< T \>](OHOS-Vector2-T.md) - - [OHOS::Vector3< T \>](OHOS-Vector3-T.md) - - [OHOS::Matrix3< T \>](OHOS-Matrix3-T.md) - - [OHOS::Point](OHOS-Point.md) - - [OHOS::HeapBase](OHOS-HeapBase.md) - - [OHOS::ImageHeader](OHOS-ImageHeader.md) - - [OHOS::ImageInfo](OHOS-ImageInfo.md) - - [OHOS::FlexLayout](OHOS-FlexLayout.md) - - [OHOS::GridLayout](OHOS-GridLayout.md) - - [OHOS::Layout](OHOS-Layout.md) - - [OHOS::ListNode< T \>](OHOS-ListNode-T.md) - - [OHOS::List< T \>](OHOS-List-T.md) - - [OHOS::Style](OHOS-Style.md) - - [OHOS::StyleDefault](OHOS-StyleDefault.md) - - [OHOS::SysInfo::OnFPSChangedListener](OHOS-SysInfo-OnFPSChangedListener.md) - - [OHOS::SysInfo](OHOS-SysInfo.md) - - [OHOS::ButtonStyle](OHOS-ButtonStyle.md) - - [OHOS::Theme](OHOS-Theme.md) - - [OHOS::ThemeManager](OHOS-ThemeManager.md) - - [OHOS::TransformMap](OHOS-TransformMap.md) - - [OHOS::Audio::AudioCapturerInfo](OHOS-Audio-AudioCapturerInfo.md) - - [OHOS::Audio::Timestamp](OHOS-Audio-Timestamp.md) - - [OHOS::Audio::AudioCapturer](OHOS-Audio-AudioCapturer.md) - - [PermissionSaved](PermissionSaved.md) - - [Param](Param.md) - - [Provider](Provider.md) - - [ProgramInfo](ProgramInfo.md) - - [ParameterItem](ParameterItem.md) - - [ProbeResp](ProbeResp.md) - - [PublishInfo](PublishInfo.md) - - [Rectangle](Rectangle.md) - - [ResizableArray](ResizableArray.md) - - [Rect](Rect.md) - - [Request](Request.md) - - [Response](Response.md) - - [RtcTime](RtcTime.md) - - [RateInfo](RateInfo.md) - - [ReassocReq](ReassocReq.md) - - [ReassocResp](ReassocResp.md) - - [SdioFuncInfo](SdioFuncInfo.md) - - [SdioCommonInfo](SdioCommonInfo.md) - - [Service](Service.md) - - [SpiDevInfo](SpiDevInfo.md) - - [SpiMsg](SpiMsg.md) - - [SpiCfg](SpiCfg.md) - - [Subscriber](Subscriber.md) - - [SubscriberCallback](SubscriberCallback.md) - - [SimpleVector](SimpleVector.md) - - [SamgrLite](SamgrLite.md) - - [SubImageInfo](SubImageInfo.md) - - [SubtitleTrackInfo](SubtitleTrackInfo.md) - - [StaBssParameters](StaBssParameters.md) - - [StaFlagUpdate](StaFlagUpdate.md) - - [StationInfo](StationInfo.md) - - [ScannedBssInfo](ScannedBssInfo.md) - - [StationDelParameters](StationDelParameters.md) - - [TaskConfig](TaskConfig.md) - - [TrackInfo](TrackInfo.md) - - [TrackSource](TrackSource.md) - - [TcpHeader](TcpHeader.md) - - [UartAttribute](UartAttribute.md) - - [UdpHeader](UdpHeader.md) - - [VideoTrackInfo](VideoTrackInfo.md) - - [VideoTrackSourceInfo](VideoTrackSourceInfo.md) - - [VifParams](VifParams.md) - - [Want](Want.md) - - [Wiphy](Wiphy.md) - - [WifiSsid](WifiSsid.md) - - [WirelessDev](WirelessDev.md) - - [WifiScanRequest](WifiScanRequest.md) - - [WifiConnectParams](WifiConnectParams.md) - - [WifiMac80211Ops](WifiMac80211Ops.md) - - [WifiModuleIface](WifiModuleIface.md) - - [WifiModule](WifiModule.md) - - [WifiFeature](WifiFeature.md) - - [WifiFeatureList](WifiFeatureList.md) - - [WifiModuleConfig](WifiModuleConfig.md) - - [\_\_ucontext](__ucontext.md) - - [\_\_sigset\_t](__sigset_t.md) - - [\_\_si\_fields](__si_fields.md) - - [\_\_user\_cap\_header\_struct](__user_cap_header_struct.md) - - [\_\_user\_cap\_data\_struct](__user_cap_data_struct.md) - - [dirent](dirent.md) - - [div\_t](div_t.md) - - [entry](entry.md) - - [ether\_addr](ether_addr.md) - - [fd\_set](fd_set.md) - - [fenv\_t](fenv_t.md) - - [glob\_t](glob_t.md) - - [hsearch\_data](hsearch_data.md) - - [hostent](hostent.md) - - [itimerval](itimerval.md) - - [itimerspec](itimerspec.md) - - [imaxdiv\_t](imaxdiv_t.md) - - [ifaddrs](ifaddrs.md) - - [if\_nameindex](if_nameindex.md) - - [in\_addr](in_addr.md) - - [lconv](lconv.md) - - [ldiv\_t](ldiv_t.md) - - [lldiv\_t](lldiv_t.md) - - [mq\_attr](mq_attr.md) - - [option](option.md) - - [pollfd](pollfd.md) - - [protoent](protoent.md) - - [qelem](qelem.md) - - [shmid\_ds](shmid_ds.md) - - [shminfo](shminfo.md) - - [shm\_info](shm_info.md) - - [sem\_t](sem_t.md) - - [sigaltstack](sigaltstack.md) - - [sigval](sigval.md) - - [sigaction](sigaction.md) - - [sigevent](sigevent.md) - - [sched\_param](sched_param.md) - - [stat](stat.md) - - [statvfs](statvfs.md) - - [sockaddr](sockaddr.md) - - [timespec](timespec.md) - - [timeval](timeval.md) - - [timezone](timezone.md) - - [timeb](timeb.md) - - [tm](tm.md) - - [utimbuf](utimbuf.md) - - [wordexp\_t](wordexp_t.md) - diff --git a/api/api-SmartVision-Devices/ReassocReq.md b/api/api-SmartVision-Devices/ReassocReq.md deleted file mode 100755 index 5249f8bff70b149da8a84c7d1e69e7c98f0fc066..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/ReassocReq.md +++ /dev/null @@ -1,54 +0,0 @@ -# ReassocReq - -- [Overview](#section1874588183165636) -- [Summary](#section2000532327165636) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Defines station reassociation request. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

capabInfo

-

uint16_t

-

listenInterval

-

uint16_t

-

currentAp [6]

-

uint8_t

-

variable [0]

-

uint8_t

-
- diff --git a/api/api-SmartVision-Devices/ReassocResp.md b/api/api-SmartVision-Devices/ReassocResp.md deleted file mode 100755 index b55871792b4eef1ccbc463d679481d5afda849f5..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/ReassocResp.md +++ /dev/null @@ -1,54 +0,0 @@ -# ReassocResp - -- [Overview](#section862933215165636) -- [Summary](#section1638203099165636) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Defines station reassociation response. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

capabInfo

-

uint16_t

-

statusCode

-

uint16_t

-

aid

-

uint16_t

-

variable [0]

-

uint8_t

-
- diff --git a/api/api-SmartVision-Devices/Rect-0.md b/api/api-SmartVision-Devices/Rect-0.md deleted file mode 100755 index 3404dbfdf3a7a3d1c1fce8126cde65f942eeb990..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Rect-0.md +++ /dev/null @@ -1,59 +0,0 @@ -# Rect - -## **Overview** - -**Related Modules:** - -[Codec](Codec.md) - -**Description:** - -Defines a rectangle. - -## **Summary** - -## Data Fields - - - - - - - - - - - - -

Variable Name

-

Description

-

width

-

int32_t 

-

height

-

int32_t 

-
- -## **Details** - -## **Field Documentation** - -## height - -``` -int32_t Rect::height -``` - - **Description:** - -Height - -## width - -``` -int32_t Rect::width -``` - - **Description:** - -Width - diff --git a/api/api-SmartVision-Devices/Rect.md b/api/api-SmartVision-Devices/Rect.md deleted file mode 100755 index 63d40abacdafb2ab51b571c5c044166d1fce2cb6..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Rect.md +++ /dev/null @@ -1,68 +0,0 @@ -# Rect - -- [Overview](#section1412904234165635) -- [Summary](#section759342653165635) -- [Data Fields](#pub-attribs) -- [Details](#section385037944165635) -- [Field](#section1561413366165635) -- [height](#a27dedef86b1b4b80875a7550ba86bf96) -- [width](#aa564ffd1e8afed173a43f6fa3afb0fdf) - -## **Overview** - -**Related Modules:** - -[Codec](Codec.md) - -**Description:** - -Defines a rectangle. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

width

-

int32_t

-

height

-

int32_t

-
- -## **Details** - -## **Field ** - -## height - -``` -int32_t Rect::height -``` - - **Description:** - -Height - -## width - -``` -int32_t Rect::width -``` - - **Description:** - -Width - diff --git a/api/api-SmartVision-Devices/Rectangle.md b/api/api-SmartVision-Devices/Rectangle.md deleted file mode 100755 index d9bf7ecce33a7d38cfa8a9bc53f6572afe023b72..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Rectangle.md +++ /dev/null @@ -1,68 +0,0 @@ -# Rectangle - -- [Overview](#section1596020458165635) -- [Summary](#section303449160165635) -- [Data Fields](#pub-attribs) -- [Details](#section2146409393165635) -- [Field](#section745642698165635) -- [color](#aa0fe72e6dc477bccd7bceaf269621208) -- [rect](#a41e7dfaa14a596675f96dd125d67627f) - -## **Overview** - -**Related Modules:** - -[Display](Display.md) - -**Description:** - -Describes a rectangle to help draw rectangles in hardware acceleration. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

rect

-

IRect

-

color

-

uint32_t

-
- -## **Details** - -## **Field ** - -## color - -``` -uint32_t Rectangle::color -``` - - **Description:** - -[Rectangle](Rectangle.md) color - -## rect - -``` -[IRect](IRect.md) Rectangle::rect -``` - - **Description:** - -Bounds of a rectangle - diff --git a/api/api-SmartVision-Devices/Registry.md b/api/api-SmartVision-Devices/Registry.md deleted file mode 100755 index 3d7cb0b3b975b359b33c115c8cdfa7d5c0ad8ce3..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Registry.md +++ /dev/null @@ -1,444 +0,0 @@ -# Registry - -- [Overview](#section1024898275165625) -- [Summary](#section997159289165625) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Macros](#define-members) -- [Typedefs](#typedef-members) -- [Functions](#func-members) -- [Details](#section473233789165625) -- [Macro Definition](#section353553314165625) -- [INHERIT\_CLIENT\_IPROXY](#ga86734e6a03eb089309e87ec628002034) -- [INHERIT\_IPROXY\_ENTRY](#ga9ad9b5f0e1f50f2528cbef67957b2319) -- [INHERIT\_SERVER\_IPROXY](#ga58e6d24ef278dceb3fb9c77527acdb5c) -- [IPROXY\_END](#ga59b6c10043506af716ce9052a5a964a7) -- [SERVER\_IPROXY\_BEGIN](#ga3c3f1e77cc1a495f48a4b3cd0f8934be) -- [SERVER\_PROXY\_VER](#gad513d97bfb873f27c9b8f69a5a418d55) -- [Typedef](#section172190079165625) -- [Creator](#ga0c8aa2ef9883bd97b4f1309895adaa4c) -- [Destroyer](#ga1e6298b1246357f70ad0b581e0eb9305) -- [INotify](#ga362a17c1bda1aace88d42dcbc88bdfac) -- [Function](#section890168117165625) -- [SAMGR\_GetRemoteIdentity\(\)](#gaa9bb385bfe593f4377a83cf513189bf1) -- [SAMGR\_RegisterFactory\(\)](#ga64797e3f63201c40dbdf21b90cff23d2) - -## **Overview** - -**Description:** - -Provides APIs for registering and discovering inter-process communication \(IPC\) capabilities. - -Based on the Samgr development framework, this module helps you to develop system capabilities and implement cross-process calls. This module is used when system capabilities need to be provided across processes. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - - - - - - - -

File Name

-

Description

-

iproxy_client.h

-

Provides the client proxy class.

-

iproxy_server.h

-

Provides the server proxy.

-

registry.h

-

Provides basic APIs for remote service registration and discovery.

-
- -## Data Structures - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

IClientProxy

-

Defines the client proxy object.

-

IServerProxy

-

Defines the base class of the server proxy object.

-
- -## Macros - - - - - - - - - - - - - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

INHERIT_CLIENT_IPROXY

-

Indicates the inherited macro of the client proxy.

-

INHERIT_IPROXY_ENTRY(T) INHERIT_IUNKNOWNENTRY(T)

-

Inherits the server proxy class.

-

IPROXY_END IUNKNOWN_ENTRY_END

-

Defines the end of the default initialization for the server proxy class.

-

SERVER_PROXY_VER 0x80

-

Defines the default version number of the server proxy.

-

INHERIT_SERVER_IPROXY

-

Inherits the server proxy function.

-

SERVER_IPROXY_BEGIN IUNKNOWN_ENTRY_BEGIN(SERVER_PROXY_VER)

-

Defines the beginning of the default initialization for the server proxy class.

-
- -## Typedefs - - - - - - - - - - - - - - - - -

Typedef Name

-

Description

-

INotify) (IOwner owner, int code, IpcIo *reply)

-

typedef int(*

-

Called when a client request is responded.

-

Creator) (const char *service, const char *feature, uint32 size)

-

typedef void *(*

-

Indicates the creator of the customized client proxy.

-

Destroyer) (const char *service, const char *feature, void *iproxy)

-

typedef void(*

-

Indicates the destroyer of the customized client proxy.

-
- -## Functions - - - - - - - - - - - - - -

Function

-

Description

-

SAMGR_GetRemoteIdentity (const char *service, const char *feature)

-

SvcIdentity

-

Obtains the IPC address of a remote service and feature based on the service name and feature name.

-

SAMGR_RegisterFactory (const char *service, const char *feature, Creator creator, Destroyer destroyer)

-

int

-

Registers the factory method of the client proxy object with the Samgr.

-
- -## **Details** - -## **Macro Definition ** - -## INHERIT\_CLIENT\_IPROXY - -``` -#define INHERIT_CLIENT_IPROXY -``` - -``` -Values: [INHERIT_IUNKNOWN](Samgr.md#gab74532a22d6993d0ffc014d36253397f); \ - - int (*Invoke)([IClientProxy](IClientProxy.md) *proxy, int funcId, IpcIo *request, IOwner owner, [INotify](Registry.md#ga362a17c1bda1aace88d42dcbc88bdfac) notify) - - -``` - - **Description:** - -Indicates the inherited macro of the client proxy. - -This constant is used when a client proxy needs to be customized or generated by a tool. - -## INHERIT\_IPROXY\_ENTRY - -``` -#define INHERIT_IPROXY_ENTRY( T) [INHERIT_IUNKNOWNENTRY](Samgr.md#gad6324fd90dd636180efa2a59b377e65c)(T) -``` - - **Description:** - -Inherits the server proxy class. - -When the server provides cross-process system capabilities, it uses **INHERIT\_IPROXY\_ENTRY** to define the server proxy class. - -## INHERIT\_SERVER\_IPROXY - -``` -#define INHERIT_SERVER_IPROXY -``` - -``` -Values: [INHERIT_IUNKNOWN](Samgr.md#gab74532a22d6993d0ffc014d36253397f); \ - - int32 (*Invoke)([IServerProxy](IServerProxy.md) *iProxy, int funcId, void *origin, IpcIo *req, IpcIo *reply) - - -``` - - **Description:** - -Inherits the server proxy function. - -When the server provides cross-process system capabilities, it uses **INHERIT\_SERVER\_IPROXY** to define the server proxy function. - -## IPROXY\_END - -``` -#define IPROXY_END [IUNKNOWN_ENTRY_END](Samgr.md#ga4ef734474ece49aa938d8ebd5b54bdb3) -``` - - **Description:** - -Defines the end of the default initialization for the server proxy class. - -This macro is used for developing the server proxy class. You can inherit this macro to reduce the code amount and prevent class definition inconsistency. - -## SERVER\_IPROXY\_BEGIN - -``` -#define SERVER_IPROXY_BEGIN [IUNKNOWN_ENTRY_BEGIN](Samgr.md#ga52ec6b5b03d56b0dfe7277785246bda1)([SERVER_PROXY_VER](Registry.md#gad513d97bfb873f27c9b8f69a5a418d55)) -``` - - **Description:** - -Defines the beginning of the default initialization for the server proxy class. - -This macro is used for developing the server proxy class. You can inherit this macro to reduce the code amount and prevent class definition inconsistency. - -## SERVER\_PROXY\_VER - -``` -#define SERVER_PROXY_VER 0x80 -``` - - **Description:** - -Defines the default version number of the server proxy. - -The cross-process system capabilities are registered when Samgr uses **SERVER\_PROXY\_VER** to query the registered server proxy. - -## **Typedef ** - -## Creator - -``` -typedef void*(* Creator) (const char *service, const char *feature, uint32 size) -``` - - **Description:** - -Indicates the creator of the customized client proxy. - -This macro creates a local client proxy for remote service APIs. If you want to call the remote APIs in the way that local APIs are called, implement this macro to encapsulate serialized data into the proxy. The system automatically calls this macro when creating a proxy object. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
serviceIndicates the pointer to the name of the service to which the function belongs.
featureIndicates the pointer to the name of the feature to which the function belongs.
sizeIndicates the size of the head to be added when a client proxy is created. The required memory capacity is the head size plus the object size.
- -**Returns:** - -void \* Returns the applied memory capacity and initialize the memory for the client proxy. - -## Destroyer - -``` -typedef void(* Destroyer) (const char *service, const char *feature, void *iproxy) -``` - - **Description:** - -Indicates the destroyer of the customized client proxy. - -This macro destroys local client proxy for remote service APIs. If you want to call the remote APIs in the way that local APIs are called, implement this macro to encapsulate serialized data into the proxy. The system automatically calls this macro when destroying a proxy object. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
serviceIndicates the pointer to the name of the service to which the function belongs.
featureIndicates the pointer to the name of the feature to which the function belongs.
iproxyIndicates the pointer to the start address of the memory that is applied by Creator.
- -## INotify - -``` -typedef int(* INotify) (IOwner owner, int code, IpcIo *reply) -``` - - **Description:** - -Called when a client request is responded. - -The client implements this **INotify** callback to receive response data from the server. **owner** indicates the client proxy that receives the response data; **code** indicates the error code of the response data from the server; **reply** indicates the response data. - -## **Function ** - -## SAMGR\_GetRemoteIdentity\(\) - -``` -SvcIdentity SAMGR_GetRemoteIdentity (const char * service, const char * feature ) -``` - - **Description:** - -Obtains the IPC address of a remote service and feature based on the service name and feature name. - -This function is used when [IClientProxy](IClientProxy.md) cannot meet your requirements for calling IPCs. For example, if you need to receive the death notification of a remote service or feature, you can call this function to obtain the address of the remote service or feature and subscribe to the death notification from the IPC. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
serviceIndicates the pointer to the name of the remote service.
featureIndicates the pointer to the name of the remote feature.
- -**Returns:** - -Returns the IPC address of the remote service or feature. When the handle of the obtained address structure **SvcIdentity** is **0xFFFFFFFF**, the address is invalid. - -**Attention:** - -This function can be called only after **GetFeatureApi** in [SamgrLite](SamgrLite.md) is successfully called. Otherwise, an invalid address is returned. When the service or feature does not support IPC communication, an invalid address will be returned. - -## SAMGR\_RegisterFactory\(\) - -``` -int SAMGR_RegisterFactory (const char * service, const char * feature, [Creator](Registry.md#ga0c8aa2ef9883bd97b4f1309895adaa4c) creator, [Destroyer](Registry.md#ga1e6298b1246357f70ad0b581e0eb9305) destroyer ) -``` - - **Description:** - -Registers the factory method of the client proxy object with the Samgr. - -If you want to call the remote APIs in the way that local APIs are called, implement this function to encapsulate serialized data into the proxy. During system initialization, the module that uses the remote proxy calls the function as required. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
serviceIndicates the pointer to the service name of the client proxy.
featureIndicates the pointer to the feature name of the client proxy.
creatorIndicates the Creator function of the client proxy.
destroyerIndicates the Destroyer function of the client proxy.
- -**Returns:** - -Returns **EC\_SUCCESS** if the registration is successful; returns other error codes if the registration fails. - diff --git a/api/api-SmartVision-Devices/Request.md b/api/api-SmartVision-Devices/Request.md deleted file mode 100755 index 39fa17f8c802f2831b6037a2cdcee3c41b13f312..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Request.md +++ /dev/null @@ -1,102 +0,0 @@ -# Request - -- [Overview](#section1389605876165635) -- [Summary](#section2143216301165635) -- [Data Fields](#pub-attribs) -- [Details](#section1637798787165635) -- [Field](#section459350412165635) -- [data](#a04b0cc187654cc20a1d036917bcad878) -- [len](#a4fd475107279d3cc090d7a383719ab3d) -- [msgId](#a3449d55dccf5271f417df1450bac652e) -- [msgValue](#ae26e2e2c6d456140217167550372a5bd) - -## **Overview** - -**Related Modules:** - -[Samgr](Samgr.md) - -**Description:** - -Defines a request. - -You can use this structure to define the request that will be sent to a feature through the asynchronous function of [IUnknown](IUnknown.md). [Request](Request.md), which is data that is packed to send to a feature. If the data is not empty and the length is not 0, the system automatically releases the data. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

msgId

-

int16

-

len

-

int16

-

data

-

void *

-

msgValue

-

uint32

-
- -## **Details** - -## **Field ** - -## data - -``` -void* Request::data -``` - - **Description:** - -Data content - -## len - -``` -int16 Request::len -``` - - **Description:** - -Data length - -## msgId - -``` -int16 Request::msgId -``` - - **Description:** - -Message ID - -## msgValue - -``` -uint32 Request::msgValue -``` - - **Description:** - -Message value, which is defined by developers - diff --git a/api/api-SmartVision-Devices/ResizableArray.md b/api/api-SmartVision-Devices/ResizableArray.md deleted file mode 100755 index d4b391c27f5bcb5e2cb3de3cbed8b8876d6795e1..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/ResizableArray.md +++ /dev/null @@ -1,68 +0,0 @@ -# ResizableArray - -- [Overview](#section913156862165635) -- [Summary](#section1394600722165635) -- [Data Fields](#pub-attribs) -- [Details](#section1873355070165635) -- [Field](#section880674006165635) -- [actualLen](#a864822557f8d07f467d94fefd787d92a) -- [element](#ab3aa1ba4f0d61e21e944b03c4a588b90) - -## **Overview** - -**Related Modules:** - -[Codec](Codec.md) - -**Description:** - -Defines a variable-length queue. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

element [ELEMENT_MAX_LEN]

-

uint32_t

-

actualLen

-

uint32_t

-
- -## **Details** - -## **Field ** - -## actualLen - -``` -uint32_t ResizableArray::actualLen -``` - - **Description:** - -Number of actual parameters - -## element - -``` -uint32_t ResizableArray::element[[ELEMENT_MAX_LEN](Codec.md#gab34cc95c32c06b8d63cfbe62247eb6e2)] -``` - - **Description:** - -Array of reserved parameters - diff --git a/api/api-SmartVision-Devices/Response.md b/api/api-SmartVision-Devices/Response.md deleted file mode 100755 index 941af816343584b322e40632bbea74b63354f7e7..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Response.md +++ /dev/null @@ -1,70 +0,0 @@ -# Response - -- [Overview](#section1975332424165636) -- [Summary](#section11301928165636) -- [Data Fields](#pub-attribs) -- [Details](#section1445460175165636) -- [Field](#section2144347466165636) -- [data](#a771bd5a2dd1f2d8be9928af7c0fe37a0) -- [len](#a7a20e7a28a2be1427111d8f03828bb7e) - -## **Overview** - -**Related Modules:** - -[Samgr](Samgr.md) - -**Description:** - -Defines a response. - -This structure is used to send a response after the message processing function of a service or feature processes a request. If the data is not empty and the length is not 0, the system automatically releases the data. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

data

-

void *

-

len

-

int16

-
- -## **Details** - -## **Field ** - -## data - -``` -void* Response::data -``` - - **Description:** - -Data content - -## len - -``` -int16 Response::len -``` - - **Description:** - -Data length - diff --git a/api/api-SmartVision-Devices/RootView.md b/api/api-SmartVision-Devices/RootView.md deleted file mode 100755 index ab335ed1127c35c83b1df533565c4c4de09c4a5a..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/RootView.md +++ /dev/null @@ -1,752 +0,0 @@ -# RootView - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines the functions related to a root view which contains its child views and represents the root node in a tree structure. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Structures - - - - - - - - - - - - -

Data Structure Name

-

Description

-

OnKeyActListener

-

Represents the listener for monitoring physical key events.

-

OnVirtualDeviceEventListener

-

Listens for the input events triggered by a virtual device other than human touching or physical pressing.

-
- -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Member Function Name

-

Description

-

GetViewType () const override

-

UIViewType 

-

Obtains the view type.

-

OnKeyEvent (const KeyEvent &event)

-

virtual void 

-

Executes a physical key event.

-

SetOnKeyActListener (OnKeyActListener *onKeyActListener)

-

void 

-

Sets the listener that contains a callback to be invoked upon a physical key event.

-

ClearOnKeyActListener ()

-

void 

-

Clears the listener for monitoring physical key events.

-

OnVirtualDeviceEvent (const VirtualDeviceEvent &event)

-

virtual void 

-

Executes an input event triggered by a virtual device.

-

SetOnVirtualDeviceEventListener (OnVirtualDeviceEventListener *onVirtualDeviceEventListener)

-

void 

-

Sets a listener for monitoring the input events of a virtual device.

-

ClearOnVirtualDeviceEventListener ()

-

void 

-

Clears the listener for monitoring the input events of a virtual device.

-

UIViewGroup ()

-

 

-

A default constructor used to create a UIViewGroup instance.

-

~UIViewGroup ()

-

virtual 

-

A destructor used to delete the UIViewGroup instance.

-

GetViewType () const override

-

UIViewType 

-

Obtains the view type.

-

Add (UIView *view)

-

virtual void 

-

Adds a child view.

-

Insert (UIView *prevView, UIView *insertView)

-

virtual void 

-

Inserts a new child view behind the current one.

-

Remove (UIView *view)

-

virtual void 

-

Removes a child view.

-

RemoveAll ()

-

virtual void 

-

Removes all child views.

-

GetTargetView (const Point &point, UIView **last) override

-

virtual void 

-

Obtains the target child view that is visible and can respond to touch events based on given coordinates.

-

MoveChildByOffset (int16_t x, int16_t y)

-

virtual void 

-

Moves all child views.

-

GetChildrenHead () const

-

UIView

-

Obtains the first child view in this view group.

-

GetChildrenTail () const

-

UIView

-

Obtains the last child view in this view group.

-

SetDisallowIntercept (bool flag)

-

void 

-

Sets whether this view group is intercepted upon touch events.

-

GetChildById (const char *id) const override

-

UIView

-

Obtains the target child view with a specified ID.

-

SetAutoSize (bool state)

-

void 

-

Sets whether the size of this view group is adaptive to that of all child views.

-

UIView ()

-

 

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

 

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual 

-

A destructor used to delete the UIView instance.

-

OnPreDraw (const Rect &invalidatedArea)

-

virtual bool 

-

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

-

OnDraw (const Rect &invalidatedArea)

-

virtual void 

-

Called when a view is drawn.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void 

-

Called after a view is drawn.

-

ReMeasure ()

-

virtual void 

-

Remeasures the view size.

-

Invalidate ()

-

void 

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void 

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool 

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool 

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool 

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool 

-

Called when the view stops dragging.

-

OnClickEvent (const ClickEvent &event)

-

virtual void 

-

Called when the view is clicked.

-

OnPressEvent (const PressEvent &event)

-

virtual void 

-

Called when the view is pressed.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void 

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void 

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void 

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *& 

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void 

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *& 

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void 

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *& 

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void 

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *& 

-

Obtains the touch event listener for the view.

-

SetParent (UIView *parent)

-

void 

-

Sets the parent view for the view.

-

GetParent () const

-

UIView

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void 

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void 

-

Sets whether the view is visible.

-

IsVisible () const

-

bool 

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void 

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool 

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void 

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool 

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void 

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool 

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect 

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect 

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect 

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect 

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect 

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect 

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void 

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

SetWidth (int16_t width)

-

virtual void 

-

Sets the width for the view.

-

GetWidth ()

-

virtual int16_t 

-

Obtains the width for the view.

-

SetHeight (int16_t height)

-

virtual void 

-

Sets the height for the view.

-

GetHeight ()

-

virtual int16_t 

-

Obtains the height for the view.

-

Resize (int16_t width, int16_t height)

-

virtual void 

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void 

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t 

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void 

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t 

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void 

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void 

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool 

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void 

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void 

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap

-

Obtains an affine transformation matrix.

-

SetViewId (const char *id)

-

void 

-

Sets the view ID.

-

GetViewId () const

-

const char * 

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void 

-

Sets the view index.

-

GetViewIndex () const

-

int16_t 

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void 

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void 

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void 

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void 

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void 

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void 

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void 

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void 

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void 

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void 

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void 

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void 

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void 

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void 

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void 

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void 

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

virtual void 

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void 

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t 

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style & 

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-
- -## Static Public Member Functions - - - - - - - - - - - - -

Static Public Member Function Name

-

Description

-

GetInstance ()

-

static RootView

-

Obtains a singleton RootView instance.

-

FindSubView (const UIView &parentView, const UIView *subView)

-

static bool 

-

Checks whether the target view is one of the child views of the specified parent view.

-
- -## Additional Inherited Members - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Additional Inherited Member Name

-

Description

-

GetAllChildRelativeRect () const

-

Obtains the rectangle area of a new view group after being adaptive to the size of all child views.

-

OnChildChanged ()

-

Performs operations needed after a child view is added or removed.

-

childrenHead_

-

Indicates the pointer to the first child view of this view group.

-

childrenTail_

-

Indicates the pointer to the last child view of this view group.

-

childrenNum_

-

Represents the number of child views.

-

isDragging_

-

Specifies the sliding state of this view group.

-

disallowIntercept_

-

Specifies whether this view group is intercepted upon touch events.

-

isAutoSize_

-

Specifies whether the size of this view group is adaptive to that of all child views.

-
- diff --git a/api/api-SmartVision-Devices/RtcTime.md b/api/api-SmartVision-Devices/RtcTime.md deleted file mode 100755 index 03517b60ea5297ec8be571bf8bce90586f4a6700..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/RtcTime.md +++ /dev/null @@ -1,166 +0,0 @@ -# RtcTime - -- [Overview](#section1920620469165636) -- [Summary](#section702724698165636) -- [Data Fields](#pub-attribs) -- [Details](#section43113685165636) -- [Field](#section618246028165636) -- [day](#aad7e09d86beed6186b75ce2f1361f20b) -- [hour](#a0dc9482d29a4b61184b281b766b0ff89) -- [millisecond](#afbfa636802d9e4e3b8502d4619ed771f) -- [minute](#a990d7d066bc918d0b2f19162deb1845f) -- [month](#a527b18b3a0b709966d04106f0a5aed78) -- [second](#a8d7d49086d28faf2f700c45aab23c58b) -- [weekday](#aae45834a39c6b4a03dc85da72298b37e) -- [year](#a7781f6e9f083f7f24aa359651eadd19b) - -## **Overview** - -**Related Modules:** - -[RTC](RTC.md) - -**Description:** - -Defines the RTC information. - -The RTC information includes the year, month, day, day of the week, hour, minute, second, and millisecond. The start time is 1970/01/01 Thursday 00:00:00 \(UTC\). - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

second

-

uint8_t

-

minute

-

uint8_t

-

hour

-

uint8_t

-

day

-

uint8_t

-

weekday

-

uint8_t

-

month

-

uint8_t

-

year

-

uint16_t

-

millisecond

-

uint16_t

-
- -## **Details** - -## **Field ** - -## day - -``` -uint8_t RtcTime::day -``` - - **Description:** - -Day. The value ranges from 1 to 31. - -## hour - -``` -uint8_t RtcTime::hour -``` - - **Description:** - -Hour. The value ranges from 0 to 23. - -## millisecond - -``` -uint16_t RtcTime::millisecond -``` - - **Description:** - -Millisecond. The value ranges from 0 to 990, with a precision of 10 milliseconds. - -## minute - -``` -uint8_t RtcTime::minute -``` - - **Description:** - -Minute. The value ranges from 0 to 59. - -## month - -``` -uint8_t RtcTime::month -``` - - **Description:** - -Month. The value ranges from 1 to 12. - -## second - -``` -uint8_t RtcTime::second -``` - - **Description:** - -Second. The value ranges from 0 to 59. - -## weekday - -``` -uint8_t RtcTime::weekday -``` - - **Description:** - -Day of the week. The value ranges from 1 to 7, representing Monday to Sunday. - -## year - -``` -uint16_t RtcTime::year -``` - - **Description:** - -Year. The value is greater than or equal to 1970. - diff --git a/api/api-SmartVision-Devices/SDIO.md b/api/api-SmartVision-Devices/SDIO.md deleted file mode 100755 index db2cf00a3f2a6b6a4c373d26e5f3faf55ad79c70..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/SDIO.md +++ /dev/null @@ -1,941 +0,0 @@ -# SDIO - -- [Overview](#section574200451165623) -- [Summary](#section377336368165623) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Typedefs](#typedef-members) -- [Enumerations](#enum-members) -- [Functions](#func-members) -- [Details](#section537442735165623) -- [Typedef](#section1323710923165623) -- [SdioIrqHandler](#ga858bec274683a4f50d53d1f9f43d204b) -- [Enumeration Type](#section811257175165623) -- [SdioCommonInfoType](#ga4037437ac001a9848dd242e8aa632678) -- [Function](#section1893104624165623) -- [SdioClaimHost\(\)](#ga19b0ab843f82c367ce211b794371ef00) -- [SdioClaimIrq\(\)](#ga690a939e327e8c5cd5186e08b1b42506) -- [SdioClose\(\)](#ga2e94ff04073420086e1453f125703ec7) -- [SdioDisableFunc\(\)](#ga24a4ebbf4cbad86548feb97da46549c3) -- [SdioEnableFunc\(\)](#gae67329c260a546d7d92eb42adf5f4a5a) -- [SdioFlushData\(\)](#gad402b23097456f1116d1ac941b0f9787) -- [SdioGetCommonInfo\(\)](#ga1289cc512ba56e3e904204c15d8ae23d) -- [SdioOpen\(\)](#ga8156d7f64d72145312d92e33a532ebfd) -- [SdioReadBytes\(\)](#ga14752ccc5cea77cfe30cfa9ab189815f) -- [SdioReadBytesFromFixedAddr\(\)](#gabc1645bc8ab9068a13ae501efdb4a9fc) -- [SdioReadBytesFromFunc0\(\)](#ga52d8f25705aef184f501528faac8eaa5) -- [SdioReleaseHost\(\)](#ga8645ddd7f46ae24b0476f29b281e6ebf) -- [SdioReleaseIrq\(\)](#gad5e826a7ff8c15d9b46b74db2dcf9243) -- [SdioSetBlockSize\(\)](#ga4a91f3d668b99b22b3263241329ceb51) -- [SdioSetCommonInfo\(\)](#ga6a8eb2f6413c4685f92236dd1c8083dc) -- [SdioWriteBytes\(\)](#gaa4df7c3e2cde82f5cb7255561b99cc74) -- [SdioWriteBytesToFixedAddr\(\)](#ga82d6b3047bd694cdbdfb0a3711797c7b) -- [SdioWriteBytesToFunc0\(\)](#ga8606506dfdcb34a83f404d13c7128d5f) - -## **Overview** - -**Description:** - -Declares standard APIs of basic secure digital input and output \(SDIO\) capabilities. - -You can use this module to access the SDIO and enable the driver to operate an SDIO-compliant device. These capabilities include reading and writing data based on SDIO, setting the block size, applying for and releasing interrupts, enabling and disabling devices, and occupying and releasing the bus. - -**Since:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - -

File Name

-

Description

-

sdio_if.h

-

Declares the standard SDIO APIs.

-
- -## Data Structures - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

SdioFuncInfo

-

Defines the SDIO capabilities.

-

SdioCommonInfo

-

Defines SDIO common information.

-
- -## Typedefs - - - - - - - - - - -

Typedef Name

-

Description

-

SdioIrqHandler(void *)

-

typedef void

-

Defines the function type of an SDIO IRQ.

-
- -## Enumerations - - - - - - - - - - -

Enumeration Name

-

Description

-

SdioCommonInfoType { SDIO_FUNC_INFO = 0, SDIO_OTHER_INFO }

-

Enumerates SDIO common information types.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

SdioOpen (int16_t busNum)

-

DevHandle

-

Opens an SDIO controller with a specified bus number.

-

SdioClose (DevHandle handle)

-

void

-

Closes an SDIO controller.

-

SdioReadBytes (DevHandle handle, uint8_t *data, uint32_t addr, uint32_t size, uint32_t timeOut)

-

int32_t

-

Incrementally reads a given length of data from the specified SDIO address.

-

SdioWriteBytes (DevHandle handle, uint8_t *data, uint32_t addr, uint32_t size, uint32_t timeOut)

-

int32_t

-

Incrementally writes a given length of data into the specified SDIO address.

-

SdioReadBytesFromFixedAddr (DevHandle handle, uint8_t *data, uint32_t addr, uint32_t size, uint32_t timeOut)

-

int32_t

-

Reads a given length of data from the fixed SDIO address.

-

SdioWriteBytesToFixedAddr (DevHandle handle, uint8_t *data, uint32_t addr, uint32_t size, uint32_t timeOut)

-

int32_t

-

Writes a given length of data into the fixed SDIO address.

-

SdioReadBytesFromFunc0 (DevHandle handle, uint8_t *data, uint32_t addr, uint32_t size, uint32_t timeOut)

-

int32_t

-

Reads a given length of data from the address space of SDIO function 0.

-

SdioWriteBytesToFunc0 (DevHandle handle, uint8_t *data, uint32_t addr, uint32_t size, uint32_t timeOut)

-

int32_t

-

Writes a given length of data into the address space of SDIO function 0.

-

SdioSetBlockSize (DevHandle handle, uint32_t blockSize)

-

int32_t

-

Sets the block size.

-

SdioGetCommonInfo (DevHandle handle, SdioCommonInfo *info, SdioCommonInfoType infoType)

-

int32_t

-

Obtains common information.

-

SdioSetCommonInfo (DevHandle handle, SdioCommonInfo *info, SdioCommonInfoType infoType)

-

int32_t

-

Sets common information.

-

SdioFlushData (DevHandle handle)

-

int32_t

-

Flushes data.

-

SdioClaimHost (DevHandle handle)

-

void

-

Claims a host exclusively.

-

SdioReleaseHost (DevHandle handle)

-

void

-

Releases the exclusively claimed host.

-

SdioEnableFunc (DevHandle handle)

-

int32_t

-

Enables the SDIO device so that its register can be accessed.

-

SdioDisableFunc (DevHandle handle)

-

int32_t

-

Disables the SDIO device.

-

SdioClaimIrq (DevHandle handle, SdioIrqHandler *irqHandler)

-

int32_t

-

Claims an SDIO IRQ.

-

SdioReleaseIrq (DevHandle handle)

-

int32_t

-

Releases an SDIO IRQ.

-
- -## **Details** - -## **Typedef ** - -## SdioIrqHandler - -``` -typedef void SdioIrqHandler(void *) -``` - - **Description:** - -Defines the function type of an SDIO IRQ. - -This function is registered when you call [SdioClaimIrq](SDIO.md#ga690a939e327e8c5cd5186e08b1b42506) to request the SDIO IRQ. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
dataIndicates the private data passed to this IRQ (The data is specified when the IRQ is registered).
- -## **Enumeration Type ** - -## SdioCommonInfoType - -``` -enum [SdioCommonInfoType](SDIO.md#ga4037437ac001a9848dd242e8aa632678) -``` - - **Description:** - -Enumerates SDIO common information types. - -When obtaining SDIO common information by calling [SdioGetCommonInfo](SDIO.md#ga1289cc512ba56e3e904204c15d8ae23d) or setting the information by calling [SdioSetCommonInfo](SDIO.md#ga6a8eb2f6413c4685f92236dd1c8083dc), you need to pass the information type. - - - - - - - - - - - - - -

Enumerator

-

Description

-
SDIO_FUNC_INFO

Functionality information

-
SDIO_OTHER_INFO

Other information

-
- -## **Function ** - -## SdioClaimHost\(\) - -``` -void SdioClaimHost ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle) -``` - - **Description:** - -Claims a host exclusively. - -You can call this function to enable the SDIO module to exclusively claim a host and then perform operations on the devices connected to the host. After performing required operations, release the host by calling [SdioReleaseHost](SDIO.md#ga8645ddd7f46ae24b0476f29b281e6ebf). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the device handle of the SDIO controller obtained by SdioOpen.
- -## SdioClaimIrq\(\) - -``` -int32_t SdioClaimIrq ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle, [SdioIrqHandler](SDIO.md#ga858bec274683a4f50d53d1f9f43d204b) * irqHandler ) -``` - - **Description:** - -Claims an SDIO IRQ. - -When there is data, commands, or events, the IRQ function is executed. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the device handle of the SDIO controller obtained by SdioOpen.
irqHandlerIndicates the pointer to the SDIO IRQ function. For details, see SdioIrqHandler.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value if the operation fails. - -## SdioClose\(\) - -``` -void SdioClose ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle) -``` - - **Description:** - -Closes an SDIO controller. - -After the SDIO interface is used, you can close the SDIO controller by calling [SdioClose](SDIO.md#ga2e94ff04073420086e1453f125703ec7). This function is used in pair with [SdioOpen](SDIO.md#ga8156d7f64d72145312d92e33a532ebfd). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the device handle of the SDIO controller.
- -## SdioDisableFunc\(\) - -``` -int32_t SdioDisableFunc ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle) -``` - - **Description:** - -Disables the SDIO device. - -This function is used in pair with [SdioEnableFunc](SDIO.md#gae67329c260a546d7d92eb42adf5f4a5a). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the device handle of the SDIO controller obtained by SdioOpen.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value if the operation fails. - -## SdioEnableFunc\(\) - -``` -int32_t SdioEnableFunc ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle) -``` - - **Description:** - -Enables the SDIO device so that its register can be accessed. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the device handle of the SDIO controller obtained by SdioOpen.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value if the operation fails. - -## SdioFlushData\(\) - -``` -int32_t SdioFlushData ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle) -``` - - **Description:** - -Flushes data. - -You can call this function when an SDIO needs to be reinitialized or an unexpected error occurs. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the device handle of the SDIO controller obtained by SdioOpen.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value if the operation fails. - -## SdioGetCommonInfo\(\) - -``` -int32_t SdioGetCommonInfo ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle, [SdioCommonInfo](SdioCommonInfo.md) * info, [SdioCommonInfoType](SDIO.md#ga4037437ac001a9848dd242e8aa632678) infoType ) -``` - - **Description:** - -Obtains common information. - -You can call this function to obtain the capabilities and private data of the I/O function. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the device handle of the SDIO controller obtained by SdioOpen.
infoIndicates the pointer to the common information to be obtained. For details, see SdioCommonInfo.
infoTypeIndicates the type of the common information to be obtained. For details, see SdioCommonInfoType.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value if the operation fails. - -## SdioOpen\(\) - -``` -[DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) SdioOpen (int16_t busNum) -``` - - **Description:** - -Opens an SDIO controller with a specified bus number. - -Before using the SDIO interface, you can obtain the device handle of the SDIO controller by calling [SdioOpen](SDIO.md#ga8156d7f64d72145312d92e33a532ebfd). This function is used in pair with [SdioClose](SDIO.md#ga2e94ff04073420086e1453f125703ec7). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
busNumIndicates the bus number.
- -**Returns:** - -Returns the device handle [DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) of the SDIO controller if the operation is successful; returns **NULL** otherwise. - -## SdioReadBytes\(\) - -``` -int32_t SdioReadBytes ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle, uint8_t * data, uint32_t addr, uint32_t size, uint32_t timeOut ) -``` - - **Description:** - -Incrementally reads a given length of data from the specified SDIO address. - -If the length of the data to read is greater than the size of a block, the data is read by block, and the remaining data that is smaller than one block is read by byte. Otherwise, data is read by byte. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the device handle of the SDIO controller obtained by SdioOpen.
dataIndicates the pointer to the data to read.
addrIndicates the start address of the data to read.
sizeIndicates the length of the data to read.
timeOutIndicates the timeout duration for reading data, in milliseconds. If the value is 0,the default value is used. The default value varies according to the application. Generally, the default value is 1 second.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value if the operation fails. - -## SdioReadBytesFromFixedAddr\(\) - -``` -int32_t SdioReadBytesFromFixedAddr ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle, uint8_t * data, uint32_t addr, uint32_t size, uint32_t timeOut ) -``` - - **Description:** - -Reads a given length of data from the fixed SDIO address. - -If the length of the data to read is greater than the size of a block, the data is read by block, and the remaining data that is smaller than one block is read by byte. Otherwise, data is read by byte. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the device handle of the SDIO controller obtained by SdioOpen.
dataIndicates the pointer to the data to read.
addrIndicates the fixed address of the data to read.
sizeIndicates the length of the data to read.
timeOutIndicates the timeout duration for reading data, in milliseconds. If the value is 0, the default value is used. The default value varies according to the application. Generally, the default value is 1 second.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value if the operation fails. - -## SdioReadBytesFromFunc0\(\) - -``` -int32_t SdioReadBytesFromFunc0 ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle, uint8_t * data, uint32_t addr, uint32_t size, uint32_t timeOut ) -``` - - **Description:** - -Reads a given length of data from the address space of SDIO function 0. - -Currently, only one byte of data can be read. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the device handle of the SDIO controller obtained by SdioOpen.
dataIndicates the pointer to the data to read.
addrIndicates the start address of the data to read.
sizeIndicates the length of the data to read.
timeOutIndicates the timeout duration for reading data, in milliseconds. If the value is 0, the default value is used. The default value varies according to the application. Generally, the default value is 1 second.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value if the operation fails. - -## SdioReleaseHost\(\) - -``` -void SdioReleaseHost ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle) -``` - - **Description:** - -Releases the exclusively claimed host. - -This function is used in pair with [SdioClaimHost](SDIO.md#ga19b0ab843f82c367ce211b794371ef00). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the device handle of the SDIO controller obtained by SdioOpen.
- -## SdioReleaseIrq\(\) - -``` -int32_t SdioReleaseIrq ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle) -``` - - **Description:** - -Releases an SDIO IRQ. - -This function is used in pair with [SdioClaimIrq](SDIO.md#ga690a939e327e8c5cd5186e08b1b42506). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the device handle of the SDIO controller obtained by SdioOpen.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value if the operation fails. - -## SdioSetBlockSize\(\) - -``` -int32_t SdioSetBlockSize ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle, uint32_t blockSize ) -``` - - **Description:** - -Sets the block size. - -If data to read or write is performed, use this function to set the block size. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the device handle of the SDIO controller obtained by SdioOpen.
blockSizeIndicates the block size to be set. If the value is 0, the default value is used. The value ranges from 1 to 2048 bytes.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value if the operation fails. - -## SdioSetCommonInfo\(\) - -``` -int32_t SdioSetCommonInfo ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle, [SdioCommonInfo](SdioCommonInfo.md) * info, [SdioCommonInfoType](SDIO.md#ga4037437ac001a9848dd242e8aa632678) infoType ) -``` - - **Description:** - -Sets common information. - -You can call this function to set the maximum timeout duration and private data. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the device handle of the SDIO controller obtained by SdioOpen.
infoIndicates the pointer to the common information to be set. For details, see SdioCommonInfo.
infoTypeIndicates the type of the common information to be set. For details, see SdioCommonInfoType.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value if the operation fails. - -## SdioWriteBytes\(\) - -``` -int32_t SdioWriteBytes ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle, uint8_t * data, uint32_t addr, uint32_t size, uint32_t timeOut ) -``` - - **Description:** - -Incrementally writes a given length of data into the specified SDIO address. - -If the length of the data to write is greater than the size of a block, the data is written by block first, and the remaining data that is smaller than one block is written by byte. Otherwise, data is written by byte. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the device handle of the SDIO controller obtained by SdioOpen.
dataIndicates the pointer to the data to write.
addrIndicates the start address of the data to write.
sizeIndicates the length of the data to write.
timeOutIndicates the timeout duration for writing data, in milliseconds. If the value is 0, the default value is used. The default value varies according to the application. Generally, the default value is 1 second.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value if the operation fails. - -## SdioWriteBytesToFixedAddr\(\) - -``` -int32_t SdioWriteBytesToFixedAddr ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle, uint8_t * data, uint32_t addr, uint32_t size, uint32_t timeOut ) -``` - - **Description:** - -Writes a given length of data into the fixed SDIO address. - -If the length of the data to write is greater than the size of a block, the data is written by block first, and the remaining data that is smaller than one block is written by byte. Otherwise, data is written by byte. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the device handle of the SDIO controller obtained by SdioOpen.
dataIndicates the pointer to the data to write.
addrIndicates the fixed address of the data to write.
sizeIndicates the length of the data to write.
timeOutIndicates the timeout duration for writing data, in milliseconds. If the value is 0, the default value is used. The default value varies according to the application. Generally, the default value is 1 second.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value if the operation fails. - -## SdioWriteBytesToFunc0\(\) - -``` -int32_t SdioWriteBytesToFunc0 ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle, uint8_t * data, uint32_t addr, uint32_t size, uint32_t timeOut ) -``` - - **Description:** - -Writes a given length of data into the address space of SDIO function 0. - -Currently, only one byte of data can be written. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the device handle of the SDIO controller obtained by SdioOpen.
dataIndicates the pointer to the data to write.
addrIndicates the start address of the data to write.
sizeIndicates the length of the data to write.
timeOutIndicates the timeout duration for writing data, in milliseconds. If the value is 0, the default value is used. The default value varies according to the application. Generally, the default value is 1 second.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value if the operation fails. - diff --git a/api/api-SmartVision-Devices/SPI.md b/api/api-SmartVision-Devices/SPI.md deleted file mode 100755 index 945c15c73dc88e8991082f21cd04e20b7af7c19c..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/SPI.md +++ /dev/null @@ -1,562 +0,0 @@ -# SPI - -- [Overview](#section652650751165623) -- [Summary](#section1949059107165623) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Macros](#define-members) -- [Enumerations](#enum-members) -- [Functions](#func-members) -- [Details](#section1765579536165623) -- [Macro Definition](#section1272510252165623) -- [SPI\_CLK\_PHASE](#ga430ad9ccffd42f4427ba22fcc8167c64) -- [SPI\_CLK\_POLARITY](#ga4cafe948918622f80c27db640c6c23c6) -- [SPI\_MODE\_3WIRE](#ga11113e647ddd2101c1c693632f63aa7c) -- [SPI\_MODE\_CS\_HIGH](#ga33d89d81eb33b7a5de1a03e88279163d) -- [SPI\_MODE\_LOOP](#ga8619b297de563eca6852af34c79daa62) -- [SPI\_MODE\_LSBFE](#ga4da8777b0d2d7dd96d6038411791c36e) -- [SPI\_MODE\_NOCS](#ga361195644b8e753d5469dd492c66217b) -- [SPI\_MODE\_READY](#ga42f3ef9ad5429ac10662448fe1f5a746) -- [Enumeration Type](#section1553762052165623) -- [SpiTransferMode](#ga55946d1d895fc2b7b33007019de1668f) -- [Function](#section496230935165623) -- [SpiClose\(\)](#ga4c961307ea89008ba0f064c92eb1617d) -- [SpiGetCfg\(\)](#ga77d533d55c550c4478185a02a4e12fb1) -- [SpiOpen\(\)](#ga193e808f7e68a5b4c6b71ca2db47a11f) -- [SpiRead\(\)](#gaa860e42dac8b2caabefda6e82ba1a541) -- [SpiSetCfg\(\)](#gafbca6de683781921a8d1cb41ead0030e) -- [SpiTransfer\(\)](#gaf9226a2ce4ff75c7dc76279b3bbd7af4) -- [SpiWrite\(\)](#ga0073b24fba24fb37b3ea451a0c7d911f) - -## **Overview** - -**Description:** - -Defines standard APIs of the Serial Peripheral Interface \(SPI\) capabilities. - -The SPI module abstracts the SPI capabilities of different system platforms to provide stable APIs for driver development. This module can create and destroy SPI device handles, read and write SPI data, and obtain and set configuration parameters. - -**Since:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - -

File Name

-

Description

-

spi_if.h

-

Defines standard SPI-specific interfaces for driver development.

-
- -## Data Structures - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

SpiDevInfo

-

Defines the general SPI device descriptor, which can be used as the unique identifier of an SPI device. When operating an SPI device, you need to specify a descriptor of the SpiDevInfo type, and obtain the handle of the SPI device by calling SpiOpen.

-

SpiMsg

-

Defines the custom SPI transfer message.

-

SpiCfg

-

Defines the configuration of an SPI device.

-
- -## Macros - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

SPI_CLK_PHASE (1 << 0)

-

Indicates the SPI clock phase. The value 0 indicates that data will be sampled on the first clock edge, and 1 indicates that data will be sampled on the second clock edge.

-

SPI_CLK_POLARITY (1 << 1)

-

Indicates the SPI clock polarity. The value 0 indicates a low-level clock signal in the idle state, and 1 indicates a high-level clock signal in the idle state.

-

SPI_MODE_3WIRE (1 << 2)

-

Indicates that a single data line is used for both input and output.

-

SPI_MODE_LOOP (1 << 3)

-

Indicates the SPI loopback mode.

-

SPI_MODE_LSBFE (1 << 4)

-

Indicates the SPI data transfer order. The value 0 indicates that data is transferred from the most significant bit (MSB) to the least significant bit (LSB), and 1 indicates the opposite.

-

SPI_MODE_NOCS (1 << 5)

-

Indicates that there is only one SPI device, and no chip select (CS) is required.

-

SPI_MODE_CS_HIGH (1 << 6)

-

Indicates that the CS level is high when an SPI device is selected.

-

SPI_MODE_READY (1 << 7)

-

Indicates that the SPI device is set to low for pausing data transfer.

-
- -## Enumerations - - - - - - - - - - -

Enumeration Name

-

Description

-

SpiTransferMode { SPI_INTERRUPT_TRANSFER = 0, SPI_POLLING_TRANSFER, SPI_DMA_TRANSFER }

-

Enumerates transfer modes of SPI data.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

SpiOpen (const struct SpiDevInfo *info)

-

DevHandle

-

Obtains the handle of an SPI device.

-

SpiClose (DevHandle handle)

-

void

-

Releases the handle of an SPI device.

-

SpiTransfer (DevHandle handle, struct SpiMsg *msgs, uint32_t count)

-

int32_t

-

Launches a custom transfer to an SPI device.

-

SpiRead (DevHandle handle, uint8_t *buf, uint32_t len)

-

int32_t

-

Reads data of a specified length from an SPI device.

-

SpiWrite (DevHandle handle, uint8_t *buf, uint32_t len)

-

int32_t

-

Writes data of a specified length to an SPI device.

-

SpiSetCfg (DevHandle handle, struct SpiCfg *cfg)

-

int32_t

-

Sets configuration parameters for an SPI device.

-

SpiGetCfg (DevHandle handle, struct SpiCfg *cfg)

-

int32_t

-

Obtains the configuration parameters of an SPI device.

-
- -## **Details** - -## **Macro Definition ** - -## SPI\_CLK\_PHASE - -``` -#define SPI_CLK_PHASE (1 << 0) -``` - - **Description:** - -Indicates the SPI clock phase. The value **0** indicates that data will be sampled on the first clock edge, and **1** indicates that data will be sampled on the second clock edge. - -## SPI\_CLK\_POLARITY - -``` -#define SPI_CLK_POLARITY (1 << 1) -``` - - **Description:** - -Indicates the SPI clock polarity. The value **0** indicates a low-level clock signal in the idle state, and **1** indicates a high-level clock signal in the idle state. - -## SPI\_MODE\_3WIRE - -``` -#define SPI_MODE_3WIRE (1 << 2) -``` - - **Description:** - -Indicates that a single data line is used for both input and output. - -## SPI\_MODE\_CS\_HIGH - -``` -#define SPI_MODE_CS_HIGH (1 << 6) -``` - - **Description:** - -Indicates that the CS level is high when an SPI device is selected. - -## SPI\_MODE\_LOOP - -``` -#define SPI_MODE_LOOP (1 << 3) -``` - - **Description:** - -Indicates the SPI loopback mode. - -## SPI\_MODE\_LSBFE - -``` -#define SPI_MODE_LSBFE (1 << 4) -``` - - **Description:** - -Indicates the SPI data transfer order. The value **0** indicates that data is transferred from the most significant bit \(MSB\) to the least significant bit \(LSB\), and **1** indicates the opposite. - -## SPI\_MODE\_NOCS - -``` -#define SPI_MODE_NOCS (1 << 5) -``` - - **Description:** - -Indicates that there is only one SPI device, and no chip select \(CS\) is required. - -## SPI\_MODE\_READY - -``` -#define SPI_MODE_READY (1 << 7) -``` - - **Description:** - -Indicates that the SPI device is set to low for pausing data transfer. - -## **Enumeration Type ** - -## SpiTransferMode - -``` -enum [SpiTransferMode](SPI.md#ga55946d1d895fc2b7b33007019de1668f) -``` - - **Description:** - -Enumerates transfer modes of SPI data. - -**Attention:** - -The specific SPI controller determines which variables in this structure are supported. - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
SPI_INTERRUPT_TRANSFER

Interrupt transfer mode

-
SPI_POLLING_TRANSFER

Polling transfer mode

-
SPI_DMA_TRANSFER

Direct Memory Access (DMA) transfer mode

-
- -## **Function ** - -## SpiClose\(\) - -``` -void SpiClose ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle) -``` - - **Description:** - -Releases the handle of an SPI device. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the SPI device handle obtained via SpiOpen.
- -## SpiGetCfg\(\) - -``` -int32_t SpiGetCfg ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle, struct [SpiCfg](SpiCfg.md) * cfg ) -``` - - **Description:** - -Obtains the configuration parameters of an SPI device. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the SPI device handle obtained via SpiOpen.
cfgIndicates the pointer to the configuration parameters.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value otherwise. - -## SpiOpen\(\) - -``` -[DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) SpiOpen (const struct [SpiDevInfo](SpiDevInfo.md) * info) -``` - - **Description:** - -Obtains the handle of an SPI device. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
infoIndicates the pointer to the SPI device information.
- -**Returns:** - -Returns the pointer to the handle of the SPI device if the operation is successful; returns **NULL** otherwise. - -## SpiRead\(\) - -``` -int32_t SpiRead ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle, uint8_t * buf, uint32_t len ) -``` - - **Description:** - -Reads data of a specified length from an SPI device. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the SPI device handle obtained via SpiOpen.
bufIndicates the pointer to the buffer for receiving the data.
lenIndicates the length of the data to read.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value otherwise. - -## SpiSetCfg\(\) - -``` -int32_t SpiSetCfg ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle, struct [SpiCfg](SpiCfg.md) * cfg ) -``` - - **Description:** - -Sets configuration parameters for an SPI device. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the SPI device handle obtained via SpiOpen.
cfgIndicates the pointer to the configuration parameters.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value otherwise. - -## SpiTransfer\(\) - -``` -int32_t SpiTransfer ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle, struct [SpiMsg](SpiMsg.md) * msgs, uint32_t count ) -``` - - **Description:** - -Launches a custom transfer to an SPI device. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the SPI device handle obtained via SpiOpen.
msgsIndicates the pointer to the data to transfer.
countIndicates the length of the message structure array.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value otherwise. - -**See also:** - -[SpiMsg](SpiMsg.md) - -## SpiWrite\(\) - -``` -int32_t SpiWrite ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle, uint8_t * buf, uint32_t len ) -``` - - **Description:** - -Writes data of a specified length to an SPI device. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the SPI device handle obtained via SpiOpen.
bufIndicates the pointer to the data to write.
lenIndicates the length of the data to write.
- -**Returns:** - -Returns **0** if the operation is successful; returns a negative value otherwise. - diff --git a/api/api-SmartVision-Devices/Samgr.md b/api/api-SmartVision-Devices/Samgr.md deleted file mode 100755 index 08e30d7b9839f668267a8220f77cfdc109de87b7..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Samgr.md +++ /dev/null @@ -1,1560 +0,0 @@ -# Samgr - -- [Overview](#section780157231165625) -- [Summary](#section39131248165625) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Macros](#define-members) -- [Typedefs](#typedef-members) -- [Enumerations](#enum-members) -- [Functions](#func-members) -- [Details](#section175715380165625) -- [Macro Definition](#section944963564165625) -- [DEFAULT\_IUNKNOWN\_IMPL](#gac8d8c9671531f9340427153d50ca4a2b) -- [DEFAULT\_VERSION](#ga13dae059206df8d2d9b9b42e694b3f9c) -- [GET\_IUNKNOWN](#ga9403f55c3f75fd03854dcd37c231e05b) -- [GET\_OFFSIZE](#gab094855efe05ae51eaaf3e0ddf0346cc) -- [INHERIT\_FEATURE](#ga63c2f681bde297cb28a9a300a462f3f4) -- [INHERIT\_IUNKNOWN](#gab74532a22d6993d0ffc014d36253397f) -- [INHERIT\_IUNKNOWNENTRY](#gad6324fd90dd636180efa2a59b377e65c) -- [INHERIT\_SERVICE](#gae9253a7fc1d0acbab91414b4cacc1d84) -- [IUNKNOWN\_ENTRY\_BEGIN](#ga52ec6b5b03d56b0dfe7277785246bda1) -- [IUNKNOWN\_ENTRY\_END](#ga4ef734474ece49aa938d8ebd5b54bdb3) -- [Typedef](#section1152235996165625) -- [BootMessage](#gadc486c8d2698eab8a9f26f0eb6cc63c8) -- [Handler](#ga5e13d943cc6a87a5c99fe604f3bc01e4) -- [IUnknownEntry](#gacaa7db32a018a33a2bbf919cde8d8f9c) -- [SamgrLite](#gaad729fe4f36b7b42a122349af334fb28) -- [SpecifyTag](#gae9c7eed07272a46851d61e646b6e86d5) -- [TaskPriority](#gaef69bbb3353ea484414c3bbaf8ec362b) -- [TaskType](#gab265648f2dbef93878ad8c383712b43a) -- [Vector](#ga255ca81c214b8a94a90f786ceef94514) -- [Enumeration Type](#section2050728011165625) -- [BootMessage](#gaf39e482610dca95f0dba85613755eb40) -- [SpecifyTag](#ga704a59a45a705ef7a15d16e3cab8c1b0) -- [TaskPriority](#gaee057e5f06a7b2533e6f58bde34d15fa) -- [TaskType](#ga026844c14ab62f42a2e19b54d622609b) -- [Function](#section677802347165625) -- [IUNKNOWN\_AddRef\(\)](#ga9abef49ec89bf913c3bed03faf478c1e) -- [IUNKNOWN\_QueryInterface\(\)](#gac857d12648500c7dab1cb43e85ae2ed4) -- [IUNKNOWN\_Release\(\)](#gabd462f8a5e6460a68760cd0719982296) -- [SAMGR\_Bootstrap\(\)](#ga756ac1f5376c72aa5d14b855a302d7b6) -- [SAMGR\_GetInstance\(\)](#ga21f168d6f97d6991115ae1cf8bbd8deb) -- [SAMGR\_SendRequest\(\)](#ga03b440d8dff9fcc8694ca8a3baa83462) -- [SAMGR\_SendResponse\(\)](#gadba5f2881a6e1403cb642726d5fec3e2) -- [SAMGR\_SendResponseByIdentity\(\)](#ga44ab9b4c98e2dd6ba3338d1d2664a6fe) -- [SAMGR\_SendSharedDirectRequest\(\)](#ga0c8c20d2265f4eb8ec8b516300a94a63) -- [SAMGR\_SendSharedRequest\(\)](#gae7c4d087b251949d10d81e88a47e8dbd) -- [VECTOR\_Add\(\)](#ga234ba2452c973e9fa4a8be47eaea9d06) -- [VECTOR\_At\(\)](#ga75210ba0bd37a38a1902c4904e61246a) -- [VECTOR\_Clear\(\)](#gaebfe9ac38f2667d61bf39420aa8e7035) -- [VECTOR\_Find\(\)](#gaabc5b0eda1ee6889411e6dacb233cb07) -- [VECTOR\_FindByKey\(\)](#gac65bc6dc959a90d95dff93368abd97c7) -- [VECTOR\_Make\(\)](#gae790345f8a2863c143bfee4bab3fb6d7) -- [VECTOR\_Num\(\)](#ga90523bfd48091a0135f74670076af4d5) -- [VECTOR\_Size\(\)](#ga1432f30c136d14bc00414d883d8be3bd) -- [VECTOR\_Swap\(\)](#ga7f435d33ba61d145de9d5892b68a0eda) - -## **Overview** - -**Description:** - -Manages system capabilities. - -This module provides the development framework base of the service-oriented architecture \(SOA\). You can develop your own abilities based on the Samgr development framework. This module provides basic models of services, features, and functions, and registration and discovery capabilities. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - - - - - - - - - - - - - - - - -

File Name

-

Description

-

common.h

-

Provides common objects and functions for Samgr and external modules.

-

feature.h

-

Defines the base class of a feature.

-

iunknown.h

-

Provides the base class and default implementation for external functions of system capabilities.

-

message.h

-

Provides message communication APIs that help you to implement asynchronous functions of IUnknown.

-

samgr_lite.h

-

Manages system capabilities.

-

service.h

-

Provides basic types and constants of services.

-
- -## Data Structures - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

SimpleVector

-

Defines the simplified vector class, which is extended by four elements.

-

Feature

-

Defines the base class of a feature.

-

IUnknown

-

Defines the IUnknown class.

-

IUnknownEntry

-

Defines the IUnknown implementation class.

-

Identity

-

Identifies a service and feature.

-

Request

-

Defines a request.

-

Response

-

Defines a response.

-

SamgrLite

-

Represents the system ability management class.

-

TaskConfig

-

Defines task configurations for a service.

-

Service

-

Indicates the basic type of a service.

-
- -## Macros - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

GET_OFFSIZE(T, member) (long)((char *)&(((T *)(0))->member))

-

Calculates the offset of the member in the T type.

-

INHERIT_FEATURE

-

Inherits from the macro of the feature class.

-

DEFAULT_VERSION 0x20

-

Defines the default IUnknown version. You can customize the version.

-

INHERIT_IUNKNOWN

-

Defines the macro for inheriting the IUnknown interface.

-

INHERIT_IUNKNOWNENTRY(T)

-

Defines the macro for inheriting the classes that implement the IUnknown interface.

-

DEFAULT_IUNKNOWN_IMPL

-

Defines the default marco for initializing the IUnknown interface.

-

IUNKNOWN_ENTRY_BEGIN(version)

-

Defines the macro for initializing the classes that implement the IUnknown interface.

-

IUNKNOWN_ENTRY_END }

-

IUnknown Defines the end macro for initializing the IUnknown implementation object.

-

GET_IUNKNOWN(T) (IUnknown *)(&((T).iUnknown))

-

Obtains the pointer of the IUnknown interface object from the subclass object T (generic macro) of the IUnknown implementation class.

-

BOOTSTRAP_SERVICE "Bootstrap"

-

Starts a bootstrap service, which is used by samgr and implemented by system service developers.

-

INHERIT_SERVICE

-

Indicates the macro used to inherit the members from the service class.

-
- -## Typedefs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Typedef Name

-

Description

-

Vector

-

typedef struct SimpleVector

-

Defines the simplified vector class, which is extended by four elements.

-

IUnknownEntry

-

typedef struct IUnknownEntry

-

Defines the IUnknown implementation class.

-

Handler) (const Request *request, const Response *response)

-

typedef void(*

-

Handles asynchronous responses.

-

BootMessage

-

typedef enum BootMessage

-

Enumerates the IDs of the message to be processed for starting the bootstrap service.

-

SamgrLite

-

typedef struct SamgrLite

-

Represents the system ability management class.

-

TaskType

-

typedef enum TaskType

-

Enumerates task types.

-

SpecifyTag

-

typedef enum SpecifyTag

-

Specifies the tag for the task shared by multiple services.

-

TaskPriority

-

typedef enum TaskPriority

-

Enumerates task priority.

-
- -## Enumerations - - - - - - - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

BootMessage { BOOT_SYS_COMPLETED, BOOT_APP_COMPLETED, BOOT_REG_SERVICE, BOOTSTRAP_BUTT }

-

Enumerates the IDs of the message to be processed for starting the bootstrap service.

-

TaskType { SHARED_TASK = 0, SINGLE_TASK = 1, SPECIFIED_TASK = 2, NO_TASK = 0xFF }

-

Enumerates task types.

-

SpecifyTag { LEVEL_HIGH = 0, LEVEL_MIDDLE = 1, LEVEL_LOW = 2, LEVEL_CUSTOM_BEGIN }

-

Specifies the tag for the task shared by multiple services.

-

TaskPriority { PRI_LOW = 9, PRI_BELOW_NORMAL = 16, PRI_NORMAL = 24, PRI_ABOVE_NORMAL = 32, PRI_BUTT = 39 }

-

Enumerates task priority.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

VECTOR_Make (VECTOR_Key key, VECTOR_Compare compare)

-

Vector

-

Creates or initializes a vector object.

-

VECTOR_Clear (Vector *vector)

-

void

-

Destruct a vector object.

-

VECTOR_Add (Vector *vector, void *element)

-

int16

-

Adds an element to the vector.

-

VECTOR_Size (Vector *vector)

-

int16

-

Obtains the number of elements in the vector, including elements that have been set to NULL.

-

VECTOR_Num (Vector *vector)

-

int16

-

Obtains the number of valid elements in the vector, excluding elements that have been set to NULL.

-

VECTOR_At (Vector *vector, int16 index)

-

void *

-

Obtains the element at a specified position.

-

VECTOR_Swap (Vector *vector, int16 index, void *element)

-

void *

-

Swaps the element at a specified position in a vector with another element.

-

VECTOR_Find (Vector *vector, const void *element)

-

int16

-

Checks the position of an element.

-

VECTOR_FindByKey (Vector *vector, const void *key)

-

int16

-

Checks the position of the element with a specified key.

-

IUNKNOWN_AddRef (IUnknown *iUnknown)

-

int

-

Increments the reference count in this IUnknown interface.

-

IUNKNOWN_QueryInterface (IUnknown *iUnknown, int ver, void **target)

-

int

-

Queries the IUnknown interfaces of a specified version (downcasting).

-

IUNKNOWN_Release (IUnknown *iUnknown)

-

int

-

Releases a reference to an IUnknown interface that is no longer used.

-

SAMGR_SendRequest (const Identity *identity, const Request *request, Handler handler)

-

int32

-

Sends a request to a service or feature of a specified identity.

-

SAMGR_SendSharedRequest (const Identity *identity, const Request *request, uint32 *token, Handler handler)

-

uint32 *

-

Sends a request to multiple services or features to save memory.

-

SAMGR_SendSharedDirectRequest (const Identity *id, const Request *req, const Response *resp, uint32 **ref, Handler handler)

-

int32

-

Sends a request and response of a caller to the feature thread. The handler is directly called to process the request and response without using the message processing functions. (Customized function for the broadcast service)

-

SAMGR_SendResponse (const Request *request, const Response *response)

-

int32

-

Sends a response after processing a request.

-

SAMGR_SendResponseByIdentity (const Identity *id, const Request *request, const Response *response)

-

int32

-

Sends a response to a specified service or feature after processing the original request. (Customized function for bootstrap)

-

SAMGR_GetInstance (void)

-

SamgrLite *

-

Obtains the singleton Samgr instance.

-

SAMGR_Bootstrap (void)

-

void

-

Starts system services and features.

-
- -## **Details** - -## **Macro Definition ** - -## DEFAULT\_IUNKNOWN\_IMPL - -``` -#define DEFAULT_IUNKNOWN_IMPL -``` - -``` -Values: .QueryInterface = [IUNKNOWN_QueryInterface](Samgr.md#gac857d12648500c7dab1cb43e85ae2ed4), \ - - .AddRef = [IUNKNOWN_AddRef](Samgr.md#ga9abef49ec89bf913c3bed03faf478c1e), \ - - .Release = [IUNKNOWN_Release](Samgr.md#gabd462f8a5e6460a68760cd0719982296) - - -``` - - **Description:** - -Defines the default marco for initializing the **[IUnknown](IUnknown.md)** interface. - -When creating a subclass object of the **[IUnknown](IUnknown.md)** interface, you can use this macro to initialize members of the **[IUnknown](IUnknown.md)** interface to their default values. - -## DEFAULT\_VERSION - -``` -#define DEFAULT_VERSION 0x20 -``` - - **Description:** - -Defines the default [IUnknown](IUnknown.md) version. You can customize the version. - -The **[IUnknown](IUnknown.md)** interface of the default version can be called only in the current process. Inter-process communication is not supported. - -## GET\_IUNKNOWN - -``` -#define GET_IUNKNOWN( T) ([IUnknown](IUnknown.md) *)(&((T).iUnknown)) -``` - - **Description:** - -Obtains the pointer of the **[IUnknown](IUnknown.md)** interface object from the subclass object T \(generic macro\) of the **[IUnknown](IUnknown.md)** implementation class. - -Use this macro when registering **[IUnknown](IUnknown.md)** interfaces with Samgr so that you can obtain the interfaces from the subclass objects of different **[IUnknown](IUnknown.md)** implementation classes. - -## GET\_OFFSIZE - -``` -#define GET_OFFSIZE( T, member ) (long)((char *)&(((T *)(0))->member)) -``` - - **Description:** - -Calculates the offset of the member in the T type. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
Indicatesthe T type.
memberIndicates the name of the T member variable.
- -## INHERIT\_FEATURE - -``` -#define INHERIT_FEATURE -``` - -``` -Values: const char *(*GetName)([Feature](Feature.md) *feature); \ - - void (*OnInitialize)([Feature](Feature.md) *feature, [Service](Service.md) *parent, [Identity](Identity.md) identity); \ - - void (*OnStop)([Feature](Feature.md) *feature, [Identity](Identity.md) identity); \ - - BOOL (*OnMessage)([Feature](Feature.md) *feature, [Request](Request.md) *request) - - -``` - - **Description:** - -Inherits from the macro of the feature class. - -This macro provides the capability of inheriting the feature lifecycle. - -## INHERIT\_IUNKNOWN - -``` -#define INHERIT_IUNKNOWN -``` - -``` -Values: int (*QueryInterface)([IUnknown](IUnknown.md) *iUnknown, int version, void **target); \ - - int (*AddRef)([IUnknown](IUnknown.md) *iUnknown); \ - - int (*Release)([IUnknown](IUnknown.md) *iUnknown) - - -``` - - **Description:** - -Defines the macro for inheriting the **[IUnknown](IUnknown.md)** interface. - -When developing a subclass of the **[IUnknown](IUnknown.md)** class, you can use this macro to inherit the structures of the **[IUnknown](IUnknown.md)** interface. - -## INHERIT\_IUNKNOWNENTRY - -``` -#define INHERIT_IUNKNOWNENTRY( T) -``` - -``` -Values: uint16 ver; \ - - int16 ref; \ - - T iUnknown - - -``` - - **Description:** - -Defines the macro for inheriting the classes that implement the **[IUnknown](IUnknown.md)** interface. - -When developing a subclass of a class that implements the **[IUnknown](IUnknown.md)** interface, you can use this macro to inherit the structures of the **[IUnknown](IUnknown.md)** implementation class. - -## INHERIT\_SERVICE - -``` -#define INHERIT_SERVICE -``` - -``` -Values: const char *(*GetName)([Service](Service.md) * service); \ - - BOOL (*Initialize)([Service](Service.md) * service, [Identity](Identity.md) identity); \ - - BOOL (*MessageHandle)([Service](Service.md) * service, [Request](Request.md) * request); \ - - TaskConfig (*GetTaskConfig)([Service](Service.md) * service) - - -``` - - **Description:** - -Indicates the macro used to inherit the members from the **service** class. - -This macro provides the capability of inheriting the lifecycle functions of the **service** class. You can use this macro to customize the service structure. - -## IUNKNOWN\_ENTRY\_BEGIN - -``` -#define IUNKNOWN_ENTRY_BEGIN( version) -``` - -``` -Values: .ver = (version), \ - - .ref = 1, \ - - .iUnknown = { \ - - DEFAULT_IUNKNOWN_IMPL - - -``` - - **Description:** - -Defines the macro for initializing the classes that implement the **[IUnknown](IUnknown.md)** interface. - -When creating a subclass object of a class that implements the **[IUnknown](IUnknown.md)** interface, you can use this macro to initialize members of the **[IUnknown](IUnknown.md)** implementation class to their default values. You need to add the initialization of the customized member variable. - -## IUNKNOWN\_ENTRY\_END - -``` -#define IUNKNOWN_ENTRY_END } -``` - - **Description:** - -[IUnknown](IUnknown.md) Defines the end macro for initializing the **[IUnknown](IUnknown.md)** implementation object. - -This macro is used when a subclass object of the **[IUnknown](IUnknown.md)** implementation class is initialized. - -## **Typedef ** - -## BootMessage - -``` -typedef enum [BootMessage](Samgr.md#gaf39e482610dca95f0dba85613755eb40) [BootMessage](Samgr.md#gaf39e482610dca95f0dba85613755eb40) -``` - - **Description:** - -Enumerates the IDs of the message to be processed for starting the bootstrap service. - -This function is implemented by developers of the system service. Messages sent to the bootstrap service when Samgr is started. - -## Handler - -``` -typedef void(* Handler) (const [Request](Request.md) *request, const [Response](Response.md) *response) -``` - - **Description:** - -Handles asynchronous responses. - -This function will be used when a service or feature uses [IUnknown](IUnknown.md) to send a request. If the caller is a feature, this function is used to handle the response that is sent after the feature processes a request. If the caller is a service, **Handler** will run in the service thread. - -## IUnknownEntry - -``` -typedef struct [IUnknownEntry](IUnknownEntry.md) [IUnknownEntry](IUnknownEntry.md) -``` - - **Description:** - -Defines the **[IUnknown](IUnknown.md)** implementation class. - -You need to inherit this structure when developing a subclass of the **[IUnknown](IUnknown.md)** implementation class. Each **[IUnknown](IUnknown.md)** interface must correspond to one or more **[IUnknown](IUnknown.md)** implementation classes. - -## SamgrLite - -``` -typedef struct [SamgrLite](SamgrLite.md) [SamgrLite](SamgrLite.md) -``` - - **Description:** - -Represents the system ability management class. - -This class is used for registering and discovering services, features, and functions. - -## SpecifyTag - -``` -typedef enum [SpecifyTag](Samgr.md#ga704a59a45a705ef7a15d16e3cab8c1b0) [SpecifyTag](Samgr.md#ga704a59a45a705ef7a15d16e3cab8c1b0) -``` - - **Description:** - -Specifies the tag for the task shared by multiple services. - -These enumerations are used for specifying a multi-service sharing task. - -## TaskPriority - -``` -typedef enum [TaskPriority](Samgr.md#gaee057e5f06a7b2533e6f58bde34d15fa) [TaskPriority](Samgr.md#gaee057e5f06a7b2533e6f58bde34d15fa) -``` - - **Description:** - -Enumerates task priority. - -These enumerations are used for configuring the task priority. The valid range of the priority is \(9, 39\). - -## TaskType - -``` -typedef enum [TaskType](Samgr.md#ga026844c14ab62f42a2e19b54d622609b) [TaskType](Samgr.md#ga026844c14ab62f42a2e19b54d622609b) -``` - - **Description:** - -Enumerates task types. - -These enumerations are used for configuring the task type. - -## Vector - -``` -typedef struct [SimpleVector](SimpleVector.md) [Vector](Samgr.md#ga255ca81c214b8a94a90f786ceef94514) -``` - - **Description:** - -Defines the simplified vector class, which is extended by four elements. - -This class is applicable to the C language development scenario where the data volume is small and dynamic expansion is required. - -## **Enumeration Type ** - -## BootMessage - -``` -enum [BootMessage](Samgr.md#gaf39e482610dca95f0dba85613755eb40) -``` - - **Description:** - -Enumerates the IDs of the message to be processed for starting the bootstrap service. - -This function is implemented by developers of the system service. Messages sent to the bootstrap service when Samgr is started. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
BOOT_SYS_COMPLETED

Message indicating that the core system service is initialized

-
BOOT_APP_COMPLETED

Message indicating that the system and application-layer services are initialized

-
BOOT_REG_SERVICE

Message indicating service registration during running

-
BOOTSTRAP_BUTT

Maximum number of message IDs

-
- -## SpecifyTag - -``` -enum [SpecifyTag](Samgr.md#ga704a59a45a705ef7a15d16e3cab8c1b0) -``` - - **Description:** - -Specifies the tag for the task shared by multiple services. - -These enumerations are used for specifying a multi-service sharing task. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
LEVEL_HIGH

Preset tag

-
LEVEL_MIDDLE

Preset tag

-
LEVEL_LOW

Preset tag

-
LEVEL_CUSTOM_BEGIN

Customized tag

-
- -## TaskPriority - -``` -enum [TaskPriority](Samgr.md#gaee057e5f06a7b2533e6f58bde34d15fa) -``` - - **Description:** - -Enumerates task priority. - -These enumerations are used for configuring the task priority. The valid range of the priority is \(9, 39\). - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
PRI_LOW

Low-priority: (9, 15)

-
PRI_BELOW_NORMAL

Lower than the normal priority: [16, 23)

-
PRI_NORMAL

Normal priority: [24, 31). The log service is available.

-
PRI_ABOVE_NORMAL

Higher than the normal priority: [32, 39). The communication service is available.

-
PRI_BUTT

Upper limit of the priority

-
- -## TaskType - -``` -enum [TaskType](Samgr.md#ga026844c14ab62f42a2e19b54d622609b) -``` - - **Description:** - -Enumerates task types. - -These enumerations are used for configuring the task type. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
SHARED_TASK

Tasks shared based on their priority by services

-
SINGLE_TASK

Task exclusively occupied by a service

-
SPECIFIED_TASK

A specified task shared by multiple services

-
NO_TASK

No task for the service. Generally, this situation does not occur.

-
- -## **Function ** - -## IUNKNOWN\_AddRef\(\) - -``` -int IUNKNOWN_AddRef ([IUnknown](IUnknown.md) * iUnknown) -``` - - **Description:** - -Increments the reference count in this **[IUnknown](IUnknown.md)** interface. - -This function is called in **QueryInterface**. Do not call this function in the **[IUnknown](IUnknown.md)** interface. When the **QueryInterface** function is re-implemented, you need to call this function in the new **QueryInterface**.**** - -****The system does not provide a lock to protect functions. Therefore, you need to re-implement functions if multiple developers are using them. **** - -**Parameters:** - -## IUNKNOWN\_QueryInterface\(\) - -``` -int IUNKNOWN_QueryInterface ([IUnknown](IUnknown.md) * iUnknown, int ver, void ** target ) -``` - - **Description:** - -Queries the **[IUnknown](IUnknown.md)** interfaces of a specified version \(downcasting\). - -After obtaining the **[IUnknown](IUnknown.md)** interface object, the function caller uses **QueryInterface** to convert the object to the required subclass type. The system converts [DEFAULT\_VERSION](Samgr.md#ga13dae059206df8d2d9b9b42e694b3f9c) into the subclass type required by the caller. If the type conversion requirements cannot be met, you need to re-implement this function. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
iUnknownIndicates the pointer to the IUnknown interface.
versionIndicates the version of the IUnknown interface object to be converted.
targetIndicates the IUnknown subclass type required by the caller. This is an output parameter.
- -**Returns:** - -Returns **EC\_SUCCESS** if the conversion is successful; returns other error codes if the conversion fails. - -## IUNKNOWN\_Release\(\) - -``` -int IUNKNOWN_Release ([IUnknown](IUnknown.md) * iUnknown) -``` - - **Description:** - -Releases a reference to an **[IUnknown](IUnknown.md)** interface that is no longer used. - -In the default implementation provided by the system, if the reference count is **0**, the memory of the **[IUnknown](IUnknown.md)** interface object and implementation object is not released. If the memory of the **[IUnknown](IUnknown.md)** interface object and implementation object is dynamically allocated, this function needs to be re-implemented. If the reference count is **0**, the memory of the **[IUnknown](IUnknown.md)** interface object and implementation object is released. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
iUnknownIndicates the pointer to the IUnknown interface object.
- -**Returns:** - -**** Indicates the number of **[IUnknown](IUnknown.md)** interface objects that are referenced after the current reference is released.******** - -## SAMGR\_Bootstrap\(\) - -``` -void SAMGR_Bootstrap (void ) -``` - - **Description:** - -Starts system services and features. - -This function is called in the **main** function to start all services when an independent process is developed. This function is called after the dynamic library \(containing system services and features\) is loaded during system running. - -**Attention:** - -This function cannot be called frequently. Otherwise, problems such as repeated service startup may occur. It is recommended that this function be called once in the **main** function or after the dynamic library is loaded. - -## SAMGR\_GetInstance\(\) - -``` -[SamgrLite](SamgrLite.md)* SAMGR_GetInstance (void ) -``` - - **Description:** - -Obtains the singleton Samgr instance. - -You need to call this function before using the Samgr capabilities. - -**Returns:** - -Returns the pointer to the singleton instance [SamgrLite](SamgrLite.md). - -## SAMGR\_SendRequest\(\) - -``` -int32 SAMGR_SendRequest (const [Identity](Identity.md) * identity, const [Request](Request.md) * request, [Handler](Samgr.md#ga5e13d943cc6a87a5c99fe604f3bc01e4) handler ) -``` - - **Description:** - -Sends a request to a service or feature of a specified identity. - -This function is called by a service to send messages to its own features through the asynchronous function of [IUnknown](IUnknown.md). - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
identityIndicates the pointer to the ID of the feature or service that processes the message.
requestIndicates the pointer to the request.
handlerIndicates the function handling the response. If the value is NULL, no response is required.
- -**Returns:** - -Returns **EC\_SUCCESS** if the request is sent successfully; returns other error codes if the request fails to be sent. The caller needs to release the memory applied in the request. - -## SAMGR\_SendResponse\(\) - -``` -int32 SAMGR_SendResponse (const [Request](Request.md) * request, const [Response](Response.md) * response ) -``` - - **Description:** - -Sends a response after processing a request. - -This function is called to send a response after processing a request by **MessageHandle** of a service or **OnMessage** of a feature. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
requestIndicates the pointer to the original request.
responseIndicates the pointer to the response content.
- -**Returns:** - -Returns **EC\_SUCCESS** if the response is sent successfully; returns other error codes if the response fails to be sent. - -**Attention:** - -- This function can be called only in **MessageHandle** or **OnMessage**. -- The request must be the original one passed from **MessageHandle** or **OnMessage**. Otherwise, a memory exception occurs. -- When the caller sends a request, the **handler** callback function must be carried. -- The response is sent to the message queue of the service to which the requester belongs for processing. Therefore, the requester should wait for the response in non-blocking mode. - -## SAMGR\_SendResponseByIdentity\(\) - -``` -int32 SAMGR_SendResponseByIdentity (const [Identity](Identity.md) * id, const [Request](Request.md) * request, const [Response](Response.md) * response ) -``` - - **Description:** - -Sends a response to a specified service or feature after processing the original request. \(Customized function for **bootstrap**\) - -This function is called to send a response after processing a request by **MessageHandle** of a service or **OnMessage** of a feature. This function can be customized to implement phased startup of different types of services. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the pointer to the ID of a service or feature. The response is sent to the thread of the service or feature for processing.
requestIndicates the pointer to the original request.
responseIndicates the pointer to the response content.
- -**Returns:** - -Returns **EC\_SUCCESS** if the response is sent successfully; returns other error codes if the response fails to be sent. - -**Attention:** - -- This function can be called only in **MessageHandle** or **OnMessage**. -- The request must be the original one passed from **MessageHandle** or **OnMessage**. Otherwise, a memory exception occurs. -- When the caller sends a request, the **handler** callback function must be carried. -- The response is sent to the message queue of a specified ID for processing. Therefore, wait for the response in non-blocking mode. - -## SAMGR\_SendSharedDirectRequest\(\) - -``` -int32 SAMGR_SendSharedDirectRequest (const [Identity](Identity.md) * id, const [Request](Request.md) * req, const [Response](Response.md) * resp, uint32 ** ref, [Handler](Samgr.md#ga5e13d943cc6a87a5c99fe604f3bc01e4) handler ) -``` - - **Description:** - -Sends a request and response of a caller to the feature thread. The handler is directly called to process the request and response without using the message processing functions. \(Customized function for the broadcast service\) - -This function is used to publish topics for the [Broadcast](Broadcast.md) service to broadcast messages. The value of reference counting is incremented by one each time this function is called. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
idIndicates the pointer to the IDs of services or features, to which the request and response are sent.
requestIndicates the pointer to the request.
respIndicates the pointer to the response.
refIndicates the reference counting.
handlerIndicates the function for handling the request and response. This parameter cannot be NULL.
- -**Returns:** - -Returns **EC\_SUCCESS** if the request and response are sent successfully; returns other error codes if the request and response fail to be sent. - -**Attention:** - -- Ensure that the thread specified by **identity** processes the message after all messages are sent. Common practice: Add a lock before sending a request and add the same lock during processing. -- If **NULL** is returned, the caller needs to release the memory of the request and response. -- If the response changes each time when a request is sent, ensure that the response will not be released. \(Set **len** to **0**, the **data** of response will be the resident memory.\) - -## SAMGR\_SendSharedRequest\(\) - -``` -uint32* SAMGR_SendSharedRequest (const [Identity](Identity.md) * identity, const [Request](Request.md) * request, uint32 * token, [Handler](Samgr.md#ga5e13d943cc6a87a5c99fe604f3bc01e4) handler ) -``` - - **Description:** - -Sends a request to multiple services or features to save memory. - -This function is used to publish topics for the [Broadcast](Broadcast.md) service to broadcast messages. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
identityIndicates the pointer to the IDs of services or features, to which requests are sent.
requestIndicates the pointer to the request.
tokenIndicates the pointer to reference counting.
handlerIndicates the function handling the response. If the value is NULL, no response is required.
- -**Attention:** - -- Ensure that the thread specified by **identity** processes the message after all messages are sent. Common practice: Add a lock before sending a request and add the same lock during processing. -- If **NULL** is returned, the caller needs to release the memory of the request. - -## VECTOR\_Add\(\) - -``` -int16 VECTOR_Add ([Vector](Samgr.md#ga255ca81c214b8a94a90f786ceef94514) * vector, void * element ) -``` - - **Description:** - -Adds an element to the vector. - -This function is used to add an element to the vector. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
vectorIndicates the this pointer to the vector.
elementIndicates the element to add.
- -**Returns:** - -Returns the location of the element to be added if the operation is successful; returns **INVALID\_INDEX** if the operation fails. - -## VECTOR\_At\(\) - -``` -void* VECTOR_At ([Vector](Samgr.md#ga255ca81c214b8a94a90f786ceef94514) * vector, int16 index ) -``` - - **Description:** - -Obtains the element at a specified position. - -This function is used to obtain the element at a specified position. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
vectorIndicates the this pointer to the vector.
indexIndicates the subscript to be obtained.
- -**Returns:** - -Returns the element if obtained; returns **NULL** otherwise. - -## VECTOR\_Clear\(\) - -``` -void VECTOR_Clear ([Vector](Samgr.md#ga255ca81c214b8a94a90f786ceef94514) * vector) -``` - - **Description:** - -Destruct a vector object. - -This function is used to clear the memory applied by the vector after the temporary vector in the stack is used. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
vectorIndicates the pointer to the vector to clear.
- -## VECTOR\_Find\(\) - -``` -int16 VECTOR_Find ([Vector](Samgr.md#ga255ca81c214b8a94a90f786ceef94514) * vector, const void * element ) -``` - - **Description:** - -Checks the position of an element. - -This function is used to check whether a vector has a specified element. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
vectorIndicates the this pointer to the vector.
elementIndicates the element to be checked.
- -**Returns:** - -Returns the index of the element that is not less than 0 if the check is successful; returns **INVALID\_INDEX** if the check fails. - -## VECTOR\_FindByKey\(\) - -``` -int16 VECTOR_FindByKey ([Vector](Samgr.md#ga255ca81c214b8a94a90f786ceef94514) * vector, const void * key ) -``` - - **Description:** - -Checks the position of the element with a specified key. - -This function is used to check an element based on its key value. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
vectorIndicates the this pointer to the vector.
keyIndicates the pointer to the key value of the element to check.
- -**Returns:** - -Returns the index of the key element that is not less than 0 if the check is successful; returns **INVALID\_INDEX** if the check fails. - -## VECTOR\_Make\(\) - -``` -[Vector](Samgr.md#ga255ca81c214b8a94a90f786ceef94514) VECTOR_Make (VECTOR_Key key, VECTOR_Compare compare ) -``` - - **Description:** - -Creates or initializes a vector object. - -This function is used to create or initialize a vector object. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the pointer to the function provided by users for converting data elements into key values. If this function is not provided, set it to NULL.
compareIndicates the pointer to the function for comparing the sizes of two elements. If this function is not provided, set it to NULL.
- -**Returns:** - -Returns the vector right value object. - -## VECTOR\_Num\(\) - -``` -int16 VECTOR_Num ([Vector](Samgr.md#ga255ca81c214b8a94a90f786ceef94514) * vector) -``` - - **Description:** - -Obtains the number of valid elements in the vector, excluding elements that have been set to **NULL**. - -This function is used to check whether the number of elements reaches the upper limit. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
vectorIndicates the this pointer to the vector.
- -**Returns:** - -Returns the top - free value of the vector, which indicates the number of non-null elements. - -## VECTOR\_Size\(\) - -``` -int16 VECTOR_Size ([Vector](Samgr.md#ga255ca81c214b8a94a90f786ceef94514) * vector) -``` - - **Description:** - -Obtains the number of elements in the vector, including elements that have been set to **NULL**. - -This function is used for full traversal. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
vectorIndicates the this pointer to the vector.
- -**Returns:** - -Returns the top value of the vector, which indicates the number of elements. - -## VECTOR\_Swap\(\) - -``` -void* VECTOR_Swap ([Vector](Samgr.md#ga255ca81c214b8a94a90f786ceef94514) * vector, int16 index, void * element ) -``` - - **Description:** - -Swaps the element at a specified position in a vector with another element. - -This function is used to clear, sort, or update elements in the vector. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
vectorIndicates the this pointer to the vector.
indexIndicates the position of the element to be swapped.
elementIndicates the pointer to the new element.
- -**Attention:** - -Before using this function, ensure that the index is valid. You can use **VECTOR\_Size** to obtain the upper limit of the index. - -**Returns:** - -Returns the original element if the swapping is successful; returns **NULL** if the swapping fails. - -**See also:** - -[VECTOR\_Size](Samgr.md#ga1432f30c136d14bc00414d883d8be3bd) - diff --git a/api/api-SmartVision-Devices/SamgrLite.md b/api/api-SmartVision-Devices/SamgrLite.md deleted file mode 100755 index c3892ed23d727bb619fec65e7b3d26583a46d123..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/SamgrLite.md +++ /dev/null @@ -1,452 +0,0 @@ -# SamgrLite - -- [Overview](#section1479211129165636) -- [Summary](#section1482277520165636) -- [Data Fields](#pub-attribs) -- [Details](#section1810909222165636) -- [Field](#section1636874996165636) -- [GetDefaultFeatureApi](#ac9d054e649b089ce256128ea4731cf57) -- [GetFeatureApi](#aad5c8419acea291e00059f79f8e6c8d1) -- [RegisterDefaultFeatureApi](#aafa34cfe11f389b208e90ba451000c1d) -- [RegisterFeature](#a05153cf073a1373bac53a0a1c2030ba0) -- [RegisterFeatureApi](#a9c1a5452e501478a984a1220f550efba) -- [RegisterService](#a9adf6d526e11688ad318229487cfc0b4) -- [UnregisterDefaultFeatureApi](#a46f630c5a037c569a5b7806b4f8804ad) -- [UnregisterFeature](#a03c53143dae167f685d796f3a806a574) -- [UnregisterFeatureApi](#a2e33f34b97159b6673dff37e675ed844) -- [UnregisterService](#a3cebb3773860e67de745ac24021e63b0) - -## **Overview** - -**Related Modules:** - -[Samgr](Samgr.md) - -**Description:** - -Represents the system ability management class. - -This class is used for registering and discovering services, features, and functions. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

RegisterService )(Service *service)

-

BOOL(*

-

Registers a service.

-

UnregisterService )(const char *name)

-

Service *(*

-

Unregisters a service.

-

RegisterFeature )(const char *serviceName, Feature *feature)

-

BOOL(*

-

Registers a feature.

-

UnregisterFeature )(const char *serviceName, const char *featureName)

-

Feature *(*

-

Unregisters a feature.

-

RegisterDefaultFeatureApi )(const char *service, IUnknown *publicApi)

-

BOOL(*

-

Registers the API for the default feature of a service.

-

UnregisterDefaultFeatureApi )(const char *service)

-

IUnknown *(*

-

Unregisters the API from the default feature of a service.

-

RegisterFeatureApi )(const char *service, const char *feature, IUnknown *publicApi)

-

BOOL(*

-

Registers the API for a feature.

-

UnregisterFeatureApi )(const char *service, const char *feature)

-

IUnknown *(*

-

Unregisters the API from a feature.

-

GetDefaultFeatureApi )(const char *service)

-

IUnknown *(*

-

Obtains the API specific to the default feature.

-

GetFeatureApi )(const char *serviceName, const char *feature)

-

IUnknown *(*

-

Obtains the API specific to the feature.

-
- -## **Details** - -## **Field ** - -## GetDefaultFeatureApi - -``` -[IUnknown](IUnknown.md)*(* SamgrLite::GetDefaultFeatureApi) (const char *service) -``` - - **Description:** - -Obtains the API specific to the default feature. - -You need to call this function before using the system capabilities of the service involved. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
serviceIndicates the name of the service to which the default feature belongs.
- -**Returns:** - -Returns the **[IUnknown](IUnknown.md) \*** object that can be called if the operation is successful; returns **NULL** if the operation fails. - -## GetFeatureApi - -``` -[IUnknown](IUnknown.md)*(* SamgrLite::GetFeatureApi) (const char *serviceName, const char *feature) -``` - - **Description:** - -Obtains the API specific to the feature. - -You need to call this function before using the system capabilities of the service involved. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
serviceIndicates the name of the service to which the feature belongs.
featureIndicates the name of the feature whose API will be obtained.
- -**Returns:** - -Returns the **[IUnknown](IUnknown.md) \*** object that can be called if the operation is successful; returns **NULL** if the operation fails. - -## RegisterDefaultFeatureApi - -``` -BOOL(* SamgrLite::RegisterDefaultFeatureApi) (const char *service, [IUnknown](IUnknown.md) *publicApi) -``` - - **Description:** - -Registers the API for the default feature of a service. - -You need to call this function after the service is registered. The pointers to the [IUnknown](IUnknown.md) and [IUnknown](IUnknown.md) members to be registered cannot be empty. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
serviceIndicates the name of the service whose default feature's API will be registered.
publicApiIndicates the API to be registered.
- -**Returns:** - -Returns **TRUE** if the registration is successful; returns **FALSE** if the registration fails. - -## RegisterFeature - -``` -BOOL(* SamgrLite::RegisterFeature) (const char *serviceName, [Feature](Feature.md) *feature) -``` - - **Description:** - -Registers a feature. - -You need to call this function in the startup entry of each feature. [Feature](Feature.md) and [Feature](Feature.md) structure members to be registered cannot be empty. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
featureIndicates the feature to be registered.
- -**Returns:** - -Returns **TRUE** if the registration is successful; returns **FALSE** if the registration fails. - -## RegisterFeatureApi - -``` -BOOL(* SamgrLite::RegisterFeatureApi) (const char *service, const char *feature, [IUnknown](IUnknown.md) *publicApi) -``` - - **Description:** - -Registers the API for a feature. - -You can call this function only if the feature has been registered. The pointers to the [IUnknown](IUnknown.md) and [IUnknown](IUnknown.md) members to be registered cannot be empty. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
serviceIndicates the name of the service whose API will be registered.
featureIndicates the name of the feature whose API will be registered.
publicApiIndicates the API to be registered.
- -**Returns:** - -Returns **TRUE** if the registration is successful; returns **FALSE** if the registration fails. - -## RegisterService - -``` -BOOL(* SamgrLite::RegisterService) ([Service](Service.md) *service) -``` - - **Description:** - -Registers a service. - -You need to call this function in the startup entry of each service. [Service](Service.md) and [Service](Service.md) structure members to be registered cannot be empty. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
serviceIndicates the service to be registered.
- -**Returns:** - -Returns **TRUE** if the registration is successful; returns **FALSE** if the registration fails. - -## UnregisterDefaultFeatureApi - -``` -[IUnknown](IUnknown.md)*(* SamgrLite::UnregisterDefaultFeatureApi) (const char *service) -``` - - **Description:** - -Unregisters the API from the default feature of a service. - -You need to call this function to unregister [IUnknown](IUnknown.md) if the service to which the default feature belongs is no longer required. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
serviceIndicates the name of the service whose default feature's API will be unregistered.
- -**Returns:** - -Returns the unregistered function object if the unregistration is successful. The memory is released by the caller. Returns **NULL** if the unregistration fails. - -## UnregisterFeature - -``` -[Feature](Feature.md)*(* SamgrLite::UnregisterFeature) (const char *serviceName, const char *featureName) -``` - - **Description:** - -Unregisters a feature. - -You need to call this function when the feature is no longer required. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
serviceNameIndicates the name of the service whose feature will be unregistered.
featureNameIndicates the name of the feature to be unregistered.
- -**Attention:** - -Before unregistering the feature, you must unregister its functions. Otherwise, the unregistration fails. - -**Returns:** - -Returns the unregistered feature object if the unregistration is successful. The memory is released by the caller. Returns **NULL** if the unregistration fails. - -## UnregisterFeatureApi - -``` -[IUnknown](IUnknown.md)*(* SamgrLite::UnregisterFeatureApi) (const char *service, const char *feature) -``` - - **Description:** - -Unregisters the API from a feature. - -You must call this function before unregistering the feature no longer required. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
serviceIndicates the name of the service whose API will be unregistered.
featureIndicates the name of the feature whose API will be unregistered.
- -**Returns:** - -Returns the unregistered function object if the unregistration is successful. The memory is released by the caller. Returns **NULL** if the unregistration fails. - -## UnregisterService - -``` -[Service](Service.md)*(* SamgrLite::UnregisterService) (const char *name) -``` - - **Description:** - -Unregisters a service. - -You need to call this function when the service is no longer required. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
nameIndicates the name of the service to be unregistered.
- -**Attention:** - -Before unregistering the service, you must unregister its features and functions. - -**Returns:** - -Returns the unregistered service object if the unregistration is successful. The memory is released by the caller. Returns **NULL** if the unregistration fails. - diff --git a/api/api-SmartVision-Devices/ScannedBssInfo.md b/api/api-SmartVision-Devices/ScannedBssInfo.md deleted file mode 100755 index f1bd0dd2cc931296d06cc6c33d52899bdaf3136d..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/ScannedBssInfo.md +++ /dev/null @@ -1,59 +0,0 @@ -# ScannedBssInfo - -- [Overview](#section1536667015165636) -- [Summary](#section364452738165636) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Represents the scanned BSS information. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

signal

-

int32_t

-

freq

-

int16_t

-

arry [2]

-

uint8_t

-

mgmtLen

-

uint32_t

-

mgmt

-

struct Ieee80211Mgmt *

-
- diff --git a/api/api-SmartVision-Devices/SdioCommonInfo.md b/api/api-SmartVision-Devices/SdioCommonInfo.md deleted file mode 100755 index b69fe8ba72c3f78eb71b4da62fe1b365f37d623a..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/SdioCommonInfo.md +++ /dev/null @@ -1,54 +0,0 @@ -# SdioCommonInfo - -- [Overview](#section647116408165636) -- [Summary](#section1139371527165636) -- [Data Fields](#pub-attribs) -- [Details](#section1415245331165636) -- [Field](#section1014289612165636) -- [funcInfo](#a67e7930d763c6463356b16f8086ca8a7) - -## **Overview** - -**Related Modules:** - -[SDIO](SDIO.md) - -**Description:** - -Defines SDIO common information. - -You can obtain and set common SDIO information by calling [SdioGetCommonInfo](SDIO.md#ga1289cc512ba56e3e904204c15d8ae23d) and [SdioSetCommonInfo](SDIO.md#ga6a8eb2f6413c4685f92236dd1c8083dc) with [SdioCommonInfo](SdioCommonInfo.md) and [SdioCommonInfoType](SDIO.md#ga4037437ac001a9848dd242e8aa632678) passed. - -## **Summary** - -## Data Fields - - - - - - - - - - -

Variable Name

-

Description

-

funcInfo

-

SdioFuncInfo

-
- -## **Details** - -## **Field ** - -## funcInfo - -``` -[SdioFuncInfo](SdioFuncInfo.md) SdioCommonInfo::funcInfo -``` - - **Description:** - -Functionality information - diff --git a/api/api-SmartVision-Devices/SdioFuncInfo.md b/api/api-SmartVision-Devices/SdioFuncInfo.md deleted file mode 100755 index 2edc769333602eac7e3a65547eaa66477e78da14..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/SdioFuncInfo.md +++ /dev/null @@ -1,150 +0,0 @@ -# SdioFuncInfo - -- [Overview](#section2002007150165636) -- [Summary](#section1215254666165636) -- [Data Fields](#pub-attribs) -- [Details](#section2041610636165636) -- [Field](#section1415428545165636) -- [data](#a3867493e7beca9cafb6833523f29ccda) -- [enTimeout](#a85c9b17ab885cb72eab7ded6e49d8476) -- [funcNum](#a7d99a390cc82cdccda84122580f20e2b) -- [irqCap](#aff0bdebbfd7969076ab2f9ccd2b1867c) -- [maxBlockNum](#a04d38dfd2a8d39a35eafcfc29b673e26) -- [maxBlockSize](#af5f3459fa5c7b774f59b0dcd70b9a0b6) -- [maxRequestSize](#a2b5bfbd05ef54dc65027068de0175d9e) - -## **Overview** - -**Related Modules:** - -[SDIO](SDIO.md) - -**Description:** - -Defines the SDIO capabilities. - -You can obtain and set the SDIO capabilities by calling [SdioGetCommonInfo](SDIO.md#ga1289cc512ba56e3e904204c15d8ae23d) and [SdioSetCommonInfo](SDIO.md#ga6a8eb2f6413c4685f92236dd1c8083dc) with [SdioCommonInfo](SdioCommonInfo.md) and [SdioCommonInfoType](SDIO.md#ga4037437ac001a9848dd242e8aa632678) passed. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

maxBlockNum

-

uint32_t

-

maxBlockSize

-

uint32_t

-

maxRequestSize

-

uint32_t

-

enTimeout

-

uint32_t

-

funcNum

-

uint32_t

-

irqCap

-

uint32_t

-

data

-

void *

-
- -## **Details** - -## **Field ** - -## data - -``` -void* SdioFuncInfo::data -``` - - **Description:** - -Private data - -## enTimeout - -``` -uint32_t SdioFuncInfo::enTimeout -``` - - **Description:** - -Maximum timeout duration, in milliseconds. The value cannot exceed **1** second. - -## funcNum - -``` -uint32_t SdioFuncInfo::funcNum -``` - - **Description:** - -Functionality number, ranging from **1** to **7**. - -## irqCap - -``` -uint32_t SdioFuncInfo::irqCap -``` - - **Description:** - -IRQ capabilities - -## maxBlockNum - -``` -uint32_t SdioFuncInfo::maxBlockNum -``` - - **Description:** - -Maximum number of blocks in a request - -## maxBlockSize - -``` -uint32_t SdioFuncInfo::maxBlockSize -``` - - **Description:** - -Maximum number of bytes in a block. The value ranges from **1** to **2048**. - -## maxRequestSize - -``` -uint32_t SdioFuncInfo::maxRequestSize -``` - - **Description:** - -Maximum number of bytes in a request. The value ranges from **1** to **2048**. - diff --git a/api/api-SmartVision-Devices/Service.md b/api/api-SmartVision-Devices/Service.md deleted file mode 100755 index 549798ee02993b95c4609166b712cbdb88c24e84..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Service.md +++ /dev/null @@ -1,196 +0,0 @@ -# Service - -- [Overview](#section1287791382165636) -- [Summary](#section65587967165636) -- [Data Fields](#pub-attribs) -- [Details](#section1393409351165636) -- [Field](#section702608981165636) -- [GetName](#a7d6fe59023a0e6ad2ad7c625c0d117d6) -- [GetTaskConfig](#abc4b1868a77fafe434fe63c8a4685aeb) -- [Initialize](#a80b0715ef9129631d5f622cb199ff8ae) -- [MessageHandle](#aa2b7015639906efbadd36aa87eea269b) - -## **Overview** - -**Related Modules:** - -[Samgr](Samgr.md) - -**Description:** - -Indicates the basic type of a service. - -You need to implement the function pointers of **[Service](Service.md)**. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

GetName )(Service *service)

-

const char *(*

-

Obtains the name of a service.

-

Initialize )(Service *service, Identity identity)

-

BOOL(*

-

Initializes the service.

-

MessageHandle )(Service *service, Request *request)

-

BOOL(*

-

Processes service messages.

-

GetTaskConfig )(Service *service)

-

TaskConfig(*

-

Obtains task configurations of a service.

-
- -## **Details** - -## **Field ** - -## GetName - -``` -const char*(* Service::GetName) ([Service](Service.md) *service) -``` - - **Description:** - -Obtains the name of a service. - -This function is called by Samgr during service registration and startup. You need to implement this function. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
serviceIndicates the pointer to the service.
- -**Returns:** - -Returns a constant string no more than 16 bytes if the service name is obtained successfully; returns **NULL** if the service name fails to be obtained. - -## GetTaskConfig - -``` -[TaskConfig](TaskConfig.md)(* Service::GetTaskConfig) ([Service](Service.md) *service) -``` - - **Description:** - -Obtains task configurations of a service. - -This function is used to return task configurations. You need to implement this function. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
serviceIndicates the pointer to the service.
- -**Returns:** - -Returns [TaskConfig](TaskConfig.md). - -## Initialize - -``` -BOOL(* Service::Initialize) ([Service](Service.md) *service, [Identity](Identity.md) identity) -``` - - **Description:** - -Initializes the service. - -After Samgr assigns tasks to a service, the service calls the function in its own tasks. You need to implement this function. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
serviceIndicates the pointer to the service.
identityIndicates the ID allocated by the system to the service. For details, see Identity.
- -**Returns:** - -Returns **TRUE** if the initialization is successful; returns **FALSE** otherwise. - -## MessageHandle - -``` -BOOL(* Service::MessageHandle) ([Service](Service.md) *service, [Request](Request.md) *request) -``` - - **Description:** - -Processes service messages. - -This function is used to process requests sent by the caller through [IUnknown](IUnknown.md). You need to implement this function. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
serviceIndicates the pointer to the service.
requestIndicates the pointer to the request data.
- -**Returns:** - -Returns **TRUE** if the message processing is successful; returns **FALSE** if the processing fails. - diff --git a/api/api-SmartVision-Devices/SimpleVector.md b/api/api-SmartVision-Devices/SimpleVector.md deleted file mode 100755 index 52d048a23f119f3023cd0c807edb03d4ec9674c4..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/SimpleVector.md +++ /dev/null @@ -1,134 +0,0 @@ -# SimpleVector - -- [Overview](#section1250743270165636) -- [Summary](#section1410137533165636) -- [Data Fields](#pub-attribs) -- [Details](#section508538747165636) -- [Field](#section1604641307165636) -- [compare](#a7661926c6a5d659ec2bff6533a7389fa) -- [data](#a4674672209ae411544383a5399aee85b) -- [free](#a1ff1e71311df432f11fd2613cdbc1b16) -- [key](#a3e5edc51c8c7ef2536da2853986981ff) -- [max](#a68140ca4cc59df48c63963f1eda3f35c) -- [top](#ac699cefa0c1003b8babbe2c0ea3134db) - -## **Overview** - -**Related Modules:** - -[Samgr](Samgr.md) - -**Description:** - -Defines the simplified vector class, which is extended by four elements. - -This class is applicable to the C language development scenario where the data volume is small and dynamic expansion is required. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

max

-

int16

-

top

-

int16

-

free

-

int16

-

data

-

void **

-

key

-

VECTOR_Key

-

compare

-

VECTOR_Compare

-
- -## **Details** - -## **Field ** - -## compare - -``` -VECTOR_Compare SimpleVector::compare -``` - - **Description:** - -Compares the sizes of key1 and key2, which are provided by users. The value **1** indicates that key1 is greater than key2, the value **0** indicates that key1 is equal to key2, and the value **-1** indicates that key1 is less than key2. The default value is **NULL**. - -## data - -``` -void** SimpleVector::data -``` - - **Description:** - -Data storage pointer - -## free - -``` -int16 SimpleVector::free -``` - - **Description:** - -Number of data records that have been released. The initial value is **0**. - -## key - -``` -VECTOR_Key SimpleVector::key -``` - - **Description:** - -Converts a data element into a key for comparison. The key is provided by users, and the default value is **NULL**. - -## max - -``` -int16 SimpleVector::max -``` - - **Description:** - -Maximum number of data records that can be stored. The initial value is **0**. - -## top - -``` -int16 SimpleVector::top -``` - - **Description:** - -Peak value of the number of stored data records. The initial value is **0**. - diff --git a/api/api-SmartVision-Devices/Softbus.md b/api/api-SmartVision-Devices/Softbus.md deleted file mode 100755 index d4aecd2e7f3be31a3ea752c1626fad6752400763..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Softbus.md +++ /dev/null @@ -1,1205 +0,0 @@ -# Softbus - -- [Overview](#section1320862849165623) -- [Summary](#section1861030385165623) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Typedefs](#typedef-members) -- [Enumerations](#enum-members) -- [Functions](#func-members) -- [Details](#section779093396165623) -- [Typedef](#section357911583165623) -- [CommonDeviceInfo](#ga8dc0eb993aea9593f96da339edf042ff) -- [DeviceType](#ga9334bacb3ded964dc3c3367a6b70bcf4) -- [IPublishCallback](#gab622f2f40d12121620d464e43635a09b) -- [PublishInfo](#gae0bb52450c28ea9be1c5475d0d89830e) -- [Enumeration Type](#section574907679165623) -- [CommonDeviceKey](#ga25be99ffbe88e41f7ce51d2678010254) -- [DataBitMap](#gab839c7f1fd448f52f003ab0693f27bb4) -- [DeviceTypeEnum](#gab20b49630026f3118d6c05b0a022f230) -- [DiscoverMode](#ga7369479474cf45e9ca9c0f756473c74f) -- [ExchanageMedium](#gaf5c7c122990f0ab5bd46b9bc47b5868b) -- [ExchangeFre](#gacf2c77bd7e2c82784078762978123ea3) -- [PublishFailReason](#ga6632fcae1db4a3a13370e3fb49e5e620) -- [Function](#section606981660165623) -- [CloseSession\(\)](#ga5b0c0b334f387f9c2753146ee0890780) -- [CreateSessionServer\(\)](#gad7e95cced3378e8f489553d70b121392) -- [GetMySessionName\(\)](#ga00611f717919f4156c74b7919b28c7d8) -- [GetPeerDeviceId\(\)](#ga21b9a889069eea6e7fe653820e601c04) -- [GetPeerSessionName\(\)](#ga92d5a47fcdf97a0e01797c77e644033e) -- [PublishService\(\)](#ga010557e05b3f0b0b1a05157f1724e13a) -- [RemoveSessionServer\(\)](#ga225a1e178544457263d94078e638b7b5) -- [SendBytes\(\)](#ga0333c76724dbef71bca48fb2a82e6980) -- [SetCommonDeviceInfo\(\)](#gaca3ae566d98727d111befb4a642bafc4) -- [UnPublishService\(\)](#gac9463e62e324155634c01facdf642ea7) -- [Variable](#section394223217165623) -- [bitmap](#gaccfbfe7a48ef51a2bada9a711dfe8cdb) -- [capability \[1/2\]](#gacf7c1f9daf2bf9c148ab9d8048d75358) -- [capability \[2/2\]](#gaba08ca6b519055898dd60b6e98a796d4) -- [capabilityData](#ga0d267dd5f6f198120f91759094f07ab7) -- [dataLen](#ga0ae4b95fd8ba4fd0fca6d02dee79e643) -- [devType](#ga0e85f0b19c5d5d8368b93b9751473fb1) -- [freq](#gaf850489236b0efbc4b27ea5a867ec001) -- [key](#gaf3ee5a07a887ab31517318e0d4ea8cc4) -- [medium](#ga3997803d8bfec79f5ba6e264f8e35b52) -- [mode](#ga1e1635bcdb216cd4a4756c4962c3f595) -- [onBytesReceived](#ga95243f25fa04ef29f7f8f0b3a440dbd3) -- [onPublishFail](#ga0f84feec4640c176938bbce26b8f25c8) -- [onPublishSuccess](#gade0a74f5ae9b16a1fa7f03df5d9fbdf1) -- [onSessionClosed](#ga2088a4e0e196030d8e428a828298eba0) -- [onSessionOpened](#ga2b042b85e03d66f1988c348414b2db6e) -- [publishId](#ga44a9b46ef719d882d4438a0c34a7f657) -- [value \[1/2\]](#gaddf75957b595adaddd4f227b9834e20b) -- [value \[2/2\]](#ga84452c64348251edfe90fc61a5c561ac) - -## **Overview** - -**Description:** - -Provides high-speed, secure communication between devices. - -This module implements unified distributed communication capability management between nearby devices, and provides link-independent device discovery and transmission interfaces to support service publishing and data transmission. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - - - - -

File Name

-

Description

-

discovery_service.h

-

Declares unified device service publishing interfaces.

-

session.h

-

Declares unified data transmission interfaces.

-
- -## Data Structures - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

PublishInfo

-

Defines service provisioning information sent to a discovering device.

-

CapabilityMap

-

Defines the mapping between supported capabilities and bitmaps.

-

DeviceMap

-

Defines the mappings between the device type enumerations and device type names.

-

IPublishCallback

-

Defines the callbacks for successful and failed service publishing.

-

CommonDeviceInfo

-

Defines the type and content of a device to set.

-

ISessionListener

-

Defines session callbacks.

-
- -## Typedefs - - - - - - - - - - - - - - - - - - - -

Typedef Name

-

Description

-

PublishInfo

-

typedef struct PublishInfo

-

Defines service provisioning information sent to a discovering device.

-

DeviceType

-

typedef enum DeviceTypeEnum

-

Enumerates device types.

-

IPublishCallback

-

typedef struct IPublishCallback

-

Defines the callbacks for successful and failed service publishing.

-

CommonDeviceInfo

-

typedef struct CommonDeviceInfo

-

Defines the type and content of a device to set.

-
- -## Enumerations - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

ExchanageMedium { AUTO = 0, BLE = 1, COAP = 2, USB = 3 }

-

Enumerates media, such as Bluetooth, Wi-Fi, and USB, used for publishing services.

-

ExchangeFre { LOW = 0, MID = 1, HIGH = 2, SUPER_HIGH = 3 }

-

Enumerates frequencies for publishing services. This enumeration is involved only in Bluetooth and is not supported currently.

-

DiscoverMode { DISCOVER_MODE_PASSIVE = 0x55, DISCOVER_MODE_ACTIVE = 0xAA }

-

Enumerates the modes in which services are published. The publishing service supports the passive mode. Lite devices support the passive mode only.

-

PublishFailReason { PUBLISH_FAIL_REASON_NOT_SUPPORT_MEDIUM = 1, PUBLISH_FAIL_REASON_PARAMETER_INVALID = 2, PUBLISH_FAIL_REASON_UNKNOWN = 0xFF }

-

Enumerates failure reasons for publishing services.

-

DataBitMap { HICALL_CAPABILITY_BITMAP = 0, PROFILE_CAPABILITY_BITMAP = 1, HOMEVISIONPIC_CAPABILITY_BITMAP = 2, CASTPLUS_CAPABILITY_BITMAP, AA_CAPABILITY_BITMAP, DVKIT_CAPABILITY_BITMAP, DDMP_CAPABILITY_BITMAP }

-

Enumerates supported capabilities published by a device.

-

DeviceTypeEnum { UNKOWN = 0x00, PHONE = 0x0E, PAD = 0x11, TV = 0x9C, PC = 0x0C, AUDIO = 0x0A, CAR = 0x83, L0 = 0xF1, L1 = 0xF2 }

-

Enumerates device types.

-

CommonDeviceKey { COMM_DEVICE_KEY_DEVID = 0, COMM_DEVICE_KEY_DEVTYPE = 1, COMM_DEVICE_KEY_DEVNAME = 2, COMM_DEVICE_KEY_MAX }

-

Enumerates device information, such as its ID, type, and name.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

PublishService (const char *moduleName, const struct PublishInfo *info, const struct IPublishCallback *cb)

-

int

-

Publishes a service to the discovering device in the LAN.

-

UnPublishService (const char *moduleName, int publishId)

-

int

-

Unpublishes a service based on the publicId and moduleName.

-

SetCommonDeviceInfo (const struct CommonDeviceInfo *devInfo, unsigned int num)

-

int

-

Sets common device information, such as its ID, type, and name.

-

CreateSessionServer (const char *mouduleName, const char *sessionName, struct ISessionListener *listener)

-

int

-

Creates a session server based on a module name and session name.

-

RemoveSessionServer (const char *mouduleName, const char *sessionName)

-

int

-

Removes a session server based on a module name and session name.

-

SendBytes (int sessionId, const void *data, unsigned int len)

-

int

-

Sends data based on a session ID.

-

GetMySessionName (int sessionId, char *sessionName, unsigned int len)

-

int

-

Obtains the session name registered by the local device based on the session ID.

-

GetPeerSessionName (int sessionId, char *sessionName, unsigned int len)

-

int

-

Obtains the session name registered by the peer device based on the session ID.

-

GetPeerDeviceId (int sessionId, char *devId, unsigned int len)

-

int

-

Obtains the peer device ID based on a session ID.

-

CloseSession (int sessionId)

-

void

-

Closes a connected session based on a session ID.

-
- -## **Details** - -## **Typedef ** - -## CommonDeviceInfo - -``` -typedef struct [CommonDeviceInfo](CommonDeviceInfo.md) [CommonDeviceInfo](CommonDeviceInfo.md) -``` - - **Description:** - -Defines the type and content of a device to set. - -## DeviceType - -``` -typedef enum [DeviceTypeEnum](Softbus.md#gab20b49630026f3118d6c05b0a022f230) [DeviceType](Softbus.md#ga9334bacb3ded964dc3c3367a6b70bcf4) -``` - - **Description:** - -Enumerates device types. - -## IPublishCallback - -``` -typedef struct [IPublishCallback](IPublishCallback.md) [IPublishCallback](IPublishCallback.md) -``` - - **Description:** - -Defines the callbacks for successful and failed service publishing. - -## PublishInfo - -``` -typedef struct [PublishInfo](PublishInfo.md) [PublishInfo](PublishInfo.md) -``` - - **Description:** - -Defines service provisioning information sent to a discovering device. - -## **Enumeration Type ** - -## CommonDeviceKey - -``` -enum [CommonDeviceKey](Softbus.md#ga25be99ffbe88e41f7ce51d2678010254) -``` - - **Description:** - -Enumerates device information, such as its ID, type, and name. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
COMM_DEVICE_KEY_DEVID

Device ID. The value contains a maximum of 64 characters.

-
COMM_DEVICE_KEY_DEVTYPE

Device type. Currently, only ddmpCapability is supported.

-
COMM_DEVICE_KEY_DEVNAME

Device name. The value contains a maximum of 63 characters.

-
COMM_DEVICE_KEY_MAX

Reserved

-
- -## DataBitMap - -``` -enum [DataBitMap](Softbus.md#gab839c7f1fd448f52f003ab0693f27bb4) -``` - - **Description:** - -Enumerates supported capabilities published by a device. - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
HICALL_CAPABILITY_BITMAP

MeeTime

-
PROFILE_CAPABILITY_BITMAP

Video reverse connection in the smart domain

-
HOMEVISIONPIC_CAPABILITY_BITMAP

Gallery in Vision

-
CASTPLUS_CAPABILITY_BITMAP

cast+

-
AA_CAPABILITY_BITMAP

Input method in Vision

-
DVKIT_CAPABILITY_BITMAP

Device virtualization tool package

-
DDMP_CAPABILITY_BITMAP

Distributed middleware

-
- -## DeviceTypeEnum - -``` -enum [DeviceTypeEnum](Softbus.md#gab20b49630026f3118d6c05b0a022f230) -``` - - **Description:** - -Enumerates device types. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
UNKOWN

Unknown

-
PHONE

Smartphone

-
PAD

Tablet

-
TV

Smart TV

-
PC

PC

-
AUDIO

Audio device

-
CAR

Vehicle-mounted device

-
L0

Light device L0

-
L1

Light device L1

-
- -## DiscoverMode - -``` -enum [DiscoverMode](Softbus.md#ga7369479474cf45e9ca9c0f756473c74f) -``` - - **Description:** - -Enumerates the modes in which services are published. The publishing service supports the passive mode. Lite devices support the passive mode only. - - - - - - - - - - - - - -

Enumerator

-

Description

-
DISCOVER_MODE_PASSIVE

Passive

-
DISCOVER_MODE_ACTIVE

Proactive

-
- -## ExchanageMedium - -``` -enum [ExchanageMedium](Softbus.md#gaf5c7c122990f0ab5bd46b9bc47b5868b) -``` - - **Description:** - -Enumerates media, such as Bluetooth, Wi-Fi, and USB, used for publishing services. - -Currently, the media can only be set to coap. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
AUTO

Automatic medium selection

-
BLE

Bluetooth

-
COAP

Wi-Fi

-
USB

USB

-
- -## ExchangeFre - -``` -enum [ExchangeFre](Softbus.md#gacf2c77bd7e2c82784078762978123ea3) -``` - - **Description:** - -Enumerates frequencies for publishing services. This enumeration is involved only in Bluetooth and is not supported currently. - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
LOW

Low

-
MID

Medium

-
HIGH

High

-
SUPER_HIGH

Super-high

-
- -## PublishFailReason - -``` -enum [PublishFailReason](Softbus.md#ga6632fcae1db4a3a13370e3fb49e5e620) -``` - - **Description:** - -Enumerates failure reasons for publishing services. - -The failure reason is returned to the caller through the callback function. - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
PUBLISH_FAIL_REASON_NOT_SUPPORT_MEDIUM

Unsupported medium

-
PUBLISH_FAIL_REASON_PARAMETER_INVALID

Invalid parameter

-
PUBLISH_FAIL_REASON_UNKNOWN

Unknown reason

-
- -## **Function ** - -## CloseSession\(\) - -``` -void CloseSession (int sessionId) -``` - - **Description:** - -Closes a connected session based on a session ID. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sessionIdIndicates the session ID.
- -## CreateSessionServer\(\) - -``` -int CreateSessionServer (const char * mouduleName, const char * sessionName, struct [ISessionListener](ISessionListener.md) * listener ) -``` - - **Description:** - -Creates a session server based on a module name and session name. - -A maximum of 18 session servers can be created. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
moduleNameIndicates the pointer to the module name, which can be used to check whether the session server is in this module. The value cannot be empty and can contain a maximum of 64 characters.
sessionNameIndicates the pointer to the session name, which is the unique ID of the session server. The value cannot be empty and can contain a maximum of 64 characters.
listenerIndicates the pointer to the session callback structure, which cannot be empty.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - -**See also:** - -[RemoveSessionServer](Softbus.md#ga225a1e178544457263d94078e638b7b5) - -## GetMySessionName\(\) - -``` -int GetMySessionName (int sessionId, char * sessionName, unsigned int len ) -``` - - **Description:** - -Obtains the session name registered by the local device based on the session ID. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
sessionIdIndicates the session ID.
sessionNameIndicates the pointer to the buffer for storing the session name.
lenIndicates the length of the buffer.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - -## GetPeerDeviceId\(\) - -``` -int GetPeerDeviceId (int sessionId, char * devId, unsigned int len ) -``` - - **Description:** - -Obtains the peer device ID based on a session ID. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
sessionIdIndicates the session ID.
devIdIndicates the pointer to the buffer for storing the device ID.
lenIndicates the length of the buffer.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - -## GetPeerSessionName\(\) - -``` -int GetPeerSessionName (int sessionId, char * sessionName, unsigned int len ) -``` - - **Description:** - -Obtains the session name registered by the peer device based on the session ID. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
sessionIdIndicates the session ID.
sessionNameIndicates the pointer to the buffer for storing the session name.
lenIndicates the length of the buffer.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - -## PublishService\(\) - -``` -int PublishService (const char * moduleName, const struct [PublishInfo](PublishInfo.md) * info, const struct [IPublishCallback](IPublishCallback.md) * cb ) -``` - - **Description:** - -Publishes a service to the discovering device in the LAN. - -The **publicId** and **moduleName** uniquely identify a service. A maximum of three services can be published. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
moduleNameIndicates the pointer to the module name of the upper-layer service. The value contains a maximum of 63 bytes.
infoIndicates the pointer to the service to publish. For details, see PublishInfo.
cbIndicates the pointer to the callback for service publishing. For details, see IPublishCallback.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - -## RemoveSessionServer\(\) - -``` -int RemoveSessionServer (const char * mouduleName, const char * sessionName ) -``` - - **Description:** - -Removes a session server based on a module name and session name. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
moduleNameIndicates the pointer to the name of the registered module, which can be used to check whether the session server is in this module. The value cannot be empty and can contain a maximum of 64 characters.
sessionNameIndicates the pointer to the session name. The value cannot be empty and can contain a maximum of 64 characters.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - -**See also:** - -[CreateSessionServer](Softbus.md#gad7e95cced3378e8f489553d70b121392) - -## SendBytes\(\) - -``` -int SendBytes (int sessionId, const void * data, unsigned int len ) -``` - - **Description:** - -Sends data based on a session ID. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
sessionIdIndicates the session ID.
dataIndicates the pointer to the data to send, which cannot be NULL.
lenIndicates the length of the data to send. The maximum length cannot exceed 984 characters.
- -**Returns:** - -Returns **0** if the function is called successfully; returns **-1** otherwise. - -## SetCommonDeviceInfo\(\) - -``` -int SetCommonDeviceInfo (const struct [CommonDeviceInfo](CommonDeviceInfo.md) * devInfo, unsigned int num ) -``` - - **Description:** - -Sets common device information, such as its ID, type, and name. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
devInfoIndicates the pointer to the device information array.
2num Indicates the number of elements in the device information array. If the value is inconsistent with the length of the device information array, the program breaks down.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -**See also:** - -[PublishService](Softbus.md#ga010557e05b3f0b0b1a05157f1724e13a) - -## UnPublishService\(\) - -``` -int UnPublishService (const char * moduleName, int publishId ) -``` - - **Description:** - -Unpublishes a service based on the **publicId** and **moduleName**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
moduleNameIndicates the pointer to the module name of the upper-layer service. The value contains a maximum of 63 bytes.
publishIdIndicates the ID of the service to unpublish. The value must be greater than 0.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## **Variable ** - -## bitmap - -``` -[DataBitMap](Softbus.md#gab839c7f1fd448f52f003ab0693f27bb4) CapabilityMap::bitmap -``` - - **Description:** - -Bitmaps. For details, see [DataBitMap](Softbus.md#gab839c7f1fd448f52f003ab0693f27bb4). - -## capability \[1/2\] - -``` -const char* PublishInfo::capability -``` - - **Description:** - -[Service](Service.md) publishing capabilities. For details, see **g\_capabilityMap**. - -## capability \[2/2\] - -``` -char* CapabilityMap::capability -``` - - **Description:** - -Capability. For details, see **g\_capabilityMap**. - -## capabilityData - -``` -unsigned char* PublishInfo::capabilityData -``` - - **Description:** - -Capability data for service publishing - -## dataLen - -``` -unsigned int PublishInfo::dataLen -``` - - **Description:** - -Maximum length of the capability data for service publishing \(2 bytes\) - -## devType - -``` -[DeviceType](Softbus.md#ga9334bacb3ded964dc3c3367a6b70bcf4) DeviceMap::devType -``` - - **Description:** - -Enumeration of a device type. Only enumerations defined in **g\_devMap** are supported. - -## freq - -``` -[ExchangeFre](Softbus.md#gacf2c77bd7e2c82784078762978123ea3) PublishInfo::freq -``` - - **Description:** - -[Service](Service.md) publishing frequency - -## key - -``` -[CommonDeviceKey](Softbus.md#ga25be99ffbe88e41f7ce51d2678010254) CommonDeviceInfo::key -``` - - **Description:** - -Device information type. For details, see [CommonDeviceKey](Softbus.md#ga25be99ffbe88e41f7ce51d2678010254). - -## medium - -``` -[ExchanageMedium](Softbus.md#gaf5c7c122990f0ab5bd46b9bc47b5868b) PublishInfo::medium -``` - - **Description:** - -[Service](Service.md) publishing medium - -## mode - -``` -int PublishInfo::mode -``` - - **Description:** - -[Service](Service.md) publishing mode, which can be [DISCOVER\_MODE\_PASSIVE](Softbus.md#gga7369479474cf45e9ca9c0f756473c74fac6dc5925b6fb96b8e7e094dcb16b6ebf) or [DISCOVER\_MODE\_ACTIVE](Softbus.md#gga7369479474cf45e9ca9c0f756473c74fa9223119d2d3b76ce474ba46fcc2b2cdb) - -## onBytesReceived - -``` -void(* ISessionListener::onBytesReceived) (int sessionId, const void *data, unsigned int dataLen) -``` - - **Description:** - -Called when data is received. - -This function is used to notify that data is received. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
sessionIdIndicates the session ID.
dataIndicates the pointer to the data received.
dataLenIndicates the length of the data received.
- -## onPublishFail - -``` -void(* IPublishCallback::onPublishFail) (int publishId, [PublishFailReason](Softbus.md#ga6632fcae1db4a3a13370e3fb49e5e620) reason) -``` - - **Description:** - -Callback for failed publishing - -## onPublishSuccess - -``` -void(* IPublishCallback::onPublishSuccess) (int publishId) -``` - - **Description:** - -Callback for successful publishing - -## onSessionClosed - -``` -void(* ISessionListener::onSessionClosed) (int sessionId) -``` - - **Description:** - -Called when a session is closed. - -This function can be used to release resources related to the session. You do not need to call [CloseSession](Softbus.md#ga5b0c0b334f387f9c2753146ee0890780). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sessionIdIndicates the session ID.
- -## onSessionOpened - -``` -int(* ISessionListener::onSessionOpened) (int sessionId) -``` - - **Description:** - -Called when a session is opened. - -This function can be used to verify the session or initialize resources related to the session. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sessionIdIndicates the session ID.
- -**Returns:** - -Returns **0** if the session connection is accepted; returns a non-zero value otherwise \(you do not need to call [CloseSession](Softbus.md#ga5b0c0b334f387f9c2753146ee0890780) to close the session\). - -## publishId - -``` -int PublishInfo::publishId -``` - - **Description:** - -[Service](Service.md) publishing ID - -## value \[1/2\] - -``` -char* DeviceMap::value -``` - - **Description:** - -Name of a device type. Only names defined in **g\_devMap** are supported. - -## value \[2/2\] - -``` -const char* CommonDeviceInfo::value -``` - - **Description:** - -Content to set - diff --git a/api/api-SmartVision-Devices/Source.md b/api/api-SmartVision-Devices/Source.md deleted file mode 100755 index dd2de61f9940c34f91714ffd3712f2e41d739ae5..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Source.md +++ /dev/null @@ -1,81 +0,0 @@ -# Source - -## **Overview** - -**Related Modules:** - -[MultiMedia\_MediaCommon](MultiMedia_MediaCommon.md) - -**Description:** - -Provides functions to implement source-related operations. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Member Function Name

-

Description

-

Source (const std::string &uri)

-

 

-

A constructor used to create a Source instance based on a specified URI.

-

Source (const std::string &uri, const std::map< std::string, std::string > &header)

-

 

-

A constructor used to create a Source instance based on a specified URI and header.

-

Source (const std::shared_ptr< StreamSource > &stream, const Format &formats)

-

 

-

A constructor used to create a Source instance based on the stream source and format information.

-

GetSourceType () const

-

SourceType 

-

Obtains the source type.

-

GetSourceUri () const

-

const std::string & 

-

Obtains the media source URI.

-

GetSourceHeader () const

-

const std::map< std::string, std::string > & 

-

Obtains the HTTP header for the media source.

-

GetSourceStream () const

-

const std::shared_ptr< StreamSource > & 

-

Obtains information about the media source stream.

-

GetSourceStreamFormat () const

-

const Format

-

Obtains the media source stream format.

-
- diff --git a/api/api-SmartVision-Devices/SpiCfg.md b/api/api-SmartVision-Devices/SpiCfg.md deleted file mode 100755 index ce3b3e34e8e4564db87c129c711cbc363131fa44..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/SpiCfg.md +++ /dev/null @@ -1,103 +0,0 @@ -# SpiCfg - -- [Overview](#section1247638969165636) -- [Summary](#section519846771165636) -- [Data Fields](#pub-attribs) -- [Details](#section553147246165636) -- [Field](#section199850120165636) -- [bitsPerWord](#ac671a8fc23e2998243695c7bd27232f3) -- [maxSpeedHz](#a81369e5879c93f2747375dffbd5f975d) -- [mode](#a48b7732e7d6e53d5af6ad5ce36cb96d3) -- [transferMode](#a4193f45f83d1501f5e0ead393e1e55a1) - -## **Overview** - -**Related Modules:** - -[SPI](SPI.md) - -**Description:** - -Defines the configuration of an SPI device. - -Attention -: The specific SPI controller determines which variables in this structure are supported. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

maxSpeedHz

-

uint32_t

-

mode

-

uint16_t

-

transferMode

-

uint8_t

-

bitsPerWord

-

uint8_t

-
- -## **Details** - -## **Field ** - -## bitsPerWord - -``` -uint8_t SpiCfg::bitsPerWord -``` - - **Description:** - -Data transfer bit width - -## maxSpeedHz - -``` -uint32_t SpiCfg::maxSpeedHz -``` - - **Description:** - -Maximum clock frequency - -## mode - -``` -uint16_t SpiCfg::mode -``` - -## transferMode - -``` -uint8_t SpiCfg::transferMode -``` - - **Description:** - -Data transfer mode, as defined in [SpiTransferMode](SPI.md#ga55946d1d895fc2b7b33007019de1668f). - diff --git a/api/api-SmartVision-Devices/SpiDevInfo.md b/api/api-SmartVision-Devices/SpiDevInfo.md deleted file mode 100755 index 6b26b720d83092c9cb3d1255bd1df0d627ac16cb..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/SpiDevInfo.md +++ /dev/null @@ -1,72 +0,0 @@ -# SpiDevInfo - -- [Overview](#section911266885165636) -- [Summary](#section2004328004165636) -- [Data Fields](#pub-attribs) -- [Details](#section251235474165636) -- [Field](#section1389783708165636) -- [busNum](#a317656e748a353d8520d891e77c7b111) -- [csNum](#aff59a847b2a6144dd93047fff7841ec7) - -## **Overview** - -**Related Modules:** - -[SPI](SPI.md) - -**Description:** - -Defines the general SPI device descriptor, which can be used as the unique identifier of an SPI device. When operating an SPI device, you need to specify a descriptor of the [SpiDevInfo](SpiDevInfo.md) type, and obtain the handle of the SPI device by calling [SpiOpen](SPI.md#ga193e808f7e68a5b4c6b71ca2db47a11f). - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

busNum

-

uint32_t

-

csNum

-

uint32_t

-
- -## **Details** - -## **Field ** - -## busNum - -``` -uint32_t SpiDevInfo::busNum -``` - - **Description:** - -SPI bus number - -## csNum - -``` -uint32_t SpiDevInfo::csNum -``` - - **Description:** - -SPI device chip select \(CS\) - diff --git a/api/api-SmartVision-Devices/SpiMsg.md b/api/api-SmartVision-Devices/SpiMsg.md deleted file mode 100755 index d9beb3ed20b933133fe3447c254cbcd3171bf217..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/SpiMsg.md +++ /dev/null @@ -1,139 +0,0 @@ -# SpiMsg - -- [Overview](#section1972004157165636) -- [Summary](#section1293398165636) -- [Data Fields](#pub-attribs) -- [Details](#section770647843165636) -- [Field](#section1902860348165636) -- [csChange](#a1a38a03e30428aca7054cc8555b749a9) -- [delayUs](#a443b7f63c6b33719759eacf600da3aab) -- [len](#acb96c50b34d79d00277cbea9881b701a) -- [rbuf](#a575755ef9506c10199c47f636f1de1de) -- [speed](#adff9e15325aab2afb066a1f3489b55d5) -- [wbuf](#ae2aed8b3bd1d75a50f82c880a45cf521) - -## **Overview** - -**Related Modules:** - -[SPI](SPI.md) - -**Description:** - -Defines the custom SPI transfer message. - -Attention -: The specific SPI controller determines whether **speed**, **delayUs**, and **csChange** are supported. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

wbuf

-

uint8_t *

-

rbuf

-

uint8_t *

-

len

-

uint32_t

-

speed

-

uint32_t

-

delayUs

-

uint16_t

-

csChange

-

uint8_t

-
- -## **Details** - -## **Field ** - -## csChange - -``` -uint8_t SpiMsg::csChange -``` - - **Description:** - -Whether to switch off the CS before the next transfer when the current transfer has been completed. **1** indicates to switch off the CS; **0** indicates to switch on the CS. - -## delayUs - -``` -uint16_t SpiMsg::delayUs -``` - - **Description:** - -Delay \(in microseconds\) before starting the next transfer. The value **0** indicates there is no delay between transfers. - -## len - -``` -uint32_t SpiMsg::len -``` - - **Description:** - -Length of the read and write buffers. The read buffer and the write buffer have the same length. - -## rbuf - -``` -uint8_t* SpiMsg::rbuf -``` - - **Description:** - -Address of the read buffer - -## speed - -``` -uint32_t SpiMsg::speed -``` - - **Description:** - -Current message transfer speed - -## wbuf - -``` -uint8_t* SpiMsg::wbuf -``` - - **Description:** - -Address of the write buffer - diff --git a/api/api-SmartVision-Devices/StaBssParameters.md b/api/api-SmartVision-Devices/StaBssParameters.md deleted file mode 100755 index 151aef5ac2987b14afd1fdb6113ca4ca7ddf57ed..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/StaBssParameters.md +++ /dev/null @@ -1,49 +0,0 @@ -# StaBssParameters - -- [Overview](#section907757913165636) -- [Summary](#section340049584165636) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Defines parameters related to the WLAN module that works in station mode. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

flags

-

uint8_t

-

dtimPeriod

-

uint8_t

-

beaconInterval

-

uint16_t

-
- diff --git a/api/api-SmartVision-Devices/StaFlagUpdate.md b/api/api-SmartVision-Devices/StaFlagUpdate.md deleted file mode 100755 index ac0773a2a4d14aa1688e186da0978e7efee16c8e..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/StaFlagUpdate.md +++ /dev/null @@ -1,44 +0,0 @@ -# StaFlagUpdate - -- [Overview](#section628336818165636) -- [Summary](#section1326717296165636) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Defines the update of the **Sta** flag. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

mask

-

uint32_t

-

set

-

uint32_t

-
- diff --git a/api/api-SmartVision-Devices/StationDelParameters.md b/api/api-SmartVision-Devices/StationDelParameters.md deleted file mode 100755 index 69808b7c7e347c36b851678e5ec1959a4b14ed58..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/StationDelParameters.md +++ /dev/null @@ -1,49 +0,0 @@ -# StationDelParameters - -- [Overview](#section1539147886165636) -- [Summary](#section269797512165636) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Describes parameters for canceling a connection. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

mac

-

const uint8_t *

-

subtype

-

uint8_t

-

reasonCode

-

uint16_t

-
- diff --git a/api/api-SmartVision-Devices/StationInfo.md b/api/api-SmartVision-Devices/StationInfo.md deleted file mode 100755 index 7754205f91f1584e83c1667eff8c21dd5a3a8c70..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/StationInfo.md +++ /dev/null @@ -1,159 +0,0 @@ -# StationInfo - -- [Overview](#section1129406928165636) -- [Summary](#section1714801527165636) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Defines station information. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

filled

-

uint32_t

-

connectedTime

-

uint32_t

-

inactiveTime

-

uint32_t

-

llid

-

uint16_t

-

plid

-

uint16_t

-

rxBytes

-

uint64_t

-

txBytes

-

uint64_t

-

txRate

-

struct RateInfo

-

rxRate

-

struct RateInfo

-

rxPackets

-

uint32_t

-

txPackets

-

uint32_t

-

txPetries

-

uint32_t

-

txFailed

-

uint32_t

-

rxDroppedMisc

-

uint32_t

-

generation

-

int32_t

-

bssParam

-

struct StaBssParameters

-

staFlags

-

struct StaFlagUpdate

-

offset

-

int64_t

-

assocReqIes

-

const uint8_t *

-

assocReqIesLen

-

uint32_t

-

beaconLossCount

-

uint32_t

-

plinkState

-

uint8_t

-

signal

-

int8_t

-

signalAvg

-

int8_t

-

resv1

-

uint8_t

-
- diff --git a/api/api-SmartVision-Devices/SubImageInfo.md b/api/api-SmartVision-Devices/SubImageInfo.md deleted file mode 100755 index 8b83887fdc8bf8e904610c6598d432a2fedee6db..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/SubImageInfo.md +++ /dev/null @@ -1,140 +0,0 @@ -# SubImageInfo - -- [Overview](#section1046388078165636) -- [Summary](#section686124385165636) -- [Data Fields](#pub-attribs) -- [Details](#section418259339165636) -- [Field](#section1581362409165636) -- [dataLength](#a6a56c46ceb0f503a7b1c3c70276a84ac) -- [format](#a1ac1278b26a2e7a99b71d302c9c6ed14) -- [height](#a81833417dd54630e8d6ce888e2bcebaf) -- [rotate](#a101a202043f054757b7b24ff48cb1095) -- [thumbnail](#a27cce274c2816cd851be6eb21b2d6324) -- [width](#aef3b2ab41d5ff1e928b02fbba76fef36) - -## **Overview** - -**Related Modules:** - -[Format](Format.md) - -**Description:** - -Defines image information. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

format

-

CodecFormat

-

width

-

uint16_t

-

height

-

uint16_t

-

rotate

-

uint32_t

-

dataLength

-

uint32_t

-

thumbnail

-

bool

-
- -## **Details** - -## **Field ** - -## dataLength - -``` -uint32_t SubImageInfo::dataLength -``` - - **Description:** - -Image size - -## format - -``` -[CodecFormat](Format.md#gaf7ed135f15d4b218d41705bac0122ba7) SubImageInfo::format -``` - - **Description:** - -Image encoding format. For details, see [CodecFormat](Format.md#gaf7ed135f15d4b218d41705bac0122ba7). - -## height - -``` -uint16_t SubImageInfo::height -``` - - **Description:** - -Height, in pixels - -## rotate - -``` -uint32_t SubImageInfo::rotate -``` - - **Description:** - -Image rotation angle. The value can be **90**, **180**, or **270**. The default value is **0**. - -## thumbnail - -``` -bool SubImageInfo::thumbnail -``` - - **Description:** - -Thumbnail flag - -## width - -``` -uint16_t SubImageInfo::width -``` - - **Description:** - -Width, in pixels - diff --git a/api/api-SmartVision-Devices/Subscriber.md b/api/api-SmartVision-Devices/Subscriber.md deleted file mode 100755 index d42dd1cf3de8dd6651c776673be6d19899e49a5e..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Subscriber.md +++ /dev/null @@ -1,210 +0,0 @@ -# Subscriber - -- [Overview](#section2024935250165636) -- [Summary](#section1403630683165636) -- [Data Fields](#pub-attribs) -- [Details](#section1104851508165636) -- [Field](#section324310952165636) -- [AddTopic](#afc91fc1255ae42cba3d037bbe27096fd) -- [ModifyConsumer](#ab61beca9e502b1f6098ed49956a9ad51) -- [Subscribe](#a963e7a8519c854662e8ba901d08838ee) -- [Unsubscribe](#a37a99e64f59194d8f2191b91f566f0f4) - -## **Overview** - -**Related Modules:** - -[Broadcast](Broadcast.md) - -**Description:** - -Defines the subscriber for external interfaces to subscribe to events and data of a topic. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

AddTopic )(IUnknown *iUnknown, const Topic *topic)

-

int(*

-

Adds a specified topic to the Broadcast service.

-

Subscribe )(IUnknown *iUnknown, const Topic *topic, Consumer *consumer)

-

int(*

-

Subscribes to a specified topic for consumers.

-

ModifyConsumer )(IUnknown *iUnknown, const Topic *topic, Consumer *old, Consumer *current)

-

Consumer *(*

-

Modifies the consumer of a specified topic.

-

Unsubscribe )(IUnknown *iUnknown, const Topic *topic, const Consumer *consumer)

-

Consumer *(*

-

Unsubscribes from a specified topic.

-
- -## **Details** - -## **Field ** - -## AddTopic - -``` -int(* Subscriber::AddTopic) ([IUnknown](IUnknown.md) *iUnknown, const [Topic](Broadcast.md#gaf03f5bc94cad32ab628a6cdee09b0542) *topic) -``` - - **Description:** - -Adds a specified topic to the Broadcast service. - -The specified topic is added by the subscriber. A topic can be subscribed to only after being added. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
iUnknownIndicates external interface of the pub/sub feature.
topicIndicates the topic to be subscribed to.
- -**Returns:** - -Returns **EC\_SUCCESS** if the topic is successfully added; returns other error codes if the topic fails to be added. - -## ModifyConsumer - -``` -[Consumer](Consumer.md)*(* Subscriber::ModifyConsumer) ([IUnknown](IUnknown.md) *iUnknown, const [Topic](Broadcast.md#gaf03f5bc94cad32ab628a6cdee09b0542) *topic, [Consumer](Consumer.md) *old, [Consumer](Consumer.md) *current) -``` - - **Description:** - -Modifies the consumer of a specified topic. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
iUnknownIndicates the pointer to the external interface of the pub/sub feature.
topicIndicates the pointer to the topic whose consumer will be modified.
oldIndicates the pointer to the original consumer of the topic.
currentIndicates the pointer to the new consumer of the topic.
- -**Returns:** - -Returns the pointer of the original consumer if the modification is successful; returns **NULL** otherwise. - -## Subscribe - -``` -int(* Subscriber::Subscribe) ([IUnknown](IUnknown.md) *iUnknown, const [Topic](Broadcast.md#gaf03f5bc94cad32ab628a6cdee09b0542) *topic, [Consumer](Consumer.md) *consumer) -``` - - **Description:** - -Subscribes to a specified topic for consumers. - -Call this function on the subscriber. The topic to be subscribed to must have been added to the Broadcast service. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
iUnknownIndicates external interface of the pub/sub feature.
topicIndicates the topic to be subscribed to.
consumerIndicates the consumer who subscribes to the topic.
- -**Returns:** - -Returns **EC\_SUCCESS** if the subscription is successful; returns other error codes if the subscription fails. - -## Unsubscribe - -``` -[Consumer](Consumer.md)*(* Subscriber::Unsubscribe) ([IUnknown](IUnknown.md) *iUnknown, const [Topic](Broadcast.md#gaf03f5bc94cad32ab628a6cdee09b0542) *topic, const [Consumer](Consumer.md) *consumer) -``` - - **Description:** - -Unsubscribes from a specified topic. - -This function cancels the subscription relationship between the specified topic and consumer. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
iUnknownIndicates external interface of the pub/sub feature. This parameter is used to obtain subscription relationships.
topicIndicates the pointer to the topic to unsubscribe from.
consumerIndicates the pointer to the consumer.
- -**Returns:** - -Returns the pointer of the consumer if the unsubscription is successful; returns **NULL** otherwise. - diff --git a/api/api-SmartVision-Devices/SubscriberCallback.md b/api/api-SmartVision-Devices/SubscriberCallback.md deleted file mode 100755 index 98284c39ba5b17d23ab195ca3aa425d1bc68b13b..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/SubscriberCallback.md +++ /dev/null @@ -1,97 +0,0 @@ -# SubscriberCallback - -- [Overview](#section839425282165636) -- [Summary](#section2092979264165636) -- [Data Fields](#pub-attribs) -- [Details](#section1119853582165636) -- [Field](#section2073433366165636) -- [deviceObject](#af8640bdb30eb50c1d69781940b62c20d) -- [OnServiceConnected](#a71a9efad360e2944550c36a97791e6e6) - -## **Overview** - -**Related Modules:** - -[Core](Core.md) - -**Description:** - -Called when the driver subscribes to other driver services. - -The callback is used in the service subscription mechanism. After the driver is registered with the HDF, the HDF proactively invokes the callback after the subscribed-to driver is loaded. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - -

Variable Name

-

Description

-

deviceObject

-

struct HdfDeviceObject *

-

OnServiceConnected )(struct HdfDeviceObject *deviceObject, const struct HdfObject *service)

-

int32_t(*

-

Called by the HDF when the subscribed-to driver service is loaded.

-
- -## **Details** - -## **Field ** - -## deviceObject - -``` -struct [HdfDeviceObject](HdfDeviceObject.md)* SubscriberCallback::deviceObject -``` - - **Description:** - -Driver object of the subscriber - -## OnServiceConnected - -``` -int32_t(* SubscriberCallback::OnServiceConnected) (struct [HdfDeviceObject](HdfDeviceObject.md) *[deviceObject](SubscriberCallback.md#af8640bdb30eb50c1d69781940b62c20d), const struct [HdfObject](HdfObject.md) *service) -``` - - **Description:** - -Called by the HDF when the subscribed-to driver service is loaded. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
deviceObjectIndicates the pointer to the variable of the HdfDeviceObject type. This variable is generated by the HDF and passed to the driver.
serviceIndicates the pointer to the service object.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - diff --git a/api/api-SmartVision-Devices/SubtitleTrackInfo.md b/api/api-SmartVision-Devices/SubtitleTrackInfo.md deleted file mode 100755 index fd5f8b48df08dfaa66ea2e13fbc6b8ebab3f730f..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/SubtitleTrackInfo.md +++ /dev/null @@ -1,124 +0,0 @@ -# SubtitleTrackInfo - -- [Overview](#section860295795165636) -- [Summary](#section1449578668165636) -- [Data Fields](#pub-attribs) -- [Details](#section107940712165636) -- [Field](#section1828222786165636) -- [charSet](#a71f5455adc1defa10b4f292dede95f58) -- [format](#a8f0db970e60f19d5deb18fbbdbc7ea28) -- [language](#abb57b361b445696d272cf8bb54cb12d0) -- [originalFrameHeight](#a70c3d91bb8b6d8e79a22fe0206130a2f) -- [originalFrameWidth](#a7d5cefc1e9f402657c2f9c2950688472) - -## **Overview** - -**Related Modules:** - -[Format](Format.md) - -**Description:** - -Defines subtitle stream information. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

format

-

SubtitleFormat

-

charSet

-

uint32_t

-

language [FORMAT_MAX_LANGUAGE_NUM][FORMAT_LANGUAGE_LEN]

-

char

-

originalFrameWidth

-

uint16_t

-

originalFrameHeight

-

uint16_t

-
- -## **Details** - -## **Field ** - -## charSet - -``` -uint32_t SubtitleTrackInfo::charSet -``` - - **Description:** - -Character encoding format - -## format - -``` -[SubtitleFormat](Format.md#gadac45ce4731516c262292c15433439b3) SubtitleTrackInfo::format -``` - - **Description:** - -Subtitle encoding and decoding format. For details, see [SubtitleFormat](Format.md#gadac45ce4731516c262292c15433439b3) - -## language - -``` -char SubtitleTrackInfo::language[[FORMAT_MAX_LANGUAGE_NUM](Format.md#gac2d2d077edb8e9bb9f85ab6350015c5b)][[FORMAT_LANGUAGE_LEN](Format.md#gaa70508bb1089c99f9aa3d59fcbdfa8eb)] -``` - - **Description:** - -Subtitle language - -## originalFrameHeight - -``` -uint16_t SubtitleTrackInfo::originalFrameHeight -``` - - **Description:** - -Height of the original image. This variable is valid for the image subtitle. - -## originalFrameWidth - -``` -uint16_t SubtitleTrackInfo::originalFrameWidth -``` - - **Description:** - -Width of the original image. This variable is valid for the image subtitle. - diff --git a/api/api-SmartVision-Devices/Surface.md b/api/api-SmartVision-Devices/Surface.md deleted file mode 100755 index 68ffd5d2f3da8cd2f141d8289a60a6a13bf24ddc..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Surface.md +++ /dev/null @@ -1,1265 +0,0 @@ -# Surface - -- [Overview](#section528608066165625) -- [Summary](#section2009569207165625) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Enumerations](#enum-members) -- [Functions](#func-members) -- [Details](#section1212638750165625) -- [Enumeration Type](#section979445521165625) -- [BufferConsumerUsage](#ga16d4d4f73d748455e45924ffbdd1e891) -- [ImagePixelFormat](#gaa191d6e3b92a0f527744d43e056ae025) -- [Function](#section158831175165625) -- [AcquireBuffer\(\)](#ga7acd9899b1ca4eb02ed13d54c2aca0af) -- [CancelBuffer\(\)](#ga6bae4ebcdc4e300eb5a076054f3379e4) -- [CreateSurface\(\)](#ga49d6a759bec670ea5a47bee4eb252ae3) -- [FlushBuffer\(\)](#ga8af29f3c031c1b3effe8de7366579329) -- [GetFormat\(\)](#ga461caa118503a471c78ea09a8403a6ec) -- [GetHeight\(\)](#ga0e6be0887bd69cf749c0d994bd826699) -- [GetInt32\(\)](#ga54a916606158a8799fe421eb3842848e) -- [GetInt64\(\)](#ga3a442c71aee865c7b7a9bb6505ce800a) -- [GetPhyAddr\(\)](#ga5d797958fed83fdea15b3f6ad5ddf97e) -- [GetQueueSize\(\)](#gaff365f4d3178798ff28f0aaab9f467de) -- [GetSize\(\) \[1/2\]](#gaad9d0ca349b3f398b31c38ac9a650138) -- [GetSize\(\) \[2/2\]](#ga88e74ff7dc0ae3beb23df3ed00a81fc9) -- [GetStride\(\)](#ga5aabbb48f86992494c88ee2a7d00aa09) -- [GetStrideAlignment\(\)](#ga0d5317e6a008b8fd0ee98ebd516a0e7c) -- [GetUsage\(\)](#ga6a043b41406f282339bb68c1fc4793f9) -- [GetUserData\(\)](#gadd1c8826fd3191cd5f6a52594c5ef3ba) -- [GetVirAddr\(\)](#ga623d6c8ced742a36017bb71f6441b2a7) -- [GetWidth\(\)](#ga1220bd15e73d891105d310cf37422b56) -- [OnBufferAvailable\(\)](#ga9a99aa36b37197b2ca409b8f4e7335c7) -- [RegisterConsumerListener\(\)](#ga4b997a5b9493ad6d2015f86766f12b02) -- [ReleaseBuffer\(\)](#ga4150c81248f516882ef120731d9abb66) -- [RequestBuffer\(\)](#gacc46ffcd4258b2660dc6cde05854c4ac) -- [SetFormat\(\)](#ga8e44c9100296571a9294dc9851ef48dc) -- [SetInt32\(\)](#gaf4b467cb2d7015d00f4bcf77c5b19875) -- [SetInt64\(\)](#ga479eea3722e4d8448ead051c2f11cec5) -- [SetQueueSize\(\)](#ga44138c9aa20a108358da26893b92150c) -- [SetSize\(\) \[1/2\]](#ga818ee9015ff03d536b9a73d52f36b4f2) -- [SetSize\(\) \[2/2\]](#ga3b2391ee37e762fa0fb093585c084714) -- [SetStrideAlignment\(\)](#ga5b27f54101d9d3371038b73373c36530) -- [SetUsage\(\)](#ga01df6145a5fda3ba72c50258634720b8) -- [SetUserData\(\)](#gae264fef4c98719a7c34bc85442cd1a5b) -- [SetWidthAndHeight\(\)](#ga260c12281c283e5a0b63a49f24bd0cc0) -- [UnregisterConsumerListener\(\)](#ga0f303409d32d8d2b467888bf8fdc3223) -- [\~Surface\(\)](#ga1d35e9b436057032ec4598f24e31dbfb) - -## **Overview** - -**Description:** - -Provides the capabilities of applying for and releasing shared memory in multimedia and graphics scenarios. - -Provides shared memory for multimedia and graphics. - -This module is used to apply for and release shared memory and is used by the multimedia and graphics modules across processes. - -**Since:** - -1.0 - -**Version:** - -1.0 - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - - - - - - - - - - -

File Name

-

Description

-

ibuffer_consumer_listener.h

-

Declares the consumer listener used to notify consumers when the surface status is updated.

-

surface.h

-

Provides the capabilities of applying for and releasing shared memory in multimedia and graphics scenarios.

-

surface_buffer.h

-

Provides functions such as setting the virtual address, size, and additional attributes of shared memory.

-

surface_type.h

-

Provides the capabilities of setting shared memory parameters.

-
- -## Data Structures - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

OHOS::IBufferConsumerListener

-

Defines the consumer listener used to notify consumers when the surface status is updated.

-

OHOS::Surface

-

Defines the consumer listener used to notify consumers when the surface status is updated.

-

OHOS::SurfaceBuffer

-

Provides functions such as setting the virtual address, size, and additional attributes of shared memory.

-
- -## Enumerations - - - - - - - - - - - - - -

Enumeration Name

-

Description

-

OHOS::BufferConsumerUsage { OHOS::BUFFER_CONSUMER_USAGE_SORTWARE = 0, OHOS::BUFFER_CONSUMER_USAGE_HARDWARE, OHOS::BUFFER_CONSUMER_USAGE_HARDWARE_CONSUMER_CACHE, OHOS::BUFFER_CONSUMER_USAGE_HARDWARE_PRODUCER_CACHE, OHOS::BUFFER_CONSUMER_USAGE_MAX }

-

Enumerates shared memory usage scenarios, including physically contiguous memory and virtual memory.

-

OHOS::ImagePixelFormat { OHOS::IMAGE_PIXEL_FORMAT_NONE = 0, OHOS::IMAGE_PIXEL_FORMAT_RGB565 = 101, OHOS::IMAGE_PIXEL_FORMAT_ARGB1555, OHOS::IMAGE_PIXEL_FORMAT_RGB888, OHOS::IMAGE_PIXEL_FORMAT_ARGB8888, OHOS::IMAGE_PIXEL_FORMAT_YUYV = 201, OHOS::IMAGE_PIXEL_FORMAT_YVYU, OHOS::IMAGE_PIXEL_FORMAT_UYVY, OHOS::IMAGE_PIXEL_FORMAT_VYUY, OHOS::IMAGE_PIXEL_FORMAT_AYUV, OHOS::IMAGE_PIXEL_FORMAT_YUV410, OHOS::IMAGE_PIXEL_FORMAT_YVU410, OHOS::IMAGE_PIXEL_FORMAT_YUV411, OHOS::IMAGE_PIXEL_FORMAT_YVU411, OHOS::IMAGE_PIXEL_FORMAT_YUV420, OHOS::IMAGE_PIXEL_FORMAT_YVU420, OHOS::IMAGE_PIXEL_FORMAT_YUV422, OHOS::IMAGE_PIXEL_FORMAT_YVU422, OHOS::IMAGE_PIXEL_FORMAT_YUV444, OHOS::IMAGE_PIXEL_FORMAT_YVU444, OHOS::IMAGE_PIXEL_FORMAT_NV12 = 301, OHOS::IMAGE_PIXEL_FORMAT_NV21, OHOS::IMAGE_PIXEL_FORMAT_NV16, OHOS::IMAGE_PIXEL_FORMAT_NV61 }

-

Enumerates a pixel format.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

OHOS::IBufferConsumerListener::OnBufferAvailable ()=0

-

virtual void

-

Called to notify a consumer that a buffer is available for consumption.

-

OHOS::Surface::CreateSurface ()

-

static Surface *

-

A constructor used to create a Surface object for consumers to use.

-

OHOS::Surface::~Surface ()

-

virtual

-

A destructor used to delete the Surface instance.

-

OHOS::Surface::SetQueueSize (uint8_t queueSize)=0

-

virtual void

-

Sets the number of buffers that can be allocated to the surface. The default value is 1. The value range is [1, 10].

-

OHOS::Surface::GetQueueSize ()=0

-

virtual uint8_t

-

Obtains the number of surface buffers that can be allocated to the surface. The default value is 1. The value range is [1, 10].

-

OHOS::Surface::SetWidthAndHeight (uint32_t width, uint32_t height)=0

-

virtual void

-

Sets the width and height of the surface for calculating its stride and size. The default value range of width and height is (0,7680].

-

OHOS::Surface::GetWidth ()=0

-

virtual uint32_t

-

Obtains the width of the surface.

-

OHOS::Surface::GetHeight ()=0

-

virtual uint32_t

-

Obtains the height of the surface.

-

OHOS::Surface::SetFormat (uint32_t format)=0

-

virtual void

-

Sets the pixel format of the surface. For details, see ImageFormat. The default pixel format is IMAGE_PIXEL_FORMAT_RGB565.

-

OHOS::Surface::GetFormat ()=0

-

virtual uint32_t

-

Obtains the pixel format of the surface. For details, see ImageFormat. The default pixel format is IMAGE_PIXEL_FORMAT_RGB565.

-

OHOS::Surface::SetStrideAlignment (uint32_t strideAlignment)=0

-

virtual void

-

Sets the number of bytes for stride alignment.

-

OHOS::Surface::GetStrideAlignment ()=0

-

virtual uint32_t

-

Obtains the number of bytes for stride alignment. By default, 4-byte aligned is used.

-

OHOS::Surface::GetStride ()=0

-

virtual uint32_t

-

Obtains the stride of the surface.

-

OHOS::Surface::SetSize (uint32_t size)=0

-

virtual void

-

Sets the size of the shared memory to allocate.

-

OHOS::Surface::GetSize ()=0

-

virtual uint32_t

-

Obtains the size of the shared memory to allocate.

-

OHOS::Surface::SetUsage (uint32_t usage)=0

-

virtual void

-

Sets the usage scenario of the buffer. Physically contiguous memory and virtual memory (by default) are supported. By default, virtual memory is allocated.

-

OHOS::Surface::GetUsage ()=0

-

virtual uint32_t

-

Obtains the usage scenario of the buffer. Physically contiguous memory and virtual memory are supported.

-

OHOS::Surface::SetUserData (const std::string &key, const std::string &value)=0

-

virtual void

-

Sets surface user data, which is stored in the format of <key, value>.

-

OHOS::Surface::GetUserData (const std::string &key)=0

-

virtual std::string

-

Obtains surface user data.

-

OHOS::Surface::RequestBuffer (uint8_t wait=0)=0

-

virtual SurfaceBuffer *

-

Obtains a buffer to write data.

-

OHOS::Surface::FlushBuffer (SurfaceBuffer *buffer)=0

-

virtual int32_t

-

Flushes a buffer to the dirty queue for consumers to use.

-

OHOS::Surface::AcquireBuffer ()=0

-

virtual SurfaceBuffer *

-

Obtains a buffer.

-

OHOS::Surface::ReleaseBuffer (SurfaceBuffer *buffer)=0

-

virtual bool

-

Releases the consumed buffer.

-

OHOS::Surface::CancelBuffer (SurfaceBuffer *buffer)=0

-

virtual void

-

Releases a buffer to the free queue.

-

OHOS::Surface::RegisterConsumerListener (IBufferConsumerListener &listener)=0

-

virtual void

-

Registers a consumer listener.

-

OHOS::Surface::UnregisterConsumerListener ()=0

-

virtual void

-

Unregisters the consumer listener.

-

OHOS::SurfaceBuffer::GetVirAddr () const =0

-

virtual void *

-

Obtains the virtual address of shared memory for producers and consumers.

-

OHOS::SurfaceBuffer::GetPhyAddr () const =0

-

virtual uint64_t

-

Obtains the physical address of shared memory.

-

OHOS::SurfaceBuffer::GetSize () const =0

-

virtual uint32_t

-

Obtains the size of shared memory.

-

OHOS::SurfaceBuffer::SetSize (uint32_t size)=0

-

virtual void

-

Sets the size of shared memory.

-

OHOS::SurfaceBuffer::SetInt32 (uint32_t key, int32_t value)=0

-

virtual int32_t

-

Sets an extra attribute value of the int32 type.

-

OHOS::SurfaceBuffer::GetInt32 (uint32_t key, int32_t &value)=0

-

virtual int32_t

-

Obtains an extra attribute value of the int32 type.

-

OHOS::SurfaceBuffer::SetInt64 (uint32_t key, int64_t value)=0

-

virtual int32_t

-

Sets an extra attribute value of the int64 type.

-

OHOS::SurfaceBuffer::GetInt64 (uint32_t key, int64_t &value)=0

-

virtual int32_t

-

Obtains an extra attribute value of the int64 type.

-
- -## **Details** - -## **Enumeration Type ** - -## BufferConsumerUsage - -``` -enum [OHOS::BufferConsumerUsage](Surface.md#ga16d4d4f73d748455e45924ffbdd1e891) -``` - - **Description:** - -Enumerates shared memory usage scenarios, including physically contiguous memory and virtual memory. - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
BUFFER_CONSUMER_USAGE_SORTWARE

Virtual memory

-
BUFFER_CONSUMER_USAGE_HARDWARE

Physically contiguous memory. The cache is not used.

-
BUFFER_CONSUMER_USAGE_HARDWARE_CONSUMER_CACHE

Physically contiguous memory. Consumers use the cache.

-
BUFFER_CONSUMER_USAGE_HARDWARE_PRODUCER_CACHE

Physically contiguous memory. Producers use the cache.

-
BUFFER_CONSUMER_USAGE_MAX

Valid maximum value, used to determine whether the current shared memory usage scenario is within a proper range.

-
- -## ImagePixelFormat - -``` -enum [OHOS::ImagePixelFormat](Surface.md#gaa191d6e3b92a0f527744d43e056ae025) -``` - - **Description:** - -Enumerates a pixel format. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
IMAGE_PIXEL_FORMAT_NONE

Invalid pixel format

-
IMAGE_PIXEL_FORMAT_RGB565

RGB565 pixel format

-
IMAGE_PIXEL_FORMAT_ARGB1555

ARGB555 pixel format

-
IMAGE_PIXEL_FORMAT_RGB888

RGB888 pixel format

-
IMAGE_PIXEL_FORMAT_ARGB8888

ARGB8888 pixel format

-
IMAGE_PIXEL_FORMAT_YUYV

YUYV pixel format

-
IMAGE_PIXEL_FORMAT_YVYU

YVYU pixel format

-
IMAGE_PIXEL_FORMAT_UYVY

UYVY pixel format

-
IMAGE_PIXEL_FORMAT_VYUY

VYUY pixel format

-
IMAGE_PIXEL_FORMAT_AYUV

AYUV pixel format

-
IMAGE_PIXEL_FORMAT_YUV410

YUV410 pixel format

-
IMAGE_PIXEL_FORMAT_YVU410

YVU410 pixel format

-
IMAGE_PIXEL_FORMAT_YUV411

YUV411 pixel format

-
IMAGE_PIXEL_FORMAT_YVU411

YVU411 pixel format

-
IMAGE_PIXEL_FORMAT_YUV420

YUV420 pixel format

-
IMAGE_PIXEL_FORMAT_YVU420

YVU420 pixel format

-
IMAGE_PIXEL_FORMAT_YUV422

YUV422 pixel format

-
IMAGE_PIXEL_FORMAT_YVU422

YVU422 pixel format

-
IMAGE_PIXEL_FORMAT_YUV444

YUV444 pixel format

-
IMAGE_PIXEL_FORMAT_YVU444

YVU444 pixel format

-
IMAGE_PIXEL_FORMAT_NV12

NV12 pixel format

-
IMAGE_PIXEL_FORMAT_NV21

NV21 pixel format

-
IMAGE_PIXEL_FORMAT_NV16

NV16 pixel format

-
IMAGE_PIXEL_FORMAT_NV61

NV61 pixel format

-
- -## **Function ** - -## AcquireBuffer\(\) - -``` -virtual [SurfaceBuffer](OHOS-SurfaceBuffer.md)* OHOS::Surface::AcquireBuffer () -``` - - **Description:** - -Obtains a buffer. - -Consumers can use this function to obtain the buffer placed in the dirty queue by producers. If there is no buffer in the queue, **nullptr** is returned. - -**Returns:** - -Returns the pointer to the [SurfaceBuffer](OHOS-SurfaceBuffer.md) object. - -## CancelBuffer\(\) - -``` -virtual void OHOS::Surface::CancelBuffer ([SurfaceBuffer](OHOS-SurfaceBuffer.md) * buffer) -``` - - **Description:** - -Releases a buffer to the free queue. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
SurfaceBufferIndicates the pointer to the buffer to be released by producers.
- -## CreateSurface\(\) - -``` -static [Surface](OHOS-Surface.md)* OHOS::Surface::CreateSurface () -``` - - **Description:** - -A constructor used to create a [Surface](Surface.md) object for consumers to use. - -In multi-process scenarios, this function is provided for consumers to obtain buffers generated by producers for consumption. In single-process scenarios, this function can be used by both consumers and producers. - -## FlushBuffer\(\) - -``` -virtual int32_t OHOS::Surface::FlushBuffer ([SurfaceBuffer](OHOS-SurfaceBuffer.md) * buffer) -``` - - **Description:** - -Flushes a buffer to the dirty queue for consumers to use. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
SurfaceBufferIndicates the pointer to the buffer flushed by producers.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - -## GetFormat\(\) - -``` -virtual uint32_t OHOS::Surface::GetFormat () -``` - - **Description:** - -Obtains the pixel format of the surface. For details, see **ImageFormat**. The default pixel format is **IMAGE\_PIXEL\_FORMAT\_RGB565**. - -**Returns:** - -Returns the pixel format. - -## GetHeight\(\) - -``` -virtual uint32_t OHOS::Surface::GetHeight () -``` - - **Description:** - -Obtains the height of the surface. - -**Returns:** - -Returns the surface height, in pixels. - -## GetInt32\(\) - -``` -virtual int32_t OHOS::SurfaceBuffer::GetInt32 (uint32_t key, int32_t & value ) -``` - - **Description:** - -Obtains an extra attribute value of the int32 type. - -Obtains an extra attribute value of the int32 type, The extra attribute is stored in the format of . Each key corresponds to a value. If the key does not exist or the value is not int32, **-1** is returned. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the key of a key-value pair for which the value is to be obtained.
valueIndicates the value of the key-value pair obtained.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - -## GetInt64\(\) - -``` -virtual int32_t OHOS::SurfaceBuffer::GetInt64 (uint32_t key, int64_t & value ) -``` - - **Description:** - -Obtains an extra attribute value of the int64 type. - -Obtains an extra attribute value of the int64 type, The extra attribute is stored in the format of . Each key corresponds to a value. If the key does not exist or the value is not int64, **-1** is returned. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the key of a key-value pair for which the value is to be obtained.
valueIndicates the value of the key-value pair obtained.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - -## GetPhyAddr\(\) - -``` -virtual uint64_t OHOS::SurfaceBuffer::GetPhyAddr () const -``` - - **Description:** - -Obtains the physical address of shared memory. - -**Returns:** - -Returns the physical address of shared memory. - -## GetQueueSize\(\) - -``` -virtual uint8_t OHOS::Surface::GetQueueSize () -``` - - **Description:** - -Obtains the number of surface buffers that can be allocated to the surface. The default value is **1**. The value range is \[1, 10\]. - -**Returns:** - -Returns the number of buffers. - -## GetSize\(\) \[1/2\] - -``` -virtual uint32_t OHOS::SurfaceBuffer::GetSize () const -``` - - **Description:** - -Obtains the size of shared memory. - -**Returns:** - -Returns the size of shared memory. - -## GetSize\(\) \[2/2\] - -``` -virtual uint32_t OHOS::Surface::GetSize () -``` - - **Description:** - -Obtains the size of the shared memory to allocate. - -**Returns:** - -Returns the size of the shared memory. - -## GetStride\(\) - -``` -virtual uint32_t OHOS::Surface::GetStride () -``` - - **Description:** - -Obtains the stride of the surface. - -**Returns:** - -Returns the stride. - -## GetStrideAlignment\(\) - -``` -virtual uint32_t OHOS::Surface::GetStrideAlignment () -``` - - **Description:** - -Obtains the number of bytes for stride alignment. By default, 4-byte aligned is used. - -**Returns:** - -Returns the number of bytes for stride alignment. - -## GetUsage\(\) - -``` -virtual uint32_t OHOS::Surface::GetUsage () -``` - - **Description:** - -Obtains the usage scenario of the buffer. Physically contiguous memory and virtual memory are supported. - -**Returns:** - -Returns the usage scenario of the buffer. For details, see **BUFFER\_CONSUMER\_USAGE**. - -## GetUserData\(\) - -``` -virtual std::string OHOS::Surface::GetUserData (const std::string & key) -``` - - **Description:** - -Obtains surface user data. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
keyIndicates the key of a key-value pair for which the value is to be obtained.
- -**Returns:** - -Returns the value of the key-value pair obtained. - -## GetVirAddr\(\) - -``` -virtual void* OHOS::SurfaceBuffer::GetVirAddr () const -``` - - **Description:** - -Obtains the virtual address of shared memory for producers and consumers. - -**Returns:** - -Returns the virtual address of shared memory. - -## GetWidth\(\) - -``` -virtual uint32_t OHOS::Surface::GetWidth () -``` - - **Description:** - -Obtains the width of the surface. - -**Returns:** - -Returns the surface width, in pixels. - -## OnBufferAvailable\(\) - -``` -virtual void OHOS::IBufferConsumerListener::OnBufferAvailable () -``` - - **Description:** - -Called to notify a consumer that a buffer is available for consumption. - -## RegisterConsumerListener\(\) - -``` -virtual void OHOS::Surface::RegisterConsumerListener ([IBufferConsumerListener](OHOS-IBufferConsumerListener.md) & listener) -``` - - **Description:** - -Registers a consumer listener. - -When a buffer is placed in the dirty queue, **OnBufferAvailable** is called to notify consumers. If the listener is repeatedly registered, only the latest one is retained. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
IBufferConsumerListenerIndicates the listener to register.
- -## ReleaseBuffer\(\) - -``` -virtual bool OHOS::Surface::ReleaseBuffer ([SurfaceBuffer](OHOS-SurfaceBuffer.md) * buffer) -``` - - **Description:** - -Releases the consumed buffer. - -After a consumer has used a [SurfaceBuffer](OHOS-SurfaceBuffer.md) object, the consumer can release it through [ReleaseBuffer](Surface.md#ga4150c81248f516882ef120731d9abb66). The released object is placed into the free queue so that producers can apply for the object. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
SurfaceBufferIndicates the pointer to the buffer released.
- -**Returns:** - -Returns **true** if the buffer is released; returns **false** otherwise. - -## RequestBuffer\(\) - -``` -virtual [SurfaceBuffer](OHOS-SurfaceBuffer.md)* OHOS::Surface::RequestBuffer (uint8_t wait = 0) -``` - - **Description:** - -Obtains a buffer to write data. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
waitSpecifies whether the function waits for an available buffer. If wait is 1, the function waits until there is an available buffer in the free queue before returning a pointer. If the wait is 0, the function does not wait and returns nullptr if there is no buffer in the free queue. The default value is 0.
- -**Returns:** - -Returns the pointer to the buffer if the operation is successful; returns **nullptr** otherwise. - -## SetFormat\(\) - -``` -virtual void OHOS::Surface::SetFormat (uint32_t format) -``` - - **Description:** - -Sets the pixel format of the surface. For details, see **ImageFormat**. The default pixel format is **IMAGE\_PIXEL\_FORMAT\_RGB565**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
formatIndicates the pixel format to be set.
- -## SetInt32\(\) - -``` -virtual int32_t OHOS::SurfaceBuffer::SetInt32 (uint32_t key, int32_t value ) -``` - - **Description:** - -Sets an extra attribute value of the int32 type. - -Sets an extra attribute value of the int32 type, The extra attribute is stored in the format of . Each key corresponds to a value. If the same keys are used in two calls, the value in the second call overwrites that in the first call. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the key of a key-value pair to set.
valueIndicates the value of the key-value pair to set.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - -## SetInt64\(\) - -``` -virtual int32_t OHOS::SurfaceBuffer::SetInt64 (uint32_t key, int64_t value ) -``` - - **Description:** - -Sets an extra attribute value of the int64 type. - -Sets an extra attribute value of the int64 type. The storage mode of the extra attribute is . the value in the second call overwrites that in the first call. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the key of a key-value pair to set.
valueIndicates the value of the key-value pair to set.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - -## SetQueueSize\(\) - -``` -virtual void OHOS::Surface::SetQueueSize (uint8_t queueSize) -``` - - **Description:** - -Sets the number of buffers that can be allocated to the surface. The default value is **1**. The value range is \[1, 10\]. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
queueSizeIndicates the number of buffers to set.
- -## SetSize\(\) \[1/2\] - -``` -virtual void OHOS::SurfaceBuffer::SetSize (uint32_t size) -``` - - **Description:** - -Sets the size of shared memory. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sizeIndicates the size of shared memory to set.
- -## SetSize\(\) \[2/2\] - -``` -virtual void OHOS::Surface::SetSize (uint32_t size) -``` - - **Description:** - -Sets the size of the shared memory to allocate. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sizeIndicates the size of the shared memory. The value range is (0,58982400].
- -## SetStrideAlignment\(\) - -``` -virtual void OHOS::Surface::SetStrideAlignment (uint32_t strideAlignment) -``` - - **Description:** - -Sets the number of bytes for stride alignment. - -By default, 4-byte aligned is used. The value range is \[4,32\]. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
strideAlignmentIndicates the number of bytes for stride alignment.
- -## SetUsage\(\) - -``` -virtual void OHOS::Surface::SetUsage (uint32_t usage) -``` - - **Description:** - -Sets the usage scenario of the buffer. Physically contiguous memory and virtual memory \(by default\) are supported. By default, virtual memory is allocated. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
usageIndicates the usage scenario of the buffer. For details, see BUFFER_CONSUMER_USAGE.
- -## SetUserData\(\) - -``` -virtual void OHOS::Surface::SetUserData (const std::string & key, const std::string & value ) -``` - - **Description:** - -Sets surface user data, which is stored in the format of . - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the key of a key-value pair to store.
valueIndicates the value of the key-value pair to store.
- -## SetWidthAndHeight\(\) - -``` -virtual void OHOS::Surface::SetWidthAndHeight (uint32_t width, uint32_t height ) -``` - - **Description:** - -Sets the width and height of the surface for calculating its stride and size. The default value range of width and height is \(0,7680\]. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
widthIndicates the surface width, in pixels.
heightIndicates the surface height, in pixels.
- -## UnregisterConsumerListener\(\) - -``` -virtual void OHOS::Surface::UnregisterConsumerListener () -``` - - **Description:** - -Unregisters the consumer listener. - -After the listener is unregistered, no callback is triggered when a buffer is placed in the dirty queue. - -## \~Surface\(\) - -``` -virtual OHOS::Surface::~Surface () -``` - - **Description:** - -A destructor used to delete the **[Surface](OHOS-Surface.md)** instance. - -This function releases the surface and all buffers applied for the surface. - diff --git a/api/api-SmartVision-Devices/TIME-SYS.md b/api/api-SmartVision-Devices/TIME-SYS.md deleted file mode 100755 index 62962031627d753e8912aff436fee93c4f933bed..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/TIME-SYS.md +++ /dev/null @@ -1,321 +0,0 @@ -# TIME-SYS - -## **Overview** - -Provides time-related structures and functions. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - -

File Name

-

Description

-

time.h

-

Provides structures and functions related to the system time.

-
- -## Data Structures - - - - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

timeval

-

Describes a period of time, accurate to microseconds.

-

timespec

-

Describes a period of time, accurate to nanoseconds.

-

itimerval

-

Describes a timer.

-

timezone

-

Describes a time zone.

-
- -## Macros - - - - - - - - - - -

Macro Name and Value

-

Description

-

ITIMER_REAL    0

-

Defines the timer that runs in real time.

-
- -## Functions - - - - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

gettimeofday (struct timeval *__restrict value, void *__restrict ovalue)

-

int 

-

Obtains the system time and time zone.

-

getitimer (int w, struct itimerval *old)

-

int 

-

Obtains the value of an intermittent timer.

-

setitimer (int w, const struct itimerval *__restrict value, struct itimerval *__restrict ovalue)

-

int 

-

Sets the value for a timer.

-

settimeofday (const struct timeval *tv, const struct timezone *tz)

-

int 

-

Sets the system time and time zone.

-
- -## **Details** - -## **Function Documentation** - -## getitimer\(\) - -``` -int getitimer (int w, struct [itimerval](itimerval.md) * old ) -``` - - **Description:** - -Obtains the value of an intermittent timer. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
wIndicates the timer type. Only ITIMER_REAL is supported.
oldIndicates the pointer to the timer value.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Incorrect input or timer type.

-
- -## gettimeofday\(\) - -``` -int gettimeofday (struct [timeval](timeval.md) *__restrict value, void *__restrict ovalue ) -``` - - **Description:** - -Obtains the system time and time zone. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
valueIndicates the pointer to the timeval structure that contains the time.
ovalueThis parameter is used for compatibility only.
- -**Attention:** - -Currently, there is no time zone structure. The return value of **ovalue** is empty. - -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Incorrect input.

-
- -## setitimer\(\) - -``` -int setitimer (int w, const struct [itimerval](itimerval.md) *__restrict value, struct [itimerval](itimerval.md) *__restrict ovalue ) -``` - - **Description:** - -Sets the value for a timer. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
wIndicates the timer type. Currently, only ITIMER_REAL is supported.
valueIndicates the pointer to the timer value to set.
ovalueIndicates the pointer to the original timer value before the current setting, which can be NULL.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Incorrect input or timer type.

-
- -## settimeofday\(\) - -``` -int settimeofday (const struct [timeval](timeval.md) * tv, const struct [timezone](timezone.md) * tz ) -``` - - **Description:** - -Sets the system time and time zone. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
tvIndicates the pointer to the time to set.
tzIndicates the pointer to the time zone to set. This parameter is not used yet.
- -**Attention:** - -**tz** is invalid. The time is set internally using **clock\_settime**. - -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Incorrect input.

-
- diff --git a/api/api-SmartVision-Devices/TIME.md b/api/api-SmartVision-Devices/TIME.md deleted file mode 100755 index c5ea4a40d331b3646bde2b539493da8dc70ad12c..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/TIME.md +++ /dev/null @@ -1,1868 +0,0 @@ -# TIME - -- [Overview](#section537944755165622) -- [Summary](#section506383298165622) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Macros](#define-members) -- [Functions](#func-members) -- [Details](#section1629487800165622) -- [Function](#section1113575540165622) -- [asctime\(\)](#ga416a0a99a5bab4c030e93d21152727f4) -- [asctime\_r\(\)](#ga8eb1bca8a6fdc63173a83f1c8cb28e15) -- [clock\_getres\(\)](#ga822b364014350d2d70bbd0ccaab1f476) -- [clock\_gettime\(\)](#ga28ec1219021575a4b9a7c502b2e9a72c) -- [clock\_nanosleep\(\)](#ga23d3356807a1cb25b5f64651c4aa7d33) -- [clock\_settime\(\)](#ga04dbb6f7216d70a1b206741564d4d0fb) -- [ctime\(\)](#ga6e58d33339fabd469b2f4790b0f2b843) -- [ctime\_r\(\)](#gae6eed522503f70a5cf05be0be558b125) -- [difftime\(\)](#ga1901c00eb89e8e35ea193c6a4676679c) -- [ftime\(\)](#gad225ab16a149ff9aab8fb5c36f29ca0c) -- [getdate\(\)](#gae85b268128fa533b20949464ce34165a) -- [getitimer\(\)](#ga87cde44d5a31b1524f925d980c959985) -- [gettimeofday\(\)](#ga5ef4514eca25b6c6b73c5a54b8bc9e2b) -- [gmtime\(\)](#ga30d9732f32117a94652e28512905bfb9) -- [gmtime\_r\(\)](#ga91bb7adea9b0b36acde8dba3012c01a5) -- [localtime\(\)](#ga70311f8aa60fc5ebbd76c55ea10bc899) -- [localtime\_r\(\)](#gad8c4ed240ddbd645502ac2f0a306aee0) -- [mktime\(\)](#gafc0e3f373a3ea00b37714f1b621ae0b1) -- [nanosleep\(\)](#gafbe0e411e8bf89275e7cd46d0aeedc4b) -- [setitimer\(\)](#ga81245d77d2f570933cc81f13a101bff8) -- [settimeofday\(\)](#ga6e6617fc349ed4777425d667ff250fa7) -- [stime\(\)](#ga69f8377385b2eeee376712dc9f0e3f71) -- [strftime\(\)](#gab94643a711fc91727b668553d4a8806b) -- [strftime\_l\(\)](#ga74c011f36d0ad959f0312dec8a5c8dc8) -- [strptime\(\)](#ga8454b83c5b4fb93a9dcdd72ab586de22) -- [time\(\)](#gae7841e681c8c9d59818568d39553642c) -- [timegm\(\)](#ga4fd5240e99b2a9bf19bc0fe39f6ffc07) -- [timer\_create\(\)](#gaf7dce9c851a2e1a65aaf818b95487431) -- [timer\_delete\(\)](#ga61fa078bdadbd957cfcdfb12d0592ac1) -- [timer\_getoverrun\(\)](#ga6ecdedfd7f417a3d93aa7a18ff0ac582) -- [timer\_gettime\(\)](#ga8f65c6a88588c951e0b11629e56714a4) -- [timer\_settime\(\)](#gade973e87fffe05aed7f1e97c1d15178e) - -## **Overview** - -**Description:** - -Provides time-related structures and functions. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - - - - - - - -

File Name

-

Description

-

sys/time.h

-

Provides structures and functions related to the system time.

-

timeb.h

-

Provides structures and functions related to the curren time.

-

time.h

-

Provides time-related structures and functions.

-
- -## Data Structures - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

timeval

-

Describes a period of time, accurate to microseconds.

-

timespec

-

Describes a period of time, accurate to nanoseconds.

-

itimerval

-

Describes a timer.

-

timezone

-

Describes a time zone.

-

timeb

-

Describes the time, accurate to millisecond.

-

tm

-

Describes date and time information.

-

itimerspec

-

Sets a timer.

-
- -## Macros - - - - - - - - - - - - - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

ITIMER_REAL 0

-

Defines the timer that runs in real time.

-

CLOCK_REALTIME 0

-

Defines a real-time clock.

-

CLOCK_MONOTONIC 1

-

Defines a monotonic clock.

-

CLOCK_MONOTONIC_RAW 4

-

Defines a raw hardware-based monotonic clock.

-

CLOCK_REALTIME_COARSE 5

-

Defines a low-precision real-time clock.

-

CLOCK_MONOTONIC_COARSE 6

-

Defines a low-precision monotonic clock.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

gettimeofday (struct timeval *__restrict value, void *__restrict ovalue)

-

int

-

Obtains the system time and time zone.

-

getitimer (int w, struct itimerval *old)

-

int

-

Obtains the value of an intermittent timer.

-

setitimer (int w, const struct itimerval *__restrict value, struct itimerval *__restrict ovalue)

-

int

-

Sets the value for a timer.

-

settimeofday (const struct timeval *tv, const struct timezone *tz)

-

int

-

Sets the system time and time zone.

-

ftime (struct timeb *tp)

-

int

-

Obtains the current time, accurate to milliseconds.

-

time (time_t *t)

-

time_t

-

Obtains the time.

-

difftime (time_t time1, time_t time2)

-

double

-

Calculates the difference between two times, in seconds.

-

mktime (struct tm *tm)

-

time_t

-

Converts the broken-down time in the tm structure into seconds.

-

strftime (char *restrict s, size_t n, const char *restrict f, const struct tm *restrict tm)

-

size_t

-

Converts the broken-down time in the tm structure to a string in the required format.

-

gmtime (const time_t *t)

-

struct tm *

-

Converts the number of seconds to the UTC time in the tm structure.

-

localtime (const time_t *t)

-

struct tm *

-

Converts the number of seconds to the local time in the tm structure.

-

asctime (const struct tm *tm)

-

char *

-

Converts the broken-down time in the tm structure into a string.

-

ctime (const time_t *timep)

-

char *

-

Converts the date and time into a string.

-

strftime_l (char *__restrict s, size_t n, const char *__restrict f, const struct tm *__restrict tm, locale_t loc)

-

size_t

-

Converts the broken-down time in the tm structure to a string in a specified programming language and format.

-

gmtime_r (const time_t *__restrict t, struct tm *__restrict tm)

-

struct tm *

-

Converts the number of seconds to the UTC time in the tm structure. (This function is reentrant.)

-

localtime_r (const time_t *__restrict t, struct tm *__restrict tm)

-

struct tm *

-

Converts the number of seconds to the local time in the tm structure. (This function is reentrant.)

-

asctime_r (const struct tm *__restrict tm, char *__restrict buf)

-

char *

-

Converts the broken-down time in the tm structure into a string. (This function is reentrant.)

-

ctime_r (const time_t *t, char *buf)

-

char *

-

Converts the date and time into a string. (This function is reentrant.)

-

nanosleep (const struct timespec *tspec1, struct timespec *tspec2)

-

int

-

Pauses the current thread until a specified time arrives.

-

clock_getres (clockid_t id, struct timespec *tspec)

-

int

-

Obtains the precision of a clock.

-

clock_gettime (clockid_t id, struct timespec *tspec)

-

int

-

Obtains the time of a clock.

-

clock_settime (clockid_t id, const struct timespec *tspec)

-

int

-

Sets the time for a clock.

-

clock_nanosleep (clockid_t id, int flag, const struct timespec *tspec1, struct timespec *tspec2)

-

int

-

Pauses the current thread until a specified time of a clock arrives.

-

timer_create (clockid_t id, struct sigevent *__restrict evp, timer_t *__restrict t)

-

int

-

Creates a timer for the process.

-

timer_delete (timer_t t)

-

int

-

Deletes a timer for the process.

-

timer_settime (timer_t t, int flags, const struct itimerspec *__restrict val, struct itimerspec *__restrict old)

-

int

-

Sets a timer for the process.

-

timer_gettime (timer_t t, struct itimerspec *tspec)

-

int

-

Obtains a timer of the process.

-

timer_getoverrun (timer_t t)

-

int

-

Obtains the number of times that a timer overruns.

-

strptime (const char *s, const char *format, struct tm *tm)

-

char *

-

Converts a time string to the broken-down time in the tm structure.

-

getdate (const char *buf)

-

struct tm *

-

Converts a time string to the broken-down time in the tm structure.

-

stime (const time_t *t)

-

int

-

Sets the system time.

-

timegm (struct tm *tm)

-

time_t

-

Converts the broken-down time in the tm structure to the number of seconds.

-
- -## **Details** - -## **Function** - -## asctime\(\) - -``` -char* asctime (const struct [tm](tm.md) * tm) -``` - -**Description:** - -Converts the broken-down time in the [tm](tm.md) structure into a string. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-

tm

-

Indicates the pointer to the broken-down time in the tm structure.

-
- -**Returns:** - -Returns the string in the format of **week month day hour:minute:second year**, for example, **Thu Jan 1 08:00:00 1970**. If the conversion fails, the program ends. - -## asctime\_r\(\) - -``` -char* asctime_r (const struct [tm](tm.md) *__restrict tm, char *__restrict buf ) -``` - -**Description:** - -Converts the broken-down time in the [tm](tm.md) structure into a string. \(This function is reentrant.\) - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-

tm

-

Indicates the pointer to the broken-down time in the tm structure.

-

buf

-

Indicates the pointer to the buffer for storing the string.

-
- -**Returns:** - -Returns the string in the format of **week month day hour:minute:second year**, for example, **Thu Jan 1 08:00:00 1970**. If the conversion fails, the program ends. - -## clock\_getres\(\) - -``` -int clock_getres ([clockid_t](UTILS.md#ga391e4a62662054e5d3e1e071b8e54329) id, struct [timespec](timespec.md) * tspec ) -``` - -**Description:** - -Obtains the precision of a clock. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-

id

-

Indicates the clock ID, which can be CLOCK_REALTIME, CLOCK_REALTIME_COARSE, CLOCK_MONOTONIC, CLOCK_MONOTONIC_COARSE or CLOCK_MONOTONIC_RAW.

-

tspec

-

Indicates the pointer to the data obtained.

-
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - -## clock\_gettime\(\) - -``` -int clock_gettime ([clockid_t](UTILS.md#ga391e4a62662054e5d3e1e071b8e54329) id, struct [timespec](timespec.md) * tspec ) -``` - -**Description:** - -Obtains the time of a clock. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-

id

-

Indicates the clock ID, which can be CLOCK_REALTIME, CLOCK_REALTIME_COARSE, CLOCK_MONOTONIC, CLOCK_MONOTONIC_COARSE, or CLOCK_MONOTONIC_RAW.

-

tspec

-

Indicates the pointer to the time obtained.

-
- -**Attention:** - -[CLOCK\_REALTIME\_COARSE](TIME.md#gaccb072221e0afcac765ec2bb6e4eca04) and [CLOCK\_MONOTONIC\_COARSE](TIME.md#gaec7304645b1e13a52fa6dfb11f1c671b) are two new types of clock ID, which are optimized via virtual dynamic shared object \(vDSO\). - -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid input.

-
- -## clock\_nanosleep\(\) - -``` -int clock_nanosleep ([clockid_t](UTILS.md#ga391e4a62662054e5d3e1e071b8e54329) id, int flag, const struct [timespec](timespec.md) * tspec1, struct [timespec](timespec.md) * tspec2 ) -``` - -**Description:** - -Pauses the current thread until a specified time of a clock arrives. - -A sleeping thread cannot be woken up by a signal. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-

id

-

Indicates the clock ID. Only CLOCK_REALTIME is supported.

-

flag

-

Indicates the clock type. This parameter must be set to 0

-

tspec1

-

Indicates the pointer to the minimum duration that the current thread is paused. Currently, the unit of precision is tick, and the discrepancy is fewer than 2 ticks.

-

tspec2

-

This parameter is not used yet.

-
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid input.

-
- -## clock\_settime\(\) - -``` -int clock_settime ([clockid_t](UTILS.md#ga391e4a62662054e5d3e1e071b8e54329) id, const struct [timespec](timespec.md) * tspec ) -``` - -**Description:** - -Sets the time for a clock. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-

id

-

Indicates the clock ID. Only CLOCK_REALTIME is supported.

-

tspec

-

Indicates the pointer to the time to set.

-
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid input.

-
- -## ctime\(\) - -``` -char* ctime (const [time_t](UTILS.md#ga138ad62ac7715e7161bf6223e35d8323) * timep) -``` - -**Description:** - -Converts the date and time into a string. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-

timep

-

Indicates the number of seconds to convert.

-
- -**Returns:** - -Returns the string in the format of **week month day hour:minute:second year**, for example, **Thu Jan 1 08:00:00 1970**. If the conversion fails, the program ends. - -## ctime\_r\(\) - -``` -char* ctime_r (const [time_t](UTILS.md#ga138ad62ac7715e7161bf6223e35d8323) * t, char * buf ) -``` - -**Description:** - -Converts the date and time into a string. \(This function is reentrant.\) - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-

t

-

Indicates the pointer to the number of seconds to convert.

-

buf

-

Indicates the pointer to the buffer for storing the string.

-
- -**Returns:** - -Returns the string in the format of **week month day hour:minute:second year**, for example, **Thu Jan 1 08:00:00 1970**. If the conversion fails, the program ends. - -## difftime\(\) - -``` -double difftime ([time_t](UTILS.md#ga138ad62ac7715e7161bf6223e35d8323) time1, [time_t](UTILS.md#ga138ad62ac7715e7161bf6223e35d8323) time2 ) -``` - -**Description:** - -Calculates the difference between two times, in seconds. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-

time1

-

Indicates the first time.

-

time2

-

Indicates the second time.

-
- -**Returns:** - -Returns the difference, represented using a double. - -## ftime\(\) - -``` -int ftime (struct [timeb](timeb.md) * tp) -``` - -**Description:** - -Obtains the current time, accurate to milliseconds. - -The time obtained is the total number of milliseconds elapsed since January 1, 1970 00:00:00 \(UTC\). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-

tp

-

Indicates the pointer to the number of milliseconds. timezone and dstflag are set to 0.

-
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - -## getdate\(\) - -``` -struct [tm](tm.md)* getdate (const char * buf) -``` - -**Description:** - -Converts a time string to the broken-down time in the [tm](tm.md) structure. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-

buf

-

Indicates the pointer to the time string. The format is specified by the file defined by the environment variable DATEMSK.

-
- -**Returns:** - -Returns the time in the [tm](tm.md) structure if the operation is successful; returns **NULL** otherwise. - -## getitimer\(\) - -``` -int getitimer (int w, struct [itimerval](itimerval.md) * old ) -``` - -**Description:** - -Obtains the value of an intermittent timer. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-

w

-

Indicates the timer type. Only ITIMER_REAL is supported.

-

old

-

Indicates the pointer to the timer value.

-
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Incorrect input or timer type.

-
- -## gettimeofday\(\) - -``` -int gettimeofday (struct [timeval](timeval.md) *__restrict value, void *__restrict ovalue ) -``` - -**Description:** - -Obtains the system time and time zone. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-

value

-

Indicates the pointer to the timeval structure that contains the time.

-

ovalue

-

This parameter is used for compatibility only.

-
- -**Attention:** - -Currently, there is no time zone structure. The return value of **ovalue** is empty. - -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Incorrect input.

-
- -## gmtime\(\) - -``` -struct [tm](tm.md)* gmtime (const [time_t](UTILS.md#ga138ad62ac7715e7161bf6223e35d8323) * t) -``` - -**Description:** - -Converts the number of seconds to the UTC time in the [tm](tm.md) structure. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-

t

-

Indicates the pointer to the number of seconds to convert.

-
- -**Returns:** - -Returns the pointer to the UTC time in the [tm](tm.md) structure if the conversion is successful; returns **NULL** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EOVERFLOW

-

Inappropriate input parameter.

-
- -## gmtime\_r\(\) - -``` -struct [tm](tm.md)* gmtime_r (const [time_t](UTILS.md#ga138ad62ac7715e7161bf6223e35d8323) *__restrict t, struct [tm](tm.md) *__restrict tm ) -``` - -**Description:** - -Converts the number of seconds to the UTC time in the [tm](tm.md) structure. \(This function is reentrant.\) - -This function is used in the multi-task environment. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-

t

-

Indicates the pointer to the number of seconds to convert.

-

tm

-

Indicates the pointer to the tm structure.

-
- -**Returns:** - -Returns the pointer to the UTC time in the [tm](tm.md) structure if the conversion is successful; returns **NULL** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EOVERFLOW

-

Inappropriate input parameter.

-
- -## localtime\(\) - -``` -struct [tm](tm.md)* localtime (const [time_t](UTILS.md#ga138ad62ac7715e7161bf6223e35d8323) * t) -``` - -**Description:** - -Converts the number of seconds to the local time in the [tm](tm.md) structure. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-

t

-

Indicates the pointer to the number of seconds to convert.

-
- -**Returns:** - -Returns the pointer to the local time in the [tm](tm.md) structure if the conversion is successful; returns **NULL** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EOVERFLOW

-

Inappropriate input parameter.

-
- -## localtime\_r\(\) - -``` -struct [tm](tm.md)* localtime_r (const [time_t](UTILS.md#ga138ad62ac7715e7161bf6223e35d8323) *__restrict t, struct [tm](tm.md) *__restrict tm ) -``` - -**Description:** - -Converts the number of seconds to the local time in the [tm](tm.md) structure. \(This function is reentrant.\) - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-

t

-

Indicates the pointer to the number of seconds to convert.

-

tm

-

Indicates the pointer to the tm structure.

-
- -**Returns:** - -Returns the pointer to the local time in the [tm](tm.md) structure if the conversion is successful; returns **NULL** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EOVERFLOW

-

Inappropriate input parameter.

-
- -## mktime\(\) - -``` -[time_t](UTILS.md#ga138ad62ac7715e7161bf6223e35d8323) mktime (struct [tm](tm.md) * tm) -``` - -**Description:** - -Converts the broken-down time in the [tm](tm.md) structure into seconds. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-

tm

-

Indicates the pointer to the broken-down time in the tm structure.

-
- -**Returns:** - -Returns the total number of seconds elapsed since January 1, 1970 00:00:00 \(UTC\) if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EOVERFLOW

-

Inappropriate input parameter.

-
- -## nanosleep\(\) - -``` -int nanosleep (const struct [timespec](timespec.md) * tspec1, struct [timespec](timespec.md) * tspec2 ) -``` - -**Description:** - -Pauses the current thread until a specified time arrives. - -A sleeping thread cannot be woken up by a signal. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-

tspec1

-

Indicates the pointer to the minimum duration that the current thread is paused. Currently, the unit of precision is tick, and the discrepancy is fewer than 2 ticks.

-

tspec2

-

This parameter is not used yet.

-
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid input.

-
- -## setitimer\(\) - -``` -int setitimer (int w, const struct [itimerval](itimerval.md) *__restrict value, struct [itimerval](itimerval.md) *__restrict ovalue ) -``` - -**Description:** - -Sets the value for a timer. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-

w

-

Indicates the timer type. Currently, only ITIMER_REAL is supported.

-

value

-

Indicates the pointer to the timer value to set.

-

ovalue

-

Indicates the pointer to the original timer value before the current setting, which can be NULL.

-
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Incorrect input or timer type.

-
- -## settimeofday\(\) - -``` -int settimeofday (const struct [timeval](timeval.md) * tv, const struct [timezone](timezone.md) * tz ) -``` - -**Description:** - -Sets the system time and time zone. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-

tv

-

Indicates the pointer to the time to set.

-

tz

-

Indicates the pointer to the time zone to set. This parameter is not used yet.

-
- -**Attention:** - -**tz** is invalid. The time is set internally using **clock\_settime**. - -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Incorrect input.

-
- -## stime\(\) - -``` -int stime (const [time_t](UTILS.md#ga138ad62ac7715e7161bf6223e35d8323) * t) -``` - -**Description:** - -Sets the system time. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-

t

-

Indicates the pointer to the number of seconds to set.

-
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid input.

-
- -## strftime\(\) - -``` -size_t strftime (char *restrict s, size_t n, const char *restrict f, const struct [tm](tm.md) *restrict tm ) -``` - -**Description:** - -Converts the broken-down time in the [tm](tm.md) structure to a string in the required format. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-

s

-

Indicates the pointer to the string.

-

n

-

Indicates the size of the buffer for storing the string.

-

f

-

Indicates the pointer to the required format.

-

tm

-

Indicates the pointer to the broken-down time in the tm structure.

-
- -**Returns:** - -Returns the number of bytes in the string if the conversion is successful; returns **0** otherwise. - -## strftime\_l\(\) - -``` -size_t strftime_l (char *__restrict s, size_t n, const char *__restrict f, const struct [tm](tm.md) *__restrict tm, locale_t loc ) -``` - -**Description:** - -Converts the broken-down time in the [tm](tm.md) structure to a string in a specified programming language and format. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-

s

-

Indicates the pointer to the string.

-

n

-

Indicates the size of the buffer for storing the string.

-

f

-

Indicates the pointer to the required format.

-

tm

-

Indicates the pointer to the broken-down time in the tm structure.

-

loc

-

Indicates the required programming language. Currently, only C programming language is supported.

-
- -**Returns:** - -Returns the number of bytes in the string if the conversion is successful; returns **0** otherwise. - -## strptime\(\) - -``` -char* strptime (const char * s, const char * format, struct [tm](tm.md) * tm ) -``` - -**Description:** - -Converts a time string to the broken-down time in the [tm](tm.md) structure. - -This function parses the input string **s** based on **format** and stores the result in the [tm](tm.md) structure. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-

s

-

Indicates the pointer to the string that contains only time data.

-

format

-

Indicates the pointer to the required format.

-

tm

-

Indicates the pointer to the tm structure.

-
- -**Returns:** - -Returns the pointer to the position to which the string has been processed \(the next character to be processed\) upon the conversion completion if the operation is successful; returns **NULL** otherwise. - -## time\(\) - -``` -[time_t](UTILS.md#ga138ad62ac7715e7161bf6223e35d8323) time ([time_t](UTILS.md#ga138ad62ac7715e7161bf6223e35d8323) * t) -``` - -**Description:** - -Obtains the time. - -The time obtained is the total number of seconds elapsed since January 1, 1970 00:00:00 \(UTC\). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-

t

-

Indicates the pointer to the number of seconds. You can also pass NULL to use the return value.

-
- -**Returns:** - -Returns the number of seconds. - -## timegm\(\) - -``` -[time_t](UTILS.md#ga138ad62ac7715e7161bf6223e35d8323) timegm (struct [tm](tm.md) * tm) -``` - -**Description:** - -Converts the broken-down time in the [tm](tm.md) structure to the number of seconds. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-

tm

-

Indicates the pointer to the broken-down time in the tm structure to convert.

-
- -**Returns:** - -Returns the number of seconds if the operation is successful; returns **NULL** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EOVERFLOW

-

The input parameter is too long.

-
- -## timer\_create\(\) - -``` -int timer_create ([clockid_t](UTILS.md#ga391e4a62662054e5d3e1e071b8e54329) id, struct [sigevent](sigevent.md) *__restrict evp, [timer_t](UTILS.md#gacea9f425ec91056458fd7cd0b0923d1a) *__restrict t ) -``` - -**Description:** - -Creates a timer for the process. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-

id

-

Indicates the clock ID. Only CLOCK_REALTIME is supported.

-

evp

-

Indicates the pointer to the asynchronous notification signal and action, which can be NULL.

-

t

-

Indicates the pointer to the timer ID.

-
- -**Attention:** - -**sigev\_notify** in the **sigevent** structure must be [SIGEV\_SIGNAL](IPC.md#ga06d5881eeb84e6ac35f5b801c380dbb6). - -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid input.

-

ENOTSUP

-

The value of evp is not NULL and sigev_notify is not SIGEV_SIGNAL.

-
- -## timer\_delete\(\) - -``` -int timer_delete ([timer_t](UTILS.md#gacea9f425ec91056458fd7cd0b0923d1a) t) -``` - -**Description:** - -Deletes a timer for the process. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-

t

-

Indicates the ID of the timer to delete.

-
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid input.

-
- -## timer\_getoverrun\(\) - -``` -int timer_getoverrun ([timer_t](UTILS.md#gacea9f425ec91056458fd7cd0b0923d1a) t) -``` - -**Description:** - -Obtains the number of times that a timer overruns. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-

t

-

Indicates the ID of the timer to obtain.

-
- -**Returns:** - -Returns the number of times if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid input.

-
- -## timer\_gettime\(\) - -``` -int timer_gettime ([timer_t](UTILS.md#gacea9f425ec91056458fd7cd0b0923d1a) t, struct [itimerspec](itimerspec.md) * tspec ) -``` - -**Description:** - -Obtains a timer of the process. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-

t

-

Indicates the ID of the timer to obtain.

-

tspec

-

Indicates the pointer to the timer duration and interval.

-
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Incorrect parameter or timer operation failure.

-
- -## timer\_settime\(\) - -``` -int timer_settime ([timer_t](UTILS.md#gacea9f425ec91056458fd7cd0b0923d1a) t, int flags, const struct [itimerspec](itimerspec.md) *__restrict val, struct [itimerspec](itimerspec.md) *__restrict old ) -``` - -**Description:** - -Sets a timer for the process. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-

t

-

Indicates the ID of the timer to set.

-

flags

-

Indicates the type of the timer to set. This parameter is not supported and must be set to 0.

-

val

-

Indicates the pointer to the timer duration and interval to set.

-

old

-

Indicates the pointer to the timer duration and interval before the current setting.

-
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Incorrect parameter or timer operation failure.

-
- diff --git a/api/api-SmartVision-Devices/TaskConfig.md b/api/api-SmartVision-Devices/TaskConfig.md deleted file mode 100755 index c660ca9a99ec8cc8c8de044dbe775a98d05e675a..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/TaskConfig.md +++ /dev/null @@ -1,118 +0,0 @@ -# TaskConfig - -- [Overview](#section782171903165636) -- [Summary](#section664677408165636) -- [Data Fields](#pub-attribs) -- [Details](#section1671497423165636) -- [Field](#section1084727059165636) -- [level](#a9578c14c10691d7f1cbd8c34210630e7) -- [priority](#abbfc4d996107bc34e0443e1a32d46b6d) -- [queueSize](#ae8fd2e3f9bc0937c09e07944cc9a5d30) -- [stackSize](#a4a4fb5ce45d9ea90f42faa6573a03a61) -- [taskFlags](#afab151dbf2f1b02ec14e3e7f83207396) - -## **Overview** - -**Related Modules:** - -[Samgr](Samgr.md) - -**Description:** - -Defines task configurations for a service. - -This structure defines task configurations for a service, including the task priority, stack size, queue size, task type, and shared task ID. - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

level

-

int16

-

priority

-

int16

-

stackSize

-

uint16

-

queueSize

-

uint16

-

taskFlags

-

uint8

-
- -## **Details** - -## **Field ** - -## level - -``` -int16 TaskConfig::level -``` - - **Description:** - -ID of a multi-service sharing task. For details about the level definition, see [SpecifyTag](Samgr.md#gae9c7eed07272a46851d61e646b6e86d5). - -## priority - -``` -int16 TaskConfig::priority -``` - - **Description:** - -Task priority. For details about the definition of priority, see [TaskPriority](Samgr.md#gaef69bbb3353ea484414c3bbaf8ec362b). - -## queueSize - -``` -uint16 TaskConfig::queueSize -``` - - **Description:** - -Size of a task queue - -## stackSize - -``` -uint16 TaskConfig::stackSize -``` - - **Description:** - -Size of a task stack - -## taskFlags - -``` -uint8 TaskConfig::taskFlags -``` - - **Description:** - -Task type. For details about the taskFlags definition, see [TaskType](Samgr.md#gab265648f2dbef93878ad8c383712b43a). - diff --git a/api/api-SmartVision-Devices/TcpHeader.md b/api/api-SmartVision-Devices/TcpHeader.md deleted file mode 100755 index 4db234584f58b016a706e5d4eb3cc3cd6fc816af..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/TcpHeader.md +++ /dev/null @@ -1,79 +0,0 @@ -# TcpHeader - -- [Overview](#section1543189514165636) -- [Summary](#section683402754165636) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Defines the TCP header information of a data frame, including the source port number and destination port number. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

sPort

-

uint16_t

-

dPort

-

uint16_t

-

seqNum

-

uint32_t

-

ackNum

-

uint32_t

-

offset

-

uint8_t

-

flags

-

uint8_t

-

window

-

uint16_t

-

check

-

uint16_t

-

urgent

-

uint16_t

-
- diff --git a/api/api-SmartVision-Devices/TextAdapter.md b/api/api-SmartVision-Devices/TextAdapter.md deleted file mode 100755 index 55b4321013970cb690649a27b361df7b159f7d8d..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/TextAdapter.md +++ /dev/null @@ -1,141 +0,0 @@ -# TextAdapter - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines a text adapter, which implements [UILabel](UILabel.md) instance construction and supports text data and continuous integer data. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Member Function Name

-

Description

-

TextAdapter ()

-

 

-

A constructor used to create a UILabel instance.

-

~TextAdapter ()

-

virtual 

-

A destructor used to delete the UILabel instance.

-

GetView (UIView *inView, int16_t index) override

-

UIView

-

Obtains a UILabel instance to convert adapter data into another UILabel instance.

-

SetData (List< const char *> *data)

-

void 

-

Sets the UILabel adapter data, which is a string linked list.

-

SetData (int16_t start, int16_t end)

-

void 

-

Sets continuously increasing data. For example, if you need to set data 0, 1, 2, 3, 4, use this function to set start to 0 and end to 4.

-

SetFontId (uint8_t fontId)

-

void 

-

Sets font ID.

-

GetFontId () const

-

uint8_t 

-

Obtains font ID.

-

SetFont (const char *name, uint8_t size)

-

void 

-

Sets the font.

-

GetStyle ()

-

Style & 

-

Obtains the UILabel adapter style.

-

GetCount () override

-

virtual uint16_t 

-

Obtains the data size of the UILabel adapter.

-

SetWidth (int16_t width)

-

void 

-

Sets the width of UILabel constructed by the adapter.

-

SetDirect (UITextLanguageDirect direct)

-

void 

-

Sets the direction of the UILabel constructed by the adapter.

-

SetHeight (int16_t height)

-

void 

-

Sets the height of the UILabel constructed by the adapter.

-

SetLineBreakMode (const uint8_t lineBreakMode)

-

void 

-

Sets the LineBreakMode attribute of UILabel constructed by the adapter. For details about the values of LineBreakMode, see LINE_BREAK_ADAPT, LINE_BREAK_WRAP, LINE_BREAK_ELLIPSIS, and LINE_BREAK_MARQUEE.

-

SetOnClickListener (UIView::OnClickListener *clickListener)

-

void 

-

Sets the callback function to be invoked upon a click event.

-

SetTextFormatter (TextFormatter *formatter)

-

void 

-

Sets the text formatter.

-

AbstractAdapter ()

-

 

-

A constructor used to create an AbstractAdapter instance.

-

~AbstractAdapter ()

-

virtual 

-

A destructor used to delete the AbstractAdapter instance.

-
- diff --git a/api/api-SmartVision-Devices/TrackInfo.md b/api/api-SmartVision-Devices/TrackInfo.md deleted file mode 100755 index da56bef890c8546e9a4953ac1b5f2a1a229ea757..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/TrackInfo.md +++ /dev/null @@ -1,172 +0,0 @@ -# TrackInfo - -- [Overview](#section356081685165636) -- [Summary](#section1006894799165636) -- [Data Fields](#pub-attribs) -- [Details](#section1984291573165636) -- [Field](#section258879702165636) -- [audTrack](#a491fd1e304e19924d5d1c81aa07c3425) -- [imgTrack](#a6c7a67bd3651140b5551e407aa07fccc) -- [item](#a6548bea85adbb29bd0a4029a1d6f1c1c) -- [itemCnt](#aa3140178f070f85c2c778410b96db77a) -- [subTrack](#a3ae6adfd7981cd2e87223fb2d47f2805) -- [trackId](#aeb352032456b0841382a015d6f256529) -- [trackType](#a8b7ca46e972b746fb3f7a634cd07d6c4) -- [vidTrack](#aaa84d3f413e5d742953e6ba0d0a35276) - -## **Overview** - -**Related Modules:** - -[Format](Format.md) - -**Description:** - -Defines track information. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

trackType

-

TrackType

-

trackId

-

int32_t

-

itemCnt

-

int32_t

-

item

-

ParameterItem *

-

vidTrack

-

VideoTrackInfo

-

audTrack

-

AudioTrackInfo

-

subTrack

-

SubtitleTrackInfo

-

imgTrack

-

ImageTrackInfo

-
- -## **Details** - -## **Field ** - -## audTrack - -``` -[AudioTrackInfo](AudioTrackInfo.md) TrackInfo::audTrack -``` - - **Description:** - -Audio track information - -## imgTrack - -``` -[ImageTrackInfo](ImageTrackInfo.md) TrackInfo::imgTrack -``` - - **Description:** - -Image track information - -## item - -``` -[ParameterItem](ParameterItem.md)* TrackInfo::item -``` - - **Description:** - -Pointer to the array of extra track information, including HDR, DRM, and CAS - -## itemCnt - -``` -int32_t TrackInfo::itemCnt -``` - - **Description:** - -Number of extra track information entries - -## subTrack - -``` -[SubtitleTrackInfo](SubtitleTrackInfo.md) TrackInfo::subTrack -``` - - **Description:** - -Subtitle track information - -## trackId - -``` -int32_t TrackInfo::trackId -``` - - **Description:** - -Track index - -## trackType - -``` -[TrackType](Format.md#gad80740dd555f7d3688d2c4d9f44d3b04) TrackInfo::trackType -``` - - **Description:** - -Track type. For details, see [TrackType](Format.md#gad80740dd555f7d3688d2c4d9f44d3b04) - -## vidTrack - -``` -[VideoTrackInfo](VideoTrackInfo.md) TrackInfo::vidTrack -``` - - **Description:** - -Video track information - diff --git a/api/api-SmartVision-Devices/TrackSource.md b/api/api-SmartVision-Devices/TrackSource.md deleted file mode 100755 index 6c0c396823c892791e8c8027c64fcd4b4464595c..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/TrackSource.md +++ /dev/null @@ -1,115 +0,0 @@ -# TrackSource - -- [Overview](#section735209042165636) -- [Summary](#section1973261726165636) -- [Data Fields](#pub-attribs) -- [Details](#section1215343180165636) -- [Field](#section1495104159165636) -- [audioInfo](#a0cac47bdef450bfb8fd3b8ed882ef674) -- [dataInfo](#a89cccaaf705df735a3ab8e9792564105) -- [trackSourceType](#a39d729c668eddbf6b8403b7364e74b61) -- [videoInfo](#abee3acb91d3005141f11abd87c77aa83) - -## **Overview** - -**Related Modules:** - -[Format](Format.md) - -**Description:** - -Defines information about the muxer source. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

trackSourceType

-

TrackSourceType

-
  

union {

-
  

VideoTrackSourceInfo videoInfo

-
  

AudioTrackSourceInfo audioInfo

-
  

DataTrackSourceInfo dataInfo

-

trackSourceInfo

-

}

-

Defines detailed information about different types of stream sources.

-
- -## **Details** - -## **Field ** - -## audioInfo - -``` -[AudioTrackSourceInfo](AudioTrackSourceInfo.md) TrackSource::audioInfo -``` - - **Description:** - -Audio stream. For details, see [AudioTrackSourceInfo](AudioTrackSourceInfo.md). - -## dataInfo - -``` -[DataTrackSourceInfo](DataTrackSourceInfo.md) TrackSource::dataInfo -``` - - **Description:** - -Data stream. For details, see [DataTrackSourceInfo](DataTrackSourceInfo.md) - -## trackSourceType - -``` -[TrackSourceType](Format.md#ga953bc46f95d7b2d8866838d792f8f6aa) TrackSource::trackSourceType -``` - - **Description:** - -Stream source type. For details, see [TrackSourceType](Format.md#ga953bc46f95d7b2d8866838d792f8f6aa) - -## videoInfo - -``` -[VideoTrackSourceInfo](VideoTrackSourceInfo.md) TrackSource::videoInfo -``` - - **Description:** - -Video stream. For details, see [VideoTrackSourceInfo](VideoTrackSourceInfo.md). - diff --git a/api/api-SmartVision-Devices/UART.md b/api/api-SmartVision-Devices/UART.md deleted file mode 100755 index 53d9586f731a869c7b118c865159a9986f279f4d..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/UART.md +++ /dev/null @@ -1,499 +0,0 @@ -# UART - -- [Overview](#section1891658640165623) -- [Summary](#section34751695165623) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Enumerations](#enum-members) -- [Functions](#func-members) -- [Details](#section541110488165623) -- [Enumeration Type](#section1991208749165623) -- [UartTransMode](#gab9e041a0802a7e24da22215b458bf7db) -- [Function](#section372043577165623) -- [UartClose\(\)](#ga4702e7771c5088a9acf350a4cc6d3cdc) -- [UartGetAttribute\(\)](#gaff87cbe71e33c3cddfe41ccfbc422335) -- [UartGetBaud\(\)](#ga3abaa2855a7ffd0bd277e0524d4a9f6e) -- [UartOpen\(\)](#ga58c38269b20875dbbf924379edeec286) -- [UartRead\(\)](#gafd054e271c663816db676dedce506cf1) -- [UartSetAttribute\(\)](#ga76281a15464395451fc9844e717e0e10) -- [UartSetBaud\(\)](#ga1e7084df70420be7f8ef77d32da875d5) -- [UartSetTransMode\(\)](#ga99100dbfded04627fab8387abcbfd9a8) -- [UartWrite\(\)](#ga47eb7fa4bdedf14b494c89da50b0628b) - -## **Overview** - -**Description:** - -Defines standard APIs of universal asynchronous receiver/transmitter \(UART\) capabilities. - -You can use this module to access the UART and enable the driver to operate a UART-compliant device. The functions in this module help you to obtain and release the UART device handle, read and write data, obtain and set the baud rate and device attributes. - -**Since:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - -

File Name

-

Description

-

uart_if.h

-

Declares standard UART APIs.

-
- -## Data Structures - - - - - - - - - - -

Data Structure Name

-

Description

-

UartAttribute

-

Defines basic attributes of the UART port.

-
- -## Enumerations - - - - - - - - - - -

Enumeration Name

-

Description

-

UartTransMode { UART_MODE_RD_BLOCK = 0, UART_MODE_RD_NONBLOCK, UART_MODE_DMA_RX_EN, UART_MODE_DMA_RX_DIS, UART_MODE_DMA_TX_EN, UART_MODE_DMA_TX_DIS }

-

Enumerates UART transmission modes.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

UartOpen (uint32_t port)

-

DevHandle

-

Obtains the UART device handle.

-

UartClose (DevHandle handle)

-

void

-

Releases the UART device handle.

-

UartRead (DevHandle handle, uint8_t *data, uint32_t size)

-

int32_t

-

Reads data of a specified size from a UART device.

-

UartWrite (DevHandle handle, uint8_t *data, uint32_t size)

-

int32_t

-

Writes data of a specified size into a UART device.

-

UartGetBaud (DevHandle handle, uint32_t *baudRate)

-

int32_t

-

Obtains the baud rate of the UART device.

-

UartSetBaud (DevHandle handle, uint32_t baudRate)

-

int32_t

-

Sets the baud rate for the UART device.

-

UartGetAttribute (DevHandle handle, struct UartAttribute *attribute)

-

int32_t

-

Obtains the UART attribute.

-

UartSetAttribute (DevHandle handle, struct UartAttribute *attribute)

-

int32_t

-

Sets the UART attribute.

-

UartSetTransMode (DevHandle handle, enum UartTransMode mode)

-

int32_t

-

Sets the UART transmission mode.

-
- -## **Details** - -## **Enumeration Type ** - -## UartTransMode - -``` -enum [UartTransMode](UART.md#gab9e041a0802a7e24da22215b458bf7db) -``` - - **Description:** - -Enumerates UART transmission modes. - -**Attention:** - -The UART controller determines whether an enumerated transmission mode is supported. - - - - - - - - - - - - - - - - - - - - - - - - - -

Enumerator

-

Description

-
UART_MODE_RD_BLOCK

Blocking mode

-
UART_MODE_RD_NONBLOCK

Non-blocking mode

-
UART_MODE_DMA_RX_EN

DMA enabled for data receiving

-
UART_MODE_DMA_RX_DIS

DMA disabled for data receiving

-
UART_MODE_DMA_TX_EN

DMA enabled for data transmitting

-
UART_MODE_DMA_TX_DIS

DMA disabled for data transmitting

-
- -## **Function ** - -## UartClose\(\) - -``` -void UartClose ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle) -``` - - **Description:** - -Releases the UART device handle. - -If you no longer need to access the UART device, you should call this function to close its handle so as to release unused memory resources. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the UART device handle, which is obtained via UartOpen.
- -## UartGetAttribute\(\) - -``` -int32_t UartGetAttribute ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle, struct [UartAttribute](UartAttribute.md) * attribute ) -``` - - **Description:** - -Obtains the UART attribute. - -UART attributes include data bits, stop bits, parity bit, CTS, RTS, and receiving and transmitting FIFO. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the UART device handle, which is obtained via UartOpen.
attributeIndicates the pointer to the obtained UART attribute.
- -**Returns:** - -Returns **0** if the UART attribute is obtained; returns a negative number otherwise. - -## UartGetBaud\(\) - -``` -int32_t UartGetBaud ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle, uint32_t * baudRate ) -``` - - **Description:** - -Obtains the baud rate of the UART device. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the UART device handle, which is obtained via UartOpen.
baudRateIndicates the pointer to the obtained baud rate.
- -**Returns:** - -Returns **0** if the baud rate is obtained; returns a negative number otherwise. - -## UartOpen\(\) - -``` -[DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) UartOpen (uint32_t port) -``` - - **Description:** - -Obtains the UART device handle. - -Before accessing the UART device, you must call this function to obtain the UART device handle. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
portIndicates the UART port.
- -**Returns:** - -Returns the pointer to the UART device handle if the handle is obtained; returns **NULL** otherwise. - -## UartRead\(\) - -``` -int32_t UartRead ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle, uint8_t * data, uint32_t size ) -``` - - **Description:** - -Reads data of a specified size from a UART device. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the UART device handle, which is obtained via UartOpen.
dataIndicates the pointer to the buffer for receiving the data.
sizeIndicates the size of the data to read.
- -**Returns:** - -Returns the size of the data that is successfully read; returns a negative number if the reading fails. - -## UartSetAttribute\(\) - -``` -int32_t UartSetAttribute ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle, struct [UartAttribute](UartAttribute.md) * attribute ) -``` - - **Description:** - -Sets the UART attribute. - -UART attributes include data bits, stop bits, parity bit, CTS, RTS, and receiving and transmitting FIFO. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the UART device handle, which is obtained via UartOpen.
attributeIndicates the pointer to the UART attribute to set.
- -**Returns:** - -Returns **0** if the setting is successful; returns a negative number otherwise. - -## UartSetBaud\(\) - -``` -int32_t UartSetBaud ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle, uint32_t baudRate ) -``` - - **Description:** - -Sets the baud rate for the UART device. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the UART device handle, which is obtained via UartOpen.
baudRateIndicates the baud rate to set.
- -**Returns:** - -Returns **0** if the setting is successful; returns a negative number otherwise. - -## UartSetTransMode\(\) - -``` -int32_t UartSetTransMode ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle, enum [UartTransMode](UART.md#gab9e041a0802a7e24da22215b458bf7db) mode ) -``` - - **Description:** - -Sets the UART transmission mode. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the UART device handle, which is obtained via UartOpen.
modeIndicates a transmission mode enumerated in {@linkUartTransMode}.
- -**Returns:** - -Returns **0** if the setting is successful; returns a negative number otherwise. - -## UartWrite\(\) - -``` -int32_t UartWrite ([DevHandle](COMMON.md#gab8c2d38e46eec50bd097a27d3d8bf041) handle, uint8_t * data, uint32_t size ) -``` - - **Description:** - -Writes data of a specified size into a UART device. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
handleIndicates the pointer to the UART device handle, which is obtained via UartOpen.
dataIndicates the pointer to the data to write.
sizeIndicates the size of the data to write.
- -**Returns:** - -Returns **0** if the data is successfully written; returns a negative number otherwise. - diff --git a/api/api-SmartVision-Devices/UIChart.md b/api/api-SmartVision-Devices/UIChart.md deleted file mode 100755 index 2bd59ed002dc318d14825ccdc0b7ba83534c0338..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/UIChart.md +++ /dev/null @@ -1,726 +0,0 @@ -# UIChart - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines the chart class and provides functions such as adding and deleting data sets to display a chart. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Member Function Name

-

Description

-

UIChart ()

-

 

-

A constructor used to create a UIChart instance.

-

~UIChart ()

-

virtual 

-

A destructor used to delete the UIChart instance.

-

GetViewType () const override

-

UIViewType 

-

Obtains the view type.

-

SetHeight (int16_t height) override

-

void 

-

Sets the height for this component.

-

SetWidth (int16_t width) override

-

void 

-

Sets the width for this component.

-

OnPreDraw (const Rect &invalidatedArea) override

-

bool 

-

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

-

OnDraw (const Rect &invalidatedArea) override

-

void 

-

Called when a view is drawn.

-

AddDataSerial (UIChartDataSerial *dataSerial)

-

virtual bool 

-

Adds a data set.

-

DeleteDataSerial (UIChartDataSerial *dataSerial)

-

virtual bool 

-

Deletes a data set.

-

ClearDataSerial ()

-

virtual void 

-

Clears all data sets.

-

RefreshChart ()=0

-

virtual void 

-

Refreshes a chart and redraws the dirty region.

-

GetXAxis ()

-

UIXAxis

-

Obtains the x-axis instance.

-

GetYAxis ()

-

UIYAxis

-

Obtains the y-axis instance.

-

EnableReverse (bool enable)

-

void 

-

Enables chart reverse.

-

UIViewGroup ()

-

 

-

A default constructor used to create a UIViewGroup instance.

-

~UIViewGroup ()

-

virtual 

-

A destructor used to delete the UIViewGroup instance.

-

GetViewType () const override

-

UIViewType 

-

Obtains the view type.

-

Add (UIView *view)

-

virtual void 

-

Adds a child view.

-

Insert (UIView *prevView, UIView *insertView)

-

virtual void 

-

Inserts a new child view behind the current one.

-

Remove (UIView *view)

-

virtual void 

-

Removes a child view.

-

RemoveAll ()

-

virtual void 

-

Removes all child views.

-

GetTargetView (const Point &point, UIView **last) override

-

virtual void 

-

Obtains the target child view that is visible and can respond to touch events based on given coordinates.

-

MoveChildByOffset (int16_t x, int16_t y)

-

virtual void 

-

Moves all child views.

-

GetChildrenHead () const

-

UIView

-

Obtains the first child view in this view group.

-

GetChildrenTail () const

-

UIView

-

Obtains the last child view in this view group.

-

SetDisallowIntercept (bool flag)

-

void 

-

Sets whether this view group is intercepted upon touch events.

-

GetChildById (const char *id) const override

-

UIView

-

Obtains the target child view with a specified ID.

-

SetAutoSize (bool state)

-

void 

-

Sets whether the size of this view group is adaptive to that of all child views.

-

UIView ()

-

 

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

 

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual 

-

A destructor used to delete the UIView instance.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void 

-

Called after a view is drawn.

-

ReMeasure ()

-

virtual void 

-

Remeasures the view size.

-

Invalidate ()

-

void 

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void 

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool 

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool 

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool 

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool 

-

Called when the view stops dragging.

-

OnClickEvent (const ClickEvent &event)

-

virtual void 

-

Called when the view is clicked.

-

OnPressEvent (const PressEvent &event)

-

virtual void 

-

Called when the view is pressed.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void 

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void 

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void 

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *& 

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void 

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *& 

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void 

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *& 

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void 

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *& 

-

Obtains the touch event listener for the view.

-

SetParent (UIView *parent)

-

void 

-

Sets the parent view for the view.

-

GetParent () const

-

UIView

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void 

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void 

-

Sets whether the view is visible.

-

IsVisible () const

-

bool 

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void 

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool 

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void 

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool 

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void 

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool 

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect 

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect 

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect 

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect 

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect 

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect 

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void 

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

GetWidth ()

-

virtual int16_t 

-

Obtains the width for the view.

-

GetHeight ()

-

virtual int16_t 

-

Obtains the height for the view.

-

Resize (int16_t width, int16_t height)

-

virtual void 

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void 

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t 

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void 

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t 

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void 

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void 

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool 

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void 

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void 

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap

-

Obtains an affine transformation matrix.

-

SetViewId (const char *id)

-

void 

-

Sets the view ID.

-

GetViewId () const

-

const char * 

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void 

-

Sets the view index.

-

GetViewIndex () const

-

int16_t 

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void 

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void 

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void 

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void 

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void 

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void 

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void 

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void 

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void 

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void 

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void 

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void 

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void 

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void 

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void 

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void 

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

virtual void 

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void 

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t 

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style & 

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-
- -## Additional Inherited Members - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Additional Inherited Member Name

-

Description

-

GetAllChildRelativeRect () const

-

Obtains the rectangle area of a new view group after being adaptive to the size of all child views.

-

OnChildChanged ()

-

Performs operations needed after a child view is added or removed.

-

childrenHead_

-

Indicates the pointer to the first child view of this view group.

-

childrenTail_

-

Indicates the pointer to the last child view of this view group.

-

childrenNum_

-

Represents the number of child views.

-

isDragging_

-

Specifies the sliding state of this view group.

-

disallowIntercept_

-

Specifies whether this view group is intercepted upon touch events.

-

isAutoSize_

-

Specifies whether the size of this view group is adaptive to that of all child views.

-
- diff --git a/api/api-SmartVision-Devices/UILabel.md b/api/api-SmartVision-Devices/UILabel.md deleted file mode 100755 index cf9ee2d0e775bea214abcde2ba718cb874406953..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/UILabel.md +++ /dev/null @@ -1,703 +0,0 @@ -# UILabel - -## **Overview** - -**Related Modules:** - -[Graphic](Graphic.md) - -**Description:** - -Defines the functions for presenting a label in a specified area, setting the style and background color of a label, and setting the display mode of a long label text. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Public Types - - - - - - - - - -

Public Type Name

-

Description

-

LineBreakMode : uint8_t {   LINE_BREAK_ADAPT = 0, LINE_BREAK_STRETCH, LINE_BREAK_WRAP, LINE_BREAK_ELLIPSIS,   LINE_BREAK_MARQUEE, LINE_BREAK_CLIP, LINE_BREAK_MAX }

-

Enumerates the display modes of a long text.

-
- -## Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Member Function Name

-

Description

-

UILabel ()

-

 

-

A constructor used to create a UILabel instance.

-

~UILabel ()

-

virtual 

-

A destructor used to delete the UILabel instance.

-

GetViewType () const override

-

UIViewType 

-

Obtains the view type.

-

GetWidth () override

-

int16_t 

-

Obtains the width of this label.

-

GetHeight () override

-

int16_t 

-

Obtains the height of this label.

-

OnPreDraw (const Rect &invalidatedArea) override

-

bool 

-

Checks whether this label needs to be covered before drawing it.

-

OnDraw (const Rect &invalidatedArea) override

-

void 

-

Draws this label.

-

SetText (const char *text)

-

void 

-

Sets the text content for this label.

-

GetText () const

-

const char * 

-

Obtains the text of this label.

-

SetLineBreakMode (const uint8_t lineBreakMode)

-

void 

-

Sets the line break mode for this text.

-

GetLineBreakMode () const

-

uint8_t 

-

Obtains the line break mode of this text.

-

SetTextColor (ColorType color)

-

void 

-

Sets the color for this text.

-

GetTextColor () const

-

ColorType 

-

Obtains the color of this text.

-

SetAlign (UITextLanguageAlignment horizontalAlign, UITextLanguageAlignment verticalAlign=TEXT_ALIGNMENT_TOP)

-

void 

-

Sets the alignment mode for this text.

-

GetHorAlign () const

-

UITextLanguageAlignment 

-

Obtains the horizontal alignment mode.

-

GetVerAlign () const

-

UITextLanguageAlignment 

-

Obtains the vertical alignment mode.

-

SetDirect (UITextLanguageDirect direct)

-

void 

-

Sets the direction for this text.

-

GetDirect () const

-

UITextLanguageDirect 

-

Obtains the direction of this text.

-

SetFontId (uint8_t fontId)

-

void 

-

Sets the font ID for this label.

-

GetFontId () const

-

uint8_t 

-

Obtains the font ID composed of font name and size.

-

SetFont (const char *name, uint8_t size)

-

void 

-

Sets the font for this label.

-

SetRollSpeed (uint16_t speed)

-

void 

-

Sets the scroll speed for this text.

-

GetTextWidth ()

-

uint16_t 

-

Obtains the width of this text.

-

GetTextHeight ()

-

uint16_t 

-

Obtains the height of this text.

-

SetRollStartPos (int16_t pos)

-

void 

-

Sets the position where this text starts to roll.

-

GetRollStartPos () const

-

int16_t 

-

Obtains the position where this text starts to roll.

-

SetWidth (int16_t width) override

-

void 

-

Sets the width for this label.

-

SetHeight (int16_t height) override

-

void 

-

Sets the height for this label.

-

SetTextRotation (LabelRotateDegree angle)

-

void 

-

Sets the clockwise rotation angle for this text.

-

GetTextRotation () const

-

LabelRotateDegree 

-

Obtains the clockwise rotation degree of this text.

-

GetTextRotateDegree () const

-

uint16_t 

-

Obtains the number of text rotation degrees.

-

UIView ()

-

 

-

A default constructor used to create an UIView instance.

-

UIView (const char *id)

-

 

-

A constructor used to create an UIView instance.

-

~UIView ()

-

virtual 

-

A destructor used to delete the UIView instance.

-

OnPostDraw (const Rect &invalidatedArea)

-

virtual void 

-

Called after a view is drawn.

-

Invalidate ()

-

void 

-

Refreshes the invalidated area of the view.

-

InvalidateRect (const Rect &invalidatedArea)

-

void 

-

Refreshes a view in a specified invalidated area.

-

OnLongPressEvent (const LongPressEvent &event)

-

virtual bool 

-

Called when the view is long pressed.

-

OnDragStartEvent (const DragEvent &event)

-

virtual bool 

-

Called when the view starts to drag.

-

OnDragEvent (const DragEvent &event)

-

virtual bool 

-

Called when the view is being dragged.

-

OnDragEndEvent (const DragEvent &event)

-

virtual bool 

-

Called when the view stops dragging.

-

OnClickEvent (const ClickEvent &event)

-

virtual void 

-

Called when the view is clicked.

-

OnPressEvent (const PressEvent &event)

-

virtual void 

-

Called when the view is pressed.

-

OnReleaseEvent (const ReleaseEvent &event)

-

virtual void 

-

Called when the view is released.

-

OnCancelEvent (const CancelEvent &event)

-

virtual void 

-

Called when a click event on the view is canceled.

-

SetOnDragListener (OnDragListener *onDragListener)

-

void 

-

Sets a drag event listener for the view.

-

GetOnDragListener ()

-

OnDragListener *& 

-

Obtains the drag event listener for the view.

-

SetOnClickListener (OnClickListener *onClickListener)

-

void 

-

Sets a click event listener for the view.

-

GetOnClickListener ()

-

OnClickListener *& 

-

Obtains the click event listener for the view.

-

SetOnLongPressListener (OnLongPressListener *onLongPressListener)

-

void 

-

Sets a long-press event listener for the view.

-

GetOnLongPressListener ()

-

OnLongPressListener *& 

-

Obtains the long-press event listener for the view.

-

SetOnTouchListener (OnTouchListener *onTouchListener)

-

void 

-

Sets a touch event listener for the view.

-

GetTouchListener ()

-

OnTouchListener *& 

-

Obtains the touch event listener for the view.

-

GetTargetView (const Point &point, UIView **last)

-

virtual void 

-

Obtains the top-level view based on specified coordinates.

-

SetParent (UIView *parent)

-

void 

-

Sets the parent view for the view.

-

GetParent () const

-

UIView

-

Obtains the parent view of the view.

-

SetNextSibling (UIView *sibling)

-

void 

-

Sets the next sibling view for the view.

-

GetNextSibling () const

-

UIView

-

Obtains the next sibling view of the view.

-

SetVisible (bool visible)

-

virtual void 

-

Sets whether the view is visible.

-

IsVisible () const

-

bool 

-

Checks whether the view is visible.

-

SetTouchable (bool touch)

-

void 

-

Sets whether the view is touchable.

-

IsTouchable () const

-

bool 

-

Checks whether the view is touchable.

-

SetDraggable (bool draggable)

-

void 

-

Sets whether the view is draggable.

-

IsDraggable () const

-

bool 

-

Checks whether the view is draggable.

-

SetDragParentInstead (bool dragParentInstead)

-

void 

-

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

-

IsDragParentInstead () const

-

bool 

-

Obtains whether the view transfers a drag event to the parent view for processing.

-

GetRect () const

-

Rect 

-

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

-

GetVisibleRect () const

-

Rect 

-

Obtains the visible absolute rectangle area of the view.

-

GetMaskedRect () const

-

Rect 

-

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

-

GetOrigRect () const

-

Rect 

-

Obtains the absolute rectangle area of the view.

-

GetContentRect ()

-

virtual Rect 

-

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

-

GetRelativeRect () const

-

Rect 

-

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

-

ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

-

void 

-

Adjusts the size of the visible area. This operation may affect the final display size.

-

Resize (int16_t width, int16_t height)

-

virtual void 

-

Adjusts the size of the view.

-

SetX (int16_t x)

-

virtual void 

-

Sets the x-coordinate for the view.

-

GetX () const

-

int16_t 

-

Obtains the x-coordinate for the view.

-

SetY (int16_t y)

-

virtual void 

-

Sets the y-coordinate for the view.

-

GetY () const

-

int16_t 

-

Obtains the y-coordinate for the view.

-

SetPosition (int16_t x, int16_t y)

-

virtual void 

-

Sets the position for the view.

-

SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

-

virtual void 

-

Adjusts the position and size of the view.

-

IsViewGroup () const

-

bool 

-

Checks whether the view is a container view.

-

SetIntercept (bool isIntercept)

-

void 

-

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

-

SetTransformMap (const TransformMap &transMap)

-

void 

-

Sets the affine transformation matrix.

-

GetTransformMap ()

-

TransformMap

-

Obtains an affine transformation matrix.

-

GetChildById (const char *id) const

-

virtual UIView

-

Obtains the child view of a specified ID.

-

SetViewId (const char *id)

-

void 

-

Sets the view ID.

-

GetViewId () const

-

const char * 

-

Obtains the view ID.

-

SetViewIndex (int16_t index)

-

void 

-

Sets the view index.

-

GetViewIndex () const

-

int16_t 

-

Obtains the view index.

-

LayoutChildren (bool neeInvalidate=false)

-

virtual void 

-

Lays out all child views according to the preset arrangement mode.

-

LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

-

void 

-

Lays out the view in the center of the parent view.

-

LayoutLeftOfParent (int16_t offset=0)

-

void 

-

Lays out the view on the left of the parent view.

-

LayoutRightOfParent (int16_t offset=0)

-

void 

-

Lays out the view on the right of the parent view.

-

LayoutTopOfParent (int16_t offset=0)

-

void 

-

Lays out the view on the top of the parent view.

-

LayoutBottomOfParent (int16_t offset=0)

-

void 

-

Lays out the view on the bottom of the parent view.

-

AlignLeftToSibling (const char *id, int16_t offset=0)

-

void 

-

Aligns the view with the left of a sibling view.

-

AlignRightToSibling (const char *id, int16_t offset=0)

-

void 

-

Aligns the view with the right of a sibling view.

-

AlignTopToSibling (const char *id, int16_t offset=0)

-

void 

-

Aligns the view with the top of a sibling view.

-

AlignBottomToSibling (const char *id, int16_t offset=0)

-

void 

-

Aligns the view with the bottom of a sibling view.

-

AlignHorCenterToSibling (const char *id, int16_t offset=0)

-

void 

-

Aligns the view with the center of a sibling view in the x-axis.

-

AlignVerCenterToSibling (const char *id, int16_t offset=0)

-

void 

-

Aligns the view with the center of a sibling view in the y-axis.

-

LayoutLeftToSibling (const char *id, int16_t offset=0)

-

void 

-

Lays out the view on the left of a sibling view.

-

LayoutRightToSibling (const char *id, int16_t offset=0)

-

void 

-

Lays out the view on the right of a sibling view.

-

LayoutTopToSibling (const char *id, int16_t offset=0)

-

void 

-

Lays out the view on the above of a sibling view.

-

LayoutBottomToSibling (const char *id, int16_t offset=0)

-

void 

-

Lays out the view on the below of a sibling view.

-

SetStyle (Style &style)

-

virtual void 

-

Sets the view style.

-

SetStyle (uint8_t key, int64_t value)

-

virtual void 

-

Sets a style.

-

GetStyle (uint8_t key) const

-

virtual int64_t 

-

Obtains the value of a style.

-

GetStyleConst () const

-

const Style & 

-

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

-
- diff --git a/api/api-SmartVision-Devices/UTILS.md b/api/api-SmartVision-Devices/UTILS.md deleted file mode 100755 index 778d300fb533f82b718cc4641aa85d30e4dc9af0..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/UTILS.md +++ /dev/null @@ -1,17282 +0,0 @@ -# UTILS - -- [Overview](#section846526394165622) -- [Summary](#section1272389859165622) -- [Files](#files) -- [Data Structures](#nested-classes) -- [Macros](#define-members) -- [Typedefs](#typedef-members) -- [Functions](#func-members) -- [Details](#section393168992165622) -- [Macro Definition](#section1350745431165622) -- [\_tolower](#ga803da2fa3d4650c493068eb474e5e874) -- [\_toupper](#ga2a220adaae919f631f86e4ee91667ac2) -- [isascii](#ga325ce1f1d55d5b154a914a37b1094cf2) -- [strdupa](#ga6dfceaa174558eaee80a23cb09139dfd) -- [va\_arg](#ga9cfd655f1203c9a345ddd90446f0bcee) -- [va\_copy](#ga23a32070bb5595761e7ed3884a84eb4a) -- [va\_end](#ga823b205416e9129825841b74c3bf8484) -- [va\_start](#gaa0628ab596c3d7e78f5e08c2d98e24da) -- [Function](#section1154014736165622) -- [\_Exit\(\)](#ga7631d470a867ad04b3272667ea4b643e) -- [\_exit\(\)](#gaee2ffcdf92b92a337c592a7ef9174769) -- [a64l\(\)](#gaed396b4eb37b2a1f5414f9c21749dadb) -- [abort\(\)](#ga7d78319026a43c0a5f942436ad3f09a1) -- [abs\(\)](#gaf15d7205d8d10c4820f997ce5c526279) -- [access\(\)](#gaeff22ad09b35eda92f6c5632300b05da) -- [alarm\(\)](#ga8c476685d78ea93ee343f8a0580c79fe) -- [assert\(\)](#ga901e482eabd0dedb19224cf731e15403) -- [atexit\(\)](#ga7fd89c82095df80e5e12d6b2834a2acc) -- [atof\(\)](#gac03da055b7752247b034fb582cb4372f) -- [atoi\(\)](#gad228deceea1bac4d9f171f647c265059) -- [atol\(\)](#ga185551efd32d058ef290ebe2d144219f) -- [atoll\(\)](#ga5d0555f6ac42472671281e5903244b7b) -- [bcmp\(\)](#ga840ecc6fc750bf00e99015d2817b0e12) -- [bcopy\(\)](#ga2bf0688adef533a3285e7e0c00f98ff8) -- [bsearch\(\)](#gac1ed47dda697f858893a9a68882a9fab) -- [btowc\(\)](#ga263759bc74f8621e89e6077095caa942) -- [bzero\(\)](#ga59505af7f1c47ff01fdb944801642033) -- [calloc\(\)](#ga62b7798461bd461da64c5f9d35feddf7) -- [chdir\(\)](#ga03af571dfb595681bfa203c83385c07b) -- [chown\(\)](#ga7c080ffcae5180218dda2df501e0cb15) -- [close\(\)](#gaafbcde67669a1b96577e735ddebd8634) -- [crypt\(\)](#gaa25acd51546dafe1b44c97de30188589) -- [div\(\)](#ga98cbdcca43b259bf545f16c72f07825b) -- [drand48\(\)](#gaf9329f9acef07ca14ea2256191c3ce74) -- [dup\(\)](#ga2599c985f9cce0d9d7b11732941bd9dc) -- [dup2\(\)](#ga0bbddf8ae4f3dea6e57532be36c04268) -- [ecvt\(\)](#ga888afe4104cd3bdc07445d8ed27b96bd) -- [erand48\(\)](#ga95f02f2831f093c6e151f0b782f20e48) -- [execl\(\)](#ga1ade18bb3b763fbcefc507c770dc7e7e) -- [execle\(\)](#ga2c2701379e4144b3105aa83c82363aa3) -- [execlp\(\)](#ga4dd268acb7fc54f403ab6cb56b7ffd3f) -- [execv\(\)](#gadb609bbc5b9255bf715138cda88857b0) -- [execve\(\)](#ga99ca2b673a47850c541b215ddfd6b23e) -- [execvp\(\)](#ga1bbb0ecd56c097ca82587115b4dfd540) -- [exit\(\)](#ga55e99c539cf7723ec15e856b7e0a8cee) -- [fcvt\(\)](#gaf2658700b7da33eea87761f928b102de) -- [ffs\(\)](#ga2385d975eddea296daa497e5d36febc9) -- [ffsl\(\)](#ga73690a58537a6dbafa9aa4b3afa7baac) -- [ffsll\(\)](#gae7eaa572ad4e097865bd409b121fb33c) -- [fgetwc\(\)](#ga2b545d8d6d3209a2eb6129d8ba646fe3) -- [fgetws\(\)](#ga6f98d7f5d5d1e6ad282ee1a348eab753) -- [fmtmsg\(\)](#ga41115d5b017933dcee85d41ed7a743e7) -- [fnmatch\(\)](#ga088b414f40eb0ce3dad9e5243816f68f) -- [fork\(\)](#gaa4e4714e6e8927c80b2553a40094b6d9) -- [fputwc\(\)](#gab405f6ad88ebd1c6150206d19d3c7f12) -- [fputws\(\)](#gad3afb048298b1f152181fcac8e20d6e3) -- [free\(\)](#gafbedc913aa4651b3c3b4b3aecd9b4711) -- [fsync\(\)](#ga9ba34c4ff72e21db486eedf77c2a18d0) -- [ftruncate\(\)](#ga0fb7c60877eacbfbd66eff04533ab0fe) -- [fwide\(\)](#ga5438ce60b99b0455f356cd27726161ab) -- [fwprintf\(\)](#ga2b7ff2e4c9e4d1c0d6dc35bf93542d53) -- [fwscanf\(\)](#ga1e39ec126230aed6ffa3e922be38a014) -- [gcvt\(\)](#gafabf46107539bb1ec32994c214b5eeba) -- [get\_current\_dir\_name\(\)](#gaa0cf2e9b2a054c6ea46db972840fbc51) -- [getcwd\(\)](#ga3284211bd28346254245c9d4fd071d7f) -- [getegid\(\)](#ga3e7c694d68b4e62c1f275612d30b6d9d) -- [getenv\(\)](#gabc6595dbf6880c71628fecf0dbb23d66) -- [geteuid\(\)](#ga8b9a6dcf4e1d237f5607256dad93e26a) -- [getgid\(\)](#ga58ca281cc6931c62e6a85e2edb5b4b49) -- [getgroups\(\)](#gaacfa67f2aef6be4baceace6a00856d21) -- [getopt\(\)](#ga5ffa4c677fc71cecd94f140ef9db624c) -- [getopt\_long\(\)](#ga3d26a6a51c3a1576b36c66798a64a3cf) -- [getopt\_long\_only\(\)](#ga6606cd658b7339db0fab03d3454bd29c) -- [getpagesize\(\)](#ga638757347bd9bf886b3d442b98033cf1) -- [getpgid\(\)](#ga48f523c98970793dfc2c5a05f6832006) -- [getpgrp\(\)](#ga06f4ba65249f92cacdba5782a8d70eba) -- [getpid\(\)](#gac61b207337ca21b3b309593fd1a0cb82) -- [getppid\(\)](#gac6d7f7ade00dcdc302b0da5664eee812) -- [getresgid\(\)](#gaf74b37e12b6a9418c094479721e8cbf0) -- [getresuid\(\)](#ga4e92f1f4fb48c6fa8cd15d328950bc68) -- [getsubopt\(\)](#ga2959446c8426187f340f8d5a625bf2e6) -- [getuid\(\)](#ga2f517436c22ef73337d3de4920908c6c) -- [getwc\(\)](#gaadd2028a176fe13a0d6090cec651a369) -- [getwchar\(\)](#gaa1379ae6936df3415301dc580aa8756e) -- [hcreate\(\)](#gafb18cb23be808765135c3aa903df62fd) -- [hcreate\_r\(\)](#ga038ec523340da68e90a5f22e1e4e5520) -- [hdestroy\(\)](#ga883c8dedada64c9525c78bfa56ad69bf) -- [hdestroy\_r\(\)](#gafb5169db08a09e98495c26bdd7e6d8dc) -- [hsearch\(\)](#ga8082cd062e20579f6a981bb73963b3f4) -- [hsearch\_r\(\)](#ga22072d94699358ab02286f4c7b6aac55) -- [imaxabs\(\)](#gad9e8a565a34b6981f500d88773ec7bcd) -- [imaxdiv\(\)](#ga17335f74f0abcfd3047de48f6823f527) -- [index\(\)](#ga1d3748ca570dcb09a2fb28e8015107dd) -- [initstate\(\)](#ga9250c684f653b1bd715bab29d35d2423) -- [insque\(\)](#ga7dc680d5d6d07984f96737c220058d64) -- [isalnum\(\)](#gadf38e126f73a010f30af76db2a28c6e1) -- [isalnum\_l\(\)](#gad87736859769a262b411b49819bc7a25) -- [isalpha\(\)](#ga25908ae63aac2df990634e1ae5bd14d9) -- [isalpha\_l\(\)](#ga6de33cb463fb34283dc5c7c4c230aec4) -- [isblank\(\)](#gaea4929b1b41f1a6d723e0312b1f050ed) -- [isblank\_l\(\)](#ga650853c2fb9fcf2e9c34ac06e1f6f2d6) -- [iscntrl\(\)](#ga0008a4e8e7889734dc1d83297de07158) -- [iscntrl\_l\(\)](#gad475d7607e183036b0add584bdf61b35) -- [isdigit\(\)](#ga3fa45b35c8abf67a950b6d3d4063dede) -- [isdigit\_l\(\)](#ga378e9ee0e69cbbb9ed948598f9aa920d) -- [isgraph\(\)](#ga49f40fd869fd0c90e4497fda08c89561) -- [isgraph\_l\(\)](#gaab3732d493eec8b0c0a720d90dba210c) -- [islower\(\)](#ga7b8f652a0423a80922dd89d8829db5f2) -- [islower\_l\(\)](#gad7c9319bbe71c048505cd30da34334ea) -- [isprint\(\)](#ga99355d8f0fb41ec43effb95189db0ed4) -- [isprint\_l\(\)](#gaaae36b62a22be9fa67640255ae77ee0d) -- [ispunct\(\)](#gaf29554b3ec04ea7684482bffed5dbce6) -- [ispunct\_l\(\)](#gaa04b7d22f0c24a9aa5a6f12e933405f8) -- [isspace\(\)](#ga56be4166e4673843042a548a7f513dbc) -- [isspace\_l\(\)](#ga6a6e04048d6363a76a333d17cac62f8a) -- [isupper\(\)](#gadadd6582d46775aab6a51e29d16d9f77) -- [isupper\_l\(\)](#gae10ce576a584fe302d364196d48332c6) -- [iswalnum\(\)](#gadafb512a79ac9274486d6ddbbbd9d9ba) -- [iswalnum\_l\(\)](#ga8d6ca21d11b21620ff32e32ebc5b251a) -- [iswalpha\(\)](#ga72477b4f142de340164deb7bf5a7ae7b) -- [iswalpha\_l\(\)](#gadfbb99771f4af02201ef68fc2377164b) -- [iswblank\(\)](#ga934cbdaad02f3df1b03e566103a5a118) -- [iswblank\_l\(\)](#ga7d5300cc6bbc4ba910a3f9b4d9da2f4d) -- [iswcntrl\(\)](#ga35f4bb15841d36c759ab271aa8033ba8) -- [iswcntrl\_l\(\)](#ga51c189ba9f96d6ed8207da1da81100ca) -- [iswctype\(\)](#gae7bade1da794a7950ad25da75e43ad39) -- [iswctype\_l\(\)](#ga0f3b0048ef4d82840c1f7d1c78e25e6b) -- [iswdigit\(\)](#ga972fbaff0c1d4b4e612c789b8532e9af) -- [iswdigit\_l\(\)](#gab84fd3a86d300fc49af9d708431566a9) -- [iswgraph\(\)](#ga27b090b588b25bacca79bd11926ce308) -- [iswgraph\_l\(\)](#gad7529291433b9e8f5e68caada7572244) -- [iswlower\(\)](#ga92c2a9aad2bf7e6c56a7c01597f59649) -- [iswlower\_l\(\)](#ga944498fac122e95a2da80137e7fffcb4) -- [iswprint\(\)](#ga3eef94f4b2065e786f96e231e871d521) -- [iswprint\_l\(\)](#gacd7a8387b98672ae64f222072eefd38e) -- [iswpunct\(\)](#gacf0bab8aa20334835ea1b55f715ddd64) -- [iswpunct\_l\(\)](#gad355af93606bf5c7688518d78a7c017c) -- [iswspace\(\)](#gafb90e73f1be310ac1fe22f0d652838bc) -- [iswspace\_l\(\)](#gac9068379860381e27a47831612a85c25) -- [iswupper\(\)](#gaf9d04695802b960ca3765c72d73ddb7c) -- [iswupper\_l\(\)](#ga4f73f2368e29bb2fc350479157987bc8) -- [iswxdigit\(\)](#ga4f1c74cab8bd862ddac6ad81a4e23f72) -- [iswxdigit\_l\(\)](#ga2355dbfdaa44cb73ffd0216f97a7ad93) -- [isxdigit\(\)](#gadaf3aadefe3fc4fb07b6be0d7b880f53) -- [isxdigit\_l\(\)](#ga21c1d42504e331cf330026dcb47dcbe2) -- [jrand48\(\)](#ga79163d3776f4009f0e7f1830f4be4d02) -- [l64a\(\)](#ga4045440e70229bdb726924f628f66d92) -- [labs\(\)](#gac39409d0077cf980e4e6419bc6014d10) -- [lcong48\(\)](#ga71e0019171f5584bb6957867691c3e10) -- [ldiv\(\)](#ga9ce9bebe15110c3774f311cd587dc543) -- [lfind\(\)](#ga9f8c694512c6c8a53f7e5a5f5e25cf86) -- [llabs\(\)](#ga7251caa2dd32261e7768d824c0a532c6) -- [lldiv\(\)](#ga28b92959777798288e1ac1def1c16ddc) -- [lrand48\(\)](#gad20ddf22bece340e3036c60cad913250) -- [lsearch\(\)](#ga2e48c29ae7f3ef8f5707f4cc4f4ef608) -- [lseek\(\)](#ga8bd74caed008a66808d92d57fa74d9f6) -- [malloc\(\)](#ga7ac38fce3243a7dcf448301ee9ffd392) -- [mblen\(\)](#ga10b28b2a9d994195623066c344fcf1fd) -- [mbrlen\(\)](#gab7c8a08e5174c1235b0e925dfc77b938) -- [mbrtowc\(\)](#ga6fd639ff3ac22621951452b380468327) -- [mbsinit\(\)](#gac87bb41cb64e86b29faf5b569c2533b4) -- [mbsnrtowcs\(\)](#ga08f9c737e4060d9e123e0fc28a1eb2f3) -- [mbsrtowcs\(\)](#gac3ebddff1a73c20b17986a6b7b68fe56) -- [mbstowcs\(\)](#ga95b89e577f091ba05d6403ff542c2164) -- [mbtowc\(\)](#ga6d2e39eeb319f32608b467c0c0ca1393) -- [memccpy\(\)](#ga2ffbfe50042aaf5b987782dcd16ea1f0) -- [memchr\(\)](#ga16d6b0bd660cc3f9910924c6b6f4af8e) -- [memcmp\(\)](#ga9e6df54ee04e18a3772335580e2ed872) -- [memcpy\(\)](#ga0ee37e291991bef6e3f4b49a970171e7) -- [memmem\(\)](#ga5f6423417e952f934be0a582d87b663a) -- [memmove\(\)](#ga802c986820d3866639922b6bc9484f90) -- [mempcpy\(\)](#ga7ac7c0f43132e3acf013e0c71a58cdc9) -- [memrchr\(\)](#ga45623070e5e0b7008d44600a283ea2ee) -- [memset\(\)](#gace6ee45c30e71865e6eb635200379db9) -- [mkdtemp\(\)](#ga4c366b8d0ad8a393cf6224b5fc9ee045) -- [mkostemp\(\)](#ga691bcfdddb46ab9b43a91217a0ff77c9) -- [mkostemps\(\)](#gafab16d88038590bdb4900150d2791081) -- [mkstemp\(\)](#ga6abe6c5eb77aeaf05ad81a7425547d9e) -- [mkstemps\(\)](#gab962063e3bb487de132da3016e2c813c) -- [mktemp\(\)](#ga3db0418e1e0258f6a8809286c291cc5b) -- [mrand48\(\)](#ga9c450a7a3d4437e3d5f8def180f68103) -- [nrand48\(\)](#gaae8f9c9ee0a49b3bd8bea3331dab500f) -- [pathconf\(\)](#gaa4ea4bbebf4841965159e66b5d1a49e8) -- [pause\(\)](#ga47a6ff5872f457ee230458137f2b2409) -- [pipe\(\)](#ga3d8839f39526d15b100953d64cc08f10) -- [posix\_memalign\(\)](#gaed1e9c27ea92f5ae3a480059bf45c311) -- [pread\(\)](#ga67ceebb141dbf6be0be4484804601e5b) -- [putenv\(\)](#ga8a382cc6123c7cf09a144e28fdfe5bc1) -- [putwc\(\)](#ga578ce42fa0cf04469cff45134114b701) -- [putwchar\(\)](#ga34ef116bac70390d5a2ff8c5fdb45777) -- [pwrite\(\)](#ga6583cb37d551c2553bbb5e7df6c145be) -- [qsort\(\)](#ga56ba7474387aae0977ce6dbe9bef805f) -- [rand\(\)](#gae23144bcbb8e3742b00eb687c36654d1) -- [rand\_r\(\)](#ga4d592bbc52a36404b05aa9ff5b7503c1) -- [random\(\)](#ga350b5b3334c99bb57d2b39da0b2dd694) -- [read\(\)](#ga5975018bea8d2811c4b3abe10d493bb6) -- [realloc\(\)](#ga1a6b5e8d2f1c37e5b43e4345586075be) -- [realpath\(\)](#gaae6b0f26f4a57df79f7c497a65d174d9) -- [regcomp\(\)](#ga075d4ee229f48709667fe28313d2013e) -- [regerror\(\)](#ga091f175aa7e3ae5450ce2ee33495b901) -- [regexec\(\)](#ga5fda573156393bb7d89b4291ded6e26b) -- [regfree\(\)](#gad94d0de532eaa4fd959b8adde4d64898) -- [remque\(\)](#ga1d2e353620a8dc3bb2702831607a3fc1) -- [rindex\(\)](#ga83d9aa3251fdee263ad43bf75933de46) -- [rmdir\(\)](#gab2df76f2c62ae012c2e417813b5fe8ce) -- [sbrk\(\)](#ga3b818446c640442e94e746319f5f2858) -- [secure\_getenv\(\)](#ga131d5a62230be50122c603018fdb3fc2) -- [seed48\(\)](#ga0b86f7fc9964c291844e8112a367721c) -- [setegid\(\)](#ga201d5dad2108506c5db5ba8d126ffbb2) -- [setenv\(\)](#ga1c8b16a3abcb4dc450a0a62b42c554dd) -- [seteuid\(\)](#ga1f3f88da554f543f01a02a06c79c7bdd) -- [setgid\(\)](#ga3116233500c2c34795d437eaf34b69b5) -- [setgroups\(\)](#gaf7df624933ff8690b60c537a29659718) -- [setpgid\(\)](#gae5aae5b0275eefe79314a4673195e475) -- [setpgrp\(\)](#gada2b1e6782cd8fc506fde243f7d313ec) -- [setregid\(\)](#ga869d651a498782b6f3625e2bdbc439d6) -- [setresgid\(\)](#gabb0ec1f467235bee75ee359400d817e4) -- [setresuid\(\)](#gac3827ffb6833b1e282fc2ea856d534a1) -- [setreuid\(\)](#ga0c1be1c8a11bac9cdf41613e996c841b) -- [setstate\(\)](#gaa4970d8361258d9b821ad83036a2da3a) -- [setuid\(\)](#gaa426fc963bb0a4f469eef61d9f0c4a26) -- [sleep\(\)](#gad4669b3813c3b4a616a738317fdc974f) -- [srand\(\)](#ga83a727cc697aea22e24cad5f39198dd2) -- [srand48\(\)](#ga91c6acf8516086891c689926e49f1ddf) -- [srandom\(\)](#gaf1e7e3d144face36372f9ae8b18aa009) -- [stpcpy\(\)](#ga890dbcd7c456828c1b6ff714e405fcc1) -- [stpncpy\(\)](#ga217a70a69e2fc7727278516b7ad2fc26) -- [strcasecmp\(\)](#ga2436604f43de7f27e7434ceea7d64528) -- [strcasestr\(\)](#gae9229017a4501f8d6a637b4498cfed2e) -- [strcat\(\)](#gadb8723e585ed29f2370cddf90f6891bc) -- [strchr\(\)](#ga12871ed234858ef0e363d2b8aa572fc1) -- [strcmp\(\)](#ga11bd144d7d44914099a3aeddf1c8567d) -- [strcoll\(\)](#gaa4718e50ed45c2275c5d85a121d68097) -- [strcoll\_l\(\)](#ga2294f2f1c4eaef870ef3d5d90e5cb36f) -- [strcpy\(\)](#ga7a82515b5d377be04817715c5465b647) -- [strcspn\(\)](#gaeb6c449e5d77477c057abf00eaaf88fe) -- [strdup\(\)](#gab1cc1a3ff560049e22576031c7c2345b) -- [strerror\(\)](#gadd46ab98f32b76457852dbb872842bf2) -- [strerror\_l\(\)](#ga8f7507e357cbd24048ae77e27e5d41d7) -- [strerror\_r\(\)](#ga7253ba059153058c57952194237c6b55) -- [strlcat\(\)](#ga0266462615f2f112003cdb591710d299) -- [strlcpy\(\)](#ga50bd3317d65f3da7d180b8981e58c5a4) -- [strlen\(\)](#gaa383452fe445bfae989358c9d7d96f4f) -- [strncasecmp\(\)](#ga103fd689d8438a246e0cd4d90cb084ac) -- [strncat\(\)](#ga0aee928c2844a269966e4832fd2255c5) -- [strncmp\(\)](#ga07f4a84c11c106e95c32b6ab509346ef) -- [strncpy\(\)](#ga47d54f24198df56da51078a6c540b9ed) -- [strndup\(\)](#ga8b860ba32fef12da8acd4507c059e509) -- [strnlen\(\)](#gafc92d2231e45d19988c7894aa2a07f0c) -- [strpbrk\(\)](#ga119f23a5dcb4eb5f1c1eed3cbf5cb0ed) -- [strrchr\(\)](#ga0c05a458deff028ef4d4e64059098db4) -- [strsep\(\)](#ga93c766c6e86f4f79e7507c21f1794e15) -- [strsignal\(\)](#ga8f7c22bf1131bd6ffe6635e386fb4ebd) -- [strspn\(\)](#ga900a0edfa51f601d479244f7451cedd1) -- [strstr\(\)](#ga4a710d86541afc6b7dafddcdb4b1c94f) -- [strtod\(\)](#ga0c17a0b44f572941d9f73518f99ea7ed) -- [strtof\(\)](#ga2370632318c3797a314f8eb62d37947c) -- [strtoimax\(\)](#ga996146b4c9a860837a1f09868a6c0a61) -- [strtok\(\)](#ga8cb460f64c449f2a9b9b7a40569ce0fe) -- [strtok\_r\(\)](#gab11d86a2a3af0a355cad2337c6f4e9f7) -- [strtol\(\)](#ga311071298c2fe3e5d7057f396a6acfdc) -- [strtold\(\)](#gad2ed05594fb04a126627c0fd5c7e2232) -- [strtoll\(\)](#gafb901aa665b7e2e3e27025ca77fecd1b) -- [strtoul\(\)](#ga6d257fc3f00865d0556ed7327c312b55) -- [strtoull\(\)](#gae5835422eb2dfc17ea8deb3b15bcc541) -- [strtoumax\(\)](#ga706f89e2b5a9a623207f2d77b19ff6f8) -- [strverscmp\(\)](#ga1563a7059aabf95c0b588278e8bed575) -- [strxfrm\(\)](#gadd1f1078b3303920c19fd68fcba3f908) -- [swab\(\)](#ga27ee6e902becdb181addb45b69a50b8c) -- [swprintf\(\)](#ga7c963d10722b32fbcf5508057ccf76ec) -- [swscanf\(\)](#gaac90953229a0d08ce45ba328430d6637) -- [tdelete\(\)](#ga58961b9d8ec6333735b53fd0999eff17) -- [tdestroy\(\)](#gab12d1869fd9d20ce6706fcef217ba222) -- [tfind\(\)](#ga576dc73ee732b840e09c88972b7d487e) -- [toascii\(\)](#gae2edadcc847fa6a98adc9c485da806de) -- [tolower\(\)](#gac79d6114c9df7350cedcd8cf921a6ea4) -- [tolower\_l\(\)](#ga1921ca31e425387ecff9c9c7657cd4b7) -- [toupper\(\)](#ga9c2f57ac3865af9006fdbfd5db9fd517) -- [toupper\_l\(\)](#ga77ed6ccc1ae9841df0fc54ad62860715) -- [towctrans\(\)](#gac1d7671abe2a106b481d5bb24717fd11) -- [towctrans\_l\(\)](#gaa65f72b343b0d847933e6dbb7454a915) -- [towlower\(\)](#gab9cd9fba7f8437d2ad5242baa25fd176) -- [towlower\_l\(\)](#ga6333139346611f59c603f70b61b521b5) -- [towupper\(\)](#gaaf8d2b2d230df873695d41757d5889f9) -- [towupper\_l\(\)](#gac01816aef7bc2050e1b19db17a26bae8) -- [truncate\(\)](#ga87674838dd2bcf61e1a1fb5c9892ab6c) -- [tsearch\(\)](#ga197c455a4e5f17cb8565be72d18344cc) -- [twalk\(\)](#ga4d8ee780402dd74ec06e7b5089565168) -- [ualarm\(\)](#ga9d35348d3389a721ab5aef5f4f036c61) -- [uname\(\)](#ga8aad464bbe437c5776c520d958dcff58) -- [ungetwc\(\)](#ga35264055ce08ba6d23ba03075897a0fb) -- [unlink\(\)](#ga28af9471bbdf262321af663e02899a47) -- [unlinkat\(\)](#gaa06a637e291f5d288cae85ce32a2fe49) -- [unsetenv\(\)](#ga17a3a11d20a551951a4acbc3872b280c) -- [usleep\(\)](#ga608e849b00b0ac57524b26f45d408a55) -- [valloc\(\)](#ga3d09e44a916600a38b367c1b6ebdf118) -- [vfwprintf\(\)](#ga52697c5b86b8a3fa892b69f70fac8843) -- [vfwscanf\(\)](#ga0d7996cc31075571432fcc7a21c402fa) -- [vswprintf\(\)](#gad79402226fa58569bee4601eb029b717) -- [vswscanf\(\)](#ga0b70af0bd7f82c6f81886d79ad41b2c1) -- [vwprintf\(\)](#gadff14929a4410b3ac0ce28b55357e280) -- [vwscanf\(\)](#ga4406b91b463b1fc3d4d43b44ccb46d1c) -- [wcpcpy\(\)](#gaa4f33e46d5c0263f0b3e9a1e8eb0a7a9) -- [wcpncpy\(\)](#ga2b77c48e45c06857bae5c4720fd977b9) -- [wcrtomb\(\)](#ga67e98eb761f2880dc93ceb3833bbf9bd) -- [wcscasecmp\(\)](#ga1cfd283a315ce1081565d9370dadbd1e) -- [wcscasecmp\_l\(\)](#gad5fd70aa458e05eaec03bb88d5eefdef) -- [wcscat\(\)](#ga1fa2f722dd578b02ed196a74488f75f0) -- [wcschr\(\)](#ga3fe8f361d1cff837a204ef0f4fac68eb) -- [wcscmp\(\)](#gab361438866831d03563fbb430c1514c5) -- [wcscoll\(\)](#ga99ef4b8381c22d8db3b2b13d8c3a3c29) -- [wcscoll\_l\(\)](#ga8bdd5a976685e97d9ac7f45f7951a52c) -- [wcscpy\(\)](#gae6b223ed61020ed2abf0279af175b203) -- [wcscspn\(\)](#ga188fb5a6a8c210ee46b885a671f55c61) -- [wcsdup\(\)](#ga21234261a334fd22ff3d6ba8883eca3a) -- [wcsftime\(\)](#ga215d4539e43613e57c992b87158084b4) -- [wcslen\(\)](#ga7859e4ba07f77515772c4632d4caa4e0) -- [wcsncasecmp\(\)](#ga5c9957285778ae41af839bb22cc4a9d0) -- [wcsncasecmp\_l\(\)](#ga157e21d5005c4af440f8fe0407dab8ec) -- [wcsncat\(\)](#ga8af5b08f466d2d6843f7ec250eddb41c) -- [wcsncmp\(\)](#ga422e6bb262f249f2d71b6a2d77408038) -- [wcsncpy\(\)](#gab1f03e735cf92afa01bef89682008c9b) -- [wcsnlen\(\)](#ga5ef7fc85c7678f86f1530fd52dbf2486) -- [wcsnrtombs\(\)](#gaf189ea21a3aa444f88607ad23f448f37) -- [wcspbrk\(\)](#ga65c3cbada5beb856956f682e7ab2d812) -- [wcsrchr\(\)](#ga1e2b53d4a4eb975edfd1ec59099a43bd) -- [wcsrtombs\(\)](#ga0a628490d6458cfc836ebf3721e68a98) -- [wcsspn\(\)](#ga2a5d42d9b374cbffb3037d0e7efb97a9) -- [wcstod\(\)](#ga2030f1f318ded574650a1957574711a0) -- [wcstof\(\)](#gadf99123a55665bf0669487a12aee795f) -- [wcstoimax\(\)](#gaab72fde556caed7f725c0bece02e4cc9) -- [wcstok\(\)](#ga01f67f93543c36fdae41b410a7f3d963) -- [wcstol\(\)](#ga623c775bac158351e308fd3811daeb9f) -- [wcstold\(\)](#gaf1879aa0145431434cbac389629bee6a) -- [wcstoll\(\)](#ga1f43fe48b9afd42fb80b0560c1358ad3) -- [wcstombs\(\)](#gae7586ae6f537a5fd64c8c2d7c850e3be) -- [wcstoul\(\)](#ga71d821611320a733b3f51ff8077ce92c) -- [wcstoull\(\)](#gad28d6c39911a0d99ebaf2ee4e3b9f621) -- [wcstoumax\(\)](#gaaf3fa62320e289517f453bf1e470a1f9) -- [wcswcs\(\)](#ga844ce8231d55e4cc8010130477dd0d5a) -- [wcsxfrm\(\)](#ga3a0974b661a750f99ec204adf0921baf) -- [wcsxfrm\_l\(\)](#gadd93407a6dc241056ae5198b356f07d4) -- [wctob\(\)](#gafea1d08554775797ac259bf0aea62938) -- [wctomb\(\)](#gab576ad05484aba7fe43b3d047a3fabb5) -- [wctrans\(\)](#ga98df6598dc60588b24067b97225070ed) -- [wctrans\_l\(\)](#ga85e85bc84a644c3a0686fd6e4cfd96d7) -- [wctype\(\)](#gae8a9ddd29c6a369345a12c6cb93aabe1) -- [wctype\_l\(\)](#gae43cf599bd1eb5674ed9cc17870f7472) -- [wmemchr\(\)](#gacb1e61bbd4b15305803c0e558c00bcdd) -- [wmemcmp\(\)](#gaec76ca0ca875ef6cfcc1d7415052eb26) -- [wmemcpy\(\)](#gac20ec2fc709b45b0b89dbdc3ae6a537e) -- [wmemmove\(\)](#ga7eeab622d3eacdfd8ff0c4226cf85209) -- [wmemset\(\)](#ga830c36f7d0d13b4dcb5059e7b1d9ab83) -- [wprintf\(\)](#gaf30b50dd88f13675d890857755670a2d) -- [write\(\)](#gac06af22e9ce132f563db5c918ceb1eb1) -- [wscanf\(\)](#ga24e265f34e058454b9a9b6247b1694b0) - -## **Overview** - -**Description:** - -Provides functions and data structures related to system operations, such as string conversion and I/O, string operations, process operations and so on. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

File Name

-

Description

-

alltypes.h

-

Declares common data types for variables and structures in the system, facilitating code reading and platform adaptation.

-

bitsperlong.h

-

Defines the number of bits of the long data type.

-

errno.h

-

Defines error codes.

-

crypt.h

-

Encrypts data.

-

ctype.h

-

Provides functions used for parameter identification.

-

fmtmsg.h

-

Provides a function for printing formatted messages.

-

fnmatch.h

-

Provides a function for checking whether a specified string matches a string that contains wildcards.

-

getopt.h

-

Provides functions and data structures, such as command-line argument parsing.

-

inttypes.h

-

Provides functions and related data structures for conversion between character strings and plural.

-

limits.h

-

Declares commonly used macro values.

-

monetary.h

-

Provides functions for converting monetary values.

-

regex.h

-

Provides common functions for operating regular expressions.

-

search.h

-

Provides functions and related data structures, such as creating, destroying, or searching for a hash table.

-

stdarg.h

-

Provides functions and data structures, such as applying for and ending a variable-length argument list and obtaining an argument type.

-

stdlib.h

-

Declares common functions used for performing I/O operations.

-

string.h

-

Declares commonly used functions for string operations.

-

strings.h

-

Declares commonly used functions for byte sequence operations.

-

unistd.h

-

Provides functions and data structures related to process operations.

-

utsname.h

-

Declares common functions for system operations.

-

wchar.h

-

Declares commonly used functions related to wide characters.

-

wctype.h

-

Provides functions to detect, translate, and map wide characters.

-
- -## Data Structures - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Structure Name

-

Description

-

__sigset_t

-

Defines the data type of a signal set.

-

option

-

Defines the command parsing option.

-

imaxdiv_t

-

Stores the division result.

-

entry

-

Defines a hash table entry.

-

qelem

-

Creates a queue from the doubly linked list for insque and remque.

-

hsearch_data

-

Defines a hash table.

-

div_t

-

Defines the structures of the division operation result.

-

ldiv_t

-

Defines the structures of the division operation result.

-

lldiv_t

-

Defines the structures of the division operation result.

-
- -## Macros - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

__BITS_PER_LONG 32

-

Defines the number of bits of the long data type.

-

EPERM 1

-

Operation not permitted.

-

ENOENT 2

-

No such file or path.

-

ESRCH 3

-

No such process.

-

EINTR 4

-

Interrupted function call.

-

EIO 5

-

I/O error.

-

ENXIO 6

-

No such device or address.

-

E2BIG 7

-

Parameter list too long.

-

ENOEXEC 8

-

Exec format error.

-

EBADF 9

-

Bad file descriptor.

-

ECHILD 10

-

No child processes.

-

EAGAIN 11

-

Retry.

-

ENOMEM 12

-

Not enough memory space.

-

EACCES 13

-

Incorrect permission.

-

EFAULT 14

-

Invalid address.

-

ENOTBLK 15

-

Block device request.

-

EBUSY 16

-

Device or resource busy.

-

EEXIST 17

-

File exists.

-

EXDEV 18

-

Incorrect link.

-

ENODEV 19

-

No such device.

-

ENOTDIR 20

-

Not a directory.

-

EISDIR 21

-

Is a directory.

-

EINVAL 22

-

Invalid parameter.

-

ENFILE 23

-

Too many opened files in system (the maximum number exceeded)

-

EMFILE 24

-

Too many opened files in a process (the maximum number exceeded)

-

ENOTTY 25

-

Inappropriate I/O control operation.

-

ETXTBSY 26

-

Text file busy.

-

EFBIG 27

-

File too large.

-

ENOSPC 28

-

No space left on device.

-

ESPIPE 29

-

Invalid query.

-

EROFS 30

-

Read-only file system.

-

EMLINK 31

-

Too many links.

-

EPIPE 32

-

The pipe file is incorrect or the read end of the pipe is closed during the write operation.

-

EDOM 33

-

Domain error. The value of at least one input parameter is out of the parameter range.

-

ERANGE 34

-

The actual return value exceeds the return value range.

-

EDEADLK 35

-

Resource deadlock.

-

ENAMETOOLONG 36

-

File name too long.

-

ENOLCK 37

-

No locks available.

-

ENOSYS 38

-

Function not implemented.

-

ENOTEMPTY 39

-

Directory not empty.

-

ELOOP 40

-

Too many levels of symbolic links.

-

EWOULDBLOCK EAGAIN

-

Operation would block (the same value as EAGAIN)

-

ENOMSG 42

-

No message of the desired type.

-

EIDRM 43

-

Identifier removed.

-

ECHRNG 44

-

Channel number out of range.

-

EL2NSYNC 45

-

Level 2 not synchronized.

-

EL3HLT 46

-

Level 3 halted.

-

EL3RST 47

-

Level 3 reset.

-

ELNRNG 48

-

Link ID out of range.

-

EUNATCH 49

-

Protocol driver not attached.

-

ENOCSI 50

-

No available CSI structure.

-

EL2HLT 51

-

Level 2 halted.

-

EBADE 52

-

Invalid exchange.

-

EBADR 53

-

Invalid request descriptor.

-

EXFULL 54

-

Exchange full.

-

ENOANO 55

-

No anode.

-

EBADRQC 56

-

Invalid request code.

-

EBADSLT 57

-

Invalid slot.

-

EDEADLOCK EDEADLK

-

Resource deadlock (the same value as EDEADLK)

-

EBFONT 59

-

Incorrect font format.

-

ENOSTR 60

-

Not a stream device.

-

ENODATA 61

-

No message is available on the stream head read queue.

-

ETIME 62

-

Timer expired.

-

ENOSR 63

-

No stream resources.

-

ENONET 64

-

Machine is disconnected from the network.

-

ENOPKG 65

-

Package not installed.

-

EREMOTE 66

-

Object is remote.

-

ENOLINK 67

-

Link has been severed.

-

EADV 68

-

Broadcast error.

-

ESRMNT 69

-

srmount error

-

ECOMM 70

-

Communication error on send.

-

EPROTO 71

-

Protocol error.

-

EMULTIHOP 72

-

Multi-hop attempt.

-

EDOTDOT 73

-

RFS-specific error.

-

EBADMSG 74

-

Non-data message.

-

EOVERFLOW 75

-

Value too large to be represented by the defined data type.

-

ENOTUNIQ 76

-

Name not unique on the network.

-

EBADFD 77

-

File descriptor in the bad state.

-

EREMCHG 78

-

Remote address changed.

-

ELIBACC 79

-

Cannot access a needed shared library.

-

ELIBBAD 80

-

Accessing a corrupted shared library.

-

ELIBSCN 81

-

lib section in a.out corrupted

-

ELIBMAX 82

-

Attempting to link in too many shared libraries.

-

ELIBEXEC 83

-

Cannot execute a shared library directly.

-

EILSEQ 84

-

Invalid byte sequence.

-

ERESTART 85

-

Interrupted system call should be restarted.

-

ESTRPIPE 86

-

Stream pipe error.

-

EUSERS 87

-

Too many users.

-

ENOTSOCK 88

-

Not a socket.

-

EDESTADDRREQ 89

-

Destination address required.

-

EMSGSIZE 90

-

Message too long.

-

EPROTOTYPE 91

-

Socket protocol error.

-

ENOPROTOOPT 92

-

Protocol not available.

-

EPROTONOSUPPORT 93

-

Protocol not supported.

-

ESOCKTNOSUPPORT 94

-

Socket type not supported.

-

EOPNOTSUPP 95

-

Operation not supported on socket.

-

ENOTSUP EOPNOTSUPP

-

Operation not supported on socket. The value is the same as that of EOPNOTSUPP.

-

EPFNOSUPPORT 96

-

Protocol family not supported.

-

EAFNOSUPPORT 97

-

Address family not supported.

-

EADDRINUSE 98

-

Address already in use.

-

EADDRNOTAVAIL 99

-

Address not available.

-

ENETDOWN 100

-

Network is down.

-

ENETUNREACH 101

-

Network unreachable.

-

ENETRESET 102

-

Network disconnection caused by restart.

-

ECONNABORTED 103

-

Network disconnection caused by software problems.

-

ECONNRESET 104

-

Connection reset.

-

ENOBUFS 105

-

No buffer space available.

-

EISCONN 106

-

Socket is connected.

-

ENOTCONN 107

-

Socket disconnected.

-

ESHUTDOWN 108

-

Cannot send after transport endpoint shutdown.

-

ETOOMANYREFS 109

-

Cannot splice due to too many references.

-

ETIMEDOUT 110

-

Connection timed out.

-

ECONNREFUSED 111

-

Connection refused.

-

EHOSTDOWN 112

-

Host is down.

-

EHOSTUNREACH 113

-

Host is unreachable.

-

EALREADY 114

-

Operation already in process.

-

EINPROGRESS 115

-

Operation in progress.

-

ESTALE 116

-

Stale file handle.

-

EUCLEAN 117

-

Structure needs cleaning.

-

ENOTNAM 118

-

Not a XENIX named type file.

-

ENAVAIL 119

-

No XENIX semaphores available.

-

EISNAM 120

-

Duplicate file name.

-

EREMOTEIO 121

-

Remote I/O error.

-

EDQUOT 122

-

Quota exceeded.

-

ENOMEDIUM 123

-

No medium found.

-

EMEDIUMTYPE 124

-

Wrong medium type.

-

ECANCELED 125

-

Operation canceled.

-

ENOKEY 126

-

Required key not available.

-

EKEYEXPIRED 127

-

Key has expired.

-

EKEYREVOKED 128

-

Key has been revoked.

-

EKEYREJECTED 129

-

Key was rejected by service.

-

EOWNERDEAD 130

-

Resource owner died.

-

ENOTRECOVERABLE 131

-

State not recoverable.

-

ERFKILL 132

-

Operation not possible due to RF-kill.

-

EHWPOISON 133

-

Hardware errors on the memory page.

-

_tolower(a) ((a)|0x20)

-

Converts an uppercase letter to its lowercase equivalent.

-

_toupper(a) ((a)&0x5f)

-

Converts a lowercase letter to its uppercase equivalent.

-

isascii(a) (0 ? isascii(a) : (unsigned)(a) < 128)

-

Checks whether a parameter is an ASCII character.

-

MM_HARD 1

-

A hardware error occurred.

-

MM_SOFT 2

-

A software error occurred.

-

MM_FIRM 4

-

A firmware error occurred.

-

MM_APPL 8

-

An error is detected by an application.

-

MM_UTIL 16

-

An error is detected by a utility.

-

MM_OPSYS 32

-

An error is detected by the operating system.

-

MM_RECOVER 64

-

The error is recoverable.

-

MM_NRECOV 128

-

The error is non-recoverable.

-

MM_PRINT 256

-

Prints error messages on standard error (stderr).

-

MM_CONSOLE 512

-

Prints error messages on the system console.

-

MM_NULLMC 0L

-

Ignores the classification parameter.

-

MM_HALT 1

-

Fatal fault.

-

MM_ERROR 2

-

Error-level fault.

-

MM_WARNING 3

-

Warning condition.

-

MM_INFO 4

-

Informative message.

-

MM_NOSEV 0

-

No severity level is set, equivalent to MM_NULLSEV.

-

MM_OK 0

-

The function succeeded.

-

MM_NOTOK (-1)

-

The function failed.

-

MM_NOMSG 1

-

Error writing to stderr.

-

MM_NOCON 4

-

Error writing to the console.

-

MM_NULLLBL ((char*)0)

-

Ignores the label parameter.

-

MM_NULLTXT ((char*)0)

-

Ignores the text parameter.

-

MM_NULLACT ((char*)0)

-

Ignores the action parameter.

-

MM_NULLTAG ((char*)0)

-

Ignores the tag parameter.

-

MM_NULLSEV 0

-

Ignores the severity parameter.

-

FNM_PATHNAME 0x1

-

If this flag is set, a slash (/) in string can be matched by a slash (/) in pattern, but not by an asterisk (*), or a question mark (?), or a bracket expression ([]) containing a slash.

-

FNM_NOESCAPE 0x2

-

If this flag is set, the backslash () is treated as an ordinary character, instead of an escape character.

-

FNM_PERIOD 0x4

-

If this flag is set, a leading period (.) in string can be exactly matched by the period (.) in pattern. A period is considered to be leading if it is the first character in string, or if both FNM_PATHNAME is set and the period immediately follows a slash.

-

FNM_LEADING_DIR 0x8

-

If this flag is set, a trailing sequence of characters starting with a slash (/) is ignored in string. For example, if this flag is set, either foo* or foobar as a pattern would match the string foobar/frobozz.

-

FNM_CASEFOLD 0x10

-

If this flag is set, the pattern is matched case-insensitively.

-

FNM_FILE_NAME FNM_PATHNAME

-

The definition is similar to that of FNM_PATHNAME.

-

FNM_NOMATCH 1

-

The string parameter does not match the pattern parameter.

-

FNM_NOSYS (-1)

-

The function does not support the operation.

-

CHAR_MIN 0

-

Minimum value of type char.

-

CHAR_MAX 255

-

Maximum value of type char.

-

CHAR_BIT 8

-

Number of bits in type char.

-

SCHAR_MIN (-128)

-

Minimum value of type signed char.

-

SCHAR_MAX 127

-

Maximum value of type signed char.

-

UCHAR_MAX 255

-

Maximum value of type unsigned char.

-

SHRT_MIN (-1-0x7fff)

-

Minimum value of type short.

-

SHRT_MAX 0x7fff

-

Maximum value of type short.

-

USHRT_MAX 0xffff

-

Maximum value of type unsigned short.

-

INT_MIN (-1-0x7fffffff)

-

Minimum value of type int.

-

INT_MAX 0x7fffffff

-

Maximum value of type int.

-

UINT_MAX 0xffffffffU

-

Maximum value of type unsigned int.

-

__LONG_MAX 0x7fffffffL

-

Maximum value of type long.

-

LONG_MIN (-LONG_MAX-1)

-

Minimum value of type long.

-

LONG_MAX __LONG_MAX

-

Maximum value of type long.

-

ULONG_MAX (2UL*LONG_MAX+1)

-

Maximum value of type unsigned long.

-

LLONG_MIN (-LLONG_MAX-1)

-

Minimum value of type long long.

-

LLONG_MAX 0x7fffffffffffffffLL

-

Maximum value of type long long.

-

ULLONG_MAX (2ULL*LLONG_MAX+1)

-

Maximum value of type unsigned long long.

-

PIPE_BUF 4096

-

Buffer length of pipe.

-

NAME_MAX 255

-

Maximum length of file or directory name.

-

PATH_MAX 256

-

Maximum length of the whole file or directory path.

-

ARG_MAX 4096

-

Maximum length of parameter arg.

-

IOV_MAX 1024

-

Maximum vector number.

-

WORD_BIT 32

-

Number of bits in word.

-

SSIZE_MAX LONG_MAX

-

Maximum value of type ssize_t.

-

HOST_NAME_MAX 255

-

Maximum length of host name.

-

LONG_BIT 32

-

Number of bits in long.

-

MQ_PRIO_MAX 1

-

Maximum priority number of message queue.

-

PAGESIZE 4096

-

Page size.

-

PAGE_SIZE PAGESIZE

-

Page size.

-

va_start(v, l) __builtin_va_start(v,l)

-

Defines the start position of the variable-length argument list.

-

va_end(v) __builtin_va_end(v)

-

Ends a variable-length argument list.

-

va_arg(v, l) __builtin_va_arg(v,l)

-

Obtains the next argument in the variable-length argument list.

-

va_copy(d, s) __builtin_va_copy(d,s)

-

Copies the previously initialized variable argument list s to d.

-

strdupa(x) strcpy(alloca(strlen(x)+1),x)

-

Copies a string to a new position.

-

STDIN_FILENO 0

-

Descriptor ID of the standard input file.

-

STDOUT_FILENO 1

-

Descriptor ID of the standard output file.

-

STDERR_FILENO 2

-

Descriptor ID of the standard error file.

-

SEEK_SET 0

-

Relocation starts from the file header.

-

SEEK_CUR 1

-

Relocation starts from the position of the currently accessed file.

-

SEEK_END 2

-

Relocation starts from the end of the file.

-

NULL ((void*)0)

-

NULL.

-

F_OK 0

-

Existing file.

-

R_OK 4

-

Readable file.

-

W_OK 2

-

Writable file.

-

X_OK 1

-

Executable file.

-
- -## Typedefs - - - - - - - - - - -

Typedef Name

-

Description

-

ENTRY

-

typedef struct entry

-

Defines a hash table entry.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function

-

Description

-

crypt (const char *key, const char *setting)

-

char *

-

Encrypts data.

-

isalnum (int c)

-

int

-

Checks whether a parameter is an alphabetic character or a decimal digit.

-

isalpha (int c)

-

int

-

Checks whether a parameter is an alphabetic character.

-

isblank (int c)

-

int

-

Checks whether a parameter is a blank character (space or tap).

-

iscntrl (int c)

-

int

-

Checks whether a parameter is a control character. A control character is invisible and does not occupy a printing position on a display.

-

isdigit (int c)

-

int

-

Checks whether a parameter is a decimal digit (0-9).

-

isgraph (int c)

-

int

-

Checks whether a parameter is any printable character except the space character.

-

islower (int c)

-

int

-

Checks whether a parameter is a lowercase letter.

-

isprint (int c)

-

int

-

Checks whether a parameter is a printable character (including space).

-

ispunct (int c)

-

int

-

Checks whether a parameter is a punctuation or special character.

-

isspace (int c)

-

int

-

Checks whether a parameter is a space character.

-

isupper (int c)

-

int

-

Checks whether a parameter is an uppercase letter.

-

isxdigit (int c)

-

int

-

Checks whether a parameter is a hexadecimal digit.

-

tolower (int c)

-

int

-

Converts an uppercase letter specified by c to its lowercase equivalent.

-

toupper (int c)

-

int

-

Converts a lowercase letter specified by c to its uppercase equivalent.

-

isalnum_l (int c, locale_t locale)

-

int

-

Checks whether a parameter is an alphabetic character or digit for the specified locale.

-

isalpha_l (int c, locale_t locale)

-

int

-

Checks whether a parameter is an alphabetic character for the specified locale.

-

isblank_l (int c, locale_t locale)

-

int

-

Checks whether a parameter is a blank character (including spaces and tabs) for the specified locale.

-

iscntrl_l (int c, locale_t locale)

-

int

-

Checks whether a parameter is a control character for the specified locale.

-

isdigit_l (int c, locale_t locale)

-

int

-

Checks whether a parameter is a decimal digit for the specified locale.

-

isgraph_l (int c, locale_t locale)

-

int

-

Checks whether a parameter is any printable character except the space character for the specified locale.

-

islower_l (int c, locale_t locale)

-

int

-

Checks whether a parameter is a character of lowercase letters for the specified locale.

-

isprint_l (int c, locale_t locale)

-

int

-

Checks whether a parameter is a printable character (including space) for the specified locale. A printable character is visible and occupies a printing position on a display.

-

ispunct_l (int c, locale_t locale)

-

int

-

Checks whether a parameter is a punctuation or special character for the specified locale.

-

isspace_l (int c, locale_t locale)

-

int

-

Checks whether a parameter is a blank character for the specified locale.

-

isupper_l (int c, locale_t locale)

-

int

-

Checks whether a parameter is a character of uppercase letters for the specified locale.

-

isxdigit_l (int c, locale_t locale)

-

int

-

Checks whether a parameter is a hexadecimal digit for the specified locale.

-

tolower_l (int c, locale_t locale)

-

int

-

Converts an upper letter specified by c to its lowercase equivalent for the specified locale.

-

toupper_l (int c, locale_t locale)

-

int

-

Converts a lowercase letter specified by c to its uppercase equivalent for the specified locale.

-

toascii (int c)

-

int

-

Converts a parameter of the integer type to an ASCII code.

-

fmtmsg (long classification, const char *label, int severity, const char *text, const char *action, const char *tag)

-

int

-

Prints formatted messages.

-

fnmatch (const char *pattern, const char *string, int flags)

-

int

-

Matches a file name or a path name.

-

getopt_long (int argc, char *const *argv, const char *optstring, const struct option *longopts, int *longindex)

-

int

-

Parses the command-line arguments.

-

getopt_long_only (int argc, char *const *argv, const char *optstring, const struct option *longopts, int *longindex)

-

int

-

Parses the command-line arguments.

-

imaxabs (intmax_t j)

-

intmax_t

-

Calculates the absolute value of an input parameter of the integer type.

-

imaxdiv (intmax_t numerator, intmax_t denominator)

-

imaxdiv_t

-

Calculates the quotient and remainder after the division operation is performed on an integer.

-

strtoimax (const char *str, char **endptr, int base)

-

intmax_t

-

Parses a string to a value of the intmax_t type.

-

strtoumax (const char *str, char **endptr, int base)

-

uintmax_t

-

Parses a string to a value of the uintmax_t type.

-

wcstoimax (const wchar_t *str, wchar_t **endptr, int base)

-

intmax_t

-

Parses a string to a value of the intmax_t type.

-

wcstoumax (const wchar_t *str, wchar_t **endptr, int base)

-

uintmax_t

-

Parses a string to a value of the uintmax_t type.

-

regcomp (regex_t *preg, const char *regex, int cflags)

-

int

-

Compiles a specified regular expression into a string of a specific format.

-

regexec (const regex_t *preg, const char *string, size_t nmatch, regmatch_t pmatch[], int eflags)

-

int

-

Matches a regular expression.

-

regfree (regex_t *preg)

-

void

-

Releases a regular expression.

-

regerror (int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size)

-

size_t

-

Returns a string containing error information.

-

hcreate (size_t nel)

-

int

-

Creates a hash table based on the number of entries.

-

hdestroy (void)

-

void

-

Destroys a hash table.

-

hsearch (ENTRY item, ACTION action)

-

ENTRY *

-

Adds or searches for a hash entry.

-

hcreate_r (size_t nel, struct hsearch_data *htab)

-

int

-

Creates a hash table based on the number of entries and its description.

-

hdestroy_r (struct hsearch_data *htab)

-

void

-

Destroys a hash table.

-

hsearch_r (ENTRY item, ACTION action, ENTRY **retval, struct hsearch_data *htab)

-

int

-

Searches for a hash table.

-

insque (void *element, void *pred)

-

void

-

Adds an entry to a queue.

-

remque (void *elem)

-

void

-

Removes an entry from a queue.

-

lsearch (const void *key, const void *base, size_t *nelp, size_t width, int(*compar)(const void *, const void *))

-

void *

-

Performs a linear search for a key in the array and adds a key to the end of the array if the key is not found.

-

lfind (const void *key, const void *base, size_t *nelp, size_t width, int(*compar)(const void *, const void *))

-

void *

-

Performs a linear search for a key in the array.

-

tdelete (const void *key, void **rootp, int(*compar)(const void *, const void *))

-

void *

-

Deletes a key from the binary tree.

-

tfind (const void *key, void *const *rootp, int(*compar)(const void *, const void *))

-

void *

-

Searches for a key in the binary tree.

-

tsearch (const void *key, void *const *rootp, int(*compar)(const void *, const void *))

-

void *

-

Searches for a key in the binary tree and adds a key to the tree if the key is not found.

-

twalk (const void *root, void(*action)(const void *nodep, VISIT which, int depth))

-

void

-

Traverses a binary tree from left to right.

-

tdestroy (void *root, void(*free_node)(void *nodep))

-

void

-

Releases all nodes in the binary tree.

-

atoi (const char *nptr)

-

int

-

Converts an input string to an integer.

-

atol (const char *nptr)

-

long

-

Converts an input string to a long integer.

-

atoll (const char *nptr)

-

long long

-

Converts a string to an 8-byte long integer.

-

atof (const char *nptr)

-

double

-

Converts an input string to a double-precision floating-point number.

-

strtof (const char *nptr, char **endptr)

-

float

-

Converts an input string to a floating-point number.

-

strtod (const char *nptr, char **endptr)

-

double

-

Converts a string to double.

-

strtold (const char *nptr, char **endptr)

-

long double

-

Converts a string to long double.

-

strtol (const char *nptr, char **endptr, int base)

-

long

-

Converts a string to a long integer according to the given base.

-

strtoul (const char *nptr, char **endptr, int base)

-

unsigned long

-

Converts a string to an unsigned long integer according to the given base.

-

strtoll (const char *nptr, char **endptr, int base)

-

long long

-

Converts a string to a long long integer according to the given base.

-

strtoull (const char *nptr, char **endptr, int base)

-

unsigned long long

-

Converts a string to an unsigned long long integer according to the given base.

-

rand (void)

-

int

-

Generates a pseudo-random number.

-

srand (unsigned int seed)

-

void

-

Initializes a random number generator.

-

malloc (size_t size)

-

void *

-

Dynamically allocates a memory block of size.

-

calloc (size_t nmemb, size_t size)

-

void *

-

Dynamically allocates nmemb memory blocks of size.

-

realloc (void *ptr, size_t size)

-

void *

-

Changes the size of the memory block pointed to by ptr to size bytes.

-

free (void *ptr)

-

void

-

Releases the memory space pointed to by ptr.

-

abort (void)

-

_Noreturn void

-

Terminates an abnormal process and sends the SIGABRT signal to the caller.

-

atexit (void(*func)(void))

-

int

-

Registers a termination function.

-

exit (int status)

-

void

-

Terminates the calling process, clears the used memory space and various data structures in the kernel, and sends the process end status to the parent process. All functions registered with atexit and on_exit are called in the reverse order.

-

getenv (const char *name)

-

char *

-

Obtains the value of an environment variable.

-

_Exit (int status)

-

void

-

Terminates the calling process, clears the used memory space and various data structures in the kernel, and sends the process end status to the parent process.

-

assert (scalar expression)

-

void

-

Aborts the program if assertion is false.

-

secure_getenv (const char *name)

-

char *

-

Obtains the value of an environment variable.

-

bsearch (const void *key, const void *base, size_t nel, size_t width, int(*compar)(const void *, const void *))

-

void *

-

Searches for key using the binary search algorithm from the array element base[0] to base[num-1].

-

qsort (const void *base, size_t nel, size_t width, int(*compar)(const void *, const void *))

-

void

-

Sorts array elements base[0] to base[num-1] based on the comparison rules of compar.

-

abs (int i)

-

int

-

Obtains the absolute value of an integer value.

-

labs (long i)

-

long

-

Calculates the absolute value of a long integer.

-

llabs (long long i)

-

long long

-

Calculates the absolute value of a long long integer.

-

div (int numerator, int denominator)

-

div_t

-

Calculates the quotient and remainder of an integer after division.

-

ldiv (long numerator, long denominator)

-

ldiv_t

-

Calculates the quotient and remainder of a long integer after division.

-

lldiv (long long numerator, long long denominator)

-

lldiv_t

-

Calculates the quotient and remainder of a long long integer after division.

-

mblen (const char *s, size_t n)

-

int

-

Obtains the number of bytes in the next multi-byte string.

-

mbtowc (wchar_t *pwc, const char *s, size_t n)

-

int

-

Converts a string constant to a wide character.

-

wctomb (char *s, wchar_t wc)

-

int

-

Converts a wide character to its multi-byte sequence and stores it in a character array.

-

mbstowcs (wchar_t *dest, const char *src, size_t n)

-

size_t

-

Converts a multi-byte string to a wide-character string.

-

wcstombs (char *dest, const wchar_t *src, size_t n)

-

size_t

-

Converts a wide-character string to a multi-byte string.

-

posix_memalign (void **memptr, size_t alignment, size_t size)

-

int

-

Allocates memory with the specified size based on the given alignment.

-

setenv (const char *name, const char *value, int overwrite)

-

int

-

Add or change an environment variable.

-

unsetenv (const char *name)

-

int

-

Deletes an environment variable.

-

mkstemp (char *template)

-

int

-

Creates and opens a unique temporary file.

-

mkostemp (char *template, int flags)

-

int

-

Creates and opens a unique temporary file.

-

mkdtemp (char *template)

-

char *

-

Creates a unique temporary directory based on template.

-

getsubopt (char **optionp, char *const *tokens, char **valuep)

-

int

-

Processes the parameters of an option in the command line.

-

rand_r (unsigned *seedp)

-

int

-

Generates a pseudo-random number.

-

realpath (const char *__restrict path, char *__restrict resolved)

-

char *

-

Obtains a normalized absolute path.

-

random (void)

-

long int

-

Generates a pseudo-random number.

-

srandom (unsigned int seed)

-

void

-

Initializes a random number generator.

-

initstate (unsigned int seed, char *state, size_t n)

-

char *

-

Initializes a random number generator.

-

setstate (char *state)

-

char *

-

Sets the current state list for subsequent random use.

-

putenv (char *s)

-

int

-

Configures an environment variable.

-

l64a (long value)

-

char *

-

Converts a long integer to a 64-bit ASCII string.

-

a64l (const char *str64)

-

long

-

Converts between a 32-bit long integer and a little-endian 64-bit ASCII string.

-

drand48 (void)

-

double

-

Obtains a random number.

-

erand48 (unsigned short xsubi[3])

-

double

-

Obtains a random number.

-

lrand48 (void)

-

long int

-

Generates pseudo-random numbers evenly distributed between [0, 2^31).

-

nrand48 (unsigned short xsubi[3])

-

long int

-

Generates pseudo-random numbers evenly distributed between [0, 2^31).

-

mrand48 (void)

-

long

-

Generates pseudo-random numbers evenly distributed between [-2^31, 2^31).

-

jrand48 (unsigned short xsubi[3])

-

long

-

Generates pseudo-random numbers evenly distributed between [-2^31, 2^31).

-

srand48 (long int seedval)

-

void

-

Sets the start seed value for the pseudo-random number generator.

-

seed48 (unsigned short[3])

-

unsigned short *

-

Generates an evenly distributed pseudo-random seed.

-

lcong48 (unsigned short param[7])

-

void

-

Sets the seed and related algorithm parameters for the pseudo-random number generator.

-

mktemp (char *template)

-

char *

-

Creates a unique temporary file name.

-

mkstemps (char *template, int suffixlen)

-

int

-

Creates and opens a unique temporary file.

-

mkostemps (char *template, int suffixlen, int flags)

-

int

-

Creates and opens a unique temporary file.

-

valloc (size_t size)

-

void *

-

Allocates memory with the specified size and aligns the allocated memory by page size.

-

ecvt (double number, int ndigits, int *decpt, int *sign)

-

char *

-

Converts a double-precision floating-point number into a string.

-

fcvt (double number, int ndigits, int *decpt, int *sign)

-

char *

-

Converts a floating-point number to a string.

-

gcvt (double x, int n, char *b)

-

char *

-

Converts a floating-point number to a string.

-

memcpy (void *__restrict dest, const void *__restrict src, size_t n)

-

void *

-

Copies a string (overlapping not allowed).

-

memmove (void *dest, const void *src, size_t n)

-

void *

-

Copies a string (overlapping allowed).

-

memset (void *s, int c, size_t n)

-

void *

-

Copies a character to the specified memory area.

-

memcmp (const void *s1, const void *s2, size_t n)

-

int

-

Compares two memory areas.

-

memchr (const void *s, int c, size_t n)

-

void *

-

Searches for a character in the specified memory area.

-

strcpy (char *dest, const char *src)

-

char *

-

Copies a string.

-

strncpy (char *dest, const char *src, size_t n)

-

char *

-

Copies n characters of a string.

-

strcat (char *dest, const char *src)

-

char *

-

Appends a string to another one.

-

strncat (char *dest, const char *src, size_t n)

-

char *

-

Appends the first n bytes of a string to another one.

-

strcmp (const char *s1, const char *s2)

-

int

-

Compares two strings by characters.

-

strncmp (const char *s1, const char *s2, size_t n)

-

int

-

Compares the first n characters of two strings.

-

strcoll (const char *s1, const char *s2)

-

int

-

Compares two strings by character for the program's current locale.

-

strcoll_l (const char *s1, const char *s2, locale_t locale)

-

int

-

Compares two strings by character for the specified locale.

-

strxfrm (char *dest, const char *src, size_t n)

-

size_t

-

Converts the first n characters of the source string pointed to by src based on the program's current locale specified by LC_COLLATE, and places them in the destination string pointed to by dest.

-

strchr (const char *s, int c)

-

char *

-

Locates the first occurrence of a character in a string.

-

strrchr (const char *s, int c)

-

char *

-

Locates the last occurrence of a character in a string.

-

strcspn (const char *s, const char *reject)

-

size_t

-

Obtains the length of the initial segment of a string that contains characters not in reject.

-

strspn (const char *s, const char *accept)

-

size_t

-

Obtains the length of the initial segment of a string that contains characters in accept.

-

strpbrk (const char *s, const char *accept)

-

char *

-

Searches for any of a set of characters in a string.

-

strstr (const char *haystack, const char *needle)

-

char *

-

Searches for a needle string in its haystack string.

-

strtok (char *str, const char *delim)

-

char *

-

Separates a string into a series of tokens separated by a delimiter.

-

strlen (const char *s)

-

size_t

-

Calculates the length of a string.

-

strerror (int errnum)

-

char *

-

Obtains an error description string of the specified error code.

-

strtok_r (char *str, const char *delim, char **saveptr)

-

char *

-

Separates a string into a series of tokens separated by a delimiter, with the saveptr parameter specified.

-

strerror_l (int errnum, locale_t locale)

-

char *

-

Obtains an error description string of the specified error code for the specified locale.

-

strerror_r (int errnum, char *buf, size_t buflen)

-

char *

-

Obtains an error description string of the specified error code.

-

stpcpy (char *dest, const char *src)

-

char *

-

Copies a string.

-

stpncpy (char *dest, const char *src, size_t n)

-

char *

-

Copies n characters of a string.

-

strnlen (const char *s, size_t maxlen)

-

size_t

-

Calculates the length of a string.

-

strdup (const char *s)

-

char *

-

Copies a string to a new position.

-

strndup (const char *s, size_t n)

-

char *

-

Copies n characters of a string to a new position.

-

strsignal (int sig)

-

char *

-

Returns a string describing the signal number.

-

memccpy (void *__restrict dest, const void *__restrict src, int c, size_t n)

-

void *

-

Copies a memory area to another one.

-

strsep (char **stringp, const char *delim)

-

char *

-

Separates a string into a series of tokens separated by a delimiter.

-

strlcat (char *d, const char *s, size_t n)

-

size_t

-

Appends the first n bytes of a string to another one.

-

strlcpy (char *d, const char *s, size_t n)

-

size_t

-

Copies a string.

-

strverscmp (const char *s1, const char *s2)

-

int

-

Compares strings of two versions (string 1 and string 2) and returns the comparison result.

-

strcasestr (const char *haystack, const char *needle)

-

char *

-

Searches for a needle string in its haystack string and returns a pointer.

-

memmem (const void *haystack, size_t haystacklen, const void *needle, size_t needlelen)

-

void *

-

Searches for a needle string in its haystack string.

-

memrchr (const void *s, int c, size_t n)

-

void *

-

Searches for a character in the specified memory area.

-

mempcpy (void *dest, const void *src, size_t n)

-

void *

-

Copies a string (overlapping not allowed).

-

bcmp (const void *s1, const void *s2, size_t n)

-

int

-

Compares byte sequences.

-

bcopy (const void *src, void *dest, size_t n)

-

void

-

Copies byte sequences.

-

bzero (void *s, size_t n)

-

void

-

Sets byte sequences to zero.

-

index (const char *s, int c)

-

char *

-

Searches for the first position of the matched character in a string.

-

rindex (const char *s, int c)

-

char *

-

Searches for the last position of the matched character in a string.

-

ffs (int i)

-

int

-

Searches for the first bit in a word of the integer type.

-

ffsl (long int i)

-

int

-

Searches for the first bit in a word of the long integer type.

-

ffsll (long long int i)

-

int

-

Searches for the first bit in a word of the 8-byte long integer type.

-

strcasecmp (const char *_l, const char *_r)

-

int

-

Compares two strings (string 1 and string 2), regardless of the letter case.

-

strncasecmp (const char *_l, const char *_r, size_t n)

-

int

-

Compares a specified length of two strings (string 1 and string 2), regardless of the letter case.

-

pipe (int pipefd[2])

-

int

-

Creates an anonymous pipe.

-

close (int fd)

-

int

-

Closes a file with a specified file descriptor.

-

dup (int oldfd)

-

int

-

Copies a specified file descriptor.

-

dup2 (int oldfd, int newfd)

-

int

-

Copies the descriptor of the target file to a specified descriptor.

-

lseek (int fd, off_t offset, int whence)

-

off_t

-

Sets the offset of the pointer to the file.

-

fsync (int fd)

-

int

-

Synchronizes a file associated with a specified file descriptor to the storage device.

-

read (int fd, void *buf, size_t size)

-

ssize_t

-

Reads the file contents and saves them in a specified buffer location.

-

write (int fd, const void *buf, size_t size)

-

ssize_t

-

Writes the specified content to the file.

-

pread (int fd, void *buf, size_t count, off_t offset)

-

ssize_t

-

Reads data whose offset is offset and length is count from fd to the buffer.

-

pwrite (int fd, const void *buf, size_t count, off_t offset)

-

ssize_t

-

Writes data from the buffer to fd whose offset is offset and length is count.

-

unlink (const char *path)

-

int

-

Deletes a specified file.

-

unlinkat (int fd, const char *path, int flag)

-

int

-

Deletes a specified file.

-

rmdir (const char *path)

-

int

-

Deletes a directory.

-

truncate (const char *path, off_t length)

-

int

-

Truncates a file to a specified size based on the file path.

-

ftruncate (int fd, off_t length)

-

int

-

Truncates a file to a specified length.

-

access (const char *path, int mode)

-

int

-

Checks whether a file has the corresponding permission.

-

chdir (const char *path)

-

int

-

Switches the current working directory to a specified directory.

-

getcwd (char *buf, size_t size)

-

char *

-

Obtains the current working directory.

-

alarm (unsigned int seconds)

-

unsigned int

-

Arranges a signal to be sent to the current process after the number of seconds specified by seconds.

-

sleep (unsigned seconds)

-

unsigned

-

Sleeps for a period of time.

-

pause (void)

-

int

-

Waits for signal.

-

fork (void)

-

pid_t

-

Creates a new process that inherits from the user-mode data of its parent process.

-

execve (const char *path, char *const arg[], char *const envp[])

-

int

-

Executes a specified user program file in ELF format.

-

execv (const char *path, char *const arg[])

-

int

-

Executes a specified user program file in ELF format.

-

execle (const char *path, const char *arg,...)

-

int

-

Executes a specified user program file in ELF format.

-

execl (const char *path, const char *arg,...)

-

int

-

Executes a specified user program file in ELF format.

-

execvp (const char *path, char *const arg[])

-

int

-

Executes a specified user program file in ELF format.

-

execlp (const char *path, const char *arg,...)

-

int

-

Executes a specified user program file in ELF format.

-

_exit (int status)

-

_Noreturn void

-

Exits the process immediately and closes all opened file descriptors in the process.

-

swab (const void *from, void *to, ssize_t n)

-

void

-

Swaps bytes.

-

getpid (void)

-

pid_t

-

Obtains the process ID.

-

getppid (void)

-

pid_t

-

Obtains the parent process ID.

-

getpgrp (void)

-

pid_t

-

Obtains the ID of the process group of the calling process.

-

getpgid (pid_t pid)

-

pid_t

-

Obtains the ID of the process group whose process ID is specified by pid.

-

setpgid (pid_t pid, pid_t pgid)

-

int

-

Sets the ID of the process group whose process ID is specified by pid.

-

getopt (int argc, char *const argv[], const char *optstring)

-

int

-

Parses command-line arguments based on the specified option.

-

getuid (void)

-

uid_t

-

Obtains the real user ID (UID) of the calling process.

-

geteuid (void)

-

uid_t

-

Obtains the effective user ID (UID) of the calling process.

-

getgid (void)

-

gid_t

-

Obtains the real group ID (GID) of the calling process.

-

getegid (void)

-

gid_t

-

Obtains the effective group ID (GID) of the calling process.

-

getgroups (int size, gid_t list[])

-

int

-

Obtains a list of supplementary user group IDs specific to the calling process.

-

setuid (uid_t uid)

-

int

-

Sets the real user ID for the calling process.

-

seteuid (uid_t euid)

-

int

-

Sets the effective user ID of the calling process.

-

setgid (gid_t gid)

-

int

-

Sets the user group ID of the calling process.

-

setegid (gid_t egid)

-

int

-

Sets the effective user group ID of the calling process.

-

pathconf (const char *path, int name)

-

long

-

Obtains the configuration value of a file.

-

setreuid (uid_t ruid, uid_t euid)

-

int

-

Sets the real and effective user IDs of the calling process.

-

setregid (gid_t rgid, gid_t egid)

-

int

-

Sets the real and effective user group IDs of the calling process.

-

setpgrp (void)

-

pid_t

-

Sets the process group ID of the calling process.

-

usleep (unsigned useconds)

-

int

-

Sleeps for several microseconds.

-

ualarm (unsigned value, unsigned interval)

-

unsigned

-

Sets a microsecond-level timer.

-

setgroups (size_t size, const gid_t *list)

-

int

-

Sets the supplementary user group list of the calling process.

-

setresuid (uid_t ruid, uid_t euid, uid_t suid)

-

int

-

Sets the real, effective, and saved user IDs of the calling process.

-

setresgid (gid_t rgid, gid_t egid, gid_t sgid)

-

int

-

Sets the real, effective, and saved group IDs of the calling process.

-

getresuid (uid_t *ruid, uid_t *euid, uid_t *suid)

-

int

-

Obtains the real, effective, and saved user IDs of the calling process.

-

getresgid (gid_t *rgid, gid_t *egid, gid_t *sgid)

-

int

-

Obtains the real, effective, and saved user group IDs of the calling process.

-

get_current_dir_name (void)

-

char *

-

Obtains the name of the current working directory.

-

sbrk (intptr_t increment)

-

void *

-

Adjusts the heap size of a process.

-

getpagesize (void)

-

int

-

Obtains the memory page size.

-

chown (const char *pathname, uid_t owner, gid_t group)

-

int

-

Changes the user and group ownership of a file.

-

uname (struct utsname *buf)

-

int

-

Obtains the system information.

-

wcscpy (wchar_t *dest, const wchar_t *src)

-

wchar_t *

-

Copies the wide characters pointed to by src to the wide character array pointed to by dest, including the terminating null character '\0'. .

-

wcsncpy (wchar_t *dest, const wchar_t *src, size_t n)

-

wchar_t *

-

Copies the first n wide characters pointed to by src to the wide character array pointed to by dest.

-

wcscat (wchar_t *dest, const wchar_t *src)

-

wchar_t *

-

Appends a copy of the wide characters pointed to by src to the end of the wide character array pointed to by dest and adds a terminating null character '\0'.

-

wcsncat (wchar_t *dest, const wchar_t *src, size_t n)

-

wchar_t *

-

Appends a copy of the first n wide characters pointed to by src to the end of the wide characters pointed to by dest and adds a terminating null character '\0'.

-

wcscmp (const wchar_t *s1, const wchar_t *s2)

-

int

-

Compares each character in the string pointed to by s1 with that in the string pointed to by s2 in ASCII-code order.

-

wcsncmp (const wchar_t *s1, const wchar_t *s2, size_t n)

-

int

-

Compares the first n characters in the string pointed to by s1 with those in the string pointed to by s2 in ASCII-code order.

-

wcscoll (const wchar_t *ws1, const wchar_t *ws2)

-

int

-

Compares the wide characters in the string pointed to by ws1 with those in the string pointed to by ws2 based on the specified locale LC_COLLATE.

-

wcsxfrm (wchar_t *s1, const wchar_t *s2, size_t n)

-

size_t

-

Compares the first n wide characters in the string pointed to by s1 with those in the string pointed to by s2.

-

wcschr (const wchar_t *wcs, wchar_t wc)

-

wchar_t *

-

Locates the first occurrence of the wide character pointed to by wc in the wide character string pointed to by wcs.

-

wcsrchr (const wchar_t *wcs, wchar_t wc)

-

wchar_t *

-

Locates the last occurrence of the wide character pointed to by wc in the wide character string pointed to by wcs.

-

wcscspn (const wchar_t *wcs, const wchar_t *accept)

-

size_t

-

Scans the wide character string pointed to by wcs for any wide characters specified in reject and obtains the number of unmatched characters in wcs.

-

wcsspn (const wchar_t *wcs, const wchar_t *accept)

-

size_t

-

Scans the wide character string pointed to by wcs for any wide characters specified in reject and obtains the number matched characters in wcs.

-

wcspbrk (const wchar_t *wcs, const wchar_t *accept)

-

wchar_t *

-

Scans the wide character string pointed to by wcs for any wide characters specified in accept and obtains the first occurrence of the matched character.

-

wcstok (wchar_t *wcs, const wchar_t *delim, wchar_t **ptr)

-

wchar_t *

-

Splits a wide character string pointed to by wcs into tokens using the given delimiter.

-

wcslen (const wchar_t *s)

-

size_t

-

Calculates the length of a wide character string pointed to by s.

-

wcswcs (const wchar_t *haystack, const wchar_t *needle)

-

wchar_t *

-

Searches the wide character string pointed to by dest for the first occurrence of the wide character string pointed to by src.

-

wmemchr (const wchar_t *s, wchar_t c, size_t n)

-

wchar_t *

-

Searches for the first position of the matched wide character within the specified number of characters in a wide character string.

-

wmemcmp (const wchar_t *lhs, const wchar_t *rhs, size_t count)

-

int

-

Compares the first count characters in the string pointed to by lhs with the first count characters in the string pointed to by rhs.

-

wmemcpy (wchar_t *dest, const wchar_t *src, size_t count)

-

wchar_t *

-

Copies count successive characters from the wide character array pointed to by src to the wide character array pointed to by dest.

-

wmemmove (wchar_t *dest, const wchar_t *src, size_t count)

-

wchar_t *

-

Copies count successive characters from the wide character array pointed to by src to the wide character array pointed to by dest (with possible array overlapping).

-

wmemset (wchar_t *dest, wchar_t ch, size_t count)

-

wchar_t *

-

Fills count characters specified by ch to the wide character array pointed to by dest.

-

btowc (int c)

-

wint_t

-

Converts a single-byte character c into its wide-character representation.

-

wctob (wint_t c)

-

int

-

Converts a wide character c into its single-byte representation.

-

mbsinit (const mbstate_t *ps)

-

int

-

Checks whether the mbstate_t object pointed to by ps is in the initial state.

-

wcrtomb (char *s, wchar_t wc, mbstate_t *ps)

-

size_t

-

Converts the wide character specified by wc into a character string and stores the string to the beginning of the character array pointed to by s.

-

mbrlen (const char *s, size_t n, mbstate_t *ps)

-

size_t

-

Determines the number of bytes in a character string pointed to by s.

-

mbsrtowcs (wchar_t *dest, const char **src, size_t len, mbstate_t *ps)

-

size_t

-

Converts a multi-byte character string with a length of len into a wide character string.

-

wcsrtombs (char *dest, const wchar_t **src, size_t len, mbstate_t *ps)

-

size_t

-

Converts a wide character string into a multi-byte string.

-

wcstof (const wchar_t *str, wchar_t **endptr)

-

float

-

Converts a wide character string pointed to by str into a floating-point value and assigns the next character in str after the floating-point value to endptr.

-

wcstod (const wchar_t *str, wchar_t **endptr)

-

double

-

Converts a wide character string pointed to by str into a double value and assigns the next character in str after the double value to endptr.

-

wcstold (const wchar_t *str, wchar_t **endptr)

-

long double

-

Converts a wide character string pointed to by str into a long double value and assigns the next character in str after the long double value to endptr.

-

wcstol (const wchar_t *str, wchar_t **endptr, int base)

-

long

-

Converts a wide character string pointed to by str into a long value.

-

wcstoul (const wchar_t *str, wchar_t **endptr, int base)

-

unsigned long

-

Converts a wide character string pointed to by str into an unsigned long value of a specified base.

-

wcstoll (const wchar_t *str, wchar_t **endptr, int base)

-

long long

-

Converts a wide character string pointed to by str into a long long value of a specified base.

-

wcstoull (const wchar_t *str, wchar_t **endptr, int base)

-

unsigned long long

-

Converts a wide character string pointed to by str into an unsigned long long value of a specified base.

-

fwide (FILE *stream, int mode)

-

int

-

Sets and determines the orientation of the file stream.

-

wprintf (const wchar_t *format,...)

-

int

-

Prints formatted data to the standard output (stdout).

-

fwprintf (FILE *__restrict fp, const wchar_t *__restrict fmt,...)

-

int

-

Prints wide character strings to a specified file stream.

-

swprintf (wchar_t *wcs, size_t maxlen, const wchar_t *format,...)

-

int

-

Prints formatted data to a specified string.

-

vwprintf (const wchar_t *format, va_list args)

-

int

-

Prints formatted data from a variable argument list to the standard output (stdout).

-

vfwprintf (FILE *stream, const wchar_t *format, __isoc_va_list args)

-

int

-

Prints formatted data from a variable argument list specified by args to a specified file stream.

-

vswprintf (wchar_t *wcs, size_t maxlen, const wchar_t *format, __isoc_va_list args)

-

int

-

Prints formatted data from a variable argument list specified by args to a specified string.

-

wscanf (const wchar_t *format,...)

-

int

-

Reads formatted data from the standard input (stdin) and stores it based on the wide string format into the locations pointed to by the variable arguments.

-

fwscanf (FILE *stream, const wchar_t *format,...)

-

int

-

Reads formatted data from a specified stream and stores it based on the wide string format into the locations pointed to by the variable arguments.

-

swscanf (const wchar_t *ws, const wchar_t *format,...)

-

int

-

Reads data from a wide character string pointed to by ws and stores it based on the wide string format into the locations pointed to by the variable arguments.

-

vwscanf (const wchar_t *format, va_list arg)

-

int

-

Reads data from the stdin and stores it based on the wide string format into the locations pointed to by the elements in the variable argument list identified by arg.

-

vfwscanf (FILE *stream, const wchar_t *format, va_list arg)

-

int

-

Reads data from a specified file stream and stores it based on the wide string format into the locations pointed to by the elements in the variable argument list identified by arg.

-

vswscanf (const wchar_t *ws, const wchar_t *format, va_list arg)

-

int

-

Reads data from a string pointed to by ws and stores it based on the wide string format into the locations pointed to by the elements in the variable argument list identified by arg.

-

fgetwc (FILE *stream)

-

wint_t

-

Reads a wide character from a specified file stream.

-

getwc (FILE *stream)

-

wint_t

-

Reads the first wide character from a specified file stream.

-

getwchar (void)

-

wint_t

-

Reads a wide character from the stdin.

-

fputwc (wchar_t wc, FILE *stream)

-

wint_t

-

Writes a wide character wc to a specified file stream.

-

putwc (wchar_t wc, FILE *stream)

-

wint_t

-

Writes a wide character wc to a specified file stream.

-

putwchar (wchar_t wc)

-

wint_t

-

Writes a wide character wc to the stdout.

-

fgetws (wchar_t *ws, int n, FILE *stream)

-

wchar_t *

-

Reads wide characters from a specified file stream.

-

fputws (const wchar_t *ws, FILE *stream)

-

int

-

Writes a wide string pointed to by ws to a specified file stream.

-

ungetwc (wint_t ch, FILE *stream)

-

wint_t

-

Pushes a character back into a specified file stream.

-

mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)

-

size_t

-

Converts a multi-byte character string with a length of n into a wide character string.

-

mbsnrtowcs (wchar_t *dest, const char **src, size_t nwc, size_t len, mbstate_t *ps)

-

size_t

-

Converts a multi-byte character string with a length of n into a wide character string that can hold a total of nwc wide characters.

-

wcsnrtombs (char *dest, const wchar_t **src, size_t nwc, size_t len, mbstate_t *ps)

-

size_t

-

Converts nwc wide characters in the string pointed to by src into a character string.

-

wcsdup (const wchar_t *s)

-

wchar_t *

-

Copies a specified wide character string to a newly allocated buffer.

-

wcsnlen (const wchar_t *s, size_t maxlen)

-

size_t

-

Calculates the length of a wide character string pointed to by s.

-

wcpcpy (wchar_t *dest, const wchar_t *src)

-

wchar_t *

-

Copies the wide characters (including the terminating null character '\0') pointed to by src to the wide character array pointed to by dest.

-

wcpncpy (wchar_t *dest, const wchar_t *src, size_t n)

-

wchar_t *

-

Copies n wide characters (including the terminating null character '\0') pointed to by src to the wide character array pointed to by dest.

-

wcscasecmp (const wchar_t *s1, const wchar_t *s2)

-

int

-

Compares the wide characters in the string pointed to by s1 with those in the string pointed to by s2, with their case differences ignored.

-

wcscasecmp_l (const wchar_t *s1, const wchar_t *s2, locale_t locale)

-

int

-

Compares the wide characters in the string pointed to by s1 with those in the string pointed to by s2 based on the specified locale environment, with their case differences ignored.

-

wcsncasecmp (const wchar_t *s1, const wchar_t *s2, size_t n)

-

int

-

Compares a maximum of n wide characters in the string pointed to by s1 with those in the string pointed to by s2, with their case differences ignored.

-

wcsncasecmp_l (const wchar_t *s1, const wchar_t *s2, size_t n, locale_t locale)

-

int

-

Compares a maximum of n wide characters in the string pointed to by s1 with those in the string pointed to by s2 based on the specified locale environment, with their case differences ignored.

-

wcscoll_l (const wchar_t *s1, const wchar_t *s2, locale_t locale)

-

int

-

Compares wide characters in the string pointed to by s1 with those in the string pointed to by s2 based on the specified locale environment.

-

wcsftime (wchar_t *__restrict wcs, size_t n, const wchar_t *__restrict f, const struct tm *__restrict tm)

-

size_t

-

Converts the date and time in the tm structure to a wide character string.

-

wcsxfrm_l (wchar_t *s1, const wchar_t *s2, size_t n, locale_t locale)

-

size_t

-

Compares the first n wide characters in the string pointed to by s1 with those in the string pointed to by s2 based on the specified locale environment.

-

iswalnum (wint_t wc)

-

int

-

Checks whether a wide character is a letter or digit.

-

iswalpha (wint_t wc)

-

int

-

Checks whether a wide character is a letter.

-

iswblank (wint_t wc)

-

int

-

Checks whether a wide character is a space or tab character (\t).

-

iswcntrl (wint_t wc)

-

int

-

Checks whether a wide character is a control character.

-

iswdigit (wint_t wc)

-

int

-

Checks whether a wide character is a decimal digit.

-

iswgraph (wint_t wc)

-

int

-

Checks whether a wide character is visible.

-

iswlower (wint_t wc)

-

int

-

Checks whether a wide character is a lowercase letter.

-

iswprint (wint_t wc)

-

int

-

Checks whether a wide character is printable.

-

iswpunct (wint_t wc)

-

int

-

Checks whether a wide character is a punctuation mark.

-

iswupper (wint_t wc)

-

int

-

Checks whether a wide character is an uppercase letter.

-

iswxdigit (wint_t wc)

-

int

-

Checks whether a wide character is a hexadecimal digit.

-

iswctype (wint_t wc, wctype_t desc)

-

int

-

Checks whether the character specified by wc belongs to the desc class.

-

towctrans (wint_t wc, wctrans_t desc)

-

wint_t

-

Translates the type of a wide character based on the conversion mapping relationship.

-

towlower (wint_t wc)

-

wint_t

-

Converts an uppercase wide character to lowercase.

-

towupper (wint_t wc)

-

wint_t

-

Converts a lowercase wide character to uppercase.

-

wctrans (const char *name)

-

wctrans_t

-

Determines a mapping which can map a wide character to another wide character.

-

wctype (const char *name)

-

wctype_t

-

Checks whether a wide character type exists in the LC_CTYPE locale.

-

iswalnum_l (wint_t wc, locale_t locale)

-

int

-

Checks whether a wide character is a letter or digit for the specified locale.

-

iswalpha_l (wint_t wc, locale_t locale)

-

int

-

Checks whether a wide character is alphabetic for the specified locale.

-

iswblank_l (wint_t wc, locale_t locale)

-

int

-

Checks whether a wide character is a blank or \t character for the specified locale.

-

iswcntrl_l (wint_t wc, locale_t locale)

-

int

-

Checks whether a wide character is a control character for the specified locale.

-

iswdigit_l (wint_t wc, locale_t locale)

-

int

-

Checks whether a wide character is a decimal digit for the specified locale.

-

iswgraph_l (wint_t wc, locale_t locale)

-

int

-

Checks whether a wide character is visible for the specified locale.

-

iswlower_l (wint_t wc, locale_t locale)

-

int

-

Checks whether a wide character is in lowercase for the specified locale.

-

iswprint_l (wint_t wc, locale_t locale)

-

int

-

Checks whether a wide character is printable for the specified locale.

-

iswpunct_l (wint_t wc, locale_t locale)

-

int

-

Checks whether wc is a punctuation wide character for the specified locale.

-

iswspace (wint_t wc)

-

int

-

Checks whether a wide character belongs to the wide-character class space.

-

iswspace_l (wint_t wc, locale_t locale)

-

int

-

Checks whether a wide character belongs to the wide-character class space for the specified locale.

-

iswupper_l (wint_t wc, locale_t locale)

-

int

-

Checks whether a wide character is in uppercase for the specified locale.

-

iswxdigit_l (wint_t wc, locale_t locale)

-

int

-

Checks whether a wide character is a hexadecimal digit for the specified locale.

-

iswctype_l (wint_t wc, wctype_t desc, locale_t locale)

-

int

-

Checks whether the character specified by wc belongs to the desc class for the specified locale.

-

towlower_l (wint_t wc, locale_t locale)

-

wint_t

-

Converts an uppercase wide character to lowercase for the specified locale.

-

towupper_l (wint_t wc, locale_t locale)

-

wint_t

-

Converts a lowercase wide character to uppercase for the specified locale.

-

towctrans_l (wint_t wc, wctype_t desc, locale_t locale)

-

wint_t

-

Translates the type of a wide character based on the translation mapping relationship for the specified locale.

-

wctrans_l (const char *name, locale_t locale)

-

wctrans_t

-

Determines a mapping which can map a wide character to another wide character.

-

wctype_l (const char *name, locale_t locale)

-

wctype_t

-

Checks whether a wide character type exists for the specified locale.

-
- -## **Details** - -## **Macro Definition ** - -## \_tolower - -``` -#define _tolower( a) ((a)|0x20) -``` - - **Description:** - -Converts an uppercase letter to its lowercase equivalent. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
aIndicates the parameter to convert.
- -**Returns:** - -Returns the converted lowercase letter if the conversion is successful. - -## \_toupper - -``` -#define _toupper( a) ((a)&0x5f) -``` - - **Description:** - -Converts a lowercase letter to its uppercase equivalent. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
aIndicates the parameter to convert.
- -**Returns:** - -Returns the converted uppercase letter if the conversion is successful. - -## isascii - -``` -#define isascii( a) (0 ? isascii(a) : (unsigned)(a) < 128) -``` - - **Description:** - -Checks whether a parameter is an ASCII character. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
aIndicates the parameter to check.
- -**Returns:** - -Returns a non-zero value if the operation is successful; returns **0** otherwise. - -## strdupa - -``` -#define strdupa( x) [strcpy](UTILS.md#ga7a82515b5d377be04817715c5465b647)(alloca([strlen](UTILS.md#gaa383452fe445bfae989358c9d7d96f4f)(x)+1),x) -``` - - **Description:** - -Copies a string to a new position. - -**Attention:** - -[strdupa\(\)](UTILS.md#ga6dfceaa174558eaee80a23cb09139dfd) internally calls **alloca\(\)** to allocate space for variables. You should pay attention to the stack space size. - -**Returns:** - -Returns the pointer to the space allocated for the copied string if the operation is successful; returns **NULL** if the space fails to be allocated. - -## va\_arg - -``` -#define va_arg( v, l ) __builtin_va_arg(v,l) -``` - - **Description:** - -Obtains the next argument in the variable-length argument list. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
vIndicates the va_list v initialized by va_start(). Each call to va_arg() modifies v so that the next call returns the next argument.
lIndicates the name of the last argument before the variable argument list, that is, the last argument of which the calling function knows the type.
- -**Attention:** - -**va\_start** must be called first. - -## va\_copy - -``` -#define va_copy( d, s ) __builtin_va_copy(d,s) -``` - - **Description:** - -Copies the previously initialized variable argument list **s** to **d**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
dIndicates the destination variable.
sIndicates the source variable.
- -## va\_end - -``` -#define va_end( v) __builtin_va_end(v) -``` - - **Description:** - -Ends a variable-length argument list. - -This function releases a calling function. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
vIndicates the va_list v initialized by va_start().
- -**Attention:** - -After **va\_end** is called, **v** is a random value. - -## va\_start - -``` -#define va_start( v, l ) __builtin_va_start(v,l) -``` - - **Description:** - -Defines the start position of the variable-length argument list. - -This function initializes **v** for subsequent use by [va\_arg](UTILS.md#ga9cfd655f1203c9a345ddd90446f0bcee) and [va\_end](UTILS.md#ga823b205416e9129825841b74c3bf8484), and must be called first. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
vIndicates the argument to be initialized.
lIndicates the name of the last argument before the variable argument list, that is, the last argument of which the calling function knows the type.
- -**Attention:** - -This function must be used together with [va\_end](UTILS.md#ga823b205416e9129825841b74c3bf8484). - -## **Function ** - -## \_Exit\(\) - -``` -void _Exit (int status) -``` - - **Description:** - -Terminates the calling process, clears the used memory space and various data structures in the kernel, and sends the process end status to the parent process. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
statusIndicates the status sent to the parent process when the calling process ends.
- -## \_exit\(\) - -``` -_Noreturn void _exit (int status) -``` - - **Description:** - -Exits the process immediately and closes all opened file descriptors in the process. - -The subprocess is taken over by process 1. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
statusIndicates the exit status of the process. The status is returned to the parent process of the current process and can be collected by the wait() series functions.
- -## a64l\(\) - -``` -long a64l (const char * str64) -``` - - **Description:** - -Converts between a 32-bit long integer and a little-endian 64-bit ASCII string. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
str64Indicates the pointer to the character constant.
- -**Attention:** - -If the length of **str64** is greater than **6**, only the first six bytes are used. - -**Returns:** - -Returns the converted value. - -## abort\(\) - -``` -_Noreturn void abort (void ) -``` - - **Description:** - -Terminates an abnormal process and sends the **SIGABRT** signal to the caller. - -## abs\(\) - -``` -int abs (int i) -``` - - **Description:** - -Obtains the absolute value of an integer value. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
iIndicates the integer value.
- -**Returns:** - -Returns the absolute value. - -## access\(\) - -``` -int access (const char * path, int mode ) -``` - - **Description:** - -Checks whether a file has the corresponding permission. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
pathIndicates the path of the file to be checked.
modeIndicates the access permission to be checked.
- -**Returns:** - -Returns **0** if the current file has the permission to be checked; returns **-1** and sets **errno** to a value in the following table if the current file does not have the permission to be checked or other errors occur. - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EACCES

-

The permission bit of the file mode does not allow the requested access, or the search permission is denied on the path prefix component.

-

EFAULT

-

Invalid address.

-

ENOENT

-

The component of path does not exist or the path is an empty string.

-

ENOMEM

-

Insufficient memory.

-
- -## alarm\(\) - -``` -unsigned int alarm (unsigned int seconds) -``` - - **Description:** - -Arranges a signal to be sent to the current process after the number of seconds specified by **seconds**. - - - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
secondsIndicates an unsigned integer seconds needs to be transferred.
- -**Attention:** - -An exception occurs when this function is used together with **[setitimer\(\)](TIME.md#ga81245d77d2f570933cc81f13a101bff8)**, [ualarm\(\)](UTILS.md#ga9d35348d3389a721ab5aef5f4f036c61), and **[sleep\(\)](UTILS.md#gad4669b3813c3b4a616a738317fdc974f)**. This function shares a timer with **[setitimer\(\)](TIME.md#ga81245d77d2f570933cc81f13a101bff8)** and [ualarm\(\)](UTILS.md#ga9d35348d3389a721ab5aef5f4f036c61). You are not advised to use this function together with **[sleep\(\)](UTILS.md#gad4669b3813c3b4a616a738317fdc974f)**. - -**Returns:** - -Returns the remaining seconds until the countdown of **seconds** ends; returns **0** if no alarm clock is set. - -## assert\(\) - -``` -void assert (scalar expression) -``` - - **Description:** - -Aborts the program if assertion is false. - -If the **NDEBUG** macro is not defined and the value of **expression** is false, an error message is displayed and the process is terminated. In other cases, this macro is expanded but no operation is performed. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
expressionIndicates the condition variable. If the value of expression is false, an error message is displayed and the process is terminated.
- -## atexit\(\) - -``` -int atexit (void(*)(void) func) -``` - - **Description:** - -Registers a termination function. - -The registered function is called when the current process is terminated normally. The sequence of the termination function to be called is opposite to the registration sequence. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
funcIndicates the pointer to the termination function to be called.
- -**Returns:** - -Returns **0** if the operation is successful; returns a non-zero value otherwise. - -## atof\(\) - -``` -double atof (const char * nptr) -``` - - **Description:** - -Converts an input string to a double-precision floating-point number. - -The conversion stops when a non-numeric character is encountered. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
nptrIndicates the string to be converted.
- -**Returns:** - -Returns the converted value if the operation is successful; returns **0** if the operation fails. - -## atoi\(\) - -``` -int atoi (const char * nptr) -``` - - **Description:** - -Converts an input string to an integer. - -The conversion stops when a non-numeric character is encountered. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
nptrIndicates the string to be converted.
- -**Returns:** - -Returns the converted value if the operation is successful; returns **0** if the operation fails. - -## atol\(\) - -``` -long atol (const char * nptr) -``` - - **Description:** - -Converts an input string to a long integer. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
nptrIndicates the string to be converted.
- -**Returns:** - -Returns the converted value if the operation is successful; returns **0** if the operation fails. - -## atoll\(\) - -``` -long long atoll (const char * nptr) -``` - - **Description:** - -Converts a string to an 8-byte long integer. - -The conversion stops when a non-numeric character is encountered. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
nptrIndicates the string to be converted.
- -**Returns:** - -Returns the converted value if the operation is successful; returns **0** if the operation fails. - -## bcmp\(\) - -``` -int bcmp (const void * s1, const void * s2, size_t n ) -``` - - **Description:** - -Compares byte sequences. - -Specifically, this function checks whether the first **n** bytes of the two byte sequences pointed to by **s1** and **s2** are equal. If they are equal or **n** is 0, this function returns **0**. Otherwise, it returns a non-zero value. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
s1Indicates the pointer to byte sequence 1 for comparison.
s2Indicates the pointer to byte sequence 2 for comparison.
nIndicates the number of bytes to be compared.
- -**Attention:** - -This function is deprecated \(marked as LEGACY in POSIX.1-2001\). Its specifications have been removed since POSIX.1-2008. You can use [memcmp\(\)](UTILS.md#ga9e6df54ee04e18a3772335580e2ed872) in new projects. - -**Returns:** - -Returns **0** if the two byte sequences are equal or **n** is 0; returns a non-zero value if the operation fails. - -## bcopy\(\) - -``` -void bcopy (const void * src, void * dest, size_t n ) -``` - - **Description:** - -Copies byte sequences. - -Specifically, this function copies the first **n** bytes from the memory area pointed to by **src** to that pointed to by **dest**. This function can always be called successfully even if the two specified areas overlap. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
srcIndicates the pointer to the source memory area.
destIndicates the pointer to the destination memory area.
nIndicates the number of bytes to be copied.
- -**Attention:** - -This function is deprecated \(marked as LEGACY in POSIX.1-2001\). Its specifications have been removed since POSIX.1-2008. You can use [memcpy\(\)](UTILS.md#ga0ee37e291991bef6e3f4b49a970171e7) and [memmove\(\)](UTILS.md#ga802c986820d3866639922b6bc9484f90) in new projects. - -## bsearch\(\) - -``` -void* bsearch (const void * key, const void * base, size_t nel, size_t width, int(*)(const void *, const void *) compar ) -``` - - **Description:** - -Searches for **key** using the binary search algorithm from the array element **base\[0\]** to **base\[num-1\]**. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the pointer to the keyword to be searched.
baseIndicates the array to be searched.
nelIndicates the number of elements in the array to be searched.
widthIndicates the length of each element, in bytes.
compareIndicates the pointer to the comparison subfunction used to define comparison rules.
- -**Attention:** - -Data must have been sorted, following the same rule as the comparison subfunction pointed to by **compar**. - -**Returns:** - -Returns the matching item if the operation is successful; returns **NULL** if the operation fails. - -## btowc\(\) - -``` -wint_t btowc (int c) -``` - - **Description:** - -Converts a single-byte character **c** into its wide-character representation. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
cIndicates the character to be converted.
- -**Attention:** - -If **c** is **EOF** or its length is not 1, **WEOF** is returned. - -**Returns:** - -Returns the wide-character representation if the operation is successful; returns **WEOF** if **c** is **EOF** or its length is not 1. - -## bzero\(\) - -``` -void bzero (void * s, size_t n ) -``` - - **Description:** - -Sets byte sequences to zero. - -Specifically, this function sets the first **n** bytes in the memory area starting at **s** to zero. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sIndicates the pointer to the first token in the byte sequence to be set to zero.
nIndicates the number of bytes to be set to zero.
- -**Attention:** - -This function is deprecated \(marked as LEGACY in POSIX.1-2001\). Its specifications have been removed since POSIX.1-2008. You can use [memset\(\)](UTILS.md#gace6ee45c30e71865e6eb635200379db9) in new projects. - -## calloc\(\) - -``` -void* calloc (size_t nmemb, size_t size ) -``` - - **Description:** - -Dynamically allocates **nmemb** memory blocks of **size**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
nmembIndicates the number of memory blocks to be allocated.
sizeIndicates the size of the memory block to be allocated.
- -**Returns:** - -Returns the pointer to the allocated memory block if the operation is successful; returns **NULL** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

ENOMEM

-

Insufficient memory.

-
- -## chdir\(\) - -``` -int chdir (const char * path) -``` - - **Description:** - -Switches the current working directory to a specified directory. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
pathIndicates the target working directory.
- -**Returns:** - -Returns **0** if the working directory is switched; returns **-1** and sets **errno** to a value in the following table if the working directory fails to be switched and the current working directory remains unchanged. - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

path is set to NULL.

-

ENAMETOOLONG

-

The length of the path name is greater than PATH_MAX.

-

ENOMEM

-

Insufficient memory.

-

ENOTDIR

-

path is not a directory name.

-

ENOENT

-

The path does not exist.

-
- -## chown\(\) - -``` -int chown (const char * pathname, [uid_t](UTILS.md#ga66a6f1a27d4474144d59fb2b805ff50e) owner, [gid_t](UTILS.md#ga7ba7f6123ac8905fbe36f596bea2437e) group ) -``` - - **Description:** - -Changes the user and group ownership of a file. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
pathnameIndicates the pointer to the file path.
ownerIndicates the new file owner.
groupIndicates the new file group.
- -**Attention:** - -This function can be used only in the JFFS2 file system. - -**Returns:** - -Returns **0** if the change is successful; returns **-1** and sets **errno** to a value in the following table if the change fails. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

pathname is a null pointer or an empty string.

-

EACCES

-

The permission bit of the file mode does not allow the requested access, or the search permission is denied on the path prefix directory.

-

EFAULT

-

Invalid address.

-

ENAMETOOLONG

-

The length of the path name is greater than NAME_MAX.

-

ENOENT

-

The directory component in the path name does not exist.

-

ENOMEM

-

Insufficient memory.

-

ENOTDIR

-

A component of the path prefix is the name of an existing file, which is neither a directory nor a symbolic link of a directory.

-

EPERM

-

The operation is not allowed or access is denied because the access is prohibited or the directory is full.

-

EROFS

-

The physical drive is write-protected.

-

EEXIST

-

The file or directory already exists.

-
- -## close\(\) - -``` -int close (int fd) -``` - - **Description:** - -Closes a file with a specified file descriptor. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
fdIndicates the descriptor of the file to be closed.
- -**Returns:** - -Returns **0** if the file is closed; returns **-1** and sets **errno** to a value in the following table if the file fails to be closed. - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EBADF

-

fd is invalid.

-

EINVAL

-

The file is not owned by the current process.

-

ENOENT

-

The file does not exist.

-

ENODEV

-

The disk partition is not found.

-
- -## crypt\(\) - -``` -char* crypt (const char * key, const char * setting ) -``` - - **Description:** - -Encrypts data. - -This function converts the string to be encrypted to one-way hash data that can be stored in the user database. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the data to be encrypted.
settingIndicates the description of the encryption mode. The description consists of the encryption prefix and random characters, which are selected from (., /, 0-9, A-Z, a-z). The details are as follows:
- - - - - - - - - - - - - - - - - - - - - - - - -

Encryption Algorithm

-

Encryption Prefix

-

Number of Random Characters

-

SHA-2-512

-

'$6$'

-

16

-

SHA-2-256

-

'$5$'

-

16

-

MD5

-

'$1$'

-

8

-

DES

-

''

-

2

-
- -**Attention:** - -The returned string is composed of printable ASCII characters, but does not contain spaces or any of the following characters: \{':', ';', '\*', '!', '\\'\}. - -**Returns:** - -Returns the encrypted data if the operation is successful; returns **NULL** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

setting is set to NULL.

-

ENOSYS

-

The hash password or encryption algorithm is not supported.

-

EPERM

-

The system does not allow the encryption algorithm.

-
- -## div\(\) - -``` -[div_t](div_t.md) div (int numerator, int denominator ) -``` - - **Description:** - -Calculates the quotient and remainder of an integer after division. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
numeratorIndicates the numerator.
denominatorIndicates the denominator.
- -**Returns:** - -Returns a structure variable that has been defined in the function. - -## drand48\(\) - -``` -double drand48 (void ) -``` - - **Description:** - -Obtains a random number. - -This function returns a double-precision random number evenly distributed between \(0.0, 1.0\). - -**Attention:** - -Before calling this function, you need to call one of the initialization functions **[srand48\(\)](UTILS.md#ga91c6acf8516086891c689926e49f1ddf)**, **[seed48\(\)](UTILS.md#ga0b86f7fc9964c291844e8112a367721c)**, and **[lcong48\(\)](UTILS.md#ga71e0019171f5584bb6957867691c3e10)**. - -**Returns:** - -Returns the obtained double-precision random number. - -## dup\(\) - -``` -int dup (int oldfd) -``` - - **Description:** - -Copies a specified file descriptor. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
oldfdIndicates the file descriptor to be copied.
- -**Attention:** - -This function can be used in the NFS and FAT file system. - -**Returns:** - -Returns a non-negative integer \(minimum descriptor available to the current process\) if the copy is successful; returns **-1** and sets **errno** to a value in the following table if the copy fails. - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EBADF

-

oldfd is invalid.

-

EMFILE

-

Failed to allocate file descriptors because too many files are opened.

-

ENOENT

-

The index node cannot be found based on the path name associated with oldfd.

-

ENOMEM

-

Insufficient memory.

-
- -## dup2\(\) - -``` -int dup2 (int oldfd, int newfd ) -``` - - **Description:** - -Copies the descriptor of the target file to a specified descriptor. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
oldfdIndicates the file descriptor to be copied.
newfdIndicates the new file descriptor for copying.
- -**Attention:** - -This function can be used in the NFS and FAT file system. - -**Returns:** - -Returns a non-negative integer \(descriptor of the new file\) if the copy is successful; returns **-1** and sets **errno** to a value in the following table if the copy fails. - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EBADF

-

oldfd is invalid.

-

EMFILE

-

Failed to allocate file descriptors because too many files are opened.

-

ENOENT

-

The index node cannot be found based on the path name associated with oldfd.

-

ENOMEM

-

Insufficient memory.

-
- -## ecvt\(\) - -``` -char* ecvt (double number, int ndigits, int * decpt, int * sign ) -``` - - **Description:** - -Converts a double-precision floating-point number into a string. - -The conversion result does not contain decimal places. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
numberIndicates the double-precision floating-point number to be converted.
ndigitsIndicates the number of valid digits to be stored.
decptIndicates the decimal point position.
signIndicates the symbol of the number to be converted.
- -**Returns:** - -Returns the pointer to the generated string. - -## erand48\(\) - -``` -double erand48 (unsigned short xsubi[3]) -``` - - **Description:** - -Obtains a random number. - -This function returns nonnegative double-precision floating-point values evenly distributed between \[0.0, 1.0\). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xsubiIndicates the array of the initialized value of Xi.
- -## execl\(\) - -``` -int execl (const char * path, const char * arg, ... ) -``` - - **Description:** - -Executes a specified user program file in ELF format. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
pathIndicates the full path of the ELF file.
argIndicates the list of parameters required by the program, ending with a null pointer.
- -**Returns:** - -Returns **-1** and sets **errno** to the corresponding error code [perror](IO.md#ga80b37b56a5a42139dccaef56da4bf82a) if the operation fails. - -## execle\(\) - -``` -int execle (const char * path, const char * arg, ... ) -``` - - **Description:** - -Executes a specified user program file in ELF format. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
pathIndicates the full path of the ELF file.
argIndicates the list of parameters required by the program. The arg parameter must point to a new environment variable array, that is, the environment variable of the new program.
- -**Returns:** - -Returns **-1** and sets **errno** to the corresponding error code [perror](IO.md#ga80b37b56a5a42139dccaef56da4bf82a) if the operation fails. - -## execlp\(\) - -``` -int execlp (const char * path, const char * arg, ... ) -``` - - **Description:** - -Executes a specified user program file in ELF format. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
pathIndicates the name or path name of the program file to be executed.
argIndicates the list of parameters required by the program, ending with a null pointer.
- -**Returns:** - -Returns **-1** and sets **errno** to the corresponding error code [perror](IO.md#ga80b37b56a5a42139dccaef56da4bf82a) if the operation fails. If the specified file name contains a slash \(/\), the file is executed. If it does not contain a slash \(/\), the current user program traverses the path list specified by the path environment variable. If the path environment variable is not defined, the current user program traverses \("/usr/local/bin:/bin:/usr/bin"\). The path list and file name are combined as an executable file and the file is executed. If the file does not have the execute permission, the system continues to search for other path lists. If no other file is found, **EACCES** is returned. If no valid executable file exists in the list of all paths, **-1** is returned. - -## execv\(\) - -``` -int execv (const char * path, char *const arg[] ) -``` - - **Description:** - -Executes a specified user program file in ELF format. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
pathIndicates the full path of the ELF file.
argIndicates the list of program parameters maintained by the pointer to the array. The last element of the array must be a null pointer.
- -**Attention:** - -This function is slightly different from [execve](UTILS.md#ga99ca2b673a47850c541b215ddfd6b23e) in input parameters. The **arg** parameter is a string array for storing new environment variables. - -**Returns:** - -Returns **-1** and sets **errno** to the corresponding error code [perror](IO.md#ga80b37b56a5a42139dccaef56da4bf82a) if the operation fails. - -## execve\(\) - -``` -int execve (const char * path, char *const arg[], char *const envp[] ) -``` - - **Description:** - -Executes a specified user program file in ELF format. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
pathIndicates the full path of the ELF file.
argIndicates the list of program parameters maintained by the pointer to the array. The last element of the array must be a null pointer.
envpIndicates the pointer to the string for storing new environment variables.
- -**Returns:** - -Returns **-1** and sets **errno** to the corresponding error code [perror](IO.md#ga80b37b56a5a42139dccaef56da4bf82a) if the operation fails. - -## execvp\(\) - -``` -int execvp (const char * path, char *const arg[] ) -``` - - **Description:** - -Executes a specified user program file in ELF format. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
pathIndicates the name or path name of the program file to be executed.
argIndicates the list of parameters required by the program, ending with a null pointer.
- -**Returns:** - -Returns **-1** and sets **errno** to the corresponding error code [perror](IO.md#ga80b37b56a5a42139dccaef56da4bf82a) if the operation fails. If the specified file name contains a slash \(/\), the file is executed. If it does not contain a slash \(/\), the current user program traverses the path list specified by the path environment variable. If the path environment variable is not defined, the current user program traverses \("/usr/local/bin:/bin:/usr/bin"\). The path list and file name are combined as an executable file and the file is executed. If the file does not have the execute permission, the system continues to search for other path lists. If no other file is found, **EACCES** is returned. If no valid executable file exists in the list of all paths, **-1** is returned. - -## exit\(\) - -``` -void exit (int status) -``` - - **Description:** - -Terminates the calling process, clears the used memory space and various data structures in the kernel, and sends the process end status to the parent process. All functions registered with atexit and on\_exit are called in the reverse order. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
statusIndicates the status sent to the parent process when the calling process ends.
- -## fcvt\(\) - -``` -char* fcvt (double number, int ndigits, int * decpt, int * sign ) -``` - - **Description:** - -Converts a floating-point number to a string. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
numberIndicates the floating-point number to be converted.
ndigitsIndicates the number of decimal places.
decptIndicates the position of the decimal point, which can be obtained by users.
signIndicates the symbol of number, which can be obtained by users. 0 indicates a positive number, and 1 indicates a negative number.
- -**Returns:** - -Returns the converted string. - -## ffs\(\) - -``` -int ffs (int i) -``` - - **Description:** - -Searches for the first bit in a word of the integer type. - -Specifically, this function searches for the least significant bit \(position 1\) set in the word. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
iIndicates the long integer to be searched.
- -**Returns:** - -Returns the position of the first bit if the operation is successful; returns **0** if no bits are set in the word. - -## ffsl\(\) - -``` -int ffsl (long int i) -``` - - **Description:** - -Searches for the first bit in a word of the long integer type. - -Specifically, this function searches for the least significant bit \(position 1\) set in the word. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
iIndicates the long integer to be searched.
- -**Returns:** - -Returns the position of the first bit if the operation is successful; returns **0** if no bits are set in the word. - -## ffsll\(\) - -``` -int ffsll (long long int i) -``` - - **Description:** - -Searches for the first bit in a word of the 8-byte long integer type. - -Specifically, this function searches for the least significant bit \(position 1\) set in the word. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
iIndicates the 8-byte long integer to be searched.
- -**Returns:** - -Returns the position of the first bit if the operation is successful; returns **0** if no bits are set in the word. - -## fgetwc\(\) - -``` -wint_t fgetwc ([FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * stream) -``` - - **Description:** - -Reads a wide character from a specified file stream. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
streamIndicates the pointer to the file object that identifies a stream.
- -**Returns:** - -Returns the wide character if the operation is successful; returns **WEOF** if the operation fails or the end-of-file is reached during data reading. - -## fgetws\(\) - -``` -wchar_t* fgetws (wchar_t * ws, int n, [FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * stream ) -``` - - **Description:** - -Reads wide characters from a specified file stream. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
wsIndicates the pointer to the wide character array that stores the characters to read.
nIndicates the number of characters to read.
streamIndicates the pointer to the file object that identifies a stream.
- -**Returns:** - -Returns the pointer to the read string if the operation is successful; returns a null pointer if no characters are read or the end-of-file is reached during data reading. - -## fmtmsg\(\) - -``` -int fmtmsg (long classification, const char * label, int severity, const char * text, const char * action, const char * tag ) -``` - - **Description:** - -Prints formatted messages. - -This function is used to print formatted messages to the output device specified by **classification**. The messages include the message definition, error severity, possible recovery steps, and reference to online documents. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
classificationIndicates four types of information, including the output device, error source, problem detector, and problem severity. This parameter is of the long integer type.
labelIndicates the pointer to the message source. This parameter consists of two fields separated by a colon (:). The first field is up to 10 characters, the second is up to 14 characters.
severityIndicates the severity level of an error message. For details, see MM_HALT, MM_ERROR, MM_WARNING, MM_INFO, and MM_NOOSEV.
textIndicates the condition of the error.
actionDescribes possible steps to recover from the error.
tagIndicates the referenced online documents where more information can be found.
- - - - - - - - - - - - - - - - - - - -

Message Type

-

Macro Definition Corresponding to the Message Description

-

Message output device

-

MM_PRINT, MM_CONSOLE or both

-

Message source

-

MM_HARD, MM_SOFT, or MM_FIRM

-

Message detector

-

MM_APPL, MM_UTIL, or MM_OPSYS

-

Severity of the incident

-

MM_RECOVER or MM_NRECOV

-
- -**Attention:** - -All parameters in this function can be ignored based on the following definitions: [MM\_NULLLBL](UTILS.md#ga174d0d4b9bbda298cd1faec4d4f27202), [MM\_NULLSEV](UTILS.md#gad65c53433554559cdc93e413786cc981), [MM\_NULLTXT](UTILS.md#ga345476b2492fd41e52ec6cbb08265b07), [MM\_NULLACT](UTILS.md#ga715bfd49536d249ea7812a4114602db0), and [MM\_NULLTAG](UTILS.md#ga64da80d889e56fc4dc22b0d8e07576cc). - -**Returns:** - -The function can return 4 values: [MM\_OK](UTILS.md#ga2d55c51901766d6400ea645cfaa56ad7), [MM\_NOTOK](UTILS.md#ga6c6fa7e4345318cb7b7a12a6492f414b), [MM\_NOMSG](UTILS.md#ga16ba492651e5414d28fbca6da09999e2), and [MM\_NOCON](UTILS.md#ga47ee40d662d07179517362f5796fedc6). - -## fnmatch\(\) - -``` -int fnmatch (const char * pattern, const char * string, int flags ) -``` - - **Description:** - -Matches a file name or a path name. - -This function is used to check whether the value specified by **string** matches the value specified by **pattern**. Wildcards can be used in **pattern**, for example, **./foo\*** and **foo\*.boo\***. You can use **flags** to set your required matching rule. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
patternIndicates the pointer to the pattern to match.
stringIndicates the pointer to the string to match against pattern.
flagsIndicates a combination of flag bits that specify the matching rule. For details, see FNM_NOESCAPE, FNM_PATHNAME, FNM_PERIOD, FNM_LEADING_DIR, FNM_CASEFOLD, and FNM_FILE_NAME.
- -**Returns:** - -Returns **0** if the matching is successful; returns [FNM\_NOMATCH](UTILS.md#gaf2661230e0cfc9970d6cdbe01571e753) if the matching fails; returns a non-zero value if an error occurs. - -## fork\(\) - -``` -[pid_t](UTILS.md#ga30c34d3eead853c44f459f21b932984c) fork (void ) -``` - - **Description:** - -Creates a new process that inherits from the user-mode data of its parent process. - -**Returns:** - -Returns **0** in the child process and returns the ID of the created child process in the parent process if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - -

errno

-

Description

-

EAGAIN

-

Insufficient process or thread control blocks.

-

ENOMEM

-

Insufficient memory.

-
- -## fputwc\(\) - -``` -wint_t fputwc (wchar_t wc, [FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * stream ) -``` - - **Description:** - -Writes a wide character **wc** to a specified file stream. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
wcIndicates the wide character to write.
streamIndicates the pointer to the file object that identifies a stream.
- -**Returns:** - -Returns the wide character if the operation is successful; returns **WEOF** otherwise. - -## fputws\(\) - -``` -int fputws (const wchar_t * ws, [FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * stream ) -``` - - **Description:** - -Writes a wide string pointed to by **ws** to a specified file stream. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
wsIndicates the pointer to the wide string to write.
streamIndicates the pointer to the file object that identifies a stream.
- -**Returns:** - -Returns a non-negative value if the operation is successful; returns **-1** \(EOF\) otherwise. - -## free\(\) - -``` -void free (void * ptr) -``` - - **Description:** - -Releases the memory space pointed to by **ptr**. - -The memory space was allocated by using [calloc\(\)](MEM.md#ga62b7798461bd461da64c5f9d35feddf7), [malloc\(\)](MEM.md#ga7ac38fce3243a7dcf448301ee9ffd392), or [realloc\(\)](MEM.md#ga1a6b5e8d2f1c37e5b43e4345586075be). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
ptrIndicates the pointer to the memory space to be released.
- -## fsync\(\) - -``` -int fsync (int fd) -``` - - **Description:** - -Synchronizes a file associated with a specified file descriptor to the storage device. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
fdIndicates the descriptor of the file to be synchronized.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - -

errno

-

Description

-

EBADF

-

fd is invalid.

-

EINVAL

-

fd is invalid for this device.

-
- -## ftruncate\(\) - -``` -int ftruncate (int fd, off_t length ) -``` - - **Description:** - -Truncates a file to a specified length. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
fdIndicates the file descriptor.
lengthIndicates the length of the file to be truncated.
- -**Attention:** - -This function can be used only in the FAT file system based on the file descriptor. - -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EACCES

-

The file has no write permission.

-

EBADF

-

Failed to open the file in the specified path.

-

EINVAL

-

The target length is less than 0.

-

EPERM

-

Failed to obtain the file structure corresponding to the file specified by path, or the file access is rejected.

-
- -## fwide\(\) - -``` -int fwide ([FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * stream, int mode ) -``` - - **Description:** - -Sets and determines the orientation of the file stream. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
streamIndicates the pointer to the file object that identifies a stream.
modeIndicates the orientation of the stream. The value can be: A negative value indicating that the stream is byte-oriented A positive value indicating that the stream is wide-oriented 0 indicating that the stream orientation is not set
- -**Returns:** - -Returns a positive value if the stream is wide-oriented; returns a negative value if the stream is byte-oriented; returns **0** if the stream has no orientation. - -## fwprintf\(\) - -``` -int fwprintf ([FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) *__restrict fp, const wchar_t *__restrict fmt, ... ) -``` - - **Description:** - -Prints wide character strings to a specified file stream. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
fpIndicates the pointer to the stream to print data.
fmtIndicates the pointer to the output format of the data.
- -**Returns:** - -Returns the number of wide characters that are successfully printed; returns **-1** if the operation fails. - -## fwscanf\(\) - -``` -int fwscanf ([FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * stream, const wchar_t * format, ... ) -``` - - **Description:** - -Reads formatted data from a specified stream and stores it based on the wide string format into the locations pointed to by the variable arguments. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
streamIndicates the pointer to the file object that identifies a stream.
formatIndicates the pointer to the string that may contain the format specifiers.
...Indicates the variable arguments storing the input data.
- -**Returns:** - -Returns the number of variable arguments that are successfully stored. - -## gcvt\(\) - -``` -char* gcvt (double x, int n, char * b ) -``` - - **Description:** - -Converts a floating-point number to a string. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
xIndicates the floating-point number to convert.
nIndicates the number of decimal places.
bIndicates the pointer to the output conversion result.
- -**Returns:** - -Returns the converted string. - -## get\_current\_dir\_name\(\) - -``` -char* get_current_dir_name (void ) -``` - - **Description:** - -Obtains the name of the current working directory. - -**Returns:** - -Returns the name of the current working directory if the operation is successful; returns **NULL** if the operation fails. - -## getcwd\(\) - -``` -char* getcwd (char * buf, size_t size ) -``` - - **Description:** - -Obtains the current working directory. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
bufIndicates the pointer to the buffer of the array for storing the absolute path name of the current working directory.
sizeIndicates the size of the array to which the buffer points.
- -**Returns:** - -Returns **buf** if the operation is successful; returns **NULL** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

buf is set to NULL.

-

ERANGE

-

size is less than the length of the current working directory (including the terminating null byte \0).

-

ENAMETOOLONG

-

Failed to copy the name of the current working directory to the buffer using memcpy_s.

-
- -## getegid\(\) - -``` -[gid_t](UTILS.md#ga7ba7f6123ac8905fbe36f596bea2437e) getegid (void ) -``` - - **Description:** - -Obtains the effective group ID \(GID\) of the calling process. - -**Returns:** - -Returns the effective GID. - -## getenv\(\) - -``` -char* getenv (const char * name) -``` - - **Description:** - -Obtains the value of an environment variable. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
nameIndicates the pointer to the name of the environment variable whose value needs to be obtained.
- -**Returns:** - -Returns the pointer to the environment variable value if the operation is successful; returns **NULL** if there is no match. - -## geteuid\(\) - -``` -[uid_t](UTILS.md#ga66a6f1a27d4474144d59fb2b805ff50e) geteuid (void ) -``` - - **Description:** - -Obtains the effective user ID \(UID\) of the calling process. - -**Returns:** - -Returns the effective UID. - -## getgid\(\) - -``` -[gid_t](UTILS.md#ga7ba7f6123ac8905fbe36f596bea2437e) getgid (void ) -``` - - **Description:** - -Obtains the real group ID \(GID\) of the calling process. - -**Returns:** - -Returns the real GID. - -## getgroups\(\) - -``` -int getgroups (int size, [gid_t](UTILS.md#ga7ba7f6123ac8905fbe36f596bea2437e) list[] ) -``` - - **Description:** - -Obtains a list of supplementary user group IDs specific to the calling process. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sizeIndicates the maximum size allowed for the supplementary group list. If the value is 0, this function obtains the total number of supplementary groups.
listIndicates the list of supplementary groups.
- -**Returns:** - -Returns the number of supplementary groups of the calling process if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

size is invalid.

-

EFAULT

-

Invalid address.

-

ENOMEM

-

Insufficient memory.

-
- -## getopt\(\) - -``` -int getopt (int argc, char *const argv[], const char * optstring ) -``` - - **Description:** - -Parses command-line arguments based on the specified option. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
argcIndicates the number of arguments when the file of the function is executed.
argvIndicates the argument content when the file of the function is executed.
optstringIndicates the string containing the optional arguments of the executable file. If this function obtains an option without arguments, the value of optind increases by 1. If this function obtains an option with arguments and the result is saved to optarg, the value of optind increases by 2.
- - - - - - - - - - - - - - - - -

Character Option Expression

-

Description

-

Only characters that indicate different options are available.

-

abc indicates that the file has three options -a, -b, and -c.

-

The character is followed by a colon.

-

b indicates that -b must be followed by an argument in the executable file that contains the getopt() function.

-

The character is followed by two colons.

-

b indicates that -b can be followed by or without the corresponding argument in the executable file that contains the getopt() function.

-
- -**Returns:** - -Returns the parsed option character if the parsing is successful; returns **?** if an option character that is not in **optstring** is encountered during parsing. When an option is encountered but there is no argument during parsing, this function returns **:** if the first character of **optstring** is a colon \(:\); returns **?** otherwise. Returns **-1** in the following cases: if all options have been parsed or **argv\[optind\]** is a null pointer; if the first character of the string to which **argv\[optind\]** points is not **-**, that is, the non-option **argv** parameter cannot appear in the middle of the parameter list. If a non-option parameter is encountered during parsing, the parsing is terminated. if the string to which **argv\[optind\]** points is **-**. - -## getopt\_long\(\) - -``` -int getopt_long (int argc, char *const * argv, const char * optstring, const struct [option](option.md) * longopts, int * longindex ) -``` - - **Description:** - -Parses the command-line arguments. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
argcIndicates the number of command-line arguments.
argvIndicates the command-line argument content.
optstringIndicates the string containing the optional arguments of the executable file.
longoptsIndicates the long argument structure.
longindexIndicates the index of the current long argument in longopts.
- - - - - - - - - - - - - - - - -

Character Option Expression

-

Description

-

Only characters that indicate different options are available.

-

abc indicates that the file has three options -a, -b, and -c.

-

The character is followed by a colon.

-

b indicates that -b must be followed by an argument in the executable file that contains the getopt() function.

-

The character is followed by two colons.

-

b indicates that -b can be followed by or without the corresponding argument in the executable file that contains the getopt() function.

-
- -**Returns:** - -Returns the parsed option character if the parsing is successful; returns **-1** if all options have been parsed; returns **?** if an option character that is not in **optstring** is encountered during parsing. When an option is encountered but there is no argument during parsing, this function returns **:** if the first character of **optstring** is a colon \(:\); returns **?** otherwise. - -## getopt\_long\_only\(\) - -``` -int getopt_long_only (int argc, char *const * argv, const char * optstring, const struct [option](option.md) * longopts, int * longindex ) -``` - - **Description:** - -Parses the command-line arguments. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
argcIndicates the number of command-line arguments.
argvIndicates the command-line argument content.
optstringIndicates the string containing the optional arguments of the executable file.
longoptsIndicates the long argument structure.
longindexIndicates the index of the current long argument in longopts.
- - - - - - - - - - - - - - - - -

Character Option Expression

-

Description

-

Only characters that indicate different options are available.

-

abc indicates that the file has three options -a, -b, and -c.

-

The character is followed by a colon.

-

b indicates that -b must be followed by an argument in the executable file that contains the getopt() function.

-

The character is followed by two colons.

-

b indicates that -b can be followed by or without the corresponding argument in the executable file that contains the getopt() function.

-
- -**Attention:** - -Different from [getopt\_long](UTILS.md#ga3d26a6a51c3a1576b36c66798a64a3cf), this function matches **–name** and **-name** as long arguments. - -**Returns:** - -Returns the parsed option character if the parsing is successful; returns **-1** if all options have been parsed; returns **?** if an option character that is not in **optstring** is encountered during parsing. When an option is encountered but there is no argument during parsing, this function returns **:** if the first character of **optstring** is a colon \(:\); returns **?** otherwise. - -## getpagesize\(\) - -``` -int getpagesize (void ) -``` - - **Description:** - -Obtains the memory page size. - -**Returns:** - -Returns the number of bytes in a memory page. - -## getpgid\(\) - -``` -[pid_t](UTILS.md#ga30c34d3eead853c44f459f21b932984c) getpgid ([pid_t](UTILS.md#ga30c34d3eead853c44f459f21b932984c) pid) -``` - - **Description:** - -Obtains the ID of the process group whose process ID is specified by **pid**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
pidIndicates the process ID. If the value is 0, the process group ID of the current process is obtained.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid process ID.

-

ESRCH

-

The specified process cannot be found.

-
- -## getpgrp\(\) - -``` -[pid_t](UTILS.md#ga30c34d3eead853c44f459f21b932984c) getpgrp (void ) -``` - - **Description:** - -Obtains the ID of the process group of the calling process. - -**Returns:** - -Returns the process group ID if the operation is successful. - -## getpid\(\) - -``` -[pid_t](UTILS.md#ga30c34d3eead853c44f459f21b932984c) getpid (void ) -``` - - **Description:** - -Obtains the process ID. - -**Returns:** - -Returns the process ID. - -## getppid\(\) - -``` -[pid_t](UTILS.md#ga30c34d3eead853c44f459f21b932984c) getppid (void ) -``` - - **Description:** - -Obtains the parent process ID. - -**Returns:** - -Returns the parent process ID. - -## getresgid\(\) - -``` -int getresgid ([gid_t](UTILS.md#ga7ba7f6123ac8905fbe36f596bea2437e) * rgid, [gid_t](UTILS.md#ga7ba7f6123ac8905fbe36f596bea2437e) * egid, [gid_t](UTILS.md#ga7ba7f6123ac8905fbe36f596bea2437e) * sgid ) -``` - - **Description:** - -Obtains the real, effective, and saved user group IDs of the calling process. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
rgidIndicates the pointer to the real user group ID.
egidIndicates the pointer to the effective user group ID.
sgidIndicates the pointer to the saved user group ID.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EFAULT

-

Invalid address.

-
- -## getresuid\(\) - -``` -int getresuid ([uid_t](UTILS.md#ga66a6f1a27d4474144d59fb2b805ff50e) * ruid, [uid_t](UTILS.md#ga66a6f1a27d4474144d59fb2b805ff50e) * euid, [uid_t](UTILS.md#ga66a6f1a27d4474144d59fb2b805ff50e) * suid ) -``` - - **Description:** - -Obtains the real, effective, and saved user IDs of the calling process. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
ruidIndicates the pointer to the real user ID.
euidIndicates the pointer to the effective user ID.
suidIndicates the pointer to the saved user ID.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EFAULT

-

Invalid address.

-
- -## getsubopt\(\) - -``` -int getsubopt (char ** optionp, char *const * tokens, char ** valuep ) -``` - - **Description:** - -Processes the parameters of an option in the command line. - -Generally, this function is used together with the [getopt\(\)](UTILS.md#ga5ffa4c677fc71cecd94f140ef9db624c) to process the parameters of an option. You are advised to use this function if the parameters of an option are complex. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
optionpIndicates the command word option.
tokensIndicates the pointer to the queried token.
valuepIndicates the suboption of the command word value.
- -**Returns:** - -Returns the index of the matched suboption element in **tokens** if the operation is successful; returns **-1** if the operation fails. [1.0 1.0 ](UTILS.md#ga5ffa4c677fc71cecd94f140ef9db624c) - -## getuid\(\) - -``` -[uid_t](UTILS.md#ga66a6f1a27d4474144d59fb2b805ff50e) getuid (void ) -``` - - **Description:** - -Obtains the real user ID \(UID\) of the calling process. - -**Returns:** - -Returns the real UID. - -## getwc\(\) - -``` -wint_t getwc ([FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * stream) -``` - - **Description:** - -Reads the first wide character from a specified file stream. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
streamIndicates the pointer to the file object that identifies a stream.
- -**Attention:** - -This function is similar to [fgetwc](UTILS.md#ga2b545d8d6d3209a2eb6129d8ba646fe3) except that it is implemented as a macro. - -**Returns:** - -Returns the wide character if the operation is successful; returns **WEOF** if an error occurs. - -## getwchar\(\) - -``` -wint_t getwchar (void ) -``` - - **Description:** - -Reads a wide character from the stdin. - -**Attention:** - -For details about unlocked objects, see **unlocked\_stdio**. - -**Returns:** - -Returns the wide character if the operation is successful; returns **WEOF** if an error occurs. - -## hcreate\(\) - -``` -int hcreate (size_t nel) -``` - - **Description:** - -Creates a hash table based on the number of entries. - - - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
nelIndicates the maximum number of entries allowed in the hash table.
- -**Returns:** - -Returns a non-zero value if the operation is successful; returns **0** and sets **errno** to a value if the operation fails. - -## hcreate\_r\(\) - -``` -int hcreate_r (size_t nel, struct [hsearch_data](hsearch_data.md) * htab ) -``` - - **Description:** - -Creates a hash table based on the number of entries and its description. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
nelIndicates the maximum number of entries allowed in the hash table.
htabIndicates the hash table.
- -**Attention:** - -The hash table must be initialized before use. - -**Returns:** - -Returns a non-zero value if the operation is successful; returns **0** and sets **errno** to a value if the operation fails. - -## hdestroy\(\) - -``` -void hdestroy (void ) -``` - - **Description:** - -Destroys a hash table. - -This function releases the memory for creating a hash table. - -## hdestroy\_r\(\) - -``` -void hdestroy_r (struct [hsearch_data](hsearch_data.md) * htab) -``` - - **Description:** - -Destroys a hash table. - -This function releases the memory occupied by the specified hash table. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
htabIndicates the hash table.
- -## hsearch\(\) - -``` -[ENTRY](UTILS.md#gaf609835b21489409e39a22ed20313ab8)* hsearch ([ENTRY](UTILS.md#gaf609835b21489409e39a22ed20313ab8) item, ACTION action ) -``` - - **Description:** - -Adds or searches for a hash entry. - -This function searches for the entry in the hash table based on the specified action. If the action is **FIND**, only the search action is performed. If the action is **ENTER**, an entry not found is added to the hash table. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
itemIndicates the hash table entry to be searched.
actionIndicates the function action. ENTER indicates that an entry is added, and FIND indicates that an entry is searched. For details, see ACTION.
- -**Returns:** - -Returns the pointer to the hash table if the operation is successful. - -## hsearch\_r\(\) - -``` -int hsearch_r ([ENTRY](UTILS.md#gaf609835b21489409e39a22ed20313ab8) item, ACTION action, [ENTRY](UTILS.md#gaf609835b21489409e39a22ed20313ab8) ** retval, struct [hsearch_data](hsearch_data.md) * htab ) -``` - - **Description:** - -Searches for a hash table. - -This function searches for the entry in the hash table based on the specified action. If the action is **FIND**, only the search action is performed. If the action is **ENTER**, an entry not found is added to the hash table. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
itemIndicates the hash table entry to be searched.
actionIndicates the function action. ENTER indicates that an entry is added, and FIND indicates that an entry is searched. ACTION
htabIndicates the hash table.
- -**Returns:** - -Returns a non-zero value if the operation is successful; returns **0** if the operation fails. - -## imaxabs\(\) - -``` -intmax_t imaxabs (intmax_t j) -``` - - **Description:** - -Calculates the absolute value of an input parameter of the integer type. - -This function is used to calculate the absolute value of the input parameter specified by **j** of the **intmax\_t** type. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
jIndicates the input parameter.
- -**Attention:** - -Pay attention to the parameter type. - -**Returns:** - -Returns the absolute value of the input parameter if the operation is successful. - -## imaxdiv\(\) - -``` -[imaxdiv_t](imaxdiv_t.md) imaxdiv (intmax_t numerator, intmax_t denominator ) -``` - - **Description:** - -Calculates the quotient and remainder after the division operation is performed on an integer. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
numeratorIndicates the numerator.
denominatorIndicates the denominator.
- -**Returns:** - -Returns a structure variable that has been defined in the function. - -## index\(\) - -``` -char* index (const char * s, int c ) -``` - - **Description:** - -Searches for the first position of the matched character in a string. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sIndicates the pointer to the string to be searched.
cIndicates the character to be matched.
- -**Returns:** - -Returns the pointer to the matched character if the operation is successful; returns **NULL** if the operation fails. - -## initstate\(\) - -``` -char* initstate (unsigned int seed, char * state, size_t n ) -``` - - **Description:** - -Initializes a random number generator. - -This function initializes the state array for subsequent random use. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
seedIndicates the seed for initialization, which specifies the start point of the random number sequence and provides the information for restarting at the same point.
Indicatesthe state array used to generate random numbers.
nIndicates the length of the state array.
- -**Returns:** - -Returns the pointer to the state array if the operation is successful; returns **NULL** if the operation fails. - -## insque\(\) - -``` -void insque (void * element, void * pred ) -``` - - **Description:** - -Adds an entry to a queue. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
elementIndicates the element to be added to the queue.
predAfter the position of prev to add the element.
- -## isalnum\(\) - -``` -int isalnum (int c) -``` - - **Description:** - -Checks whether a parameter is an alphabetic character or a decimal digit. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
cIndicates the parameter to check.
- -**Returns:** - -Returns a non-zero value if **c** is an alphabetic character or a decimal digit; returns **0** otherwise. - -## isalnum\_l\(\) - -``` -int isalnum_l (int c, locale_t locale ) -``` - - **Description:** - -Checks whether a parameter is an alphabetic character or digit for the specified locale. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
cIndicates the parameter to check.
localeIndicates the locale. This parameter is ignored currently.
- -**Returns:** - -Returns a non-zero value if **c** is an alphabetic character or digit; returns **0** otherwise. - -## isalpha\(\) - -``` -int isalpha (int c) -``` - - **Description:** - -Checks whether a parameter is an alphabetic character. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
cIndicates the parameter to check.
- -**Returns:** - -Returns a non-zero value if **c** is an alphabetic character; returns **0** otherwise. - -## isalpha\_l\(\) - -``` -int isalpha_l (int c, locale_t locale ) -``` - - **Description:** - -Checks whether a parameter is an alphabetic character for the specified locale. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
cIndicates the parameter to check.
localeIndicates the locale. This parameter is ignored currently.
- -**Returns:** - -Returns a non-zero value if **c** is an alphabetic character; returns **0** otherwise. - -## isblank\(\) - -``` -int isblank (int c) -``` - - **Description:** - -Checks whether a parameter is a blank character \(space or tap\). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
cIndicates the parameter to check.
- -**Returns:** - -Returns a non-zero value if **c** is a blank character; returns **0** otherwise. - -## isblank\_l\(\) - -``` -int isblank_l (int c, locale_t locale ) -``` - - **Description:** - -Checks whether a parameter is a blank character \(including spaces and tabs\) for the specified locale. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
cIndicates the parameter to check.
localeIndicates the locale. This parameter is ignored currently.
- -**Returns:** - -Returns a non-zero value if **c** is a blank character; returns **0** otherwise. - -## iscntrl\(\) - -``` -int iscntrl (int c) -``` - - **Description:** - -Checks whether a parameter is a control character. A control character is invisible and does not occupy a printing position on a display. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
cIndicates the parameter to check.
- -**Returns:** - -Returns a non-zero value if **c** is a control character; returns **0** otherwise. - -## iscntrl\_l\(\) - -``` -int iscntrl_l (int c, locale_t locale ) -``` - - **Description:** - -Checks whether a parameter is a control character for the specified locale. - -A control character is invisible and does not occupy a printing position on a display. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
cIndicates the parameter to check.
localeIndicates the locale. This parameter is ignored currently.
- -**Returns:** - -Returns a non-zero value if **c** is a control character; returns **0** otherwise. - -## isdigit\(\) - -``` -int isdigit (int c) -``` - - **Description:** - -Checks whether a parameter is a decimal digit \(0-9\). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
cIndicates the parameter to check.
- -**Returns:** - -Returns a non-zero value if **c** is a decimal digit; returns **0** otherwise. - -## isdigit\_l\(\) - -``` -int isdigit_l (int c, locale_t locale ) -``` - - **Description:** - -Checks whether a parameter is a decimal digit for the specified locale. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
cIndicates the parameter to check.
localeIndicates the locale. This parameter is ignored currently.
- -**Returns:** - -Returns a non-zero value if **c** is a decimal digit; returns **0** otherwise. - -## isgraph\(\) - -``` -int isgraph (int c) -``` - - **Description:** - -Checks whether a parameter is any printable character except the space character. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
cIndicates the parameter to check.
- -**Returns:** - -Returns a non-zero value if **c** is a printable character except the space character; returns **0** otherwise. - -## isgraph\_l\(\) - -``` -int isgraph_l (int c, locale_t locale ) -``` - - **Description:** - -Checks whether a parameter is any printable character except the space character for the specified locale. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
cIndicates the parameter to check.
localeIndicates the locale. This parameter is ignored currently.
- -**Returns:** - -Returns a non-zero value if **c** is a printable character except the space character; returns **0** otherwise. - -## islower\(\) - -``` -int islower (int c) -``` - - **Description:** - -Checks whether a parameter is a lowercase letter. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
cIndicates the parameter to check.
- -**Returns:** - -Returns a non-zero value if **c** is a lowercase letter; returns **0** otherwise. - -## islower\_l\(\) - -``` -int islower_l (int c, locale_t locale ) -``` - - **Description:** - -Checks whether a parameter is a character of lowercase letters for the specified locale. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
cIndicates the parameter to check.
localeIndicates the locale. This parameter is ignored currently.
- -**Returns:** - -Returns a non-zero value if **c** is a lowercase letter; returns **0** otherwise. - -## isprint\(\) - -``` -int isprint (int c) -``` - - **Description:** - -Checks whether a parameter is a printable character \(including space\). - -A printable character is a character that occupies a printing position on a display. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
cIndicates the parameter to check.
- -**Returns:** - -Returns a non-zero value if **c** is a printable character; returns **0** otherwise. - -## isprint\_l\(\) - -``` -int isprint_l (int c, locale_t locale ) -``` - - **Description:** - -Checks whether a parameter is a printable character \(including space\) for the specified locale. A printable character is visible and occupies a printing position on a display. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
cIndicates the parameter to check.
localeIndicates the locale. This parameter is ignored currently.
- -**Returns:** - -Returns a non-zero value if **c** is a printable character; returns **0** otherwise. - -## ispunct\(\) - -``` -int ispunct (int c) -``` - - **Description:** - -Checks whether a parameter is a punctuation or special character. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
cIndicates the parameter to check.
- -**Returns:** - -Returns a non-zero value if **c** is a punctuation or special character; returns **0** otherwise. - -## ispunct\_l\(\) - -``` -int ispunct_l (int c, locale_t locale ) -``` - - **Description:** - -Checks whether a parameter is a punctuation or special character for the specified locale. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
cIndicates the parameter to check.
localeIndicates the locale. This parameter is ignored currently.
- -**Returns:** - -Returns a non-zero value if **c** is a punctuation or special character; returns **0** otherwise. - -## isspace\(\) - -``` -int isspace (int c) -``` - - **Description:** - -Checks whether a parameter is a space character. - -The space characters are: space, horizontal tab \(**\\t**\), vertical tab \(**\\v**\), form feed \(**\\f**\), carriage return \(**\\r**\), and line feed \(** **\). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
cIndicates the parameter to check.
- -**Returns:** - -Returns a non-zero value if **c** is a space character; returns **0** otherwise. - -## isspace\_l\(\) - -``` -int isspace_l (int c, locale_t locale ) -``` - - **Description:** - -Checks whether a parameter is a blank character for the specified locale. - -Blank characters refer to space, horizontal tab \(**\\t**\), vertical tab \(**\\v**\), form feed \(**\\f**\), carriage return \(**\\r**\), and line feed \(** **\). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
cIndicates the parameter to check.
localeIndicates the locale. This parameter is ignored currently.
- -**Returns:** - -Returns a non-zero value if **c** is a blank character; returns **0** otherwise. - -## isupper\(\) - -``` -int isupper (int c) -``` - - **Description:** - -Checks whether a parameter is an uppercase letter. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
cIndicates the parameter to check.
- -**Returns:** - -Returns a non-zero value if **c** is an uppercase letter; returns **0** otherwise. - -## isupper\_l\(\) - -``` -int isupper_l (int c, locale_t locale ) -``` - - **Description:** - -Checks whether a parameter is a character of uppercase letters for the specified locale. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
cIndicates the parameter to check.
localeIndicates the locale. This parameter is ignored currently.
- -**Returns:** - -Returns a non-zero value if **c** is in uppercase; returns **0** otherwise. - -## iswalnum\(\) - -``` -int iswalnum (wint_t wc) -``` - - **Description:** - -Checks whether a wide character is a letter or digit. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
wcIndicates the wide character.
- -**Returns:** - -Returns a non-zero value if the operation is successful; returns **0** otherwise. - -## iswalnum\_l\(\) - -``` -int iswalnum_l (wint_t wc, locale_t locale ) -``` - - **Description:** - -Checks whether a wide character is a letter or digit for the specified locale. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
wcIndicates the wide character.
localeIndicates the locale. This parameter is ignored currently.
- -**Returns:** - -Returns a non-zero value if the operation is successful; returns **0** otherwise. - -## iswalpha\(\) - -``` -int iswalpha (wint_t wc) -``` - - **Description:** - -Checks whether a wide character is a letter. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
wcIndicates the wide character.
- -**Returns:** - -Returns a non-zero value if the operation is successful; returns **0** otherwise. - -## iswalpha\_l\(\) - -``` -int iswalpha_l (wint_t wc, locale_t locale ) -``` - - **Description:** - -Checks whether a wide character is alphabetic for the specified locale. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
wcIndicates the wide character.
localeIndicates the locale. This parameter is ignored currently.
- -**Returns:** - -Returns a non-zero value if the operation is successful; returns **0** otherwise. - -## iswblank\(\) - -``` -int iswblank (wint_t wc) -``` - - **Description:** - -Checks whether a wide character is a space or tab character \(\\t\). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
wcIndicates the wide character.
- -**Returns:** - -Returns a non-zero value if the operation is successful; returns **0** otherwise. - -## iswblank\_l\(\) - -``` -int iswblank_l (wint_t wc, locale_t locale ) -``` - - **Description:** - -Checks whether a wide character is a blank or **\\t** character for the specified locale. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
wcIndicates the wide character.
localeIndicates the locale. This parameter is ignored currently.
- -**Returns:** - -Returns a non-zero value if the operation is successful; returns **0** otherwise. - -## iswcntrl\(\) - -``` -int iswcntrl (wint_t wc) -``` - - **Description:** - -Checks whether a wide character is a control character. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
wcIndicates the wide character.
- -**Returns:** - -Returns a non-zero value if the operation is successful; returns **0** otherwise. - -## iswcntrl\_l\(\) - -``` -int iswcntrl_l (wint_t wc, locale_t locale ) -``` - - **Description:** - -Checks whether a wide character is a control character for the specified locale. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
wcIndicates the wide character.
localeIndicates the locale. This parameter is ignored currently.
- -**Returns:** - -Returns a non-zero value if the operation is successful; returns **0** otherwise. - -## iswctype\(\) - -``` -int iswctype (wint_t wc, [wctype_t](UTILS.md#gaf3296ec762e8e6a66c8dd4bd7cf017fb) desc ) -``` - - **Description:** - -Checks whether the character specified by **wc** belongs to the **desc** class. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
wcIndicates the wide character.
descIndicates the wide character class.
- -**Returns:** - -Returns a non-zero value if the operation is successful; returns **0** otherwise. - -## iswctype\_l\(\) - -``` -int iswctype_l (wint_t wc, [wctype_t](UTILS.md#gaf3296ec762e8e6a66c8dd4bd7cf017fb) desc, locale_t locale ) -``` - - **Description:** - -Checks whether the character specified by **wc** belongs to the **desc** class for the specified locale. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
wcIndicates the wide character.
descIndicates the wide character class.
localeIndicates the locale. This parameter is ignored currently.
- -**Returns:** - -Returns a non-zero value if the operation is successful; returns **0** otherwise. - -## iswdigit\(\) - -``` -int iswdigit (wint_t wc) -``` - - **Description:** - -Checks whether a wide character is a decimal digit. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
wcIndicates the wide character.
- -**Returns:** - -Returns a non-zero value if the operation is successful; returns **0** otherwise. - -## iswdigit\_l\(\) - -``` -int iswdigit_l (wint_t wc, locale_t locale ) -``` - - **Description:** - -Checks whether a wide character is a decimal digit for the specified locale. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
wcIndicates the wide character.
localeIndicates the locale. This parameter is ignored currently.
- -**Returns:** - -Returns a non-zero value if the operation is successful; returns **0** otherwise. - -## iswgraph\(\) - -``` -int iswgraph (wint_t wc) -``` - - **Description:** - -Checks whether a wide character is visible. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
wcIndicates the wide character.
- -**Returns:** - -Returns a non-zero value if the operation is successful; returns **0** otherwise. - -## iswgraph\_l\(\) - -``` -int iswgraph_l (wint_t wc, locale_t locale ) -``` - - **Description:** - -Checks whether a wide character is visible for the specified locale. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
wcIndicates the wide character.
localeIndicates the locale. This parameter is ignored currently.
- -**Returns:** - -Returns a non-zero value if the operation is successful; returns **0** otherwise. - -## iswlower\(\) - -``` -int iswlower (wint_t wc) -``` - - **Description:** - -Checks whether a wide character is a lowercase letter. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
wcIndicates the wide character.
- -**Returns:** - -Returns a non-zero value if the operation is successful; returns **0** otherwise. - -## iswlower\_l\(\) - -``` -int iswlower_l (wint_t wc, locale_t locale ) -``` - - **Description:** - -Checks whether a wide character is in lowercase for the specified locale. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
wcIndicates the wide character.
localeIndicates the locale. This parameter is ignored currently.
- -**Returns:** - -Returns a non-zero value if the operation is successful; returns **0** otherwise. - -## iswprint\(\) - -``` -int iswprint (wint_t wc) -``` - - **Description:** - -Checks whether a wide character is printable. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
wcIndicates the wide character.
- -**Returns:** - -Returns a non-zero value if the operation is successful; returns **0** otherwise. - -## iswprint\_l\(\) - -``` -int iswprint_l (wint_t wc, locale_t locale ) -``` - - **Description:** - -Checks whether a wide character is printable for the specified locale. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
wcIndicates the wide character.
localeIndicates the locale. This parameter is ignored currently.
- -**Returns:** - -Returns a non-zero value if the operation is successful; returns **0** otherwise. - -## iswpunct\(\) - -``` -int iswpunct (wint_t wc) -``` - - **Description:** - -Checks whether a wide character is a punctuation mark. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
wcIndicates the wide character.
- -**Returns:** - -Returns a non-zero value if the operation is successful; returns **0** otherwise. - -## iswpunct\_l\(\) - -``` -int iswpunct_l (wint_t wc, locale_t locale ) -``` - - **Description:** - -Checks whether **wc** is a punctuation wide character for the specified locale. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
wcIndicates the wide character.
localeIndicates the locale. This parameter is ignored currently.
- -**Returns:** - -Returns a non-zero value if the operation is successful; returns **0** otherwise. - -## iswspace\(\) - -``` -int iswspace (wint_t wc) -``` - - **Description:** - -Checks whether a wide character belongs to the wide-character class **space**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
wcIndicates the wide character.
- -**Returns:** - -Returns a non-zero value if the operation is successful; returns **0** otherwise. - -## iswspace\_l\(\) - -``` -int iswspace_l (wint_t wc, locale_t locale ) -``` - - **Description:** - -Checks whether a wide character belongs to the wide-character class **space** for the specified locale. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
wcIndicates the wide character.
localeIndicates the locale. This parameter is ignored currently.
- -**Returns:** - -Returns a non-zero value if the operation is successful; returns **0** otherwise. - -## iswupper\(\) - -``` -int iswupper (wint_t wc) -``` - - **Description:** - -Checks whether a wide character is an uppercase letter. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
wcIndicates the wide character.
- -**Returns:** - -Returns a non-zero value if the operation is successful; returns **0** otherwise. - -## iswupper\_l\(\) - -``` -int iswupper_l (wint_t wc, locale_t locale ) -``` - - **Description:** - -Checks whether a wide character is in uppercase for the specified locale. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
wcIndicates the wide character.
localeIndicates the locale. This parameter is ignored currently.
- -**Returns:** - -Returns a non-zero value if the operation is successful; returns **0** otherwise. - -## iswxdigit\(\) - -``` -int iswxdigit (wint_t wc) -``` - - **Description:** - -Checks whether a wide character is a hexadecimal digit. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
wcIndicates the wide character.
- -**Returns:** - -Returns a non-zero value if the operation is successful; returns **0** otherwise. - -## iswxdigit\_l\(\) - -``` -int iswxdigit_l (wint_t wc, locale_t locale ) -``` - - **Description:** - -Checks whether a wide character is a hexadecimal digit for the specified locale. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
wcIndicates the wide character.
localeIndicates the locale. This parameter is ignored currently.
- -**Returns:** - -Returns a non-zero value if the operation is successful; returns **0** otherwise. - -## isxdigit\(\) - -``` -int isxdigit (int c) -``` - - **Description:** - -Checks whether a parameter is a hexadecimal digit. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
cIndicates the parameter to check.
- -**Returns:** - -Returns a non-zero value if **c** is a hexadecimal digit; returns **0** otherwise. - -## isxdigit\_l\(\) - -``` -int isxdigit_l (int c, locale_t locale ) -``` - - **Description:** - -Checks whether a parameter is a hexadecimal digit for the specified locale. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
cIndicates the parameter to check.
localeIndicates the locale. This parameter is ignored currently.
- -**Returns:** - -Returns a non-zero value if the parameter is a hexadecimal digit; returns **0** otherwise. - -## jrand48\(\) - -``` -long jrand48 (unsigned short xsubi[3]) -``` - - **Description:** - -Generates pseudo-random numbers evenly distributed between \[-2^31, 2^31\). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xsubi[3]Indicates the array of the initialized value of Xi.
- -**Attention:** - -This function works by generating a 48-bit integer sequence, and **X\(i+1\)** must be generated by using the value of **Xi**. The correlation is obtained by using a linear congruential formula, Xn+1 = \(aXn + c\) mod m, where n = 0, m = 2^48, a = 0x5DEECE66D, and c = 0xB. **Xi** is specified by **xsubi\[3\]**. - -**Returns:** - -Returns signed long integers evenly distributed between \[-2^31, 2^31\) if the operation is successful. - -## l64a\(\) - -``` -char* l64a (long value) -``` - - **Description:** - -Converts a long integer to a 64-bit ASCII string. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
valueIndicates the long integer to be converted.
- -**Returns:** - -Returns the pointer to the static buffer if the operation is successful. The content in the buffer is overwritten each time the function is called. For multithreaded programs, this function returns a pointer to thread-specific data. - -## labs\(\) - -``` -long labs (long i) -``` - - **Description:** - -Calculates the absolute value of a long integer. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
iIndicates the long integer to be converted.
- -**Returns:** - -Returns the absolute value. - -## lcong48\(\) - -``` -void lcong48 (unsigned short param[7]) -``` - - **Description:** - -Sets the seed and related algorithm parameters for the pseudo-random number generator. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
param[7]Indicates the parameters of the random number generator.
- -**Attention:** - -This function works by generating a 48-bit integer sequence, and **X\(i+1\)** must be generated by using the value of **Xi**. The correlation is obtained by using a linear congruential formula, Xn+1 = \(aXn + c\) mod m, where n = 0, m = 2^48, a = 0x5DEECE66D, and c = 0xB. **param\[0 - 2\]** is the initialized value of **Xi**. **param \[3-5\]** specifies the value of **a**, and **param\[6\]** specifies the value of **c**. After this function is called, calling **srand48 \(\)** or **seed48 \(\)** will restore the standard values of **a** and **c**. - -## ldiv\(\) - -``` -[ldiv_t](ldiv_t.md) ldiv (long numerator, long denominator ) -``` - - **Description:** - -Calculates the quotient and remainder of a long integer after division. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
numeratorIndicates the numerator.
denominatorIndicates the denominator.
- -**Returns:** - -Returns a structure variable that has been defined in the function. - -## lfind\(\) - -``` -void* lfind (const void * key, const void * base, size_t * nelp, size_t width, int(*)(const void *, const void *) compar ) -``` - - **Description:** - -Performs a linear search for a key in the array. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the pointer to the key to be searched.
baseIndicates the pointer to the array buffer.
nelpIndicates the pointer to the linear search length.
widthIndicates the pointer to the array buffer width.
comparIndicates the pointer to the function to match.
- -**Returns:** - -Returns the obtained key if the operation is successful; returns **NULL** if the operation fails. - -## llabs\(\) - -``` -long long llabs (long long i) -``` - - **Description:** - -Calculates the absolute value of a long long integer. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
iIndicates the long long integer to be converted.
- -**Returns:** - -Returns the absolute value. - -## lldiv\(\) - -``` -[lldiv_t](lldiv_t.md) lldiv (long long numerator, long long denominator ) -``` - - **Description:** - -Calculates the quotient and remainder of a long long integer after division. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
numeratorIndicates the numerator.
denominatorIndicates the denominator.
- -**Returns:** - -Returns a structure variable that has been defined in the function. - -## lrand48\(\) - -``` -long int lrand48 (void ) -``` - - **Description:** - -Generates pseudo-random numbers evenly distributed between \[0, 2^31\). - -**Attention:** - -This function works by generating a 48-bit integer sequence, and **X\(i+1\)** must be generated by using the value of **Xi**. The correlation is obtained by using a linear congruential formula, Xn+1 = \(aXn + c\) mod m, where n = 0, m = 2^48, a = 0x5DEECE66D, and c = 0xB. Before this function is called, one of the functions **[srand48\(\)](UTILS.md#ga91c6acf8516086891c689926e49f1ddf)**, **[seed48\(\)](UTILS.md#ga0b86f7fc9964c291844e8112a367721c)**, and **[lcong48\(\)](UTILS.md#ga71e0019171f5584bb6957867691c3e10)** must be used to initialize **Xi**. - -**Returns:** - -Returns nonnegative long integers evenly distributed between \[0, 2^31\) if the operation is successful. - -## lsearch\(\) - -``` -void* lsearch (const void * key, const void * base, size_t * nelp, size_t width, int(*)(const void *, const void *) compar ) -``` - - **Description:** - -Performs a linear search for a key in the array and adds a key to the end of the array if the key is not found. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the pointer to the key to be searched.
baseIndicates the pointer to the array buffer.
nelpIndicates the pointer to the linear search length.
widthIndicates the pointer to the array buffer width.
comparIndicates the pointer to the function to match.
- -**Returns:** - -Returns the obtained key if the operation is successful. - -## lseek\(\) - -``` -off_t lseek (int fd, off_t offset, int whence ) -``` - - **Description:** - -Sets the offset of the pointer to the file. - -The pointer to the file is used to read and write data. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
fdIndicates the file descriptor.
offsetIndicates the pointer offset to be set.
whenceIndicates the pointer position. The value can be SEEK_CUR (current position), SEEK_SET (beginning of the file), or SEEK_END (end of the file).
- -**Returns:** - -Returns the offset to the beginning of the file if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - -

errno

-

Description

-

EBADF

-

fd is invalid.

-

EINVAL

-

whence is invalid.

-

EIO

-

A hardware error occurs at the I/O layer.

-
- -## malloc\(\) - -``` -void* malloc (size_t size) -``` - - **Description:** - -Dynamically allocates a memory block of **size**. - -The allocated memory is not initialized. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sizeIndicates the size of the memory block to be allocated.
- -**Returns:** - -Returns the pointer to the allocated memory block if the operation is successful; returns **NULL** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

ENOMEM

-

Insufficient memory.

-
- -## mblen\(\) - -``` -int mblen (const char * s, size_t n ) -``` - - **Description:** - -Obtains the number of bytes in the next multi-byte string. - -If **s** is not **NULL**, this function inspects at most **n** bytes of the multi-byte string starting at **s**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sIndicates the pointer to a string constant.
nIndicates the number of bytes to be checked. The value cannot be greater than MB_CUR_MAX.
- -**Returns:** - -Returns the number of bytes of the string constant if the operation is successful; returns **0** if the string constant content is a wide character that is empty; returns **-1** if the string constant content is invalid or cannot be parsed. - -## mbrlen\(\) - -``` -size_t mbrlen (const char * s, size_t n, mbstate_t * ps ) -``` - - **Description:** - -Determines the number of bytes in a character string pointed to by **s**. - -If **s** is not **NULL**, this function checks at most **n** bytes in the string of **s**. It also uses a static anonymous shift state pointed to by **ps**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
sIndicates the pointer to the string to check.
nIndicates the maximum number of bytes to check.
psIndicates the pointer to the mbstate_t object describing the conversion state.
- -**Attention:** - -The behavior of this function depends on the [LC\_CTYPE](IO.md#ga07c66689961056725d7f50231d740ba9) type of the current locale. - -**Returns:** - -Returns the number of bytes in the string if the operation is successful. If **s** is a null pointer, this function returns **0**. If the characters in **s** are invalid or cannot be parsed, this function returns **-1**. If the first **n** bytes in the string of **s** do not contribute to a complete multi-byte character, this function returns **\(size\_t\)-2**. If the first **n** bytes in the string of **s** contain an invalid multi-byte character, this function returns **\(size\_t\)-1** and sets **errno** to [EILSEQ](UTILS.md#gac6c071293826a4e66a717bb38db7794d). - -## mbrtowc\(\) - -``` -size_t mbrtowc (wchar_t * pwc, const char * s, size_t n, mbstate_t * ps ) -``` - - **Description:** - -Converts a multi-byte character string with a length of **n** into a wide character string. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
pwcIndicates the pointer to the destination wide character array to store the converted string.
sIndicates the pointer to the multi-byte character string to be converted.
nIndicates the number of bytes to read from s.
psIndicates the pointer to the mbstate_t object describing the conversion state.
- -**Returns:** - -Returns the number of characters written to the destination wide character array. If the first **n** bytes in the string of **s** do not contribute to a complete multi-byte character, this function returns **\(size\_t\)-2**. If the first **n** bytes in the string of **s** contain an invalid multi-byte character, this function returns **\(size\_t\)-1** and sets **errno** to [EILSEQ](UTILS.md#gac6c071293826a4e66a717bb38db7794d). If the converted wide character is **L'\\ 0'**, this function returns **0** and resets **\* ps** to the initial state. - -## mbsinit\(\) - -``` -int mbsinit (const mbstate_t * ps) -``` - - **Description:** - -Checks whether the **mbstate\_t** object pointed to by **ps** is in the initial state. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
psIndicates the pointer to the mbstate_t object to check.
- -**Returns:** - -Returns a non-zero value if **ps** points to an object that is in the initial state or it is a null pointer; returns **0** otherwise. - -## mbsnrtowcs\(\) - -``` -size_t mbsnrtowcs (wchar_t * dest, const char ** src, size_t nwc, size_t len, mbstate_t * ps ) -``` - - **Description:** - -Converts a multi-byte character string with a length of **n** into a wide character string that can hold a total of **nwc** wide characters. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
destIndicates the pointer to the destination wide character array to store the converted string.
srcIndicates the double pointer to the source string to be converted.
nwcIndicates the number of wide characters that can be written to the destination wide character array.
lenIndicates the number of characters to be converted.
psIndicates the pointer to the mbstate_t object describing the conversion state.
- -**Attention:** - -The **dest** value cannot be **NULL**. - -**Returns:** - -Returns the number of characters written to the destination wide character array. If the first **n** bytes in the string of **s** contain an invalid multi-byte character, this function returns **\(size\_t\)-1** and sets **errno** to [EILSEQ](UTILS.md#gac6c071293826a4e66a717bb38db7794d). If more than **nwc** characters will be written or more than **len** characters are to be converted, **src** points to the next character to be converted, and this function returns the number of characters successfully written to the destination wide character array. If the converted wide character is **L'\\ 0'**, this function returns **0** and resets **\* ps** to the initial state. - -## mbsrtowcs\(\) - -``` -size_t mbsrtowcs (wchar_t * dest, const char ** src, size_t len, mbstate_t * ps ) -``` - - **Description:** - -Converts a multi-byte character string with a length of **len** into a wide character string. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
destIndicates the pointer to the destination wide character array to store the converted string.
srcIndicates the double pointer to the source string to be converted.
lenIndicates the number of wide characters to be converted.
psIndicates the pointer to the mbstate_t object describing the conversion state.
- -**Attention:** - -**dest** cannot be **NULL**. - -**Returns:** - -Returns the number of characters written to the destination wide character array. If an invalid character is encountered, this function returns **len-1** and sets **errno** to [EILSEQ](UTILS.md#gac6c071293826a4e66a717bb38db7794d). If **len** non-**L'\\0'** characters have been successfully written to the destination wide character array, **src** points to the next character to be converted, and this function returns the number of wide characters successfully written to the destination array. If the converted wide character is **L'\\0'**, this function returns **0** and resets **\* ps** to the initial state. - -## mbstowcs\(\) - -``` -size_t mbstowcs (wchar_t * dest, const char * src, size_t n ) -``` - - **Description:** - -Converts a multi-byte string to a wide-character string. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
destIndicates the pointer to an array for the wchar_t element. The array length can store a wide-character string whose length is specified by n.
srcIndicates the pointer to the multi-byte string to convert.
nIndicates the maximum number of wide characters to convert.
- -**Returns:** - -Returns the number of wide characters, excluding the terminating null wide character if the operation is successful; returns **-1** if an invalid multibyte character is encountered. - -## mbtowc\(\) - -``` -int mbtowc (wchar_t * pwc, const char * s, size_t n ) -``` - - **Description:** - -Converts a string constant to a wide character. - -If **s** is not **NULL**, this function inspects at most **n** bytes of the multi-byte string starting at **s** and converts it to a wide character and stores it. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
pwcIndicates the pointer to the string for storing the wide character.
sIndicates the pointer to a string constant.
nIndicates the number of bytes to be checked. The value cannot be greater than MB_CUR_MAX.
- -**Attention:** - -**s** and **pwc** cannot be **NULL**. If **s** is **NULL**, **pwc** and **n** are ignored. - -**Returns:** - -Returns the number of bytes converted from **s** if the operation is successful; returns **0** if **s** points to an empty byte; returns **-1** if the string constant content is invalid or cannot be parsed. - -## memccpy\(\) - -``` -void* memccpy (void *__restrict dest, const void *__restrict src, int c, size_t n ) -``` - - **Description:** - -Copies a memory area to another one. - -This function copies no more than **n** bytes from the source memory area pointed to by **src** to the destination memory area pointed to by **dest**. The copy stops when a character specified by **c** is found. The result for two overlapped memory areas is undefined. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
destIndicates the pointer to the destination memory area.
srcIndicates the pointer to the source memory area.
cIndicates the character for stopping copying.
nIndicates the size of the string to be copied, in bytes.
- -**Returns:** - -Returns the pointer to the next character of the character **c** in the destination memory area if the operation is successful; returns **NULL** if the character **c** is not found in the n bytes of the source memory area. - -## memchr\(\) - -``` -void* memchr (const void * s, int c, size_t n ) -``` - - **Description:** - -Searches for a character in the specified memory area. - -This function searches for the first occurrence of the character specified by **c** in the n-byte memory area pointed to by **s**. Both the character **c** and the memory area pointed to by **s** are interpreted as unsigned characters. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
sIndicates the pointer to the start of the bytes to be searched.
cIndicates the character to be searched for.
nIndicates the length of the memory area to be searched.
- -**Returns:** - -Returns the pointer to the character if found; returns **NULL** if no matching character is found. - -## memcmp\(\) - -``` -int memcmp (const void * s1, const void * s2, size_t n ) -``` - - **Description:** - -Compares two memory areas. - -This function checks whether the first **n** bytes of the two memory areas pointed to by **s1** and **s2** are equal. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
s1Indicates the pointer to memory area 1 for comparison.
s2Indicates the pointer to memory area 2 for comparison.
nIndicates the size of the memory area to be compared, in bytes.
- -**Returns:** - -Returns **0** if the first **n** bytes of two memory areas are the same or **n** is 0; returns the difference between the first pair of bytes that differ in **s1** and **s2** if the contents of two memory areas are different. - -## memcpy\(\) - -``` -void* memcpy (void *__restrict dest, const void *__restrict src, size_t n ) -``` - - **Description:** - -Copies a string \(overlapping not allowed\). - -This function copies **n** bytes from the source memory area pointed to by **src** to the destination memory area pointed to by **dest**. The two memory areas cannot overlap. If they overlap, use [memmove\(\)](UTILS.md#ga802c986820d3866639922b6bc9484f90) instead. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
destIndicates the pointer to the destination memory area.
srcIndicates the pointer to the source memory area.
nIndicates the size of the string to be copied, in bytes.
- -**Returns:** - -Returns the pointer \(**dest**\) to the destination memory area. - -## memmem\(\) - -``` -void* memmem (const void * haystack, size_t haystacklen, const void * needle, size_t needlelen ) -``` - - **Description:** - -Searches for a needle string in its haystack string. - -This function searches for the start position of the first occurrence of the needle string whose length is **needlelen** in the memory area holding the haystack string which starts at the position pointed to by **haystack**. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
haystackIndicates the pointer to the start position of the memory area to be searched.
haystacklenIndicates the length (in bytes) of the memory area to be searched.
needleIndicates the pointer to the start position of the needle string to be searched for.
needlelenIndicates the length (in bytes) of the needle string to be searched for.
- -**Attention:** - -This is an extended GNU function. - -**Returns:** - -Returns the start position of the needle string in the memory area if the position is found; returns **NULL** if the position is not found. - -## memmove\(\) - -``` -void* memmove (void * dest, const void * src, size_t n ) -``` - - **Description:** - -Copies a string \(overlapping allowed\). - -This function copies **n** bytes from the source memory area pointed to by **src** to the destination memory area pointed to by **dest**. The two memory areas can overlap. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
destIndicates the pointer to the destination memory area.
srcIndicates the pointer to the source memory area.
nIndicates the size of the string to be copied, in bytes.
- -**Returns:** - -Returns the pointer \(**dest**\) to the destination memory area. - -**See also:** - -[memcpy\(\)](UTILS.md#ga0ee37e291991bef6e3f4b49a970171e7) - -## mempcpy\(\) - -``` -void* mempcpy (void * dest, const void * src, size_t n ) -``` - - **Description:** - -Copies a string \(overlapping not allowed\). - -This function copies **n** bytes from the source memory area pointed to by **src** to the destination memory area pointed to by **dest**. The two memory areas cannot overlap. This function is similar to [memcpy\(\)](UTILS.md#ga0ee37e291991bef6e3f4b49a970171e7) except for the return value. This function returns the pointer to the last byte written during the copy. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
destIndicates the pointer to the destination memory area.
srcIndicates the pointer to the source memory area.
nIndicates the size of the string to be copied, in bytes.
- -**Returns:** - -Returns the pointer to the last byte written during the copy. - -## memrchr\(\) - -``` -void* memrchr (const void * s, int c, size_t n ) -``` - - **Description:** - -Searches for a character in the specified memory area. - -This function searches for the first occurrence of the character specified by **c** in the n-byte memory area pointed to by **s**. This function searches backward from the end of the n bytes pointed to by s, while the [memchr\(\)](UTILS.md#ga16d6b0bd660cc3f9910924c6b6f4af8e) function searches forward from the beginning. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
sIndicates the pointer to the start of the bytes to be searched.
cIndicates the character to be searched for.
nIndicates the length of the memory area to be searched.
- -**Returns:** - -Returns the pointer to the character if found; returns **NULL** if no matching character is found. - -## memset\(\) - -``` -void* memset (void * s, int c, size_t n ) -``` - - **Description:** - -Copies a character to the specified memory area. - -This function copies the character specified by **c** to the n-byte memory area pointed to by **s**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
sIndicates the pointer to the memory area to hold the character.
cIndicates the character to be copied.
nIndicates the size of the memory area.
- -**Returns:** - -Returns the pointer \(**s**\) to the memory area. - -## mkdtemp\(\) - -``` -char* mkdtemp (char * template) -``` - - **Description:** - -Creates a unique temporary directory based on **template**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
templateIndicates the name of the directory to be created. The last six characters must be XXXXXX.
- -**Returns:** - -Returns the pointer to the modified **template** string if the operation is successful; returns **NULL** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

The last six characters are not XXXXXX.

-

Other

-

For details, see mkdir.

-
- -**See also:** - -[mkdir](FS.md#gaee98bbe743c2d14dbaa67f01c3fb9ed5) - -## mkostemp\(\) - -``` -int mkostemp (char * template, int flags ) -``` - - **Description:** - -Creates and opens a unique temporary file. - -Different from [mkstemp](UTILS.md#ga6abe6c5eb77aeaf05ad81a7425547d9e), this function has the **flags** parameter. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
templateIndicates the name of the file to be created. The last six characters must be XXXXXX.
flagsIndicates the flag for creating a file. For details, see open.
- -**Returns:** - -Returns the descriptor of the opened file if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

The last six characters are not XXXXXX.

-

EEXIST

-

Failed to create a unique temporary file name.

-

Other

-

For details, see open().

-
- -**See also:** - -[open](FS.md#ga219205a58e244a5acd35b767ac50ef9c) - -## mkostemps\(\) - -``` -int mkostemps (char * template, int suffixlen, int flags ) -``` - - **Description:** - -Creates and opens a unique temporary file. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
templateIndicates the name of the file to be created.
suffixlenIndicates the length of the placeholder suffix XXXXXX.
flagsIndicates the flag for creating a file.
- -**Returns:** - -Returns the descriptor of the opened file if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

The template length is less than (6 + suffixlen), or the last six characters of template are not XXXXXX.

-

EEXIST

-

Failed to create a unique temporary file name.

-

Other

-

For details, see open().

-
- -**See also:** - -[open](FS.md#ga219205a58e244a5acd35b767ac50ef9c) - -## mkstemp\(\) - -``` -int mkstemp (char * template) -``` - - **Description:** - -Creates and opens a unique temporary file. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
templateIndicates the name of the file to be created. The last six characters must be XXXXXX.
- -**Returns:** - -Returns the descriptor of the opened file if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

The last six characters are not XXXXXX.

-

EEXIST

-

Failed to create a unique temporary file name.

-

Other

-

For details, see open().

-
- -**See also:** - -[open](FS.md#ga219205a58e244a5acd35b767ac50ef9c) - -## mkstemps\(\) - -``` -int mkstemps (char * template, int suffixlen ) -``` - - **Description:** - -Creates and opens a unique temporary file. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
templateIndicates the name of the file to be created.
suffixlenIndicates the length of the placeholder suffix XXXXXX.
- -**Returns:** - -Returns the descriptor of the opened file if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

The template length is less than (6 + suffixlen), or the last six characters of template are not XXXXXX.

-

EEXIST

-

Failed to create a unique temporary file name.

-

Other

-

For details, see open().

-
- -**See also:** - -[open](FS.md#ga219205a58e244a5acd35b767ac50ef9c) - -## mktemp\(\) - -``` -char* mktemp (char * template) -``` - - **Description:** - -Creates a unique temporary file name. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
templateIndicates the name of the file to be created. The last six characters are XXXXXX.
- -**Returns:** - -Returns the pointer to the created file name if the operation is successful; returns **NULL** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

The last six characters are not XXXXXX.

-

ENOENT

-

The file name already exists.

-
- -## mrand48\(\) - -``` -long mrand48 (void ) -``` - - **Description:** - -Generates pseudo-random numbers evenly distributed between \[-2^31, 2^31\). - -**Attention:** - -This function works by generating a 48-bit integer sequence, and **X\(i+1\)** must be generated by using the value of **Xi**. The correlation is obtained by using a linear congruential formula, Xn+1 = \(aXn + c\) mod m, where n = 0, m = 2^48, a = 0x5DEECE66D, and c = 0xB. Before this function is called, one of the functions **[srand48\(\)](UTILS.md#ga91c6acf8516086891c689926e49f1ddf)**, **[seed48\(\)](UTILS.md#ga0b86f7fc9964c291844e8112a367721c)**, and **[lcong48\(\)](UTILS.md#ga71e0019171f5584bb6957867691c3e10)** must be used to initialize **Xi**. - -**Returns:** - -Returns signed long integers evenly distributed between \[-2^31, 2^31\) if the operation is successful. - -## nrand48\(\) - -``` -long int nrand48 (unsigned short xsubi[3]) -``` - - **Description:** - -Generates pseudo-random numbers evenly distributed between \[0, 2^31\). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
xsubi[3]Indicates the array of the initialized value of Xi.
- -**Attention:** - -This function works by generating a 48-bit integer sequence, and **X\(i+1\)** must be generated by using the value of **Xi**. The correlation is obtained by using a linear congruential formula, Xn+1 = \(aXn + c\) mod m, where n = 0, m = 2^48, a = 0x5DEECE66D, and c = 0xB. **Xi** is specified by **xsubi\[3\]**. - -**Returns:** - -Returns nonnegative long integers evenly distributed between \[0, 2^31\) if the operation is successful. - -## pathconf\(\) - -``` -long pathconf (const char * path, int name ) -``` - - **Description:** - -Obtains the configuration value of a file. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
pathIndicates the file path.
nameIndicates the name of the configuration value.
- -**Returns:** - -Returns the actual value of the configuration file if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

The value of name does not match any existing configuration option.

-
- -## pause\(\) - -``` -int pause (void ) -``` - - **Description:** - -Waits for signal. - -This function is used to stop the current process or thread until a signal is delivered. - -**Returns:** - -Returns when a signal was caught and returns **-1** and sets **errno** to EINTR. - - - - - - - - - - -

errno

-

Description

-

EINTR

-

A signal was caught during execution.

-
- -## pipe\(\) - -``` -int pipe (int pipefd[2]) -``` - - **Description:** - -Creates an anonymous pipe. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
pipefdIndicates the pointer to the buffer for storing the created pipe descriptor. The buffer has two sizes of the int type, one for the read-end descriptor and the other for the write-end descriptor.
- -**Attention:** - -A maximum of 32 anonymous pipes can be created, and the internal buffer of a pipe is 1023 bytes. - -**Returns:** - -Returns **0** if the creation is successful; returns **-1** and sets **errno** to a value in the following table if the creation fails. - - - - - - - - - - - - - - - - -

errno

-

Description

-

EFAULT

-

pipefd is invalid.

-

ENOMEM

-

Creation failed due to insufficient space.

-

ENFILE

-

Failed to create an anonymous pipe because the number of anonymous pipes has reached the upper limit.

-
- -## posix\_memalign\(\) - -``` -int posix_memalign (void ** memptr, size_t alignment, size_t size ) -``` - - **Description:** - -Allocates memory with the specified size based on the given **alignment**. - -The value of **alignment** must be a power of 2 and a multiple of **sizeof\(void \*\)**. The allocated memory address is stored in **\*memptr**. If **size** is **0**, **\*memptr** is either **NULL** or a unique pointer value that can later be successfully passed to [free\(\)](MEM.md#gafbedc913aa4651b3c3b4b3aecd9b4711). - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
memptrIndicates the double pointer to the allocated memory block.
alignmentIndicates the alignment size of the allocated memory block.
sizeIndicates the size of the memory block to be allocated.
- -**Returns:** - -Returns **0** if the operation is successful; returns an error code if the operation fails. - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

The value of alignment is not a power of 2, or is not a multiple of sizeof(void *).

-

ENOMEM

-

Insufficient memory.

-
- -## pread\(\) - -``` -ssize_t pread (int fd, void * buf, size_t count, off_t offset ) -``` - - **Description:** - -Reads data whose offset is **offset** and length is **count** from **fd** to the buffer. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
fdIndicates the file descriptor to read.
bufIndicates the pointer to the buffer for storing data.
countIndicates the length of the data to read.
offsetIndicates the offset of the file descriptor to read.
- -**Attention:** - -The **fd** offset does not change after the function is called. This function is helpful in multithreaded applications. They allow multiple threads to execute the I/O on the same file descriptor without being affected by changes in other file offsets. It is not an error if the number of transferred bytes is less than the number of requested bytes after the function is called. - -**Returns:** - -Returns the number of records read if the operation is successful; returns **-1** and sets **errno** to a value if the operation fails. - -## putenv\(\) - -``` -int putenv (char * s) -``` - - **Description:** - -Configures an environment variable. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sIndicates the content of the environment variable to configure.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - -## putwc\(\) - -``` -wint_t putwc (wchar_t wc, [FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * stream ) -``` - - **Description:** - -Writes a wide character **wc** to a specified file stream. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
wcIndicates the wide character to write.
streamIndicates the pointer to the file object that identifies a stream.
- -**Attention:** - -This function is similar to [fputwc](UTILS.md#gab405f6ad88ebd1c6150206d19d3c7f12) only except that it is implemented as a macro. - -**Returns:** - -Returns the wide character if the operation is successful; returns **WEOF** otherwise. - -## putwchar\(\) - -``` -wint_t putwchar (wchar_t wc) -``` - - **Description:** - -Writes a wide character **wc** to the stdout. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
wcIndicates the wide character to write.
- -**Returns:** - -Returns the wide character if the operation is successful; returns **WEOF** otherwise. - -## pwrite\(\) - -``` -ssize_t pwrite (int fd, const void * buf, size_t count, off_t offset ) -``` - - **Description:** - -Writes data from the buffer to **fd** whose offset is **offset** and length is **count**. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
fdIndicates the file descriptor to write.
bufIndicates the pointer to the buffer to which data is written.
countIndicates the size of the data to write.
offsetIndicates the offset of the file to write.
- -**Attention:** - -The **fd** offset does not change after the function is called. This function is helpful in multithreaded applications. They allow multiple threads to execute the I/O on the same file descriptor without being affected by changes in other file offsets. It is not an error if the number of transferred bytes is less than the number of requested bytes after the function is called. For details, see [write\(\)](UTILS.md#gac06af22e9ce132f563db5c918ceb1eb1). - -**Returns:** - -Returns the number of records written if the operation is successful; returns **-1** and sets **errno** to a value if the operation fails. Global variables of the **int** type can be directly obtained. - -## qsort\(\) - -``` -void qsort (const void * base, size_t nel, size_t width, int(*)(const void *, const void *) compar ) -``` - - **Description:** - -Sorts array elements **base\[0\]** to **base\[num-1\]** based on the comparison rules of **compar**. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
baseIndicates the array to be sorted.
nelIndicates the number of elements in the array to be searched.
widthIndicates the length of each element, in bytes.
compareIndicates the pointer to the comparison subfunction used to define comparison rules.
- -## rand\(\) - -``` -int rand (void ) -``` - - **Description:** - -Generates a pseudo-random number. - -The random number ranges from **0** to **RAND\_MAX**. - -**Attention:** - -**RAND\_MAX** is defined in this header file. This function is implemented using the linear congruence method. If the random number seed does not change, the generated random number complies with the normal distribution. The generated random number is not a real random number but a pseudo-random number. Therefore, you need to use the **[srand\(\)](UTILS.md#ga83a727cc697aea22e24cad5f39198dd2)** function to initialize the random number seed to the unique values. - -**Returns:** - -Returns a non-negative integer that is evenly distributed in the interval \[0, **RAND\_MAX**\] if the operation is successful. - -## rand\_r\(\) - -``` -int rand_r (unsigned * seedp) -``` - - **Description:** - -Generates a pseudo-random number. - -The random number ranges from **0** to **RAND\_MAX**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
seedpIndicates the random number seed.
- -**Attention:** - -This function is implemented using the linear congruence method. If the random number seed does not change, the generated random number complies with the normal distribution. The generated random number is not a real random number but a pseudo-random number. Therefore, you need to use [srand](UTILS.md#ga83a727cc697aea22e24cad5f39198dd2) to initialize the random number seed to the unique values. - -**Returns:** - -Returns a non-negative integer that is evenly distributed in the interval \[0, **RAND\_MAX**\] if the operation is successful. - -## random\(\) - -``` -long int random (void ) -``` - - **Description:** - -Generates a pseudo-random number. - -**Attention:** - -Generally, [srandom\(\)](UTILS.md#gaf1e7e3d144face36372f9ae8b18aa009) is called before this function to generate a random number seed. If [srandom\(\)](UTILS.md#gaf1e7e3d144face36372f9ae8b18aa009) is not called or **srandom\(0\)** is used to generate a random number seed, the random number seed generated by **srandom\(1\)** is used. - -## read\(\) - -``` -ssize_t read (int fd, void * buf, size_t size ) -``` - - **Description:** - -Reads the file contents and saves them in a specified buffer location. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
fdIndicates the descriptor of the file to read.
bufIndicates the pointer to the buffer for storing the data read.
sizeIndicates the length of the content to read. If the length exceeds that of the buffer, memory corruption may occur.
- -**Returns:** - -Returns the number of bytes read if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EBADF

-

fd is invalid.

-

EACCES

-

The file cannot be read.

-

EFAULT

-

buf is set to NULL.

-

ENOMEM

-

Insufficient memory.

-
- -## realloc\(\) - -``` -void* realloc (void * ptr, size_t size ) -``` - - **Description:** - -Changes the size of the memory block pointed to by **ptr** to **size** bytes. - -The contents will remain unchanged in the range from the start of **ptr** to the minimum of the old and new sizes. If the new size is larger than the old size, the added memory will not be initialized. If **ptr** is **NULL**, this function call is equivalent to **malloc\(size\)**; if **size** is equal to **0** and **ptr** is not **NULL**, the size will be adjusted to a non-zero value, but the returned pointer shall not be used to access an object. If **ptr** is not **NULL**, it must be the returned value of [malloc\(\)](MEM.md#ga7ac38fce3243a7dcf448301ee9ffd392), [calloc\(\)](MEM.md#ga62b7798461bd461da64c5f9d35feddf7), or [realloc](UTILS.md#ga1a6b5e8d2f1c37e5b43e4345586075be). If the memory block pointed to by **ptr** has been moved, **free\(ptr\)** is executed. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
ptrIndicates the pointer to the memory block to be adjusted.
sizeIndicates the new size of the memory block.
- -**Returns:** - -Returns the pointer to the new memory block if the operation is successful; returns **NULL** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

ENOMEM

-

Insufficient memory.

-
- -## realpath\(\) - -``` -char* realpath (const char *__restrict path, char *__restrict resolved ) -``` - - **Description:** - -Obtains a normalized absolute path. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
pathIndicates the name of the absolute path to be obtained.
resolvedIndicates the pointer to the obtained absolute path.
- -**Returns:** - -Returns the pointer to **resolved\_path** if the operation is successful; returns **NULL** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EACCES

-

Read or search permission is denied on a component of the path prefix.

-

EINVAL

-

path is NULL.

-

EIO

-

An I/O error occurred while reading from the file system.

-

ELOOP

-

Too many symbolic links are encountered when the path name is parsed.

-

ENAMETOOLONG

-

The path name is too long.

-

ENOMEM

-

Insufficient memory.

-

ENOENT

-

The file does not exist.

-

ENOTDIR

-

The component of the path prefix is not a directory.

-
- -## regcomp\(\) - -``` -int regcomp (regex_t * preg, const char * regex, int cflags ) -``` - - **Description:** - -Compiles a specified regular expression into a string of a specific format. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
pregIndicates the pointer to the compiled regular expression.
regexIndicates the pointer to the regular expression to compile.
cflagsIndicates the regular expression matching flag. Available values are as follows:
- - - - - - - - - - - - - - - - - - - -

cflags

-

description

-

REG_EXTENDED

-

Support extended regular expressions.

-

REG_ICASE

-

Ignore case during matching.

-

REG_NOSUB

-

The matching result does not need to be stored.

-

REG_NEWLINE

-

Identify the newline character.

-
- -**Returns:** - -Returns **0** if the operation is successful; returns a value in the following table otherwise. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

value

-

description

-

REG_BADBR

-

Use of back reference operator is invalid.

-

REG_BADPAT

-

Use of pattern operators such as group or list is invalid.

-

REG_BADRPT

-

Use of repetition operators is invalid. For example, * is used as the first character.

-

REG_EBRACE

-

Brace interval operators are unmatched.

-

REG_EBRACK

-

Bracket list operators are unmatched.

-

REG_ECOLLATE

-

The collation element is invalid.

-

REG_ECTYPE

-

The character class name is invalid.

-

REG_EESCAPE

-

The last character is a backslash ().

-

REG_EPAREN

-

Parenthesis group operators are unmatched.

-
- -## regerror\(\) - -``` -size_t regerror (int errcode, const regex_t * preg, char * errbuf, size_t errbuf_size ) -``` - - **Description:** - -Returns a string containing error information. - -If an error occurs during the execution of [regcomp](UTILS.md#ga075d4ee229f48709667fe28313d2013e) or [regexec](UTILS.md#ga5fda573156393bb7d89b4291ded6e26b), this function can be called to return a string containing the error information. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
errcodeIndicates the error code returned by regcomp and regexec.
pregIndicates the pointer to the regular expression compiled using regcomp. This parameter value can be NULL.
errbufIndicates the pointer to the memory for storing the string of the error information.
errbuf_sizeIndicates the length of the errbuf parameter. If the length of the string of the error information is greater than the value of this parameter, this function automatically truncates the extra string, but still returns the complete string length.
- -**Returns:** - -Returns the length of the error information string. - -## regexec\(\) - -``` -int regexec (const regex_t * preg, const char * string, size_t nmatch, regmatch_t pmatch[], int eflags ) -``` - - **Description:** - -Matches a regular expression. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
pregIndicates the pointer to the regular expression compiled using regcomp.
stringIndicates the pointer to the target string.
nmatchIndicates the array length of the regmatch_t structure.
pmatchIndicates the array of the regmatch_t structure. It stores the position information of the matched string.
eflagsIndicates the matching flag. Available values are as follows:
- - - - - - - - - - - - - -

value

-

description

-

REG_NOTBOL

-

The circumflex character (^) will not match the beginning of a string.

-

REG_NOTEOL

-

The dollar sign ($) will not match the end of a string.

-
- -**Returns:** - -Returns **0** if the operation is successful; returns **REG\_NOMATCH** otherwise. - -## regfree\(\) - -``` -void regfree (regex_t * preg) -``` - - **Description:** - -Releases a regular expression. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
pregIndicates the pointer to the regular expression compiled using regcomp.
- -## remque\(\) - -``` -void remque (void * elem) -``` - - **Description:** - -Removes an entry from a queue. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
elementIndicates the element to be removed from the queue.
- -## rindex\(\) - -``` -char* rindex (const char * s, int c ) -``` - - **Description:** - -Searches for the last position of the matched character in a string. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sIndicates the pointer to the string to be searched.
cIndicates the character to be matched.
- -**Returns:** - -Returns the pointer to the matched character if the operation is successful; returns **NULL** if the operation fails. - -## rmdir\(\) - -``` -int rmdir (const char * path) -``` - - **Description:** - -Deletes a directory. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
pathIndicates the name of the directory to be deleted.
- -**Attention:** - -This function can NOT be used in the PROC file system. - -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

path is a null pointer or an empty string.

-

ENAMETOOLONG

-

The length of the path name is greater than PATH_MAX.

-

ENOMEM

-

Insufficient memory.

-

ENOENT

-

The directory does not exist.

-

EPERM

-

The path is a mount point, or it is neither a directory nor a file.

-

ENOTEMPTY

-

The directory is not empty.

-

ENOTDIR

-

The specified path is not a directory.

-

ENXIO

-

No such device or address.

-
- -## sbrk\(\) - -``` -void* sbrk (intptr_t increment) -``` - - **Description:** - -Adjusts the heap size of a process. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
incrementIndicates the size of the memory space to obtain.
- -**Returns:** - -Returns the pointer to the memory space if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

ENOMEM

-

Insufficient memory.

-
- -## secure\_getenv\(\) - -``` -char* secure_getenv (const char * name) -``` - - **Description:** - -Obtains the value of an environment variable. - -The feature of this function is the same as that of [getenv\(\)](UTILS.md#gabc6595dbf6880c71628fecf0dbb23d66) during non-secure execution. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
nameIndicates the pointer to the name of the environment variable whose value needs to be obtained.
- -**Returns:** - -Returns the pointer to the environment variable value if the operation is successful; returns **NULL** if there is no match. - -## seed48\(\) - -``` -unsigned short* seed48 (unsigned short [3]) -``` - - **Description:** - -Generates an evenly distributed pseudo-random seed. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
seed16vIndicates the 48-bit seed.
- -**Attention:** - -This function is an initialization function and can be called before calling [drand48](UTILS.md#gaf9329f9acef07ca14ea2256191c3ce74), [lrand48](UTILS.md#gad20ddf22bece340e3036c60cad913250), or [mrand48](UTILS.md#ga9c450a7a3d4437e3d5f8def180f68103). - -**Returns:** - -Returns the pointer to the pseudo-random seed. - -## setegid\(\) - -``` -int setegid ([gid_t](UTILS.md#ga7ba7f6123ac8905fbe36f596bea2437e) egid) -``` - - **Description:** - -Sets the effective user group ID of the calling process. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
egidIndicates the effective user group ID to set.
- -**Attention:** - -The real user group ID is the same as the effective user group ID and saved user group ID. - -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

egid is invalid.

-

EPERM

-

No setting permission.

-
- -## setenv\(\) - -``` -int setenv (const char * name, const char * value, int overwrite ) -``` - - **Description:** - -Add or change an environment variable. - -This function adds the varible **name** to environment with string **value** if **name** is not exist. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
nameIndicates the name of environment variable.
valueIndicates the value of environment variable.
overwriteIf the varible name does exit and the value overwrite is nonzero, then value of name will be change to new value; if overwrite is zero, then the value of name remains unchanged.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

The name is NULL, or its length is zero, or contains an "=" character.

-

ENOMEM

-

Insufficient memory.

-
- -## seteuid\(\) - -``` -int seteuid ([uid_t](UTILS.md#ga66a6f1a27d4474144d59fb2b805ff50e) euid) -``` - - **Description:** - -Sets the effective user ID of the calling process. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
euidIndicates the effective user ID to set.
- -**Attention:** - -The real user ID is the same as the effective user ID and saved user ID. - -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

euid is invalid.

-

EPERM

-

No setting permission.

-
- -## setgid\(\) - -``` -int setgid ([gid_t](UTILS.md#ga7ba7f6123ac8905fbe36f596bea2437e) gid) -``` - - **Description:** - -Sets the user group ID of the calling process. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
gidIndicates the user group ID to set.
- -**Attention:** - -The real user group ID is the same as the effective user group ID and saved user group ID. - -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

gid is invalid.

-

EPERM

-

No setting permission.

-
- -## setgroups\(\) - -``` -int setgroups (size_t size, const [gid_t](UTILS.md#ga7ba7f6123ac8905fbe36f596bea2437e) * list ) -``` - - **Description:** - -Sets the supplementary user group list of the calling process. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sizeIndicates the maximum size of the supplementary user group list. If the value is 0, the list is cleared. The maximum value is 255.
listIndicates the target supplementary group list.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

size is invalid.

-

EFAULT

-

Invalid address.

-

ENOMEM

-

Insufficient memory.

-
- -## setpgid\(\) - -``` -int setpgid ([pid_t](UTILS.md#ga30c34d3eead853c44f459f21b932984c) pid, [pid_t](UTILS.md#ga30c34d3eead853c44f459f21b932984c) pgid ) -``` - - **Description:** - -Sets the ID of the process group whose process ID is specified by **pid**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
pidIndicates the process ID. If the value is 0, the process group ID of the current process is obtained.
pgidIndicates the process group ID.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Invalid process ID.

-

ESRCH

-

The specified process cannot be found.

-

EPERM

-

No permission to operate the process group.

-

EACCES

-

The child process has performed exec, and the parent process does not have the operation permission.

-
- -## setpgrp\(\) - -``` -[pid_t](UTILS.md#ga30c34d3eead853c44f459f21b932984c) setpgrp (void ) -``` - - **Description:** - -Sets the process group ID of the calling process. - -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value if the operation fails. - -## setregid\(\) - -``` -int setregid ([gid_t](UTILS.md#ga7ba7f6123ac8905fbe36f596bea2437e) rgid, [gid_t](UTILS.md#ga7ba7f6123ac8905fbe36f596bea2437e) egid ) -``` - - **Description:** - -Sets the real and effective user group IDs of the calling process. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
rgidIndicates the real user group ID to set. If the value is -1, the real user group ID is left unchanged.
egidIndicates the effective user group ID to set. If the value is -1, the effective user group ID is left unchanged.
- -**Attention:** - -The real user group ID is the same as the effective user group ID and saved user group ID. - -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

rgid or egid is invalid.

-

EPERM

-

No setting permission.

-
- -## setresgid\(\) - -``` -int setresgid ([gid_t](UTILS.md#ga7ba7f6123ac8905fbe36f596bea2437e) rgid, [gid_t](UTILS.md#ga7ba7f6123ac8905fbe36f596bea2437e) egid, [gid_t](UTILS.md#ga7ba7f6123ac8905fbe36f596bea2437e) sgid ) -``` - - **Description:** - -Sets the real, effective, and saved group IDs of the calling process. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
rgidIndicates the real user group ID to set. If the value is -1, the real user group ID is left unchanged.
egidIndicates the effective user group ID to set. If the value is -1, the effective user group ID is left unchanged.
sgidIndicates the saved group ID to set. If the value is -1, the saved user group ID is left unchanged.
- -**Attention:** - -The real user group ID is the same as the effective user group ID and saved user group ID. - -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

rgid, egid, or sgid is invalid.

-

EPERM

-

No setting permission.

-
- -## setresuid\(\) - -``` -int setresuid ([uid_t](UTILS.md#ga66a6f1a27d4474144d59fb2b805ff50e) ruid, [uid_t](UTILS.md#ga66a6f1a27d4474144d59fb2b805ff50e) euid, [uid_t](UTILS.md#ga66a6f1a27d4474144d59fb2b805ff50e) suid ) -``` - - **Description:** - -Sets the real, effective, and saved user IDs of the calling process. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
ruidIndicates the real user ID to set. If the value is -1, the real user ID is left unchanged.
euidIndicates the effective user ID to set. If the value is -1, the effective user ID is left unchanged.
suidIndicates the saved user ID to set. If the value is -1, the saved user ID is left unchanged.
- -**Attention:** - -The real user ID is the same as the effective user ID and saved user ID. - -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

ruid, euid, or suid is invalid.

-

EPERM

-

No setting permission.

-
- -## setreuid\(\) - -``` -int setreuid ([uid_t](UTILS.md#ga66a6f1a27d4474144d59fb2b805ff50e) ruid, [uid_t](UTILS.md#ga66a6f1a27d4474144d59fb2b805ff50e) euid ) -``` - - **Description:** - -Sets the real and effective user IDs of the calling process. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
ruidIndicates the real user ID to set. If the value is -1, the real user ID is left unchanged.
euidIndicates the effective user ID to set. If the value is -1, the effective user ID is left unchanged.
- -**Attention:** - -The real user ID is the same as the effective user ID and saved user ID. - -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

ruid or euid is invalid.

-

EPERM

-

No setting permission.

-
- -## setstate\(\) - -``` -char* setstate (char * state) -``` - - **Description:** - -Sets the current state list for subsequent random use. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
stateIndicates the pointer to the state list.
- -**Returns:** - -Returns the pointer to the current state list if the operation is successful; returns **NULL** if the operation fails. **errno** is set to **EINVAL** if **state** is empty or the size of the state list is less than 8 bytes. - -## setuid\(\) - -``` -int setuid ([uid_t](UTILS.md#ga66a6f1a27d4474144d59fb2b805ff50e) uid) -``` - - **Description:** - -Sets the real user ID for the calling process. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
uidIndicates the user ID to set.
- -**Attention:** - -The real user ID is the same as the effective user ID and saved user ID. - -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

uid is invalid.

-

EPERM

-

No setting permission.

-
- -## sleep\(\) - -``` -unsigned sleep (unsigned seconds) -``` - - **Description:** - -Sleeps for a period of time. - -This function is used to stop the current thread until the specified time. A sleeping thread cannot be woken up by a signal. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
secondsIndicates the sleeping seconds.
- -**Returns:** - -Returns the seconds if the operation is successful; returns **0** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Incorrect input.

-
- -## srand\(\) - -``` -void srand (unsigned int seed) -``` - - **Description:** - -Initializes a random number generator. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
seedIndicates the seed for generating a pseudo-random number.
- -**Attention:** - -If **seed** is **0**, this function is equivalent to **srand\(1\)**. Before the **[rand\(\)](UTILS.md#gae23144bcbb8e3742b00eb687c36654d1)** function is executed, this function is used to initialize different algorithm seeds to generate true random numbers. - -## srand48\(\) - -``` -void srand48 (long int seedval) -``` - - **Description:** - -Sets the start seed value for the pseudo-random number generator. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
seedvalIndicates the 48-bit start seed value.
- -**Attention:** - -This function sets the high order 32 bits of **Xi** to **seedval**. The lower order 16 bits are set to **0x330E**. - -## srandom\(\) - -``` -void srandom (unsigned int seed) -``` - - **Description:** - -Initializes a random number generator. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
seedIndicates the seed for generating a pseudo-random number.
- -## stpcpy\(\) - -``` -char* stpcpy (char * dest, const char * src ) -``` - - **Description:** - -Copies a string. - -This function copies the source string to the destination string and returns the pointer to the terminating null byte **\\0** of the destination string. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
destIndicates the pointer to the destination string.
srcIndicates the pointer to the source string.
- -**Attention:** - -The null byte **\\0** in the source string is also copied to the destination string. The two strings cannot overlap. The destination string must be large enough to receive the copied string. You should be aware of a buffer overflow. - -**Returns:** - -Returns the pointer to the terminating null byte **\\0** of the destination string. - -## stpncpy\(\) - -``` -char* stpncpy (char * dest, const char * src, size_t n ) -``` - - **Description:** - -Copies n characters of a string. - -This function copies n characters of the source string to the destination string and returns the pointer to the terminating null byte **\\0** of the destination string. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
destIndicates the pointer to the destination string.
srcIndicates the pointer to the source string.
nIndicates the number of characters to be copied.
- -**Attention:** - -The null byte **\\0** in the source string is also copied to the destination string. The two strings cannot overlap. The destination string must be large enough to receive the copied string. You should be aware of a buffer overflow. If the length of the source string is less than **n**, this function copies the null byte **\\0** to the destination string. - -**Returns:** - -Returns the pointer to the terminating null byte **\\0** of the destination string if the operation is successful; returns the pointer to the **\(dest+n\)** position if the destination string does not end with **\\0**. - -## strcasecmp\(\) - -``` -int strcasecmp (const char * _l, const char * _r ) -``` - - **Description:** - -Compares two strings \(string 1 and string 2\), regardless of the letter case. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
_lIndicates the pointer to string 1 for comparison.
_rIndicates the pointer to string 2 for comparison.
- -**Returns:** - -Returns **0** if the two strings are equal; returns a value greater than **0** if **\_l** is greater than **\_r**; returns a value less than **0** if **\_l** is less than **\_r**. - -## strcasestr\(\) - -``` -char* strcasestr (const char * haystack, const char * needle ) -``` - - **Description:** - -Searches for a needle string in its haystack string and returns a pointer. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
haystackIndicates the pointer to the haystack string.
needleIndicates the pointer to the needle string.
- -**Attention:** - -The case difference is ignored during comparison. - -**Returns:** - -Returns the pointer to the beginning of the first needle string found in the haystack string if the operation is successful; returns **NULL** if the needle string is not found in the haystack string. - -## strcat\(\) - -``` -char* strcat (char * dest, const char * src ) -``` - - **Description:** - -Appends a string to another one. - -This function appends the source string to the destination string. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
destIndicates the pointer to the destination string.
srcIndicates the pointer to the source string.
- -**Attention:** - -The null byte **\\0** of the destination string will be overwritten by the first byte of the source string. The destination string must have enough space for data storage. Otherwise, a buffer overflow may occur. If the destination string is not large enough, the program behavior will be unpredictable, and buffer overflows are the favorite choice for attacking secure programs. - -**Returns:** - -Returns the pointer to the destination string. - -## strchr\(\) - -``` -char* strchr (const char * s, int c ) -``` - - **Description:** - -Locates the first occurrence of a character in a string. - - - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sIndicates the pointer to the string to be searched.
cIndicates the character to be searched for.
- -**Returns:** - -Returns the pointer to the position that the character appears for the first time in the string if the operation is successful; returns **NULL** if the character is not found in the string. - -## strcmp\(\) - -``` -int strcmp (const char * s1, const char * s2 ) -``` - - **Description:** - -Compares two strings by characters. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
s1Indicates the pointer to string 1 for comparison.
s2Indicates the pointer to string 2 for comparison.
- -**Attention:** - -The two strings are compared based on the ASCII code. - -**Returns:** - -Returns **0** if the operation is successful \(the two strings are the same\); returns the result of the ASCII character of string 1 minus the ASCII character of string 2 if the first pair of characters is at different positions in string 1 and string 2. - -## strcoll\(\) - -``` -int strcoll (const char * s1, const char * s2 ) -``` - - **Description:** - -Compares two strings by character for the program's current locale. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
s1Indicates the pointer to string 1 for comparison.
s2Indicates the pointer to string 2 for comparison.
- -**Attention:** - -By default, the program's current locale specified by **LC\_COLLATE** is POSIX or C. - -**Returns:** - -Returns **0** if the operation is successful \(the two strings are the same\); returns an integer less than **0** if the value of a character in string 1 is less than the value of the corresponding character in string 2 when the first unmatched character appears; returns an integer greater than **0** if the value of a character in string 1 is greater than the value of the corresponding character in string 2 when the first unmatched character appears. - -## strcoll\_l\(\) - -``` -int strcoll_l (const char * s1, const char * s2, locale_t locale ) -``` - - **Description:** - -Compares two strings by character for the specified locale. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
s1Indicates the pointer to string 1 for comparison.
s2Indicates the pointer to string 2 for comparison.
localeIndicates the locale. This parameter is ignored currently
- -**Returns:** - -Returns **0** if the operation is successful \(the two strings are the same\); returns an integer less than **0** if the value of a character in string 1 is less than the value of the corresponding character in string 2 when the first unmatched character appears; returns an integer greater than **0** if the value of a character in string 1 is greater than the value of the corresponding character in string 2 when the first unmatched character appears. - -## strcpy\(\) - -``` -char* strcpy (char * dest, const char * src ) -``` - - **Description:** - -Copies a string. - -This function copies the source string pointed to by **s** to the destination string pointed to by **s** and returns the pointer to the destination string. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
destIndicates the pointer to the destination string.
srcIndicates the pointer to the source string.
- -**Attention:** - -The terminating null byte **\\0** in the source string is also copied to the destination string. The two strings cannot overlap. The destination string must be large enough to receive the copied string. You should be aware of a buffer overflow. - -**Returns:** - -Returns the pointer to the destination string. - -## strcspn\(\) - -``` -size_t strcspn (const char * s, const char * reject ) -``` - - **Description:** - -Obtains the length of the initial segment of a string that contains characters not in reject. - -This function is used to determine whether the characters in the string pointed to by **s** are in the string pointed to by **reject**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sIndicates the pointer to the string to be retrieved.
rejectIndicates the pointer to the string containing all unmatched characters.
- -**Returns:** - -Returns the total number of consecutive unmatched characters in the initial segment of the string pointed to by **s** if the operation is successful; returns the length of the string pointed to by **s** if its characters cannot be found in the string pointed to by **reject**. - -## strdup\(\) - -``` -char* strdup (const char * s) -``` - - **Description:** - -Copies a string to a new position. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sIndicates the pointer to the string to be copied.
- -**Attention:** - -The memory space is dynamically allocated in the function. Therefore, when the returned string is not required, the allocated memory space needs to be released. Otherwise, memory leakage occurs. - -**Returns:** - -Returns the pointer to the memory space holding the copied string if the operation is successful; returns **NULL** if the memory space for the copied string is insufficient. - -## strerror\(\) - -``` -char* strerror (int errnum) -``` - - **Description:** - -Obtains an error description string of the specified error code. - -This function queries the string representation of the error description matching the error code specified by **errnum**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
errnumIndicates the error code.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table otherwise. - - - - - - - - - - -

errno

-

description

-

EINVAL

-

errnum is invalid.

-
- -## strerror\_l\(\) - -``` -char* strerror_l (int errnum, locale_t locale ) -``` - - **Description:** - -Obtains an error description string of the specified error code for the specified locale. - -This function queries the string representation of the error description matching the error code specified by **errnum**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
errnumIndicates the error code.
localeIndicates the locale. This parameter is ignored currently.
- -**Returns:** - -Returns the appropriate error description string if the operation is successful; returns **NULL** and sets **errno** to a value in the following table otherwise. - - - - - - - - - - - - - -

errno

-

description

-

EINVAL

-

errnum is invalid.

-

ERANGE

-

The buffer is insufficient to contain the error description string.

-
- -## strerror\_r\(\) - -``` -char* strerror_r (int errnum, char * buf, size_t buflen ) -``` - - **Description:** - -Obtains an error description string of the specified error code. - -This function queries the string representation of the error description matching the error code specified by **errnum**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
errnumIndicates the error code.
bufIndicates the pointer to the buffer for storing the error description string.
buflenIndicates the length of the buf parameter.
- -**Returns:** - -Returns the appropriate error description string if the operation is successful; returns **NULL** and sets **errno** to a value in the following table otherwise. - - - - - - - - - - - - - -

errno

-

description

-

EINVAL

-

errnum is invalid.

-

ERANGE

-

The buffer is insufficient to contain the error description string.

-
- -## strlcat\(\) - -``` -size_t strlcat (char * d, const char * s, size_t n ) -``` - - **Description:** - -Appends the first **n** bytes of a string to another one. - -This function appends the first **n** bytes of the source string to the destination string. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
dIndicates the pointer to the destination string.
sIndicates the pointer to the source string.
nIndicates the number of characters to be copied from the source string.
- -**Attention:** - -The null byte **\\0** of the destination string will be overwritten by the first byte of the source string, and the source string will end with **\\0**. - -**Returns:** - -Returns **strlen\(src\)** plus **MIN\(n, strlen\(initial d\)\)**. - -## strlcpy\(\) - -``` -size_t strlcpy (char * d, const char * s, size_t n ) -``` - - **Description:** - -Copies a string. - -This function copies n bytes of the source string pointed to by **s** to the destination string pointed to by **d**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
dIndicates the pointer to the destination string.
sIndicates the pointer to the source string.
nIndicates the number of characters to be copied from the source string.
- -**Attention:** - -If the value of **n** is the same as the length of the destination string, the last character of the destination string will be **\\0**. - -**Returns:** - -Returns the length of the source string, excluding the null byte **\\0**. - -## strlen\(\) - -``` -size_t strlen (const char * s) -``` - - **Description:** - -Calculates the length of a string. - -The length of a string does not include the terminating null byte **\\0** of the string. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sIndicates the pointer to the string.
- -**Returns:** - -Returns the string length. - -## strncasecmp\(\) - -``` -int strncasecmp (const char * _l, const char * _r, size_t n ) -``` - - **Description:** - -Compares a specified length of two strings \(string 1 and string 2\), regardless of the letter case. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
_lIndicates the pointer to string 1 for comparison.
_rIndicates the pointer to string 2 for comparison.
nIndicates the string length to be compared.
- -**Returns:** - -Returns **0** if the two strings are equal; returns a value greater than **0** if **\_l** is greater than **\_r**; returns a value less than **0** if **\_l** is less than **\_r**. - -## strncat\(\) - -``` -char* strncat (char * dest, const char * src, size_t n ) -``` - - **Description:** - -Appends the first **n** bytes of a string to another one. - -This function appends the first **n** bytes of the source string to the destination string. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
destIndicates the pointer to the destination string.
srcIndicates the pointer to the source string.
nIndicates the number of bytes to be appended.
- -**Attention:** - -The null byte **\\0** of the destination string will be overwritten by the first byte of the source string. The destination string must have enough space for data storage. Otherwise, a buffer overflow may occur. If the destination string is not large enough, the program behavior will be unpredictable, and buffer overflows are the favorite choice for attacking secure programs. - -**Returns:** - -Returns the pointer to the destination string. - -## strncmp\(\) - -``` -int strncmp (const char * s1, const char * s2, size_t n ) -``` - - **Description:** - -Compares the first n characters of two strings. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
s1Indicates the pointer to string 1 for comparison.
s2Indicates the pointer to string 2 for comparison.
nIndicates the number of characters for comparison.
- -**Attention:** - -The two strings are compared based on the ASCII code. - -**Returns:** - -Returns **0** if the operation is successful \(the first n characters of the two strings are the same\); returns the result of the ASCII character of string 1 minus the ASCII character of string 2 if the first pair of characters is at different positions in string 1 and string 2. - -## strncpy\(\) - -``` -char* strncpy (char * dest, const char * src, size_t n ) -``` - - **Description:** - -Copies **n** characters of a string. - -This function copies **n** bytes of the source string pointed to by **src** to the destination string pointed to by **dest** and returns the pointer to the destination string. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
destIndicates the pointer to the destination string.
srcIndicates the pointer to the source string.
nIndicates the number of characters to be copied from the source string.
- -**Attention:** - -The null byte **\\0** in the source string is also copied to the destination string. The two strings cannot overlap. The destination string must be large enough to receive the copied string. You should be aware of a buffer overflow. If the length of the source string is less than **n**, this function copies the null byte **\\0** to the destination string. - -**Returns:** - -Returns the pointer to the destination string. - -## strndup\(\) - -``` -char* strndup (const char * s, size_t n ) -``` - - **Description:** - -Copies n characters of a string to a new position. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sIndicates the pointer to the string to be copied.
nIndicates the total number of characters to be copied.
- -**Attention:** - -The memory space is dynamically allocated in the function. Therefore, when the returned string is not required, the allocated memory space needs to be released. Otherwise, memory leakage occurs. If the string is longer than **n**, only **n-1** characters are copied and a terminating null byte **\\0** is added. - -**Returns:** - -Returns the pointer to the memory space holding the copied string if the operation is successful; returns **NULL** if the memory space for the copied string is insufficient. - -## strnlen\(\) - -``` -size_t strnlen (const char * s, size_t maxlen ) -``` - - **Description:** - -Calculates the length of a string. - -The actual length of a string does not include the terminating null byte **\\0** of the string. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sIndicates the pointer to the string.
maxlenIndicates the maximum length of the string.
- -**Returns:** - -Returns the actual length of the string if it is less than the maximum length specified by **maxlen**; returns the value of **maxlen** if the actual length is greater than the maximum length specified by **maxlen**. - -## strpbrk\(\) - -``` -char* strpbrk (const char * s, const char * accept ) -``` - - **Description:** - -Searches for any of a set of characters in a string. - -This function is used to determine whether the characters in the string pointed to by **s** are in the string pointed to by **accept**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sIndicates the pointer to the string to be searched.
acceptIndicates the pointer to the string containing all matched characters.
- -**Returns:** - -Returns the pointer to a character in the string pointed to by **s** that first matches one of the characters in the string pointed to by **accept** if the operation is successful; returns **NULL** if no characters are found in the string pointed to by **accept**. - -## strrchr\(\) - -``` -char* strrchr (const char * s, int c ) -``` - - **Description:** - -Locates the last occurrence of a character in a string. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sIndicates the pointer to the string to be searched.
cIndicates the character to be searched for.
- -**Returns:** - -Returns the pointer to the position that the character appears for the last time in the string if the operation is successful; returns **NULL** if the character is not found in the string. - -## strsep\(\) - -``` -char* strsep (char ** stringp, const char * delim ) -``` - - **Description:** - -Separates a string into a series of tokens separated by a delimiter. - -The function starts from **\*stringp** and checks whether the string matches a character in the string representing the delimiter. This operation is terminated by overwriting the delimiter with a null byte **\\0**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
stringpIndicates the pointer to the first token of the source string.
delimIndicates the pointer to the string representing the delimiter.
- -**Returns:** - -Returns the pointer to the first token; returns **NULL** if **\*stringp** is **NULL** or the delimiter is not found in the source string. - -## strsignal\(\) - -``` -char* strsignal (int sig) -``` - - **Description:** - -Returns a string describing the signal number. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sigIndicates the signal number to be parsed.
- -**Returns:** - -Returns the signal description associated with the specified signal number if the operation is successful; returns **NULL** or an unknown signal message for an invalid signal number if the operation fails. - -## strspn\(\) - -``` -size_t strspn (const char * s, const char * accept ) -``` - - **Description:** - -Obtains the length of the initial segment of a string that contains characters in accept. - -This function is used to determine whether the characters in the string pointed to by **s** are in the string pointed to by **accept**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sIndicates the pointer to the string to be retrieved.
acceptIndicates the pointer to the string containing all matched characters.
- -**Returns:** - -Returns the total number of consecutive matched characters in the initial segment of the string pointed to by **s** if the operation is successful; returns **0** if its characters cannot be found in the string pointed to by **accept**. - -## strstr\(\) - -``` -char* strstr (const char * haystack, const char * needle ) -``` - - **Description:** - -Searches for a needle string in its haystack string. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
haystackIndicates the pointer to the haystack string.
needleIndicates the pointer to the needle string.
- -**Attention:** - -The null byte **\\0** in the needle string is not searched for. - -**Returns:** - -Returns the pointer to the first occurrence of the needle string in the haystack string if the operation is successful; returns **NULL** if the needle string is not found in the haystack string. - -## strtod\(\) - -``` -double strtod (const char * nptr, char ** endptr ) -``` - - **Description:** - -Converts a string to **double**. - -This function skips the space characters, starts the conversion at a digit or a positive or negative sign, and ends at a non-digit or the terminating null byte **'\\0'**. If the value of **endptr** is not **NULL**, the pointer to the character in **nptr** where the conversion is terminated due to an invalid condition is stored in **endptr**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
nptrIndicates the input string.
endptrIndicates the double pointer to the first unrecognized character.
- -**Returns:** - -Returns the converted value. - -## strtof\(\) - -``` -float strtof (const char * nptr, char ** endptr ) -``` - - **Description:** - -Converts an input string to a floating-point number. - -This function skips the space characters, starts the conversion at a digit or a positive or negative sign, and ends at a non-digit or the terminating null byte **'\\0'**. If the value of **endptr** is not **NULL**, the pointer to the character in **nptr** where the conversion is terminated due to an invalid condition is stored in **endptr**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
nptrIndicates the input string.
endptrIndicates the double pointer to the first unrecognized character.
- -**Returns:** - -Returns the converted value if the operation is successful. - -## strtoimax\(\) - -``` -intmax_t strtoimax (const char * str, char ** endptr, int base ) -``` - - **Description:** - -Parses a string to a value of the **intmax\_t** type. - -This function is used to convert the string pointed to by **str** to a value of the **intmax\_t** type. If **endptr** is not a null pointer, the function also sets the value of **endptr** to point to the first character following the integer. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
strIndicates the pointer to the string to parse.
endptrIndicates the double pointer to the first character following the integer obtained from str.
baseIndicates the conversion of number system. The common types are 2, 8, 10, and 16, which indicate binary, octal, decimal, and hexadecimal, respectively.
- -**Attention:** - -This function discards as many spaces as possible until the first non-space character is found. - -**Returns:** - -Returns a floating-point number if the operation is successful; returns **0** if no conversion was performed; returns the positive or negative value of [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) and sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca) if the value falls out of the floating-point number range. - -## strtok\(\) - -``` -char* strtok (char * str, const char * delim ) -``` - - **Description:** - -Separates a string into a series of tokens separated by a delimiter. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
strIndicates the pointer to the first token in the string to be separated. This parameter is set to NULL in subsequent calls to this function.
delimIndicates the pointer to the delimiter used to separate tokens.
- -**Attention:** - -In each call of this function, the string is separated only once. You can call this function multiple times to separate the string into a set of tokens. - -**Returns:** - -Returns the pointer to the first token in the string if the operation is successful; returns **NULL** if no more tokens. - -## strtok\_r\(\) - -``` -char* strtok_r (char * str, const char * delim, char ** saveptr ) -``` - - **Description:** - -Separates a string into a series of tokens separated by a delimiter, with the **saveptr** parameter specified. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
strIndicates the pointer to the first token in the string to be separated. This parameter is set to NULL in subsequent calls to this function.
delimIndicates the pointer to the delimiter used to separate tokens.
saveptrIndicates the double pointer to the char * variable.
- -**Attention:** - -In each call of this function, the string is separated only once. You can call this function multiple times to separate the string into a set of tokens. **saveptr** is specified to maintain context between successive calls that parse the same string. - -**Returns:** - -Returns the pointer to the first token in the string if the operation is successful; returns **NULL** if no more tokens. - -## strtol\(\) - -``` -long strtol (const char * nptr, char ** endptr, int base ) -``` - - **Description:** - -Converts a string to a long integer according to the given **base**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
nptrIndicates the input string.
endptrIndicates the first character that is unrecognized.
baseIndicates the number system.
- -**Attention:** - -The value of **base** ranges from **2** to **36**. If the value of **base** is **0**, the decimal format is used for conversion. Otherwise, the hexadecimal format is used, or the octal format is used if the next character is **0** instead of **0x**. - -**Returns:** - -Returns the converted value. - -## strtold\(\) - -``` -long double strtold (const char * nptr, char ** endptr ) -``` - - **Description:** - -Converts a string to **long double**. - -This function skips the space characters, starts the conversion at a digit or a positive or negative sign, and ends at a non-digit or the terminating null byte **'\\0'**. If the value of **endptr** is not **NULL**, the pointer to the character in **nptr** where the conversion is terminated due to an invalid condition is stored in **endptr**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
nptrIndicates the input string.
endptrIndicates the double pointer to the first unrecognized character.
- -**Returns:** - -Returns the converted value. - -## strtoll\(\) - -``` -long long strtoll (const char * nptr, char ** endptr, int base ) -``` - - **Description:** - -Converts a string to a long long integer according to the given **base**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
nptrIndicates the input string.
endptrIndicates the first character that is unrecognized.
baseIndicates the number system.
- -**Attention:** - -The value of **base** ranges from **2** to **36**. If the value of **base** is **0**, the decimal format is used for conversion. Otherwise, the hexadecimal format is used, or the octal format is used if the next character is **0** instead of **0x**. - -**Returns:** - -Returns the converted value. - -## strtoul\(\) - -``` -unsigned long strtoul (const char * nptr, char ** endptr, int base ) -``` - - **Description:** - -Converts a string to an unsigned long integer according to the given **base**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
nptrIndicates the input string.
endptrIndicates the first character that is unrecognized.
baseIndicates the number system.
- -**Attention:** - -The value of **base** ranges from **2** to **36**. If the value of **base** is **0**, the decimal format is used for conversion. Otherwise, the hexadecimal format is used, or the octal format is used if the next character is **0** instead of **0x**. - -**Returns:** - -Returns the converted value. - -## strtoull\(\) - -``` -unsigned long long strtoull (const char * nptr, char ** endptr, int base ) -``` - - **Description:** - -Converts a string to an unsigned long long integer according to the given **base**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
nptrIndicates the input string.
endptrIndicates the first character that is unrecognized.
baseIndicates the number system.
- -**Attention:** - -The value of **base** ranges from **2** to **36**. If the value of **base** is **0**, the decimal format is used for conversion. Otherwise, the hexadecimal format is used, or the octal format is used if the next character is **0** instead of **0x**. - -**Returns:** - -Returns the converted value. - -## strtoumax\(\) - -``` -uintmax_t strtoumax (const char * str, char ** endptr, int base ) -``` - - **Description:** - -Parses a string to a value of the **uintmax\_t** type. - -This function is used to convert the string pointed to by **str** to a value of the **uintmax\_t** type. If **endptr** is not a null pointer, the function also sets the value of **endptr** to point to the first character following the integer. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
strIndicates the pointer to the string to parse.
endptrIndicates the double pointer to the first character following the integer obtained from str.
baseIndicates the conversion of number system.
- -**Attention:** - -This function discards as many spaces as possible until the first non-space character is found. - -**Returns:** - -Returns a floating-point number if the operation is successful; returns **0** if no conversion was performed; returns the positive or negative value of [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) and sets **errno** to **ERANGE** if the value falls out of the floating-point number range; returns a value that is not greater than the smallest positive normalized number if the correct value causes an overflow. - -## strverscmp\(\) - -``` -int strverscmp (const char * s1, const char * s2 ) -``` - - **Description:** - -Compares strings of two versions \(string 1 and string 2\) and returns the comparison result. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
s1Indicates the pointer to string 1 for comparison.
s2Indicates the pointer to string 2 for comparison.
- -**Attention:** - -[strcmp](UTILS.md#ga11bd144d7d44914099a3aeddf1c8567d) compares two strings based on the lexicographic order, while this function compares two strings based on the locale specified by [LC\_COLLATE](IO.md#gaab9cf7b1a206fb75e5884934c8d676db). - -**Returns:** - -Returns any of the following values: Assuming that a difference is found at the xth character, - - - - - - - - - - - - - -

Input

-

Return Value

-

The value for s1[x] is equal to that for s2[x].

-

The difference between the values

-

The values for the first n characters of string 1 and string 2 are the same.

-

0

-
- -## strxfrm\(\) - -``` -size_t strxfrm (char * dest, const char * src, size_t n ) -``` - - **Description:** - -Converts the first n characters of the source string pointed to by **src** based on the program's current locale specified by [LC\_COLLATE](IO.md#gaab9cf7b1a206fb75e5884934c8d676db), and places them in the destination string pointed to by **dest**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
destIndicates the pointer to the destination string.
srcIndicates the pointer to the source string.
nIndicates the maximum string space.
- -**Attention:** - -If the return value is greater than or equal to **n**, the content of the destination string is uncertain. - -**Returns:** - -Returns the number of bytes in the destination string \(excluding the terminating null byte **‘\\0’**\). - -## swab\(\) - -``` -void swab (const void * from, void * to, ssize_t n ) -``` - - **Description:** - -Swaps bytes. - -This function is used to copy n bytes from the **from** array to the **to** array, exchanging adjacent even and odd bytes. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
fromsource array.
todestination array.
nnumber of bytes.
- -## swprintf\(\) - -``` -int swprintf (wchar_t * wcs, size_t maxlen, const wchar_t * format, ... ) -``` - - **Description:** - -Prints formatted data to a specified string. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
wcsIndicates the pointer to the destination string.
maxlenIndicates the maximum length of the destination string.
formatIndicates the pointer to the format string that contains the formatted data.
....Indicates the variable arguments written to the formatted data.
- -**Attention:** - -A maximum of **maxlen-1** valid characters can be printed to the destination string. - -**Returns:** - -Returns the number of formatted characters \(excluding the terminating null character **'\\0'**\) if the operation is successful; returns **-1** if the operation fails. - -## swscanf\(\) - -``` -int swscanf (const wchar_t * ws, const wchar_t * format, ... ) -``` - - **Description:** - -Reads data from a wide character string pointed to by **ws** and stores it based on the wide string format into the locations pointed to by the variable arguments. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
wsIndicates the pointer to the wide character string to read.
formatIndicates the pointer to the format string that contains the formatted data.
....Indicates the variable arguments specifying the data to store.
- -**Attention:** - -An asterisk \( \* \) right after the percent symbol \(such as **%\*d** and **%\*s**\) in the format denotes that the value for the format will be read but will not be stored into a variable. - -**Returns:** - -Returns the number of fields successfully assigned to the argument list if the operation is successful; returns **0** if no fields are assigned; returns **EOF** if a reading error occurs or the end-of-file is reached during data reading. - -## tdelete\(\) - -``` -void* tdelete (const void * key, void ** rootp, int(*)(const void *, const void *) compar ) -``` - - **Description:** - -Deletes a key from the binary tree. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the pointer to the key to be deleted.
rootpIndicates the pointer to the root node of the tree. If the tree is empty, the value of this parameter should be NULL.
comparIndicates the judgment function for searching for a key in the tree.
- -**Returns:** - -Returns the parent pointer to the deleted key if the operation is successful; returns **NULL** if the operation fails. - -## tdestroy\(\) - -``` -void tdestroy (void * root, void(*)(void *nodep) free_node ) -``` - - **Description:** - -Releases all nodes in the binary tree. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
rootIndicates the pointer to the root node of the binary tree to be released.
free_nodeIndicates the callback function each time when a node is released.
- -## tfind\(\) - -``` -void* tfind (const void * key, void *const * rootp, int(*)(const void *, const void *) compar ) -``` - - **Description:** - -Searches for a key in the binary tree. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the pointer to the key to be searched.
rootpIndicates the pointer to the root node of the tree. If the tree is empty, the value of this parameter should be NULL.
comparIndicates the judgment function for searching for a key in the tree.
- -**Returns:** - -Returns the parent pointer to the deleted key if the operation is successful; returns **NULL** if the operation fails. - -## toascii\(\) - -``` -int toascii (int c) -``` - - **Description:** - -Converts a parameter of the integer type to an ASCII code. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
cIndicates the parameter to convert.
- -**Attention:** - -The function clears all but the lower seven bits of **c**. - -**Returns:** - -Returns the ASCII code if the conversion is successful. - -## tolower\(\) - -``` -int tolower (int c) -``` - - **Description:** - -Converts an uppercase letter specified by **c** to its lowercase equivalent. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
cIndicates the parameter to convert.
- -**Returns:** - -Returns the converted letter if the conversion is successful; returns **c** otherwise. - -## tolower\_l\(\) - -``` -int tolower_l (int c, locale_t locale ) -``` - - **Description:** - -Converts an upper letter specified by **c** to its lowercase equivalent for the specified locale. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
cIndicates the parameter to convert.
localeIndicates the locale. This parameter is ignored currently.
- -**Returns:** - -Returns the converted value if the conversion is successful; returns **c** unchanged otherwise. - -## toupper\(\) - -``` -int toupper (int c) -``` - - **Description:** - -Converts a lowercase letter specified by **c** to its uppercase equivalent. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
cIndicates the parameter to convert.
- -**Returns:** - -Returns the converted letter if the conversion is successful; returns **c** otherwise. - -## toupper\_l\(\) - -``` -int toupper_l (int c, locale_t locale ) -``` - - **Description:** - -Converts a lowercase letter specified by **c** to its uppercase equivalent for the specified locale. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
cIndicates the parameter to convert.
localeIndicates the locale. This parameter is ignored currently.
- -**Returns:** - -Returns the converted value if the conversion is successful; returns **c** unchanged otherwise. - -## towctrans\(\) - -``` -wint_t towctrans (wint_t wc, [wctrans_t](UTILS.md#ga10b40cc6ecda73a91162017d2df251a3) desc ) -``` - - **Description:** - -Translates the type of a wide character based on the conversion mapping relationship. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
wcIndicates the wide character.
descIndicates the mapping relationship, which can be obtained from wctrans().
- -**Returns:** - -Returns the translated wide character if the operation is successful; returns **WEOF** if **wc** is **WEOF**. - -## towctrans\_l\(\) - -``` -wint_t towctrans_l (wint_t wc, [wctype_t](UTILS.md#gaf3296ec762e8e6a66c8dd4bd7cf017fb) desc, locale_t locale ) -``` - - **Description:** - -Translates the type of a wide character based on the translation mapping relationship for the specified locale. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
wcIndicates the wide character.
descIndicates the mapping relationship, which can be obtained from wctrans_l().
localeIndicates the locale. This parameter is ignored currently.
- -**Returns:** - -Returns the translated wide character if the operation is successful; returns **WEOF** if **wc** is **WEOF**. - -## towlower\(\) - -``` -wint_t towlower (wint_t wc) -``` - - **Description:** - -Converts an uppercase wide character to lowercase. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
wcIndicates the wide character.
- -**Returns:** - -Returns the lowercase wide character if the conversion is successful; returns **wc** unchanged otherwise. - -## towlower\_l\(\) - -``` -wint_t towlower_l (wint_t wc, locale_t locale ) -``` - - **Description:** - -Converts an uppercase wide character to lowercase for the specified locale. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
wcIndicates the wide character.
localeIndicates the locale. This parameter is ignored currently.
- -**Returns:** - -Returns the lowercase wide character if the conversion is successful; returns **wc** unchanged otherwise. **1.0 1.0 ** - -## towupper\(\) - -``` -wint_t towupper (wint_t wc) -``` - - **Description:** - -Converts a lowercase wide character to uppercase. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
wcIndicates the wide character.
- -**Returns:** - -Returns the uppercase wide character if the conversion is successful; returns **wc** unchanged otherwise. - -## towupper\_l\(\) - -``` -wint_t towupper_l (wint_t wc, locale_t locale ) -``` - - **Description:** - -Converts a lowercase wide character to uppercase for the specified locale. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
wcIndicates the wide character.
localeIndicates the locale. This parameter is ignored currently.
- -**Returns:** - -Returns the uppercase wide character if the conversion is successful; returns **wc** unchanged otherwise. **1.0 1.0 ** - -## truncate\(\) - -``` -int truncate (const char * path, off_t length ) -``` - - **Description:** - -Truncates a file to a specified size based on the file path. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
pathIndicates the path of the file to be truncated.
lengthIndicates the length of the file to be truncated.
- -**Attention:** - -This function can be used only in the FAT file system. - -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EACCES

-

The file has no write permission.

-

EBADF

-

Failed to open the file in the specified path.

-

ENAMETOOLONG

-

Failed to open the file because the length of path is greater than PATH_MAX.

-

ENOMEM

-

Insufficient memory.

-

EPERM

-

Failed to obtain the file structure corresponding to the file descriptor when opening the file.

-

EMFILE

-

Failed to open the file because the maximum number of files that can be opened has been reached.

-

EINVAL

-

The target length is less than 0.

-

EPERM

-

Failed to obtain the file structure corresponding to the file specified by path, or the file access is rejected.

-
- -## tsearch\(\) - -``` -void* tsearch (const void * key, void *const * rootp, int(*)(const void *, const void *) compar ) -``` - - **Description:** - -Searches for a key in the binary tree and adds a key to the tree if the key is not found. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
keyIndicates the pointer to the key to be searched.
rootpIndicates the pointer to the root node of the tree. If the tree is empty, the value of this parameter should be NULL.
comparIndicates the judgment function for searching for a key in the tree.
- -## twalk\(\) - -``` -void twalk (const void * root, void(*)(const void *nodep, VISIT which, int depth) action ) -``` - - **Description:** - -Traverses a binary tree from left to right. - -**root ** points to the start node for the traversal. If the node is not the root, only part of the tree will be visited. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
rootIndicates the pointer to the start node to be searched.
actionIndicates the running function for each node access.
nodepIndicates the pointer to the node to be accessed.
whichIndicates the value sequence, which is preorder, inorder, postorder, and leaf. For details, see VISIT.
depthIndicates the depth of the node.
- -## ualarm\(\) - -``` -unsigned ualarm (unsigned value, unsigned interval ) -``` - - **Description:** - -Sets a microsecond-level timer. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
valueIndicates the number of microseconds to be set for the timer. The precision unit is tick, and the deviation is ±1 tick.
intervalIndicates the interval for triggering the timer. The precision unit is tick, and the deviation is ±1 tick.
- -**Returns:** - -Returns the remaining microseconds of the previous timer if the operation is successful; returns **0** if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Incorrect input parameter.

-
- -## uname\(\) - -``` -int uname (struct utsname * buf) -``` - - **Description:** - -Obtains the system information. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
bufIndicates the pointer to the utsname structure, which stores the obtained system information.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to the value in the following table otherwise. - - - - - - - - - - -

errno

-

description

-

EFAULT

-

The buf parameter is invalid.

-
- -## ungetwc\(\) - -``` -wint_t ungetwc (wint_t ch, [FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * stream ) -``` - - **Description:** - -Pushes a character back into a specified file stream. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
chIndicates the character to push back.
streamIndicates the pointer to the file object that identifies a stream.
- -**Attention:** - -If you call this function multiple times without any character inserting or reading operation or file stream repositioning, the calls will fail. - -**Returns:** - -Returns **ch** if the operation is successful; returns **EOF** otherwise. - -## unlink\(\) - -``` -int unlink (const char * path) -``` - - **Description:** - -Deletes a specified file. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
pathIndicates the path of the file to be deleted.
- -**Attention:** - -This function can NOT be used in the PROC file system. - -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

path is a null pointer or an empty string.

-

ENAMETOOLONG

-

The length of the path name is greater than NAME_MAX.

-

ENOMEM

-

Insufficient memory.

-

ENOENT

-

The file does not exist.

-

ENOTEMPTY

-

The path is a pseudo file used as a directory, or the directory is not empty.

-

EISDIR

-

The specified path is a directory.

-

ENXIO

-

No such device or address.

-

EACCES

-

The search permission on the path prefix component is denied, or the write permission of the directory in the path is denied.

-
- -## unlinkat\(\) - -``` -int unlinkat (int fd, const char * path, int flag ) -``` - - **Description:** - -Deletes a specified file. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
fdIndicates the descriptor of the directory where the file to be deleted is located. Currently, this parameter can only be set to AT_FDCWD.
pathIndicates the path of the file to be deleted. This parameter must be set to an absolute path.
flagIndicates the operation flag. The value can only be 0 (deleting a file) or AT_REMOVEDIR (deleting a directory, equivalent to rmdir). If this parameter is set to other values, the function will fail.
- -**Attention:** - -This function can NOT be used in the PROC file system. - - This function does not support relative paths. - -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

path is a null pointer or an empty string.

-

ENAMETOOLONG

-

The length of the path name is greater than NAME_MAX.

-

ENOMEM

-

Insufficient memory.

-

ENOENT

-

The file does not exist.

-

ENOTEMPTY

-

The path is a pseudo file used as a directory, or the directory is not empty.

-

EISDIR

-

The specified path is a directory.

-

ENXIO

-

No such device or address.

-

EACCES

-

The search permission on the path prefix component is denied, or the write permission of the directory in the path is denied.

-
- -## unsetenv\(\) - -``` -int unsetenv (const char * name) -``` - - **Description:** - -Deletes an environment variable. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
nameIndicates the name of environment variable to be deleted. if overwrite is zero, then the value of name remains unchanged.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails - -## usleep\(\) - -``` -int usleep (unsigned useconds) -``` - - **Description:** - -Sleeps for several microseconds. - -This function is used to suspend the current thread for the specified duration. A sleeping thread cannot be woken up by a signal. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
usecondsIndicates the sleeping time in microseconds. The precision unit is tick, and the deviation is less than 2 ticks.
- -**Returns:** - -Returns **0** if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

EINVAL

-

Incorrect input parameter.

-
- -## valloc\(\) - -``` -void* valloc (size_t size) -``` - - **Description:** - -Allocates memory with the specified size and aligns the allocated memory by page size. - -If **size** is **0**, return a unique pointer value that can later be successfully passed to [free\(\)](MEM.md#gafbedc913aa4651b3c3b4b3aecd9b4711). - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sizeIndicates the size of the memory block to be allocated.
- -**Returns:** - -Returns the pointer to the allocated memory block if the operation is successful; returns **NULL** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - -

errno

-

Description

-

ENOMEM

-

Insufficient memory.

-
- -## vfwprintf\(\) - -``` -int vfwprintf ([FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * stream, const wchar_t * format, __isoc_va_list args ) -``` - - **Description:** - -Prints formatted data from a variable argument list specified by **args** to a specified file stream. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
streamIndicates the pointer to a file object that identifies an output stream.
formatIndicates the pointer to the wide character string that may contain the format specifiers.
argsIndicates a value identifying a variable argument list initialized by using va_start.
- -**Attention:** - -This function is generally used together with [va\_start](UTILS.md#gaa0628ab596c3d7e78f5e08c2d98e24da) and [va\_end](UTILS.md#ga823b205416e9129825841b74c3bf8484) and is the wide character equivalent of the [vfprintf](IO.md#gad80f05917df38df3a5e1817498d67c26) function. - -**Returns:** - -Returns the number of written characters \(excluding the terminating null character **'\\0'**\) if the operation is successful; returns **-1** if the operation fails. - -## vfwscanf\(\) - -``` -int vfwscanf ([FILE](IO.md#ga912af5ab9f8a52ddd387b7defc0b49f1) * stream, const wchar_t * format, va_list arg ) -``` - - **Description:** - -Reads data from a specified file stream and stores it based on the wide string format into the locations pointed to by the elements in the variable argument list identified by **arg**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
streamIndicates the pointer to a file object that identifies an output stream.
formatIndicates the pointer to the wide character string that may contain the format specifiers.
argIndicates a value identifying a variable argument list initialized by using va_start.
- -**Attention:** - -This function is generally used together with [va\_start](UTILS.md#gaa0628ab596c3d7e78f5e08c2d98e24da) and [va\_end](UTILS.md#ga823b205416e9129825841b74c3bf8484) and is the wide character equivalent of the [vfscanf](IO.md#gabdd32e401e37c9d954f3f0a6907500d9) function. - -**Returns:** - -Returns the number of fields successfully assigned to the argument list if the operation is successful; returns **0** if no fields are assigned; returns **EOF** if a reading error occurs or the end-of-file is reached during data reading. If an encoding error occurs when wide characters are parsed, this function sets **errno** to [EILSEQ](UTILS.md#gac6c071293826a4e66a717bb38db7794d). - -## vswprintf\(\) - -``` -int vswprintf (wchar_t * wcs, size_t maxlen, const wchar_t * format, __isoc_va_list args ) -``` - - **Description:** - -Prints formatted data from a variable argument list specified by **args** to a specified string. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
wcsIndicates the pointer to the destination wide character string.
maxlenIndicates the maximum length of the destination wide character string.
formatIndicates the pointer to the string that may contain the format specifiers.
argsIndicates a value identifying a variable argument list initialized by using va_start.
- -**Attention:** - -The destination wide character string must end with the terminating null character **'\\0'**. This function is generally used together with [va\_start](UTILS.md#gaa0628ab596c3d7e78f5e08c2d98e24da) and [va\_end](UTILS.md#ga823b205416e9129825841b74c3bf8484) and is the wide character equivalent of the [vsnprintf](IO.md#ga2cadafbeb2d6e0d5781f6e5106d41fc2) function. - -**Returns:** - -Returns the number of written characters \(excluding the terminating null character **'\\0'**\) if the operation is successful; returns **-1** if the operation fails. - -## vswscanf\(\) - -``` -int vswscanf (const wchar_t * ws, const wchar_t * format, va_list arg ) -``` - - **Description:** - -Reads data from a string pointed to by **ws** and stores it based on the wide string format into the locations pointed to by the elements in the variable argument list identified by **arg**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
wsIndicates the pointer to the wide character string to read.
formatIndicates the pointer to the wide character string that may contain the format specifiers.
argIndicates a value identifying a variable argument list initialized by using va_start.
- -**Attention:** - -This function is generally used together with [va\_start](UTILS.md#gaa0628ab596c3d7e78f5e08c2d98e24da) and [va\_end](UTILS.md#ga823b205416e9129825841b74c3bf8484) and is the wide character equivalent of the [vsscanf](IO.md#gab1c4552aba80fe03c9b45fe27f4331ad) function. - -**Returns:** - -Returns the number of fields successfully assigned to the argument list if the operation is successful; returns **0** if no fields are assigned; returns **EOF** if a reading error occurs or the end-of-file is reached during data reading. If an encoding error occurs when wide characters are parsed, this function sets **errno** to [EILSEQ](UTILS.md#gac6c071293826a4e66a717bb38db7794d). - -## vwprintf\(\) - -``` -int vwprintf (const wchar_t * format, va_list args ) -``` - - **Description:** - -Prints formatted data from a variable argument list to the standard output \(stdout\). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
formatIndicates the pointer to the string that may contain the format specifiers.
argsIndicates a value identifying a variable argument list initialized by using va_start.
- -**Attention:** - -This function is generally used together with [va\_start](UTILS.md#gaa0628ab596c3d7e78f5e08c2d98e24da) and [va\_end](UTILS.md#ga823b205416e9129825841b74c3bf8484) and is the wide character equivalent of the [vprintf](IO.md#gaa715ef816dc040c8b367fde4ba84d6f3) function. - -**Returns:** - -Returns the total number of output characters \(excluding the terminating null character **'\\0'**\) if the operation is successful; returns a negative value otherwise. - -## vwscanf\(\) - -``` -int vwscanf (const wchar_t * format, va_list arg ) -``` - - **Description:** - -Reads data from the stdin and stores it based on the wide string format into the locations pointed to by the elements in the variable argument list identified by **arg**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
formatIndicates the pointer to the string that may contain the format specifiers.
argIndicates a value identifying a variable argument list initialized by using va_start.
- -**Attention:** - -This function is generally used together with [va\_start](UTILS.md#gaa0628ab596c3d7e78f5e08c2d98e24da) and [va\_end](UTILS.md#ga823b205416e9129825841b74c3bf8484) and is the wide character equivalent of the [vscanf](IO.md#ga40250d63904acd3e898061c9eab6ead3) function. - -**Returns:** - -Returns the number of fields successfully assigned to the argument list if the operation is successful; returns **0** if no fields are assigned; returns **EOF** if a reading error occurs or the end-of-file is reached during data reading. If an encoding error occurs when wide characters are parsed, this function sets **errno** to [EILSEQ](UTILS.md#gac6c071293826a4e66a717bb38db7794d). - -## wcpcpy\(\) - -``` -wchar_t* wcpcpy (wchar_t * dest, const wchar_t * src ) -``` - - **Description:** - -Copies the wide characters \(including the terminating null character **'\\0'**\) pointed to by **src** to the wide character array pointed to by **dest**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
destIndicates the pointer to the wide character array to copy the wide characters to.
srcIndicates the pointer to the wide characters to copy.
- -**Attention:** - -Ensure that the array pointed to by **dest** has sufficient space to hold the wide characters to be written. - -**Returns:** - -Returns the pointer to the end of the destination wide character array. - -## wcpncpy\(\) - -``` -wchar_t* wcpncpy (wchar_t * dest, const wchar_t * src, size_t n ) -``` - - **Description:** - -Copies **n** wide characters \(including the terminating null character **'\\0'**\) pointed to by **src** to the wide character array pointed to by **dest**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
destIndicates the pointer to the array to accommodate the copied wide characters.
srcIndicates the pointer to the wide character string to be copied.
nIndicates the maximum number of wide characters to be copied.
- -**Attention:** - -Ensure that the array pointed to by **dest** has sufficient space to hold the wide characters to be written. - -**Returns:** - -Returns the pointer to the end of the destination wide character array. - -## wcrtomb\(\) - -``` -size_t wcrtomb (char * s, wchar_t wc, mbstate_t * ps ) -``` - - **Description:** - -Converts the wide character specified by **wc** into a character string and stores the string to the beginning of the character array pointed to by **s**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
sIndicates the pointer to the address storing the converted string.
wcIndicates the wide character to be converted.
psIndicates the pointer to the mbstate_t object describing the conversion state.
- -**Returns:** - -Returns the number of characters written to the character string if the operation is successful; returns **-1** and sets **errno** to [EILSEQ](UTILS.md#gac6c071293826a4e66a717bb38db7794d) if the operation fails. - -## wcscasecmp\(\) - -``` -int wcscasecmp (const wchar_t * s1, const wchar_t * s2 ) -``` - - **Description:** - -Compares the wide characters in the string pointed to by **s1** with those in the string pointed to by **s2**, with their case differences ignored. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
s1Indicates the pointer to wide character string 1 for comparison.
s2Indicates the pointer to wide character string 2 for comparison.
- -**Returns:** - -Returns **0** if the two wide character strings are equal; returns the code difference between the two wide character strings if they are not equal. - -## wcscasecmp\_l\(\) - -``` -int wcscasecmp_l (const wchar_t * s1, const wchar_t * s2, locale_t locale ) -``` - - **Description:** - -Compares the wide characters in the string pointed to by **s1** with those in the string pointed to by **s2** based on the specified **locale** environment, with their case differences ignored. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
s1Indicates the pointer to wide character string 1 for comparison.
s2Indicates the pointer to wide character string 2 for comparison.
localeIndicates the locale.
- -**Returns:** - -Returns **0** if the two wide character strings are equal; returns the code difference between the two wide character strings if they are not equal. - -## wcscat\(\) - -``` -wchar_t* wcscat (wchar_t * dest, const wchar_t * src ) -``` - - **Description:** - -Appends a copy of the wide characters pointed to by **src** to the end of the wide character array pointed to by **dest** and adds a terminating null character **'\\0'**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
destIndicates the pointer to the array to accommodate the concatenated wide characters.
srcIndicates the pointer to the wide characters to be concatenated.
- -**Attention:** - -Ensure that the wide character array pointed to by **dest** has enough space to accommodate the concatenated characters \([wcslen](UTILS.md#ga7859e4ba07f77515772c4632d4caa4e0) \(**dest**\) + [wcslen](UTILS.md#ga7859e4ba07f77515772c4632d4caa4e0) \(**src**\) + 1\). - -**Returns:** - -Returns the pointer to the destination string after concatenation. - -## wcschr\(\) - -``` -wchar_t* wcschr (const wchar_t * wcs, wchar_t wc ) -``` - - **Description:** - -Locates the first occurrence of the wide character pointed to by **wc** in the wide character string pointed to by **wcs**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
wcsIndicates the pointer to the wide character string to match the specified wide character.
wcIndicates the wide character to be located.
- -**Returns:** - -Returns the pointer to the first occurrence of the wide character; returns **NULL** if no match is found in the wide character string. - -## wcscmp\(\) - -``` -int wcscmp (const wchar_t * s1, const wchar_t * s2 ) -``` - - **Description:** - -Compares each character in the string pointed to by **s1** with that in the string pointed to by **s2** in ASCII-code order. - -This comparison starts from the first character in the two strings. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
s1Indicates the pointer to string 1 for comparison.
s2Indicates the pointer to string 2 for comparison.
- -**Returns:** - -Returns **0** if the two strings are equal; returns the result of subtracting the ASCII code of string 2 from the ASCII code of string 1 if the first mismatch is found. - -## wcscoll\(\) - -``` -int wcscoll (const wchar_t * ws1, const wchar_t * ws2 ) -``` - - **Description:** - -Compares the wide characters in the string pointed to by **ws1** with those in the string pointed to by **ws2** based on the specified locale [LC\_COLLATE](IO.md#gaab9cf7b1a206fb75e5884934c8d676db). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
ws1Indicates the pointer to string 1 for comparison.
ws2Indicates the pointer to string 2 for comparison.
- -**Attention:** - -By default, the program's current locale specified by [LC\_COLLATE](IO.md#gaab9cf7b1a206fb75e5884934c8d676db) is **POSIX** or **C**. - -**Returns:** - -Returns **0** if the two strings are equal; returns the result of subtracting the ASCII code of string 2 from the ASCII code of string 1 if the first mismatch is found. - -## wcscoll\_l\(\) - -``` -int wcscoll_l (const wchar_t * s1, const wchar_t * s2, locale_t locale ) -``` - - **Description:** - -Compares wide characters in the string pointed to by **s1** with those in the string pointed to by **s2** based on the specified **locale** environment. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
s1Indicates the pointer to wide character string 1 for comparison.
s2Indicates the pointer to wide character string 2 for comparison.
localeIndicates the locale.
- -**Returns:** - -Returns **0** if the two wide character strings are equal; returns the code difference between the two wide character strings if they are not equal. - -## wcscpy\(\) - -``` -wchar_t* wcscpy (wchar_t * dest, const wchar_t * src ) -``` - - **Description:** - -Copies the wide characters pointed to by **src** to the wide character array pointed to by **dest**, including the terminating null character **'\\0'**. . - -## wcscspn\(\) - -``` -size_t wcscspn (const wchar_t * wcs, const wchar_t * accept ) -``` - - **Description:** - -Scans the wide character string pointed to by **wcs** for any wide characters specified in **reject** and obtains the number of unmatched characters in **wcs**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
wcsIndicates the pointer to the wide character string to be scanned.
acceptIndicates the pointer to the wide characters to be matched with the string.
- -**Returns:** - -Returns the number of unmatched characters in **wcs**. - -## wcsdup\(\) - -``` -wchar_t* wcsdup (const wchar_t * s) -``` - - **Description:** - -Copies a specified wide character string to a newly allocated buffer. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sIndicates the pointer to the wide character string to copy.
- -**Attention:** - -This function allocates memory for variables. It is best practice to release the memory if you do not use the returned wide character string. - -**Returns:** - -Returns the pointer to the new wide string buffer. - -## wcsftime\(\) - -``` -size_t wcsftime (wchar_t *__restrict wcs, size_t n, const wchar_t *__restrict f, const struct [tm](tm.md) *__restrict tm ) -``` - - **Description:** - -Converts the date and time in the **tm** structure to a wide character string. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
wcsIndicates the pointer to the wide character array to accommodate the converted string.
nIndicates the size of the buffer for the wide character array.
fIndicates the pointer to the required format.
tmIndicates the pointer to the broken-down time in the tm structure.
- -**Returns:** - -Returns the number of bytes in the string if the conversion is successful; returns **0** otherwise. - -## wcslen\(\) - -``` -size_t wcslen (const wchar_t * s) -``` - - **Description:** - -Calculates the length of a wide character string pointed to by **s**. - -The length does not include the terminating null character **'\\0'**. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
sIndicates the pointer to the wide character string to be calculated. This parameter cannot be NULL.
- -**Returns:** - -Returns the length of the string. - -## wcsncasecmp\(\) - -``` -int wcsncasecmp (const wchar_t * s1, const wchar_t * s2, size_t n ) -``` - - **Description:** - -Compares a maximum of **n** wide characters in the string pointed to by **s1** with those in the string pointed to by **s2**, with their case differences ignored. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
s1Indicates the pointer to wide character string 1 for comparison.
s2Indicates the pointer to wide character string 2 for comparison.
nIndicates the maximum number of wide characters to be compared.
- -**Returns:** - -Returns **0** if the two wide character strings are equal; returns the code difference between the two wide character strings if they are not equal. - -## wcsncasecmp\_l\(\) - -``` -int wcsncasecmp_l (const wchar_t * s1, const wchar_t * s2, size_t n, locale_t locale ) -``` - - **Description:** - -Compares a maximum of **n** wide characters in the string pointed to by **s1** with those in the string pointed to by **s2** based on the specified **locale** environment, with their case differences ignored. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
s1Indicates the pointer to wide character string 1 for comparison.
s2Indicates the pointer to wide character string 2 for comparison.
nIndicates the maximum number of wide characters to be compared.
localeIndicates the locale.
- -**Returns:** - -Returns **0** if the two wide character strings are equal; returns the code difference between the two wide character strings if they are not equal. - -## wcsncat\(\) - -``` -wchar_t* wcsncat (wchar_t * dest, const wchar_t * src, size_t n ) -``` - - **Description:** - -Appends a copy of the first **n** wide characters pointed to by **src** to the end of the wide characters pointed to by **dest** and adds a terminating null character **'\\0'**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
destIndicates the pointer to the array to accommodate the concatenated wide characters.
srcIndicates the pointer to the wide characters to be concatenated.
nIndicates the maximum number of wide characters to be concatenated.
- -**Attention:** - -Ensure that the wide character array pointed to by **dest** has enough space to accommodate the concatenated characters \([wcslen](UTILS.md#ga7859e4ba07f77515772c4632d4caa4e0) \(**dest**\) + **n** + 1\). - -**Returns:** - -Returns the pointer to the destination string after concatenation. - -## wcsncmp\(\) - -``` -int wcsncmp (const wchar_t * s1, const wchar_t * s2, size_t n ) -``` - - **Description:** - -Compares the first **n** characters in the string pointed to by **s1** with those in the string pointed to by **s2** in ASCII-code order. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
s1Indicates the pointer to string 1 for comparison.
s2Indicates the pointer to string 2 for comparison.
nIndicates the maximum number of characters to be compared.
- -**Attention:** - -If **n** is greater than the length of string 1 or string 2, the comparison stops when reaching the terminating null character **L'\\0'** for the first time. - -**Returns:** - -Returns **0** if the two strings are equal; returns the result of subtracting the ASCII code of string 2 from the ASCII code of string 1 if the first mismatch is found. - -## wcsncpy\(\) - -``` -wchar_t* wcsncpy (wchar_t * dest, const wchar_t * src, size_t n ) -``` - - **Description:** - -Copies the first **n** wide characters pointed to by **src** to the wide character array pointed to by **dest**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
destIndicates the pointer to the array to accommodate the copied wide characters.
srcIndicates the pointer to the wide characters to be copied.
nIndicates the maximum number of wide characters to be copied.
- -**Attention:** - -Ensure that the array pointed to by **dest** is large enough to accommodate the source characters. If the **dest** space is insufficient, unexpected exceptions may occur. Whenever a program reads data from or copies data to a buffer, it should first check whether there is enough space for the data. If the first **n** wide characters pointed to by **src** do not contain null characters, the character string copied to **dest** does not end with **null**. - -**Returns:** - -Returns the pointer to the destination string. - -## wcsnlen\(\) - -``` -size_t wcsnlen (const wchar_t * s, size_t maxlen ) -``` - - **Description:** - -Calculates the length of a wide character string pointed to by **s**. - -If the length of the string exceeds **maxlen**, **maxlen** is returned. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sIndicates the pointer to the wide character string whose length is to be calculated.
maxlenIndicates the maximum length of the string whose length is to be calculated.
- -**Attention:** - -The length of the string does not include the terminating null character **'\\0'**. - -**Returns:** - -Returns the length of the wide character string if the operation is successful; returns **maxlen** if the length of the string exceeds **maxlen**. - -## wcsnrtombs\(\) - -``` -size_t wcsnrtombs (char * dest, const wchar_t ** src, size_t nwc, size_t len, mbstate_t * ps ) -``` - - **Description:** - -Converts **nwc** wide characters in the string pointed to by **src** into a character string. - -**Parameters:** - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
destIndicates the pointer to character array to accommodate the character string.
srcIndicates the double pointer to the source wide character string to be converted.
nwcIndicates the number of wide characters to be converted.
lenIndicates the maximum number of bytes to be written to the destination string.
psIndicates the pointer to the mbstate_t object describing the conversion state.
- -**Returns:** - -Returns the number of converted bytes, excluding the terminating null byte **'\\0'** if the operation is successful; returns **-1** and sets **errno** to [EILSEQ](UTILS.md#gac6c071293826a4e66a717bb38db7794d) if the operation fails. - -## wcspbrk\(\) - -``` -wchar_t* wcspbrk (const wchar_t * wcs, const wchar_t * accept ) -``` - - **Description:** - -Scans the wide character string pointed to by **wcs** for any wide characters specified in **accept** and obtains the first occurrence of the matched character. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
wcsIndicates the pointer to the wide character string to be scanned.
acceptIndicates the pointer to the wide characters to be matched with the string.
- -**Returns:** - -Returns the pointer to the first occurrence of the matched character; returns **NULL** if no match is found. - -## wcsrchr\(\) - -``` -wchar_t* wcsrchr (const wchar_t * wcs, wchar_t wc ) -``` - - **Description:** - -Locates the last occurrence of the wide character pointed to by **wc** in the wide character string pointed to by **wcs**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
wcsIndicates the pointer to the wide character string to match the specified wide character.
wcIndicates the wide character to be located.
- -**Returns:** - -Returns the pointer to the last occurrence of the wide character; returns **NULL** if no match is found in the wide character string. - -## wcsrtombs\(\) - -``` -size_t wcsrtombs (char * dest, const wchar_t ** src, size_t len, mbstate_t * ps ) -``` - - **Description:** - -Converts a wide character string into a multi-byte string. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
destIndicates the pointer to the character string array to accommodate the multi-byte string.
srcIndicates the double pointer to the source string to be converted.
lenIndicates the maximum number of bytes to be written to the destination string array.
psIndicates the pointer to the mbstate_t object describing the conversion state.
- -**Returns:** - -Returns the number of converted bytes, excluding the terminating null byte **'\\0'** if the operation is successful; returns **-1** and sets **errno** to [EILSEQ](UTILS.md#gac6c071293826a4e66a717bb38db7794d) if the operation fails. - -## wcsspn\(\) - -``` -size_t wcsspn (const wchar_t * wcs, const wchar_t * accept ) -``` - - **Description:** - -Scans the wide character string pointed to by **wcs** for any wide characters specified in **reject** and obtains the number matched characters in **wcs**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
wcsIndicates the pointer to the wide character string to be scanned.
acceptIndicates the pointer to the wide characters to be matched with the string.
- -**Returns:** - -Returns the number of matched characters in **wcs**. - -## wcstod\(\) - -``` -double wcstod (const wchar_t * str, wchar_t ** endptr ) -``` - - **Description:** - -Converts a wide character string pointed to by **str** into a double value and assigns the next character in **str** after the double value to **endptr**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
strIndicates the pointer to the wide character string to be converted.
endptrIndicates the double pointer to the next character in str after the double value.
- -**Attention:** - -If the first character in **str** is a space, this function discards it until the first non-space character is found. - -**Returns:** - -Returns the converted value if the operation is successful. If no conversion can be performed, this function returns **0**. If the correct value is out of the range of representable values for the type, this function returns a positive or negative [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) and sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca). - -## wcstof\(\) - -``` -float wcstof (const wchar_t * str, wchar_t ** endptr ) -``` - - **Description:** - -Converts a wide character string pointed to by **str** into a floating-point value and assigns the next character in **str** after the floating-point value to **endptr**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
strIndicates the pointer to the wide character string to be converted.
endptrIndicates the double pointer to the next character in str after the floating-point value.
- -**Attention:** - -If the first character in **str** is a space, this function discards it until the first non-space character is found. - -**Returns:** - -Returns the converted value if the operation is successful. If no conversion can be performed, this function returns **0**. If the correct value is out of the range of representable values for the type, this function returns a positive or negative [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) and sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca). - -## wcstoimax\(\) - -``` -intmax_t wcstoimax (const wchar_t * str, wchar_t ** endptr, int base ) -``` - - **Description:** - -Parses a string to a value of the **intmax\_t** type. - -This function is used to convert the string pointed to by **str** to a value of the **intmax\_t** type. If **endptr** is not a null pointer, the function also sets the value of **endptr** to point to the first character following the integer. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
strIndicates the pointer to the string to parse.
endptrIndicates the double pointer to the first character following the integer obtained from str.
baseIndicates the conversion of number system.
- -**Attention:** - -This function discards as many spaces as possible until the first non-space character is found. - -**Returns:** - -Returns a floating-point number if the operation is successful; returns **0** if no conversion was performed; returns the positive or negative value of [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) and sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca) if the value falls out of the floating-point number range; returns a value that is not greater than the smallest positive normalized number if the correct value causes an overflow. - -## wcstok\(\) - -``` -wchar_t* wcstok (wchar_t * wcs, const wchar_t * delim, wchar_t ** ptr ) -``` - - **Description:** - -Splits a wide character string pointed to by **wcs** into tokens using the given delimiter. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
wcsIndicates the pointer to the first token in the wide character string to be split. This parameter is set to NULL in subsequent calls to this function.
delimIndicates the pointer to the delimiter used to split tokens.
ptrIndicates the double pointer to the rest part in the source string after splitting.
- -**Attention:** - -In each call to this function, the string is split only once. You can call this function multiple times to split the string into a set of tokens and use **ptr** to point to the rest part in the source string. - -**Returns:** - -Returns the pointer to the first token in the string if the operation is successful; returns **NULL** if no delimiter is found. - -## wcstol\(\) - -``` -long wcstol (const wchar_t * str, wchar_t ** endptr, int base ) -``` - - **Description:** - -Converts a wide character string pointed to by **str** into a long value. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
strIndicates the pointer to the wide character string to be converted.
endptrIndicates the double pointer to the next character in str after the long value.
baseIndicates the base of the converted value.
- -**Attention:** - -If the first character in **str** is a space, this function discards it until the first non-space character is found. - -**Returns:** - -Returns the converted value if the operation is successful. If no conversion can be performed, this function returns **0**. If the correct value is out of the range of representable values for the type, this function returns a positive or negative [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) and sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca). If the correct value would cause an underflow, this function returns a value no greater than the smallest normalized positive number. - -## wcstold\(\) - -``` -long double wcstold (const wchar_t * str, wchar_t ** endptr ) -``` - - **Description:** - -Converts a wide character string pointed to by **str** into a long double value and assigns the next character in **str** after the long double value to **endptr**. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
strIndicates the pointer to the wide character string to be converted.
endptrIndicates the double pointer to the next character in str after the long double value.
- -**Attention:** - -If the first character in **str** is a space, this function discards it until the first non-space character is found. - -**Returns:** - -Returns the converted value if the operation is successful. If no conversion can be performed, this function returns **0**. If the correct value is out of the range of representable values for the type, this function returns a positive or negative [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) and sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca). - -## wcstoll\(\) - -``` -long long wcstoll (const wchar_t * str, wchar_t ** endptr, int base ) -``` - - **Description:** - -Converts a wide character string pointed to by **str** into a long long value of a specified base. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
strIndicates the pointer to the wide character string to be converted.
endptrIndicates the double pointer to the next character in str after the long long value.
baseIndicates the base of the converted value.
- -**Attention:** - -This function discards as many spaces as possible until the first non-space character is found. - -**Returns:** - -Returns the converted value if the operation is successful. If no conversion can be performed, this function returns **0**. If the correct value is out of the range of representable values for the type, this function returns a positive or negative [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) and sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca). If the correct value would cause an underflow, this function returns a value no greater than the smallest normalized positive number. - -## wcstombs\(\) - -``` -size_t wcstombs (char * dest, const wchar_t * src, size_t n ) -``` - - **Description:** - -Converts a wide-character string to a multi-byte string. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
destIndicates the pointer to the destination string, which must have sufficient space, as specified by n.
srcIndicates the pointer to the wide-character string to be converted.
nIndicates the maximum number of bytes to be written to the destination string.
- -**Returns:** - -Returns the number of converted bytes, excluding the terminating null byte if the operation is successful; returns **-1** and sets **errno** to **EILSEQ** if the operation fails. - -## wcstoul\(\) - -``` -unsigned long wcstoul (const wchar_t * str, wchar_t ** endptr, int base ) -``` - - **Description:** - -Converts a wide character string pointed to by **str** into an unsigned long value of a specified base. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
strIndicates the pointer to the wide character string to be converted.
endptrIndicates the double pointer to the next character in str after the unsigned long value.
baseIndicates the base of the converted value.
- -**Attention:** - -This function discards as many spaces as possible until the first non-space character is found. - -**Returns:** - -Returns the converted value if the operation is successful. If no conversion can be performed, this function returns **0**. If the correct value is out of the range of representable values for the type, this function returns a positive or negative [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) and sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca). If the correct value would cause an underflow, this function returns a value no greater than the smallest normalized positive number. - -## wcstoull\(\) - -``` -unsigned long long wcstoull (const wchar_t * str, wchar_t ** endptr, int base ) -``` - - **Description:** - -Converts a wide character string pointed to by **str** into an unsigned long long value of a specified base. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
strIndicates the pointer to the wide character string to be converted.
endptrIndicates the double pointer to the next character in str after the unsigned long long value.
baseIndicates the base of the converted value.
- -**Attention:** - -This function discards as many spaces as possible until the first non-space character is found. - -**Returns:** - -Returns the converted value if the operation is successful. If no conversion can be performed, this function returns **0**. If the correct value is out of the range of representable values for the type, this function returns a positive or negative [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) and sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca). If the correct value would cause an underflow, this function returns a value no greater than the smallest normalized positive number. - -## wcstoumax\(\) - -``` -uintmax_t wcstoumax (const wchar_t * str, wchar_t ** endptr, int base ) -``` - - **Description:** - -Parses a string to a value of the **uintmax\_t** type. - -This function is used to convert the string pointed to by **str** to a value of the **uintmax\_t** type. If **endptr** is not a null pointer, the function also sets the value of **endptr** to point to the first character following the integer. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
strIndicates the pointer to the string to parse.
endptrIndicates the double pointer to the first character following the integer obtained from str.
baseIndicates the conversion of number system.
- -**Attention:** - -This function discards as many spaces as possible until the first non-space character is found. - -**Returns:** - -Returns a floating-point number if the operation is successful; returns **0** if no conversion was performed; returns the positive or negative value of [HUGE\_VAL](MATH.md#gaf2164b2db92d8a0ed3838ad5c28db971) and sets **errno** to [ERANGE](UTILS.md#gaa1591a4f3a86360108de5b9ba34980ca) if the value falls out of the floating-point number range; returns a value that is not greater than the smallest positive normalized number if the correct value causes an overflow. - -## wcswcs\(\) - -``` -wchar_t * wcswcs (const wchar_t * haystack, const wchar_t * needle ) -``` - - **Description:** - -Searches the wide character string pointed to by **dest** for the first occurrence of the wide character string pointed to by **src**. - -Searches for the first position of the matched wide character in a wide character string. - -This match does not include the terminating null character **'\\0'**. - -**ParametersParameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
haystackIndicates the pointer to the wide character string to be searched.
needleIndicates the pointer to the wide character string to match.
haystackIndicates the pointer to the wide character string to be searched.
needleIndicates the pointer to the wide character to be matched.
- -**Returns:** - -Returns the pointer to the first occurrence of the specified wide character string. - -**Returns:** - -Returns the pointer to the matched wide character if the operation is successful; returns **NULL** if the operation fails. - -## wcsxfrm\(\) - -``` -size_t wcsxfrm (wchar_t * s1, const wchar_t * s2, size_t n ) -``` - - **Description:** - -Compares the first **n** wide characters in the string pointed to by **s1** with those in the string pointed to by **s2**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
s1Indicates the pointer to wide character string 1 for comparison.
s2Indicates the pointer to wide character string 2 for comparison.
nIndicates the maximum number of wide characters to be compared.
- -**Returns:** - -Returns **0** if the two strings are equal; returns a positive integer if **s1** is greater than **s2**; returns a negative integer if **s1** is less than **s2**. - -## wcsxfrm\_l\(\) - -``` -size_t wcsxfrm_l (wchar_t * s1, const wchar_t * s2, size_t n, locale_t locale ) -``` - - **Description:** - -Compares the first **n** wide characters in the string pointed to by **s1** with those in the string pointed to by **s2** based on the specified **locale** environment. - -**Parameters:** - - - - - - - - - - - - - - - - - - - -

Name

-

Description

-
s1Indicates the pointer to wide character string 1 for comparison.
s2Indicates the pointer to wide character string 2 for comparison.
nIndicates the maximum number of wide characters to be compared.
localeIndicates the locale.
- -**Returns:** - -Returns **0** if the two wide character strings are equal; returns the code difference between the two wide character strings if they are not equal. - -## wctob\(\) - -``` -int wctob (wint_t c) -``` - - **Description:** - -Converts a wide character **c** into its single-byte representation. - -This function works only if the multi-byte character representation of this wide character **c** is a single-byte character in its initial state. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
cIndicates the wide character to be converted.
- -**Attention:** - -Use this function with caution. Internationalized programs should never distinguish between single-byte and multi-byte representations. - -**Returns:** - -Returns the converted single-byte representation if the operation is successful; returns **EOF** otherwise. - -## wctomb\(\) - -``` -int wctomb (char * s, wchar_t wc ) -``` - - **Description:** - -Converts a wide character to its multi-byte sequence and stores it in a character array. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
sIndicates the pointer to an array that can store multi-byte characters.
wcIndicates the wide character to be converted.
- -**Returns:** - -Returns one of the following values: - - - - - - - - - - - - - - - - -

Input

-

Return Value

-

s is not NULL.

-

The number of bytes written to the byte array.

-

wc cannot be represented as a multi-byte sequence.

-

-1.

-

s is NULL.

-

A non-zero value if the code has shift state or 0 if the code is stateless.

-
- -## wctrans\(\) - -``` -[wctrans_t](UTILS.md#ga10b40cc6ecda73a91162017d2df251a3) wctrans (const char * name) -``` - - **Description:** - -Determines a mapping which can map a wide character to another wide character. - -In the [LC\_CTYPE](IO.md#ga07c66689961056725d7f50231d740ba9) locale, the mapping is returned based on the **name** parameter. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
nameIndicates the mapping name. The value can only be tolower (converting an uppercase wide character to lowercase) or toupper (converting a lowercase wide character to uppercase).
- -**Returns:** - -Returns the mapping corresponding to **name** if the operation is successful; returns **0** otherwise. - -## wctrans\_l\(\) - -``` -[wctrans_t](UTILS.md#ga10b40cc6ecda73a91162017d2df251a3) wctrans_l (const char * name, locale_t locale ) -``` - - **Description:** - -Determines a mapping which can map a wide character to another wide character. - -In the [LC\_CTYPE](IO.md#ga07c66689961056725d7f50231d740ba9) locale, the mapping is returned based on the **name** parameter. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
nameIndicates the mapping name. The value can only be tolower (converting an uppercase wide character to lowercase) or toupper (converting a lowercase wide character to uppercase).
localeIndicates the locale. This parameter is ignored currently.
- -**Returns:** - -Returns the mapping corresponding to **name** if the operation is successful; returns **0** otherwise. - -## wctype\(\) - -``` -[wctype_t](UTILS.md#gaf3296ec762e8e6a66c8dd4bd7cf017fb) wctype (const char * name) -``` - - **Description:** - -Checks whether a wide character type exists in the [LC\_CTYPE](IO.md#ga07c66689961056725d7f50231d740ba9) locale. - -**Parameters:** - - - - - - - - - - -

Name

-

Description

-
nameIndicates the pointer to the wide character type.
- -**Attention:** - -The wide character types are as follows: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Type

-

Description

-

alnum

-

Letters and digits

-

alpha

-

Letters

-

cntrl

-

Control characters

-

digit

-

Decimal digits

-

graph

-

Visible characters

-

lower

-

Lowercase letters

-

print

-

Printable characters

-

punct

-

Punctuation marks

-

space

-

Space

-

upper

-

Uppercase letters

-

xdigit

-

Hexadecimal digits

-
- -**Returns:** - -Returns the type descriptor if the check is successful; returns **0** otherwise. - -## wctype\_l\(\) - -``` -[wctype_t](UTILS.md#gaf3296ec762e8e6a66c8dd4bd7cf017fb) wctype_l (const char * name, locale_t locale ) -``` - - **Description:** - -Checks whether a wide character type exists for the specified locale. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
nameIndicates the pointer to the wide character type.
localeIndicates the locale. This parameter is ignored currently.
- -**Attention:** - -The wide character types are as follows: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Type

-

Description

-

alnum

-

Letters and digits

-

alpha

-

Letters

-

cntrl

-

Control characters

-

digit

-

Decimal digits

-

graph

-

Visible characters

-

lower

-

Lowercase letters

-

print

-

Printable characters

-

punct

-

Punctuation marks

-

space

-

Space

-

upper

-

Uppercase letters

-

xdigit

-

Hexadecimal digits

-
- -**Returns:** - -Returns the type descriptor if the check is successful; returns **0** otherwise. - -## wmemchr\(\) - -``` -wchar_t* wmemchr (const wchar_t * s, wchar_t c, size_t n ) -``` - - **Description:** - -Searches for the first position of the matched wide character within the specified number of characters in a wide character string. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
sIndicates the pointer to the wide character string to be searched.
cIndicates the wide character to be matched.
nIndicates the number of characters to be searched in the wide character string.
- -**Returns:** - -Returns the pointer to the matched wide character if the operation is successful; returns **NULL** if the operation fails. - -## wmemcmp\(\) - -``` -int wmemcmp (const wchar_t * lhs, const wchar_t * rhs, size_t count ) -``` - - **Description:** - -Compares the first **count** characters in the string pointed to by **lhs** with the first **count** characters in the string pointed to by **rhs**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
lhsIndicates the pointer to string 1 for comparison.
rhsIndicates the pointer to string 2 for comparison.
countIndicates the number of characters to compare.
- -**Attention:** - -This function compares character strings in lexicographical order. It is locale-insensitive and does not pay attention to the value of the **wchar\_t** object. It does not stop comparison even when encountering a null or invalid wide character. - -**Returns:** - -Returns **0** if the first **count** characters of both strings are equal. If the wide character value of **lhs** is greater than that of **rhs** at the index \(**i**\) where the first mismatch is found, this function returns a value greater than **0**. If the wide character value of **lhs** is less than that of **rhs** at the index \(**i**\) where the first mismatch is found, this function returns a value less than **0**. - -## wmemcpy\(\) - -``` -wchar_t* wmemcpy (wchar_t * dest, const wchar_t * src, size_t count ) -``` - - **Description:** - -Copies **count** successive characters from the wide character array pointed to by **src** to the wide character array pointed to by **dest**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
destIndicates the pointer to the wide character array to copy characters to.
srcIndicates the pointer to the wide character array to copy characters from.
countIndicates the number of wide characters to copy.
- -**Attention:** - -If the arrays overlap \(using the same memory\), the behavior is undefined. If **count** is **0**, this function does nothing. - -**Returns:** - -Returns the pointer to the destination string. - -## wmemmove\(\) - -``` -wchar_t* wmemmove (wchar_t * dest, const wchar_t * src, size_t count ) -``` - - **Description:** - -Copies **count** successive characters from the wide character array pointed to by **src** to the wide character array pointed to by **dest** \(with possible array overlapping\). - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
destIndicates the pointer to the wide character array to copy characters to.
srcIndicates the pointer to the wide character array to copy characters from.
countIndicates the number of wide characters to copy.
- -**Attention:** - -If **count** is **0**, this function does nothing. The arrays may overlap. If the arrays overlap, a copying operation is triggered, as if wide characters were copied to a temporary wide character array and then copied from the temporary array to the array pointed to by **dest**. - -**Returns:** - -Returns the pointer to the destination string. - -## wmemset\(\) - -``` -wchar_t* wmemset (wchar_t * dest, wchar_t ch, size_t count ) -``` - - **Description:** - -Fills **count** characters specified by **ch** to the wide character array pointed to by **dest**. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
destIndicates the pointer to the wide character array to fill characters to.
chIndicates the wide characters to be filled.
countIndicates the number of wide characters to be filled.
- -**Attention:** - -If **count** is **0**, this function does nothing. This function is locale-insensitive and does not pay attention to the value of the **wchar\_t** object, which can be null or an invalid wide character. - -**Returns:** - -Returns the pointer to the destination string. - -## wprintf\(\) - -``` -int wprintf (const wchar_t * format, ... ) -``` - - **Description:** - -Prints formatted data to the standard output \(stdout\). - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
formatIndicates the pointer to the string that may contain the format specifiers.
...Indicates the variable arguments specifying the data to print.
- -**Attention:** - -This function is the wide character equivalent of the [printf](IO.md#ga98631211a4a8aee62f572375d5b637be) function. - -**Returns:** - -Returns the total number of output characters \(excluding the terminating null character **'\\0'**\) if the operation is successful; returns **-1** if the operation fails. - -## write\(\) - -``` -ssize_t write (int fd, const void * buf, size_t size ) -``` - - **Description:** - -Writes the specified content to the file. - -**Parameters:** - - - - - - - - - - - - - - - - -

Name

-

Description

-
fdIndicates the descriptor of the file into which content is to be written.
bufIndicates the pointer to the content to be written to the file.
sizeIndicates the length of the written data in the unit of bytes.
- -**Attention:** - -This function can NOT be used in the PROC file system. - -**Returns:** - -Returns the number of bytes written if the operation is successful; returns **-1** and sets **errno** to a value in the following table if the operation fails. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

errno

-

Description

-

EBADF

-

fd is invalid.

-

EACCES

-

The file cannot be written.

-

EFAULT

-

buf is an inaccessible address.

-

EAGAIN

-

O_NONBLOCK is used to select non-blocking I/O, and the write would block.

-

EINVAL

-

The current position of the file pointer is less than 0.

-

ENOSPC

-

The storage device to which the file is written has no space.

-

ENOMEM

-

Insufficient memory.

-

EFBIG

-

An attempt is made to write a file whose length is greater than the defined maximum file size.

-
- -## wscanf\(\) - -``` -int wscanf (const wchar_t * format, ... ) -``` - - **Description:** - -Reads formatted data from the standard input \(stdin\) and stores it based on the wide string format into the locations pointed to by the variable arguments. - -**Parameters:** - - - - - - - - - - - - - -

Name

-

Description

-
formatIndicates the pointer to the string that may contain the format specifiers.
...Indicates the variable arguments specifying the data to read.
- -**Attention:** - -This function is the wide character equivalent of the [scanf](IO.md#ga5c48433db9c04031772d5b36e6c4411d) function. - -**Returns:** - -Returns the number of read bytes if the operation is successful; returns **EOF** if a reading error occurs or the end-of-file is reached during data reading. If an encoding error occurs when wide characters are parsed, this function sets **errno** to [EILSEQ](UTILS.md#gac6c071293826a4e66a717bb38db7794d). - diff --git a/api/api-SmartVision-Devices/UartAttribute.md b/api/api-SmartVision-Devices/UartAttribute.md deleted file mode 100755 index b420a0025745c10aba4abe562361301ec90afd31..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/UartAttribute.md +++ /dev/null @@ -1,145 +0,0 @@ -# UartAttribute - -- [Overview](#section731235949165636) -- [Summary](#section532115424165636) -- [Data Fields](#pub-attribs) -- [Details](#section1595673192165636) -- [Field](#section62349060165636) -- [cts](#a8c2ec715ce735b87619440004a5816f3) -- [dataBits](#a884f85f5c82f063596a52f43c12af1a8) -- [fifoRxEn](#a171de31a6414563a1b8ca13c6209e52a) -- [fifoTxEn](#a12cd3afb4dfbc5ed70578e0fcee0700d) -- [parity](#abc4eefd31616175d469bc41d24b5b37b) -- [reserved](#a415c8237e3a34dfe812e6c6cc7a7a1fa) -- [rts](#a5ebfed49568aa4717b72d89084a13f3a) -- [stopBits](#a29782a670eaf734ed02955eff0cdd4b9) - -## **Overview** - -**Related Modules:** - -[UART](UART.md) - -**Description:** - -Defines basic attributes of the UART port. - -You can configure the attributes via [UartSetAttribute](UART.md#ga76281a15464395451fc9844e717e0e10). If the parameters are not set, default attributes are used. - -Attention -: The UART controller determines which UART attribute parameters are supported. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

dataBits: 4

-

unsigned int

-

parity: 4

-

unsigned int

-

stopBits: 4

-

unsigned int

-

rts: 1

-

unsigned int

-

cts: 1

-

unsigned int

-

fifoRxEn: 1

-

unsigned int

-

fifoTxEn: 1

-

unsigned int

-

reserved: 16

-

unsigned int

-
- -## **Details** - -## **Field ** - -## cts - -``` -unsigned int UartAttribute::cts -``` - -## dataBits - -``` -unsigned int UartAttribute::dataBits -``` - -## fifoRxEn - -``` -unsigned int UartAttribute::fifoRxEn -``` - -## fifoTxEn - -``` -unsigned int UartAttribute::fifoTxEn -``` - -## parity - -``` -unsigned int UartAttribute::parity -``` - -## reserved - -``` -unsigned int UartAttribute::reserved -``` - - **Description:** - -Reserved bits - -## rts - -``` -unsigned int UartAttribute::rts -``` - -## stopBits - -``` -unsigned int UartAttribute::stopBits -``` - diff --git a/api/api-SmartVision-Devices/UdpHeader.md b/api/api-SmartVision-Devices/UdpHeader.md deleted file mode 100755 index 268d89fe66ec58ded24c931cce12b0908265ea41..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/UdpHeader.md +++ /dev/null @@ -1,54 +0,0 @@ -# UdpHeader - -- [Overview](#section1047421156165636) -- [Summary](#section2032247834165636) -- [Data Fields](#pub-attribs) - -## **Overview** - -**Related Modules:** - -[WLAN](WLAN.md) - -**Description:** - -Defines the UDP header information of a data frame, including the source port number and destination port number. - -**Since:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

source

-

uint16_t

-

dest

-

uint16_t

-

len

-

uint16_t

-

check

-

uint16_t

-
- diff --git a/api/api-SmartVision-Devices/Utils_config.md b/api/api-SmartVision-Devices/Utils_config.md deleted file mode 100755 index a1c6e56f172c240cb1b57314179e7f4750fac881..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Utils_config.md +++ /dev/null @@ -1,114 +0,0 @@ -# Utils\_config - -- [Overview](#section283503600165625) -- [Summary](#section606142748165625) -- [Files](#files) -- [Macros](#define-members) -- [Details](#section1459959621165625) -- [Macro Definition](#section1221236926165625) -- [FEATURE\_KV\_CACHE](#gad3d71669516ef0bb50e2b105507a6b29) -- [MAX\_CACHE\_SIZE](#ga6c8469dfe973ac952cf40394bd2c160b) -- [MAX\_KV\_SUM](#ga4f258bd7d7d52c6770cce77f3e16ce72) - -## **Overview** - -**Description:** - -Represents the configuration file of the utils subsystem. - -Vendors can set their desired items in the configuration file. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - - -

File Name

-

Description

-

utils_config.h

-

Represents the configuration file of the utils subsystem.

-
- -## Macros - - - - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

FEATURE_KV_CACHE

-

Specifies whether the KV store supports cache.

-

MAX_CACHE_SIZE 10

-

Indicates the number of data items that can be stored in the KV store cache.

-

MAX_KV_SUM 50

-

Indicates the number of data items that can be stored for each application.

-
- -## **Details** - -## **Macro Definition ** - -## FEATURE\_KV\_CACHE - -``` -#define FEATURE_KV_CACHE -``` - - **Description:** - -Specifies whether the KV store supports cache. - -If this variable is defined, the KV store supports cache. Vendors determine whether to enable this feature. It is enabled by default. - -## MAX\_CACHE\_SIZE - -``` -#define MAX_CACHE_SIZE 10 -``` - - **Description:** - -Indicates the number of data items that can be stored in the KV store cache. - -Default value: 10 - -## MAX\_KV\_SUM - -``` -#define MAX_KV_SUM 50 -``` - - **Description:** - -Indicates the number of data items that can be stored for each application. - -Default value: 50 - diff --git a/api/api-SmartVision-Devices/Utils_file.md b/api/api-SmartVision-Devices/Utils_file.md deleted file mode 100755 index 0cbc5f9021aed0beccbeaafa85583ce5e7f6ba54..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/Utils_file.md +++ /dev/null @@ -1,571 +0,0 @@ -# Utils\_file - -## **Overview** - -Performs operations on a file. - -This module allows you to performs file operations such as to open, close, read, and write a file, and to obtain the file size. The filing system varies according to the hardware platform. The following limitations are imposed on a platform that uses the Serial Peripheral Interface Flash Filing System \(SPIFFS\): - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Files - - - - - - - - - -

File Name

-

Description

-

utils_file.h

-

Performs operations on a file, including to open, close, write, read, and delete a file.

-
- -## Macros - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Macro Name and Value

-

Description

-

SEEK_SET_FS    0

-

Defines the offset position used by UtilsFileSeek in a file to start offsetting from the file header.

-

SEEK_CUR_FS    1

-

Defines the offset position used by UtilsFileSeek in a file to start offsetting from the current read and write position.

-

SEEK_END_FS    2

-

Defines the offset position used by UtilsFileSeek in a file to start offsetting from the end of the file.

-

O_RDONLY_FS    00

-

Defines a flag used byUtilsFileOpen to open a file in read-only mode.

-

O_WRONLY_FS    01

-

Defines a flag used by UtilsFileOpen to open a file in write-only mode.

-

O_RDWR_FS    02

-

Defines a flag used by UtilsFileOpen to open a file in read-and-write mode.

-

O_CREAT_FS    0100

-

Defines a flag used by UtilsFileOpen to create a file when the file to open does not exist.

-

O_EXCL_FS   0200

-

Defines a flag used by UtilsFileOpen to check whether the file to open exists when O_CREAT_FS is already set.

-

O_TRUNC_FS    01000

-

Defines a flag used by UtilsFileOpen to clear the file content if the file exists and can be opened in write mode.

-

O_APPEND_FS    02000

-

Defines a flag used by UtilsFileOpen to start reading or writing from the end of a file.

-
- -## Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name

-

Description

-

UtilsFileOpen (const char *path, int oflag, int mode)

-

int 

-

Opens or creates a file.

-

UtilsFileClose (int fd)

-

int 

-

Closes a file with the specified file descriptor.

-

UtilsFileRead (int fd, char *buf, unsigned int len)

-

int 

-

Reads a specified length of data from a file with the specified file descriptor and writes the data into the buffer.

-

UtilsFileWrite (int fd, const char *buf, unsigned int len)

-

int 

-

Writes a specified length of data into a file with the specified file descriptor.

-

UtilsFileDelete (const char *path)

-

int 

-

Deletes a specified file.

-

UtilsFileStat (const char *path, unsigned int *fileSize)

-

int 

-

Obtains the file size.

-

UtilsFileSeek (int fd, int offset, unsigned int whence)

-

int 

-

Adjusts the read and write position offset in a file.

-

UtilsFileCopy (const char *src, const char *dest)

-

int 

-

Copies the source file to a target file.

-

UtilsFileMove (const char *src, const char *dest)

-

int 

-

Moves the source file into a target file.

-
- -## **Details** - -## **Macro Definition Documentation** - -## O\_EXCL\_FS - -``` -#define O_EXCL_FS   0200 -``` - - **Description:** - -Defines a flag used by [UtilsFileOpen](Utils_file.md#ga17115e4a2d52b37bffcbd465e2c1a899) to check whether the file to open exists when [O\_CREAT\_FS](Utils_file.md#ga79f003e100f1a5126fbea0dc355e3483) is already set. - -If the file does not exist, a new file will be created. If the file exists, the file cannot be opened. - -## **Function Documentation** - -## UtilsFileClose\(\) - -``` -int UtilsFileClose (int fd) -``` - - **Description:** - -Closes a file with the specified file descriptor. - -**Parameters:** - - - - - - - - - -

Name

-

Description

-
fdIndicates the file descriptor of the file to close.
- -**Returns:** - -Returns **0** if the file is closed; returns **-1** otherwise. - - - -## UtilsFileCopy\(\) - -``` -int UtilsFileCopy (const char * src, const char * dest ) -``` - - **Description:** - -Copies the source file to a target file. - -**Parameters:** - - - - - - - - - - - - -

Name

-

Description

-
srcIndicates the source file to copy.
destIndicates the target file.
- -**Attention:** - -If the number of opened files reaches the upper limit \(32\), close any two files first. Otherwise, the file cannot be copied. - -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - - - -## UtilsFileDelete\(\) - -``` -int UtilsFileDelete (const char * path) -``` - - **Description:** - -Deletes a specified file. - -**Parameters:** - - - - - - - - - -

Name

-

Description

-
pathIndicates the file to delete.
- -**Attention:** - -If the number of opened files reaches the upper limit \(32\), close any of them first. Otherwise, the file cannot be deleted. - -**Returns:** - -Returns **0** if the file is deleted; returns **-1** otherwise. - - - -## UtilsFileMove\(\) - -``` -int UtilsFileMove (const char * src, const char * dest ) -``` - - **Description:** - -Moves the source file into a target file. - -**Parameters:** - - - - - - - - - - - - -

Name

-

Description

-
srcIndicates the source file.
destIndicates the target file.
- -**Attention:** - -If the number of opened files reaches the upper limit \(32\), close any two files first. Otherwise, the file cannot be moved. - -**Returns:** - -Returns **0** if the operation is successful; returns **-1** otherwise. - - - -## UtilsFileOpen\(\) - -``` -int UtilsFileOpen (const char * path, int oflag, int mode ) -``` - - **Description:** - -Opens or creates a file. - -**Parameters:** - - - - - - - - - - - - - - - -

Name

-

Description

-
pathIndicates the file to open or create.
oflagIndicates the mode of opening a file. The following modes are supported. These modes can be used together, with each of them identified by "or".
modeUsed for function compatibility. This parameter does not take effect in any scenario.
- - - - - - - - - - - - - - - - - - - - - - - - - - - -

oflag

-

Description

-

O_RDONLY_FS

-

For details, see O_RDONLY_FS.

-

O_WRONLY_FS

-

For details, see O_WRONLY_FS.

-

O_RDWR_FS

-

For details, see O_RDWR_FS.

-

O_CREAT_FS

-

For details, see O_CREAT_FS.

-

O_EXCL_FS

-

For details, see O_EXCL_FS.

-

O_TRUNC_FS

-

For details, see O_TRUNC_FS.

-

O_APPEND_FS

-

For details, see O_APPEND_FS.

-
- -**Returns:** - -Returns the file descriptor if the file is opened or created; returns **-1** otherwise. - - - -## UtilsFileRead\(\) - -``` -int UtilsFileRead (int fd, char * buf, unsigned int len ) -``` - - **Description:** - -Reads a specified length of data from a file with the specified file descriptor and writes the data into the buffer. - -**Parameters:** - - - - - - - - - - - - - - - -

Name

-

Description

-
fdIndicates the file descriptor of the file to read.
bufIndicates the buffer that stores the read data. This is an output parameter.
lenIndicates the length of the data to read.
- -**Returns:** - -Returns the number of bytes of the data if the data is read; returns **-1** otherwise. - - - -## UtilsFileSeek\(\) - -``` -int UtilsFileSeek (int fd, int offset, unsigned int whence ) -``` - - **Description:** - -Adjusts the read and write position offset in a file. - -**Parameters:** - - - - - - - - - - - - - - - -

Name

-

Description

-
fdIndicates the file descriptor of the file where the read and write position offset needs adjustment.
offsetIndicates the offset of the read and write position based on the whence parameter. The value can be negative if the value of whence is SEEK_CUR_FS or SEEK_END_FS.
whenceIndicates the start position of the offset. The following start positions are supported.
- - - - - - - - - - - - - - - - - - - - - -

whence

-

Description

-

SEEK_SET_FS

-

Adjusts the read and write position to the file header.

-

^

-

Then adds the offset after the read and write position.

-

SEEK_CUR_FS

-

Adds the offset after the current read and write position.

-

SEEK_END_FS

-

Adjusts the read and write position to the end of the file.

-

^

-

Then adds the offset after the read and write position.

-
- -**Returns:** - -Returns the current read and write position if the operation is successful; returns **-1** otherwise. - - - -## UtilsFileStat\(\) - -``` -int UtilsFileStat (const char * path, unsigned int * fileSize ) -``` - - **Description:** - -Obtains the file size. - -**Parameters:** - - - - - - - - - - - - -

Name

-

Description

-
pathIndicates the file name.
fileSizeIndicates the file size. This is an output parameter.
- -**Returns:** - -Returns **0** if the file size is obtained; returns **-1** otherwise. - - - -## UtilsFileWrite\(\) - -``` -int UtilsFileWrite (int fd, const char * buf, unsigned int len ) -``` - - **Description:** - -Writes a specified length of data into a file with the specified file descriptor. - -**Parameters:** - - - - - - - - - - - - - - - -

Name

-

Description

-
fdIndicates the file descriptor of the file where to write the data.
bufIndicates the data to write.
lenIndicates the length of the data to write.
- -**Returns:** - -Returns the number of bytes of the data if the data is written; returns **-1** otherwise. - - - diff --git "a/api/api-SmartVision-Devices/Utils\345\255\220\347\263\273\347\273\237.md" "b/api/api-SmartVision-Devices/Utils\345\255\220\347\263\273\347\273\237.md" deleted file mode 100755 index fc4ef871930fe7dc79efce592fd211feb9b6d045..0000000000000000000000000000000000000000 --- "a/api/api-SmartVision-Devices/Utils\345\255\220\347\263\273\347\273\237.md" +++ /dev/null @@ -1,9 +0,0 @@ -# Utils子系统 - -- **[Kv\_store](Kv_store.md)** - -- **[Parameter](Parameter.md)** - -- **[Utils\_config](Utils_config.md)** - - diff --git a/api/api-SmartVision-Devices/VideoTrackInfo.md b/api/api-SmartVision-Devices/VideoTrackInfo.md deleted file mode 100755 index ef16d26ba34fcef7b3f64b862d34a60b9299ed97..0000000000000000000000000000000000000000 --- a/api/api-SmartVision-Devices/VideoTrackInfo.md +++ /dev/null @@ -1,188 +0,0 @@ -# VideoTrackInfo - -- [Overview](#section1574075901165636) -- [Summary](#section624473362165636) -- [Data Fields](#pub-attribs) -- [Details](#section202472917165636) -- [Field](#section1507177165165636) -- [bitrate](#a62bf491fa162c1b41c8ab3f8034c78a4) -- [durationMs](#ade7b28ac81909b6578a5b7df05f0a57c) -- [format](#a6c1972b11cd0dccb6dcfb5a5f9be960f) -- [fpsDen](#ac2340827ee1c6faac89fec69deb1f909) -- [fpsNum](#a2534734c1e6fd5aeaa598fb697bdce16) -- [height](#a6f23a6eb3e140c8d5c88067a9517ccad) -- [profile](#ae88938813de34933b48a0bf4c784d13e) -- [rotate](#a075619b83522eb991e8349bafe042455) -- [width](#aeb35e568d32f0e62ff156cd0add506e5) - -## **Overview** - -**Related Modules:** - -[Format](Format.md) - -**Description:** - -Defines video track information. - -**Since:** - -1.0 - -**Version:** - -1.0 - -## **Summary** - -## Data Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Variable Name

-

Description

-

format

-

CodecFormat

-

profile

-

uint16_t

-

width

-

uint16_t

-

height

-

uint16_t

-

fpsNum

-

uint16_t

-

fpsDen

-

uint16_t

-

bitrate

-

uint32_t

-

rotate

-

uint32_t

-

durationMs

-

int64_t

-
- -## **Details** - -## **Field ** - -## bitrate - -``` -uint32_t VideoTrackInfo::bitrate -``` - - **Description:** - -