1234567891011121314151617181920212223242526272829303132333435(*
* uDisks_monitor.ml
* -----------------
* Copyright : (c) 2011, Jeremie Dimino <jeremie@dimino.org>
* Licence : BSD3
*
* This file is a part of obus, an ocaml implementation of D-Bus.
*)openLwt_reactopenLwtmoduleString_map=Map.Make(String)letchangedinterface=OBus_member.Signal.make~interface~member:"Changed"~args:OBus_value.arg0~annotations:[]letmonitorproxyinterfaceswitch=let%lwtevent=OBus_signal.connect~switch(OBus_signal.with_context(OBus_signal.make(changedinterface)proxy))andcontext,dict=OBus_property.get_all_no_cacheproxyinterfaceinreturn(S.hold~eq:(String_map.equal(=))(OBus_property.map_of_listcontextdict)(E.map_s(fun(context,())->let%lwtcontext,dict=OBus_property.get_all_no_cacheproxyinterfaceinreturn(OBus_property.map_of_listcontextdict))event))