2023-01-29 12:48:59 +01:00
|
|
|
#ifndef VIETER_PACKAGE
|
|
|
|
#define VIETER_PACKAGE
|
|
|
|
|
2023-01-31 22:00:08 +01:00
|
|
|
typedef struct vieter_package vieter_package;
|
2023-01-29 12:48:59 +01:00
|
|
|
|
2023-01-31 22:08:09 +01:00
|
|
|
typedef enum vieter_package_error {
|
2023-02-02 11:17:16 +01:00
|
|
|
vieter_package_ok = 0,
|
|
|
|
vieter_package_unarchive_error = 1,
|
|
|
|
vieter_package_stat_error = 2
|
2023-01-31 22:08:09 +01:00
|
|
|
} vieter_package_error;
|
2023-01-29 12:48:59 +01:00
|
|
|
|
2023-01-31 22:08:09 +01:00
|
|
|
/*
|
|
|
|
* Allocate an empty package
|
|
|
|
*/
|
|
|
|
vieter_package *vieter_package_init();
|
2023-01-29 12:48:59 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Parse package file into something usable by libvieter.
|
|
|
|
*/
|
2023-02-02 11:17:16 +01:00
|
|
|
vieter_package_error vieter_package_read_archive(vieter_package *pkg,
|
|
|
|
const char *pkg_path);
|
2023-01-29 12:48:59 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Deallocate a package.
|
|
|
|
*/
|
2023-02-02 11:17:16 +01:00
|
|
|
void vieter_package_free(vieter_package **ptp);
|
2023-01-29 12:48:59 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Create string that will become the package's desc file.
|
|
|
|
*/
|
2023-01-29 13:45:48 +01:00
|
|
|
char *vieter_package_to_description(vieter_package *pkg);
|
2023-01-29 12:48:59 +01:00
|
|
|
|
|
|
|
#endif
|