Diffstat (limited to 'libopie2/opiecore/linux/ofilenotify.h') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiecore/linux/ofilenotify.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libopie2/opiecore/linux/ofilenotify.h b/libopie2/opiecore/linux/ofilenotify.h index 17e6b5d..c713b30 100644 --- a/libopie2/opiecore/linux/ofilenotify.h +++ b/libopie2/opiecore/linux/ofilenotify.h | |||
@@ -236,49 +236,50 @@ class OFileNotification : public QObject | |||
236 | private: | 236 | private: |
237 | bool registerEventHandler(); | 237 | bool registerEventHandler(); |
238 | void unregisterEventHandler(); | 238 | void unregisterEventHandler(); |
239 | 239 | ||
240 | QString _path; | 240 | QString _path; |
241 | OFileNotificationType _type; | 241 | OFileNotificationType _type; |
242 | QSignal _signal; | 242 | QSignal _signal; |
243 | bool _active; | 243 | bool _active; |
244 | bool _multi; | 244 | bool _multi; |
245 | static QSocketNotifier* _sn; | 245 | static QSocketNotifier* _sn; |
246 | int _wd; // inotify watch descriptor | 246 | int _wd; // inotify watch descriptor |
247 | static int _fd; // inotify device descriptor | 247 | static int _fd; // inotify device descriptor |
248 | 248 | ||
249 | friend class OFileNotificationEvent; | 249 | friend class OFileNotificationEvent; |
250 | }; | 250 | }; |
251 | 251 | ||
252 | /*====================================================================================== | 252 | /*====================================================================================== |
253 | * ODirNotification | 253 | * ODirNotification |
254 | *======================================================================================*/ | 254 | *======================================================================================*/ |
255 | 255 | ||
256 | /** | 256 | /** |
257 | * @brief Represents a directory notification | 257 | * @brief Represents a directory notification |
258 | * | 258 | * |
259 | * This class allows to watch for events happening to directories | 259 | * This class allows to watch for events happening to directories |
260 | * It uses the OFileNotification class | 260 | * It uses the OFileNotification class and (for recursive watches) |
261 | * implements the Love-Trowbridge recursive directory scanning algorithm. | ||
261 | * | 262 | * |
262 | * @see http://www.kernel.org/pub/linux/kernel/people/rml/inotify/ | 263 | * @see http://www.kernel.org/pub/linux/kernel/people/rml/inotify/ |
263 | * | 264 | * |
264 | * @author Michael 'Mickey' Lauer <mickey@vanille.de> | 265 | * @author Michael 'Mickey' Lauer <mickey@vanille.de> |
265 | * | 266 | * |
266 | **/ | 267 | **/ |
267 | 268 | ||
268 | class ODirNotification : public QObject | 269 | class ODirNotification : public QObject |
269 | { | 270 | { |
270 | Q_OBJECT | 271 | Q_OBJECT |
271 | 272 | ||
272 | public: | 273 | public: |
273 | ODirNotification( QObject* parent = 0, const char* name = 0 ); | 274 | ODirNotification( QObject* parent = 0, const char* name = 0 ); |
274 | ~ODirNotification(); | 275 | ~ODirNotification(); |
275 | /** | 276 | /** |
276 | * Starts to watch for @a type changes to @a path. Recurse @a recurse levels down the filesystem tree, | 277 | * Starts to watch for @a type changes to @a path. Recurse @a recurse levels down the filesystem tree, |
277 | * use 0 for no recursion and -1 for unlimited recursion. | 278 | * use 0 for no recursion and -1 for unlimited recursion. |
278 | * Set @a sshot to True if you want to be notified only once. | 279 | * Set @a sshot to True if you want to be notified only once. |
279 | **/ | 280 | **/ |
280 | int watch( const QString& path, bool sshot = false, OFileNotificationType type = Modify, int recurse = 0 ); | 281 | int watch( const QString& path, bool sshot = false, OFileNotificationType type = Modify, int recurse = 0 ); |
281 | 282 | ||
282 | signals: | 283 | signals: |
283 | /** | 284 | /** |
284 | * This signal is emitted if an event happens of the specified type happens to the directory being watched. | 285 | * This signal is emitted if an event happens of the specified type happens to the directory being watched. |