meetingrequest/mrentry/inc/mesmrcalentry.h
branchRCL_3
changeset 33 da5135c61bad
parent 0 8466d47a6819
equal deleted inserted replaced
32:a3a1ae9acec6 33:da5135c61bad
    23 #include "esmrdef.h"
    23 #include "esmrdef.h"
    24 //</cmail>
    24 //</cmail>
    25 
    25 
    26 class CCalEntry;
    26 class CCalEntry;
    27 class CCalInstance;
    27 class CCalInstance;
    28 
    28 class MESMRCalDbMgr;
    29 /**
    29 /**
    30  * MESMRMeetingRequestEntry provides utility functions for handling MR Entry.
    30  * MESMRMeetingRequestEntry provides utility functions for handling MR Entry.
    31  *
    31  *
    32  * @lib esmrservices.lib
    32  * @lib esmrservices.lib
    33  */
    33  */
    37     /** 
    37     /** 
    38      * Enumeration for cal entry type
    38      * Enumeration for cal entry type
    39      */
    39      */
    40     enum TESMRCalEntryType
    40     enum TESMRCalEntryType
    41         {
    41         {
    42         EESMRCalEntryNotSupported = -1, // Entry type not supported
    42         EESMRCalEntryNotSupported = EESMREventTypeNone,
    43         EESMRCalEntryMeetingRequest,    // Meeting request entry
    43         EESMRCalEntryMeetingRequest = EESMREventTypeMeetingRequest,
    44         EESMRCalEntryMeeting,           // Meeting entry
    44         EESMRCalEntryMeeting = EESMREventTypeAppt,
    45         EESMRCalEntryTodo,              // TO-DO entry
    45         EESMRCalEntryTodo = EESMREventTypeETodo,
    46         EESMRCalEntryMemo,              // Memo entry
    46         EESMRCalEntryMemo = EESMREventTypeEEvent,
    47         EESMRCalEntryReminder,          // Reminder entry
    47         EESMRCalEntryReminder = EESMREventTypeEReminder,
    48         EESMRCalEntryAnniversary        // Anniversary entry
    48         EESMRCalEntryAnniversary = EESMREventTypeEAnniv
    49         };
    49         };
    50 
    50 
    51     /** 
    51     /** 
    52      * Enumeration for recurrence modifying rule
    52      * Enumeration for recurrence modifying rule
    53      */
    53      */
    76          * Alarm is relative to meeting start time
    76          * Alarm is relative to meeting start time
    77          */
    77          */
    78         EESMRAlarmRelative
    78         EESMRAlarmRelative
    79         };
    79         };
    80 
    80 
       
    81     /**
       
    82      * Enumeration for entry 
       
    83      */
       
    84     enum TMREntryCapability
       
    85         {
       
    86         // Entry supports attachments
       
    87         EMRCapabilityAttachments
       
    88         };
       
    89     
    81 public: // Destruction
    90 public: // Destruction
    82     /**
    91     /**
    83      * Virtual destructor.
    92      * Virtual destructor.
    84      */
    93      */
    85     virtual ~MESMRCalEntry() { }
    94     virtual ~MESMRCalEntry() { }
   163     virtual TESMRRecurrenceModifyingRule RecurrenceModRule() const = 0;
   172     virtual TESMRRecurrenceModifyingRule RecurrenceModRule() const = 0;
   164 
   173 
   165     /**
   174     /**
   166     * Sets modifying rule role to meeting request.
   175     * Sets modifying rule role to meeting request.
   167     * @param aRule Recurrence modification rule.
   176     * @param aRule Recurrence modification rule.
       
   177     * @param aRule ETrue event type is changing.
   168     */
   178     */
   169    virtual void SetModifyingRuleL(
   179    virtual void SetModifyingRuleL(TESMRRecurrenceModifyingRule aRule, 
   170            TESMRRecurrenceModifyingRule aRule ) = 0;
   180 		   const TBool aTypeChanging = EFalse ) = 0;
   171 
       
   172         /**
   181         /**
   173      * Sets the entry priority.
   182      * Sets the entry priority.
   174      * @param aPriority entry priority.
   183      * @param aPriority entry priority.
   175      */
   184      */
   176     virtual void SetPriorityL(
   185     virtual void SetPriorityL(
   202      * @return ETrue, if entry is stored to calendar DB.
   211      * @return ETrue, if entry is stored to calendar DB.
   203      */
   212      */
   204     virtual TBool IsStoredL() const = 0;
   213     virtual TBool IsStoredL() const = 0;
   205 
   214 
   206     /**
   215     /**
   207      * Tests if this entry has been sent to attendees.
       
   208      * @return ETrue, if entry is sent to attendees
       
   209      */
       
   210     virtual TBool IsSentL() const = 0;
       
   211 
       
   212     /**
       
   213      * Tests, whether entry is edited.
   216      * Tests, whether entry is edited.
   214      * @return ETrue, if entry is edited.
   217      * @return ETrue, if entry is edited.
   215      */
   218      */
   216     virtual TBool IsEntryEditedL() const = 0;
   219     virtual TBool IsEntryEditedL() const = 0;
       
   220     
       
   221     /**
       
   222      * Tests, if entry type has changed from the original
       
   223      * @return ETrue, if entry type has changed
       
   224      */
       
   225     virtual TBool IsEntryTypeChangedL() const = 0;
       
   226 
       
   227     /**
       
   228      * Sets the entry type changed
       
   229      * @param aTypeChanged, ETrue if type changed, otherwise EFalse
       
   230      */
       
   231     virtual void SetTypeChanged( TBool aTypeChanged ) = 0;
       
   232     
       
   233     /**
       
   234      * Checks if any instance (having same UID)
       
   235      * occurs between specified time. Time information
       
   236      * is considered to be device's local time.
       
   237      *
       
   238      * @param aStart Start time
       
   239      * @param aEnd End time
       
   240      */
       
   241     virtual TBool AnyInstancesBetweenTimePeriodL(
       
   242                 TTime& aStart,
       
   243                 TTime& aEnd ) = 0;
       
   244     
       
   245     /**
       
   246      * Fetches first instances start and end time. For non-recurrent
       
   247      * entries this returns the entry's start and end time.
       
   248      *
       
   249      * @param aStart On returns contains the first instance's start time.
       
   250      * @param aEnd On returns contains the first instance's end time.
       
   251      */
       
   252     virtual void GetFirstInstanceStartAndEndTimeL(
       
   253                 TTime& aStart,
       
   254                 TTime& aEnd ) = 0;
   217 
   255 
   218     /**
   256     /**
   219      * Fetches alarm information from entry.
   257      * Fetches alarm information from entry.
   220      * @param aAlarmType On return contains alarm type.
   258      * @param aAlarmType On return contains alarm type.
   221      * @param aAlarmTime On return contains time when alarm occurs.
   259      * @param aAlarmTime On return contains time when alarm occurs.
   227     /**
   265     /**
   228      * Fetches unmodified entry instance.
   266      * Fetches unmodified entry instance.
   229      * @return CCalEntry original entry
   267      * @return CCalEntry original entry
   230      */
   268      */
   231     virtual const CCalEntry& OriginalEntry() = 0;
   269     virtual const CCalEntry& OriginalEntry() = 0;
       
   270     
       
   271     /**
       
   272      * Updates the entry after storing
       
   273      */
       
   274     virtual void UpdateEntryAfterStoringL() = 0;    
       
   275     
       
   276     /**
       
   277      * Updates the comparative entry (needed in entry type changing)
       
   278      */
       
   279     virtual void UpdateComparativeEntry( CCalEntry* aNewComparativeEntry ) = 0;    
       
   280     
       
   281     /**
       
   282      * Sets default values to entry.
       
   283      */
       
   284     virtual void SetDefaultValuesToEntryL() = 0;    
       
   285     
       
   286     /**
       
   287      * Updates entry's timestamp (DTSTAMP) information.
       
   288      */
       
   289     virtual void UpdateTimeStampL() = 0;
       
   290     
       
   291     /**
       
   292      * Clones entry and leaves the clone into CleanupStack.
       
   293      * 
       
   294      * @param aType the entry type of the clone. If EESMRCalEntryNotSupported
       
   295      * the original type is preserved. 
       
   296      */
       
   297     virtual CCalEntry* CloneEntryLC(
       
   298             TESMRCalEntryType aType = EESMRCalEntryNotSupported ) const = 0;
       
   299     
       
   300     /**
       
   301      * Fetches validated entry. Ownership is transferred to caller.
       
   302      * @return Pointer to validated entry.
       
   303      */
       
   304     virtual CCalEntry* ValidateEntryL() = 0;
       
   305     
       
   306     /**
       
   307      * For recurrent event method removes this from the series.
       
   308      * Entry needs to be recurrent event and modification rule
       
   309      * needs to be MESMRCalEntry::EESMRThisOnly.
       
   310      * Ownership of the returned calendar entry is transferred to caller.
       
   311      *
       
   312      * @return Parent entry
       
   313      */
       
   314     virtual CCalEntry* RemoveInstanceFromSeriesL() = 0;
       
   315     
       
   316     /**
       
   317      * Get calendar dbmgr
       
   318      * 
       
   319      * @return calendar dbmgr
       
   320      */
       
   321     virtual MESMRCalDbMgr& GetDBMgr() = 0; 
       
   322     
       
   323     /**
       
   324      * Tests whether entry supports capability or not.
       
   325      * @param aCapability Capability to be checked
       
   326      * @return ETrue if capability is supported.
       
   327      */
       
   328     virtual TBool SupportsCapabilityL( 
       
   329             TMREntryCapability aCapability ) const = 0;
       
   330     
       
   331     /**
       
   332      * Tests whether entry contains remote attachments or not.
       
   333      * @return ETrue if entry contains remote attachments
       
   334      */
       
   335     virtual TBool ContainsRemoteAttachmentsL() = 0;
   232     };
   336     };
   233 
   337 
   234 
       
   235 #endif // MESMRCALENTRY_H
   338 #endif // MESMRCALENTRY_H
   236 
   339 
   237 // EOF
   340 // EOF