diff -r 5db69f4c3d06 -r b048e15729d6 creator/engine/src/creator_calendar.cpp --- a/creator/engine/src/creator_calendar.cpp Mon Aug 23 15:50:54 2010 +0300 +++ b/creator/engine/src/creator_calendar.cpp Fri Sep 03 17:11:21 2010 +0300 @@ -26,6 +26,8 @@ #include #include #include +#include "creator_contactsetcache.h" +#include "creator_phonebook.h" static const TInt KCalendarFieldLength = 128; @@ -815,6 +817,32 @@ CleanupStack::Pop(); // attendee } } + // linked attendees: + for( TInt i = 0; i < parameters->iAttendeeLinkIds.Count(); ++i ) + { + CCreatorPhonebook* phonebook = dynamic_cast(iEngine->GetPhonebook()); + User::LeaveIfNull( phonebook ); + CCreatorPhonebookWrapper* phonebookWrapper = phonebook->GetPhonebookWrapper(); + + TLinkIdParam attendeeLinkId = parameters->iAttendeeLinkIds[i]; + const CCreatorContactSet& set = ContactLinkCache::Instance()->ContactSet(attendeeLinkId.iLinkId); + const RArray links = set.ContactLinks(); + TInt numberOfExplicitLinks = links.Count(); // Number of defined contacts in contact-set + for( TInt j = 0; j < numberOfExplicitLinks; ++j ) + { + TBuf<128> email; + TBuf<128> name; + TBuf<128> phoneNumber; + phonebookWrapper->GetContactDetailsL( links[j], name, phoneNumber, email ); + CCalAttendee* attendee = CCalAttendee::NewL( email ); + CleanupStack::PushL(attendee); + if( name.Length() > 0 ) + attendee->SetCommonNameL( name ); + attendee->SetResponseRequested(ETrue); + aCalEntry.AddAttendeeL(attendee); + CleanupStack::Pop(); // attendee + } + } } //----------------------------------------------------------------------------