|
1 /* |
|
2 * Copyright (c) 2007-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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 /** |
|
22 @file |
|
23 @internalComponent |
|
24 */ |
|
25 |
|
26 #ifndef CNTFILEMANAGERMSGHANDLER_H |
|
27 #define CNTFILEMANAGERMSGHANDLER_H |
|
28 |
|
29 class CCntMsgHandler; |
|
30 class CntPredictiveSearch; |
|
31 /** |
|
32 CCntFileManagerMsgHandler class handles all file related operations. It uses |
|
33 a message handling method to handle the incoming op code. |
|
34 |
|
35 It delegates the incoming op code to appropriate message handling method by using |
|
36 a lookup table of member function pointers created by CCntServer. |
|
37 |
|
38 @internalComponent |
|
39 */ |
|
40 class CCntFileManagerMsgHandler : public CCntMsgHandler |
|
41 { |
|
42 public: |
|
43 static CCntFileManagerMsgHandler* NewLC(CCntSession& aSession); |
|
44 virtual ~CCntFileManagerMsgHandler(); |
|
45 TInt HandleMessageL(const RMessage2& aMessage); |
|
46 |
|
47 private: |
|
48 CCntFileManagerMsgHandler(CCntSession& aSession); |
|
49 void ConstructL(); |
|
50 |
|
51 public: |
|
52 // Delegates to the appropriate CCntDbManagerController method. |
|
53 void OpenDataBaseL(const RMessage2& aMessage); |
|
54 void CreateDatabaseL(const RMessage2& aMessage); |
|
55 void ReplaceDatabaseL(const RMessage2& aMessage); |
|
56 void CancelAsyncOpenDatabaseL(const RMessage2& aMessage); |
|
57 void CloseDataBaseL(const RMessage2& aMessage); |
|
58 void CloseDbTablesL(const RMessage2& aMessage); |
|
59 void ReOpenDbTablesL(const RMessage2& aMessage); |
|
60 void DeleteDatabaseL(const RMessage2& aMessage); |
|
61 void GetDefaultDatabaseNameL(const RMessage2& aMessage); |
|
62 void DatabaseDrive(const RMessage2& aMessage); |
|
63 void SetDatabaseDriveL(const RMessage2& aMessage); |
|
64 void DatabaseExistsL(const RMessage2& aMessage); |
|
65 void ListDatabasesL(const RMessage2& aMessage); |
|
66 void GetDatabaseReadyL(const RMessage2& aMessage); |
|
67 void FetchTemplateIdsL(const RMessage2& aMessage); |
|
68 void FetchGroupIdListsL(const RMessage2& aMessage); |
|
69 void FetchSearchResultsL(const RMessage2& aMessage); |
|
70 void FetchPredictiveSearchResultsL(const RMessage2& aMessage); |
|
71 |
|
72 // Non-CRUD file operations |
|
73 void RecoverDbL(const RMessage2& aMessage); |
|
74 void RecoverDbStepL(const RMessage2& aMessage); |
|
75 void CancelRecoverStepL(const RMessage2& aMessage); |
|
76 void CompressL(const RMessage2& aMessage); |
|
77 void CompressStepL(const RMessage2& aMessage); |
|
78 void CancelCompressStepL(const RMessage2& aMessage); |
|
79 void CompressRequiredL(const RMessage2& aMessage); |
|
80 void IsDamagedL(const RMessage2& aMessage); |
|
81 void DamageDbL(const RMessage2& aMessage); |
|
82 void FilesSizeL(const RMessage2& aMessage); |
|
83 void WastedSpaceInBytesL(const RMessage2& aMessage); |
|
84 |
|
85 // Test-only function. |
|
86 void GetDefinitionsForExistingViewL(const RMessage2& aMessage); |
|
87 void DefinitionsOfExistingViewsL(const RMessage2& aMessage); |
|
88 |
|
89 private: |
|
90 void FileOpenCreateReplaceL(const RMessage2& aMessage, TCntFileMode aMode); |
|
91 |
|
92 private: |
|
93 CntPredictiveSearch* predictiveSearch; |
|
94 }; |
|
95 |
|
96 #endif |