From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ 7/8] player: Enable MediaPlayer1 interface as experimental
Date: Sun, 23 Dec 2012 22:15:17 +0200 [thread overview]
Message-ID: <1356293718-9348-7-git-send-email-luiz.dentz@gmail.com> (raw)
In-Reply-To: <1356293718-9348-1-git-send-email-luiz.dentz@gmail.com>
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.7.11.7
next prev parent reply other threads:[~2012-12-23 20:15 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-23 20:15 [PATCH BlueZ 1/8] gdbus: Introduce G_DBUS_METHOD_FLAG_EXPERIMENTAL Luiz Augusto von Dentz
2012-12-23 20:15 ` [PATCH BlueZ 2/8] gdbus: Introduce G_DBUS_SIGNAL_FLAG_EXPERIMENTAL Luiz Augusto von Dentz
2012-12-23 20:15 ` [PATCH BlueZ 3/8] gdbus: Introduce G_DBUS_PROPERTY_FLAG_EXPERIMENTAL Luiz Augusto von Dentz
2012-12-23 20:15 ` [PATCH BlueZ 4/8] gdbus: Check if the interface being registered is valid Luiz Augusto von Dentz
2012-12-23 20:15 ` [PATCH BlueZ 5/8] gdbus: Call check_signals when sending signals with g_dbus_send_message Luiz Augusto von Dentz
2012-12-23 20:15 ` [PATCH BlueZ 6/8] media: Enable RegisterPlayer and UnregisterPlayer methods as experimental Luiz Augusto von Dentz
2012-12-23 20:15 ` Luiz Augusto von Dentz [this message]
2012-12-23 20:15 ` [PATCH BlueZ 8/8] AVRCP: Fix not checking for media_player_controller_create Luiz Augusto von Dentz
2012-12-23 20:58 ` [PATCH BlueZ 1/8] gdbus: Introduce G_DBUS_METHOD_FLAG_EXPERIMENTAL Marcel Holtmann
2012-12-23 22:06 ` Luiz Augusto von Dentz
2012-12-23 23:35 ` Marcel Holtmann
2012-12-24 0:12 ` Luiz Augusto von Dentz
2012-12-27 8:42 ` Luiz Augusto von Dentz
2012-12-27 17:49 ` Marcel Holtmann
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=1356293718-9348-7-git-send-email-luiz.dentz@gmail.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox