Check-in [c8d45ae1b2]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Added formatted HTML file for the manpage for dbusclient.
Timelines: family | ancestors | descendants | both | trunk | dbusclient-1.0
Files: files | file ages | folders
SHA1:c8d45ae1b21978eaa84f7e48d6b3d33108c20513
User & Date: andrewm 2019-03-01 11:59:18
Context
2019-03-24
15:24
Merging micca development onto trunk. Release of micca version 1.1.5. check-in: 130c2d5e58 user: andrewm tags: trunk, micca-1.1.5
2019-03-01
11:59
Added formatted HTML file for the manpage for dbusclient. check-in: c8d45ae1b2 user: andrewm tags: trunk, dbusclient-1.0
11:45
Merging dbusclient develop onto the trunk and releasing the package as version 1.0 check-in: d72d1d5123 user: andrewm tags: trunk
Changes

Added dbusclient/doc/man/dbusclient.html.











































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485

<!DOCTYPE html><html><head>
<title>dbusclient - DBus Client Commands</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'dbusclient.man' by tcllib/doctools with format 'html'
   -->
<!-- dbusclient.n
   -->
<body><div class="doctools">
<h1 class="doctools_title">dbusclient(n) 1.0 dbusclient &quot;DBus Client Commands&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>dbusclient - Client side DBus interactions</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Commands</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Connection object methods</a></li>
<li class="doctools_subsection"><a href="#subsection2">Service object methods</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">Dependencies</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">dbusclient <span class="opt">?1.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">dbusclient Connection create</b> <i class="arg">connobj</i> <i class="arg">address</i></a></li>
<li><a href="#2"><b class="cmd">dbusclient Connection new</b> <i class="arg">address</i></a></li>
<li><a href="#3"><b class="cmd">dbusclient Service create</b> <i class="arg">service</i> <i class="arg">connobj</i></a></li>
<li><a href="#4"><b class="cmd">dbusclient Service new</b> <i class="arg">connobj</i></a></li>
<li><a href="#5"><b class="cmd"><i class="arg">connobj</i> destroy</b></a></li>
<li><a href="#6"><b class="cmd"><i class="arg">connobj</i> call</b> <i class="arg">target</i> <i class="arg">path</i> <i class="arg">interface</i> <i class="arg">method</i> <i class="arg">sig</i> <i class="arg"><span class="opt">?arg1 arg2 ...?</span></i></a></li>
<li><a href="#7"><b class="cmd"><i class="arg">connobj</i> listen</b> <i class="arg">path</i> <i class="arg">signal</i> <i class="arg"><span class="opt">?script?</span></i></a></li>
<li><a href="#8"><b class="cmd"><i class="arg">connobj</i> filter</b> <i class="arg">subcmd</i> <i class="arg"><span class="opt">?arg1 arg2 ...?</span></i></a></li>
<li><a href="#9"><b class="cmd"><i class="arg">svcobj</i> destroy</b></a></li>
<li><a href="#10"><b class="cmd"><i class="arg">svcobj</i> connectedTo</b></a></li>
<li><a href="#11"><b class="cmd"><i class="arg">svcobj</i> pathList</b></a></li>
<li><a href="#12"><b class="cmd"><i class="arg">svcobj</i> findPathsByPropertyValue</b> <i class="arg">interface</i> <i class="arg">property</i> <i class="arg">expression</i></a></li>
<li><a href="#13"><b class="cmd"><i class="arg">svcobj</i> pathInterfaces</b> <i class="arg">path</i></a></li>
<li><a href="#14"><b class="cmd"><i class="arg">svcobj</i> pathProperties</b> <i class="arg">path</i> <i class="arg">interface</i></a></li>
<li><a href="#15"><b class="cmd"><i class="arg">svcobj</i> interfaceMethods</b> <i class="arg">interface</i></a></li>
<li><a href="#16"><b class="cmd"><i class="arg">svcobj</i> methodSignature</b> <i class="arg">interface</i> <i class="arg">method</i></a></li>
<li><a href="#17"><b class="cmd"><i class="arg">svcobj</i> interfaceProperties</b> <i class="arg">interface</i></a></li>
<li><a href="#18"><b class="cmd"><i class="arg">svcobj</i> interfaceSignals</b> <i class="arg">interface</i></a></li>
<li><a href="#19"><b class="cmd"><i class="arg">svcobj</i> call</b> <i class="arg">path</i> <i class="arg">interface</i> <i class="arg">method</i> <i class="arg"><span class="opt">?arg1 arg2 ...?</span></i></a></li>
<li><a href="#20"><b class="cmd"><i class="arg">svcobj</i> property</b> <i class="arg">path</i> <i class="arg">interface</i> <i class="arg">property</i> <i class="arg"><span class="opt">?value?</span></i></a></li>
<li><a href="#21"><b class="cmd"><i class="arg">svcobj</i> trace</b> <i class="arg">operation</i> <i class="arg">type</i> <i class="arg"><span class="opt">?args?</span></i></a></li>
<li><a href="#22"><b class="cmd"><i class="arg">svcobj</i> trace add</b> <i class="arg">type</i> <i class="arg"><span class="opt">?args?</span></i></a></li>
<li><a href="#23"><b class="cmd"><i class="arg">svcobj</i> trace add path</b> <i class="arg">pathpattern</i> <i class="arg">cmdprefix</i></a></li>
<li><a href="#24"><b class="cmd"><i class="arg">svcobj</i> trace add signal</b> <i class="arg">interface</i> <i class="arg">signal</i> <i class="arg">pathpattern</i> <i class="arg">cmdprefix</i></a></li>
<li><a href="#25"><b class="cmd"><i class="arg">svcobj</i> trace add property</b> <i class="arg">interface</i> <i class="arg">property</i> <i class="arg">pathpattern</i> <i class="arg">cmdprefix</i></a></li>
<li><a href="#26"><b class="cmd"><i class="arg">svcobj</i> trace remove</b> <i class="arg">traceid</i></a></li>
<li><a href="#27"><b class="cmd"><i class="arg">svcobj</i> trace info</b> <i class="arg">traceid</i></a></li>
<li><a href="#28"><b class="cmd"><i class="arg">svcobj</i> waitForProperty</b> <i class="arg">interface</i> <i class="arg">property</i> <i class="arg">pathpattern</i> <i class="arg">trigger</i> <i class="arg"><span class="opt">?timeout?</span></i></a></li>
<li><a href="#29"><b class="cmd"><i class="arg">svcobj</i> waitForSignal</b> <i class="arg">interface</i> <i class="arg">signal</i> <i class="arg">pathpattern</i> <i class="arg">trigger</i> <i class="arg"><span class="opt">?timeout?</span></i></a></li>
<li><a href="#30"><b class="cmd"><i class="arg">svcobj</i> waitForPath</b> <i class="arg">pathpattern</i> <i class="arg">trigger</i> <i class="arg"><span class="opt">?timeout?</span></i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This manpage describes the
<b class="package">dbusclient</b>
package which is a Tcl script extension that simplifies
client side programing for access to services on the DBus.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Commands</a></h2>
<p>The two TclOO class commands are exported from the <b class="package">dbusclient</b>
namespace and they form the subcommands of a namespace ensemble
on the <b class="package">::dbusclient</b> namespace.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">dbusclient Connection create</b> <i class="arg">connobj</i> <i class="arg">address</i></a></dt>
<dd></dd>
<dt><a name="2"><b class="cmd">dbusclient Connection new</b> <i class="arg">address</i></a></dt>
<dd><p>The <b class="class">Connection</b> command creates a new instance and connects
to the DBus specified by <i class="arg">address</i>.
The return value of the commands is the fully qualified connection object
command name, which is to be used when opening a service on the bus.
On most systems where the DBus daemon is run,
there are two well known busses named, <em>system</em> and <em>session</em>.</p>
<pre class="doctools_example">
Connection create sysBus system
</pre>
</dd>
<dt><a name="3"><b class="cmd">dbusclient Service create</b> <i class="arg">service</i> <i class="arg">connobj</i></a></dt>
<dd></dd>
<dt><a name="4"><b class="cmd">dbusclient Service new</b> <i class="arg">connobj</i></a></dt>
<dd><p>The <b class="class">Service</b> command creates a new service instance for
the service defined on the <i class="arg">connobj</i> bus.
The return value of the commands is the fully qualified service object
command name, which is to be used when accessing provided services.
Although the service object may be named arbitrarily,
it is most convenient to <b class="cmd">create</b> a <b class="class">Service</b> object that
has the same name as the <i class="arg">service</i> with it accesses.</p></dd>
</dl>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Connection object methods</a></h3>
<p>The following methods are available for <b class="class">Connection</b> objects.</p>
<dl class="doctools_definitions">
<dt><a name="5"><b class="cmd"><i class="arg">connobj</i> destroy</b></a></dt>
<dd><p>The destructor for a <b class="class">Connection</b> object disconnects from the
bus to which it was associated and cleans up any internal resources.
Any <b class="class">Service</b> objects using the connection are also destroyed.</p></dd>
<dt><a name="6"><b class="cmd"><i class="arg">connobj</i> call</b> <i class="arg">target</i> <i class="arg">path</i> <i class="arg">interface</i> <i class="arg">method</i> <i class="arg">sig</i> <i class="arg"><span class="opt">?arg1 arg2 ...?</span></i></a></dt>
<dd><p>The <b class="cmd">call</b> method invokes the <i class="arg">method</i> method which belongs to
the <i class="arg">interface</i> interface on the object instance specified by
<i class="arg">path</i> which resides on the service <i class="arg">target</i>.
The <i class="arg">sig</i> argument give the DBus signature for the method.
If <i class="arg">sig</i> is specified as the empty string,
no signature is used in the conversion of Tcl strings to the underlying
data types required by <i class="arg">method</i>.
The remaining <i class="arg">argN</i> arguments are passed as arguments to the method.</p></dd>
<dt><a name="7"><b class="cmd"><i class="arg">connobj</i> listen</b> <i class="arg">path</i> <i class="arg">signal</i> <i class="arg"><span class="opt">?script?</span></i></a></dt>
<dd><p>The <b class="method">listen</b> method registers <i class="arg">script</i> to be invoked when
<i class="arg">signal</i> on <i class="arg">path</i> is seen on the DBus.
If <i class="arg">script</i> is not specified, the currently registered script is returned.
If <i class="arg">script</i> is the empty string, then the currently registered script
is removed.
When <i class="arg">script</i> is invoked,
a dictionary of the event details is supplied as an additional argument.
See the <b class="package">dbus</b> package documentation for the details of the
event dictionary.</p></dd>
<dt><a name="8"><b class="cmd"><i class="arg">connobj</i> filter</b> <i class="arg">subcmd</i> <i class="arg"><span class="opt">?arg1 arg2 ...?</span></i></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Service object methods</a></h3>
<p>The following methods are available for <b class="class">Service</b> objects.</p>
<dl class="doctools_definitions">
<dt><a name="9"><b class="cmd"><i class="arg">svcobj</i> destroy</b></a></dt>
<dd><p>The destructor for a <b class="class">Service</b> object cleans up any internal
resources.</p></dd>
<dt><a name="10"><b class="cmd"><i class="arg">svcobj</i> connectedTo</b></a></dt>
<dd><p>The <b class="method">connectedTo</b> method returns the Connection object command
name for the service.</p></dd>
<dt><a name="11"><b class="cmd"><i class="arg">svcobj</i> pathList</b></a></dt>
<dd><p>The <b class="method">pathList</b> method returns a list of object instance path
names for the service.</p></dd>
<dt><a name="12"><b class="cmd"><i class="arg">svcobj</i> findPathsByPropertyValue</b> <i class="arg">interface</i> <i class="arg">property</i> <i class="arg">expression</i></a></dt>
<dd><p>The <b class="method">findPathsByPropertyValue</b> method returns a list of object path
names specified by the <i class="arg">interface</i> and <i class="arg">property</i> arguments
where <i class="arg">expression</i> also evaluates to <em>true</em>.
The <i class="arg">expression</i> is evaluated in the context of the caller
and may reference variables named <b class="variable">Path</b>, <b class="variable">Interface</b>,
<b class="variable">Property</b>, <b class="variable">Value</b>, or <b class="variable">Valid</b>.
The values of these variables is set for each property value that
also matches the values of <i class="arg">interface</i> and <i class="arg">property</i>
before <i class="arg">expression</i> is evaluated.
This method provides a means of finding object paths whose property
values match a specified expression.
For example,</p>
<pre class="doctools_example">
set conn [Connection create sysBus system]
Service create DBus org.freedesktop.DBus $conn
DBus findPathsByPropertyValue org.freedesktop.DBus Interfaces {&quot;org.freedesktop.DBus.Monitoring&quot; in $Value}
</pre>
<p>returns the object whose path is <b class="cmd">/org/freedesktop/DBus</b>.</p></dd>
<dt><a name="13"><b class="cmd"><i class="arg">svcobj</i> pathInterfaces</b> <i class="arg">path</i></a></dt>
<dd><p>The <b class="method">pathInterfaces</b> method returns a list of interfaces that are
implemented for <i class="arg">path</i>.</p></dd>
<dt><a name="14"><b class="cmd"><i class="arg">svcobj</i> pathProperties</b> <i class="arg">path</i> <i class="arg">interface</i></a></dt>
<dd><p>The <b class="method">pathProperties</b> method returns a list of property names that are
implemented by <i class="arg">interface</i> for the object specified by <i class="arg">path</i>.</p></dd>
<dt><a name="15"><b class="cmd"><i class="arg">svcobj</i> interfaceMethods</b> <i class="arg">interface</i></a></dt>
<dd><p>The <b class="method">interfaceMethods</b> method returns a list of methods supported
by the specified <i class="arg">interface</i>.</p></dd>
<dt><a name="16"><b class="cmd"><i class="arg">svcobj</i> methodSignature</b> <i class="arg">interface</i> <i class="arg">method</i></a></dt>
<dd><p>The <b class="method">methodSignature</b> method returns the DBus signature
string for the specified <i class="arg">interface</i> and <i class="arg">method</i>.</p></dd>
<dt><a name="17"><b class="cmd"><i class="arg">svcobj</i> interfaceProperties</b> <i class="arg">interface</i></a></dt>
<dd><p>The <b class="method">interfaceProperties</b> method returns a list of properties defined
by <i class="arg">interface</i>.</p></dd>
<dt><a name="18"><b class="cmd"><i class="arg">svcobj</i> interfaceSignals</b> <i class="arg">interface</i></a></dt>
<dd><p>The <b class="method">interfaceSignals</b> method returns a list of signals defined
by <i class="arg">interface</i>.</p></dd>
<dt><a name="19"><b class="cmd"><i class="arg">svcobj</i> call</b> <i class="arg">path</i> <i class="arg">interface</i> <i class="arg">method</i> <i class="arg"><span class="opt">?arg1 arg2 ...?</span></i></a></dt>
<dd><p>The <b class="method">call</b> method invokes the <i class="arg">method</i> method that is contained
in <i class="arg">interface</i> on the the object specified by <i class="arg">path</i>.
Additional optional <i class="arg">argN</i> arguments are passes as arguments to
the called method.
The return value of the <b class="method">call</b> method is the return value of
the underlying service method from the DBus.</p></dd>
<dt><a name="20"><b class="cmd"><i class="arg">svcobj</i> property</b> <i class="arg">path</i> <i class="arg">interface</i> <i class="arg">property</i> <i class="arg"><span class="opt">?value?</span></i></a></dt>
<dd><p>The <b class="method">property</b> method reads and optionally updates the value of
the <i class="arg">property</i> property for <i class="arg">path</i> that is part of <i class="arg">interface</i>.
If <i class="arg">value</i> is specified,
then <i class="arg">property</i> is set to that value (if possible).
The return value of the method is the new value of <i class="arg">property</i>.</p>
<p>Note that writing property values to services on the DBus is an
asynchronous operation and usually results in a property changed
signal being sent.
The <b class="package">dbusclient</b> package handles such asynchronous updates but
the Tcl event loop must be entered in order to do so.</p></dd>
<dt><a name="21"><b class="cmd"><i class="arg">svcobj</i> trace</b> <i class="arg">operation</i> <i class="arg">type</i> <i class="arg"><span class="opt">?args?</span></i></a></dt>
<dd><p>The <b class="method">trace</b> method causes Tcl commands to be executed when
certain conditions on the DBus are met.
The interface for this method is modeled after the core <b class="cmd">trace</b> command.
Legal <i class="arg">operation</i> argument values are:</p>
<dl class="doctools_definitions">
<dt><a name="22"><b class="cmd"><i class="arg">svcobj</i> trace add</b> <i class="arg">type</i> <i class="arg"><span class="opt">?args?</span></i></a></dt>
<dd><p>The legal values for the <i class="arg">type</i> trace type are <b class="variable">path</b>,
<b class="variable">signal</b>, or <b class="variable">property</b>.
The return value of the command is a trace identifier,
which can be used to remove or query the trace.
Multiple traces may be added of any type and the parameters of the
trace may be the same.
Traces are executed in order from youngest (most recently added) to
oldest.</p>
<dl class="doctools_definitions">
<dt><a name="23"><b class="cmd"><i class="arg">svcobj</i> trace add path</b> <i class="arg">pathpattern</i> <i class="arg">cmdprefix</i></a></dt>
<dd><p>Arranges for <i class="arg">cmdprefix</i> to be invoked whenever an object instance
whose name matches <i class="arg">pathpattern</i> is added or removed from the service.
The matching against <i class="arg">pathpattern</i> is done in the same manner as
the <b class="cmd">string match</b> command.
When invoked, <i class="arg">cmdprefix</i> is supplied with two additional arguments,
a <i class="arg">status</i>, which has a value of either <b class="variable">added</b> or <b class="variable">removed</b>,
and the name of the added or removed path.</p></dd>
<dt><a name="24"><b class="cmd"><i class="arg">svcobj</i> trace add signal</b> <i class="arg">interface</i> <i class="arg">signal</i> <i class="arg">pathpattern</i> <i class="arg">cmdprefix</i></a></dt>
<dd><p>Arranges for <i class="arg">cmdprefix</i> to be invoked when the <i class="arg">signal</i> from
<i class="arg">interface</i> on an object instance matching <i class="arg">pathpattern</i>
is detected on the bus.
The matching against <i class="arg">pathpattern</i> is done in the same manner as
the <b class="cmd">string match</b> command.
When invoked, <i class="arg">cmdprefix</i> is supplied with additional arguments.
The first argument is a dictionary of event information as described
in the Event Handlers section of the <b class="package">dbus</b> package documentation.
Any arguments of the signal itself follow.</p></dd>
<dt><a name="25"><b class="cmd"><i class="arg">svcobj</i> trace add property</b> <i class="arg">interface</i> <i class="arg">property</i> <i class="arg">pathpattern</i> <i class="arg">cmdprefix</i></a></dt>
<dd><p>Arranges for <i class="arg">cmdprefix</i> to be invoked when the <i class="arg">property</i> associated
with <i class="arg">interface</i> for an object instance matching <i class="arg">pathpattern</i>
is reported.
The matching against <i class="arg">pathpattern</i> is done in the same manner as
the <b class="cmd">string match</b> command.
When invoked,
<i class="arg">cmdprefix</i> is supplied with up to five additional arguments.
The first argument is a status value of <b class="variable">changed</b> or <b class="variable">invalidated</b>,
indicating if the property value has changed or is no longer valid.
The second argument is the path name of the object instance whose
property was affected.
The third argument is the name of the interface of which the property was
part.
The fourth argument is the name of the property that was affected.
If the status was <b class="variable">changed</b>, a fifth argument is supplied giving the
new value of the property.</p></dd>
</dl></dd>
<dt><a name="26"><b class="cmd"><i class="arg">svcobj</i> trace remove</b> <i class="arg">traceid</i></a></dt>
<dd><p>Removes the trace identified by <i class="arg">traceid</i>.
It is not an error to remove a non-existant trace.</p></dd>
<dt><a name="27"><b class="cmd"><i class="arg">svcobj</i> trace info</b> <i class="arg">traceid</i></a></dt>
<dd><p>Returns a dictionary containing information about the trace specified
by <i class="arg">traceid</i>.
The keys of the dictionary are:</p>
<dl class="doctools_definitions">
<dt>Type</dt>
<dd><p>Specifies the type of trace as either <b class="variable">path</b>, <b class="variable">signal</b>,
or <b class="variable">property</b>.</p></dd>
<dt>PathMatch</dt>
<dd><p>Specifies the pattern that object instance path names must match
to trigger the trace.</p></dd>
<dt>CmdPrefix</dt>
<dd><p>Specifies the command prefix to invoke when the trace performed.</p></dd>
</dl>
<p>For <b class="variable">signal</b> type traces additional keys are:</p>
<dl class="doctools_definitions">
<dt>Interface</dt>
<dd><p>Specifies the interface that will trigger the trace.</p></dd>
<dt>Signal</dt>
<dd><p>Specifies the name of the signal that will trigger the trace.</p></dd>
</dl>
<p>For <b class="variable">property</b> type traces additional keys are:</p>
<dl class="doctools_definitions">
<dt>Interface</dt>
<dd><p>Specifies the interface that will trigger the trace.</p></dd>
<dt>Property</dt>
<dd><p>Specifies the name of the property that will trigger the trace.</p></dd>
</dl>
<p>For <b class="variable">path</b> type traces no additional information is provided.</p></dd>
</dl></dd>
<dt><a name="28"><b class="cmd"><i class="arg">svcobj</i> waitForProperty</b> <i class="arg">interface</i> <i class="arg">property</i> <i class="arg">pathpattern</i> <i class="arg">trigger</i> <i class="arg"><span class="opt">?timeout?</span></i></a></dt>
<dd><p>The <b class="method">waitForProperty</b> method establishes a property trace on the
<i class="arg">property</i> property in <i class="arg">interface</i> matching <i class="arg">pathpattern</i>.
These arguments are interpreted in the same manner as for the
<b class="method">trace add</b> method.
Then the script specified by <i class="arg">trigger</i> is executed in the
call stack of the caller.
Then the Tcl event loop is entered waiting for the property change
to occur.
If <i class="arg">timeout</i> is specified it is the number of milliseconds to
wait for the property change notification.
A <i class="arg">timeout</i> value of 0 is interpreted to mean to wait forever.
The default <i class="arg">timeout</i> value is 5000.
If <i class="arg">trigger</i> executes successfully and the DBus notification is
received before any timeout,
then the return value of the command is a dictionary giving the details
of the property change.
The keys to the dictionary are:</p>
<dl class="doctools_definitions">
<dt>status</dt>
<dd><p>A status element value of <b class="cmd">changed</b>,
indicates the property value has changed and the new value is given
by the value element.
A status element value of <b class="cmd">invalidated</b>,
indicates the property no longer has a valid value and in this case
no value element is included in the dictionary.</p></dd>
<dt>path</dt>
<dd><p>The path name of the object to which the change occurred.</p></dd>
<dt>interface</dt>
<dd><p>The interface of the changed property.</p></dd>
<dt>property</dt>
<dd><p>The name of the changed property.</p></dd>
<dt>value</dt>
<dd><p>The new value of the property if the status element has a value of
<b class="cmd">changed</b>.</p></dd>
</dl></dd>
<dt><a name="29"><b class="cmd"><i class="arg">svcobj</i> waitForSignal</b> <i class="arg">interface</i> <i class="arg">signal</i> <i class="arg">pathpattern</i> <i class="arg">trigger</i> <i class="arg"><span class="opt">?timeout?</span></i></a></dt>
<dd><p>The <b class="method">waitForSignal</b> method establishes a signal trace on the
<i class="arg">signal</i> signal in <i class="arg">interface</i> matching <i class="arg">pathpattern</i>.
These arguments are interpreted in the same manner as for the
<b class="method">trace add</b> method.
Then the script specified by <i class="arg">trigger</i> is executed in the
call stack of the caller.
Then the Tcl event loop is entered waiting for the signal notification
to occur.
If <i class="arg">timeout</i> is specified it is the number of milliseconds to
wait for the property change notification.
A <i class="arg">timeout</i> value of 0 is interpreted to mean to wait forever.
The default <i class="arg">timeout</i> value is 5000.
If <i class="arg">trigger</i> executes successfully and the DBus signal is
received before any timeout,
then the return value of the command is a dictionary giving the details
of the signal.
The keys to the dictionary are:</p>
<dl class="doctools_definitions">
<dt>path</dt>
<dd><p>The path name of the object to which the change occurred.</p></dd>
<dt>interface</dt>
<dd><p>The interface of the changed property.</p></dd>
<dt>signal</dt>
<dd><p>The name of the received signal.</p></dd>
<dt>sender</dt>
<dd><p>The sender of the signal.</p></dd>
<dt>signature</dt>
<dd><p>The argument signature of the signal.</p></dd>
<dt>args</dt>
<dd><p>A list of argument values that came with the signal.</p></dd>
</dl></dd>
<dt><a name="30"><b class="cmd"><i class="arg">svcobj</i> waitForPath</b> <i class="arg">pathpattern</i> <i class="arg">trigger</i> <i class="arg"><span class="opt">?timeout?</span></i></a></dt>
<dd><p>The <b class="method">waitForPath</b> method establishes a path trace on the
object instance matching <i class="arg">pathpattern</i>.
Then the script specified by <i class="arg">trigger</i> is executed in the
call stack of the caller.
Then the Tcl event loop is entered waiting for the path change
to occur.
If <i class="arg">timeout</i> is specified it is the number of milliseconds to
wait for the property change notification.
A <i class="arg">timeout</i> value of 0 is interpreted to mean to wait forever.
The default <i class="arg">timeout</i> value is 5000.
If <i class="arg">trigger</i> executes successfully and the DBus notification is
received before any timeout,
then the return value of the command is a dictionary giving the details
of the path change.
The keys to the dictionary are:</p>
<dl class="doctools_definitions">
<dt>status</dt>
<dd><p>A status element value of <b class="cmd">added</b>,
indicates the path is newly created and the value is given
by the path element.
A status element value of <b class="cmd">removed</b>,
indicates the path was deleted and the value of the deleted path
is given by the path element.</p></dd>
<dt>path</dt>
<dd><p>The path name of the object which was added or removed.</p></dd>
</dl></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Dependencies</a></h2>
<p>The <b class="package">dbusclient</b> package depends upon three binary Tcl packages.</p>
<ul class="doctools_itemized">
<li><p><b class="package">dbus</b> is the Tcl bindings to the DBus library.</p></li>
<li><p><b class="package">tcom</b> is used to parse XML returned during introspection.</p></li>
<li><p><b class="package">ral</b> is used to manage the introspection data.</p></li>
</ul>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p>DBus</p>
</div>
</div></body></html>