equal
deleted
inserted
replaced
|
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: |
|
15 * |
|
16 */ |
|
17 #ifndef AFDATABASECLEANER_H |
|
18 #define AFDATABASECLEANER_H |
|
19 |
|
20 #include <e32base.h> |
|
21 #include <d32dbms.h> |
|
22 |
|
23 class CAfDatabaseCleaner : public CActive |
|
24 { |
|
25 |
|
26 private: |
|
27 enum CleanupStep { |
|
28 Initial, |
|
29 Continuation, |
|
30 }; |
|
31 |
|
32 public: |
|
33 CAfDatabaseCleaner(RDbStoreDatabase &database); |
|
34 ~CAfDatabaseCleaner(); |
|
35 |
|
36 void StartCleanup(); |
|
37 |
|
38 private: // from CActive |
|
39 void RunL(); |
|
40 void DoCancel(); |
|
41 TInt RunError(TInt aError); |
|
42 |
|
43 private: |
|
44 void CompleteSelf(TInt completionCode); |
|
45 |
|
46 private: |
|
47 RDbStoreDatabase &mDatabase; |
|
48 RDbIncremental mIncrementalInterface; |
|
49 TInt mStep; |
|
50 CleanupStep mCleanupStep; |
|
51 |
|
52 }; |
|
53 |
|
54 #endif // AFDATABASECLEANER_H |