Closed mk868 closed 3 years ago
This is my proposition to simplify API, we can export objects that describe their path with the getObjectPath method. An example object class:
getObjectPath
public class SimpleObject implements Properties { private final String objectPath; public SimpleObject(String objectPath) { this.objectPath = objectPath; } @Override public String getObjectPath() { return objectPath; } @Override public <A> A Get(String interface_name, String property_name) { // ... } @Override public <A> void Set(String interface_name, String property_name, A value) { // ... } @Override public Map<String, Variant<?>> GetAll(String interface_name) { // ... } }
We can easily export this object like this:
DBusConnection conn = DBusConnection.getConnection(DBusBusType.SESSION); SimpleObject simpleObject = new SimpleObject("/hal/module1"); conn.exportObject(simpleObject);
Additionally, I added the default result of the isRemote method.
isRemote
This is my proposition to simplify API, we can export objects that describe their path with the
getObjectPath
method. An example object class:We can easily export this object like this:
Additionally, I added the default result of the
isRemote
method.