diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-04-07 14:47:07 -0400 |
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-04-07 14:47:07 -0400 |
| commit | 2756e9c818cfe240255de4680136162341480adc (patch) | |
| tree | ff6db388f4176fc0f5dd2982f06c3414b30d7f6f | |
| parent | b2408704c5534faa6050b298913b31f0c10376c8 (diff) | |
| download | stasis-2756e9c818cfe240255de4680136162341480adc.tar.gz | |
Finish commenting function prototypes
| -rw-r--r-- | src/lib/core/include/wheel.h | 43 |
1 files changed, 40 insertions, 3 deletions
diff --git a/src/lib/core/include/wheel.h b/src/lib/core/include/wheel.h index 2b3d5f1..765f2c3 100644 --- a/src/lib/core/include/wheel.h +++ b/src/lib/core/include/wheel.h @@ -206,15 +206,52 @@ void wheel_package_free(struct Wheel **pkg); /** * Get wheel data by name * @param pkg pointer to an initialized `Wheel` - * @param from - * @param key - * @return + * @param from `WHEEL_FROM_DIST`, `WHEEL_FROM_META` + * @param key name of key in DIST or META data + * @return a populated `WheelValue` (stack) */ struct WheelValue wheel_get_value_by_name(const struct Wheel *pkg, int from, const char *key); + + +/** + * Get wheel data by internal identifier + * @param pkg pointer to an initialized `Wheel` + * @param from `WHEEL_FROM_DIST`, `WHEEL_FROM_META` + * @param id `WHEEL_META_VERSION`, `WHEEL_DIST_VERSION` (see wheel.h) + * @return a populated `WheelValue` (stack) + */ struct WheelValue wheel_get_value_by_id(const struct Wheel *pkg, int from, ssize_t id); + +/** + * Returns the error code assocated with the `WheelValue`, if possible + * @param val a populated `WheelValue` + * @return error code (see wheel.h) + */ int wheel_value_error(struct WheelValue const *val); + +/** + * Retreive the key name string for a given id + * @param from `WHEEL_FROM_DIST`, `WHEEL_FROM_META` + * @param id `WHEEL_META_VERSION`, `WHEEL_DIST_VERSION` (see wheel.h) + * @return the key name, or NULL + */ const char *wheel_get_key_by_id(int from, ssize_t id); + +/** + * Get the contents of a file within a Python wheel + * @param wheelfile path to Python wheel file + * @param filename path to file inside of wheel file archive + * @param contents pointer to store file contents + * @return 0 on success, -1 on error + */ int wheel_get_file_contents(const char *wheelfile, const char *filename, char **contents); + +/** + * Display the values of a `Wheel` structure in human readable format + * + * @param wheel + * @return 0 on success, -1 on error + */ int wheel_show_info(const struct Wheel *wheel); #endif //WHEEL_H |
