Subversion Repositories public

Compare Revisions

Ignore whitespace Rev 32 → Rev 33

/inotify-cxx/trunk/inotify-cxx.cpp
269,7 → 269,26
IN_WRITE_END
}
 
void InotifyWatch::OnOneshotEvent()
{
IN_WRITE_BEGIN
if (!m_fEnabled) {
IN_WRITE_END_NOTHROW
throw InotifyException(IN_EXC_MSG("event cannot occur on disabled watch"), EINVAL, this);
}
if (m_pInotify != NULL) {
m_pInotify->m_watches.erase(m_wd);
m_wd = -1;
}
m_fEnabled = false;
IN_WRITE_END
}
 
 
Inotify::Inotify() throw (InotifyException)
{
IN_LOCK_INIT
426,6 → 445,8
InotifyWatch* pW = FindWatch(pEvt->wd);
if (pW != NULL) {
InotifyEvent evt(pEvt, pW);
if (InotifyEvent::IsType(pW->GetMask(), IN_ONESHOT))
pW->OnOneshotEvent();
m_events.push_back(evt);
}
i += INOTIFY_EVENT_SIZE + (ssize_t) pEvt->len;
/inotify-cxx/trunk/CHANGELOG
1,3 → 1,7
0.6.1 2006-12-30
* fixed incorrect behavior for IN_ONESHOT (#0000113)
 
 
0.6.0 2006-12-28
* added methods for getting/setting inotify capabilities and limits
* added IN_SELF_MOVED flag (if defined)
/inotify-cxx/trunk/inotify-cxx.h
502,6 → 502,14
bool m_fEnabled; ///< events enabled yes/no
IN_LOCK_DECL
/// Disables the watch (if it has the one-shot flag).
/**
* This method must be called after receiving an event.
* It ensures the watch object is consistent with the kernel
* data.
*/
void OnOneshotEvent();
};