From dc25a788d874d9ee95738b9fa56d2a06f6a31141 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sun, 30 Apr 2023 03:44:20 -0400 Subject: opk/write: Build mode (WIP) --- (limited to 'src/opk.h') diff --git a/src/opk.h b/src/opk.h index 049953f..8148dc8 100644 --- a/src/opk.h +++ b/src/opk.h @@ -80,8 +80,9 @@ int opkg_opk_opk_list_data(struct opkg_opk_opk *opk); /* - * Sets the directory into which to extract control files. The directory (but - * not its ancestors) will be created if it doesn't exist. + * Sets the directory into which to extract control files when reading or in + * which to find control files when writing. When extracting, the directory + * (but not its ancestors) will be created if it doesn't exist. * Parameters: * - opk: Package structure. * - dir: Directory. @@ -92,6 +93,17 @@ int opkg_opk_opk_control_dir(struct opkg_opk_opk *opk, const char *dir); /* + * Sets the directory in which to find data files when writing. + * Parameters: + * - opk: Package structure. + * - dir: Directory. + * Returns: + * - OPKG_OPK_OK. + */ +int +opkg_opk_opk_data_dir(struct opkg_opk_opk *opk, const char *dir); + +/* * Performs the configured read actions. * Parameters: * - file_name: Package's file name. @@ -100,6 +112,14 @@ int opkg_opk_opk_read(struct opkg_opk_opk *opk, const char *file_name); /* + * Performs the configured write actions. + * Parameters: + * - file_name: Package's file name. + */ +int +opkg_opk_opk_write(struct opkg_opk_opk *opk, const char *file_name); + +/* * Frees a package structure. * Parameters: * - opk: Package structure. -- cgit v0.9.1