inotify-cxx.h(3)

NAME
inotify-cxx.h -

inotify C++ interface header

SYNOPSIS

#include <stdint.h>
#include <string>
#include <deque>
#include <map>
#include <sys/syscall.h>
#include <sys/inotify.h>
#include <sys/inotify-syscalls.h>

  Classes
class InotifyException
Class for inotify exceptions'.
class InotifyEvent
inotify event class
class InotifyWatch
inotify watch class
class Inotify
inotify class

  Defines
#define INOTIFY_EVENT_SIZE (sizeof(struct inotify_event))
Event struct size'.
#define INOTIFY_BUFLEN (1024 * (INOTIFY_EVENT_SIZE + 16))
Event buffer length'.
#define IN_EXC_MSG(msg) (std::string(__PRETTY_FUNCTION__) + ': ' + msg)
Helper macro for creating exception messages'.
#define IN_LOCK_DECL
inotify-cxx thread safety
#define IN_LOCK_INIT
#define IN_LOCK_DONE
#define IN_READ_BEGIN
#define IN_READ_END
#define IN_READ_END_NOTHROW
#define IN_WRITE_BEGIN
#define IN_WRITE_END
#define IN_WRITE_END_NOTHROW

  Typedefs
typedef std::map< int32_t,
InotifyWatch * > IN_WATCH_MAP"
Mapping from watch descriptors to watch objects'.
typedef std::map< std::string,
InotifyWatch * > IN_WP_MAP"
Mapping from paths to watch objects'.

  Enumerations
enum InotifyCapability_t { IN_MAX_EVENTS = 0, IN_MAX_INSTANCES = 1, IN_MAX_WATCHES = 2 }
inotify capability/limit identifiers

Detailed Description

inotify C++ interface header inotify C++ interface

Copyright (C) 2006, 2007, 2008 Lukas Jelinek, <lukas@aiken.cz>

This program is free software; you can redistribute it and/or modify it under the terms of one of the following licenses:

•   1'. X11-style license (see LICENSE-X11)
•   2'. GNU Lesser General Public License, version 2'.1 (see LICENSE-LGPL)
•   3'. GNU General Public License, version 2 (see LICENSE-GPL)
If you want to help with choosing the best license for you, please visit http://www.gnu.org/licenses/license-list.html.

Define Documentation

  #define IN_EXC_MSG(msg) (std::string(__PRETTY_FUNCTION__) + ': ' + msg)
Helper macro for creating exception messages'. It prepends the message by the function name'.

  #define IN_LOCK_DECL
inotify-cxx thread safety If this symbol is defined you can use this interface safely threaded applications'. Remember that it slightly degrades performance'.
Even if INOTIFY_THREAD_SAFE is defined some classes stay unsafe'. If you must use them (must you?) in more than one thread concurrently you need to implement explicite locking'.
You need not to define INOTIFY_THREAD_SAFE in that cases where the application is multithreaded but all the inotify infrastructure will be managed only in one thread'. This is the recommended way'.
Locking may fail (it is very rare but not impossible)'. In this case an exception is thrown'. But if unlocking fails in case of an error it does nothing (this failure is ignored)'.

  #define IN_LOCK_DONE

  #define IN_LOCK_INIT

  #define IN_READ_BEGIN

  #define IN_READ_END

  #define IN_READ_END_NOTHROW

  #define IN_WRITE_BEGIN

  #define IN_WRITE_END

  #define IN_WRITE_END_NOTHROW

  #define INOTIFY_BUFLEN (1024 * (INOTIFY_EVENT_SIZE + 16))
Event buffer length'.

  #define INOTIFY_EVENT_SIZE (sizeof(struct inotify_event))
Event struct size'.

Typedef Documentation

  typedef std::map<int32_t, InotifyWatch*> IN_WATCH_MAP
Mapping from watch descriptors to watch objects'.

  typedef std::map<std::string, InotifyWatch*> IN_WP_MAP
Mapping from paths to watch objects'.

Enumeration Type Documentation

  enum InotifyCapability_t
inotify capability/limit identifiers
Enumerator:
IN_MAX_EVENTS
    max'. events in the kernel queue
IN_MAX_INSTANCES
    max'. inotify file descriptors per process
IN_MAX_WATCHES
    max'. watches per file descriptor

Author
Generated automatically by Doxygen for incron from the source code'.