diff --git a/src/main.c b/src/main.c
index b3140d0..05eb13d 100644
--- a/src/main.c
+++ b/src/main.c
struct main_opts main_opts;
static GKeyFile *main_conf;
+static enum {
+ MPS_OFF,
+ MPS_SINGLE,
+ MPS_MULTIPLE,
+} mps = MPS_OFF;
+
static const char * const supported_options[] = {
"Name",
"Class",
"NameResolving",
"DebugKeys",
"ControllerMode",
+ "MultiProfile",
};
GKeyFile *btd_get_main_conf(void)
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, "single"))
+ mps = MPS_SINGLE;
+ else if (!strcmp(str, "multiple"))
+ mps = MPS_MULTIPLE;
+
+ g_free(str);
+ }
}
static void init_defaults(void)
register_device_id(main_opts.did_source, main_opts.did_vendor,
main_opts.did_product, main_opts.did_version);
+ if (mps != MPS_OFF)
+ register_mps(mps == MPS_MULTIPLE);
+
/* 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..9be90af 100644
--- a/src/main.conf
+++ b/src/main.conf
# Possible values: "dual", "bredr", "le"
#ControllerMode = dual
+# Enables Multi Profile Specification support. This allows to specify if
+# system supports only Multiple Profiles Single Device (MPSD) configuration
+# or both Multiple Profiles Single Device (MPSD) and Multiple Profiles Multiple
+# Devices (MPMD) configurations.
+# Possible values: "off", "single", "multiple"
+#MultiProfile = off
+
#[Policy]
#
# The ReconnectUUIDs defines the set of remote services that should try