@@ -54,8 +54,8 @@ Work your way through other examples to explore supported functionality.
54
54
55
55
## Note on systems without X11
56
56
If no X server is running, the module fails when attempting to obtain a D-Bus
57
- connection at ` dbus._dbus. getBus()` . This can be remedied by setting two
58
- environment variables manually (the actual bus address might be different):
57
+ connection at ` DBus. getBus()` . This can be remedied by setting two environment
58
+ variables manually (the actual bus address might be different):
59
59
60
60
process.env.DISPLAY = ':0';
61
61
process.env.DBUS_SESSION_BUS_ADDRESS = 'unix:path=/run/dbus/system_bus_socket';
@@ -68,16 +68,7 @@ environment variables manually (the actual bus address might be different):
68
68
69
69
The root object of this module.
70
70
71
- #### ` new DBus() `
72
-
73
- Create a new DBus instance.
74
-
75
- ```
76
- var DBus = require('dbus')
77
- var dbus = new DBus()
78
- ```
79
-
80
- #### ` DBus.prototype.getBus(busName) `
71
+ #### ` DBus.getBus(busName) `
81
72
82
73
* busName ` <string> `
83
74
@@ -87,10 +78,10 @@ bus or `"session"` to connect to the session bus.
87
78
Returns a ` Bus ` .
88
79
89
80
```
90
- var bus = dbus .getBus('session');
81
+ var bus = DBus .getBus('session');
91
82
```
92
83
93
- #### ` DBus.prototype. registerService(busName, serviceName) `
84
+ #### ` DBus.registerService(busName, serviceName) `
94
85
95
86
* busName ` <string> `
96
87
* serviceName ` <string> `
@@ -106,9 +97,26 @@ registered._
106
97
Returns a ` Service ` .
107
98
108
99
```
109
- var service = dbus.registerService('session', 'com.example.Library');
100
+ var service = DBus.registerService('session', 'com.example.Library');
101
+ ```
102
+
103
+ #### * DEPRECATED* ` new DBus() `
104
+
105
+ Create a new DBus instance.
106
+
107
+ ```
108
+ var DBus = require('dbus')
109
+ var dbus = new DBus()
110
110
```
111
111
112
+ #### * DEPRECATED* ` DBus.prototype.getBus(busName) `
113
+
114
+ Use ` DBus.getBus(busName) ` .
115
+
116
+ #### * DEPRECATED* ` DBus.prototype.registerService(busName, serviceName) `
117
+
118
+ Use ` DBus.registerService(busName, serviceName) `
119
+
112
120
113
121
### Bus
114
122
0 commit comments