|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Functional implentation of PIM service. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPIMHANDLER_H |
|
20 #define CPIMHANDLER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <s32mem.h> |
|
25 #include <HtiServicePluginInterface.h> |
|
26 #include <calprogresscallback.h> |
|
27 |
|
28 // CONSTANTS |
|
29 |
|
30 // FORWARD DECLARATIONS |
|
31 class CCalSession; |
|
32 |
|
33 // CLASS DECLARATION |
|
34 |
|
35 /** |
|
36 * Functional implentation of PIM service. |
|
37 */ |
|
38 class CPIMHandler : public CBase, |
|
39 public MCalProgressCallBack |
|
40 { |
|
41 public: |
|
42 |
|
43 static CPIMHandler* NewL(); |
|
44 |
|
45 // Interface implementation |
|
46 void ProcessMessageL( const TDesC8& aMessage, |
|
47 THtiMessagePriority aPriority ); |
|
48 |
|
49 TBool IsBusy(); |
|
50 |
|
51 virtual ~CPIMHandler(); |
|
52 |
|
53 void SetDispatcher( MHtiDispatcher* aDispatcher ); |
|
54 |
|
55 |
|
56 // From MCalProgressCallBack |
|
57 |
|
58 void Progress( TInt aPercentageCompleted ); |
|
59 void Completed( TInt aError ); |
|
60 TBool NotifyProgress(); |
|
61 |
|
62 private: |
|
63 |
|
64 CPIMHandler(); |
|
65 void ConstructL(); |
|
66 |
|
67 private: // helpers |
|
68 |
|
69 void HandleVCardImportFuncL( const TDesC8& aData ); |
|
70 void HandleVCalendarImportFuncL( const TDesC8& aData ); |
|
71 void HandleContactDeleteFuncL( const TDesC8& aData ); |
|
72 void HandleCalendarDeleteFuncL( const TDesC8& aData ); |
|
73 void HandleOpenCalendarFileL( const TDesC8& aData ); |
|
74 void HandleListCalendarFilesL(); |
|
75 void HandleNotepadAddMemoFuncL( const TDesC8& aData ); |
|
76 void HandleNotepadAddMemoFromFileFuncL( const TDesC8& aData ); |
|
77 void HandleNotepadDeleteAllFuncL(); |
|
78 |
|
79 void SendOkMsgL( const TDesC8& aData ); |
|
80 void SendNotepadOkMsgL( CHtiPIMServicePlugin::TCommand aCommand ); |
|
81 void SendErrorMessageL( TInt aError, const TDesC8& aDescription ); |
|
82 |
|
83 private: // data |
|
84 TBool iIsBusy; |
|
85 MHtiDispatcher* iDispatcher; // referenced |
|
86 CActiveSchedulerWait* iWaiter; |
|
87 TInt iEntryViewErr; |
|
88 CCalSession* iCalSession; |
|
89 }; |
|
90 |
|
91 #endif // CPIMHANDLER_H |