2 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * This class contains utility methods related to usage of
16 * Calendar Interim API.
22 #ifndef __CALENINTERIMUTILS2_H__
23 #define __CALENINTERIMUTILS2_H__
27 #include <calcommon.h>
29 // FORWARD DECLARATIONS
32 class CCalenInterimUtils2Impl;
37 * This class contains utility methods related to usage of
38 * Calendar Interim API
40 NONSHARABLE_CLASS(CCalenInterimUtils2) : public CBase
42 public: // Construction/destruction
44 * Create a new instance of CalenInterimUtils2
46 IMPORT_C static CCalenInterimUtils2* NewL();
51 IMPORT_C ~CCalenInterimUtils2();
53 public: // New functions
55 * Allocates and returns a new global UID.
56 * @return UID, ownership is transferred to caller
58 IMPORT_C HBufC8* GlobalUidL();
61 * Populates empty fields of a child entry with data from
63 * @param aChild child (modifying) entry to be populated
64 * @param aParent parent (originating) entry
66 IMPORT_C static void PopulateChildFromParentL( CCalEntry& aChild,
67 const CCalEntry& aParent );
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
74 IMPORT_C TBool MRViewersEnabledL(TBool aForceCheck = EFalse);
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
87 IMPORT_C static void StoreL( CCalEntryView& aEntryView,
89 TBool aCopyToChildren = EFalse );
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
96 IMPORT_C static TBool IsMeetingRequestL( CCalEntry& aEntry );
98 private: // Construction/destruction
100 CCalenInterimUtils2();
102 private: // Member data
103 CCalenInterimUtils2Impl* iImpl;
106 #endif // __CALENINTERIMUTILS2_H__