On Sat, 2013-01-19 at 23:48 +0000, Graham Cobb wrote:
> On Saturday 19 January 2013 19:17:19 Graham Cobb wrote:
> > Before I look at adding code to do that, can you confirm that the approach
> > of setting the database attribute is the correct way to specify the
> > folder?
> 
> Hmm.  I have looked at the activesyncd code and have noted:
> 
> 1) It maintains a cache of the folder hierarchy
> 
> 2) It exposes a DBUS method ("get_folders") to allow a client to retrieve the 
> folder hierarchy
> 
> So, what is the desired behaviour here?  Should activesyncd be interpreting 
> the "folder_id" argument of the "sync_folder_items" method as a folder name 
> (and translating it internally into a numeric id)?  Or should the caller 
> (libeasclient?) be translating folder names into IDs?

I think both activesyncd and libeasclient should continue to just accept
the folder ID, because it is unambiguous. The folder name is not.

The place to implement some more user-friendly behavior is in the
SyncEvolution backend. Have a look at EvolutionSyncSource::findSource()
and how that backend implements getDatabases(). Note that findSource()
could (should?) be improved to detect ambiguities, for example a name
matching two different sources, and then throwing an error. Currently it
just picks the first one it finds.

In the ActiveSync backend getDatabases() is just a stub. It should use
the "get_folders" method. I don't remember why we didn't do that -
perhaps because the setup code in Evolution was doing the entire
configuration.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.


_______________________________________________
SyncEvolution mailing list
[email protected]
http://lists.syncevolution.org/listinfo/syncevolution

Reply via email to