aboutsummaryrefslogtreecommitdiff
path: root/tests/chapters/shim
diff options
context:
space:
mode:
authorYP3 Audiobook <noreply@example.invalid>2026-11-25 17:45:43 -0500
committerYP3 Audiobook <noreply@example.invalid>2026-11-25 17:45:43 -0500
commit013e3857a1c6480dfd241fb14b36c55b0421939e (patch)
tree59b3aa16d4f658eb7b76e5dfbc475c3a408507c7 /tests/chapters/shim
downloadyp3-audiobook-firmware-013e3857a1c6480dfd241fb14b36c55b0421939e.tar.gz
initial commit
Diffstat (limited to 'tests/chapters/shim')
-rw-r--r--tests/chapters/shim/audio.h3
-rw-r--r--tests/chapters/shim/config.h7
-rw-r--r--tests/chapters/shim/file.h5
-rw-r--r--tests/chapters/shim/list.h6
-rw-r--r--tests/chapters/shim/logf.h2
-rw-r--r--tests/chapters/shim/metadata.h3
-rw-r--r--tests/chapters/shim/misc.h3
-rw-r--r--tests/chapters/shim/playback.h2
-rw-r--r--tests/chapters/shim/playlist.h3
-rw-r--r--tests/chapters/shim/rbunicode.h2
-rw-r--r--tests/chapters/shim/root_menu.h2
-rw-r--r--tests/chapters/shim/screen_access.h3
-rw-r--r--tests/chapters/shim/string-extra.h3
-rw-r--r--tests/chapters/shim/system.h2
14 files changed, 46 insertions, 0 deletions
diff --git a/tests/chapters/shim/audio.h b/tests/chapters/shim/audio.h
new file mode 100644
index 0000000..4d27bcb
--- /dev/null
+++ b/tests/chapters/shim/audio.h
@@ -0,0 +1,3 @@
+#pragma once
+struct mp3entry *audio_current_track(void);
+void audio_next(void); void audio_prev(void);
diff --git a/tests/chapters/shim/config.h b/tests/chapters/shim/config.h
new file mode 100644
index 0000000..9d471b9
--- /dev/null
+++ b/tests/chapters/shim/config.h
@@ -0,0 +1,7 @@
+#pragma once
+#define HAVE_AUDIOBOOK_CHAPTERS
+#define MAX_PATH 260
+#include <stdbool.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <sys/types.h>
diff --git a/tests/chapters/shim/file.h b/tests/chapters/shim/file.h
new file mode 100644
index 0000000..7601b39
--- /dev/null
+++ b/tests/chapters/shim/file.h
@@ -0,0 +1,5 @@
+#pragma once
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/stat.h>
+static inline off_t ffilesize(int fd){ struct stat st; return fstat(fd,&st)?-1:st.st_size; }
diff --git a/tests/chapters/shim/list.h b/tests/chapters/shim/list.h
new file mode 100644
index 0000000..0df3489
--- /dev/null
+++ b/tests/chapters/shim/list.h
@@ -0,0 +1,6 @@
+#pragma once
+struct gui_synclist;
+typedef const char *list_get_name(int, void *, char *, size_t);
+struct simplelist_info { const char *title; int count; int selection; bool hide_theme; list_get_name *get_name; };
+static inline void simplelist_info_init(struct simplelist_info *i, char *t, int c, void *d){(void)d; i->title=t;i->count=c;i->selection=0;}
+static inline bool simplelist_show_list(struct simplelist_info *i){(void)i; return true;}
diff --git a/tests/chapters/shim/logf.h b/tests/chapters/shim/logf.h
new file mode 100644
index 0000000..e761f85
--- /dev/null
+++ b/tests/chapters/shim/logf.h
@@ -0,0 +1,2 @@
+#pragma once
+#define logf(...) do{}while(0)
diff --git a/tests/chapters/shim/metadata.h b/tests/chapters/shim/metadata.h
new file mode 100644
index 0000000..11d7cb6
--- /dev/null
+++ b/tests/chapters/shim/metadata.h
@@ -0,0 +1,3 @@
+#pragma once
+enum { AFMT_UNKNOWN, AFMT_MP4_ALAC, AFMT_MP4_AAC, AFMT_MP4_AAC_HE, AFMT_MPA_L3 };
+struct mp3entry { char path[260]; int codectype; unsigned long elapsed, length; char *title, *album; };
diff --git a/tests/chapters/shim/misc.h b/tests/chapters/shim/misc.h
new file mode 100644
index 0000000..226e90b
--- /dev/null
+++ b/tests/chapters/shim/misc.h
@@ -0,0 +1,3 @@
+#pragma once
+enum system_sound { SOUND_TRACK_NO_MORE };
+void system_sound_play(enum system_sound s);
diff --git a/tests/chapters/shim/playback.h b/tests/chapters/shim/playback.h
new file mode 100644
index 0000000..55a40b4
--- /dev/null
+++ b/tests/chapters/shim/playback.h
@@ -0,0 +1,2 @@
+#pragma once
+void audio_pre_ff_rewind(void); void audio_ff_rewind(long ms);
diff --git a/tests/chapters/shim/playlist.h b/tests/chapters/shim/playlist.h
new file mode 100644
index 0000000..5082522
--- /dev/null
+++ b/tests/chapters/shim/playlist.h
@@ -0,0 +1,3 @@
+#pragma once
+#include <stdbool.h>
+bool playlist_check(int steps);
diff --git a/tests/chapters/shim/rbunicode.h b/tests/chapters/shim/rbunicode.h
new file mode 100644
index 0000000..87b7e43
--- /dev/null
+++ b/tests/chapters/shim/rbunicode.h
@@ -0,0 +1,2 @@
+#pragma once
+unsigned char* utf8encode(unsigned long ucs, unsigned char *utf8);
diff --git a/tests/chapters/shim/root_menu.h b/tests/chapters/shim/root_menu.h
new file mode 100644
index 0000000..27ec430
--- /dev/null
+++ b/tests/chapters/shim/root_menu.h
@@ -0,0 +1,2 @@
+#pragma once
+#define GO_TO_WPS 2
diff --git a/tests/chapters/shim/screen_access.h b/tests/chapters/shim/screen_access.h
new file mode 100644
index 0000000..061b8c7
--- /dev/null
+++ b/tests/chapters/shim/screen_access.h
@@ -0,0 +1,3 @@
+#pragma once
+#define DRMODE_COMPLEMENT 0
+struct screen { void (*set_drawmode)(int); void (*vline)(int,int,int); };
diff --git a/tests/chapters/shim/string-extra.h b/tests/chapters/shim/string-extra.h
new file mode 100644
index 0000000..3303faf
--- /dev/null
+++ b/tests/chapters/shim/string-extra.h
@@ -0,0 +1,3 @@
+#pragma once
+#include <string.h>
+static inline char *strmemccpy(char *d, const char *s, size_t n){ char *r = memccpy(d,s,0,n); if(!r && n) d[n-1]=0; return r; }
diff --git a/tests/chapters/shim/system.h b/tests/chapters/shim/system.h
new file mode 100644
index 0000000..344be9e
--- /dev/null
+++ b/tests/chapters/shim/system.h
@@ -0,0 +1,2 @@
+#pragma once
+#define MIN(a,b) ((a)<(b)?(a):(b))