1.1 --- a/epoc32/include/caldataexchange.h Tue Mar 16 16:12:26 2010 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,89 +0,0 @@
1.4 -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 -// All rights reserved.
1.6 -// This component and the accompanying materials are made available
1.7 -// 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
1.8 -// which accompanies this distribution, and is available
1.9 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.10 -//
1.11 -// Initial Contributors:
1.12 -// Nokia Corporation - initial contribution.
1.13 -//
1.14 -// Contributors:
1.15 -//
1.16 -// Description:
1.17 -//
1.18 -
1.19 -#ifndef __CCALDATAEXCHANGE_H__
1.20 -#define __CCALDATAEXCHANGE_H__
1.21 -
1.22 -#include <calentry.h>
1.23 -
1.24 -class CCalDataExchangeImpl;
1.25 -class CCalSession;
1.26 -class RWriteStream;
1.27 -
1.28 -/** The default number of entries to import or export between callbacks.
1.29 -@publishedAll
1.30 -@released
1.31 -*/
1.32 -const TInt KDefaultNumberOfEntriesToHandle = 10;
1.33 -
1.34 -/** A call back class to show the progress of long-running operations.
1.35 -
1.36 -When a long-running operation is carried out, this class is used to signal its progress,
1.37 -and when the function is complete.
1.38 -
1.39 -@publishedAll
1.40 -@released
1.41 -*/
1.42 -class MCalDataExchangeCallBack
1.43 - {
1.44 -public:
1.45 - /** Progress callback.
1.46 -
1.47 - This calls the observing class with the percentage complete of the current operation.
1.48 - This also propagates any error to the observing class.
1.49 -
1.50 - @param aPercentageCompleted The percentage complete. */
1.51 - virtual void Progress(TInt aPercentageCompleted) = 0;
1.52 -
1.53 - /** Progress callback.
1.54 -
1.55 - This calls the observing class when the current operation is finished. */
1.56 - virtual void Completed() = 0;
1.57 -
1.58 - /* Retrieve the number of entries to handle at once.
1.59 - @return The number of entries to handle at once.
1.60 - */
1.61 - virtual TInt NumberOfEntriesToHandleAtOnce() { return KDefaultNumberOfEntriesToHandle; };
1.62 - };
1.63 -
1.64 -/**
1.65 -This class provides functionality for importing and exporting vCal entries.
1.66 -@publishedAll
1.67 -@released
1.68 -*/
1.69 -NONSHARABLE_CLASS(CCalDataExchange) : public CBase
1.70 - {
1.71 -public:
1.72 - IMPORT_C static CCalDataExchange* NewL(CCalSession& aSession);
1.73 - IMPORT_C ~CCalDataExchange();
1.74 -
1.75 - IMPORT_C void ImportL(TUid aDataFormat, RReadStream& aReadStream, RPointerArray<CCalEntry>& aCalEntryArray);
1.76 - IMPORT_C void ImportL(TUid aDataFormat, RReadStream& aReadStream, RPointerArray<CCalEntry>& aCalEntryArray, TInt aFlags);
1.77 - IMPORT_C void ExportL(TUid aDataFormat, RWriteStream& aWriteStream, RPointerArray<CCalEntry>& aCalEntryArray);
1.78 -
1.79 - IMPORT_C void ImportL(TUid aDataFormat, RReadStream& aReadStream, RPointerArray<CCalEntry>& aCalEntryArray, TInt aFlags, TInt aNumEntries);
1.80 -
1.81 - IMPORT_C void ImportAsyncL(TUid aDataFormat, RReadStream& aReadStream, RPointerArray<CCalEntry>& aCalEntryArray, MCalDataExchangeCallBack& aObserver, TInt aFlags);
1.82 - IMPORT_C void ExportAsyncL(TUid aDataFormat, RWriteStream& aWriteStream, RPointerArray<CCalEntry>& aCalEntryArray, MCalDataExchangeCallBack& aObserver);
1.83 -
1.84 -private:
1.85 - CCalDataExchange();
1.86 - void ConstructL(CCalSession& aSession);
1.87 -
1.88 -private:
1.89 - CCalDataExchangeImpl* iImpl;
1.90 - };
1.91 -
1.92 -#endif // __CCALDATAEXCHANGE_H__