calendarui/views/inc/calentodocontroller.h
branchRCL_3
changeset 66 bd7edf625bdd
parent 0 f979ecb2b13e
equal deleted inserted replaced
65:12af337248b1 66:bd7edf625bdd
       
     1 /*
       
     2 * Copyright (c) 2002 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:   To-Do view's utility class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef TODOCONTROL_H
       
    21 #define TODOCONTROL_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CCalInstance;
       
    28 class CCalEntry;
       
    29 class TCalenInstanceId;
       
    30 class CCalenServices;
       
    31 class MCalenServices;
       
    32 
       
    33 // CLASS DECLARATION
       
    34 /**
       
    35  *
       
    36  */
       
    37 NONSHARABLE_CLASS( CCalenTodoController ) : public CBase
       
    38     {
       
    39     public:
       
    40         enum TTodoSortOrder
       
    41             {
       
    42             ESortTodosManually,
       
    43             ESortTodosByDate,
       
    44             ESortTodosByPriority,
       
    45             };
       
    46 
       
    47     public:  // Constructors and destructor
       
    48         /**
       
    49          * C++ default constructor.
       
    50          **/
       
    51         CCalenTodoController( MCalenServices& aServices );
       
    52 
       
    53         /**
       
    54          * Symbian OS default constructor.
       
    55          **/
       
    56         void ConstructL();
       
    57 
       
    58         /**
       
    59          * Destructor.
       
    60          **/
       
    61         ~CCalenTodoController();
       
    62 
       
    63     public: // New functions
       
    64         /**
       
    65          * Refresh agenda name list.
       
    66          **/
       
    67         void RefreshL();
       
    68 
       
    69         /**
       
    70          * Return ToDo instance list pointer.
       
    71          * @return CAgnTodoInstanceList pointer
       
    72          **/
       
    73         RPointerArray<CCalInstance>& InstanceList();
       
    74 
       
    75         /**
       
    76          * Index is setted to ZERO and fetch data.
       
    77          **/
       
    78         void SetToStartL();
       
    79 
       
    80         /**
       
    81          * Index is incremented and fetch data.
       
    82          **/
       
    83         void SetToNextL();
       
    84 
       
    85         /**
       
    86          * Check terminus of index.
       
    87          * @return ETrue : Terminus
       
    88          **/
       
    89         TBool IsAtEnd() const;
       
    90 
       
    91         /**
       
    92          * Return instance id of current index.
       
    93          * @return Intance id
       
    94          **/
       
    95         CCalInstance* Instance() const;
       
    96 
       
    97         /**
       
    98          * Return instance id of the index.
       
    99          * @return Intance id
       
   100          **/
       
   101         CCalInstance* InstanceL(TInt aIndex) const;
       
   102 
       
   103         /**
       
   104          * Delete an entry of the index.
       
   105          * @param aIndex Index of list
       
   106          **/
       
   107 
       
   108         /**
       
   109          * Delete an entry of the instance id.
       
   110          * @param aInstanceId Index of list
       
   111          **/
       
   112 
       
   113         /**
       
   114          * Check status of cross out.
       
   115          * @param aIndex Index of list
       
   116          */
       
   117         TBool IsCrossOutL(TInt aIndex);
       
   118 
       
   119         /**
       
   120          * Return number of item.
       
   121          * @return Number of item
       
   122          **/
       
   123         TInt Count() const;
       
   124 
       
   125         TInt FindInstanceIndexL(const TCalenInstanceId& aId) const;
       
   126         
       
   127         void CleanupInstances();
       
   128         
       
   129     public:
       
   130         
       
   131         RArray<TInt>                iActiveListIndices;
       
   132 
       
   133     private: // Data members
       
   134         MCalenServices&             iServices;
       
   135         RPointerArray<CCalInstance> iList;
       
   136         TInt                        iIndex;
       
   137         TInt                        iSaveIndex;
       
   138 
       
   139     };
       
   140 
       
   141 #endif // TODOCONTROL_H
       
   142 
       
   143 
       
   144 // End of File