diff -r 9b2cffad4b5e -r 6646c35e558c htiui/HtiServicePlugins/HtiPIMServicePlugin/inc/PIMHandler.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/htiui/HtiServicePlugins/HtiPIMServicePlugin/inc/PIMHandler.h Wed Oct 13 14:32:52 2010 +0300 @@ -0,0 +1,91 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Functional implentation of PIM service. +* +*/ + + +#ifndef CPIMHANDLER_H +#define CPIMHANDLER_H + +// INCLUDES +#include +#include +#include +#include + +// CONSTANTS + +// FORWARD DECLARATIONS +class CCalSession; + +// CLASS DECLARATION + +/** +* Functional implentation of PIM service. +*/ +class CPIMHandler : public CBase, + public MCalProgressCallBack + { + public: + + static CPIMHandler* NewL(); + + // Interface implementation + void ProcessMessageL( const TDesC8& aMessage, + THtiMessagePriority aPriority ); + + TBool IsBusy(); + + virtual ~CPIMHandler(); + + void SetDispatcher( MHtiDispatcher* aDispatcher ); + + + // From MCalProgressCallBack + + void Progress( TInt aPercentageCompleted ); + void Completed( TInt aError ); + TBool NotifyProgress(); + + private: + + CPIMHandler(); + void ConstructL(); + + private: // helpers + + void HandleVCardImportFuncL( const TDesC8& aData ); + void HandleVCalendarImportFuncL( const TDesC8& aData ); + void HandleContactDeleteFuncL( const TDesC8& aData ); + void HandleCalendarDeleteFuncL( const TDesC8& aData ); + void HandleOpenCalendarFileL( const TDesC8& aData ); + void HandleListCalendarFilesL(); + void HandleNotepadAddMemoFuncL( const TDesC8& aData ); + void HandleNotepadAddMemoFromFileFuncL( const TDesC8& aData ); + void HandleNotepadDeleteAllFuncL(); + + void SendOkMsgL( const TDesC8& aData ); + void SendNotepadOkMsgL( CHtiPIMServicePlugin::TCommand aCommand ); + void SendErrorMessageL( TInt aError, const TDesC8& aDescription ); + + private: // data + TBool iIsBusy; + MHtiDispatcher* iDispatcher; // referenced + CActiveSchedulerWait* iWaiter; + TInt iEntryViewErr; + CCalSession* iCalSession; + }; + +#endif // CPIMHANDLER_H