Diffstat (limited to 'libopie2/opiecore/ofilenotify.h') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiecore/ofilenotify.h | 42 |
1 files changed, 39 insertions, 3 deletions
diff --git a/libopie2/opiecore/ofilenotify.h b/libopie2/opiecore/ofilenotify.h index ea525e9..41ba84d 100644 --- a/libopie2/opiecore/ofilenotify.h +++ b/libopie2/opiecore/ofilenotify.h | |||
@@ -100,3 +100,3 @@ enum OFileNotificationType | |||
100 | * This class allows to watch for events happening to files. | 100 | * This class allows to watch for events happening to files. |
101 | * It uses the inotify kernel interface | 101 | * It uses the inotify linux (2.6.x) kernel interface. |
102 | * | 102 | * |
@@ -142,3 +142,3 @@ class OFileNotification : public QObject | |||
142 | **/ | 142 | **/ |
143 | static void singleShot( const QString& path, QObject* receiver, const char* member, OFileNotificationType type = Modify ); | 143 | static bool singleShot( const QString& path, QObject* receiver, const char* member, OFileNotificationType type = Modify ); |
144 | /** | 144 | /** |
@@ -164,2 +164,6 @@ class OFileNotification : public QObject | |||
164 | bool isActive() const; | 164 | bool isActive() const; |
165 | /** | ||
166 | * @internal | ||
167 | */ | ||
168 | int startWatching( const QString& path, bool sshot = false, OFileNotificationType type = Modify ); | ||
165 | 169 | ||
@@ -169,3 +173,3 @@ class OFileNotification : public QObject | |||
169 | **/ | 173 | **/ |
170 | void triggered(); | 174 | void triggered( const QString& name ); |
171 | 175 | ||
@@ -191,2 +195,34 @@ class OFileNotification : public QObject | |||
191 | 195 | ||
196 | /*====================================================================================== | ||
197 | * ODirNotification | ||
198 | *======================================================================================*/ | ||
199 | |||
200 | /** | ||
201 | * @brief Represents a directory notification | ||
202 | * | ||
203 | * This class allows to watch for events happening to directories | ||
204 | * It uses the OFileNotification class | ||
205 | * | ||
206 | * @see http://www.kernel.org/pub/linux/kernel/people/rml/inotify/ | ||
207 | * | ||
208 | * @author Michael 'Mickey' Lauer <mickey@vanille.de> | ||
209 | * | ||
210 | **/ | ||
211 | |||
212 | class ODirNotification : public QObject | ||
213 | { | ||
214 | Q_OBJECT | ||
215 | |||
216 | public: | ||
217 | ODirNotification( QObject* parent = 0, const char* name = 0 ); | ||
218 | ~ODirNotification(); | ||
219 | /** | ||
220 | * Starts to watch for @a type changes to @a path. Recurse @a recurse levels down the filesystem tree, | ||
221 | * use 0 for no recursion and -1 for unlimited recursion. | ||
222 | * Set @a sshot to True if you want to be notified only once. | ||
223 | **/ | ||
224 | int watch( const QString& path, bool sshot = false, OFileNotificationType type = Modify, int recurse = 0 ); | ||
225 | }; | ||
226 | |||
227 | |||
192 | } | 228 | } |