From: David Zeuthen Date: Wed, 21 Sep 2011 11:12:32 +0000 (-0400) Subject: gdbus-codegen: Clarify how naming and Ugly_Case handling works X-Git-Tag: 2.31.0~461 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=933ad70c32f146d324b8fc1e9b79711e83472909;p=platform%2Fupstream%2Fglib.git gdbus-codegen: Clarify how naming and Ugly_Case handling works Basically, move some paragraphs around. Signed-off-by: David Zeuthen --- diff --git a/docs/reference/gio/gdbus-codegen.xml b/docs/reference/gio/gdbus-codegen.xml index d840a69..0747ae4 100644 --- a/docs/reference/gio/gdbus-codegen.xml +++ b/docs/reference/gio/gdbus-codegen.xml @@ -63,6 +63,46 @@ #GDBusConnection either directly or via a #GDBusObjectManagerServer instance. + + The name of each generated C type is derived from the D-Bus + interface name stripped with the prefix given with + and with the dots removed and + initial characters capitalized. For example, for the D-Bus + interface com.acme.Coyote the name used is + ComAcmeCoyote. For the D-Bus interface + org.project.Bar.Frobnicator with + + org.project., the name used is + BarFrobnicator. + + + For methods, signals and properties, if not specified, the name + defaults to the name of the method, signal or property. + + + Two forms of the name are used - the CamelCase form and the + lower-case form. The CamelCase form is used for the #GType and + struct name, while lower-case form is used in function names. The + lower-case form is calculated by converting from CamelCase to + lower-case and inserting underscores at word boundaries (using + certain heuristics). + + + If the value given by the org.gtk.GDBus.C.Name + annotation or the option contains + an underscore (sometimes called Ugly_Case), + then the camel-case name is derived by removing all underscores, + and the lower-case name is derived by lower-casing the + string. This is useful in some situations where abbreviations are + used. For example, if the annotation is used on the interface + net.MyCorp.MyApp.iSCSITarget with the value + iSCSI_Target the CamelCase form is + iSCSITarget while the lower-case form is + iscsi_target. If the annotation is used on the + method EjectTheiPod with the value + Eject_The_iPod, the lower-case form is + eject_the_ipod. + @@ -122,8 +162,10 @@ YourProject - The namespace to use for generated C code. This must be - provided in CamelCase format. + The namespace to use for generated C code. This is expected + to be in CamelCase + or Ugly_Case (see above). @@ -268,50 +310,10 @@ gdbus-codegen --c-namespace MyApp \ <method>, <signal> and <property> element to specify the - name to use when generating C code. The value is always - expected to be in CamelCase - or Ugly_Case (see below). - - - For interfaces, if not specified, the name defaults to the - D-Bus interface name stripped with the prefix given with - and with the dots - removed and initial characters capitalized. For example, for - the D-Bus interface com.acme.Coyote the - name used is ComAcmeCoyote. For the D-Bus - interface org.project.Bar.Frobnicator - with - org.project., the name used is - BarFrobnicator. - - - For methods, signals and properties, if not specified, the - name defaults to the name of the method, signal or property. - - - Two forms of the name are used - the CamelCase form and - the lower-case form. The CamelCase form is used for the #GType - and struct name, while lower-case form is used in function - names. The lower-case form is calculated by converting from - CamelCase to lower-case and inserting underscores at word - boundaries (using certain heuristics). - - - If the value given by the annotation contains an underscore - (sometimes called Ugly_Case), then the - camel-case name is derived by removing all underscores, and - the lower-case name is derived by lower-casing the - string. This is useful in some situations where - abbreviations are used. For example, if the annotation is - used on the interface - net.MyCorp.MyApp.iSCSITarget with the - value iSCSI_Target the CamelCase form is - iSCSITarget while the lower-case form is - iscsi_target. If the annotation is used - on the method EjectTheiPod with the value - Eject_The_iPod, the lower-case form is - eject_the_ipod. + or Ugly_Case (see above).