summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfred E. Heggestad <alfred.heggestad@gmail.com>2017-10-14 09:27:09 +0200
committerAlfred E. Heggestad <alfred.heggestad@gmail.com>2017-10-14 09:27:09 +0200
commit1fb707ecf6a443d9edc522b626cbc86b4d564d7d (patch)
treeca5c7747b19b2f8b13e74977bb4e27a32d7d2bf8
parent6e57b1f8e9cbb41430a755b730ea2d5630dca894 (diff)
menu: added about box
-rw-r--r--modules/menu/menu.c27
-rw-r--r--src/main.c5
2 files changed, 28 insertions, 4 deletions
diff --git a/modules/menu/menu.c b/modules/menu/menu.c
index 16bc2ee..23aae45 100644
--- a/modules/menu/menu.c
+++ b/modules/menu/menu.c
@@ -410,6 +410,32 @@ static int cmd_print_calls(struct re_printf *pf, void *unused)
}
+static const char about_fmt[] =
+ ".------------------------------------------------------------.\n"
+ "| "
+ "\x1b[34;1m" "bare"
+ "\x1b[31;1m" "sip"
+ "\x1b[;m"
+ " %-10s |\n"
+ "| |\n"
+ "| Baresip is a portable and modular SIP User-Agent |\n"
+ "| with audio and video support |\n"
+ "| |\n"
+ "| License: BSD |\n"
+ "| Homepage: https://github.com/alfredh/baresip |\n"
+ "| |\n"
+ "'------------------------------------------------------------'\n"
+ ;
+
+
+static int about_box(struct re_printf *pf, void *unused)
+{
+ (void)unused;
+
+ return re_hprintf(pf, about_fmt, BARESIP_VERSION);
+}
+
+
static const struct cmd cmdv[] = {
{"accept", 'a', 0, "Accept incoming call", cmd_answer },
@@ -425,6 +451,7 @@ static const struct cmd cmdv[] = {
{"uanew", 0, CMD_PRM, "Create User-Agent", create_ua },
{"ausrc", 0, CMD_IPRM, "Switch audio source", switch_audio_source },
{"auplay", 0, CMD_IPRM, "Switch audio player", switch_audio_player },
+{"about", 0, 0, "About box", about_box },
};
diff --git a/src/main.c b/src/main.c
index b1dcb66..40f7f9d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -230,10 +230,7 @@ int main(int argc, char *argv[])
log_enable_stderr(false);
}
- info("\x1b[34;1m" "bare"
- "\x1b[31;1m" "sip"
- "\x1b[;m"
- " is ready.\n");
+ info("baresip is ready.\n");
/* Execute any commands from input arguments */
for (i=0; i<execmdc; i++) {