From d5703a1e8fff2c95a5290d10b7c41a64efd65e10 Mon Sep 17 00:00:00 2001 From: "me@ow.nekobit.net" Date: Fri, 18 Mar 2022 03:27:39 +0000 Subject: [PATCH] Move callback functions to header FossilOrigin-Name: bc2e95bd34a85a433c37965d4f4287d2c965c80d8740dcc50b0e757a266954e7 --- include/mastodont_status.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/include/mastodont_status.h b/include/mastodont_status.h index 4a1d664..a0da787 100644 --- a/include/mastodont_status.h +++ b/include/mastodont_status.h @@ -144,4 +144,31 @@ int mastodont_reblog_status(mastodont_t* data, char* id, struct mstdnt_storage* storage); +/* Callbacks */ +struct _mstdnt_statuses_cb_args +{ + struct mstdnt_status** statuses; + size_t* size; +}; + +struct _mstdnt_status_context_result_cb_args +{ + struct mstdnt_status** statuses_before; + struct mstdnt_status** statuses_after; + size_t* size_before; + size_t* size_after; +}; + +int _mstdnt_statuses_result_callback(struct mstdnt_fetch_results* results, + struct mstdnt_storage* storage, + void* _args); + +int _mstdnt_status_from_result_callback(struct mstdnt_fetch_results* results, + struct mstdnt_storage* storage, + void* status); + +int _mstdnt_status_context_from_result_callback(struct mstdnt_fetch_results* results, + struct mstdnt_storage* storage, + void* _args); + #endif /* MASTODONT_STATUS */