ict-main.cpp(3)

NAME
ict-main.cpp -

inotify cron table manipulator main file

SYNOPSIS

#include <argp.h>
#include <pwd.h>
#include <string>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <sys/inotify.h>
#include <fcntl.h>
#include <stdlib.h>
#include <limits.h>
#include <cstring>
#include <cstdio>
#include 'inotify-cxx.h'
#include 'appargs.h'
#include 'incron.h'
#include 'incrontab.h'
#include 'incroncfg.h'

  Defines
#define INCRON_ALT_EDITOR '/etc/alternatives/editor'
Alternative editor'.
#define INCRON_DEFAULT_EDITOR 'vim'
Default (hard-wired) editor'.
#define INCRONTAB_VERSION INCRONTAB_NAME ' ' INCRON_VERSION
incrontab version string
#define INCRONTAB_DESCRIPTION
incrontab description string
#define INCRONTAB_HELP
incrontab help string

  Functions
bool copy_from_file (const std::string &rPath, const std::string &rUser)
Copies a file to an user table'.
bool remove_table (const std::string &rUser)
Removes an user table'.
bool list_table (const std::string &rUser)
Lists an user table'.
bool edit_table (const std::string &rUser)
Allows to edit an user table'.
void list_types ()
Prints the list of all available inotify event types'.
bool reload_table (const std::string &rUser)
Reloads an user table'.
int main (int argc, char **argv)

Detailed Description

inotify cron table manipulator main file inotify cron system

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

This program is free software; you can use it, redistribute it and/or modify it under the terms of the GNU General Public License, version 2 (see LICENSE-GPL)'.

Credits: kolter (fix for segfaulting on --user) Christian Ruppert (new include to build with GCC 4'.4+)

Define Documentation

  #define INCRON_ALT_EDITOR '/etc/alternatives/editor'

Alternative editor'.

  #define INCRON_DEFAULT_EDITOR 'vim'

Default (hard-wired) editor'.

  #define INCRONTAB_DESCRIPTION Value:

incrontab description string

  #define INCRONTAB_HELP Value:

INCRONTAB_DESCRIPTION 'n'           'usage: incrontab [<options>] <operation>           '       incrontab [<options>] <FILE-TO-IMPORT>n'           '<operation> may be one of the following:           '  -?, --about                  gives short information about program           '  -h, --help                   prints this help text           '  -l, --list                   lists user table           '  -r, --remove                 removes user table           '  -e, --edit                   provides editing user table           '  -t, --types                  list supported event types           '  -d, --reload                 request incrond to reload user table           '  -V, --version                prints program versionn'           '           'These options may be used:           '  -u <USER>, --user=<USER>     overrides current user (requires root privileges)           '  -f <FILE>, --config=<FILE>   overrides default configuration file  (requires root privileges)n'           'For reporting bugs please use http://bts.aiken.cz

incrontab help string

  #define INCRONTAB_VERSION INCRONTAB_NAME ' ' INCRON_VERSION

incrontab version string

Function Documentation

  bool copy_from_file (const std::string &rPath, const std::string &rUser)

Copies a file to an user table'. Parameters:
    rPath path to file
    rUser user name

Returns:
    true = success, false = failure

  bool edit_table (const std::string &rUser)

Allows to edit an user table'. Parameters:
    rUser user name

Returns:
    true = success, false = failure

Attention:
    This function is very complex and may contain various bugs including security ones'. Please keep it in mind'.'.

  bool list_table (const std::string &rUser)

Lists an user table'. Parameters:
    rUser user name

Returns:
    true = success, false = failure

  void list_types ()

Prints the list of all available inotify event types'.

  int main (intargc, char **argv)

  bool reload_table (const std::string &rUser)

Reloads an user table'. Parameters:
    rUser user name

Returns:
    true = success, false = otherwise

  bool remove_table (const std::string &rUser)

Removes an user table'. Parameters:
    rUser user name

Returns:
    true = success, false = failure

Author

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