summaryrefslogtreecommitdiffstats
path: root/src/host/layer23/include/osmocom/bb/mobile
diff options
context:
space:
mode:
Diffstat (limited to 'src/host/layer23/include/osmocom/bb/mobile')
-rw-r--r--src/host/layer23/include/osmocom/bb/mobile/Makefile.am2
-rw-r--r--src/host/layer23/include/osmocom/bb/mobile/gui.h50
-rw-r--r--src/host/layer23/include/osmocom/bb/mobile/settings.h4
-rw-r--r--src/host/layer23/include/osmocom/bb/mobile/vty.h4
4 files changed, 58 insertions, 2 deletions
diff --git a/src/host/layer23/include/osmocom/bb/mobile/Makefile.am b/src/host/layer23/include/osmocom/bb/mobile/Makefile.am
index 6adb6991..38a5b4e6 100644
--- a/src/host/layer23/include/osmocom/bb/mobile/Makefile.am
+++ b/src/host/layer23/include/osmocom/bb/mobile/Makefile.am
@@ -1,3 +1,3 @@
noinst_HEADERS = gsm322.h gsm480_ss.h gsm411_sms.h gsm48_cc.h gsm48_mm.h \
gsm48_rr.h mncc.h settings.h subscriber.h support.h \
- transaction.h vty.h mncc_sock.h mnccms.h
+ transaction.h vty.h mncc_sock.h mnccms.h gui.h
diff --git a/src/host/layer23/include/osmocom/bb/mobile/gui.h b/src/host/layer23/include/osmocom/bb/mobile/gui.h
new file mode 100644
index 00000000..a67044d8
--- /dev/null
+++ b/src/host/layer23/include/osmocom/bb/mobile/gui.h
@@ -0,0 +1,50 @@
+#ifndef _gui_h
+#define _gui_h
+
+#include <osmocom/bb/ui/ui.h>
+
+struct status_screen {
+ const char *feature;
+ const char *feature_vty;
+ const char *feature_help;
+ int default_en;
+ int lines;
+ int (*display_func)(struct osmocom_ms *ms,
+ char *text);
+};
+
+extern struct status_screen status_screen[];
+
+#define GUI_NUM_STATUS 9 /* number of status infos */
+#define GUI_NUM_STATUS_LINES 32 /* total number of lines of all status infos */
+
+struct gsm_ui {
+ struct ui_inst ui; /* user interface instance */
+ int menu; /* current menu */
+ const char *status_lines[GUI_NUM_STATUS_LINES];
+ /* list of status lines */
+ char status_text[GUI_NUM_STATUS_LINES * (UI_COLS + 1) + 128];
+ /* memory for status lines (extra 128 bytes
+ * in case of overflow */
+ struct osmo_timer_list timer;
+ /* refresh timer */
+ char dialing[33]; /* dailing buffer */
+ int selected_call; /* call that is selected */
+
+ /* select menus */
+ void *select_menu; /* current menu */
+ void *choose_menu; /* current choose item in menu */
+
+ /* supserv */
+ int ss_lines; /* number of lines we display */
+ int ss_pending, ss_active;
+ /* state of transaction */
+};
+
+void gui_init_status_config(void);
+int gui_start(struct osmocom_ms *ms);
+int gui_stop(struct osmocom_ms *ms);
+int gui_notify_call(struct osmocom_ms *ms);
+int gui_notify_ss(struct osmocom_ms *ms, const char *fmt, ...);
+
+#endif /* _gui_h */
diff --git a/src/host/layer23/include/osmocom/bb/mobile/settings.h b/src/host/layer23/include/osmocom/bb/mobile/settings.h
index 37f87873..b5f25e83 100644
--- a/src/host/layer23/include/osmocom/bb/mobile/settings.h
+++ b/src/host/layer23/include/osmocom/bb/mobile/settings.h
@@ -104,6 +104,10 @@ struct gsm_settings {
/* Ring tone */
uint8_t ringtone; /* 0 = off */
+
+ /* UI */
+ uint16_t ui_port; /* telnet port: 0, if disabled */
+ uint32_t status_enable; /* status display flags */
};
struct gsm_settings_abbrev {
diff --git a/src/host/layer23/include/osmocom/bb/mobile/vty.h b/src/host/layer23/include/osmocom/bb/mobile/vty.h
index 1f1341bc..d59853fd 100644
--- a/src/host/layer23/include/osmocom/bb/mobile/vty.h
+++ b/src/host/layer23/include/osmocom/bb/mobile/vty.h
@@ -10,10 +10,12 @@ enum ms_vty_node {
MS_NODE = _LAST_OSMOVTY_NODE + 1,
TESTSIM_NODE,
SUPPORT_NODE,
+ UI_NODE,
};
enum node_type ms_vty_go_parent(struct vty *vty);
-int ms_vty_init(void);
+int ms_vty_init(void *tall_ctx);
+void ms_vty_exit(void);
extern void vty_notify(struct osmocom_ms *ms, const char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
#endif