summaryrefslogtreecommitdiffstats
path: root/generator/generator_gobject.ml
Commit message (Collapse)AuthorAgeFilesLines
* generator: Rename 'generator_*' as '*'.Richard W.M. Jones2012-09-021-1305/+0
| | | | | | | | | This is a simple renaming of the files/modules. Note that in OCaml, module names are derived from filenames by capitalizing the first letter. Thus the old module names had the form "Generator_api_versions". The new modules names have the form "Api_versions".
* generator: Add new OStringList optional arg type.Richard W.M. Jones2012-08-141-19/+28
| | | | This allows lists of strings to be passed as an optional argument.
* generator: Add c_optarg_prefix for each action.Richard W.M. Jones2012-07-131-4/+4
| | | | This updates commit 9286f556c6a9e6967fcac8aacdae3660821c4c7a.
* generator: Add c_function (C function name) to each action struct.Richard W.M. Jones2012-07-121-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | This field, which is generated internally by the generator, is the name of the C function corresponding to each action. For actions that have NO optional arguments, it's just "guestfs_<name>". For actions that have any optional arguments, it is "guestfs_<name>_argv" (since any binding has to construct the optional argument struct explicitly). In a future commit, this mapping may become more complex. This commit also "fixes" the C# bindings which didn't handle optional arguments properly at all. In fact, it doesn't fix this, it just changes it enough that it probably now compiles. We should either compile and test the bindings routinely with Mono, or drop them, since they are starting to bit-rot. In the GObject bindings, I have added a space between the C function name and the first paren. Apart from the C# and GObject changes, this is just code motion. It was verified by diffing the output of the generator before and after.
* generator: Change the way that camel-case names are generated.Richard W.M. Jones2012-07-121-9/+1
| | | | | | | | Store the camel-case name directly in the struct instead of generating it on the fly in only the GObject bindings. This is just code motion. Tested by verifying that the generator output is identical.
* generator: Use a struct instead of a tuple to describe each action.Richard W.M. Jones2012-07-111-31/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each action changes from a tuple like this: ("cat", (RString "content", [Pathname "path"], []), 4, [ProtocolLimitWarning], [InitISOFS, Always, TestOutput ( [["cat"; "/known-2"]], "abcdef\n")], "list the contents of a file", "[...]"); to a slightly longer but more readable struct: { defaults with name = "cat"; style = RString "content", [Pathname "path"], []; proc_nr = Some 4; protocol_limit_warning = true; tests = [ InitISOFS, Always, TestOutput ( [["cat"; "/known-2"]], "abcdef\n") ]; shortdesc = "list the contents of a file"; longdesc = "[...]" }; ["defaults" is a struct which contains the defaults for every field, allowing us to use the "{ defaults with ... }" syntax to just update the fields we want to be different from the defaults.] This is a mechanical change and there is no change to the output of the generator. I checked the output before and after with diff to verify this. There are no changes in the output apart from UUIDs which are expected to change with each run.
* Ensure #include <config.h> occurs in every C file.Richard W.M. Jones2012-06-271-0/+2
|
* gobject: Use generator_built macro to ensure generated files are rebuilt ↵Richard W.M. Jones2012-04-261-2/+2
| | | | properly.
* gobject: Move headers into a subdirectoryMatthew Booth2012-04-261-10/+10
| | | | | | | | | The gobject bindings generate a large number of header files, which pollute /usr/include when installed. This patch moves them all into a guestfs-gobject/ subdirectory. guestfs-gobject.h remains in the same place. This change also moves generated source files into src/, because it makes the gobject directory a bit tidier.
* gobject: Implement libguestfs events as signalsMatthew Booth2012-04-261-1/+187
| | | | | | | | | | Implement libguestfs events as GObject signals. Callback arguments are passed in a boxed object. Note that this patch fixes the length of the uint64_t array in the callback arguments at 16, whereas it is actually arbitrary length. This is to make it introspectable. There is currently no way to pass an arbitrary length array to a callback, and have its type introspected.
* gobject: Wrap literal sections in POD in CDATA sectionsMatthew Booth2012-04-261-0/+5
|
* gobject: NFC generated code formatting fixMatthew Booth2012-04-261-1/+1
|
* gobject: Split sources into 1 file per classMatthew Booth2012-03-281-341/+427
| | | | | | | This greatly improves the usability of the generated gtk-doc. Although there is a lot of churn in generator_gobject.ml, this is almost exclusively code motion.
* gobject: Add gtk-doc for GuestfsSession and GuestfsSessionClassMatthew Booth2012-03-281-2/+13
|
* gobject: Add gtk-doc field descriptions for generated structsMatthew Booth2012-03-281-0/+25
|
* gobject: Add gtk-doc for optarg wrapper classesMatthew Booth2012-03-281-8/+25
|
* gobject: Drop references to Guestfs::<foo> in commentsMatthew Booth2012-03-281-4/+4
|
* gobject: Handle various problem content in gtk-doc API descriptionsMatthew Booth2012-03-281-1/+45
| | | | | | | | | | Produce better gtk-doc for: * URLs * RHBZ# references * CVE references * API cross-references * Parameter references * Escaped characters
* gobject: Add basic gtk-doc for all parametersMatthew Booth2012-03-281-4/+16
|
* gobject: Add basic gtk-doc for propertiesMatthew Booth2012-03-281-19/+28
|
* gobject: gtk-doc SECTION must be named after a source fileMatthew Booth2012-03-281-1/+1
|
* gobject: Include explicit types for all parametersMatthew Booth2012-03-281-1/+6
|
* gobject: Add an explicit close callMatthew Booth2012-01-261-11/+45
| | | | | This change binds guestfs_close(). It consequently results in RConstOptString being able to throw an error.
* gobject: Allow RConstOptString to return an errorMatthew Booth2012-01-261-18/+11
| | | | | | | | | | | RConstOptString cannot return an error in the C api. This makes it a special case for the GObject api, as all other return types have a corresponding GError **err argument to return an error. This change removes this special case, and includes the possibility of an error return in the API. An error is indicated by setting *err to a non-NULL value. This change is in preparation for adding a close api. An attempt to call any api, even RConstOptString, on a closed handle must return an error.
* gobject: Add GObject bindingsMatthew Booth2012-01-201-0/+878