Hi,
I am sorry if ask similar question again.
My question is how can I get access to all object paths as shown below, when
calling qdbus.
How can I get the name of the object path?
thanks in advance
I have written a test.cpp (attached) file which produces following output
TQT_DBusMessage::ReplyMessage Type : 2
TQT_DBusData::Map : 16
Name1 : Map
Size1 : 1
Name2 : Map
Size2 : 4
Name3 : Map
key : org.bluez.Device1
Size3 : 13
Name3 : Map
key : org.bluez.MediaControl1
Size3 : 1
Name3 : Map
key :
org.freedesktop.DBus.Introspectable
Size3 : 0
Name3 : Map
key :
org.freedesktop.DBus.Properties
Size3 : 0
Now, when I run
qdbus --literal --system org.bluez /
org.freedesktop.DBus.ObjectManager.GetManagedObjects
[Argument: a{oa{sa{sv}}} {
[ObjectPath: /org/bluez] = [ Argument: a{sa{sv}}
{"org.freedesktop.DBus.Introspectable" = [Argument: a{sv} {}],
"org.bluez.AgentManager1" = [Argument: a{sv} {}],
"org.bluez.ProfileManager1" = [Argument: a{sv} {}],
"org.bluez.HealthManager1" = [Argument: a{sv} {}]}],
[ObjectPath: /org/bluez/hci0] = [Argument: a{sa{sv}}
{"org.freedesktop.DBus.Introspectable" = [Argument: a{sv} {}],
"org.bluez.Adapter1" = [Argument: a{sv}
{"Address" = [Variant(QString):
"00:10:60:D1:0F:5C"],
"Name" = [Variant(QString): "fujitsu"],
"Alias" = [Variant(QString): "fujitsu"],
"Class" = [Variant(uint): 0],
"Powered" = [Variant(bool): false],
"Discoverable" = [Variant(bool): false],
"DiscoverableTimeout" = [Variant(uint): 180],
"Pairable" = [Variant(bool): true],
"PairableTimeout" = [Variant(uint): 0],
"Discovering" = [Variant(bool): false],
"UUIDs" = [Variant(QStringList):
{"00001112-0000-1000-8000-00805f9b34fb",
"00001801-0000-1000-8000-00805f9b34fb",
"0000110e-0000-1000-8000-00805f9b34fb",
"00001106-0000-1000-8000-00805f9b34fb",
"00001800-0000-1000-8000-00805f9b34fb",
"00001105-0000-1000-8000-00805f9b34fb",
"00001200-0000-1000-8000-00805f9b34fb",
"0000110c-0000-1000-8000-00805f9b34fb",
"00001104-0000-1000-8000-00805f9b34fb",
"0000110b-0000-1000-8000-00805f9b34fb",
"0000110a-0000-1000-8000-00805f9b34fb",
"00005005-0000-1000-8000-0002ee000001",
"00001133-0000-1000-8000-00805f9b34fb",
"0000112f-0000-1000-8000-00805f9b34fb",
"00001132-0000-1000-8000-00805f9b34fb"}],
"Modalias" = [Variant(QString):
"usb:v1D6Bp0246d052B"]}],
"org.freedesktop.DBus.Properties" = [Argument: a{sv} {}],
"org.bluez.GattManager1" = [Argument: a{sv} {}],
"org.bluez.Media1" = [Argument: a{sv} {}],
"org.bluez.NetworkServer1" = [Argument: a{sv} {}]
}],
[ObjectPath: /org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX] = [Argument: a{sa{sv}}
{"org.freedesktop.DBus.Introspectable" = [Argument: a{sv} {}],
{"org.bluez.Device1" =
[Argument: a{sv}
{"Address" = [Variant(QString):
"XX:XX:XX:XX:XX:XX"],
"Name" = [Variant(QString): "Mobile
Phone"],
"Alias" = [Variant(QString): "Mobile
Phone"],
"Class" = [Variant(uint): 5898764],
"Icon" = [Variant(QString):
"phone"],
"Paired" = [Variant(bool): true],
"Trusted" = [Variant(bool): true],
"Blocked" = [Variant(bool): false],
"LegacyPairing" = [Variant(bool): false],
"Connected" = [Variant(bool): false],
"UUIDs" = [Variant(QStringList):
{"00000002-0000-1000-8000-0002ee000002",
"00001103-0000-1000-8000-00805f9b34fb",
"00001105-0000-1000-8000-00805f9b34fb",
"00001106-0000-1000-8000-00805f9b34fb",
"0000110a-0000-1000-8000-00805f9b34fb",
"0000110c-0000-1000-8000-00805f9b34fb",
"0000110e-0000-1000-8000-00805f9b34fb",
"00001112-0000-1000-8000-00805f9b34fb",
"0000111f-0000-1000-8000-00805f9b34fb",
"0000112f-0000-1000-8000-00805f9b34fb",
"00001132-0000-1000-8000-00805f9b34fb",
"00005005-0000-1000-8000-0002ee000001",
"00005601-0000-1000-8000-0002ee000001"}],
"Adapter" = [Variant: [ObjectPath:
/org/bluez/hci0]],
"ServicesResolved" = [Variant(bool): false]
}
],
"org.freedesktop.DBus.Properties" = [Argument: a{sv} {}],
"org.bluez.MediaControl1" = [Argument: a{sv}
{"Connected" =
[Variant(bool): false]}]
}
}]
}]