Files
cdba/cdba-server.h
Dmitry Baryshkov 771910e186 cdba-server: extract message-sending helper
Instad of hand-coding message sending, create a single wrapper that
sends messages to the client.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2023-09-29 00:45:25 +03:00

21 lines
508 B
C

#ifndef __BAD_H__
#define __BAD_H__
#include <stdbool.h>
#include <termios.h>
#include "cdba.h"
void watch_add_readfd(int fd, int (*cb)(int, void*), void *data);
int watch_add_quit(int (*cb)(int, void*), void *data);
void watch_timer_add(int timeout_ms, void (*cb)(void *), void *data);
void watch_quit(void);
int watch_run(void);
int tty_open(const char *tty, struct termios *old);
void cdba_send_buf(int type, size_t len, const void *buf);
#define cdba_send(type) cdba_send_buf(type, 0, NULL)
#endif