MPD  0.20.6
Public Member Functions
InotifySource Class Referencefinal

#include <InotifySource.hxx>

Inheritance diagram for InotifySource:
[legend]
Collaboration diagram for InotifySource:
[legend]

Public Member Functions

 InotifySource (EventLoop &_loop, mpd_inotify_callback_t callback, void *ctx)
 Creates a new inotify source and registers it in the EventLoop. More...
 
 ~InotifySource ()
 
int Add (const char *path_fs, unsigned mask)
 Adds a path to the notify list. More...
 
void Remove (unsigned wd)
 Removes a path from the notify list. More...
 

Detailed Description

Definition at line 31 of file InotifySource.hxx.

Constructor & Destructor Documentation

InotifySource::InotifySource ( EventLoop _loop,
mpd_inotify_callback_t  callback,
void *  ctx 
)

Creates a new inotify source and registers it in the EventLoop.

Throws #std::system_error on error.

Parameters
callbacka callback invoked for events received from the kernel
InotifySource::~InotifySource ( )
inline

Definition at line 48 of file InotifySource.hxx.

Member Function Documentation

int InotifySource::Add ( const char *  path_fs,
unsigned  mask 
)

Adds a path to the notify list.

Throws #std::system_error on error.

Returns
a watch descriptor
void InotifySource::Remove ( unsigned  wd)

Removes a path from the notify list.

Parameters
wdthe watch descriptor returned by mpd_inotify_source_add()

The documentation for this class was generated from the following file: