equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2008-2008 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 the file system for changes in a file. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_FILEMONITOR_H |
|
20 #define C_FILEMONITOR_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <f32file.h>//??? remove??? |
|
24 |
|
25 class MFileMonitorObserver; |
|
26 |
|
27 /** |
|
28 * File monitor class |
|
29 * |
|
30 * @since S60 5.0 |
|
31 */ |
|
32 NONSHARABLE_CLASS( CFileMonitor ) : public CActive |
|
33 { |
|
34 |
|
35 public: |
|
36 |
|
37 /** |
|
38 * Two-phased constructor |
|
39 */ |
|
40 static CFileMonitor* NewL( MFileMonitorObserver& aObserver); |
|
41 |
|
42 /** |
|
43 * Virtual destructor |
|
44 */ |
|
45 virtual ~CFileMonitor(); |
|
46 |
|
47 /** |
|
48 * Start monitoring a particular file |
|
49 * @param aFile file to monitor |
|
50 */ |
|
51 void StartL( const TDesC& aFile ); |
|
52 |
|
53 protected: |
|
54 |
|
55 /** |
|
56 * From CActive |
|
57 */ |
|
58 void RunL(); |
|
59 |
|
60 /** |
|
61 * From CActive |
|
62 */ |
|
63 void DoCancel(); |
|
64 |
|
65 /** |
|
66 * From CActive |
|
67 */ |
|
68 TInt RunError(TInt aError); |
|
69 |
|
70 private: |
|
71 |
|
72 /** |
|
73 * Private constructor |
|
74 */ |
|
75 CFileMonitor( MFileMonitorObserver& aObserver); |
|
76 |
|
77 /** |
|
78 * 2nd phased constructor |
|
79 */ |
|
80 void ConstructL(); |
|
81 |
|
82 private: // data |
|
83 MFileMonitorObserver& iObserver; |
|
84 RFs iFs; |
|
85 HBufC* iFilePath; |
|
86 }; |
|
87 |
|
88 #endif // C_FILEMONITOR_H |