epoc32/include/calsession.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
     1.1 --- a/epoc32/include/calsession.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/calsession.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,106 @@
     1.4 -calsession.h
     1.5 +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +// All rights reserved.
     1.7 +// This component and the accompanying materials are made available
     1.8 +// 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.9 +// which accompanies this distribution, and is available
    1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.11 +//
    1.12 +// Initial Contributors:
    1.13 +// Nokia Corporation - initial contribution.
    1.14 +//
    1.15 +// Contributors:
    1.16 +//
    1.17 +// Description:
    1.18 +//
    1.19 +
    1.20 +#ifndef __CALSESSION_H__
    1.21 +#define __CALSESSION_H__
    1.22 +
    1.23 +#include <badesca.h>
    1.24 +
    1.25 +#include <calchangecallback.h>
    1.26 +#include <calnotification.h>
    1.27 +
    1.28 +class CCalSessionImpl;
    1.29 +class MCalChangeCallBack2;
    1.30 +
    1.31 +/** A handle to the calendar file.
    1.32 +
    1.33 +When the client instantiates a CCalSession, it will connect to the calendar server. 
    1.34 +In turn, the client can use its APIs, for instance to create or open a calendar file.
    1.35 +
    1.36 +The agenda data in the file can be accessed as entries. To access the entries, clients should
    1.37 +use class CCalEntryView or CCalInstanceView to process the entry data. However, both view classes 
    1.38 +require the handle to the file which is represented by this class.
    1.39 +
    1.40 +A calendar file can be opened on any writable drive. Note that if the file is opened 
    1.41 +on a removable media and that media is removed, operations will leave with KErrNotReady.
    1.42 +This error can also happen when trying to access file attachments on removed media.
    1.43 +When this error occurs, the user should close the CCalSession and re-open it once the media 
    1.44 +has been replaced. 
    1.45 +It is recommended that when using a calendar file on removable media, the user should watch for when 
    1.46 +the media is removed / replaced using the RFs::NotifyChange API.
    1.47 +
    1.48 +The session object must not be destroyed until all the objects which where created by referencing it 
    1.49 +have been destroyed.
    1.50 +
    1.51 +@publishedAll
    1.52 +@released
    1.53 +*/
    1.54 +NONSHARABLE_CLASS(CCalSession) : public CBase
    1.55 +    {
    1.56 +public:
    1.57 +	IMPORT_C static CCalSession* NewL();
    1.58 +	IMPORT_C ~CCalSession();
    1.59 +
    1.60 +	IMPORT_C void CreateCalFileL(const TDesC&  aFileName) const;
    1.61 +	IMPORT_C void OpenL(const TDesC& aFileName) const;
    1.62 +	IMPORT_C void OpenL(const TDesC& aFileName, CalCommon::TCalFileVersionSupport& aFileSupportStatus) const;
    1.63 +	IMPORT_C const TDesC& DefaultFileNameL() const; 
    1.64 +	IMPORT_C void DeleteCalFileL(const TDesC& aFileName) const;
    1.65 +	IMPORT_C CDesCArray* ListCalFilesL() const;
    1.66 +
    1.67 +	IMPORT_C void StartChangeNotification(MCalChangeCallBack2& aCallBack, const CCalChangeNotificationFilter& aFilter);
    1.68 +	IMPORT_C void StopChangeNotification();
    1.69 +	IMPORT_C void DisableChangeBroadcast();
    1.70 +	IMPORT_C void EnableChangeBroadcast();
    1.71 +	
    1.72 +	IMPORT_C void EnablePubSubNotificationsL();
    1.73 +	IMPORT_C void DisablePubSubNotificationsL();
    1.74 +	
    1.75 +	IMPORT_C void FileIdL(TCalFileId& aCalFileId) const;
    1.76 +	IMPORT_C void GetFileNameL(TCalPubSubData aPubSubData, TDes& aFileName) const;
    1.77 +	IMPORT_C TBool IsFileNameL(TCalPubSubData aPubSubData, const TDesC& aFileName) const;
    1.78 +	IMPORT_C TBool IsOpenedFileL(TCalPubSubData aPubSubData) const;
    1.79 +
    1.80 +	// debug only
    1.81 +/**
    1.82 +@publishedPartner
    1.83 +@released
    1.84 +*/
    1.85 +	IMPORT_C void _DebugSetHeapFailL(RAllocator::TAllocFail aFail, TInt aRate);
    1.86 +
    1.87 +/**
    1.88 +@publishedPartner
    1.89 +@released
    1.90 +*/
    1.91 +	IMPORT_C TInt _DebugRequestAllocatedCellsL();
    1.92 +
    1.93 +	// deprecated
    1.94 +	IMPORT_C void StartChangeNotification(MCalChangeCallBack* aCallBack, MCalChangeCallBack::TChangeEntryType aChangeEntryType,	TBool aIncludeUndatedTodos,	TTime aFilterStartTime,	TTime aFilterEndTime);
    1.95 +	
    1.96 +	IMPORT_C void __dbgClearTzClientCacheL(TBool aRestartCaching);
    1.97 +
    1.98 +	IMPORT_C TInt _DebugRequestAllocatedHeapSizeL();
    1.99 +	
   1.100 +public:
   1.101 +	CCalSessionImpl& Impl() const;
   1.102 +	  
   1.103 +private:
   1.104 +	CCalSession();
   1.105 +	void ConstructL();
   1.106 +private:
   1.107 +	CCalSessionImpl* iImpl;
   1.108 +	};
   1.109 +	
   1.110 +#endif // __CALSESSION_H__