DBus 对象路径:在哪里可以找到它?
DBus object path: where to find it?
我正在尝试实现 AVRCP 协议的一些功能。这里是文档:
http://git.kernel.org/cgit/bluetooth/bluez.git/tree/doc/media-api.txt
我不明白的是如何检索我的播放器的对象路径:
Object path [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX/playerX
我不确定它是从某些 DBus 方法返回的还是我必须使用蓝牙地址和本地设备手动构建它。
I'm not sure if it is returned from some DBus methods or I have to
manually build it using the bluetooth address and the local device.
前者。您(我假设的应用程序)不需要构建此对象路径,该路径将通过某些 DBus 方法return。
此处对象含义:
Object path [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX/playerX
[variable prefix] was null basically.
{hci0,hci1,...} was which of your Bluetooth chip, basically it should be hci0.
/dev_XX_XX_XX_XX_XX_XX remote device mac address.
/playerX which player of your target.
object path的material不用太在意,其实就是一个字符串(按特定格式栈组合)
您可以参考:
Properties
boolean Connected [readonly]
object Player [readonly, optional]
Addressed Player object path.
我正在尝试实现 AVRCP 协议的一些功能。这里是文档:
http://git.kernel.org/cgit/bluetooth/bluez.git/tree/doc/media-api.txt
我不明白的是如何检索我的播放器的对象路径:
Object path [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX/playerX
我不确定它是从某些 DBus 方法返回的还是我必须使用蓝牙地址和本地设备手动构建它。
I'm not sure if it is returned from some DBus methods or I have to manually build it using the bluetooth address and the local device.
前者。您(我假设的应用程序)不需要构建此对象路径,该路径将通过某些 DBus 方法return。
此处对象含义:
Object path [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX/playerX
[variable prefix] was null basically.
{hci0,hci1,...} was which of your Bluetooth chip, basically it should be hci0.
/dev_XX_XX_XX_XX_XX_XX remote device mac address.
/playerX which player of your target.
object path的material不用太在意,其实就是一个字符串(按特定格式栈组合)
您可以参考:
Properties
boolean Connected [readonly] object Player [readonly, optional] Addressed Player object path.