2008-01-08 Richard Jones <rjones@redhat.com>
+ Type Vc_domain_ops.dops_callback_fn for clarity.
+ * virt-ctrl/vc_domain_ops.mli, virt-ctrl/vc_domain_ops.ml,
+ virt-ctrl/vc_mainwindow.mli: Give a type name to the domain_ops
+ callback type, for extra clarity.
+
Change comments virt-manager -> virt-ctrl.
* virt-ctrl/*.ml, virt-ctrl/*.mli: Change comments virt-manager ->
virt-ctrl.
vc_connections.cmi: ../libvirt/libvirt.cmi
vc_domain_ops.cmi: vc_connections.cmi
vc_helpers.cmi: ../libvirt/libvirt.cmi
-vc_mainwindow.cmi: vc_connections.cmi
+vc_mainwindow.cmi: vc_domain_ops.cmi
vc_connections.cmo: vc_helpers.cmi ../libvirt/libvirt.cmi vc_connections.cmi
vc_connections.cmx: vc_helpers.cmx ../libvirt/libvirt.cmx vc_connections.cmi
vc_domain_ops.cmo: vc_connections.cmi ../libvirt/libvirt.cmi \
prerr_endline (Libvirt.Virterror.to_string err);
None
+type dops_callback_fn =
+ GTree.view -> GTree.tree_store -> Vc_connections.columns -> unit -> unit
+
let start_domain tree model columns () =
match get_domain tree model columns with
| None -> ()
Domain operations buttons.
*)
-val start_domain : GTree.view -> GTree.tree_store -> Vc_connections.columns -> unit -> unit
-val pause_domain : GTree.view -> GTree.tree_store -> Vc_connections.columns -> unit -> unit
-val resume_domain : GTree.view -> GTree.tree_store -> Vc_connections.columns -> unit -> unit
-val shutdown_domain : GTree.view -> GTree.tree_store -> Vc_connections.columns -> unit -> unit
+type dops_callback_fn =
+ GTree.view -> GTree.tree_store -> Vc_connections.columns -> unit -> unit
+ (** Domain ops callback function type.
+
+ The parameters are: tree (view), model, columns.
+ The extra unit parameter is there to make it easier to
+ turn into a callback.
+ *)
+
+val start_domain : dops_callback_fn
+val pause_domain : dops_callback_fn
+val resume_domain : dops_callback_fn
+val shutdown_domain : dops_callback_fn
callback functions to wire everything up.
*)
val make : open_connection:(unit -> unit) ->
- start_domain:(GTree.view -> GTree.tree_store -> Vc_connections.columns -> unit -> unit) ->
- pause_domain:(GTree.view -> GTree.tree_store -> Vc_connections.columns -> unit -> unit) ->
- resume_domain:(GTree.view -> GTree.tree_store -> Vc_connections.columns -> unit -> unit) ->
- shutdown_domain:(GTree.view -> GTree.tree_store -> Vc_connections.columns -> unit -> unit) -> unit
+ start_domain:Vc_domain_ops.dops_callback_fn ->
+ pause_domain:Vc_domain_ops.dops_callback_fn ->
+ resume_domain:Vc_domain_ops.dops_callback_fn ->
+ shutdown_domain:Vc_domain_ops.dops_callback_fn ->
+ unit