.TH "LIBKYPACKAGE" 3 "Mon Sep 18 2023" "Linux Programmer's Manual" \" .SH NAME kdk_package_get_packagelist, kdk_package_free_packagelist, kdk_package_get_version, kdk_package_is_installed - 获取包列表信息 .SH SYNOPSIS .nf .B #include .sp .BI "extern kdk_package_list* kdk_package_get_packagelist();" .sp .BI "extern void kdk_package_free_packagelist(kdk_package_list *"list ");" .sp .BI "extern char* kdk_package_get_version(const char *"name ");" .sp .BI "extern int kdk_package_is_installed(const char *"name ", const char *"version ");" .sp Link with \fI\-lkypackage\fP. .SH "Detailed Description" This library contains package list information. .SH DATA STRUCTURES Structure \fBkdk_package_list\fR contains information related to a package list: \fBtypedef struct { .br unsigned int nums; kdk_package_t **list; .br } kdk_package_list;\fP There are other members not documented here, which are only meant for libkypackage internal use. Structure \fBkdk_package_t\fR contains information related to a package specific information: \fBtypedef struct _kdk_package_t { .br char *name; // 包名 char *version; // 版本号 char *section; // 包类型 char *status; // 状态 unsigned long size_kb; // 包大小 struct _kdk_package_t **depends; // 依赖包 .br } kdk_package_t;\fP There are other members not documented here, which are only meant for libkypackage internal use. .SH "RETURN VALUE" The return value is generally specific to the individual function called. .SH "CONFORMING TO" These functions are as per the withdrawn POSIX.1e draft specification. The following functions are Linux extensions: .BR kdk_package_get_packagelist (), .BR kdk_package_free_packagelist (), .BR kdk_package_get_version () and .BR kdk_package_is_installed (). .SH "SEE ALSO" .BR kdk_package_get_packagelist (3), .BR kdk_package_free_packagelist (3), .BR kdk_package_get_version (3) and .BR kdk_package_is_installed (3).