v0.5.0: manifests, filters, logging, docs
pipeline / build (push) Has been cancelled
pipeline / test (push) Has been cancelled

This commit is contained in:
Ein Anderssono
2026-06-15 00:00:06 +02:00
parent 3d3c4a4742
commit 2e73d01b40
33 changed files with 7238 additions and 512 deletions
+32 -4
View File
@@ -2,7 +2,9 @@
#include <string.h>
#include "../bridge/photokit_bridge.h"
static export_progress_t stub_progress_slots[3];
static export_progress_t stub_progress_slots[16];
static int stub_progress_slot_count = 16;
static int stub_progress_slots_null = 0;
static char *alloc_json(const char *s) {
size_t len = strlen(s);
@@ -49,10 +51,11 @@ char *photos_list_assets_json(const char *album_id) {
return alloc_json(stub_assets_json);
}
char *photos_export_preview_json(const char *asset_id, const char *output_dir, int target_size, int index, int slot_index) {
char *photos_export_preview_json(const char *asset_id, const char *output_dir, int target_size, int quality, int index, int slot_index) {
(void)asset_id;
(void)output_dir;
(void)target_size;
(void)quality;
(void)index;
(void)slot_index;
return maybe_alloc_json(stub_export_preview_json);
@@ -87,18 +90,43 @@ void photos_test_set_export_preview_json(const char *json) {
stub_export_preview_json = json;
}
void photos_test_set_export_preview_json_null(void) {
stub_export_preview_json = NULL;
}
void photos_test_set_export_original_json(const char *json) {
stub_export_original_json = json;
}
void photos_test_set_export_original_json_null(void) {
stub_export_original_json = NULL;
}
export_progress_t *photos_get_progress_slots(void) {
if (stub_progress_slots_null) return NULL;
return stub_progress_slots;
}
export_progress_t photos_get_progress_slot(export_progress_t *slots, int index) {
export_progress_t result = {0, 0.0, 0, 0};
if (index >= 0 && index < 16) {
result = slots[index];
}
return result;
}
int photos_get_progress_slot_count(void) {
return 3;
return stub_progress_slot_count;
}
void photos_reset_progress_slots(void) {
memset(stub_progress_slots, 0, sizeof(stub_progress_slots));
}
}
void photos_test_set_progress_slot_count(int count) {
stub_progress_slot_count = count;
}
void photos_test_set_progress_slots_null(int val) {
stub_progress_slots_null = val;
}