1 (define-module (dolcon util))
2 (use-modules (dolcon ui))
6 (define-public dc-fn-update
9 (let ((resp (dc-ecmd "lsnodes")) (er #f))
10 (if (and resp (begin (set! er (dc-extract resp)) er) (= (cdr (assq 'code er)) 200))
12 (apply (lambda (id net name users state)
18 (cons 'state (list-ref '(syn hs est dead) state)))))
24 (define-public dc-fn-getattrib
26 (if (not (assq id fnetnodes))
28 (let ((aform (assq id fnetnodes)))
30 (cdr (assq attrib (cdr aform)))
33 (define-public dc-fn-getname
35 (dc-fn-getattrib id 'name)))
37 (define-public dc-getfnetnodes
39 (map (lambda (o) (car o))