MPD: InotifySource Class Reference

MPD 0.20.15

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::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

  callback | a callback invoked for events received from the kernel

## ◆ ~InotifySource()

InotifySource::~InotifySource | ( |  | ) |
| inline

Definition at line 48 of file InotifySource.hxx.

## Member Function Documentation

## ◆ Add()

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

## ◆ Remove()

void InotifySource::Remove | ( | unsigned | wd | ) |

Removes a path from the notify list.

Parameters

  wd | the watch descriptor returned by mpd_inotify_source_add()

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

- db/update/InotifySource.hxx