diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2022-09-27 17:03:06 +0200 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2022-11-01 16:26:16 +0100 |
| commit | 980858186149651df5543b6fc99a4f7db0cdd089 (patch) | |
| tree | d347200b0a562d84df505097651ad0642f207fdd /src/menu/privinc/menu_net.h | |
| parent | 39f50e601d395bbd2d78d0147ac530b756da2fff (diff) | |
| download | jancity-980858186149651df5543b6fc99a4f7db0cdd089.tar.gz | |
WIP
Diffstat (limited to 'src/menu/privinc/menu_net.h')
| -rw-r--r-- | src/menu/privinc/menu_net.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/src/menu/privinc/menu_net.h b/src/menu/privinc/menu_net.h new file mode 100644 index 0000000..1980917 --- /dev/null +++ b/src/menu/privinc/menu_net.h @@ -0,0 +1,62 @@ +#ifndef MENU_NETCFG_H +#define MENU_NETCFG_H + +#include <gui.h> +#include <gui/button.h> +#include <gui/checkbox.h> +#include <gui/container.h> +#include <gui/label.h> +#include <gui/line_edit.h> +#include <net.h> +#include <stdbool.h> +#include <stddef.h> + +#ifdef __cplusplus +extern "C" +{ +#endif + +struct menu_net_gui +{ + char device[32], address[32], port[sizeof "65535"]; + bool update_domain; + struct gui_container cnt; + struct gui_label type; + struct gui_button type_btn; + enum net_domain domain; + + union + { + struct gui_container cnt; + + struct menu_ipv4_gui + { + struct gui_container cnt, relay_cnt, announce_cnt; + struct gui_button next_page_btn; + struct gui_label address, port, relay, announce; + struct gui_line_edit address_le, port_le, announce_le; + struct gui_checkbox relay_ch, announce_ch; + } ipv4; + + struct menu_serial_gui + { + struct gui_container cnt, hw_ctrl_cnt; + struct gui_label device, speed, hw_ctrl; + struct gui_button speed_btn; + struct gui_line_edit device_le; + struct gui_checkbox hw_ctrl_ch; + size_t speed_i; + } serial; + } gui; +}; + +int menu_net_gui_init(struct menu_net_gui *m); +void menu_net_gui_update(struct menu_net_gui *m); +int menu_net_server(const struct menu_net_gui *m, union net_server *s); +int menu_net_connect(const struct menu_net_gui *m, union net_connect *c); + +#ifdef __cplusplus +} +#endif + +#endif /* MENU_NETCFG_H */ |
