#include <mt_inotify.h>
Inheritance diagram for Inotify:

Public Member Functions | |
| Inotify () | |
| virtual | ~Inotify () |
| int | addWatch (zmm::String path, int events) |
| Puts a file or directory on the inotify watch list. | |
| void | removeWatch (int wd) |
| Removes a previously added file or directory from the watch list. | |
| inotify_event * | nextEvent () |
| Returns the next inotify event. | |
| void | stop () |
| Unblock the next_event function. | |
| void | retain () |
| void | release () |
| int | getRefCount () |
Static Public Member Functions | |
| static void * | operator new (size_t size) |
| static void | operator delete (void *ptr) |
Protected Attributes | |
| mt_atomic_t | _ref_count |
| pthread_mutex_t | mutex |
Private Attributes | |
| int | inotify_fd |
| int | stop_fds_pipe [2] |
| int | stop_fd_read |
| int | stop_fd_write |
Definition at line 44 of file mt_inotify.h.
| Inotify::Inotify | ( | ) |
| virtual Inotify::~Inotify | ( | ) | [virtual] |
| int Inotify::addWatch | ( | zmm::String | path, | |
| int | events | |||
| ) |
Puts a file or directory on the inotify watch list.
| path | file or directory to monitor. | |
| events | inotify event mask |
| void Inotify::removeWatch | ( | int | wd | ) |
Removes a previously added file or directory from the watch list.
| wd | watch descriptor that was returned by the add_watch function |
| struct inotify_event* Inotify::nextEvent | ( | ) | [read] |
Returns the next inotify event.
This function will return the next inotify event that occurs, in case that there are no events the function will block indefinetely. It can be unblocked by the stop function.
| void Inotify::stop | ( | ) |
Unblock the next_event function.
| void Object::retain | ( | ) | [inherited] |
Definition at line 58 of file object.cc.
References zmm::Object::_ref_count, atomic_inc(), and zmm::Object::mutex.
Referenced by zmm::ArrayBase::append(), zmm::ObjectQueue< AutoscanDirectory >::enqueue(), zmm::ArrayBase::insert(), zmm::String::operator=(), zmm::ObjectStack< Singleton< zmm::Object > >::push(), DSOHash< VT >::put(), DSBHash< VT >::put(), zmm::ArrayBase::set(), and zmm::String::String().
| void Object::release | ( | ) | [inherited] |
Definition at line 66 of file object.cc.
References zmm::Object::_ref_count, atomic_dec(), and zmm::Object::mutex.
Referenced by zmm::String::operator=(), zmm::ArrayBase::remove(), zmm::ArrayBase::removeUnordered(), zmm::ArrayBase::set(), zmm::ArrayBase::~ArrayBase(), zmm::ObjectQueue< AutoscanDirectory >::~ObjectQueue(), zmm::ObjectStack< Singleton< zmm::Object > >::~ObjectStack(), and zmm::String::~String().
| int Object::getRefCount | ( | ) | [inherited] |
| void * Object::operator new | ( | size_t | size | ) | [static, inherited] |
| void Object::operator delete | ( | void * | ptr | ) | [static, inherited] |
int Inotify::inotify_fd [private] |
Definition at line 71 of file mt_inotify.h.
int Inotify::stop_fds_pipe[2] [private] |
Definition at line 72 of file mt_inotify.h.
int Inotify::stop_fd_read [private] |
Definition at line 73 of file mt_inotify.h.
int Inotify::stop_fd_write [private] |
Definition at line 74 of file mt_inotify.h.
mt_atomic_t zmm::Object::_ref_count [protected, inherited] |
Definition at line 54 of file object.h.
Referenced by zmm::Object::getRefCount(), zmm::Object::Object(), zmm::Object::release(), and zmm::Object::retain().
pthread_mutex_t zmm::Object::mutex [protected, inherited] |
Reimplemented in AutoscanList, AutoscanInotify, Dictionary_r, SingletonManager, Singleton< T >, MutexAutolock, Cond, Singleton< UpdateManager >, Singleton< Timer >, Singleton< ContentDirectoryService >, Singleton< ConfigManager >, Singleton< Server >, Singleton< Runtime >, Singleton< ContentManager >, Singleton< ConnectionManagerService >, Singleton< Storage >, and Singleton< SessionManager >.
Definition at line 56 of file object.h.
Referenced by zmm::Object::Object(), zmm::Object::release(), zmm::Object::retain(), and zmm::Object::~Object().
1.5.2