All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Szymon Janc <szymon.janc@tieto.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH v3 4/4] core: Add support for Multi Profile Specification
Date: Sat, 14 Feb 2015 11:59:24 -0800	[thread overview]
Message-ID: <3DB13CBB-FB88-4BAE-956C-EBACE9D85C05@holtmann.org> (raw)
In-Reply-To: <1423928093-21850-1-git-send-email-szymon.janc@tieto.com>

Hi Szymon,

> This adds new main.conf configure option named MultiProfile. It allows
> to enable MPSD and MPMD scenarios for MPS. By default MPS is disabled.
> ---
> V3: - fixed string checks when parsing option
>    - added MultiProfile to list of known options
> 
> src/main.c    | 23 +++++++++++++++++++++++
> src/main.conf |  5 +++++
> 2 files changed, 28 insertions(+)
> 
> diff --git a/src/main.c b/src/main.c
> index b3140d0..0af3ed9 100644
> --- a/src/main.c
> +++ b/src/main.c
> @@ -69,6 +69,9 @@
> struct main_opts main_opts;
> static GKeyFile *main_conf;
> 
> +static bool mps_mpsd = false;
> +static bool mps_mpmd = false;
> +
> static const char * const supported_options[] = {
> 	"Name",
> 	"Class",
> @@ -81,6 +84,7 @@ static const char * const supported_options[] = {
> 	"NameResolving",
> 	"DebugKeys",
> 	"ControllerMode",
> +	"MultiProfile",
> };
> 
> GKeyFile *btd_get_main_conf(void)
> @@ -307,6 +311,22 @@ static void parse_config(GKeyFile *config)
> 		main_opts.mode = get_mode(str);
> 		g_free(str);
> 	}
> +
> +	str = g_key_file_get_string(config, "General", "MultiProfile", &err);
> +	if (err) {
> +		g_clear_error(&err);
> +	} else {
> +		DBG("MultiProfile=%s", str);
> +
> +		if (!strcmp(str, "mpsd")) {
> +			mps_mpsd = true;
> +		} else if (!strcmp(str, "mpmd")) {
> +			mps_mpsd = true;
> +			mps_mpmd = true;
> +		}
> +
> +		g_free(str);
> +	}
> }
> 
> static void init_defaults(void)
> @@ -599,6 +619,9 @@ int main(int argc, char *argv[])
> 		register_device_id(main_opts.did_source, main_opts.did_vendor,
> 				main_opts.did_product, main_opts.did_version);
> 
> +	if (mps_mpsd)
> +		register_mps(mps_mpmd);
> +
> 	/* Loading plugins has to be done after D-Bus has been setup since
> 	 * the plugins might wanna expose some paths on the bus. However the
> 	 * best order of how to init various subsystems of the Bluetooth
> diff --git a/src/main.conf b/src/main.conf
> index d4d6ab0..a8f37f0 100644
> --- a/src/main.conf
> +++ b/src/main.conf
> @@ -52,6 +52,11 @@
> # Possible values: "dual", "bredr", "le"
> #ControllerMode = dual
> 
> +# Enables Multi Profile Specification support. This allows to specify if
> +# system supports only MPSD or both MPSD/MPMD scenarios.
> +# Possible values: "mpsd", "mpmd"
> +#MultiProfile = mpsd
> +

actually the commented out entry should be the default\x10. So you need off, mpsd and mpmd here. However since these stand for single device and multiple device, then why not actually name it in plain English.

So "off", "single" and "multiple" with "off" being the default. And then have the text refer to Multiple Profile Single Device (MPSD) and Multiple Profile Multiple Devices (MPMD). So that specification readers know what each option maps to.

Regards

Marcel


  reply	other threads:[~2015-02-14 19:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-14 13:02 [PATCH v2 1/4] sdp: Add initial support for MPS Szymon Janc
2015-02-14 13:02 ` [PATCH v2 2/4] sdp: Add support for MPMD in MPS Szymon Janc
2015-02-14 13:02 ` [PATCH v2 3/4] android: Use common MPS implementation Szymon Janc
2015-02-14 13:02 ` [PATCH v2 4/4] core: Add support for Multi Profile Specification Szymon Janc
2015-02-14 14:43   ` Johan Hedberg
2015-02-14 14:51     ` Szymon Janc
2015-02-14 15:34   ` [PATCH v3 " Szymon Janc
2015-02-14 19:59     ` Marcel Holtmann [this message]
2015-02-15 15:43     ` [PATCH v4 " Szymon Janc
2015-02-17 17:31 ` [PATCH v2 1/4] sdp: Add initial support for MPS Szymon Janc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3DB13CBB-FB88-4BAE-956C-EBACE9D85C05@holtmann.org \
    --to=marcel@holtmann.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=szymon.janc@tieto.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.