LIBKYPACKAGE(3)

NAME
kdk_package_get_packagelist, kdk_package_free_packagelist, kdk_package_get_version, kdk_package_is_installed - 获取包列表信息

SYNOPSIS
#include <libkypackages.h>

extern kdk_package_list* kdk_package_get_packagelist();

extern void kdk_package_free_packagelist(kdk_package_list *list);

extern char* kdk_package_get_version(const char *name);

extern int kdk_package_is_installed(const char *name, const char *version);

Link with -lkypackage.

Detailed Description
This library contains package list information.

DATA STRUCTURES

Structure kdk_package_list contains information related to a package list:

typedef struct {
    unsigned int nums;
    kdk_package_t **list;
} kdk_package_list;

There are other members not documented here, which are only meant for libkypackage internal use.

Structure kdk_package_t contains information related to a package specific information:

typedef struct _kdk_package_t {
    char *name; // 包名
    char *version; // 版本号
    char *section; // 包类型
    char *status; // 状态
    unsigned long size_kb; // 包大小
    struct _kdk_package_t **depends; // 依赖包
} kdk_package_t;

There are other members not documented here, which are only meant for libkypackage internal use.

RETURN VALUE
The return value is generally specific to the individual function called.

CONFORMING TO
These functions are as per the withdrawn POSIX.1e draft specification. The following functions are Linux extensions: kdk_package_get_packagelist(), kdk_package_free_packagelist(), kdk_package_get_version() and kdk_package_is_installed().

SEE ALSO
kdk_package_get_packagelist(3), kdk_package_free_packagelist(3), kdk_package_get_version(3) and kdk_package_is_installed(3).