|
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 * |
|
15 * Description: |
|
16 * The header file of the backup engine from bkup engine wrapper |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef FMBKUPENGINE_H |
|
21 #define FMBKUPENGINE_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <QObject> |
|
25 #include <QList> |
|
26 #include "fmbkupengine_global.h" |
|
27 |
|
28 #include "fmdefine.h" |
|
29 |
|
30 // FORWARD DECLARATIONS |
|
31 class FmBkupEnginePrivate; |
|
32 |
|
33 |
|
34 class FmBkupDrivesAndOperation; |
|
35 class FmBkupBackupCategory; |
|
36 class FmRestoreInfo; |
|
37 |
|
38 class FmBackupSettings; |
|
39 class FmRestoreSettings; |
|
40 |
|
41 // CLASS DECLARATION |
|
42 class FMBKUPENGINE_EXPORT FmBkupEngine : public QObject |
|
43 { |
|
44 Q_OBJECT |
|
45 public: |
|
46 |
|
47 enum MAEngineBackupCategories |
|
48 { |
|
49 EBUCatSettings = 0x1, |
|
50 EBUCatMessages = 0x2, |
|
51 EBUCatContacts = 0x4, |
|
52 EBUCatCalendar = 0x8, |
|
53 EBUCatBookmarks = 0x10, |
|
54 EBUCatUserFiles = 0x20, |
|
55 EBUCatAllInOne = 0x8000000, |
|
56 EBUCatAllSeparately = 0x7FFFFFF |
|
57 // Set as 0xFFFFFFF (EBUCatAllInOne+EBUCatAllSeparately) if archive containing |
|
58 // data from all data owners needs to be created. |
|
59 }; |
|
60 |
|
61 |
|
62 enum Process{ |
|
63 ProcessNone = 0, |
|
64 ProcessBackup, |
|
65 ProcessRestore |
|
66 }; |
|
67 |
|
68 FmBkupEngine(QObject* parent = 0); |
|
69 ~FmBkupEngine(); |
|
70 |
|
71 |
|
72 bool startBackup( QList<FmBkupDrivesAndOperation* > drivesAndOperationList, |
|
73 QList<FmBkupBackupCategory*> backupCategoryList, |
|
74 QString drive, quint32 content); |
|
75 |
|
76 void cancelBackup(); |
|
77 |
|
78 bool startRestore( QList<FmBkupDrivesAndOperation* > drivesAndOperationList ); |
|
79 int deleteBackup( QList<FmBkupDrivesAndOperation* > drivesAndOperationList ); |
|
80 int error() const; |
|
81 |
|
82 FmBackupSettings* BackupSettingsL(); |
|
83 FmRestoreSettings* RestoreSettingsL(); |
|
84 |
|
85 void GetRestoreInfoArray( QList<FmBkupDrivesAndOperation* > &drivesAndOperationList, |
|
86 QList< FmRestoreInfo > &restoreInfoList, |
|
87 const QString& aDrive ); |
|
88 |
|
89 void getBackupDriveList( QStringList &driveList ); |
|
90 |
|
91 signals: |
|
92 void notifyPreparing( bool cancelable ); |
|
93 void notifyStart( bool cancelable, int totalCount ); |
|
94 void notifyUpdate( int count ); |
|
95 void notifyFinish( int err ); |
|
96 void notifyMemoryLow( int memoryValue, int &userError ); |
|
97 void notifyBackupFilesExist( bool &isContinue ); |
|
98 |
|
99 private: |
|
100 friend class FmBkupEnginePrivate; |
|
101 FmBkupEnginePrivate* d; |
|
102 |
|
103 FmBackupSettings *iBackupSettings; |
|
104 FmRestoreSettings *iRestoreSettings; |
|
105 }; |
|
106 |
|
107 #endif /*FMBKUPENGINE_H*/ |
|
108 |
|
109 // End of file |