javaextensions/pim/common/inc.s60/mpimtodoitem.h
branchRCL_3
changeset 14 04becd199f91
equal deleted inserted replaced
13:f5050f1da672 14: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:  ToDo item access interface.
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MPIMTODOITEM_H
       
    20 #define MPIMTODOITEM_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include "pimcommon.h"
       
    24 
       
    25 //  FORWARD DECLARATIONS
       
    26 class MPIMItemData;
       
    27 
       
    28 /**
       
    29  *  Interface for accessing to-do-specific parts of an item.
       
    30  *  See \ref MPIMItemData class.
       
    31  */
       
    32 class MPIMToDoItem
       
    33 {
       
    34 public:
       
    35     // Destructor
       
    36 
       
    37     /**
       
    38      * Destructor.
       
    39      */
       
    40     virtual ~MPIMToDoItem()
       
    41     {
       
    42     }
       
    43     ;
       
    44 
       
    45 public:
       
    46     // New functions
       
    47 
       
    48     //@{
       
    49     /**
       
    50      * Provides access to the \ref MPIMItemData representation of this
       
    51      * MPIMToDoItem 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      * Sets todo item id. This functions was introduces because
       
    62      * todo item ids are handled as strings
       
    63      *
       
    64      * @param aToDoItemId New event item id. If one exists, it will
       
    65      *        be overwriten
       
    66      */
       
    67     virtual void SetToDoItemIdL(const TPIMItemID& aToDoItemId) = 0;
       
    68 
       
    69     /**
       
    70      * Returns the item id of this event item. This function was
       
    71      * introduced because event todo ids are handled as strings
       
    72      *
       
    73      * @return Event item id
       
    74      */
       
    75     virtual const TPIMItemID ToDoItemId() const = 0;
       
    76 
       
    77     /**
       
    78      * Sets the last modified date/time of the item
       
    79      * @param aLastModified Last modification date of this item
       
    80      */
       
    81     virtual void SetLastModifiedL(TPIMDate aLastModified) = 0;
       
    82 
       
    83     /**
       
    84      * Resets the item's internal state and remove all data
       
    85      * associated with this item. The item is ready for use
       
    86      * after reset
       
    87      */
       
    88     virtual void PrepareForLoadL() = 0;
       
    89 
       
    90 protected:
       
    91     // Non-public operations
       
    92 
       
    93     // Allow derivation with protected default constructor.
       
    94     MPIMToDoItem()
       
    95     {
       
    96     }
       
    97 
       
    98 private:
       
    99     // Prohibited operations
       
   100     // Prohibit copy constructor.
       
   101     MPIMToDoItem(const MPIMToDoItem&)
       
   102     {
       
   103     }
       
   104 
       
   105     // Prohibit assigment operator.
       
   106     MPIMToDoItem& operator=(const MPIMToDoItem&)
       
   107     {
       
   108         return *this;
       
   109     }
       
   110 
       
   111 };
       
   112 
       
   113 #endif // MPIMTODOITEM_H
       
   114 // End of File