epoc32/include/app/caleninterimutils2.h
branchSymbian2
changeset 2 2fe1408b6811
parent 1 666f914201fb
child 4 837f303aceeb
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
     1 caleninterimutils2.h
     1 /*
       
     2 * Copyright (c) 2005 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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  
       
    15 *             This class contains utility methods related to usage of 
       
    16 *             Calendar Interim API.
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 
       
    22 #ifndef __CALENINTERIMUTILS2_H__
       
    23 #define __CALENINTERIMUTILS2_H__
       
    24 
       
    25 //  INCLUDES
       
    26 #include <e32base.h>
       
    27 #include <calcommon.h>
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 class CCalEntry;
       
    31 class CCalEntryView;
       
    32 class CCalenInterimUtils2Impl;
       
    33 
       
    34 // CLASS DECLARATION
       
    35 
       
    36 /**
       
    37 * This class contains utility methods related to usage of
       
    38 * Calendar Interim API
       
    39 */
       
    40 NONSHARABLE_CLASS(CCalenInterimUtils2) : public CBase
       
    41     {
       
    42     public: // Construction/destruction
       
    43         /**
       
    44          * Create a new instance of CalenInterimUtils2
       
    45          */
       
    46         IMPORT_C static CCalenInterimUtils2* NewL();
       
    47 
       
    48         /**
       
    49          * Destructor
       
    50          */
       
    51         IMPORT_C ~CCalenInterimUtils2();
       
    52 
       
    53     public: // New functions
       
    54         /**
       
    55          * Allocates and returns a new global UID.
       
    56          * @return UID, ownership is transferred to caller
       
    57          */
       
    58         IMPORT_C HBufC8* GlobalUidL();
       
    59 
       
    60         /**
       
    61          * Populates empty fields of a child entry with data from
       
    62          * the parent entry.
       
    63          * @param aChild child (modifying) entry to be populated
       
    64          * @param aParent parent (originating) entry
       
    65          */
       
    66         IMPORT_C static void PopulateChildFromParentL( CCalEntry& aChild,
       
    67                                                 const CCalEntry& aParent );
       
    68 
       
    69         /**
       
    70          * Checks to see if Meeting Request Viewer functionality
       
    71          * is enabled and is available to use
       
    72          * @return current state of MR Viewers implementation
       
    73          */
       
    74         IMPORT_C TBool MRViewersEnabledL(TBool aForceCheck = EFalse);
       
    75 
       
    76         /**
       
    77          * This function is a wrapper around CCalEntryView::StoreL() and CCalEntryView::UpdateL().
       
    78          * The function makes the appropriate call to either of those functions, depending on several
       
    79          * factors, such as whether the entry is a child or parent, and whether it has exceptions or not.
       
    80          * If aCopyToChildren is set to ETrue, extra logic is applied as follows:
       
    81          * For each exception, for each field, if the field is NOT the reason for the
       
    82          * entry being an exception, copy the new parent's field across to the exception.
       
    83          * @param aEntryView view of the entries
       
    84          * @param aEntry entry to be stored
       
    85          * @param aCopyToChildren whether the extra logic regarding exception data should be run
       
    86          */
       
    87         IMPORT_C static void StoreL( CCalEntryView& aEntryView,
       
    88                                      CCalEntry& aEntry,
       
    89                                      TBool aCopyToChildren = EFalse );
       
    90 
       
    91         /**
       
    92          * Checks to see if the given entry has properties consistent with a meeting request.
       
    93          * @param aEntry Entry to test
       
    94          * @return ETrue if the entry is a meeting request, EFalse otherwise
       
    95          */
       
    96         IMPORT_C static TBool IsMeetingRequestL( CCalEntry& aEntry );
       
    97 
       
    98     private: // Construction/destruction
       
    99         void ConstructL();
       
   100         CCalenInterimUtils2();
       
   101 
       
   102     private: // Member data
       
   103         CCalenInterimUtils2Impl* iImpl;
       
   104     };
       
   105 
       
   106 #endif // __CALENINTERIMUTILS2_H__
       
   107 
       
   108 // End of File