gdbus-codegen: Make generated code introspectable

Specific changes

 - Use get_type(), not get_gtype() for the GType function
   - so we need to use the lower-case name type_ for properties called type
 - Don't return a function pointer, just make the function returned
   available instead
 - Add (type) annotations in constructors so g-ir-scanner detects them as such
 - Add (transfer none) annotations to property getters
 - Add (out) annotations to D-Bus method call functions

Signed-off-by: David Zeuthen <davidz@redhat.com>
This commit is contained in:
David Zeuthen
2011-04-16 14:07:23 -04:00
parent 2e358e12f9
commit 3cef28a2f0
3 changed files with 202 additions and 29 deletions

View File

@@ -283,6 +283,8 @@ class Property:
if overridden_name:
name = overridden_name
self.name_lower = utils.camel_case_to_uscore(name).lower().replace('-', '_')
if self.name_lower == 'type':
self.name_lower = 'type_'
self.name_hyphen = self.name_lower.replace('_', '-')
# recalculate arg