linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH BlueZ 00/11] Add experimental command line switch option
@ 2012-12-28 12:50 Luiz Augusto von Dentz
  2012-12-28 12:50 ` [PATCH BlueZ 01/11] gdbus: Introduce G_DBUS_METHOD_FLAG_EXPERIMENTAL Luiz Augusto von Dentz
                   ` (11 more replies)
  0 siblings, 12 replies; 14+ messages in thread
From: Luiz Augusto von Dentz @ 2012-12-28 12:50 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

These set of patches introduces g_dbus_set_flags along with experimental flags,
g_dbus_set_flags is not per connection as originally suggested to avoid using
dbus_connection_allocate_data_slot which requires calling
dbus_connection_free_data_slot once done but currently we don't keep any data
associated with connections, besides the flags comes from command line options
which would end up setting the same flags for every connection anyway.

In addition to experimental it also add support to enable deprecated via compat
swith option, this makes any API marked as deprecated to be disabled if compat
is not set. This is on purpose to expose applications using deprecated APIs.

Luiz Augusto von Dentz (11):
  gdbus: Introduce G_DBUS_METHOD_FLAG_EXPERIMENTAL
  gdbus: Introduce G_DBUS_SIGNAL_FLAG_EXPERIMENTAL
  gdbus: Introduce G_DBUS_PROPERTY_FLAG_EXPERIMENTAL
  gdbus: Check if the interface being registered is valid
  gdbus: Call check_signals when sending signals with
    g_dbus_send_message
  gdbus: Introduce G_DBUS_FLAG_ENABLE_DEPRECATED
  core: Add command line switch for enabling experimental interfaces
  core: Reuse --compat/-C switch for enabling deprecated interfaces
  media: Enable RegisterPlayer and UnregisterPlayer methods as
    experimental
  player: Enable MediaPlayer1 interface as experimental
  AVRCP: Fix not checking for media_player_controller_create

 gdbus/gdbus.h           |  39 ++++++++++--
 gdbus/object.c          | 153 ++++++++++++++++++++++++++++++++++++++++++++----
 profiles/audio/avrcp.c  |   7 ++-
 profiles/audio/media.c  |  10 +---
 profiles/audio/player.c |  28 +++++----
 src/main.c              |  13 +++-
 6 files changed, 211 insertions(+), 39 deletions(-)

-- 
1.8.0.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH BlueZ 01/11] gdbus: Introduce G_DBUS_METHOD_FLAG_EXPERIMENTAL
  2012-12-28 12:50 [PATCH BlueZ 00/11] Add experimental command line switch option Luiz Augusto von Dentz
@ 2012-12-28 12:50 ` Luiz Augusto von Dentz
  2012-12-28 12:51 ` [PATCH BlueZ 02/11] gdbus: Introduce G_DBUS_SIGNAL_FLAG_EXPERIMENTAL Luiz Augusto von Dentz
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Luiz Augusto von Dentz @ 2012-12-28 12:50 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This flag can be used to mark methods as experimental, marked
methods are disable by default and can be enabled by setting
G_DBUS_FLAG_ENABLE_EXPERIMENTAL using g_dbus_set_flags.
---
 gdbus/gdbus.h  | 27 ++++++++++++++++++++++++---
 gdbus/object.c | 21 +++++++++++++++++++++
 2 files changed, 45 insertions(+), 3 deletions(-)

diff --git a/gdbus/gdbus.h b/gdbus/gdbus.h
index 0e5c012..01ff9d4 100644
--- a/gdbus/gdbus.h
+++ b/gdbus/gdbus.h
@@ -88,10 +88,15 @@ typedef void (* GDBusSecurityFunction) (DBusConnection *connection,
 						gboolean interaction,
 						GDBusPendingReply pending);
 
+enum GDBusFlags {
+	G_DBUS_FLAG_ENABLE_EXPERIMENTAL = (1 << 0),
+};
+
 enum GDBusMethodFlags {
-	G_DBUS_METHOD_FLAG_DEPRECATED = (1 << 0),
-	G_DBUS_METHOD_FLAG_NOREPLY    = (1 << 1),
-	G_DBUS_METHOD_FLAG_ASYNC      = (1 << 2),
+	G_DBUS_METHOD_FLAG_DEPRECATED   = (1 << 0),
+	G_DBUS_METHOD_FLAG_NOREPLY      = (1 << 1),
+	G_DBUS_METHOD_FLAG_ASYNC        = (1 << 2),
+	G_DBUS_METHOD_FLAG_EXPERIMENTAL = (1 << 3),
 };
 
 enum GDBusSignalFlags {
@@ -173,6 +178,20 @@ struct GDBusSecurityTable {
 	.function = _function, \
 	.flags = G_DBUS_METHOD_FLAG_ASYNC | G_DBUS_METHOD_FLAG_DEPRECATED
 
+#define GDBUS_EXPERIMENTAL_METHOD(_name, _in_args, _out_args, _function) \
+	.name = _name, \
+	.in_args = _in_args, \
+	.out_args = _out_args, \
+	.function = _function, \
+	.flags = G_DBUS_METHOD_FLAG_EXPERIMENTAL
+
+#define GDBUS_EXPERIMENTAL_ASYNC_METHOD(_name, _in_args, _out_args, _function) \
+	.name = _name, \
+	.in_args = _in_args, \
+	.out_args = _out_args, \
+	.function = _function, \
+	.flags = G_DBUS_METHOD_FLAG_ASYNC | G_DBUS_METHOD_FLAG_EXPERIMENTAL
+
 #define GDBUS_NOREPLY_METHOD(_name, _in_args, _out_args, _function) \
 	.name = _name, \
 	.in_args = _in_args, \
@@ -189,6 +208,8 @@ struct GDBusSecurityTable {
 	.args = _args, \
 	.flags = G_DBUS_SIGNAL_FLAG_DEPRECATED
 
+void g_dbus_set_flags(int flags);
+
 gboolean g_dbus_register_interface(DBusConnection *connection,
 					const char *path, const char *name,
 					const GDBusMethodTable *methods,
diff --git a/gdbus/object.c b/gdbus/object.c
index 776d35e..89e2a75 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -84,6 +84,7 @@ struct property_data {
 	DBusMessage *message;
 };
 
+static int global_flags = 0;
 static struct generic_data *root;
 
 static gboolean process_changes(gpointer user_data);
@@ -129,6 +130,12 @@ static void generate_interface_xml(GString *gstr, struct interface_data *iface)
 						G_DBUS_METHOD_FLAG_DEPRECATED;
 		gboolean noreply = method->flags &
 						G_DBUS_METHOD_FLAG_NOREPLY;
+		gboolean experimental = method->flags &
+					G_DBUS_METHOD_FLAG_EXPERIMENTAL;
+
+		if (!(global_flags & G_DBUS_FLAG_ENABLE_EXPERIMENTAL) &&
+							experimental)
+			continue;
 
 		if (!deprecated && !noreply &&
 				!(method->in_args && method->in_args->name) &&
@@ -1022,10 +1029,19 @@ static DBusHandlerResult generic_message(DBusConnection *connection,
 
 	for (method = iface->methods; method &&
 			method->name && method->function; method++) {
+		gboolean experimental = method->flags &
+					G_DBUS_METHOD_FLAG_EXPERIMENTAL;
+
 		if (dbus_message_is_method_call(message, iface->name,
 							method->name) == FALSE)
 			continue;
 
+		if (experimental) {
+			const char *env = g_getenv("GDBUS_EXPERIMENTAL");
+			if (g_strcmp0(env, "1") != 0)
+				return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+		}
+
 		if (g_dbus_args_have_signature(method->in_args,
 							message) == FALSE)
 			continue;
@@ -1689,3 +1705,8 @@ gboolean g_dbus_detach_object_manager(DBusConnection *connection)
 
 	return TRUE;
 }
+
+void g_dbus_set_flags(int flags)
+{
+	global_flags = flags;
+}
-- 
1.8.0.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH BlueZ 02/11] gdbus: Introduce G_DBUS_SIGNAL_FLAG_EXPERIMENTAL
  2012-12-28 12:50 [PATCH BlueZ 00/11] Add experimental command line switch option Luiz Augusto von Dentz
  2012-12-28 12:50 ` [PATCH BlueZ 01/11] gdbus: Introduce G_DBUS_METHOD_FLAG_EXPERIMENTAL Luiz Augusto von Dentz
@ 2012-12-28 12:51 ` Luiz Augusto von Dentz
  2012-12-28 12:51 ` [PATCH BlueZ 03/11] gdbus: Introduce G_DBUS_PROPERTY_FLAG_EXPERIMENTAL Luiz Augusto von Dentz
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Luiz Augusto von Dentz @ 2012-12-28 12:51 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This flag can be used to mark signals as experimental, marked
signals are disabled by default and can be enabled by setting
G_DBUS_FLAG_ENABLE_EXPERIMENTAL using g_dbus_set_flags.
---
 gdbus/gdbus.h  |  8 +++++++-
 gdbus/object.c | 19 ++++++++++++++++---
 2 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/gdbus/gdbus.h b/gdbus/gdbus.h
index 01ff9d4..edc1f53 100644
--- a/gdbus/gdbus.h
+++ b/gdbus/gdbus.h
@@ -100,7 +100,8 @@ enum GDBusMethodFlags {
 };
 
 enum GDBusSignalFlags {
-	G_DBUS_SIGNAL_FLAG_DEPRECATED = (1 << 0),
+	G_DBUS_SIGNAL_FLAG_DEPRECATED   = (1 << 0),
+	G_DBUS_SIGNAL_FLAG_EXPERIMENTAL = (1 << 1),
 };
 
 enum GDBusPropertyFlags {
@@ -208,6 +209,11 @@ struct GDBusSecurityTable {
 	.args = _args, \
 	.flags = G_DBUS_SIGNAL_FLAG_DEPRECATED
 
+#define GDBUS_EXPERIMENTAL_SIGNAL(_name, _args) \
+	.name = _name, \
+	.args = _args, \
+	.flags = G_DBUS_SIGNAL_FLAG_EXPERIMENTAL
+
 void g_dbus_set_flags(int flags);
 
 gboolean g_dbus_register_interface(DBusConnection *connection,
diff --git a/gdbus/object.c b/gdbus/object.c
index 89e2a75..13a183f 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -164,6 +164,12 @@ static void generate_interface_xml(GString *gstr, struct interface_data *iface)
 	for (signal = iface->signals; signal && signal->name; signal++) {
 		gboolean deprecated = signal->flags &
 						G_DBUS_SIGNAL_FLAG_DEPRECATED;
+		gboolean experimental = signal->flags &
+					G_DBUS_SIGNAL_FLAG_EXPERIMENTAL;
+
+		if (!(global_flags & G_DBUS_FLAG_ENABLE_EXPERIMENTAL) &&
+							experimental)
+			continue;
 
 		if (!deprecated && !(signal->args && signal->args->name))
 			g_string_append_printf(gstr,
@@ -1266,10 +1272,17 @@ static gboolean check_signal(DBusConnection *conn, const char *path,
 	}
 
 	for (signal = iface->signals; signal && signal->name; signal++) {
-		if (!strcmp(signal->name, name)) {
-			*args = signal->args;
-			return TRUE;
+		if (strcmp(signal->name, name) != 0)
+			continue;
+
+		if (signal->flags & G_DBUS_SIGNAL_FLAG_EXPERIMENTAL) {
+			const char *env = g_getenv("GDBUS_EXPERIMENTAL");
+			if (g_strcmp0(env, "1") != 0)
+				break;
 		}
+
+		*args = signal->args;
+		return TRUE;
 	}
 
 	error("No signal named %s on interface %s", name, interface);
-- 
1.8.0.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH BlueZ 03/11] gdbus: Introduce G_DBUS_PROPERTY_FLAG_EXPERIMENTAL
  2012-12-28 12:50 [PATCH BlueZ 00/11] Add experimental command line switch option Luiz Augusto von Dentz
  2012-12-28 12:50 ` [PATCH BlueZ 01/11] gdbus: Introduce G_DBUS_METHOD_FLAG_EXPERIMENTAL Luiz Augusto von Dentz
  2012-12-28 12:51 ` [PATCH BlueZ 02/11] gdbus: Introduce G_DBUS_SIGNAL_FLAG_EXPERIMENTAL Luiz Augusto von Dentz
@ 2012-12-28 12:51 ` Luiz Augusto von Dentz
  2012-12-28 12:51 ` [PATCH BlueZ 04/11] gdbus: Check if the interface being registered is valid Luiz Augusto von Dentz
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Luiz Augusto von Dentz @ 2012-12-28 12:51 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This flag can be used to mark properties as experimental, marked
properties are disabled by default and can be enabled by setting
G_DBUS_FLAG_ENABLE_EXPERIMENTAL using g_dbus_set_flags.
---
 gdbus/gdbus.h  |  3 ++-
 gdbus/object.c | 48 +++++++++++++++++++++++++++++++-----------------
 2 files changed, 33 insertions(+), 18 deletions(-)

diff --git a/gdbus/gdbus.h b/gdbus/gdbus.h
index edc1f53..87fd185 100644
--- a/gdbus/gdbus.h
+++ b/gdbus/gdbus.h
@@ -105,7 +105,8 @@ enum GDBusSignalFlags {
 };
 
 enum GDBusPropertyFlags {
-	G_DBUS_PROPERTY_FLAG_DEPRECATED = (1 << 0),
+	G_DBUS_PROPERTY_FLAG_DEPRECATED   = (1 << 0),
+	G_DBUS_PROPERTY_FLAG_EXPERIMENTAL = (1 << 1),
 };
 
 enum GDBusSecurityFlags {
diff --git a/gdbus/object.c b/gdbus/object.c
index 13a183f..86d1c53 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -119,6 +119,14 @@ static void print_arguments(GString *gstr, const GDBusArgInfo *args,
 #define G_DBUS_ANNOTATE_NOREPLY(prefix_) \
 	G_DBUS_ANNOTATE(prefix_, "Method.NoReply", "true")
 
+static gboolean check_experimental(int flags, int flag)
+{
+	if (!(flags & flag))
+		return FALSE;
+
+	return !(global_flags & G_DBUS_FLAG_ENABLE_EXPERIMENTAL);
+}
+
 static void generate_interface_xml(GString *gstr, struct interface_data *iface)
 {
 	const GDBusMethodTable *method;
@@ -130,11 +138,9 @@ static void generate_interface_xml(GString *gstr, struct interface_data *iface)
 						G_DBUS_METHOD_FLAG_DEPRECATED;
 		gboolean noreply = method->flags &
 						G_DBUS_METHOD_FLAG_NOREPLY;
-		gboolean experimental = method->flags &
-					G_DBUS_METHOD_FLAG_EXPERIMENTAL;
 
-		if (!(global_flags & G_DBUS_FLAG_ENABLE_EXPERIMENTAL) &&
-							experimental)
+		if (check_experimental(method->flags,
+					G_DBUS_METHOD_FLAG_EXPERIMENTAL))
 			continue;
 
 		if (!deprecated && !noreply &&
@@ -164,11 +170,9 @@ static void generate_interface_xml(GString *gstr, struct interface_data *iface)
 	for (signal = iface->signals; signal && signal->name; signal++) {
 		gboolean deprecated = signal->flags &
 						G_DBUS_SIGNAL_FLAG_DEPRECATED;
-		gboolean experimental = signal->flags &
-					G_DBUS_SIGNAL_FLAG_EXPERIMENTAL;
 
-		if (!(global_flags & G_DBUS_FLAG_ENABLE_EXPERIMENTAL) &&
-							experimental)
+		if (check_experimental(signal->flags,
+					G_DBUS_SIGNAL_FLAG_EXPERIMENTAL))
 			continue;
 
 		if (!deprecated && !(signal->args && signal->args->name))
@@ -194,6 +198,10 @@ static void generate_interface_xml(GString *gstr, struct interface_data *iface)
 		gboolean deprecated = property->flags &
 					G_DBUS_PROPERTY_FLAG_DEPRECATED;
 
+		if (check_experimental(property->flags,
+					G_DBUS_PROPERTY_FLAG_EXPERIMENTAL))
+			continue;
+
 		g_string_append_printf(gstr, "\t\t<property name=\"%s\""
 					" type=\"%s\" access=\"%s%s\"",
 					property->name,	property->type,
@@ -555,6 +563,10 @@ static void append_properties(struct interface_data *data,
 				DBUS_DICT_ENTRY_END_CHAR_AS_STRING, &dict);
 
 	for (p = data->properties; p && p->name; p++) {
+		if (check_experimental(p->flags,
+					G_DBUS_PROPERTY_FLAG_EXPERIMENTAL))
+			continue;
+
 		if (p->get == NULL)
 			continue;
 
@@ -756,8 +768,14 @@ static inline const GDBusPropertyTable *find_property(const GDBusPropertyTable *
 	const GDBusPropertyTable *p;
 
 	for (p = properties; p && p->name; p++) {
-		if (strcmp(name, p->name) == 0)
-			return p;
+		if (strcmp(name, p->name) != 0)
+			continue;
+
+		if (check_experimental(p->flags,
+					G_DBUS_PROPERTY_FLAG_EXPERIMENTAL))
+			break;
+
+		return p;
 	}
 
 	return NULL;
@@ -1035,18 +1053,14 @@ static DBusHandlerResult generic_message(DBusConnection *connection,
 
 	for (method = iface->methods; method &&
 			method->name && method->function; method++) {
-		gboolean experimental = method->flags &
-					G_DBUS_METHOD_FLAG_EXPERIMENTAL;
 
 		if (dbus_message_is_method_call(message, iface->name,
 							method->name) == FALSE)
 			continue;
 
-		if (experimental) {
-			const char *env = g_getenv("GDBUS_EXPERIMENTAL");
-			if (g_strcmp0(env, "1") != 0)
-				return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
-		}
+		if (check_experimental(method->flags,
+					G_DBUS_METHOD_FLAG_EXPERIMENTAL))
+			return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
 
 		if (g_dbus_args_have_signature(method->in_args,
 							message) == FALSE)
-- 
1.8.0.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH BlueZ 04/11] gdbus: Check if the interface being registered is valid
  2012-12-28 12:50 [PATCH BlueZ 00/11] Add experimental command line switch option Luiz Augusto von Dentz
                   ` (2 preceding siblings ...)
  2012-12-28 12:51 ` [PATCH BlueZ 03/11] gdbus: Introduce G_DBUS_PROPERTY_FLAG_EXPERIMENTAL Luiz Augusto von Dentz
@ 2012-12-28 12:51 ` Luiz Augusto von Dentz
  2012-12-28 12:51 ` [PATCH BlueZ 05/11] gdbus: Call check_signals when sending signals with g_dbus_send_message Luiz Augusto von Dentz
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Luiz Augusto von Dentz @ 2012-12-28 12:51 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This prevent registering interfaces that are empty or have all members
marked as experiemental.
---
 gdbus/object.c | 42 ++++++++++++++++++++++++++++++++++++------
 1 file changed, 36 insertions(+), 6 deletions(-)

diff --git a/gdbus/object.c b/gdbus/object.c
index 86d1c53..c9cf595 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -1174,7 +1174,7 @@ static const GDBusSignalTable manager_signals[] = {
 	{ }
 };
 
-static void add_interface(struct generic_data *data,
+static gboolean add_interface(struct generic_data *data,
 				const char *name,
 				const GDBusMethodTable *methods,
 				const GDBusSignalTable *signals,
@@ -1183,7 +1183,32 @@ static void add_interface(struct generic_data *data,
 				GDBusDestroyFunction destroy)
 {
 	struct interface_data *iface;
+	const GDBusMethodTable *method;
+	const GDBusSignalTable *signal;
+	const GDBusPropertyTable *property;
+
+	for (method = methods; method && method->name; method++) {
+		if (!check_experimental(method->flags,
+					G_DBUS_METHOD_FLAG_EXPERIMENTAL))
+			goto done;
+	}
+
+	for (signal = signals; signal && signal->name; signal++) {
+		if (!check_experimental(signal->flags,
+					G_DBUS_SIGNAL_FLAG_EXPERIMENTAL))
+			goto done;
+	}
+
+	for (property = properties; property && property->name; property++) {
+		if (!check_experimental(property->flags,
+					G_DBUS_PROPERTY_FLAG_EXPERIMENTAL))
+			goto done;
+	}
 
+	/* Nothing to register */
+	return FALSE;
+
+done:
 	iface = g_new0(struct interface_data, 1);
 	iface->name = g_strdup(name);
 	iface->methods = methods;
@@ -1194,13 +1219,15 @@ static void add_interface(struct generic_data *data,
 
 	data->interfaces = g_slist_append(data->interfaces, iface);
 	if (data->parent == NULL)
-		return;
+		return TRUE;
 
 	data->added = g_slist_append(data->added, iface);
 	if (data->process_id > 0)
-		return;
+		return TRUE;
 
 	data->process_id = g_idle_add(process_changes, data);
+
+	return TRUE;
 }
 
 static struct generic_data *object_path_ref(DBusConnection *connection,
@@ -1361,15 +1388,18 @@ gboolean g_dbus_register_interface(DBusConnection *connection,
 		return FALSE;
 	}
 
+	if (!add_interface(data, name, methods, signals, properties, user_data,
+								destroy)) {
+		object_path_unref(connection, path);
+		return FALSE;
+	}
+
 	if (properties != NULL && !find_interface(data->interfaces,
 						DBUS_INTERFACE_PROPERTIES))
 		add_interface(data, DBUS_INTERFACE_PROPERTIES,
 				properties_methods, properties_signals, NULL,
 				data, NULL);
 
-	add_interface(data, name, methods, signals, properties, user_data,
-								destroy);
-
 	g_free(data->introspect);
 	data->introspect = NULL;
 
-- 
1.8.0.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH BlueZ 05/11] gdbus: Call check_signals when sending signals with g_dbus_send_message
  2012-12-28 12:50 [PATCH BlueZ 00/11] Add experimental command line switch option Luiz Augusto von Dentz
                   ` (3 preceding siblings ...)
  2012-12-28 12:51 ` [PATCH BlueZ 04/11] gdbus: Check if the interface being registered is valid Luiz Augusto von Dentz
@ 2012-12-28 12:51 ` Luiz Augusto von Dentz
  2012-12-28 12:51 ` [PATCH BlueZ 06/11] gdbus: Introduce G_DBUS_FLAG_ENABLE_DEPRECATED Luiz Augusto von Dentz
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Luiz Augusto von Dentz @ 2012-12-28 12:51 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

If message passed to g_dbus_send_message is a signal verify if it is a
valid and there really exists an interface with respective signal name.
---
 gdbus/object.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/gdbus/object.c b/gdbus/object.c
index c9cf595..d5eb267 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -1511,6 +1511,15 @@ gboolean g_dbus_send_message(DBusConnection *connection, DBusMessage *message)
 
 	if (dbus_message_get_type(message) == DBUS_MESSAGE_TYPE_METHOD_CALL)
 		dbus_message_set_no_reply(message, TRUE);
+	else if (dbus_message_get_type(message) == DBUS_MESSAGE_TYPE_SIGNAL) {
+		const char *path = dbus_message_get_path(message);
+		const char *interface = dbus_message_get_interface(message);
+		const char *name = dbus_message_get_member(message);
+		const GDBusArgInfo *args;
+
+		if (!check_signal(connection, path, interface, name, &args))
+			return FALSE;
+	}
 
 	result = dbus_connection_send(connection, message, NULL);
 
-- 
1.8.0.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH BlueZ 06/11] gdbus: Introduce G_DBUS_FLAG_ENABLE_DEPRECATED
  2012-12-28 12:50 [PATCH BlueZ 00/11] Add experimental command line switch option Luiz Augusto von Dentz
                   ` (4 preceding siblings ...)
  2012-12-28 12:51 ` [PATCH BlueZ 05/11] gdbus: Call check_signals when sending signals with g_dbus_send_message Luiz Augusto von Dentz
@ 2012-12-28 12:51 ` Luiz Augusto von Dentz
  2012-12-30 18:52   ` Marcel Holtmann
  2012-12-28 12:51 ` [PATCH BlueZ 07/11] core: Add command line switch for enabling experimental interfaces Luiz Augusto von Dentz
                   ` (5 subsequent siblings)
  11 siblings, 1 reply; 14+ messages in thread
From: Luiz Augusto von Dentz @ 2012-12-28 12:51 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This flag can be set using g_dbus_set_flags to enable deprecated
interfaces, default is unset.
---
 gdbus/gdbus.h  |  3 ++-
 gdbus/object.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 46 insertions(+), 1 deletion(-)

diff --git a/gdbus/gdbus.h b/gdbus/gdbus.h
index 87fd185..c22c472 100644
--- a/gdbus/gdbus.h
+++ b/gdbus/gdbus.h
@@ -89,7 +89,8 @@ typedef void (* GDBusSecurityFunction) (DBusConnection *connection,
 						GDBusPendingReply pending);
 
 enum GDBusFlags {
-	G_DBUS_FLAG_ENABLE_EXPERIMENTAL = (1 << 0),
+	G_DBUS_FLAG_ENABLE_DEPRECATED   = (1 << 0),
+	G_DBUS_FLAG_ENABLE_EXPERIMENTAL = (1 << 1),
 };
 
 enum GDBusMethodFlags {
diff --git a/gdbus/object.c b/gdbus/object.c
index d5eb267..364cc60 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -127,6 +127,14 @@ static gboolean check_experimental(int flags, int flag)
 	return !(global_flags & G_DBUS_FLAG_ENABLE_EXPERIMENTAL);
 }
 
+static gboolean check_deprecated(int flags, int flag)
+{
+	if (!(flags & flag))
+		return FALSE;
+
+	return !(global_flags & G_DBUS_FLAG_ENABLE_DEPRECATED);
+}
+
 static void generate_interface_xml(GString *gstr, struct interface_data *iface)
 {
 	const GDBusMethodTable *method;
@@ -143,6 +151,10 @@ static void generate_interface_xml(GString *gstr, struct interface_data *iface)
 					G_DBUS_METHOD_FLAG_EXPERIMENTAL))
 			continue;
 
+		if (check_deprecated(method->flags,
+					G_DBUS_METHOD_FLAG_DEPRECATED))
+			continue;
+
 		if (!deprecated && !noreply &&
 				!(method->in_args && method->in_args->name) &&
 				!(method->out_args && method->out_args->name))
@@ -175,6 +187,10 @@ static void generate_interface_xml(GString *gstr, struct interface_data *iface)
 					G_DBUS_SIGNAL_FLAG_EXPERIMENTAL))
 			continue;
 
+		if (check_deprecated(signal->flags,
+					G_DBUS_SIGNAL_FLAG_DEPRECATED))
+			continue;
+
 		if (!deprecated && !(signal->args && signal->args->name))
 			g_string_append_printf(gstr,
 						"\t\t<signal name=\"%s\"/>\n",
@@ -202,6 +218,10 @@ static void generate_interface_xml(GString *gstr, struct interface_data *iface)
 					G_DBUS_PROPERTY_FLAG_EXPERIMENTAL))
 			continue;
 
+		if (check_deprecated(property->flags,
+					G_DBUS_PROPERTY_FLAG_DEPRECATED))
+			continue;
+
 		g_string_append_printf(gstr, "\t\t<property name=\"%s\""
 					" type=\"%s\" access=\"%s%s\"",
 					property->name,	property->type,
@@ -567,6 +587,10 @@ static void append_properties(struct interface_data *data,
 					G_DBUS_PROPERTY_FLAG_EXPERIMENTAL))
 			continue;
 
+		if (check_deprecated(p->flags,
+					G_DBUS_PROPERTY_FLAG_DEPRECATED))
+			continue;
+
 		if (p->get == NULL)
 			continue;
 
@@ -775,6 +799,10 @@ static inline const GDBusPropertyTable *find_property(const GDBusPropertyTable *
 					G_DBUS_PROPERTY_FLAG_EXPERIMENTAL))
 			break;
 
+		if (check_deprecated(p->flags,
+					G_DBUS_PROPERTY_FLAG_DEPRECATED))
+			break;
+
 		return p;
 	}
 
@@ -1062,6 +1090,10 @@ static DBusHandlerResult generic_message(DBusConnection *connection,
 					G_DBUS_METHOD_FLAG_EXPERIMENTAL))
 			return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
 
+		if (check_deprecated(method->flags,
+					G_DBUS_METHOD_FLAG_DEPRECATED))
+			return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+
 		if (g_dbus_args_have_signature(method->in_args,
 							message) == FALSE)
 			continue;
@@ -1191,18 +1223,30 @@ static gboolean add_interface(struct generic_data *data,
 		if (!check_experimental(method->flags,
 					G_DBUS_METHOD_FLAG_EXPERIMENTAL))
 			goto done;
+
+		if (!check_deprecated(method->flags,
+					G_DBUS_METHOD_FLAG_DEPRECATED))
+			goto done;
 	}
 
 	for (signal = signals; signal && signal->name; signal++) {
 		if (!check_experimental(signal->flags,
 					G_DBUS_SIGNAL_FLAG_EXPERIMENTAL))
 			goto done;
+
+		if (!check_deprecated(signal->flags,
+					G_DBUS_SIGNAL_FLAG_DEPRECATED))
+			goto done;
 	}
 
 	for (property = properties; property && property->name; property++) {
 		if (!check_experimental(property->flags,
 					G_DBUS_PROPERTY_FLAG_EXPERIMENTAL))
 			goto done;
+
+		if (!check_deprecated(property->flags,
+					G_DBUS_PROPERTY_FLAG_DEPRECATED))
+			goto done;
 	}
 
 	/* Nothing to register */
-- 
1.8.0.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH BlueZ 07/11] core: Add command line switch for enabling experimental interfaces
  2012-12-28 12:50 [PATCH BlueZ 00/11] Add experimental command line switch option Luiz Augusto von Dentz
                   ` (5 preceding siblings ...)
  2012-12-28 12:51 ` [PATCH BlueZ 06/11] gdbus: Introduce G_DBUS_FLAG_ENABLE_DEPRECATED Luiz Augusto von Dentz
@ 2012-12-28 12:51 ` Luiz Augusto von Dentz
  2012-12-28 12:51 ` [PATCH BlueZ 08/11] core: Reuse --compat/-C switch for enabling deprecated interfaces Luiz Augusto von Dentz
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Luiz Augusto von Dentz @ 2012-12-28 12:51 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This enable passing --experimental/-E to enable experimental interfaces
---
 src/main.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/main.c b/src/main.c
index 4a67e0f..2e8ba34 100644
--- a/src/main.c
+++ b/src/main.c
@@ -368,6 +368,7 @@ static gchar *option_noplugin = NULL;
 static gboolean option_compat = FALSE;
 static gboolean option_detach = TRUE;
 static gboolean option_version = FALSE;
+static gboolean option_experimental = FALSE;
 
 static void free_options(void)
 {
@@ -453,6 +454,8 @@ static GOptionEntry options[] = {
 				"Specify plugins not to load", "NAME,..." },
 	{ "compat", 'C', 0, G_OPTION_ARG_NONE, &option_compat,
 				"Provide deprecated command line interfaces" },
+	{ "experimental", 'E', 0, G_OPTION_ARG_NONE, &option_experimental,
+				"Enable experimental interfaces" },
 	{ "nodetach", 'n', G_OPTION_FLAG_REVERSE,
 				G_OPTION_ARG_NONE, &option_detach,
 				"Run with logging in foreground" },
@@ -467,6 +470,7 @@ int main(int argc, char *argv[])
 	GError *err = NULL;
 	uint16_t sdp_mtu = 0;
 	uint32_t sdp_flags = 0;
+	int gdbus_flags = 0;
 	GKeyFile *config;
 	guint signal, watchdog;
 	const char *watchdog_usec;
@@ -517,6 +521,11 @@ int main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (option_experimental)
+		gdbus_flags = G_DBUS_FLAG_ENABLE_EXPERIMENTAL;
+
+	g_dbus_set_flags(gdbus_flags);
+
 	if (option_compat == TRUE)
 		sdp_flags |= SDP_SERVER_COMPAT;
 
-- 
1.8.0.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH BlueZ 08/11] core: Reuse --compat/-C switch for enabling deprecated interfaces
  2012-12-28 12:50 [PATCH BlueZ 00/11] Add experimental command line switch option Luiz Augusto von Dentz
                   ` (6 preceding siblings ...)
  2012-12-28 12:51 ` [PATCH BlueZ 07/11] core: Add command line switch for enabling experimental interfaces Luiz Augusto von Dentz
@ 2012-12-28 12:51 ` Luiz Augusto von Dentz
  2012-12-28 12:51 ` [PATCH BlueZ 09/11] media: Enable RegisterPlayer and UnregisterPlayer methods as experimental Luiz Augusto von Dentz
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Luiz Augusto von Dentz @ 2012-12-28 12:51 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

---
 src/main.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/main.c b/src/main.c
index 2e8ba34..f6c4ee6 100644
--- a/src/main.c
+++ b/src/main.c
@@ -524,10 +524,12 @@ int main(int argc, char *argv[])
 	if (option_experimental)
 		gdbus_flags = G_DBUS_FLAG_ENABLE_EXPERIMENTAL;
 
-	g_dbus_set_flags(gdbus_flags);
-
-	if (option_compat == TRUE)
+	if (option_compat == TRUE) {
 		sdp_flags |= SDP_SERVER_COMPAT;
+		gdbus_flags |= G_DBUS_FLAG_ENABLE_DEPRECATED;
+	}
+
+	g_dbus_set_flags(gdbus_flags);
 
 	start_sdp_server(sdp_mtu, sdp_flags);
 
-- 
1.8.0.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH BlueZ 09/11] media: Enable RegisterPlayer and UnregisterPlayer methods as experimental
  2012-12-28 12:50 [PATCH BlueZ 00/11] Add experimental command line switch option Luiz Augusto von Dentz
                   ` (7 preceding siblings ...)
  2012-12-28 12:51 ` [PATCH BlueZ 08/11] core: Reuse --compat/-C switch for enabling deprecated interfaces Luiz Augusto von Dentz
@ 2012-12-28 12:51 ` Luiz Augusto von Dentz
  2012-12-28 12:51 ` [PATCH BlueZ 10/11] player: Enable MediaPlayer1 interface " Luiz Augusto von Dentz
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Luiz Augusto von Dentz @ 2012-12-28 12:51 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

---
 profiles/audio/media.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/profiles/audio/media.c b/profiles/audio/media.c
index f728460..e4206e3 100644
--- a/profiles/audio/media.c
+++ b/profiles/audio/media.c
@@ -868,7 +868,6 @@ static DBusMessage *unregister_endpoint(DBusConnection *conn, DBusMessage *msg,
 	return g_dbus_create_reply(msg, DBUS_TYPE_INVALID);
 }
 
-#if 0
 static struct media_player *media_adapter_find_player(
 						struct media_adapter *adapter,
 						const char *sender,
@@ -1533,7 +1532,6 @@ static DBusMessage *unregister_player(DBusConnection *conn, DBusMessage *msg,
 
 	return g_dbus_create_reply(msg, DBUS_TYPE_INVALID);
 }
-#endif
 
 static const GDBusMethodTable media_methods[] = {
 	{ GDBUS_METHOD("RegisterEndpoint",
@@ -1541,14 +1539,12 @@ static const GDBusMethodTable media_methods[] = {
 		NULL, register_endpoint) },
 	{ GDBUS_METHOD("UnregisterEndpoint",
 		GDBUS_ARGS({ "endpoint", "o" }), NULL, unregister_endpoint) },
-#if 0
-	{ GDBUS_METHOD("RegisterPlayer",
+	{ GDBUS_EXPERIMENTAL_METHOD("RegisterPlayer",
 		GDBUS_ARGS({ "player", "o" }, { "properties", "a{sv}" },
 						{ "metadata", "a{sv}" }),
 		NULL, register_player) },
-	{ GDBUS_METHOD("UnregisterPlayer",
+	{ GDBUS_EXPERIMENTAL_METHOD("UnregisterPlayer",
 		GDBUS_ARGS({ "player", "o" }), NULL, unregister_player) },
-#endif
 	{ },
 };
 
@@ -1559,10 +1555,8 @@ static void path_free(void *data)
 	while (adapter->endpoints)
 		release_endpoint(adapter->endpoints->data);
 
-#if 0
 	while (adapter->players)
 		media_player_destroy(adapter->players->data);
-#endif
 
 	adapters = g_slist_remove(adapters, adapter);
 
-- 
1.8.0.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH BlueZ 10/11] player: Enable MediaPlayer1 interface as experimental
  2012-12-28 12:50 [PATCH BlueZ 00/11] Add experimental command line switch option Luiz Augusto von Dentz
                   ` (8 preceding siblings ...)
  2012-12-28 12:51 ` [PATCH BlueZ 09/11] media: Enable RegisterPlayer and UnregisterPlayer methods as experimental Luiz Augusto von Dentz
@ 2012-12-28 12:51 ` Luiz Augusto von Dentz
  2012-12-28 12:51 ` [PATCH BlueZ 11/11] AVRCP: Fix not checking for media_player_controller_create Luiz Augusto von Dentz
  2012-12-30 19:02 ` [PATCH BlueZ 00/11] Add experimental command line switch option Marcel Holtmann
  11 siblings, 0 replies; 14+ messages in thread
From: Luiz Augusto von Dentz @ 2012-12-28 12:51 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This enable MediaPlayer1 when GDBUS_EXPERIMENTAL=1
---
 profiles/audio/player.c | 28 ++++++++++++++++------------
 1 file changed, 16 insertions(+), 12 deletions(-)

diff --git a/profiles/audio/player.c b/profiles/audio/player.c
index 005d0d1..693a590 100644
--- a/profiles/audio/player.c
+++ b/profiles/audio/player.c
@@ -239,25 +239,31 @@ static void set_setting(const GDBusPropertyTable *property,
 }
 
 static const GDBusMethodTable media_player_methods[] = {
-	{ GDBUS_METHOD("GetTrack",
+	{ GDBUS_EXPERIMENTAL_METHOD("GetTrack",
 			NULL, GDBUS_ARGS({ "metadata", "a{sv}" }),
 			media_player_get_track) },
 	{ }
 };
 
 static const GDBusSignalTable media_player_signals[] = {
-	{ GDBUS_SIGNAL("TrackChanged",
+	{ GDBUS_EXPERIMENTAL_SIGNAL("TrackChanged",
 			GDBUS_ARGS({ "metadata", "a{sv}" })) },
 	{ }
 };
 
 static const GDBusPropertyTable media_player_properties[] = {
-	{ "Position", "u", get_position },
-	{ "Status", "s", get_status, NULL, status_exists },
-	{ "Equalizer", "s", get_setting, set_setting, setting_exists },
-	{ "Repeat", "s", get_setting, set_setting, setting_exists },
-	{ "Shuffle", "s", get_setting, set_setting, setting_exists },
-	{ "Scan", "s", get_setting, set_setting, setting_exists },
+	{ "Position", "u", get_position, NULL, NULL,
+					G_DBUS_PROPERTY_FLAG_EXPERIMENTAL },
+	{ "Status", "s", get_status, NULL, status_exists,
+					G_DBUS_PROPERTY_FLAG_EXPERIMENTAL },
+	{ "Equalizer", "s", get_setting, set_setting, setting_exists,
+					G_DBUS_PROPERTY_FLAG_EXPERIMENTAL },
+	{ "Repeat", "s", get_setting, set_setting, setting_exists,
+					G_DBUS_PROPERTY_FLAG_EXPERIMENTAL },
+	{ "Shuffle", "s", get_setting, set_setting, setting_exists,
+					G_DBUS_PROPERTY_FLAG_EXPERIMENTAL },
+	{ "Scan", "s", get_setting, set_setting, setting_exists,
+					G_DBUS_PROPERTY_FLAG_EXPERIMENTAL },
 	{ }
 };
 
@@ -298,7 +304,6 @@ struct media_player *media_player_controller_create(const char *path)
 							g_free, g_free);
 	mp->progress = g_timer_new();
 
-#if 0
 	if (!g_dbus_register_interface(btd_get_dbus_connection(),
 					mp->path, MEDIA_PLAYER_INTERFACE,
 					media_player_methods,
@@ -308,7 +313,7 @@ struct media_player *media_player_controller_create(const char *path)
 		media_player_destroy(mp);
 		return NULL;
 	}
-#endif
+
 	DBG("%s", mp->path);
 
 	return mp;
@@ -410,7 +415,6 @@ void media_player_set_status(struct media_player *mp, const char *status)
 
 static gboolean process_metadata_changed(void *user_data)
 {
-#if 0
 	struct media_player *mp = user_data;
 	DBusMessage *signal;
 	DBusMessageIter iter, dict;
@@ -439,7 +443,7 @@ static gboolean process_metadata_changed(void *user_data)
 	dbus_message_iter_close_container(&iter, &dict);
 
 	g_dbus_send_message(btd_get_dbus_connection(), signal);
-#endif
+
 	return FALSE;
 }
 
-- 
1.8.0.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH BlueZ 11/11] AVRCP: Fix not checking for media_player_controller_create
  2012-12-28 12:50 [PATCH BlueZ 00/11] Add experimental command line switch option Luiz Augusto von Dentz
                   ` (9 preceding siblings ...)
  2012-12-28 12:51 ` [PATCH BlueZ 10/11] player: Enable MediaPlayer1 interface " Luiz Augusto von Dentz
@ 2012-12-28 12:51 ` Luiz Augusto von Dentz
  2012-12-30 19:02 ` [PATCH BlueZ 00/11] Add experimental command line switch option Marcel Holtmann
  11 siblings, 0 replies; 14+ messages in thread
From: Luiz Augusto von Dentz @ 2012-12-28 12:51 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

Now that the MediaPlayer1 interface is experimental the interface
registration may fail which return NULL, in that case there is no
point on register to any notifications.
---
 profiles/audio/avrcp.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
index 4e3d31d..ce070cd 100644
--- a/profiles/audio/avrcp.c
+++ b/profiles/audio/avrcp.c
@@ -1987,6 +1987,11 @@ static gboolean avrcp_get_capabilities_resp(struct avctp *conn,
 
 	count = pdu->params[1];
 
+	path = device_get_path(session->dev->btd_dev);
+	mp = media_player_controller_create(path);
+	if (mp == NULL)
+		return FALSE;
+
 	for (; count > 0; count--) {
 		uint8_t event = pdu->params[1 + count];
 
@@ -2001,8 +2006,6 @@ static gboolean avrcp_get_capabilities_resp(struct avctp *conn,
 		}
 	}
 
-	path = device_get_path(session->dev->btd_dev);
-	mp = media_player_controller_create(path);
 	media_player_set_callbacks(mp, &ct_cbs, player);
 	player->user_data = mp;
 	player->destroy = (GDestroyNotify) media_player_destroy;
-- 
1.8.0.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH BlueZ 06/11] gdbus: Introduce G_DBUS_FLAG_ENABLE_DEPRECATED
  2012-12-28 12:51 ` [PATCH BlueZ 06/11] gdbus: Introduce G_DBUS_FLAG_ENABLE_DEPRECATED Luiz Augusto von Dentz
@ 2012-12-30 18:52   ` Marcel Holtmann
  0 siblings, 0 replies; 14+ messages in thread
From: Marcel Holtmann @ 2012-12-30 18:52 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

Hi Luiz,

> This flag can be set using g_dbus_set_flags to enable deprecated
> interfaces, default is unset.
> ---
>  gdbus/gdbus.h  |  3 ++-
>  gdbus/object.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 46 insertions(+), 1 deletion(-)

I decided against this patch. At least for now. The whole point of the
interface versioning is to support two API versions. So having an option
to manually enable them makes no sense. We can revisit this once we
reach that point, but otherwise I leave this out for now.

Regards

Marcel



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH BlueZ 00/11] Add experimental command line switch option
  2012-12-28 12:50 [PATCH BlueZ 00/11] Add experimental command line switch option Luiz Augusto von Dentz
                   ` (10 preceding siblings ...)
  2012-12-28 12:51 ` [PATCH BlueZ 11/11] AVRCP: Fix not checking for media_player_controller_create Luiz Augusto von Dentz
@ 2012-12-30 19:02 ` Marcel Holtmann
  11 siblings, 0 replies; 14+ messages in thread
From: Marcel Holtmann @ 2012-12-30 19:02 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

Hi Luiz,

> These set of patches introduces g_dbus_set_flags along with experimental flags,
> g_dbus_set_flags is not per connection as originally suggested to avoid using
> dbus_connection_allocate_data_slot which requires calling
> dbus_connection_free_data_slot once done but currently we don't keep any data
> associated with connections, besides the flags comes from command line options
> which would end up setting the same flags for every connection anyway.
> 
> In addition to experimental it also add support to enable deprecated via compat
> swith option, this makes any API marked as deprecated to be disabled if compat
> is not set. This is on purpose to expose applications using deprecated APIs.

besides the deprecated switch, all patches have been applied.

Regards

Marcel



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2012-12-30 19:02 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-28 12:50 [PATCH BlueZ 00/11] Add experimental command line switch option Luiz Augusto von Dentz
2012-12-28 12:50 ` [PATCH BlueZ 01/11] gdbus: Introduce G_DBUS_METHOD_FLAG_EXPERIMENTAL Luiz Augusto von Dentz
2012-12-28 12:51 ` [PATCH BlueZ 02/11] gdbus: Introduce G_DBUS_SIGNAL_FLAG_EXPERIMENTAL Luiz Augusto von Dentz
2012-12-28 12:51 ` [PATCH BlueZ 03/11] gdbus: Introduce G_DBUS_PROPERTY_FLAG_EXPERIMENTAL Luiz Augusto von Dentz
2012-12-28 12:51 ` [PATCH BlueZ 04/11] gdbus: Check if the interface being registered is valid Luiz Augusto von Dentz
2012-12-28 12:51 ` [PATCH BlueZ 05/11] gdbus: Call check_signals when sending signals with g_dbus_send_message Luiz Augusto von Dentz
2012-12-28 12:51 ` [PATCH BlueZ 06/11] gdbus: Introduce G_DBUS_FLAG_ENABLE_DEPRECATED Luiz Augusto von Dentz
2012-12-30 18:52   ` Marcel Holtmann
2012-12-28 12:51 ` [PATCH BlueZ 07/11] core: Add command line switch for enabling experimental interfaces Luiz Augusto von Dentz
2012-12-28 12:51 ` [PATCH BlueZ 08/11] core: Reuse --compat/-C switch for enabling deprecated interfaces Luiz Augusto von Dentz
2012-12-28 12:51 ` [PATCH BlueZ 09/11] media: Enable RegisterPlayer and UnregisterPlayer methods as experimental Luiz Augusto von Dentz
2012-12-28 12:51 ` [PATCH BlueZ 10/11] player: Enable MediaPlayer1 interface " Luiz Augusto von Dentz
2012-12-28 12:51 ` [PATCH BlueZ 11/11] AVRCP: Fix not checking for media_player_controller_create Luiz Augusto von Dentz
2012-12-30 19:02 ` [PATCH BlueZ 00/11] Add experimental command line switch option Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).