meetingrequest/mrentry/inc/mesmrmeetingrequestentry.h
changeset 0 8466d47a6819
child 8 e1b6206813b4
equal deleted inserted replaced
-1:000000000000 0:8466d47a6819
       
     1 /*
       
     2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Interface definition for ESMR meeting request entry
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MESMRMEETINGREQUESTENTRY_H
       
    20 #define MESMRMEETINGREQUESTENTRY_H
       
    21 
       
    22 #include "CFSMailCommon.h"
       
    23 #include "mesmrcalentry.h"
       
    24 #include "esmrdef.h"
       
    25 
       
    26 class CCalAttendee;
       
    27 class MMRInfoObject;
       
    28 class TESMRInputParams;
       
    29 
       
    30 /**
       
    31  * MESMRCalEntry provides utility functions for handling MR Entry.
       
    32  *
       
    33  * @lib esmrservices.lib
       
    34  */
       
    35 class MESMRMeetingRequestEntry : public MESMRCalEntry
       
    36     {
       
    37 public:
       
    38     /** Enumeration for meeting request entry information */
       
    39     enum TESMREntryInfo
       
    40         {
       
    41         EESMREntryInfoOutOfDate,            // Entry is ouyt of date
       
    42         EESMREntryInfoCancelled,            // Entry is cancelled
       
    43         EESMREntryInfoAccepted,             // Entry is accepted
       
    44         EESMREntryInfoTentativelyAccepted,  // Entry is tentatively accepted
       
    45         EESMREntryInfoDeclined,             // Entry is declined
       
    46         EESMREntryInfoOccursInPast,         // Entry occurs in past
       
    47         EESMREntryInfoConflicts,            // Entry conflicts with another entry
       
    48         EESMREntryInfoNormal                // Normal case
       
    49         };
       
    50 
       
    51 public:
       
    52     /**
       
    53      * Virtual destructor.
       
    54      */
       
    55     virtual ~MESMRMeetingRequestEntry() { }
       
    56 
       
    57 public:
       
    58 
       
    59     /**
       
    60      * Fetches the phone owner's role in this calendar entry.
       
    61      * @return User role.
       
    62      * @see TESMRRole.
       
    63      */
       
    64     virtual TESMRRole RoleL() const = 0;
       
    65 
       
    66     /**
       
    67      * Checks, if this entry conflicts with other entries.
       
    68      * @return ETrue, if conflicts exists.
       
    69      */
       
    70     virtual TBool Conflicts() const = 0;
       
    71 
       
    72     /**
       
    73      * For organizer, this marks meeting cancelled.
       
    74      * For attendee, this constructs response entry
       
    75      * and marks attendee status 'declined'.
       
    76      */
       
    77     virtual void MarkMeetingCancelledL() = 0;
       
    78 
       
    79     /**
       
    80      * Constructs reply entry and sets attendee status.
       
    81      * Phone owner needs to be found from entrys attendee list
       
    82      * and role needs to be participant or optional participant.
       
    83      *
       
    84      * @param aStatus Attendee status
       
    85      */
       
    86     virtual void ConstructReplyL(
       
    87             TESMRAttendeeStatus aStatus ) = 0;
       
    88 
       
    89     /**
       
    90      * Tests, whether entry is out of date. Entry is out of date, if
       
    91      * newer entry exists in calendar db.
       
    92      * @return ETrue, if entry is out of date.
       
    93      */
       
    94     virtual TBool IsEntryOutOfDateL() const = 0;
       
    95 
       
    96     /**
       
    97      * Tests, if meeting is cancelled.
       
    98      * @return ETrue, if meeting is cancelled.
       
    99      */
       
   100     virtual TBool IsMeetingCancelledL() const = 0;
       
   101 
       
   102     /**
       
   103      * Fetches attendee status. Phone owner needs to be in the attendee
       
   104      * list.
       
   105      * @return Attendee status.
       
   106      * @error KErrNotFound if phone owner not found from attendee list.
       
   107      */
       
   108     virtual TESMRAttendeeStatus AttendeeStatusL() const = 0;
       
   109 
       
   110     /**
       
   111      * Tests if this is forwarded entry.
       
   112      * @return ETrue, if entry is forwarded.
       
   113      */
       
   114     virtual TBool IsForwardedL() const = 0;
       
   115 
       
   116     /**
       
   117      * Switched entry into forward mode. Current entry's all fields remain
       
   118      * as they are.Entry's method is switched into request and attendee
       
   119      * list is emptied.
       
   120      * @error KErrNotSupported Current entry cannot be forwarded.
       
   121      */
       
   122     virtual void SwitchToForwardL() = 0;
       
   123 
       
   124     /**
       
   125      * Switched entry into orginal mode. Entry is restored to same state
       
   126      * before switching into forwarding mode.
       
   127      * @error KErrNotSupported Current entry cannot be forwarded.
       
   128      */
       
   129     virtual void SwitchToOrginalL() = 0;
       
   130 
       
   131     /**
       
   132      * Sets entry's status to confirmed.
       
   133      */
       
   134     virtual void ConfirmEntryL() = 0;
       
   135 
       
   136     /**
       
   137      * Checks, whether entry occurs in the past
       
   138      * @return ETrue, if entry occurs in the past.
       
   139      */
       
   140     virtual TBool OccursInPastL() const = 0;
       
   141 
       
   142     /**
       
   143      * Fetches entry information in attendee mode.
       
   144      * Method will leave if phone owner is organizer.
       
   145      * @return Entry attendee information
       
   146      * @error KErrNotSupported Phone owner is organizer.
       
   147      */
       
   148     virtual TESMREntryInfo EntryAttendeeInfoL() const = 0;
       
   149 
       
   150     /**
       
   151      * Fetches attendees from entry. Attendees are added to
       
   152      * aAttendeeArray. Attendees are filtered according to aFilterFlags
       
   153      * parameter.
       
   154      * Filtering flags is combimnation of enumeration TESMRRole values.
       
   155      * For example, aFilterFlags =  EESMRRoleRequiredAttendee --> Required
       
   156      * attendees are included to array. Ownership of the attendee objects is
       
   157      * not transferred.
       
   158      * @param aAttendeeArray Reference to attendee array
       
   159      * @param aFilterFlags Attendee filtering flags.
       
   160      */
       
   161     virtual void GetAttendeesL(
       
   162             RArray<CCalAttendee*>& aAttendeeArray,
       
   163             TUint aFilterFlags ) const = 0;
       
   164 
       
   165     /**
       
   166      * Fetches validated entry. Ownership is transferred to caller.
       
   167      * @return Pointer to validated entry.
       
   168      */
       
   169     virtual CCalEntry* ValidateEntryL() = 0;
       
   170 
       
   171     /**
       
   172     * Fetches the conflicting entries. Conflicting entries are added
       
   173     * to aEntryArray.
       
   174     * @param aEntryArray Array containing conflicting entries
       
   175     * @return KErrNotFound if no conflicting entries, KErrNone otherwise.
       
   176     */
       
   177     virtual TInt FetchConflictingEntriesL(
       
   178             RPointerArray<CCalEntry>& aEntryArray ) = 0;
       
   179 
       
   180     /**
       
   181      * Tests if meeting request entry contains synchronization object.
       
   182      * @return ETrue, if sync object is present
       
   183      */
       
   184     virtual TBool IsSyncObjectPresent() const = 0;
       
   185 
       
   186     /**
       
   187      * Fetches the reference to sync object If sync object is not
       
   188      * present, method leaves with KErrNotSupported.
       
   189      */
       
   190     virtual MMRInfoObject& SyncObjectL() = 0;
       
   191 
       
   192     /**
       
   193      * Validates the sync object and return pointer to it. If sync object is not
       
   194      * present, method leaves with KErrNotSupported.
       
   195      */
       
   196     virtual MMRInfoObject& ValidateSyncObjectL() = 0;
       
   197 
       
   198     /**
       
   199      * Fetches startup parameters. Return ETrue if startup parameters
       
   200      * were filled to aStarupParams structure.
       
   201      * @param aStarupParams Reference to startup params structure
       
   202      * @return ETrue, if startup params were present
       
   203      */
       
   204     virtual TBool StartupParameters(
       
   205             TESMRInputParams& aStarupParams) const = 0;
       
   206 
       
   207     /**
       
   208      * Fetches attendee count.
       
   209      *
       
   210      * Filtering flags is combimnation of enumeration TESMRRole values.
       
   211      * For example, aFilterFlags =  EESMRRoleRequiredAttendee --> Required
       
   212      * attendee count is returns.
       
   213      *
       
   214      * @return Attendee count
       
   215      */
       
   216     virtual TInt AttendeeCountL(
       
   217             TUint aFilterFlags ) const = 0;
       
   218 
       
   219     /**
       
   220      * For recurrent event method removes this from the series.
       
   221      * Entry needs to be recurrent event and modification rule
       
   222      * needs to be MESMRCalEntry::EESMRThisOnly.
       
   223      * Ownership of the returned calendar entry is transferred to caller.
       
   224      *
       
   225      * @return Parent entry
       
   226      */
       
   227     virtual CCalEntry* RemoveInstanceFromSeriesL() = 0;
       
   228 
       
   229     /**
       
   230      * Sets default values to entry.
       
   231      */
       
   232     virtual void SetDefaultValuesToEntryL() = 0;
       
   233 
       
   234     /**
       
   235      * Tests, if entry is opened from mail.
       
   236      * @return ETrue if entry is opened from mail.
       
   237      */
       
   238     virtual TBool IsOpenedFromMail() const = 0;
       
   239 
       
   240     /**
       
   241      * Fetches attendees from entry. Attendees are added to
       
   242      * aAttendeeArray. Attendees are filtered according to aFilterFlags
       
   243      * parameter.
       
   244      * Filtering flags is combimnation of enumeration TESMRRole values.
       
   245      * For example, aFilterFlags =  EESMRRoleRequiredAttendee --> Required
       
   246      * attendees are included to array. Ownership of the attendee objects is
       
   247      * not transferred.
       
   248      * @param aAttendeeArray Reference to attendee array
       
   249      * @param aFilterFlags Attendee filtering flags.
       
   250      */
       
   251     virtual void GetAddedAttendeesL(
       
   252             RArray<CCalAttendee*>& aAttendeeArray,
       
   253             TUint aFilterFlags ) const = 0;
       
   254 
       
   255     /**
       
   256      * Fetches attendees from entry. Attendees are added to
       
   257      * aAttendeeArray. Attendees are filtered according to aFilterFlags
       
   258      * parameter.
       
   259      * Filtering flags is combimnation of enumeration TESMRRole values.
       
   260      * For example, aFilterFlags =  EESMRRoleRequiredAttendee --> Required
       
   261      * attendees are included to array. Ownership of the attendee objects is
       
   262      * not transferred.
       
   263      * @param aAttendeeArray Reference to attendee array
       
   264      * @param aFilterFlags Attendee filtering flags.
       
   265      */
       
   266     virtual void GetRemovedAttendeesL(
       
   267             RArray<CCalAttendee*>& aAttendeeArray,
       
   268             TUint aFilterFlags ) const = 0;
       
   269 
       
   270     /**
       
   271      * Updates the entry after storing
       
   272      */
       
   273     virtual void UpdateEntryAfterStoringL() = 0;
       
   274     
       
   275     /**
       
   276      * Updates child entries sequence numbers and stores them to
       
   277      * calendar DB.
       
   278      */
       
   279     virtual void UpdateChildEntriesSeqNumbersL() = 0;
       
   280     
       
   281     /**
       
   282      * Resolves current plugin in use.
       
   283      * @return current plug-in in use.
       
   284      */
       
   285     virtual TESMRMailPlugin CurrentPluginL() = 0;
       
   286 
       
   287     /**
       
   288      * Resolves current message box Id.
       
   289      * @return current message box Id.
       
   290      */
       
   291     virtual TFSMailMsgId CurrentMailBoxIdL() = 0;
       
   292     
       
   293     /**
       
   294      * Updates entry's timestamp (DTSTAMP) information.
       
   295      */
       
   296     virtual void UpdateTimeStampL() = 0;
       
   297     
       
   298     /**
       
   299      * Checks if any instance (having same UID)
       
   300      * occurs between specified time. Time information
       
   301      * is considered to be device's local time.
       
   302      * 
       
   303      * @param aStart Start time
       
   304      * @param aEnd End time
       
   305      */
       
   306     virtual TBool AnyInstanceOnDayL(
       
   307             TTime& aStart,
       
   308             TTime& aEnd ) = 0;
       
   309     };
       
   310 
       
   311 #endif // MESMREMEETINGREQUESTSENDER_H