From b5bc41debfcaa76eb340cde8108e36503ef872ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Mon, 4 Aug 2008 13:04:45 +0000 Subject: [PATCH] * Use new header layout in PathMonitor.h * Honor 80 char/line limit in PathMonitor.cpp git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26788 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/private/storage/PathMonitor.h | 18 ++++++++++-------- src/kits/storage/PathMonitor.cpp | 9 ++++++--- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/headers/private/storage/PathMonitor.h b/headers/private/storage/PathMonitor.h index 57b1672f28..c642f67b5d 100644 --- a/headers/private/storage/PathMonitor.h +++ b/headers/private/storage/PathMonitor.h @@ -18,17 +18,19 @@ namespace BPrivate { class BPathMonitor { - public: - static status_t StartWatching(const char* path, uint32 flags, BMessenger target); +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); + static status_t StopWatching(const char* path, + BMessenger target); + static status_t StopWatching(BMessenger target); - private: - BPathMonitor(); - ~BPathMonitor(); +private: + BPathMonitor(); + ~BPathMonitor(); - static status_t _InitIfNeeded(); + static status_t _InitIfNeeded(); }; } // namespace BPrivate diff --git a/src/kits/storage/PathMonitor.cpp b/src/kits/storage/PathMonitor.cpp index 3d20597844..d7a7b38db7 100644 --- a/src/kits/storage/PathMonitor.cpp +++ b/src/kits/storage/PathMonitor.cpp @@ -189,7 +189,8 @@ PathHandler::PathHandler(const char* path, uint32 flags, BMessenger target) fStatus = _AddDirectory(nodeRef); - // TODO: work-around for existing files (should not watch the directory in this case) + // TODO: work-around for existing files (should not watch the directory in + // this case) BEntry entry(path); if (entry.Exists() && !entry.IsDirectory()) _AddFile(entry); @@ -223,7 +224,8 @@ PathHandler::Dump() printf("WATCHING DIRECTORIES:\n"); DirectorySet::iterator i = fDirectories.begin(); for (; i != fDirectories.end(); i++) { - printf(" %ld:%Ld (%s)\n", i->node.device, i->node.node, i->contained ? "contained" : "-"); + printf(" %ld:%Ld (%s)\n", i->node.device, i->node.node, i->contained + ? "contained" : "-"); } printf("WATCHING FILES:\n"); @@ -539,7 +541,8 @@ PathHandler::_IsContained(BEntry& entry) const bool -PathHandler::_HasDirectory(const node_ref& nodeRef, bool* _contained /* = NULL */) const +PathHandler::_HasDirectory(const node_ref& nodeRef, + bool* _contained /* = NULL */) const { watched_directory directory; directory.node = nodeRef;