haiku/headers/private/storage/PathMonitor.h
Axel Dörfler d00539e3ba * Revamped BPathMonitor API as suggested by Ingo - we could rename it to BNodeMonitor
and add wrappers for watch_node() as well, though.
* Implemented more or less all what is needed for the path monitoring to work.
* Added a test application: works fine under Haiku, but somewhat flaky under BeOS,
  dunno why yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21066 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-08 00:30:59 +00:00

37 lines
743 B
C++

/*
* Copyright 2007, Haiku Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _PATH_MONITOR_H
#define _PATH_MONITOR_H
#include <NodeMonitor.h>
// additional flags (combined with those in NodeMonitor.h)
#define B_WATCH_FILES_ONLY 0x0100
#define B_WATCH_RECURSIVELY 0x0200
#define B_PATH_MONITOR '_PMN'
namespace BPrivate {
class BPathMonitor {
public:
static status_t StartWatching(const char* path, uint32 flags, BMessenger target);
static status_t StopWatching(const char* path, BMessenger target);
static status_t StopWatching(BMessenger target);
private:
BPathMonitor();
~BPathMonitor();
static status_t _InitIfNeeded();
};
} // namespace BPrivate
#endif // _PATH_MONITOR_H