libvirt follows a convention where structure types used in its API are
named "remote_nonnull_domain", and optional values for those structures
are called "remote_domain". The generator was translating these into go
names like "NonnullDomain" and "Domain". In go this seems unnatural, and
doesn't match the way the pre-generator version of go-libvirt named
things. So this commit changes the names: "remote_nonnull_domain" will
now be "Domain" in go; "remote_domain" will be "OptDomain". This pattern
is applied to all types.
- Update libvirt.go so that all libvirt calls now go through the
generated routines.
- Remove some libvirt routines that had the same name as generated ones,
leave the rest as convenience routines.
- Fix the handling of Optional-values (the declarations of which in the
.x file look like pointers)
The generated wrappers have an argument for every field in their "Args"
struct, and return everything in their "Ret" struct (these structs are
defined in the protocol file, and identified by procedure name).
Marshaling and unmarshaling is handled inside the generated procedures.
- Add a yacc-based parser and a hand-written lexer to read the
remote_protocol.x file from libvirt's sources.
- Use the new parser to generate the constants used to communicate with
libvirt.