|
1 /* |
|
2 * Copyright (c) 2006-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 * Description: Monitors file creations, modifications and deletions.* |
|
15 */ |
|
16 |
|
17 |
|
18 #ifndef __MDSFILESERVERPLUGINCLIENT_H__ |
|
19 #define __MDSFILESERVERPLUGINCLIENT_H__ |
|
20 |
|
21 enum TMdsFSPOperation |
|
22 { |
|
23 EMdsFSPOpEnable, |
|
24 EMdsFSPOpDisable, |
|
25 EMdsFSPOpRegisterNotification, |
|
26 EMdsFSPOpAddNotificationPath, |
|
27 EMdsFSPOpRemoveNotificationPath, |
|
28 EMdsFSPOpAddIgnorePath, |
|
29 EMdsFSPOpRemoveIgnorePath, |
|
30 EMdsFSPOpNotificationCancel, |
|
31 }; |
|
32 |
|
33 class TMdsFSPStatus |
|
34 { |
|
35 public: |
|
36 TInt iFileEventType; |
|
37 TInt iDriveNumber; |
|
38 TFileName iFileName; |
|
39 TFileName iNewFileName; |
|
40 TUid iProcessId; |
|
41 TUint32 iDriveMediaId; |
|
42 }; |
|
43 |
|
44 enum TMdsFileEventType |
|
45 { |
|
46 EMdsFileCreated, |
|
47 EMdsFileRenamed, |
|
48 EMdsFileModified, |
|
49 EMdsFileReplaced, |
|
50 EMdsFileDeleted, |
|
51 EMdsDriveFormatted, |
|
52 EMdsFileUnknown, |
|
53 EMdsDirRenamed |
|
54 }; |
|
55 |
|
56 typedef TPckgBuf<TMdsFSPStatus> TMdsFSPStatusPckg; |
|
57 |
|
58 const TInt KMdsFSPluginPosition = 0x200071CD; |
|
59 |
|
60 #ifndef __MDSFILESERVERPLUGIN_H__ |
|
61 #include <f32file.h> |
|
62 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
63 #include <f32file_private.h> |
|
64 #endif |
|
65 |
|
66 |
|
67 /** |
|
68 * |
|
69 */ |
|
70 class RMdsFSPEngine : public RPlugin |
|
71 { |
|
72 public: |
|
73 |
|
74 /** |
|
75 * Register... |
|
76 * @param aMdsFSPStatus ... |
|
77 * @param aStat TRequestStatus for asyncronous operation. |
|
78 */ |
|
79 inline void RegisterNotification( TMdsFSPStatusPckg& aMdsFSPStatus, |
|
80 TRequestStatus& aStat); |
|
81 |
|
82 /** |
|
83 * Adds a new path to monitor. |
|
84 * @param aPath Path to add. |
|
85 */ |
|
86 inline void AddNotificationPath( const TDesC& aPath ); |
|
87 |
|
88 /** |
|
89 * Removes a path from list of monitored paths. |
|
90 * @param aPath Path to remove. |
|
91 */ |
|
92 inline void RemoveNotificationPath( const TDesC& aPath ); |
|
93 |
|
94 /** |
|
95 * Adds a new ignored path. |
|
96 * @param aPath Path descriptor. |
|
97 */ |
|
98 inline void AddIgnorePath( const TDesC& aPath ); |
|
99 |
|
100 /** |
|
101 * Removes a ignored path from the list. |
|
102 * @param aPath Path descriptor. |
|
103 */ |
|
104 inline void RemoveIgnorePath( const TDesC& aPath ); |
|
105 |
|
106 /** |
|
107 * Enable plugin. |
|
108 * @return Error code. |
|
109 */ |
|
110 inline TInt Enable(); |
|
111 |
|
112 /** |
|
113 * Disable plugin. |
|
114 * @return Error code. |
|
115 */ |
|
116 inline TInt Disable(); |
|
117 |
|
118 /** |
|
119 * Cancel notifications. |
|
120 */ |
|
121 inline void NotificationCancel(); |
|
122 }; |
|
123 |
|
124 #include "mdsfileserverpluginclient.inl" // inlined methods |
|
125 |
|
126 #endif // __MDSFILESERVERPLUGIN_H__ |
|
127 |
|
128 #endif // __MDSFILESERVERPLUGINCLIENT_H__ |
|
129 |