(* wrappi * Copyright (C) 2011 Red Hat Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) type any_type = | TFilePerm | TInt32 | TInt64 | TPathname | TUInt32 | TUInt64 (** Any API parameter or return type. *) type parameter = string * any_type (** API parameter (argument name and type). *) type return_type = RErr | Return of any_type (** API return type. A superset of {!any_type} because we allow the special value [RErr] for dealing with errno. *) type c_code = string (** C code. *) type entry_point = { ep_loc : Camlp4.PreCast.Loc.t; ep_name : string; ep_params : parameter list; ep_return : return_type; ep_code : c_code option; } (** An API entry point. *) type api = { api_entry_points : entry_point list; } (** This single structure describes the whole API. *) val string_of_any_type : any_type -> string val string_of_return_type : return_type -> string val string_of_parameter : parameter -> string val string_of_parameters : parameter list -> string val string_of_c_code : c_code -> string val string_of_entry_point : entry_point -> string (** Convert structures to strings for printing, debugging etc. *)