Comments (1)
Get
isn't actually implemented in ddbus, it's a standard dbus interface, see https://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties
The .Get
method you are trying to call is actually just syntactic sugar for obj.call!ObjectPath("Get", device, "Device")
I believe device
isn't the correct parameter you want to pass because it's a ObjectPath but in the documentation it says it should be an interface name.
Maybe you want to actually call .Get
on another PathIface with your object path as path? Something like
Connection conn = connectToBus(DBusBusType.DBUS_BUS_SYSTEM);
PathIface obj = new PathIface(conn, busName("org.freedesktop.UDisks2"),
ObjectPath("/org/freedesktop/UDisks2/Manager"),
interfaceName("org.freedesktop.UDisks2.Manager"));
Variant!DBusAny[string] arg;
foreach (devicePath; obj.call!(ObjectPath[])("GetBlockDevices", arg))
{
PathIface device = new PathIface(conn,
busName("org.freedesktop.UDisks2"),
devicePath,
interfaceName("org.freedesktop.DBus.Properties"));
///org/freedesktop/UDisks2/block_devices/sda3
writeln(device.Get("", "Drive").to!ObjectPath());
}
from ddbus.
Related Issues (19)
- dub build failure HOT 5
- Add support for dictionary types HOT 2
- New release HOT 1
- Support for dynamic variants
- What is the intended meaning of isVariant? HOT 2
- Code readability HOT 3
- DBusAny.get templates for array types don't compile HOT 1
- Crash when using registerMethods HOT 3
- Systembus HOT 1
- Add support for meson HOT 5
- How to list all the removable devices with DBus and UDisks2? HOT 6
- New release since the current one is broken HOT 2
- canDBus returns false for structs HOT 7
- Translate Exception to DBus error Message in MessageRouter.setHandler HOT 1
- API for emitting a signal via dbus?
- Signals are not received (missing a call to dbus_bus_add_match?)
- Unregister signals / router handlers HOT 2
- Add support for emitting signals and properties for server
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ddbus.