更新翻译

Signed-off-by: jlspcdd1227dd <12046126+jlspcdd1227dd@user.noreply.gitee.com>
This commit is contained in:
jlspcdd1227dd 2023-03-24 08:30:22 +00:00 committed by Gitee
parent 7fb8bf89e5
commit c9aaf62439
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 142 additions and 142 deletions

View File

@ -369,7 +369,7 @@ $ sudo apt-get install libkysdk-hardware libkysdk-hardware-dev
获取指定网卡的厂商名称和设备型号
<table style="width: auto;"><tbody><tr><td colSpan="1" rowSpan="1" width="67">submodule</td><td colSpan="1" rowSpan="1" width="82">编程语言</td><td colSpan="2" rowSpan="1" width="312">statement</td><td colSpan="1" rowSpan="1" width="98">describe</td></tr><tr><td colSpan="1" rowSpan="3" width="67">Get network card information</td><td colSpan="1" rowSpan="3" width="82">C</td><td colSpan="2" rowSpan="1" width="312">extern int kdk_nc_get_vendor_and_product(const char *nc, char *vendor, char *product);</td><td colSpan="1" rowSpan="1" width="98">获取指定网卡的厂商名称和设备型号</td></tr><tr><td colSpan="1" rowSpan="1" width="127">Parameter Description</td><td colSpan="1" rowSpan="1" width="184">Return value description</td><td colSpan="1" rowSpan="1" width="98"></td></tr><tr><td colSpan="1" rowSpan="1" width="127">nc网卡名称如eno1vendor接受厂商名称的缓冲区product接受设备型号的缓冲区</td><td colSpan="1" rowSpan="1" width="184">0 : 成功1 : 失败</td><td colSpan="1" rowSpan="1" width="98"></td></tr></tbody></table>
<table style="width: auto;"><tbody><tr><td colSpan="1" rowSpan="1" width="67">submodule</td><td colSpan="1" rowSpan="1" width="82">Programming language</td><td colSpan="2" rowSpan="1" width="312">statement</td><td colSpan="1" rowSpan="1" width="98">describe</td></tr><tr><td colSpan="1" rowSpan="3" width="67">Get network card information</td><td colSpan="1" rowSpan="3" width="82">C</td><td colSpan="2" rowSpan="1" width="312">extern int kdk_nc_get_vendor_and_product(const char *nc, char *vendor, char *product);</td><td colSpan="1" rowSpan="1" width="98">获取指定网卡的厂商名称和设备型号</td></tr><tr><td colSpan="1" rowSpan="1" width="127">Parameter Description</td><td colSpan="1" rowSpan="1" width="184">Return value description</td><td colSpan="1" rowSpan="1" width="98"></td></tr><tr><td colSpan="1" rowSpan="1" width="127">nc网卡名称如eno1vendor接受厂商名称的缓冲区product接受设备型号的缓冲区</td><td colSpan="1" rowSpan="1" width="184">0 : 成功1 : 失败</td><td colSpan="1" rowSpan="1" width="98"></td></tr></tbody></table>
回收字符串列表
@ -645,7 +645,7 @@ target_link_libraries(kypackage-test kypackage)
检测指定包名的软件包是否正确安装
<table style="width: auto;"><tbody><tr><td colSpan="1" rowSpan="1" width="67">submodule</td><td colSpan="1" rowSpan="1" width="81">编程语言</td><td colSpan="2" rowSpan="1" width="313">statement</td><td colSpan="1" rowSpan="1" width="94">describe</td></tr><tr><td colSpan="1" rowSpan="3" width="67">获取包列表信息</td><td colSpan="1" rowSpan="3" width="81">C</td><td colSpan="2" rowSpan="1" width="313">extern int kdk_package_is_installed(const char *name, const char *version)</td><td colSpan="1" rowSpan="1" width="94">检测指定包名的软件包是否正确安装</td></tr><tr><td colSpan="1" rowSpan="1" width="137">Parameter Description</td><td colSpan="1" rowSpan="1" width="176">Return value description</td><td colSpan="1" rowSpan="1" width="94"></td></tr><tr><td colSpan="1" rowSpan="1" width="137">name软件包名version版本号大部分情况下为NULL预留为snap做准备</td><td colSpan="1" rowSpan="1" width="176">int 成功返回0失败返回错误码</td><td colSpan="1" rowSpan="1" width="94"></td></tr></tbody></table>
<table style="width: auto;"><tbody><tr><td colSpan="1" rowSpan="1" width="67">submodule</td><td colSpan="1" rowSpan="1" width="81">Programming language</td><td colSpan="2" rowSpan="1" width="313">statement</td><td colSpan="1" rowSpan="1" width="94">describe</td></tr><tr><td colSpan="1" rowSpan="3" width="67">获取包列表信息</td><td colSpan="1" rowSpan="3" width="81">C</td><td colSpan="2" rowSpan="1" width="313">extern int kdk_package_is_installed(const char *name, const char *version)</td><td colSpan="1" rowSpan="1" width="94">检测指定包名的软件包是否正确安装</td></tr><tr><td colSpan="1" rowSpan="1" width="137">Parameter Description</td><td colSpan="1" rowSpan="1" width="176">Return value description</td><td colSpan="1" rowSpan="1" width="94"></td></tr><tr><td colSpan="1" rowSpan="1" width="137">name软件包名version版本号大部分情况下为NULL预留为snap做准备</td><td colSpan="1" rowSpan="1" width="176">int 成功返回0失败返回错误码</td><td colSpan="1" rowSpan="1" width="94"></td></tr></tbody></table>
### **3.1.4** Get resource information
@ -931,101 +931,101 @@ target_link_libraries(kysysinfo-test kysysinfo)
```
2获取操作系统信息,需要添加头文件:
2To obtain operating system information, you need to add header files:
```
#include "kysdk/kysdk-system/libkysysinfo.h"
```
获取操作系统架构信息
Get operating system architecture information
| submodule | Programming language | statement | describe |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|------|------------------------------------------------------|----------------------------------------------------------------------------|
| 获取系统基础信息 | C | extern char* kdk_system_get_architecture() | 获取系统架构信息 |
| Get basic system information | C | extern char* kdk_system_get_architecture() | Get system architecture information |
| | | Parameter Description | Return value description | |
| | | 无 | char* 系统架构,例:x86_64 | |
| | | 无 | char* system architecture, for example: x86_64 | |
获取操作系统名称
Get OS name
| submodule | Programming language | statement | describe |
|--------|------|----------------------------------------------------|----------------|
| 获取系统基础信息 | C | extern char* kdk_system_get_systemName() | 获取操作系统名称 |
| Get basic system information | C | extern char* kdk_system_get_systemName() | Get OS name |
| | | Parameter Description | Return value description | |
| | | 无 | char* 系统名称,例:Kylin | |
| | | 无 | char* system name, for example: Kylin | |
获取操作系统版本号
Get the operating system version number
| submodule | Programming language | statement | describe |
|--------|------|----------------------------------------------------|----------------|
| 获取系统基础信息 | C | extern char* kdk_system_get_version(bool verbose) | 获取系统版本号 |
| Get basic system information | C | extern char* kdk_system_get_version(bool verbose) | Get the system version number |
| | | Parameter Description | Return value description | |
| | | verbose0获取简略版本号1获取详细版本号 | char* 系统版本号系统简略版本xxxx桌面操作系统系统详细版本Desktop-V10-Professional-Release-Build1-210203 |
| | | verbose: 0 for abbreviated version number, 1 for detailed version number | char* System version number, for example: system brief version: xxxx desktop operating system; system detailed version: Desktop-V10-Professional-Release-Build1-210203 |
获取内核版本号
Get the kernel version number
| submodule | Programming language | statement | describe |
|--------|------|----------------------------------------------------|----------------|
| 获取系统基础信息 | C | extern char* kdk_system_get_kernelVersion() | 获取内核版本号 |
| Get basic system information | C | extern char* kdk_system_get_kernelVersion() | Get the kernel version number |
| | | Parameter Description | Return value description | |
| | | 无 | char* | 内核版本号 | |
| | | 无 | char* | kernel version number | |
获取当前登录用户的用户名
Get the username of the currently logged in user
| submodule | Programming language | statement | describe |
|--------|------|----------------------------------------------------|----------------|
| 获取系统基础信息 | C | extern char* kdk_system_get_eUser() | 获取当前登录用户的用户名Effect User |
| Get basic system information | C | extern char* kdk_system_get_eUser() | Get the username of the currently logged in userEffect User |
| | | Parameter Description | Return value description | |
| | | 无 | char* 成功返回字符串失败返回NULL。返回的字符串需要被 free 释放 | |
| | | 无 | char* returns a string on success, and NULL on failure. The returned string needs to be freed | |
获取操作系统项目编号名
Get operating system item number name
| submodule | Programming language | statement | describe |
|--------|------|----------------------------------------------------|----------------|
| 获取系统基础信息 | C | extern char* kdk_system_get_projectName() | 获取操作系统项目编号名 |
| Get basic system information | C | extern char* kdk_system_get_projectName() | Get operating system item number name |
| | | Parameter Description | Return value description | |
| | | 无 | char* 成功返回字符串失败返回NULL。返回的字符串需要被 free 释放 | |
| | | 无 | char* returns a string on success, and NULL on failure. The returned string needs to be freed | |
获取操作系统项目子编号名
Get OS project subnumber name
| submodule | Programming language | statement | describe |
|--------|------|----------------------------------------------------|----------------|
| 获取系统基础信息 | C | extern char* kdk_system_get_projectSubName() | 获取操作系统项目子编号名 |
| Get basic system information | C | extern char* kdk_system_get_projectSubName() | Get OS project subnumber name |
| | | Parameter Description | Return value description | |
| | | 无 | char* 成功返回字符串失败返回NULL。返回的字符串需要被 free 释放 | |
| | | 无 | char* returns a string on success, and NULL on failure. The returned string needs to be freed | |
获取操作系统产品标识码
Obtain the operating system product identification code
| submodule | Programming language | statement | describe |
|--------|------|----------------------------------------------------|----------------|
| 获取系统基础信息 | C | extern unsigned int kdk_system_get_productFeatures() | 获取操作系统产品标识码 |
| Get basic system information | C | extern unsigned int kdk_system_get_productFeatures() | Obtain the operating system product identification code |
| | | Parameter Description | Return value description | |
| | | 无 | unsigned int 返回标志码 <br> 0000信息异常 <br> 0001仅PC特性 <br> 0010仅平板特性 <br> 0011支持平板与PC特性 |
| | | 无 | unsigned int return flag code <br> 0000: abnormal information <br> 0001: only PC features <br> 0010: only tablet features <br> 0011: support tablet and PC features |
获取操作系统宿主机的虚拟机类型
Obtain the virtual machine type of the operating system host
| submodule | Programming language | statement | describe |
|--------|------|----------------------------------------------------|----------------|
| 获取系统基础信息 | C | extern char* kdk_system_get_hostVirtType() | 获取操作系统宿主机的虚拟机类型 |
| Get basic system information | C | extern char* kdk_system_get_hostVirtType() | Obtain the virtual machine type of the operating system host |
| | | Parameter Description | Return value description | |
| | | 无 | char* 获取失败返回NULL获取成功返回一个字符串字符串内容如下 <br> [none, qemu, kvm, zvm, vmware,hyper-v, orcale virtualbox, xen, bochs, uml,parallels,bhyve,qnx,arcn,openvz,lxc,lxc-libvirt,systemd-nspawn,docker,podman,rkt,wsl] |
| | | 无 | char* returns NULL if the acquisition fails, and returns a string if the acquisition succeeds. The content of the string is as follows: <br> [none, qemu, kvm, zvm, vmware,hyper-v, orcale virtualbox, xen, bochs, uml,parallels,bhyve,qnx,arcn,openvz,lxc,lxc-libvirt,systemd-nspawn,docker,podman,rkt,wsl] |
获取操作系统宿主机的云平台类型
Obtain the cloud platform type of the operating system host
| submodule | Programming language | statement | describe |
|--------|------|----------------------------------------------------|----------------|
| 获取系统基础信息 | C | extern char* kdk_system_get_hostCloudPlatform() | 获取操作系统宿主机的云平台类型 |
| Get basic system information | C | extern char* kdk_system_get_hostCloudPlatform() | Obtain the cloud platform type of the operating system host |
| | | Parameter Description | Return value description | |
| | | 无 | char* 获取失败返回NULL获取成功返回一个字符串字符串内容如下 <br> [none, huawei] |
| | | 无 | char* returns NULL if the acquisition fails, and returns a string if the acquisition succeeds. The content of the string is as follows: <br> [none, huawei] |
判断当前操作系统是否为专用机系统
Determine whether the current operating system is a dedicated machine system
| submodule | Programming language | statement | describe |
|--------|------|----------------------------------------------------|----------------|
| 获取系统基础信息 | C | extern bool kdk_system_is_zyj(void) | 判断当前镜像系统否为专用机系统 |
| Get basic system information | C | extern bool kdk_system_is_zyj(void) | Determine whether the current mirroring system is a dedicated machine system |
| | | Parameter Description | Return value description | |
| | | 无 | bool <br> true代表是 <br> false代表不是 |
| | | 无 | bool <br> true means yes <br> false means no |
获取系统分辨率信息
Get system resolution information
| submodule | Programming language | statement | describe |
|--------|------|----------------------------------------------------|----------------|
| 获取系统基础信息 | C | extern char** kdk_system_get_resolving_power() | 获取系统分辨率信息 |
| Get basic system information | C | extern char** kdk_system_get_resolving_power() | Get system resolution information |
| | | Parameter Description | Return value description | |
| | | 无 | char** 分辨率信息列表以NULL表示结尾由alloc生成需要被kdk_resolving_freeall回收若获取出错返回NULL | |
| | | 无 | char** Resolution information list, ending with NULL, generated by alloc, needs to be reclaimed by kdk_resolving_freeall; if there is an error in obtaining, return NULL | |
回收字符串列表
list of recycled strings
| submodule | Programming language | statement | describe |
|--------|------|----------------------------------------------------|----------------|
| 获取系统基础信息 | C | extern inline void kdk_resolving_freeal(char **ptr) | 回收字符串列表 |
| Get basic system information | C | extern inline void kdk_resolving_freeal(char **ptr) | list of recycled strings |
| | | Parameter Description | Return value description | |
| | | ptr字符串列表 | |
| | | ptr字符串列表 | none |
@ -1037,13 +1037,13 @@ target_link_libraries(kysysinfo-test kysysinfo)
| submodule | Programming language | statement | describe |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------|---------------------------------------------------------------------|------------------------------------|
| 获取系统基础信息 | dbus接口 | bus: system bus |
| Get basic system information | dbus interface | bus: system bus |
| name : org.freedesktop.NetworkManager |
| path: org.freedesktop.NetworkManager |
| method: state()->int arg0; | 获取网络连接状态。 |
| method: state()->int arg0; | Get network connection status。 |
| |
| | | Parameter Description | Return value description | |
| | | 无 | int 网络连接状态 | |
| | | none | int network connection status | |
| |
Get network port status
@ -1135,11 +1135,11 @@ target_link_libraries(locationtest kylocation)
Get local location
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|----------|------|----------------------------------|----------------|
| 获取系统基础信息 | C | extern char *kdk_loaction_get(); | 获取本机的地理位置 |
| Get basic system information | C | extern char *kdk_loaction_get(); | Get the location of this machine |
| | | Parameter Description | Return value description | |
| | | 无 | describe地理位置的json字符串 |
| | | 无 | Describe the json string of the geographic location |
@ -1154,23 +1154,23 @@ target_link_libraries(locationtest kylocation)
Set to prohibit lock screen
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|---------------|-------|--------------------------------------------------------------------------------|--------|
| 电源管理模块 | C++ | uint32_t kdk_set_inhibit_lockscreen(const char *appName , const char *reason) | 设置禁止锁屏 |
| power management module | C++ | uint32_t kdk_set_inhibit_lockscreen(const char *appName , const char *reason) | Set to prohibit lock screen |
| |
| | | Parameter Description | Return value description |
| | | appName应用名 <br> reason禁止锁屏原因 | 0: 失败 <br> >0: 成功(大于0) |
| | | appNameApplication name <br> reason: Reason for prohibiting lock screen | 0: Failed <br> >0: Successful (greater than 0) |
取消禁止锁屏
Unban lock screen
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|-----------------|-------|-----------------------------------------------|--------|
| 电源管理模块 | C++ | int kdk_un_inhibit_lockscreen(uint32_t flag) | 取消禁止锁屏 |
| power management module | C++ | int kdk_un_inhibit_lockscreen(uint32_t flag) | Unban lock screen |
| |
| | | Parameter Description |Return value description |
| | | flag禁止锁屏接口的返回值 | 0: 成功 <br> -1: 失败 |
| | | flagThe return value of prohibiting the lock screen interface | 0: success <br> -1: failure |
## **3.3** File Management
@ -1188,12 +1188,12 @@ target_link_libraries(locationtest kylocation)
| statement | describe |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------|
| QStringList addWatchTargetRecursive(QString url, FileWatcherType type = PERIODIC, int attr = OPEN`|`CLOSE`|`MODIFY`|`DELETE, int maxdepth = 5, int recurType = DIR`|`REGULAR); | 增加需要监听的文件路径,对于目录,默认启用递归监听子目录 |
| QStringList addWatchTargetListRecursive(QStringList urlList, FileWatcherType type = PERIODIC, int attr = OPEN`|`CLOSE`|`MODIFY`|`DELETE, int maxdepth = 5, int recurType = DIR`|`REGULAR); | 增加需要监听的文件列表 |
| QStringList removeWatchTargetRecursive(QString url, int maxdepth = 5, int recurType = ALLFILE); | 从监听列表中移除指定的文件 |
| void clearWatchList(); | 清空监听列表 |
| void pauseWatcher(); | 暂停文件监听 |
| void restartWatcher(); | 恢复文件监听 |
| QStringList addWatchTargetRecursive(QString url, FileWatcherType type = PERIODIC, int attr = OPEN`|`CLOSE`|`MODIFY`|`DELETE, int maxdepth = 5, int recurType = DIR`|`REGULAR); | Add the file path that needs to be monitored. For directories, recursive monitoring of subdirectories is enabled by default |
| QStringList addWatchTargetListRecursive(QStringList urlList, FileWatcherType type = PERIODIC, int attr = OPEN`|`CLOSE`|`MODIFY`|`DELETE, int maxdepth = 5, int recurType = DIR`|`REGULAR); | Increase the list of files that need to be monitored |
| QStringList removeWatchTargetRecursive(QString url, int maxdepth = 5, int recurType = ALLFILE); | Remove the specified file from the listen list |
| void clearWatchList(); | clear watch list |
| void pauseWatcher(); | Pause file monitoring |
| void restartWatcher(); | resume file monitoring |
@ -1212,21 +1212,21 @@ target_link_libraries(locationtest kylocation)
get text box
| submodule | 编程语言 | statement | | describe |
| submodule | Programming language | statement | | describe |
|--------------------|------|-----------------------------------------------------------------------------|------------------|----------------------------------|
| OCR文字识别功能 | C++ | Std::vector<std::vector<std::vector<int>>> kdk::kdkOCR::getRect(const std::string &imagePath) || 获取文字框 |
| OCR text recognition function | C++ | Std::vector<std::vector<std::vector<int>>> kdk::kdkOCR::getRect(const std::string &imagePath) || get text box |
| | | Parameter Description | Return value description | |
| | | String 图片文件路径 | Vector<vector<vector<vector<int> <br> 文字框点的坐标矩阵、以及文字框的个数 |
| | | String 图片文件路径 | Vector<vector<vector<vector<int> <br> The coordinate matrix of the text box points, and the number of text boxes |
get text content
| submodule | 编程语言 | statement || describe |
| submodule | Programming language | statement || describe |
|----------------|---------|-------------------------------------------------------------------|-|--------|
| OCR文字识别功能 | C++ | Std::vector<std::vector<getCls>>>getCls(const std::string &imagePath,int nums) || 获取文字内容 |
| OCR text recognition function | C++ | Std::vector<std::vector<getCls>>>getCls(const std::string &imagePath,int nums) || get text content |
| | | Parameter Description | Return value description | |
| | | String 图片文件路径<br>Vector<string>图片中的文字字符串 | Int nums 同时处理的文字栈个数 | |
| | | String Image file path<br>Vector<string>Text string in the image | Int nums Number of literal stacks to process simultaneously | |
## **3.5** Printer Management
@ -1238,54 +1238,54 @@ target_link_libraries(locationtest kylocation)
Get a list of system printers
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|------------|----------|---------------------------------------|------------------------|
| 打印机管理 | C | extern char** kdk_printer_get_list(); | 获取打印机列表 |
| printer management | C | extern char** kdk_printer_get_list(); | Get a list of printers |
| | | Parameter Description | Return value description |
| | | 无 | char ** 系统打印机列表 |
| | | 无 | char ** System Printer List |
获取系统可用打印机列表
Get a list of available printers on the system
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|------------|----------|-------------------------------------------------|------------------------|
| 打印机管理 | C | extern char** kdk_printer_get _availablelist(); | 获取可用打印机列表 |
| printer management | C | extern char** kdk_printer_get _availablelist(); | Get a list of available printers |
| | | Parameter Description | Return value description |
| | | 无 | char ** 系统打印机列表 |
| | | 无 | char ** System Printer List |
Set print parameters
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|------------|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|
| 打印机管理 | C | extern void kdk_printer_set_options(int number_up,const char *media,const char *number_up_layout,const char *sides); | 设置打印参数 |
| printer management | C | extern void kdk_printer_set_options(int number_up,const char *media,const char *number_up_layout,const char *sides); | Set print parameters |
| | | Parameter Description | Return value description |
| | | number_up一张纸打印几页 <br> media纸张类型 <br> number_up_layoutcups属性如lrtb <br> sides单面one-sided双面长边翻转two_sided_long_dege <br> 双面(短边翻转)<br> two_sided_short_dege | 无 |
| | | number_upPrint several pages on one paper<br>media: paper type<br>number_up_layout: cups attribute, such as lrtb<br>sides: single-sided one-sided, double-sided (long side flip): two_sided_long_dege<br>double-sided (short flip side)<br> two_sided_short_dege | 无 |
打印文件
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|------------|----------|-----------------------------------------------------------------------------------|------------------|
| 打印机管理 | C | extern int kdk_printer_print_local_file(const char *printername, char *filepath); | 打印文件 |
| printer management | C | extern int kdk_printer_print_local_file(const char *printername, char *filepath); | print documents |
| | | Parameter Description | Return value description |
| | | printername: 打印机名 <br> filepath打印文件绝对路径 | int 打印作业的id |
| | | printername: 打印机名 <br> filepathPrint the absolute path of the file | int id of the print job |
取消打印作业
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|-----------------|-------|-----------------------------------------------|--------|
| 打印机管理 | C | extern int kdk_printer_cancel_all_jobs(const char *printername); | 取消打印作业 |
| printer management | C | extern int kdk_printer_cancel_all_jobs(const char *printername); | cancel print job |
| | | Parameter Description | Return value description | |
| | | printername打印机名 | int <br> 成功0 <br> 失败:-1 |
| | | printername打印机名 | int <br> Success: 0 <br> Failed:-1 |
获取打印机状态
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|------------|----------|-------------------------------------------------------------|----------------|
| 打印机管理 | C | extern int kdk_printer_get_status(const char *printername); | 获取打印机状态 |
| printer management | C | extern int kdk_printer_get_status(const char *printername); | Get printer status |
| | | Parameter Description | Return value description |
| | | printername打印机名 | 打印机状态码 |
| | | printername打印机名 | printer status code |
从url中解析下载的文件名
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|------------|----------|------------------------------------------------------------------------|-----------------------|
| 打印机管理 | C | extern void kdk_printer_get_filename(const char *url, char *filename); | 从url解析下载的文件名 |
| printer management | C | extern void kdk_printer_get_filename(const char *url, char *filename); | Parse downloaded filename from url |
| | | Parameter Description | Return value description |
| | | url下载链接 | |
| | | filename解析出来的文件名 | |
@ -1293,19 +1293,19 @@ Set print parameters
获取当前打印任务状态
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|------------|----------|----------------------------------------------------------------------------|----------------------|
| 打印机管理 | C | extern int kdk_printer_get_job_status(const char *printername, int jobid); | 获取当前打印任务状态 |
| printer management | C | extern int kdk_printer_get_job_status(const char *printername, int jobid); | Get current print job status |
| | | Parameter Description | Return value description |
| | | printername打印机名 | 打印任务状态码 |
| | | printername打印机名 | print task status code |
下载网络文件到本地
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|------------|----------|-------------------------------------------------------------------------------------------|--------------------|
| 打印机管理 | C | extern int kdk_printer_print_download_remote_file(const char *url, const char *filepath); | 下载网络文件到本地 |
| printer management | C | extern int kdk_printer_print_download_remote_file(const char *url, const char *filepath); | Download network files to local |
| | | Parameter Description | Return value description |
| | | url网络文件 | 下载状态码 |
| | | url网络文件 | download status code |
| | | filepath要保存的文件路径用户自定义 | |
@ -2427,7 +2427,7 @@ target_link_libraries(demo Qt5::Widgets ${KYSDKWAYLANDHELPER_PKG_LIBRARIES})
### 4.3.1 日志模块
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|------|------|--------------------------------------------------------------------------------------------------|--------------------|
| 日志模块 | C++ | static void logOutput(QtMsgType type , const QMessageLogContext &context , const QString &msg); | 用于Qt注册日志函数不应单独调用. |
| | | Parameter Description | Return value description |
@ -2437,7 +2437,7 @@ target_link_libraries(demo Qt5::Widgets ${KYSDKWAYLANDHELPER_PKG_LIBRARIES})
### 4.3.2 系统相关模块
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|------|------|---------------------------------------------|------------|
| 窗管模块 | C++ | static bool setWindowMotifHint(int winId); | 添加窗管协议 . |
| | | Parameter Description | Return value description |
@ -2446,14 +2446,14 @@ target_link_libraries(demo Qt5::Widgets ${KYSDKWAYLANDHELPER_PKG_LIBRARIES})
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|------|------|------------------------------------------|------------|
| 窗管模块 | C++ | static bool setScalingProperties(void); | 设置窗口缩放属性 |
| | | Parameter Description | Return value description |
| | | 无 | 成功 : true |
| | | | 失败 : false |
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|-----------|------|-----------------------------------------------------------------|---------------|
| session模块 | C++ | quint32 setInhibitLockScreen(AppName appName , QString reason); | 禁止系统锁屏 . |
| | | Parameter Description | Return value description |
@ -2462,7 +2462,7 @@ target_link_libraries(demo Qt5::Widgets ${KYSDKWAYLANDHELPER_PKG_LIBRARIES})
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|-----------|------|----------------------------------------|------------|
| session模块 | C++ | bool unInhibitLockScreen(quint32 flag) | 取消禁止系统锁屏 . |
| | | Parameter Description | Return value description |
@ -2474,7 +2474,7 @@ target_link_libraries(demo Qt5::Widgets ${KYSDKWAYLANDHELPER_PKG_LIBRARIES})
### 4.3.3 d-bus 模块------即将废弃
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|-----------|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------|
| d-bus模块 | C++ | static QList<QVariant> callMethod(QString serviceName, QString objectPath, QString interfaceName, QString methodName, QList<QVariant> args = QList<QVariant>()); | 函数调用 |
| | | Parameter Description | Return value description |
@ -2489,7 +2489,7 @@ target_link_libraries(demo Qt5::Widgets ${KYSDKWAYLANDHELPER_PKG_LIBRARIES})
### 4.3.4 系统信息模块
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|--------|------|-------------------------------------------------|-------------------------------|
| 系统信息模块 | C++ | QString getLsbReleaseInformation(QString key); | 根据 lsb-release 文件的 key 值 获取信息 |
| | | Parameter Description | Return value description |
@ -2498,14 +2498,14 @@ target_link_libraries(demo Qt5::Widgets ${KYSDKWAYLANDHELPER_PKG_LIBRARIES})
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|--------|------|------------------------------------------------|------------------------------|
| 系统信息模块 | C++ | QString getOsReleaseInformation(QString key); | 根据 os-release 文件的 key 值 获取信息 |
| | | Parameter Description | Return value description |
| | | key : 键值 | 获取到的信息 , 为空时可能确实为空也可能失败 |
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|--------|------|-----------------------------------|--------------------------|
| 系统信息模块 | C++ | QString getProjectCodeName(void) | 获取 PROJECT_CODENAME 字段的值 |
| | | Parameter Description | Return value description |
@ -2515,7 +2515,7 @@ target_link_libraries(demo Qt5::Widgets ${KYSDKWAYLANDHELPER_PKG_LIBRARIES})
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|--------|------|--------------------------------|------------|
| 系统信息模块 | C++ | QString getCpuModelName(void) | 获取 CPU 型号 |
| | | Parameter Description | Return value description |
@ -2525,7 +2525,7 @@ target_link_libraries(demo Qt5::Widgets ${KYSDKWAYLANDHELPER_PKG_LIBRARIES})
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|--------|------|-------------------------------|------------|
| 系统信息模块 | C++ | QString getHdPlatform(void); | 获取硬件平台信息 |
| | | Parameter Description | Return value description |
@ -2598,7 +2598,7 @@ target_link_libraries(kylog-testpressure kylog)
> 初始化日志记录
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|-----|------|-----------------------------------|----------------------------------|
| 日志 | C | extern int | kdk_logger_init(const char *ini) | 初始化日志记录,也可以不调用该函数直接使用上方日志记录的宏,若以此方式运行,则程序会使用默认的日志配置文件 |
| | | Parameter Description | Return value description | |
@ -2607,7 +2607,7 @@ target_link_libraries(kylog-testpressure kylog)
> 缓存区日志写入
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|-----|------|-------------|--------------------------------|
| 日志 | C | extern void | kdk_logger_flush() DESTRUCTOR; | 在异步写入的方式下,可以调用该函数手动将缓存区中的日志写入文件中 |
| | | Parameter Description | Return value description | |
@ -2617,7 +2617,7 @@ target_link_libraries(kylog-testpressure kylog)
> 设置日志存储目录
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|-----|------|-------------------------------------------------|---------------------------------------------------------|
| 日志 | C | extern int kdk_logger_setdir(const char* dpath) | 设置日志的存储目录若不设置非root程序会被记录在~/.log下root程序会被记录在/var/log下 |
| | | Parameter Description | Return value description | |
@ -2628,7 +2628,7 @@ target_link_libraries(kylog-testpressure kylog)
> 设置日志输出自动换行
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|-----|------|---------------------------------------------------|------------|
| 日志 | C | extern void kdk_logger_set_autowrap(int autowarp) | 设置日志输出自动换行 |
| | | Parameter Description | Return value description | |
@ -2664,7 +2664,7 @@ target_link_libraries(test-kytimer kytimer)
>
> 初始化定时器
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|-----|------|----------------------|------------------|
| 定时器 | C | int kdk_timer_init() | 初始化定时器核心组件 |
| | | Parameter Description | Return value description | |
@ -2674,7 +2674,7 @@ target_link_libraries(test-kytimer kytimer)
> 启动定时器
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|-----|------|----------------------|------------------|
| 定时器 | C | size_t | kdk_timer_start(unsigned int intervalms, time_handler callback, KTimerAttribute attr, KTimerType type, void* userdata, int freeOnDelete) |
| | | Parameter Description | Return value description |
@ -2690,7 +2690,7 @@ target_link_libraries(test-kytimer kytimer)
> 停止给定的定时器
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|-----|------|-------------------------------------|----------|
| 定时器 | C | void kdk_timer_stop(size_t timerfd) | 停止给定的定时器 |
| | | Parameter Description | Return value description | |
@ -2701,7 +2701,7 @@ target_link_libraries(test-kytimer kytimer)
> 销毁定时器
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|-----|------|--------------------------|-------|
| 定时器 | C | void kdk_timer_destroy() | 销毁定时器 |
| | | Parameter Description | Return value description | |
@ -2712,7 +2712,7 @@ target_link_libraries(test-kytimer kytimer)
> 重置定时器
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|-----|------|----------------------------------------------------------------|-------|
| 定时器 | C | void kdk_timer_reset(size_t timerfd , unsigned int intervalms) | 重置定时器 |
| | | Parameter Description | Return value description |
@ -2740,7 +2740,7 @@ $ sudo apt-get install libkysdk-utils libkysdk-utils-dev
> 分割字符串
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|----------|------|-----------------------------------------|--------------------|
| C语言字符串扩展 | C | static inline char** strsplit(char *str, char delim) | 对原字符串以给定的分隔符进行分割,注意该函数会修改原字符串 |
| | | Parameter Description | Return value description |
@ -2751,7 +2751,7 @@ $ sudo apt-get install libkysdk-utils libkysdk-utils-dev
> 小写字符串
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|----------|------|-----------------------------------------|--------------------|
| C语言字符串扩展 | C | static inline void str2lower(char *str) | 将字符串中的所有大写字母转化为小写字 |
| | | Parameter Description | Return value description | |
@ -2762,7 +2762,7 @@ $ sudo apt-get install libkysdk-utils libkysdk-utils-dev
> 大写字符串
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|----------|------|-----------------------------------------|---------------------|
| C语言字符串扩展 | C | static inline void str2upper(char *str) | 将字符串中的所有小写字母转化为大写字母 |
| | | Parameter Description | Return value description | |
@ -2772,7 +2772,7 @@ $ sudo apt-get install libkysdk-utils libkysdk-utils-dev
> 统计出现次数
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|----------|------|----------------------------------------------------------|------------------|
| C语言字符串扩展 | C | static inline size_t strcounts(const char *str, char ch) | 统计给定字符在字符串中出现的次数 |
| | | Parameter Description | Return value description |
@ -2783,7 +2783,7 @@ $ sudo apt-get install libkysdk-utils libkysdk-utils-dev
> 后缀判断
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|----------|------|--------------------------------------------------------------------|-------------------------------|
| C语言字符串扩展 | C | static inline int strendwith(const char *str, const char *postfix) | 判断str是否以postfix结尾需要区分大小写 |
| | | Parameter Description | Return value description |
@ -2795,7 +2795,7 @@ $ sudo apt-get install libkysdk-utils libkysdk-utils-dev
> 查找子字符串的首次出现位置
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|----------|------|--------------------------------------------------------|-------------------------------|
| C语言字符串扩展 | C | static inline int strfirstof(const char* str, char ch) | 在给定的字符串中查找给定字符第一次出现的位置计数从0开始 |
| | | Parameter Description | Return value description |
@ -2807,7 +2807,7 @@ $ sudo apt-get install libkysdk-utils libkysdk-utils-dev
> 查找子字符串的末次出现位置
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|----------|------|-------------------------------------------------------|--------------------------------|
| C语言字符串扩展 | C | static inline int strlastof(const char* str, char ch) | 在给定的字符串中查找给定字符最后一次出现的位置计数从0开始 |
| | | Parameter Description | Return value description |
@ -2819,7 +2819,7 @@ $ sudo apt-get install libkysdk-utils libkysdk-utils-dev
> 删除空格和制表符
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|----------|------|---------------------------------------------|--------------------------------------|
| C语言字符串扩展 | C | static inline void strstripblank(char *str) | 删除给定字符串前后的空格和水平制表符tab注意该操作会修改原字符串 |
| | | Parameter Description | Return value description | |
@ -2830,7 +2830,7 @@ $ sudo apt-get install libkysdk-utils libkysdk-utils-dev
> 跳过开始的所有空格、制表符、换行符
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|----------|------|-------------------------------------------------------|---------------------------------|
| C语言字符串扩展 | C | static inline const char *strskipspace(const char *p) | 跳过字符串前的所有空格、制表符、换行符;该操作不会修改原字符串 |
| | | Parameter Description | Return value description | |
@ -2841,7 +2841,7 @@ $ sudo apt-get install libkysdk-utils libkysdk-utils-dev
> 前缀判断(区分大小写)
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|----------|------|----------------------------------------------------------------------|------------------------------|
| C语言字符串扩展 | C | static inline int strstartswith(const char *str, const char *prefix) | 判断str是否以prefix开头该函数区分大小写 |
| | | Parameter Description | Return value description |
@ -2853,7 +2853,7 @@ $ sudo apt-get install libkysdk-utils libkysdk-utils-dev
> 前缀判断(不区分大小写)
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|----------|------|-----------------------------------------------------------------------------|------------------------------|
| C语言字符串扩展 | C | static inline int strstartswith_nocase(const char *str, const char *prefix) | 判断str是否以prefix开头不区分大小写 |
| | | Parameter Description | Return value description |
@ -2864,7 +2864,7 @@ $ sudo apt-get install libkysdk-utils libkysdk-utils-dev
> 删减字符串前后的指定字符
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|----------|------|-------------------------------------------------|--------------------------------------------|
| C语言字符串扩展 | C | static inline void strstrip(char *str, char ch) | 对给定的字符串进行strip操作删减字符串前后的指定字符注意该操作会修改原字符串 |
| | | Parameter Description | Return value description |
@ -2876,7 +2876,7 @@ $ sudo apt-get install libkysdk-utils libkysdk-utils-dev
> 跳过开始的所有空格、水平制表符
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|----------|------|-------------------------------------------------------|------------------------------------|
| C语言字符串扩展 | C | static inline const char *strskipblank(const char *p) | 跳过字符串前的所有空格和水平制表符tab该操作不会修改原字符串 |
| | | Parameter Description | Return value description | |
@ -2887,7 +2887,7 @@ $ sudo apt-get install libkysdk-utils libkysdk-utils-dev
> 删除前后的空格、制表符、换行符
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|----------|------|---------------------------------------------|-----------------------------------|
| C语言字符串扩展 | C | static inline void strstripspace(char *str) | 删除给定字符串前后的空格、制表符、换行符,注意该操作会修改原字符串 |
| | | Parameter Description | Return value description | |
@ -2930,7 +2930,7 @@ target_link_libraries(test-search kydatastruct)
| | | | |
|-----|------|------------------------------------------------|---------------------|
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
| 链表 | C | extern kysdk_skiplist* kysdk_create_skiplist() | 创建跳表 |
| | | Parameter Description | Return value description | |
| | | 无 | kysdk_skiplist* 跳表 |
@ -2941,7 +2941,7 @@ target_link_libraries(test-search kydatastruct)
| | | | |
|-----|------|----------------------------------------------------------|-------------------------------------------|
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
| 链表 | C | extern void kysdk_destroy_skiplist(kysdk_skiplist *list) | 销毁跳表并回收所有分配的内存注意data.ptr指向的内存若存在不会被释放 |
| | | Parameter Description | Return value description | |
| | | list跳表 | 无 |
@ -2953,7 +2953,7 @@ target_link_libraries(test-search kydatastruct)
| | | | |
|-----|------|-----------------------------------------------------------------|---------------------|
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
| 链表 | C | extern int kysdk_skiplist_delete(kysdk_skiplist *list, int key) | 删除key值对应的节点 |
| | | Parameter Description | Return value description |
| | | list需要操作的链表 | int, 成功删除返回0失败返回-1 |
@ -2966,7 +2966,7 @@ target_link_libraries(test-search kydatastruct)
| | | | |
|-----|------|--------------------------------------------------------------------------------------|--------------------|
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
| 链表 | C | extern int kysdk_skiplist_insert(kysdk_skiplist *list, int key, kysdk_listdata data) | 插入节点 |
| | | Parameter Description | Return value description |
| | | list需要操作的链表 | int成功插入返回0失败返回-1 |
@ -2979,7 +2979,7 @@ target_link_libraries(test-search kydatastruct)
| | | | |
|-----|------|----------------------------------------------------------------------------|-----------------------------------------|
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
| 链表 | C | extern kysdk_listdata kysdk_skiplist_search(kysdk_skiplist *list, int key) | 根据给定的key搜索data内容 |
| | | Parameter Description | Return value description |
| | | list需要操作的链表 | kysdk_listdata当搜索的key不存在时data.num值为-1 |
@ -2992,7 +2992,7 @@ target_link_libraries(test-search kydatastruct)
| | | | |
|-----|------|--------------------------------------------------------------------------------------|------------------------|
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
| 链表 | C | extern int kysdk_skiplist_setmaxlevels(kysdk_skiplist *list, unsigned int maxlevels) | 设置跳表最高层数,该选项必须在跳表为空时使用 |
| | | Parameter Description | Return value description |
| | | list需要修改的跳表 | int成功返回0失败返回-1 |
@ -3026,7 +3026,7 @@ target_link_libraries(kyconf-test-struct kyconf kylog pthread)
> 初始化配置文件
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|--------|------|------------------------------------------------|------------------------------|
| 配置文件操作 | C | extern int kdk_conf_init(const char* confpath) | 初始化配置文件 |
| | | Parameter Description | Return value description | |
@ -3037,7 +3037,7 @@ target_link_libraries(kyconf-test-struct kyconf kylog pthread)
> 销毁指定的配置文件句柄
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|--------|------|--------------------------------------|-------------|
| 配置文件操作 | C | extern void kdk_conf_destroy(int id) | 销毁指定的配置文件句柄 |
| | | Parameter Description | Return value description | |
@ -3048,7 +3048,7 @@ target_link_libraries(kyconf-test-struct kyconf kylog pthread)
> 重新载入配置文件
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|--------|------|------------------------------------|-------------------|
| 配置文件操作 | C | extern int kdk_conf_reload(int id) | 重新载入配置文件 |
| | | Parameter Description | Return value description | |
@ -3059,7 +3059,7 @@ target_link_libraries(kyconf-test-struct kyconf kylog pthread)
> 获取指定配置项的值
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|--------|------|-----------------------------------------------------------------------------------|----------------------------------------|
| 配置文件操作 | C | extern const char* kdk_conf_get_value(int id, const char* group, const char* key) | 获取指定配置项的值 |
| | | Parameter Description | Return value description |
@ -3072,7 +3072,7 @@ target_link_libraries(kyconf-test-struct kyconf kylog pthread)
> 枚举 key 值
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|--------------|----------|------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------|
| 配置文件操作 | C | extern char** const kdk_conf_list_key(int id, const char* group) | 列举id对应配置文件的指定Group下的key值结尾以NULL指针表示 |
| | | Parameter Description | Return value description |
@ -3084,7 +3084,7 @@ target_link_libraries(kyconf-test-struct kyconf kylog pthread)
> 枚举配置文件的 Group
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|--------|------|-------------------------------------------------|--------------------------------------------------------------------------------------|
| 配置文件操作 | C | extern char** const kdk_conf_list_group(int id) | 列举id对应配置文件的所有Group结尾以NULL指针表示 |
| | | Parameter Description | Return value description | |
@ -3108,7 +3108,7 @@ $ sudo apt-get install libkysdk-utils libkysdk-utils-dev
>
> 字符格式单位进制转换
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|--------|------|----------------------------------------------------------------------------------------------------------------------|-----------------|
| 配置文件操作 | C | extern int kdkVolumeBaseCharacterConvert(const char* origin_data, KDKVolumeBaseType result_base, char* result_data); | 字符格式单位进制转换 |
| | | Parameter Description | Return value description |
@ -3123,7 +3123,7 @@ $ sudo apt-get install libkysdk-utils libkysdk-utils-dev
> 数字格式单位进制转换
| submodule | 编程语言 | statement | describe |
| submodule | Programming language | statement | describe |
|--------|-------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|------------|
| 配置文件操作 | C | extern int kdkVolumeBaseNumericalConvert(double origin_numerical, KDKVolumeBaseType origin_base, KDKVolumeBaseType result_base, double* result_numerical); | 数字格式单位进制转换 |
| | Parameter Description | Return value description | |