CCalUser represents a calendar user, such as a meeting participant. The class provides attributes and methods that are common to all the calendar users, including the user’s email address, sent-by and common name fields.
You can construct a new calendar user with a specified email address, and optionally a sender, using the factory function CCalUser::NewL().
An attendee is a specialised calendar user used for attendees of an event. It is used only in group scheduled entries, and not for a single calendar user. The CCalAttendee class, derived from CCalUser, provides additional methods to store and retrieve an attendee's ROLE, PART-STAT, and RSVP fields.
//Create an attendee _LIT(KAttendee1Address, "tom.smith@org.com"); CCalAttendee* attendee1 = CCalAttendee::NewL(KAttendee1Address); _LIT(KAttendee1CommonName, "Tom"); attendee1->SetCommonNameL(KAttendee1CommonName);//set common name to Tom attendee1->SetRoleL(CCalAttendee::EReqParticipant);// set the role of the attendee, other roles Chair and Optional participant attendee1->SetStatusL(CCalAttendee::EAccepted);// set the status value
// setup the entry entry->CCalEntry::NewL(CCalEntry::EAppt, guid, CCalEntry::EMethodNone, 0); entry->AddAttendeeL(attendee1);//add the attendee to the entry
You can get a list of attendees using CCalEntry::AttendeesL(), and delete a specified attendee using CCalEntry::DeleteAttendeeL().
An entry can optionally have one phone owner and one organizer, both of which are of class CCalUser. The organizer may or may not be an attendee of that entry, but the phone owner must be an attendee. An organizer is a required property for a group scheduled entry.
//Set up the Organizer _LIT(KOrganizerAddress1, "harry.smith@org.com"); CCalUser* organiser1 = CCalUser::NewL(KOrganizerAddress1, KOrganizerSentByA); entry->SetOrganizerL(organiser1); //set the organizer for the event _LIT(KOrganiserCommonName, "Harry"); organiser1->SetCommonNameL(KOrganizerCommonName); //set the common name to Harry
//Set up the Phone owner for the calendar entry _LIT(KPhoneOwnerAddress1, "dick.smith@org.com"); CCalUser* phOwner1 = CCalUser::NewL(KPhoneOwnerAddress1, KOrganizerSentByB); entry->SetPhoneOwnerL(phOwner1); _LIT(KPhOwnerCommonName, "Dick"); organiser1->SetCommonNameL(KPhOwnerCommonName);//set the common name to Dick
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.