diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-08-29 14:36:06 -0700 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-08-29 14:36:06 -0700 |
commit | d297a5873d210df812369a03794f4faeac0bfe22 (patch) | |
tree | 9d61614ec18f8dd8e5e560211fed51e56d738684 /client/main.c | |
parent | 75f73f6d62645734f9e7a2385902750cf3ad3f16 (diff) | |
download | bluez-d297a5873d210df812369a03794f4faeac0bfe22.tar.gz |
client: Add -e/--endpoint option to auto register endpoints
This adds -e/--endpoint option that can be used to auto register
supported endpoints.
Diffstat (limited to 'client/main.c')
-rw-r--r-- | client/main.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/client/main.c b/client/main.c index 54f21fbdf..6773d5262 100644 --- a/client/main.c +++ b/client/main.c @@ -3109,23 +3109,27 @@ static const struct bt_shell_menu main_menu = { static const struct option options[] = { { "agent", required_argument, 0, 'a' }, + { "endpoints", no_argument, 0, 'e' }, { 0, 0, 0, 0 } }; static const char *agent_option; +static const char *endpoint_option; static const char **optargs[] = { - &agent_option + &agent_option, + &endpoint_option }; static const char *help[] = { - "Register agent handler: <capability>" + "Register agent handler: <capability>", + "Register Media endpoints" }; static const struct bt_shell_opt opt = { .options = options, .optno = sizeof(options) / sizeof(struct option), - .optstr = "a:", + .optstr = "a:e", .optarg = optargs, .help = help, }; @@ -3158,6 +3162,10 @@ int main(int argc, char *argv[]) bt_shell_set_env("DBUS_CONNECTION", dbus_conn); + if (endpoint_option) + bt_shell_set_env("AUTO_REGISTER_ENDPOINT", + (void *)endpoint_option); + admin_add_submenu(); player_add_submenu(); |