calendarui/organizerplugin/aiagendaplugin2/inc/aicalendarplugin2data.h
changeset 0 f979ecb2b13e
child 5 42814f902fe6
equal deleted inserted replaced
-1:000000000000 0:f979ecb2b13e
       
     1 /*
       
     2 * Copyright (c) 2005-2006 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:  
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_AICALENDARPLUGIN2DATA_H
       
    20 #define C_AICALENDARPLUGIN2DATA_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <aipropertyextension.h>
       
    25 #include <aicontentobserver.h>
       
    26 #include "aicalendarplugin2eventitem.h"
       
    27 
       
    28 
       
    29 /**
       
    30  *  Calendar plugin 2 event data container.
       
    31  *
       
    32  *  @lib aicalendarplugin2
       
    33  *  @since S60 3.2
       
    34  */
       
    35 NONSHARABLE_CLASS( CAICalendarPlugin2Data ) : public CBase
       
    36 {
       
    37     public:
       
    38 
       
    39     // Construction
       
    40 
       
    41         static CAICalendarPlugin2Data* NewL();
       
    42 
       
    43         virtual ~CAICalendarPlugin2Data();
       
    44         
       
    45     // New methods
       
    46 
       
    47         void ClearDataArrays();
       
    48 
       
    49         RPointerArray<CAiCalendarPlugin2EventItem>& Upcoming2HrsArray();
       
    50 
       
    51         RPointerArray<CAiCalendarPlugin2EventItem>& UpcomingArray();
       
    52 
       
    53         RPointerArray<CAiCalendarPlugin2EventItem>& Ongoing30MinArray();
       
    54 
       
    55         RPointerArray<CAiCalendarPlugin2EventItem>& OngoingArray();
       
    56 
       
    57         RPointerArray<CAiCalendarPlugin2EventItem>& LongOngoingArray();
       
    58 
       
    59         RPointerArray<CAiCalendarPlugin2EventItem>& NonTimedEventArray();
       
    60         
       
    61         RPointerArray<CAiCalendarPlugin2EventItem>& TomorrowEventArray();
       
    62         
       
    63         RPointerArray<CAiCalendarPlugin2EventItem>& NotTodayItemArray();
       
    64 
       
    65         RPointerArray<CAiCalendarPlugin2EventItem>& FutureItemArray();
       
    66         
       
    67         TInt AppendItemToCorrectArray( CAiCalendarPlugin2EventItem& aItem,
       
    68                                         TInt& aDayNoteIndex );
       
    69                                         
       
    70         TInt TotalTimedTodaySpaceReservation();
       
    71 
       
    72         TInt TotalTodayItemCount();
       
    73 
       
    74         TInt TotalTimedTodayItemCount();
       
    75 
       
    76         RPointerArray<MAiContentObserver>& ObserverArray();
       
    77         
       
    78         void AppendObserverL( MAiContentObserver& aObserver );
       
    79 
       
    80         RArray<TAiCalendarFocusData>& FocusDataArray();
       
    81 
       
    82         void SetSpaceTakenByTimedEvent( TInt aSpace ){iSpaceTakenByTimedEvent = aSpace;};
       
    83         
       
    84         void SetSpaceTakenByNonTimedEvent( TInt aSpace ){iSpaceTakenByNonTimedEvent = aSpace;};
       
    85         
       
    86         TInt SpaceTakenByTimedEvent(){return iSpaceTakenByTimedEvent;};
       
    87         
       
    88         TInt SpaceTakenByNonTimedEvent(){return iSpaceTakenByNonTimedEvent;};
       
    89         
       
    90         void LaunchCalendarApplication( TInt aIndex, TBool aLaunchFirstValid );
       
    91         
       
    92         TBool HadExpiredEvents();
       
    93 
       
    94         void SetHadExpiredEvents( TBool aHadExpired );
       
    95         
       
    96         void SortArrayByTime( RPointerArray<CAiCalendarPlugin2EventItem>& aArray );
       
    97         
       
    98     private:
       
    99 
       
   100     // Construction
       
   101 
       
   102         CAICalendarPlugin2Data();
       
   103 
       
   104         void ConstructL();
       
   105         
       
   106     private:  // Data members
       
   107 
       
   108         /**
       
   109          * Item data array for normal upcoming timed today items (meeting/appointment).
       
   110          * Starting within 2 hrs.
       
   111          * Own.
       
   112          */
       
   113         RPointerArray<CAiCalendarPlugin2EventItem> iUpcoming2HrsItemData;
       
   114 
       
   115         /**
       
   116          * Item data array for normal upcoming timed today items (meeting/appointment).
       
   117          * Own.
       
   118          */
       
   119         RPointerArray<CAiCalendarPlugin2EventItem> iUpcomingItemData;
       
   120 
       
   121         /**
       
   122          * Item data array for normal ongoing timed today items (meeting/appointment)
       
   123          * that have started within 30 mins.
       
   124          * Own.
       
   125          */
       
   126         RPointerArray<CAiCalendarPlugin2EventItem> iOngoing30MinItemData;
       
   127 
       
   128         /**
       
   129          * Item data array for normal ongoing timed today items (meeting/appointment).
       
   130          * Own.
       
   131          */
       
   132         RPointerArray<CAiCalendarPlugin2EventItem> iOngoingItemData;
       
   133 
       
   134         /**
       
   135          * Item data array for non timed today items (Anniversary/ToDo/Day note).
       
   136          * Own.
       
   137          */
       
   138         RPointerArray<CAiCalendarPlugin2EventItem> iNonTimedItemData;
       
   139 
       
   140         /**
       
   141          * Item data array for all tomorrow items (meeting/appointment/Anniversary/ToDo/Day Note, not today).
       
   142          * Own.
       
   143          */
       
   144         RPointerArray<CAiCalendarPlugin2EventItem> iTomorrowItemData;
       
   145 
       
   146         /**
       
   147          * Item data array for all not today items that are within the specified day range
       
   148          * EPluginDaysToHandleAsNotToday. (meeting/appointment/Anniversary/ToDo/Day Note, not today).
       
   149          * Own.
       
   150          */
       
   151         RPointerArray<CAiCalendarPlugin2EventItem> iNotTodayItemData;
       
   152 
       
   153         /**
       
   154          * Item data array for all not today items that have begun before to day, and are still ongoing.
       
   155          * EPluginDaysToHandleAsNotToday. (meeting/appointment/Anniversary/ToDo/Day Note, not today).
       
   156          * Own.
       
   157          */
       
   158         RPointerArray<CAiCalendarPlugin2EventItem> iLongOngoingItemData;
       
   159 
       
   160         /**
       
   161          * Item data array for all rest not today items (meeting/appointment/Anniversary/ToDo/Day Note, not today).
       
   162          * Own.
       
   163          */
       
   164         RPointerArray<CAiCalendarPlugin2EventItem> iFutureItemData;
       
   165 
       
   166         /**
       
   167          * Publishing observers.
       
   168          * Own.
       
   169          */
       
   170         RPointerArray<MAiContentObserver>   iObservers;
       
   171 
       
   172         /**
       
   173          * Data array for event focusing data in calendar app.
       
   174          */
       
   175         RArray<TAiCalendarFocusData>        iEventFocusData;
       
   176         
       
   177         /**
       
   178          * Number of space (lines or othervise) one timed event line reserves.
       
   179          * Depends on the layout of the theme.
       
   180          */
       
   181         TInt                                iSpaceTakenByTimedEvent;
       
   182 
       
   183         /**
       
   184          * Number of space (lines or othervise) one non timed event line reserves.
       
   185          * Depends on the layout of the theme.
       
   186          */
       
   187         TInt                                iSpaceTakenByNonTimedEvent;
       
   188         
       
   189         /**
       
   190          * Had expired events?
       
   191          */
       
   192         TBool                               iHadExpiredEvents;
       
   193 
       
   194 };
       
   195 
       
   196 #endif  // C_AICALENDARPLUGIN2DATA_H
       
   197 
       
   198 
       
   199 // End of File