]> git.ipfire.org Git - thirdparty/util-linux.git/blame - term-utils/script-playutils.h
Merge branch 'libeconf' of https://github.com/thkukuk/util-linux
[thirdparty/util-linux.git] / term-utils / script-playutils.h
CommitLineData
12352c96
KZ
1#ifndef UTIL_LINUX_SCRIPT_PLAYUTILS_H
2#define UTIL_LINUX_SCRIPT_PLAYUTILS_H
3
4#include "c.h"
5#include "debug.h"
6
7#define SCRIPTREPLAY_DEBUG_INIT (1 << 1)
8#define SCRIPTREPLAY_DEBUG_TIMING (1 << 2)
9#define SCRIPTREPLAY_DEBUG_LOG (1 << 3)
10#define SCRIPTREPLAY_DEBUG_MISC (1 << 4)
11#define SCRIPTREPLAY_DEBUG_ALL 0xFFFF
12
13UL_DEBUG_DECLARE_MASK(scriptreplay);
14
15#define DBG(m, x) __UL_DBG(scriptreplay, SCRIPTREPLAY_DEBUG_, m, x)
16#define ON_DBG(m, x) __UL_DBG_CALL(scriptreplay, SCRIPTREPLAY_DEBUG_, m, x)
17
18/* CR to '\n' mode */
19enum {
20 REPLAY_CRMODE_AUTO = 0,
21 REPLAY_CRMODE_NEVER,
22 REPLAY_CRMODE_ALWAYS
23};
24
25struct replay_setup;
26struct replay_step;
27
28void replay_init_debug(void);
29struct replay_setup *replay_new_setup(void);
263835e8 30void replay_free_setup(struct replay_setup *stp);
12352c96
KZ
31
32int replay_set_default_type(struct replay_setup *stp, char type);
33int replay_set_crmode(struct replay_setup *stp, int mode);
34int replay_set_timing_file(struct replay_setup *stp, const char *filename);
35const char *replay_get_timing_file(struct replay_setup *setup);
36int replay_get_timing_line(struct replay_setup *setup);
37int replay_associate_log(struct replay_setup *stp, const char *streams, const char *filename);
38
b639c2a3
KZ
39int replay_set_delay_min(struct replay_setup *stp, const struct timeval *tv);
40int replay_set_delay_max(struct replay_setup *stp, const struct timeval *tv);
41int replay_set_delay_div(struct replay_setup *stp, const double divi);
42
43struct timeval *replay_step_get_delay(struct replay_step *step);
12352c96 44const char *replay_step_get_filename(struct replay_step *step);
a46e5458 45int replay_step_is_empty(struct replay_step *step);
12352c96
KZ
46int replay_get_next_step(struct replay_setup *stp, char *streams, struct replay_step **xstep);
47
48int replay_emit_step_data(struct replay_setup *stp, struct replay_step *step, int fd);
49
50#endif /* UTIL_LINUX_SCRIPT_PLAYUTILS_H */