You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -151,17 +151,17 @@ setTimeout(() => {
151
151
152
152
asyncfunctionmain() {
153
153
// make a request for the name on the bus
154
-
let name =awaitbus.requestName('org.test.name');
155
-
// export the interface on the name
156
-
name.export('/org/test/path', example);
154
+
awaitbus.requestName('org.test.name');
155
+
// export the interface on the path
156
+
bus.export('/org/test/path', example);
157
157
}
158
158
159
159
main().catch((err) => {
160
160
console.log('Error: '+ err);
161
161
});
162
162
```
163
163
164
-
Interfaces extend the `Interface` class. Declare service methods, properties, and signals with the decorators provided from the library. First request a name on the bus with `bus.requestName()`. Then call `name.export()` with the path and interface to expose this interface on the bus.
164
+
Interfaces extend the `Interface` class. Declare service methods, properties, and signals with the decorators provided from the library. You can optionally request a name on the bus with `bus.requestName()` so clients have a well-known name to connect to. Then call `bus.export()` with the path and interface to expose this interface on the bus.
165
165
166
166
Methods are called when a DBus client calls that method on the server. Properties can be gotten and set with the `org.freedesktop.DBus.Properties` interface and are included in the introspection xml.
0 commit comments