summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/baresip.h28
1 files changed, 10 insertions, 18 deletions
diff --git a/include/baresip.h b/include/baresip.h
index 8a83ad3..966c618 100644
--- a/include/baresip.h
+++ b/include/baresip.h
@@ -130,11 +130,6 @@ enum audio_mode {
/** Core configuration */
struct config {
- /** Input */
- struct config_input {
- char device[64]; /**< Input device name */
- uint32_t port; /**< Input port number */
- } input;
/** SIP User-Agent */
struct config_sip {
@@ -536,27 +531,24 @@ struct sipevent_sock *uag_sipevent_sock(void);
* User Interface
*/
-struct ui;
-struct ui_st;
+typedef int (ui_output_h)(const char *str);
-/** User Interface parameters */
-struct ui_prm {
- char *device; /**< Device name */
- uint16_t port; /**< Port number */
+/** Defines a User-Interface module */
+struct ui {
+ struct le le; /**< Linked-list element */
+ const char *name; /**< Name of the UI-module */
+ ui_output_h *outputh; /**< Handler for output strings (optional) */
};
-typedef void (ui_input_h)(char key, struct re_printf *pf, void *arg);
-typedef int (ui_alloc_h)(struct ui_st **stp, struct ui_prm *prm,
- ui_input_h *ih, void *arg);
-typedef int (ui_output_h)(struct ui_st *st, const char *str);
+void ui_register(struct ui *ui);
+void ui_unregister(struct ui *ui);
-void ui_init(const struct config_input *cfg);
+void ui_reset(void);
void ui_input(char key);
+void ui_input_key(char key, struct re_printf *pf);
void ui_input_str(const char *str);
int ui_input_pl(struct re_printf *pf, const struct pl *pl);
void ui_output(const char *str);
-int ui_register(struct ui **uip, const char *name,
- ui_alloc_h *alloch, ui_output_h *outh);
/*