[resend with corrected email address]

Hello Lassi!

You just touched some interesting code in the Buteo framework:

http://meego.gitorious.org/meego-middleware/buteo-syncfw/commit/da2b95d42658277cd80c1bc58bdbb52de065db29

--- a/msyncd/synchronizer.cpp
+++ b/msyncd/synchronizer.cpp
@@ -738,18 +738,19 @@ void Synchronizer::onStorageAccquired ( const QString 
&aProfileName,
         SyncSession *session = qobject_cast<SyncSession*>(QObject::sender());
         if (session){
             QMap<QString,bool> storageMap = session->getStorageMap();
-            if (aMimeType.compare(QString("text/x-vcard")) == 0)
+            if (aMimeType.compare(QString("text/x-vcard"), 
Qt::CaseInsensitive) == 0)
                 storageMap["hcontacts"] = true;
-            else if (aMimeType.compare(QString("text/x-vcalendar")) == 0)
+            else if (aMimeType.compare(QString("text/x-vcalendar"), 
Qt::CaseInsensitive) == 0)
                 storageMap["hcalendar"] = true;
-            else if (aMimeType.compare(QString("text/plain")) == 0)
+            else if (aMimeType.compare(QString("text/plain"), 
Qt::CaseInsensitive) == 0)
....
             else 
                 LOG_DEBUG( "Unsupported mime type" << aMimeType );


I hope you don't mind that I ask some questions about it. If you don't
know the code, perhaps you can CC someone who does?

First, why does the framework list the names of specific backend
("hcontacts", "hcalendar", ...)? These names are names of specific sync
plugins. buteo-sync-plugins is just one of many potential users of the
framework. Will the framework still work if there is no "hcontacts"
plugin at all anywhere or the contact plugin used by a different sync
engine is named differently?

Second, is iCalendar 2.0 (aka "text/calendar") supported? It is not
listed in the function above. Should it be?

Sateesh once said that the "vcalendar" in '<key name="Calendar Format"
value="vcalendar"/>' was "just an
identifier" (http://bugs.meego.com/show_bug.cgi?id=4945#c10) which could
also be used for iCalendar 2.0. But when I looked at the source code of
hcalendar I found that it does distinguish between CALENDAR_FORMAT_VCAL
= "vcalendar" and CALENDAR_FORMAT_ICAL = "icalendar" here:

http://meego.gitorious.org/meego-middleware/buteo-sync-plugins/blobs/master/storageplugins/hcalendar/CalendarStorage.cpp#line85

if( iProperties[CALENDAR_FORMAT] == CALENDAR_FORMAT_ICAL )
{
       LOG_DEBUG("The calendar storage is using icalendar format");
       iStorageType = ICALENDAR_FORMAT;
....

I'm still wondering whether the ScheduleWorld config should be using
"Calendar Format = icalendar", and why that wasn't used in the current
configs (http://bugs.meego.com/show_bug.cgi?id=4945#c12). Any idea?

-- 
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.


_______________________________________________
MeeGo-dev mailing list
[email protected]
http://lists.meego.com/listinfo/meego-dev


_______________________________________________
MeeGo-dev mailing list
[email protected]
http://lists.meego.com/listinfo/meego-dev

Reply via email to