gio: Enable the GSocketFamily enum with hardcoded values

The values found by the parser for the GSocketFamily enum are in fact
constants defined in another header file, so the generated code would be
invalid.

We now hardcode the values through fix-ups. They probably don't
change, and they are also hardcoded in the gir file anyway, so it should
be OK.

Also fix-up a GInetAddress constructor that now gets generated.
This commit is contained in:
Bertrand Lorentz 2012-11-12 20:25:42 +01:00
parent 0f2af96e0a
commit 0f13a66762
2 changed files with 6 additions and 1 deletions

View file

@ -34,6 +34,10 @@
<attr path="/api/namespace/class[@cname='GIo_']/method[@name='SchedulerCancelAllJobs']" name="name">CancelAllJobs</attr>
<attr path="/api/namespace/class[@cname='GIo_']/method[@name='SchedulerPushJob']" name="name">PushJob</attr>
<attr path="/api/namespace/class[@name='Global']" name="name">GioGlobal</attr>
<attr path="/api/namespace/enum[@cname='GSocketFamily']/member[@name='Invalid']" name="value">0</attr>
<attr path="/api/namespace/enum[@cname='GSocketFamily']/member[@name='Unix']" name="value">1</attr>
<attr path="/api/namespace/enum[@cname='GSocketFamily']/member[@name='Ipv4']" name="value">2</attr>
<attr path="/api/namespace/enum[@cname='GSocketFamily']/member[@name='Ipv6']" name="value">10</attr>
<attr path="/api/namespace/interface[@cname='GAction']/property[@cname='enabled']" name="hidden">1</attr>
<attr path="/api/namespace/interface[@cname='GAction']/property[@cname='name']" name="hidden">1</attr>
<attr path="/api/namespace/interface[@cname='GAction']/property[@cname='parameter-type']" name="hidden">1</attr>
@ -105,6 +109,7 @@
<attr path="/api/namespace/object[@cname='GFileInfo']/method[@cname='g_file_info_set_attribute_int32']" name="name">SetAttributeInt</attr>
<attr path="/api/namespace/object[@cname='GFileInfo']/method[@cname='g_file_info_get_attribute_uint32']" name="name">GetAttributeUInt</attr>
<attr path="/api/namespace/object[@cname='GFileInfo']/method[@cname='g_file_info_set_attribute_uint32']" name="name">SetAttributeUInt</attr>
<attr path="/api/namespace/object[@cname='GInetAddress']/constructor[@cname='g_inet_address_new_from_bytes']/parameters/parameter[@name='bytes']" name="array">1</attr>
<attr path="/api/namespace/object[@cname='GInputStream']/method[@cname='g_input_stream_read']/parameters/parameter[@name='buffer']" name="type">guchar*</attr>
<attr path="/api/namespace/object[@cname='GInputStream']/method[@cname='g_input_stream_read']/parameters/parameter[@name='buffer']" name="array">1</attr>
<attr path="/api/namespace/object[@cname='GInputStream']/method[@cname='g_input_stream_read_all']/parameters/parameter[@name='buffer']" name="type">guchar*</attr>
@ -154,7 +159,6 @@
<move-node path="/api/namespace/class[@cname='GIo_']/method[@name='CancelAllJobs']">/api/namespace/struct[@cname='GIOSchedulerJob']</move-node>
<move-node path="/api/namespace/class[@cname='GIo_']/method[@name='PushJob']">/api/namespace/struct[@cname='GIOSchedulerJob']</move-node>
<remove-node path="/api/namespace/class[@cname='GDbus_']/method[@name='ErrorSetDbusErrorValist']" />
<remove-node path="/api/namespace/enum[@cname='GSocketFamily']" />
<remove-node path="/api/namespace/enum[@cname='GSocketMsgFlags']" />
<remove-node path="/api/namespace/interface[@cname='GDesktopAppInfoLookup']" />
<remove-node path="/api/namespace/interface[@cname='GTlsBackend']" />

View file

@ -365,6 +365,7 @@
<Compile Include="generated\ZlibDecompressor.cs" />
<Compile Include="generated\ContentType.cs" />
<Compile Include="generated\IOError.cs" />
<Compile Include="generated\SocketFamily.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\glib\glib.csproj">