author | zautrix <zautrix> | 2004-06-29 11:59:46 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-06-29 11:59:46 (UTC) |
commit | da43dbdc6c82453228f34766fc74585615cba938 (patch) (side-by-side diff) | |
tree | 16576932cea08bf117b2d0320b0d5f66ee8ad093 /libkcal/icalformat.cpp | |
parent | 627489ea2669d3997676bc3cee0f5d0d0c16c4d4 (diff) | |
download | kdepimpi-da43dbdc6c82453228f34766fc74585615cba938.zip kdepimpi-da43dbdc6c82453228f34766fc74585615cba938.tar.gz kdepimpi-da43dbdc6c82453228f34766fc74585615cba938.tar.bz2 |
New lib ical.Some minor changes as well.
-rw-r--r-- | libkcal/icalformat.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libkcal/icalformat.cpp b/libkcal/icalformat.cpp index 5893db5..f2e7dfc 100644 --- a/libkcal/icalformat.cpp +++ b/libkcal/icalformat.cpp @@ -372,107 +372,109 @@ ScheduleMessage *ICalFormat::parseScheduleMessage( Calendar *cal, break; case ICAL_METHOD_CANCEL: method = Scheduler::Cancel; break; case ICAL_METHOD_ADD: method = Scheduler::Add; break; case ICAL_METHOD_REPLY: method = Scheduler::Reply; break; case ICAL_METHOD_COUNTER: method = Scheduler::Counter; break; case ICAL_METHOD_DECLINECOUNTER: method = Scheduler::Declinecounter; break; default: method = Scheduler::NoMethod; kdDebug(5800) << "ICalFormat::parseScheduleMessage(): Unknow method" << endl; break; } if (!icalrestriction_check(message)) { setException(new ErrorFormat(ErrorFormat::Restriction, Scheduler::translatedMethodName(method) + ": " + mImpl->extractErrorProperty(c))); return 0; } icalcomponent *calendarComponent = mImpl->createCalendarComponent(cal); Incidence *existingIncidence = cal->event(incidence->uid()); if (existingIncidence) { // TODO: check, if cast is required, or if it can be done by virtual funcs. if (existingIncidence->type() == "Todo") { Todo *todo = static_cast<Todo *>(existingIncidence); icalcomponent_add_component(calendarComponent, mImpl->writeTodo(todo)); } if (existingIncidence->type() == "Event") { Event *event = static_cast<Event *>(existingIncidence); icalcomponent_add_component(calendarComponent, mImpl->writeEvent(event)); } } else { calendarComponent = 0; } - + qDebug("icalclassify commented out "); + ScheduleMessage::Status status; +#if 0 icalclass result = icalclassify(message,calendarComponent,(char *)""); - ScheduleMessage::Status status; switch (result) { case ICAL_PUBLISH_NEW_CLASS: status = ScheduleMessage::PublishNew; break; case ICAL_OBSOLETE_CLASS: status = ScheduleMessage::Obsolete; break; case ICAL_REQUEST_NEW_CLASS: status = ScheduleMessage::RequestNew; break; case ICAL_REQUEST_UPDATE_CLASS: status = ScheduleMessage::RequestUpdate; break; case ICAL_UNKNOWN_CLASS: default: status = ScheduleMessage::Unknown; break; } - +#endif + status = ScheduleMessage::RequestUpdate; return new ScheduleMessage(incidence,method,status); } void ICalFormat::setTimeZone( const QString &id, bool utc ) { mTimeZoneId = id; mUtc = utc; tzOffsetMin = KGlobal::locale()->timezoneOffset(mTimeZoneId); //qDebug("ICalFormat::setTimeZoneOffset %s %d ",mTimeZoneId.latin1(), tzOffsetMin); } QString ICalFormat::timeZoneId() const { return mTimeZoneId; } bool ICalFormat::utc() const { return mUtc; } int ICalFormat::timeOffset() { return tzOffsetMin; } const char *ICalFormat::tzString() { const char* ret = (const char* ) mTzString; return ret; } |