Changeset 25881 in project
- Timestamp:
- 02/08/12 23:55:13 (9 years ago)
- Location:
- release/4/dbus/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
release/4/dbus/trunk/dbus.setup
r25880 r25881 14 14 (install-extension 'dbus 15 15 `("dbus.so" "dbus.import.so") 16 `((version 0.8 8)))16 `((version 0.89))) -
release/4/dbus/trunk/examples/introspect-connman.scm
r25880 r25881 4 4 bus: dbus:system-bus 5 5 service: 'net.connman 6 ;path: '/net/connman7 6 )) 8 7 9 (let ([response (dbus:discover-api-xml ctxt)]) 10 (display response) 11 ) 8 (display (dbus:discover-api-xml ctxt)) 9 10 (define (device-properties device) 11 (let ((c (dbus:make-context bus: dbus:system-bus 12 service: 'net.connman 13 interface: 'net.connman.Service 14 path: device))) 15 (dbus:call c "GetProperties"))) 12 16 13 17 (define mgr-ctxt (dbus:make-context bus: dbus:system-bus 14 18 service: 'net.connman interface: 'net.connman.Manager)) 15 19 16 (printf "~%==== Manager Properties:~%") 17 (pretty-print (dbus:call mgr-ctxt "GetProperties")) 20 (printf "~%==== Clock Properties:~%") 21 (define clock-ctxt (dbus:make-context bus: dbus:system-bus 22 service: 'net.connman interface: 'net.connman.Clock)) 23 (pretty-print (dbus:call clock-ctxt "GetProperties")) 18 24 19 25 (printf "~%==== Manager Services:~%") 20 26 (pretty-print (dbus:call mgr-ctxt "GetServices")) 21 27 22 (define clock-ctxt (dbus:make-context bus: dbus:system-bus 23 service: 'net.connman interface: 'net.connman.Clock)) 24 25 (printf "~%==== Clock Properties:~%") 26 (pretty-print (dbus:call clock-ctxt "GetProperties")) 28 (printf "~%==== Manager Properties:~%") 29 (let ([mgr-props (dbus:call mgr-ctxt "GetProperties")]) 30 (pretty-print mgr-props) 31 (let ([ifaces (assoc "Services" (vector->list (car mgr-props)))]) 32 (when (pair? ifaces) 33 (set! ifaces (vector->list (cdr ifaces))) 34 (printf "~%==== Network interface Properties:~%") 35 (for-each (lambda (path) 36 (printf "---- ~a~%" path) 37 (pp (vector->list (car (device-properties path)))) 38 ) ifaces) 39 ))) 27 40 28 41 (sleep 1)
Note: See TracChangeset
for help on using the changeset viewer.