|
|
@ -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; |
|
|
|