Hi again, perhaps you can help me understand few things
1. I want to know how the resources are working (for now I'm focused on the calendar) and how I can get all resources. I think same logic applies to the address book.
I have this in my test code:
KCal::Event::List events = calendar->events();
for (KCal::Event::List::ConstIterator i = events.begin(); ...
KCal::ResourceCalendar *resource = calendar->resource(*i); debug() << "RES ID :" << resource->infoText( ) << "\n"; debug() << "Event UID:" << (*i)->uid() << "\n"; debug() << "DESCR. :" << (*i)->description() << "\n";
and I see
test: DEBUG: RES ID :<b>Calendar</b><br>Type: Calendar in local file test: DEBUG: Event UID:KOrganizer-907657708.300 test: DEBUG: DESCR. :
test: DEBUG: RES ID :<b>Calendar</b><br>Type: Calendar in local file test: DEBUG: Event UID:6D57BED4-B881-41E4-B956-275EAC155D4B-0DD10CAB-DBAE-46FB-888D-0ACD678A78F1 test: DEBUG: DESCR. :
test: DEBUG: RES ID :<b>Calendar</b><br>Type: Calendar in local file test: DEBUG: Event UID:libkcal-127920932.676 test: DEBUG: DESCR. :Martin Opitz
test: DEBUG: RES ID :<b>MoonCal</b><br>Type: Calendar in local file test: DEBUG: Event UID:F2320209-5806-4075-B7F3-253AEF30942A-0DD10CAB-DBAE-46FB-888D-0ACD678A78F1 test: DEBUG: DESCR. :
test: DEBUG: RES ID :<b>birthdays-resource</b><br>Type: Birthdays from the calendar test: DEBUG: Event UID:226_KABC_Birthday test: DEBUG: DESCR. :
test: DEBUG: RES ID :<b>Feiertage-AT</b><br>Type: calendar in local file test: DEBUG: Event UID:KOrganizer-5773400.245 test: DEBUG: DESCR. :gesetzlich anerkannter Feiertag (öffentlicher Ruhetag)
Please note the different info and UID structure. The question is how I get all resources and their ids (well without reading the code - haha)
In opensync one would put "Calendar" in the config file and it would use this resource.
I do not know if this was pragmatic decision or had another background. I could imagine having one resource for the mobile or a like, but perhaps it is not hard to implement more sophisticated logic and more flexible configuration.
2. I want to know how the so called Cache works and if it is required to somehow deal with it. I do not recall seeing something like this in the kdepim opensync code
3. I use simple debug function
kdbgstream debug() { return kdDebug() << "DEBUG: " ; }
but ./cal-reader-test 2>&1> /tmp/test
still outputs to the screen - this turns upside down all I knew about IO in *nix. I must admit that I do not know that much about KDE3 now TDE internal. It is just the best one in my opinion, so use it.
thank you in advance
regards