From 46576c5075b3a4e6215b1fa234ac96a32a4b54ce Mon Sep 17 00:00:00 2001 From: Felix Dubrownik Date: Sun, 14 Sep 2014 00:13:41 +0200 Subject: [PATCH] added handlers. Dummies for now, but compiles --- src/MediaServer.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/MediaServer.h b/src/MediaServer.h index 8ccbe5a..fe5ffc3 100644 --- a/src/MediaServer.h +++ b/src/MediaServer.h @@ -40,6 +40,39 @@ class MediaServer { public: MediaServer(); + // TODO make useful stuff with onDirectoryWatcher* + void onDirectoryWatcherItemAdded( + const ofx::IO::DirectoryWatcherManager::DirectoryEvent& evt) { + ofSendMessage("Added: " + evt.item.path()); + } + + void onDirectoryWatcherItemRemoved( + const ofx::IO::DirectoryWatcherManager::DirectoryEvent& evt) { + ofSendMessage("Removed: " + evt.item.path()); + } + + void onDirectoryWatcherItemModified( + const ofx::IO::DirectoryWatcherManager::DirectoryEvent& evt) { + ofSendMessage("Modified: " + evt.item.path()); + } + + void onDirectoryWatcherItemMovedFrom( + const ofx::IO::DirectoryWatcherManager::DirectoryEvent& evt) { + ofLogNotice("ofApp::onDirectoryWatcherItemMovedFrom") + << "Moved From: " << evt.item.path(); + } + + void onDirectoryWatcherItemMovedTo( + const ofx::IO::DirectoryWatcherManager::DirectoryEvent& evt) { + ofLogNotice("ofApp::onDirectoryWatcherItemMovedTo") + << "Moved To: " << evt.item.path(); + } + + void onDirectoryWatcherError(const Poco::Exception& exc) { + ofLogError("ofApp::onDirectoryWatcherError") + << "Error: " << exc.displayText(); + } + private: // Video ofx::IO::DirectoryWatcherManager videoWatcher;