#include <stdint.h>
#include <string.h>
#include "sharekit_api.h"
static void dummy_progress(ShareProgress *p) { (void)p; }
static void dummy_status(ShareStatus *s) { (void)s; }
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
static int sdk_inited = 0;
if (!sdk_inited) {
InitContext ctx = {0};
InitShareKit(&ctx);
sdk_inited = 1;
}
char device_id[NAME_STR_LEN] = {0};
memcpy(device_id, data, (size < NAME_STR_LEN) ? size : NAME_STR_LEN);
SendFileHandler handler = {0};
if (size > 0 && data[0] % 2 == 0) {
handler.progressCallback = dummy_progress;
handler.statusChangeCallback = dummy_status;
} else {
handler.progressCallback = NULL;
handler.statusChangeCallback = NULL;
}
handler.fileList.fileNum = 0;
handler.fileList.uriList = NULL;
handler.fileList.previewFileUri = NULL;
StartSendFile(device_id, &handler);
return 0;
}