if (_bt_copy_utf8_string(meta_data.title, metadata->title, BT_NAME_MAX))
BT_DBG("Error in copying Title\n");
- if (_bt_copy_utf8_string(meta_data.artist, metadata->artist[0], BT_NAME_MAX))
+ if (_bt_copy_utf8_string(meta_data.artist, metadata->artists[0], BT_NAME_MAX))
BT_DBG("Error in copying Artist\n");
if (_bt_copy_utf8_string(meta_data.album, metadata->album, BT_NAME_MAX))
BT_DBG("Error in copying Album\n");
- if (_bt_copy_utf8_string(meta_data.genre, metadata->genre[0], BT_NAME_MAX))
+ if (_bt_copy_utf8_string(meta_data.genre, metadata->genres[0], BT_NAME_MAX))
BT_DBG("Error in copying Genre\n");
meta_data.number = metadata->tracknumber;
media_metadata_t, 0);
properties.metadata.title = g_strdup(data.title);
- properties.metadata.artist = g_malloc0(sizeof(char *));
- properties.metadata.artist[0] = g_strdup(data.artist);
+ properties.metadata.artists = g_malloc0(sizeof(char *));
+ properties.metadata.artists[0] = g_strdup(data.artist);
properties.metadata.album = g_strdup(data.album);
- properties.metadata.genre = g_malloc0(sizeof(char *));
- properties.metadata.genre[0] = g_strdup(data.genre);
+ properties.metadata.genres = g_malloc0(sizeof(char *));
+ properties.metadata.genres[0] = g_strdup(data.genre);
properties.metadata.tracknumber = data.number;
properties.metadata.duration = data.duration;
result = _bt_avrcp_set_properties(&properties);
g_free((gpointer)properties.metadata.title);
- g_free((gpointer)properties.metadata.artist);
+ g_free((gpointer)properties.metadata.artists);
g_free((gpointer)properties.metadata.album);
- g_free((gpointer)properties.metadata.genre);
+ g_free((gpointer)properties.metadata.genres);
break;
}
"xesam:title",
DBUS_TYPE_STRING, &metadata.title, 0);
- metadata.artist = g_malloc0(sizeof(char *));
- metadata.artist[0] = "";
+ metadata.artists = g_malloc0(sizeof(char *));
+ metadata.artists[0] = "";
__bt_media_append_metadata_dict_entry(&property_dict,
"xesam:artist",
"xesam:album",
DBUS_TYPE_STRING, &metadata.album, 0);
- metadata.genre = g_malloc0(sizeof(char *));
- metadata.genre[0] = "";
+ metadata.genres = g_malloc0(sizeof(char *));
+ metadata.genres[0] = "";
__bt_media_append_metadata_dict_entry(&property_dict,
"xesam:genre",
SHUFFLE,
LOOPSTATUS,
POSITION,
- METADATA
+ METADATA,
+ EQUALIZER = 0x02, /* bluez 4.101 */
+ REPEAT, /* bluez 4.101 */
+ SCAN, /* bluez 4.101 */
+ STATUS, /* bluez 4.101 */
} media_player_property_type;
+/* bluez 4.101 */
typedef enum {
- REPEAT_MODE_OFF = 0x01,
- REPEAT_SINGLE_TRACK,
- REPEAT_ALL_TRACK,
- REPEAT_INVALID,
+ EQUALIZER_OFF = 0x01,
+ EQUALIZER_ON,
+ EQUALIZER_INVALID,
+} media_player_equalizer_status;
+
+typedef enum {
+ REPEAT_MODE_OFF = 0x01,
+ REPEAT_SINGLE_TRACK,
+ REPEAT_ALL_TRACK,
+ REPEAT_GROUP, /* bluez 4.101 */
+ REPEAT_INVALID,
} media_player_repeat_status;
typedef enum {
STATUS_STOPPED = 0x00,
STATUS_PLAYING,
STATUS_PAUSED,
+ STATUS_FORWARD_SEEK, /* bluez 4.101 */
+ STATUS_REVERSE_SEEK, /* bluez 4.101 */
+ STATUS_ERROR, /* bluez 4.101 */
STATUS_INVALID
} media_player_status;
SHUFFLE_INVALID,
} media_player_shuffle_status;
+/* bluez 4.101 */
+typedef enum {
+ SCAN_MODE_OFF = 0x01,
+ SCAN_ALL_TRACK,
+ SCAN_GROUP,
+ SCAN_INVALID,
+} media_player_scan_status;
+
typedef struct {
const char *title;
- const char **artist;
+ const char **artists;
const char *album;
- const char **genre;
+ const char **genres;
unsigned int tracknumber;
+ const char *artist; /* bluez 4.101 */
+ const char *genre; /* bluez 4.101 */
+ unsigned int total_tracks; /* bluez 4.101 */
+ unsigned int number; /* bluez 4.101 */
unsigned int duration;
} media_metadata_attributes_t;
typedef struct {
media_player_repeat_status loopstatus;
media_player_status playbackstatus;
- gboolean shuffle;
+ gboolean shuffle_mode;
gint64 position;
media_metadata_attributes_t metadata;
+ media_player_equalizer_status equalizer; /* bluez 4.101 */
+ media_player_repeat_status repeat; /* bluez 4.101 */
+ media_player_shuffle_status shuffle; /* bluez 4.101 */
+ media_player_scan_status scan; /* bluez 4.101 */
+ media_player_status status; /* bluez 4.101 */
} media_player_settings_t;
typedef struct {