Re: [Evolution-hackers] Multiple calendars



Hi Scott,

On Mon, 2006-07-10 at 16:48 -0700, Scott Herscher wrote:
> Hey Jules!  Thanks a lot for your reply.  I know my questions weren't
> so clearly worded.  So I guess I can boil down my questions to this
> question (and least until I think of more questions):  is there a
> one-to-one relationship between an e-source and an e-cal backend?

There is a one-to-one relationship between an e-source and an e-cal
backend object instance. The same physical backend library can serve
multiple calendars/task/whatever accounts.


> For my purposes, I don't think it would work to hide the multiple
> calendars and only display one calendar.  So I think I'm going to have
> to create an e-source for every calendar.  I'm just not sure how that
> relates to e-cal backend.  Again...any help would be greatly
> appreciated.

Any e-source with the right protocol ("brutus://" in my case, maybe
"zimbra://" in yours) will make the eds frontend instantiate an e-cal
backend object for that specific e-source. The supported e-cal backend
protocol is returned by the factory method _get_protocol().

You have to check for the specifics (what calendar in particular) by
looking at the e-source from within your backend. Just hide something
that identifies the particular calendar within the e-source uri.

HTH,
  jules



> Thanks,
> 
> Scott
> 
> ----- Original Message -----
> From: Jules Colding <colding omesc com>
> To: Scott Herscher <scott herscher zimbra com>
> Cc: evolution-hackers gnome org
> Sent: Monday, July 10, 2006 2:36:26 AM GMT-0800
> Subject: Re: [Evolution-hackers] Multiple calendars
> 
> Hi Scott,
> 
> On Fri, 2006-07-07 at 16:27 -0700, Scott Herscher wrote:
> > Hey all. I'm struggling to understand something that I think should
> be
> > obvious.  
> 
> I'll try a shot at an explanation below despite my very limited
> knowledge...
> 
> 
> > I'm writing a new e-cal backend, and it connects to a server that
> > supports multiple calendars.  I get that when I create the account,
> my
> > eplugin will query the server, learn about all the calendars, create
> > one group and then create multiple sources (one for each calendar).
> > But what happens after I've added the account?  What part of the
> > evolution data server framework is responsible for monitoring if new
> > calendars are added remotely, or calendars are delete remotely?
> 
> I think you should hide this in the implementation of your backend.
> The
> gconf source will reflect an instance of a calendar as supported by
> your
> backend. 
> 
> You can choose to get all of the data in your different simultaneously
> supported calendars and display it in one single calendar or you can
> choose to created multible gconf sources, one for each remote
> calendar,
> and display that data in different calendars.
> 
> My experience is that newly create gconf sources will show up almost
> instantaneously in the calendar view, but I'm creating the sources in
> the Camel provider, so my experiences might not be applicable to you.
> 
> 
> >   Related to this first question...if I have multiple calendars and
> > they all are individual e-sources, wouldn't they sync up to the
> server
> > individually?  It seems like I'd want the e-group instance to
> initiate
> > syncs, and then tell the individual e-sources what was added or
> > deleted.  I'm sure I'm missing something here...I just don't know
> what
> > it is yet.
> 
> Hmm - I'm not sure that I understand your question...
> 
> 
> > Any help would be oh so greatly appreciated.
> 
> The usual answer is that you should look in the existing backends and
> see what they do. Take a look into my Brutus backend too as it may
> illuminate the problems in a different way.
> 
> Best regards,
>   jules
> 
> 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]