Active Topics

 



Notices


Reply
Thread Tools
Posts: 35 | Thanked: 17 times | Joined on Aug 2009
#61
Originally Posted by zaheerm View Post
I have google multicalendar support one way sync working. It is command line only for the moment but supports multiple google accounts also.

Once I get some kind of basic UI on it, I will push to extras-devel. Anyone curious can look at the code at http://github.com/zaheerm/mgcalsync

Glad to see this! I skimmed the code, but haven't had a chance to try it out yet. Are you interested in turning this in to a two-way sync at some point?

Glancing over the code (grabbed from git tonight), I think moving towards two-way should be relatively easy. In add_event(), there is a block of if/else's which generate effectively three cases:

1) Event was previously mapped but no longer exists in mcal. In this case, delete the entry from the gcal.

2) Event is not mapped. This case would stay the same, add the event to mcal (would need to update the event hash described below).

3) Event is mapped. In this case, the code currently checks to see if the gcal and mcal events differ, if so they update mcal. Instead, we could store with the event mapping a hash of the event as last synchronized with gcal. We compare both the gcal and mcal hashes against the event mapping hash. If all three hashes match, no update is necessary. if the gcal hash matches the event mapping hash, but mcal hash differs, then the event was changed locally and needs to be updated on gcal (and the event mapping hash updated). If the mcal hash matches, but gcal hash differs, then the event was changed on gcal and needs to be updated in mcal (and the event mapping hash updated). If neither the gcal or mcal hashes match the event mapping hash, then the event was presumably modified on both ends and we enter conflict resolution.

For conflict resolution, I think there are three reasonable options (user configured preference):

1) always trust server (same as gcal hash differs)
2) always trust local (same as mcal hash differs)
3) interactive

In the interactive case, neither gcal or mcal is updated, but the event and relevant details are added to a conflict table in info.db. The GUI triggers a Maemo notification that conflicts need to be resolved. When the user activates the notification, they are provided a list of conflicts, allowing them in each case to select how to resolve the conflict. The interactive mode could probably be left as a later feature, as I'm guessing most users would be satisfied with #1 or #2.

The other thing I see missing (aside from GUI) removing events from mcal when they are deleted from gcal. For that we'd need to mark off the mcal events as we see them in the gcal feed. After everything else finishes, remove the mcal events that don't get flagged.

I'm going to try and find some time to build your code and start playing with it to see how well this will work.
 
Posts: 22 | Thanked: 6 times | Joined on Dec 2009 @ Utrecht, the Netherlands
#62
Originally Posted by zaheerm View Post
I have google multicalendar support one way sync working. It is command line only for the moment but supports multiple google accounts also.

Once I get some kind of basic UI on it, I will push to extras-devel. Anyone curious can look at the code at http://github.com/zaheerm/mgcalsync
Thanks a lot for this. I would want to test this myself but I can't do much with the .cpp file (lacking a c compiler on the n900). So I'm also asking for a precompiled binary (as someone else already did). Or, even better, get the app on the repositories, with UI or not...
 
Posts: 35 | Thanked: 17 times | Joined on Aug 2009
#63
Originally Posted by zaheerm View Post
I have a command line app that works for one way sync from gcal to maemo. I am in my spare time getting a basic ui together for people to test it.

Here is a pic of 26 calendars synced from gcal to my device:

http://www.flickr.com/photos/aandza/4164018365/

Have you tested this in the SDK/emulator? I'm having trouble getting libgdata working in the SDK because of SSL issues (still trying to sort those out).I might go ahead and build for my device and test it there.
 
Posts: 151 | Thanked: 82 times | Joined on Sep 2008
#64
Originally Posted by magalinasser View Post
I am having problems with MfE to synchronize with Google.(contacts and calendar).
Sometimes it just works but most of the times it doesn't.
I noticed that after a reset it always works for a while.
Have the very same problem as you.... works for a while after restart. then stops working for some reason (exchange server error ) and will only begin working again after a restart.
 
Reply


 
Forum Jump


All times are GMT. The time now is 19:10.