williamr@2: /* williamr@2: * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). williamr@2: * All rights reserved. williamr@2: * This component and the accompanying materials are made available williamr@2: * 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 williamr@2: * which accompanies this distribution, and is available williamr@2: * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: * williamr@2: * Initial Contributors: williamr@2: * Nokia Corporation - initial contribution. williamr@2: * williamr@2: * Contributors: williamr@2: * williamr@2: * Description: williamr@2: * This class contains utility methods related to usage of williamr@2: * Calendar Interim API. williamr@2: * williamr@2: */ williamr@2: williamr@2: williamr@2: williamr@2: #ifndef __CALENINTERIMUTILS2_H__ williamr@2: #define __CALENINTERIMUTILS2_H__ williamr@2: williamr@2: // INCLUDES williamr@2: #include williamr@2: #include williamr@2: williamr@2: // FORWARD DECLARATIONS williamr@2: class CCalEntry; williamr@2: class CCalEntryView; williamr@2: class CCalenInterimUtils2Impl; williamr@2: williamr@2: // CLASS DECLARATION williamr@2: williamr@2: /** williamr@2: * This class contains utility methods related to usage of williamr@2: * Calendar Interim API williamr@2: */ williamr@2: NONSHARABLE_CLASS(CCalenInterimUtils2) : public CBase williamr@2: { williamr@2: public: // Construction/destruction williamr@2: /** williamr@2: * Create a new instance of CalenInterimUtils2 williamr@2: */ williamr@2: IMPORT_C static CCalenInterimUtils2* NewL(); williamr@2: williamr@2: /** williamr@2: * Destructor williamr@2: */ williamr@2: IMPORT_C ~CCalenInterimUtils2(); williamr@2: williamr@2: public: // New functions williamr@2: /** williamr@2: * Allocates and returns a new global UID. williamr@2: * @return UID, ownership is transferred to caller williamr@2: */ williamr@2: IMPORT_C HBufC8* GlobalUidL(); williamr@2: williamr@2: /** williamr@2: * Populates empty fields of a child entry with data from williamr@2: * the parent entry. williamr@2: * @param aChild child (modifying) entry to be populated williamr@2: * @param aParent parent (originating) entry williamr@2: */ williamr@2: IMPORT_C static void PopulateChildFromParentL( CCalEntry& aChild, williamr@2: const CCalEntry& aParent ); williamr@2: williamr@2: /** williamr@2: * Checks to see if Meeting Request Viewer functionality williamr@2: * is enabled and is available to use williamr@2: * @return current state of MR Viewers implementation williamr@2: */ williamr@2: IMPORT_C TBool MRViewersEnabledL(TBool aForceCheck = EFalse); williamr@2: williamr@2: /** williamr@2: * This function is a wrapper around CCalEntryView::StoreL() and CCalEntryView::UpdateL(). williamr@2: * The function makes the appropriate call to either of those functions, depending on several williamr@2: * factors, such as whether the entry is a child or parent, and whether it has exceptions or not. williamr@2: * If aCopyToChildren is set to ETrue, extra logic is applied as follows: williamr@2: * For each exception, for each field, if the field is NOT the reason for the williamr@2: * entry being an exception, copy the new parent's field across to the exception. williamr@2: * @param aEntryView view of the entries williamr@2: * @param aEntry entry to be stored williamr@2: * @param aCopyToChildren whether the extra logic regarding exception data should be run williamr@2: */ williamr@2: IMPORT_C static void StoreL( CCalEntryView& aEntryView, williamr@2: CCalEntry& aEntry, williamr@2: TBool aCopyToChildren = EFalse ); williamr@2: williamr@2: /** williamr@2: * Checks to see if the given entry has properties consistent with a meeting request. williamr@2: * @param aEntry Entry to test williamr@2: * @return ETrue if the entry is a meeting request, EFalse otherwise williamr@2: */ williamr@2: IMPORT_C static TBool IsMeetingRequestL( CCalEntry& aEntry ); williamr@2: williamr@2: private: // Construction/destruction williamr@2: void ConstructL(); williamr@2: CCalenInterimUtils2(); williamr@2: williamr@2: private: // Member data williamr@2: CCalenInterimUtils2Impl* iImpl; williamr@2: }; williamr@2: williamr@2: #endif // __CALENINTERIMUTILS2_H__ williamr@2: williamr@2: // End of File