javaextensions/pim/common/inc.s60/mpimeventitem.h
branchRCL_3
changeset 19 04becd199f91
equal deleted inserted replaced
16:f5050f1da672 19:04becd199f91
       
     1 /*
       
     2 * Copyright (c) 2008 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:  Event item access interface.
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MPIMEVENTITEM_H
       
    20 #define MPIMEVENTITEM_H
       
    21 
       
    22 // INTERNAL INCLUDES
       
    23 #include "pimtypes.h"
       
    24 
       
    25 // EXTERNAL INCLUDES
       
    26 #include <e32def.h>
       
    27 
       
    28 //  FORWARD DECLARATIONS
       
    29 class MPIMItemData;
       
    30 class MPIMRepeatRuleData;
       
    31 
       
    32 /**
       
    33  *  Interface for accessing event-specific parts of an item.
       
    34  *  See \ref MPIMItemData class.
       
    35  */
       
    36 NONSHARABLE_CLASS(MPIMEventItem)
       
    37 {
       
    38 public: // Destructor
       
    39 
       
    40     /**
       
    41      * Destructor.
       
    42      */
       
    43     virtual ~MPIMEventItem()
       
    44     {};
       
    45 
       
    46 public: // New functions
       
    47 
       
    48     //@{
       
    49     /**
       
    50      * Provides access to the \ref MPIMItemData representation of this
       
    51      * MPIMEventItem object.
       
    52      * There are const and non-const versions of this method.
       
    53      *
       
    54      * @return The \ref MPIMItemData representation of the item.
       
    55      */
       
    56     virtual MPIMItemData& ItemData() = 0;
       
    57     virtual const MPIMItemData& ItemData() const = 0;
       
    58     //@}
       
    59 
       
    60     /**
       
    61      * Provides access to the \ref MPIMRepeatRuleData object of this
       
    62      * MPIMEventItem object. Ownership of the repeat rule object
       
    63      * is retained within this object.
       
    64      *
       
    65      * @return Associated repeat rule.
       
    66      */
       
    67     virtual MPIMRepeatRuleData* GetRepeat() = 0;
       
    68     virtual const MPIMRepeatRuleData* GetRepeat() const = 0;
       
    69 
       
    70     /**
       
    71      * Checks whether the item is repeating (applies its repeat rule).
       
    72      *
       
    73      * @return ETrue if the item is repeating, EFalse otherwise.
       
    74      */
       
    75     virtual TBool IsRepeating() const = 0;
       
    76 
       
    77     /**
       
    78      * Sets the item either repeating or non-repeating.
       
    79      *
       
    80      * @param aSetRepeating If ETrue, the associated repeat rule is
       
    81      *        taken in use. If EFalse, the associated repeat rule
       
    82      *        is ignored from this point on.
       
    83      */
       
    84     virtual void SetRepeating(TBool aSetRepeating) = 0;
       
    85 
       
    86     /**
       
    87      * Sets event item id. This functions was introduces because
       
    88      * event item ids are handled as strings
       
    89      *
       
    90      * @param aEventItemId New event item id. If one exists, it will
       
    91      *        be overwriten
       
    92      */
       
    93     virtual void SetEventItemIdL(const TPIMItemID& aEventItemId) = 0;
       
    94 
       
    95     /**
       
    96      * Returns the item id of this event item. This function was
       
    97      * introduced because event item ids are handled as strings
       
    98      *
       
    99      * @return Event item id
       
   100      */
       
   101     virtual const TPIMItemID EventItemId() const = 0;
       
   102 
       
   103     /**
       
   104      * Sets the last modified date/time of the item
       
   105      * @param aLastModified Last modification date of this item
       
   106      */
       
   107     virtual void SetLastModifiedL(TPIMDate aLastModified) = 0;
       
   108 
       
   109     /**
       
   110      * Resets the item's internal state and remove all data
       
   111      * associated with this item. The item is ready for use
       
   112      * after reset
       
   113      */
       
   114     virtual void PrepareForLoadL() = 0;
       
   115 
       
   116 protected: // Non-public operations
       
   117 
       
   118     // Allow derivation with protected default constructor.
       
   119     MPIMEventItem()
       
   120     {}
       
   121 
       
   122 private: // Prohibited operations
       
   123     // Prohibit copy constructor.
       
   124     MPIMEventItem(const MPIMEventItem&)
       
   125     {}
       
   126 
       
   127     // Prohibit assigment operator.
       
   128     MPIMEventItem& operator=(const MPIMEventItem&)
       
   129     {
       
   130         return *this;
       
   131     }
       
   132 
       
   133 }
       
   134 ;
       
   135 
       
   136 #endif // MPIMEVENTITEM_H
       
   137 // End of File