|
1 /* |
|
2 * Copyright (c) 2006 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: Monitors File system for Format events |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CMPXFORMATMONITOR_H |
|
20 #define CMPXFORMATMONITOR_H |
|
21 |
|
22 #include <babackup.h> |
|
23 #include "mpxsystemeventobserver.h" |
|
24 |
|
25 /** |
|
26 * File System monitor class to monitor for format events |
|
27 * |
|
28 * @lib mpxharvesterserver.exe |
|
29 * @since S60 3.0 |
|
30 */ |
|
31 NONSHARABLE_CLASS( CMPXFsFormatMonitor ) : public CBase, |
|
32 public MBackupOperationObserver |
|
33 { |
|
34 |
|
35 public: |
|
36 |
|
37 /** |
|
38 * Two-phase constructor |
|
39 * @param aObserver observer to the monitor |
|
40 */ |
|
41 static CMPXFsFormatMonitor* NewL( MMPXSystemEventObserver& aObserver ); |
|
42 |
|
43 /** |
|
44 * Two-phase constructor |
|
45 * @param aObserver observer to the monitor |
|
46 */ |
|
47 static CMPXFsFormatMonitor* NewLC( MMPXSystemEventObserver& aObserver ); |
|
48 |
|
49 /** |
|
50 * Destructor |
|
51 */ |
|
52 virtual ~CMPXFsFormatMonitor(); |
|
53 |
|
54 public: // New functions |
|
55 |
|
56 /** |
|
57 * Polls for the current monitor status |
|
58 * If an event is happening, it will callback the observer of the event |
|
59 */ |
|
60 void PollStatus(); |
|
61 |
|
62 protected: // Base Class |
|
63 |
|
64 /* |
|
65 * From MBackupOperationObserver |
|
66 * Notifies this class of the backup event. |
|
67 * MMC App will signal a start / end. |
|
68 */ |
|
69 void HandleBackupOperationEventL(const TBackupOperationAttributes& aBackupOperationAttributes); |
|
70 |
|
71 private: |
|
72 |
|
73 /** |
|
74 * C++ constructor |
|
75 * aObserver observer to this event |
|
76 */ |
|
77 CMPXFsFormatMonitor( MMPXSystemEventObserver& aObserver ); |
|
78 |
|
79 /* |
|
80 * Second phased constructor |
|
81 */ |
|
82 void ConstructL(); |
|
83 |
|
84 private: // data |
|
85 |
|
86 RArray<TInt> iBackupDrives; |
|
87 CBaBackupSessionWrapper* iBackupSession; |
|
88 |
|
89 /* |
|
90 * Observer interface to callback to an observer |
|
91 */ |
|
92 MMPXSystemEventObserver& iObserver; |
|
93 }; |
|
94 |
|
95 #endif // CMPXFORMATMONITOR_H |