summaryrefslogtreecommitdiffabout
path: root/korganizer/incomingdialog.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/incomingdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/incomingdialog.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/korganizer/incomingdialog.cpp b/korganizer/incomingdialog.cpp
index 490d21e..f3bd09f 100644
--- a/korganizer/incomingdialog.cpp
+++ b/korganizer/incomingdialog.cpp
@@ -431,97 +431,97 @@ bool IncomingDialog::incomeRequest(ScheduleItemIn *item)
}
bool IncomingDialog::automaticAction(ScheduleItemIn *item)
{
bool autoAction = false;
IncidenceBase *inc = item->event();
Scheduler::Method method = item->method();
if( inc->type()=="FreeBusy" ) {
if ( method==Scheduler::Request ) {
if ( KOPrefs::instance()->mIMIPAutoFreeBusy==KOPrefs::addressbookAuto ) {
// reply freebusy information
if ( checkOrganizerInAddressbook(inc->organizer()) ) {
incomeRequest(item);
}
} else return false;
} else {
if ( method==Scheduler::Reply ) {
if ( KOPrefs::instance()->mIMIPAutoFreeBusy==KOPrefs::addressbookAuto ) {
// insert freebusy information
//if ( checkAttendeesInAddressbook(inc) )
} else return false;
} else {
if ( method==Scheduler::Publish) {
if ( KOPrefs::instance()->mIMIPAutoFreeBusy==KOPrefs::addressbookAuto ) {
// insert freebusy information
//if ( checkOrganizerInAddressbook(inc->organizer()) )
}
} else return false;
}
}
}
if ( inc->type()=="Event" ) {
if ( method==Scheduler::Request || method==Scheduler::Publish ) {
if ( KOPrefs::instance()->mIMIPAutoInsertRequest==KOPrefs::addressbookAuto ) {
// insert event
if ( checkOrganizerInAddressbook(inc->organizer()) )
autoAction = acceptMessage(item);
} else return false;
} else {
if ( method==Scheduler::Reply ) {
if ( KOPrefs::instance()->mIMIPAutoInsertReply==KOPrefs::addressbookAuto ) {
// update event information
if ( checkAttendeesInAddressbook(inc) )
autoAction = acceptMessage(item);
} else return false;
} else {
if ( method==Scheduler::Refresh ) {
if ( KOPrefs::instance()->mIMIPAutoRefresh==KOPrefs::addressbookAuto ) {
// send refresh-information
if ( checkAttendeesInAddressbook(inc) )
autoAction = acceptMessage(item);
else return false;
} else return false;
} else return false;
}
}
}
return autoAction;
}
bool IncomingDialog::checkOrganizerInAddressbook(QString organizer)
{
bool inBook = false;
#ifndef KORG_NOKABC
KABC::AddressBook *add_book = KABC::StdAddressBook::self();
KABC::Addressee::List addressList;
addressList = add_book->findByEmail(organizer);
if ( addressList.size()>0 ) inBook = true;
#endif
return inBook;
}
bool IncomingDialog::checkAttendeesInAddressbook(IncidenceBase *inc)
{
bool inBook = false;
#ifndef KORG_NOKABC
KABC::AddressBook *add_book = KABC::StdAddressBook::self();
KABC::Addressee::List addressList;
QPtrList <Attendee> attendees;
Attendee *att;
attendees = inc->attendees();
for (att=attendees.first();att;att=attendees.next()) {
addressList = add_book->findByEmail(att->email());
if (addressList.size()>0 ) inBook = true;
}
#endif
return inBook;
}
-#include "incomingdialog.moc"
+//#include "incomingdialog.moc"