diff options
Diffstat (limited to 'src/opk.h')
-rw-r--r-- | src/opk.h | 41 |
1 files changed, 21 insertions, 20 deletions
@@ -25,43 +25,44 @@ struct opkg_opk_opk; /* - * Allocates and initializes a package structure. - * Parameters: - * - file_name: Package's file name. + * Allocates a package structure. Free with opkg_opk_opk_free(). * Returns: * - Allocated package structure on success. Free with opkg_opk_opk_free(). * - NULL on memory exhaustion. */ struct opkg_opk_opk * -opkg_opk_opk_init(const char *file_name); +opkg_opk_opk_init(void); /* - * Reads and prints all specified control files. + * Adds a name to a list of control files to print when opkg_opk_opk_read() is + * called. * Parameters: - * - opk: Package structure. - * - names: List of control file names to read. + * - opk: Package structure. + * - name: Name of control file to print. * Returns: - * - OPKG_OPK_OK if all control files are found, read, and printed. - * - OPKG_OPK_ERROR if any control file is not found or on decompression error, - * premature end of gzip stream, an invalid header, unsupported file type, or - * error writing to standard output. + * - OPKG_OPK_OK if the name was added to the list. + * - OPKG_OPK_ERROR on memory exhaustion. */ int -opkg_opk_opk_read_control(struct opkg_opk_opk *opk, - struct opkg_opk_ustar_seek_name *names); +opkg_opk_opk_print_control(struct opkg_opk_opk *opk, const char *name); /* - * Lists and prints all data files. + * Lists data files when opkg_opk_opk_read() is called. * Parameters: - * - opk: Package structure. + * - opk: Package structure. * Returns: - * - OPKG_OPK_OK if all data files are listed and printed. - * - OPKG_OPK_ERROR on decompression error, memory exhaustion, mode or mtime - * integer conversion error, unsupported file type, or error writing to - * standard output. + * - OPKG_OPK_OK. + */ +int +opkg_opk_opk_list_data(struct opkg_opk_opk *opk); + +/* + * Performs the configured read actions. + * Parameters: + * - file_name: Package's file name. */ int -opkg_opk_opk_list_members(struct opkg_opk_opk *opk); +opkg_opk_opk_read(struct opkg_opk_opk *opk, const char *file_name); /* * Frees a package structure. |