|
3 | 3 |
|
4 | 4 | #include <stddef.h> |
5 | 5 |
|
6 | | -/* |
7 | | - * Scans directories and populates json_buf with a JSON array of payloads. |
8 | | - * Returns the length of the string written. |
| 6 | +/* |
| 7 | + * Scans directories and populates json_buf with a JSON array of payloads. |
| 8 | + * Returns the length of the string written. |
9 | 9 | */ |
10 | 10 | size_t payload_mgr_list_json(char *json_buf, size_t buf_size); |
11 | 11 | int payload_mgr_resolve_path(const char *filename, char *out_path, size_t out_size); |
12 | 12 | int payload_mgr_delete_payload_file(const char *filename); |
13 | 13 |
|
14 | | -int payload_mgr_repository_ensure_fresh(int force_refresh); |
15 | | -size_t payload_mgr_repository_list_json(char *json_buf, size_t buf_size, int force_refresh); |
16 | | -int payload_mgr_repository_install_download(const char *filename, const char *install_source_detail, char *msg_buf, size_t msg_buf_size); |
17 | | -int payload_mgr_repository_install_commit(const char *filename, const char *temp_path, const char *install_source, const char *install_source_detail, char *msg_buf, size_t msg_buf_size); |
18 | | -int payload_mgr_import_to_storage(const char *filename, const char *temp_path, const char *install_source, const char *install_source_detail, char *msg_buf, size_t msg_buf_size); |
| 14 | +int payload_mgr_import_to_storage(const char *filename, const char *temp_path, |
| 15 | + const char *install_source, const char *install_source_detail, |
| 16 | + char *msg_buf, size_t msg_buf_size); |
19 | 17 | int payload_mgr_check_existing(const char *filename, char *out_json, size_t out_size); |
20 | | -int payload_mgr_write_metadata(const char *payload_path, const char *install_source, const char *install_source_detail); |
21 | | -int payload_mgr_repository_push_json(const char *json, size_t len); |
| 18 | +int payload_mgr_write_metadata(const char *payload_path, const char *install_source, |
| 19 | + const char *install_source_detail); |
22 | 20 |
|
23 | 21 | /* USB Import */ |
24 | 22 | int payload_mgr_usb_check(const char *usb_path, char *out_json, size_t out_size); |
25 | | -int payload_mgr_usb_move(const char *usb_path, int overwrite, char *out_json, size_t out_size); |
| 23 | +int payload_mgr_usb_move(const char *usb_path, int overwrite, char *out_json, |
| 24 | + size_t out_size); |
26 | 25 |
|
27 | | -int payload_mgr_check_self_update(char *out_path, size_t out_size); |
28 | | - |
29 | | -/* Sources Management */ |
30 | | -int payload_mgr_sources_list_json(char *buf, size_t size); |
31 | | -int payload_mgr_sources_save(const char *json, size_t len); |
32 | | -int payload_mgr_sources_add(const char *url, char *msg_buf, size_t msg_size); |
33 | | -int payload_mgr_sources_remove(int index, char *msg_buf, size_t msg_size); |
34 | | - |
35 | | -/* Multi-Source Repository */ |
36 | | -size_t payload_mgr_multi_repository_list_json(char *buf, size_t size, int force_refresh); |
37 | | -int payload_mgr_multi_repository_install(const char *filename, const char *source_id, const char *repo_url, char *msg, size_t msg_size); |
38 | | - |
39 | | -/* Processes Management */ |
40 | | -size_t payload_mgr_process_list_json(char *buf, size_t max_size); |
41 | | -int payload_mgr_process_kill(int pid); |
| 26 | +/* Internal utility — exposed for use by repository.c and sources.c */ |
| 27 | +void payload_mgr_remove_old_files(const char *dir_path, const char *new_filename); |
42 | 28 |
|
43 | 29 | #endif |
0 commit comments