|
1 /* |
|
2 * Copyright (c) 2007 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: New memory selection setting item to support multiple drives. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CAKNCFDFILESYSTEMEVENT_H_ |
|
19 #define CAKNCFDFILESYSTEMEVENT_H_ |
|
20 |
|
21 // INCLUDES |
|
22 #include <e32base.h> |
|
23 #include <f32file.h> |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class MAknCFDFileSystemObserver; |
|
27 |
|
28 // CLASS DECLARATION |
|
29 |
|
30 /** |
|
31 * This class listens file system events |
|
32 * |
|
33 * @lib CommonDialogs.lib |
|
34 * @since s60 5.0 |
|
35 */ |
|
36 NONSHARABLE_CLASS(CAknCFDFileSystemEvent) : public CActive |
|
37 { |
|
38 public: // Constructors and destructor |
|
39 |
|
40 /** |
|
41 * Two-phased constructor. |
|
42 */ |
|
43 static CAknCFDFileSystemEvent* NewL( RFs& aFs, |
|
44 MAknCFDFileSystemObserver& aObserver, |
|
45 TNotifyType aNotifyType, |
|
46 const TDesC& aFullPath = KNullDesC ); |
|
47 |
|
48 /** |
|
49 * Destructor. |
|
50 */ |
|
51 virtual ~CAknCFDFileSystemEvent(); |
|
52 public: |
|
53 |
|
54 /** |
|
55 * Sets file system event |
|
56 * @since s60 5.0 |
|
57 */ |
|
58 void Setup(); |
|
59 |
|
60 /** |
|
61 * This calls refresh if file system event has happened |
|
62 * @since s60 5.0 |
|
63 */ |
|
64 void CheckFileSystemEvent(); |
|
65 protected: // Functions from base classes |
|
66 /** |
|
67 * From CActive Called when asynchronous request has completed |
|
68 * @since s60 5.0 |
|
69 */ |
|
70 void RunL(); |
|
71 |
|
72 /** |
|
73 * From CActive Called when asynchronous request has failed |
|
74 * @since s60 5.0 |
|
75 */ |
|
76 TInt RunError( TInt aError ); |
|
77 |
|
78 /** |
|
79 * From CActive Called when asynchronous request was cancelled |
|
80 * @since s60 5.0 |
|
81 */ |
|
82 void DoCancel(); |
|
83 |
|
84 private: |
|
85 /** |
|
86 * By default Symbian 2nd phase constructor is private. |
|
87 */ |
|
88 void ConstructL( const TDesC& aFullPath ); |
|
89 |
|
90 /** |
|
91 * C++ default constructor. |
|
92 */ |
|
93 CAknCFDFileSystemEvent( |
|
94 RFs& aFs, |
|
95 MAknCFDFileSystemObserver& aObserver, |
|
96 TNotifyType aNotifyType ); |
|
97 |
|
98 private: |
|
99 // Ref: Reference to opened File System session |
|
100 RFs& iFs; |
|
101 |
|
102 // Ref: This object is called when RunL occurs |
|
103 MAknCFDFileSystemObserver& iObserver; |
|
104 |
|
105 // Type of the notify, entry or disk. |
|
106 TNotifyType iNotifyType; |
|
107 |
|
108 // Full path of folder from where notification is needed |
|
109 HBufC* iFullPath; |
|
110 |
|
111 // Indicates if the event has been received |
|
112 TBool iIsReceived; |
|
113 }; |
|
114 |
|
115 #endif /*CAKNCFDFILESYSTEMEVENT_H_*/ |