EDS C# backends

I have been working on C# bindings for the EDS backends during this weekend and in some free time. Once this is complete one can write backends for  Ice Core, exchange web services, google calendar, remember the milk etc. in C#.  With so many client libraries available and rapidness in developing code using c# it would be fun to write backends for EDS 🙂

This is what I have done currently,

  • A BackendLoaderFactory which would load the mono runtime and register all the methods defined by IBackend.cs interace for a c# backend. It will look for .xml files from the extensions/mono directory and load all the c# backends. So a Loader factory would have a list of porotcols supported.
  • c# bindings for libedata-cal using gapi which includes the classes, ECalBackend,ECalBackendSexp and ECalBackendCache. I have put it in evolution-sharp at the moment.
  • MonoBackend which acts as a connector between the c# and c backend. This implements all the virtual functions to invoke the corresponding api in c#.
  • I have implemented 5 apis at the moment which send/get strings/int values from c#.

gapi2-parser was not able to parse a particular class ECalBackend. It said it could not parse a method “last_client_gone” whereas it was able to parse other files. After trying different things, I had a look in to the gapi2xml.pl and found that it was unable to find the class name. The reason was the struct was typdef in some other common header file rather than e-cal-backend.h 🙂 It was nice to sort out the issue.around

Some things which are in progress are,

  • Implement the the apis which needs to send/get a list of strings
  • Notifications calls from c# to c backend.
  • Some documentation and a template .cs file to quickly have all the virtual functions.

One of the queries which I have is,

* Is to good to have the provider bindings in evolution-sharp.dll library itself or put it in a separate one ?

Once I get a complete c# backend working in calendar which is not too far ;), am planning to start writing the bindings for mailer. I already know of one gnome hacker (also the calendar co maintainer) who is very interested in developing Remember the milk backend for EDS using c# 🙂 which is encouraging me to get it completed fast. Am currently using google calendar .net library for implementing the first c# backend.

This picture with miguel during GUADEC was so encouraging!! and am going to preserve it for a long time to come 🙂 Thanks to kangaroo (who was the person to help me with my first issue in mono loader), ankit (showing the right places for me to look at anytime), jhonny (with evo-sharp)  and all others who is helping me 🙂 This is first time am writing code in c# and it feels good!!

Advertisements

8 thoughts on “EDS C# backends

  1. Hello!

    This was fast! I remember we talked in Guadec about this, but I did not know it was going to happen so quickly, these are fantastic news!

    As for keeping the code in one library or two, I think that using a separate library is a good idea, because EDS# should probably not depend on the GUI components of Evolution as a library.

    Where can one find this code?

    Also, at Guadec, we mentioned that it would also be nice to implement another piece of the puzzle: allowing for Mono-based Camel providers. Stedfast has told me that a new IMAP provider would be much simpler to write with Mono than trying to redo it in C.

    Congratulations on the work, I think this is great, and I agree that there are many interesting providers that we will be able to write with this, and have fun while doing it.

    Keep up the good work!
    Miguel

  2. Awesome. I guess meeting Miguel does more wonders than paycheck(s) and bonus.

    Now, this tempts me to enable people to write camel providers via C#. May be , we need to use all those ITOs that goes to /dev/null otherwise 😉

    Congrats.

  3. miguel, thanks a lot!! I will be putting the code into gitorious.org during this week and will provide the link to you.

    evolution-sharp currently has the bindings for the client side interface of EDS and does not link to any GUI components. Since now the above bindings are for EDS providers, was not sure whether added into that would be ok.

    Since I have written the bindings for calendar, have got some idea with interoperability between native C library and mono. I will start writing the bindings for mailer (camel) providers quite soon!!

  4. Very cool. I’ve been thinking about some EPlugins lately, so this could potentially make that a lot easier for me.

    I’ll be looking forward to some code.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s