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 🙂
- 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!!