Tilde Friends
ssb.ebt.h
1#pragma once
2
3#include "ssb.h"
4
5#include "quickjs.h"
6
7typedef struct _tf_ssb_connection_t tf_ssb_connection_t;
8
12typedef struct _tf_ssb_ebt_t tf_ssb_ebt_t;
13
18{
20 char id[k_id_base64_len];
22 int32_t value;
24
28typedef struct _tf_ssb_ebt_clock_t
29{
31 int count;
35
39typedef void(tf_ssb_ebt_clock_callback_t)(const tf_ssb_ebt_clock_t* clock, int32_t request_number, void* user_data);
40
46tf_ssb_ebt_t* tf_ssb_ebt_create(tf_ssb_connection_t* connection);
47
54void tf_ssb_ebt_receive_clock(tf_ssb_ebt_t* ebt, JSContext* context, JSValue clock);
55
63void tf_ssb_ebt_get_send_clock(tf_ssb_ebt_t* ebt, int32_t request_number, tf_ssb_ebt_clock_callback_t* callback, void* user_data);
64
71tf_ssb_ebt_clock_t* tf_ssb_ebt_get_messages_to_send(tf_ssb_ebt_t* ebt);
72
79void tf_ssb_ebt_set_messages_sent(tf_ssb_ebt_t* ebt, const char* id, int32_t sequence);
80
87void tf_ssb_ebt_set_messages_received(tf_ssb_ebt_t* ebt, const char* id, int32_t sequence);
88
93void tf_ssb_ebt_destroy(tf_ssb_ebt_t* ebt);
94
100int tf_ssb_ebt_get_send_clock_pending(tf_ssb_ebt_t* ebt);
101
107void tf_ssb_ebt_set_send_clock_pending(tf_ssb_ebt_t* ebt, int pending);
108
117void tf_ssb_ebt_get_progress(tf_ssb_ebt_t* ebt, int* in_pending, int* in_total, int* out_pending, int* out_total);
struct JSContext JSContext
Definition: api.js.h:10
Definition: ssb.ebt.h:18
int32_t value
Definition: ssb.ebt.h:22
Definition: ssb.ebt.h:29
tf_ssb_ebt_clock_entry_t entries[]
Definition: ssb.ebt.h:33
int count
Definition: ssb.ebt.h:31