diff options
author | 2021-02-11 08:28:45 +0000 | |
---|---|---|
committer | 2021-02-11 08:28:45 +0000 | |
commit | 0c0c2584134dbfad42dbd43ce22a56b1e92057f6 (patch) | |
tree | b7f05e09766a4a6ba864f47faf1f8142cfb87935 /usr.bin/tmux/tmux.h | |
parent | Make room for handling of HID++ 1.0 devices. No functional change. (diff) | |
download | wireguard-openbsd-0c0c2584134dbfad42dbd43ce22a56b1e92057f6.tar.xz wireguard-openbsd-0c0c2584134dbfad42dbd43ce22a56b1e92057f6.zip |
Move file handling protocol stuff all into file.c so it can be reused
more easily.
Diffstat (limited to 'usr.bin/tmux/tmux.h')
-rw-r--r-- | usr.bin/tmux/tmux.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h index 3ad7d9d4f80..243ac4b9580 100644 --- a/usr.bin/tmux/tmux.h +++ b/usr.bin/tmux/tmux.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tmux.h,v 1.1088 2021/02/05 12:29:19 nicm Exp $ */ +/* $OpenBSD: tmux.h,v 1.1089 2021/02/11 08:28:45 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -1539,6 +1539,8 @@ typedef void (*client_file_cb) (struct client *, const char *, int, int, struct evbuffer *, void *); struct client_file { struct client *c; + struct tmuxpeer *peer; + struct client_files *tree; int references; int stream; @@ -1907,6 +1909,7 @@ int load_cfg(const char *, struct client *, struct cmdq_item *, int, int load_cfg_from_buffer(const void *, size_t, const char *, struct client *, struct cmdq_item *, int, struct cmdq_item **); void set_cfg_file(const char *); +const char *get_cfg_file(void); void printflike(1, 2) cfg_add_cause(const char *, ...); void cfg_print_causes(struct cmdq_item *); void cfg_show_causes(struct session *); @@ -2370,7 +2373,10 @@ void alerts_check_session(struct session *); /* file.c */ int file_cmp(struct client_file *, struct client_file *); RB_PROTOTYPE(client_files, client_file, entry, file_cmp); -struct client_file *file_create(struct client *, int, client_file_cb, void *); +struct client_file *file_create_with_peer(struct tmuxpeer *, + struct client_files *, int, client_file_cb, void *); +struct client_file *file_create_with_client(struct client *, int, + client_file_cb, void *); void file_free(struct client_file *); void file_fire_done(struct client_file *); void file_fire_read(struct client_file *); @@ -2383,6 +2389,15 @@ void file_write(struct client *, const char *, int, const void *, size_t, client_file_cb, void *); void file_read(struct client *, const char *, client_file_cb, void *); void file_push(struct client_file *); +void file_write_open(struct client_files *, struct tmuxpeer *, + struct imsg *, int, int, client_file_cb, void *); +void file_write_data(struct client_files *, struct imsg *); +void file_write_close(struct client_files *, struct imsg *); +void file_read_open(struct client_files *, struct tmuxpeer *, struct imsg *, + int, int, client_file_cb, void *); +void file_write_ready(struct client_files *, struct imsg *); +void file_read_data(struct client_files *, struct imsg *); +void file_read_done(struct client_files *, struct imsg *); /* server.c */ extern struct tmuxproc *server_proc; |