| Set_Double of (float -> bool) * (float -> unit)
| Set_String of (string -> bool) * (string -> unit)
| Set_ObjectPath of (string -> bool) * (string -> unit)
+ | Set_Immutable
(* common utility predicate *)
let true_predicate _ = true
| Set_Double _ -> "double"
| Set_String _ -> "string"
| Set_ObjectPath _ -> "objectpath"
+ | Set_Immutable -> "immutable"
type t = getter * setter
| Some (Set_ObjectPath (p, f)), DBus.ObjectPath v ->
if p v then begin f v; Right [] end
else invalid_error
+ | Some Set_Immutable, _ ->
+ Left (DBus.ERR_FAILED, "immutable property",
+ [ DBus.String (Printf.sprintf "Property \"%s\" is immutable" pname) ]
+ )
| Some g, _ ->
Left (DBus.ERR_INVALID_ARGS, "invalid arg(s)",
[ DBus.String (