diff -r 43e37759235e -r 51a74ef9ed63 Symbian3/SDK/Source/GUID-62195532-3FD0-5A3B-90E6-D624C4A60594.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-62195532-3FD0-5A3B-90E6-D624C4A60594.dita Wed Mar 31 11:11:55 2010 +0100 @@ -0,0 +1,30 @@ + + + + + +Calendar User

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().

Attendee

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().

Organizer and phone owner

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
\ No newline at end of file