williamr@4: // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@4: // All rights reserved. williamr@4: // This component and the accompanying materials are made available williamr@4: // under the terms of "Eclipse Public License v1.0" williamr@4: // which accompanies this distribution, and is available williamr@4: // at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@4: // williamr@4: // Initial Contributors: williamr@4: // Nokia Corporation - initial contribution. williamr@4: // williamr@4: // Contributors: williamr@4: // williamr@4: // Description: williamr@4: // williamr@4: williamr@4: #ifndef __CALFILECHANGENOTIFICATION_H__ williamr@4: #define __CALFILECHANGENOTIFICATION_H__ williamr@4: williamr@4: class CAgnFileChangeInfo; williamr@4: class CCalFileChangeInfo; williamr@4: williamr@4: /** The mixin/interface class used for recieving calendar file change notifications. williamr@4: williamr@4: The call back returns an array containing information about at least williamr@4: one change to the calendar file. The information includes the file name and type of change. williamr@4: williamr@4: A client will not be notified of a change if it has register with the CCalSession. williamr@4: williamr@4: @publishedAll williamr@4: @prototype williamr@4: */ williamr@4: class MCalFileChangeObserver williamr@4: { williamr@4: public: williamr@4: williamr@4: /** An enum to describe the types of file changes that may occur */ williamr@4: enum TChangeType williamr@4: { williamr@4: /** A calendar file has been created */ williamr@4: ECalendarFileCreated, williamr@4: /** A calendar file has been deleted */ williamr@4: ECalendarFileDeleted, williamr@4: /** Calendar info has been set on a calendar file */ williamr@4: ECalendarInfoCreated, williamr@4: /** A calendar file had its calendar info updated */ williamr@4: ECalendarInfoUpdated, williamr@4: /** Calendar info has been deleted on a calendar file */ williamr@4: ECalendarInfoDeleted williamr@4: }; williamr@4: williamr@4: public: williamr@4: williamr@4: /** The callback that will recieve 1 or more file change notifications */ williamr@4: virtual void CalendarInfoChangeNotificationL(RPointerArray& aCalendarInfoChangeEntries) = 0; williamr@4: }; williamr@4: williamr@4: /** This class provides information about the calendar file change williamr@4: williamr@4: @publishedAll williamr@4: @prototype williamr@4: */ williamr@4: class CCalFileChangeInfo : public CBase williamr@4: { williamr@4: public: williamr@4: static CCalFileChangeInfo* NewL(CAgnFileChangeInfo* aAgnFileChangeInfo); williamr@4: ~CCalFileChangeInfo(); williamr@4: williamr@4: /** Get the file name of the file that has changed */ williamr@4: IMPORT_C const TDesC& FileNameL() const; williamr@4: williamr@4: /** Get the type of change that happened to the file */ williamr@4: IMPORT_C MCalFileChangeObserver::TChangeType ChangeType() const; williamr@4: williamr@4: private: williamr@4: CCalFileChangeInfo(CAgnFileChangeInfo* aAgnFileChangeInfo); williamr@4: williamr@4: private: williamr@4: CAgnFileChangeInfo* iImpl; williamr@4: }; williamr@4: #endif