[Gtk-sharp-list] .NET bindings for Tinymail, skeleton added to repository but I still have some compilation problems

Philip Van Hoof spam at pvanhoof.be
Sun Jan 27 18:35:18 EST 2008


Hi there,

I just added the skeleton for .NET bindings to Tinymail.

Tinymail is a library intended for mobile E-mail clients.

The idea behind the library is to give infrastructure, tools and types
to build an E-mail client that'll run on a mobile device. It's core
goals are low memory consumption, few round trips and low bandwidth
requirements.

An example is Nokia's Modest which is using  Tinymail to create an
E-mail client for the N800 and N810 devices. 

bla bla bla

Its types are very often GTypeInterface ones. I learned from Mike's blog
that newer Gapi versions have some support for this build in.

Eager to test this stuff, I tried it and indeed I'm seeing the various
Gapi tools find my interfaces and create .NET equivalents.

This is the SVN commit for the skeleton, by the way:
  http://tinymail.org/trac/tinymail/changeset/3302
You enable it using --enable-dotnet-bindings

cd bindings/dotnet ; make

It wont compile yet, though. I got these errors:

         AssemblyInfo.cs generated/*.cs -o libtinymail-sharp.dll
warning CS8029: Compatibility: Use -unsafe instead of --unsafe
warning CS8029: Compatibility: Use -target:KIND instead of --target KIND
warning CS8029: Compatibility: Use -out:FILE instead of --output FILE or -o FILE
generated/Account.cs(75,33): error CS0102: The type `Tny.AccountImplementor' already contains a definition for `PassFuncFunc'
generated/Account.cs(73,33): (Location of the symbol related to previous error)
generated/Account.cs(76,36): error CS0102: The type `Tny.AccountImplementor' already contains a definition for `ForgetPassFuncFunc'
generated/Account.cs(74,36): (Location of the symbol related to previous error)
generated/Account.cs(77,22): error CS0102: The type `Tny.AccountImplementor' already contains a definition for `PortFunc'
generated/Account.cs(71,22): (Location of the symbol related to previous error)
generated/Account.cs(78,24): error CS0102: The type `Tny.AccountImplementor' already contains a definition for `UrlStringFunc'
generated/Account.cs(72,24): (Location of the symbol related to previous error)
generated/Account.cs(86,38): error CS0102: The type `Tny.AccountImplementor' already contains a definition for `ConnectionPolicyFunc'
generated/Account.cs(85,38): (Location of the symbol related to previous error)
generated/Folder.cs(85,39): error CS0102: The type `Tny.FolderImplementor' already contains a definition for `MsgRemoveStrategyFunc'
generated/Folder.cs(84,39): (Location of the symbol related to previous error)
generated/Folder.cs(87,40): error CS0102: The type `Tny.FolderImplementor' already contains a definition for `MsgReceiveStrategyFunc'
generated/Folder.cs(86,40): (Location of the symbol related to previous error)
generated/MergeFolder.cs(150,39): error CS0102: The type `Tny.MergeFolder' already contains a definition for `FolderType'
generated/MergeFolder.cs(71,39): (Location of the symbol related to previous error)
generated/MimePartSaver.cs(21,42): error CS0102: The type `Tny.MimePartSaverImplementor' already contains a definition for `SaveStrategyFunc'
generated/MimePartSaver.cs(20,42): (Location of the symbol related to previous error)
generated/MimePartView.cs(21,30): error CS0102: The type `Tny.MimePartViewImplementor' already contains a definition for `PartFunc'
generated/MimePartView.cs(20,30): (Location of the symbol related to previous error)
generated/MsgView.cs(24,25): error CS0102: The type `Tny.MsgViewImplementor' already contains a definition for `MsgFunc'
generated/MsgView.cs(23,25): (Location of the symbol related to previous error)
Compilation failed: 11 error(s), 3 warnings
make: *** [libtinymail-sharp.dll] Error 1
pvanhoof at schtrumpf:~/repos/tinymail/trunk/bindings/dotnet$ 


I wonder what my options are. Can I override sufficient things to get
rid of these problems? Can I provide my own alternative code for the
properties and methods that are failing here?

And how? And if documented, where can I find this documentation?

Another question: can I change the type hierarchy of generated types? I
for example have a Tny.List and a Tny.Iterator that I sure would like to
adapt to make it implement the IList interface of .NET. I also have a
Tny.Stream that I think could use some System.IO.Stream magic here and
there.

I would prefer to have language bindings that are comparable to each
other in API. I'm adding Jürg Billeter in CC. Jürg coded on the Vala
bindings for Tinymail. Vala, the programming language, is being designed
after C#. Therefore I'm confident that the bindings can be made to look
the same.



-- 
Philip Van Hoof, freelance software developer
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
http://pvanhoof.be/blog
http://codeminded.be



More information about the Gtk-sharp-list mailing list