generator: add VPublicNoFish visibility type

Usable to have public functions, i.e. like VPublic, but do not showing
them in guestfish.
This commit is contained in:
Pino Toscano
2015-02-02 15:44:40 +01:00
committed by Richard W.M. Jones
parent db055262d4
commit 8aadde50b3
3 changed files with 6 additions and 4 deletions

View File

@@ -12744,19 +12744,19 @@ let non_daemon_functions, daemon_functions =
let all_functions = non_daemon_functions @ daemon_functions
let is_external { visibility = v } = match v with
| VPublic | VStateTest | VBindTest | VDebug -> true
| VPublic | VPublicNoFish | VStateTest | VBindTest | VDebug -> true
| VInternal -> false
let is_internal f = not (is_external f)
let is_documented { visibility = v } = match v with
| VPublic | VStateTest -> true
| VPublic | VPublicNoFish | VStateTest -> true
| VBindTest | VDebug | VInternal -> false
let is_fish { visibility = v; style = (_, args, _) } =
(* Internal functions are not exported to guestfish. *)
match v with
| VStateTest | VBindTest | VInternal -> false
| VPublicNoFish | VStateTest | VBindTest | VInternal -> false
| VPublic | VDebug ->
(* Functions that take Pointer parameters cannot be used in
* guestfish, since there is no way the user could safely

View File

@@ -45,7 +45,7 @@ let hash_matches h { name = name } =
type optarg_proto = Dots | VA | Argv
let is_public { visibility = v } = match v with
| VPublic | VStateTest | VDebug -> true
| VPublic | VPublicNoFish | VStateTest | VDebug -> true
| VBindTest | VInternal -> false
let is_private f = not (is_public f)

View File

@@ -322,6 +322,8 @@ and cmd = string list
type visibility =
| VPublic (* Part of the public API *)
| VPublicNoFish (* Like VPublic, but not exported in
guestfish *)
| VStateTest (* A function which tests the state
of the appliance *)
| VBindTest (* Only used for testing language bindings *)