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