"Fossies" - the Fresh Open Source Software Archive

Member "ircd-hybrid-8.2.26/include/conf_db.h" (31 May 2019, 2342 Bytes) of package /linux/privat/ircd-hybrid-8.2.26.tgz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "conf_db.h" see the Fossies "Dox" file reference documentation and the last Fossies "Diffs" side-by-side code changes report: 8.2.24_vs_8.2.25.

    1 /*
    2  *  ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd)
    3  *
    4  *  Copyright (c) 1996-2009 by Andrew Church <achurch@achurch.org>
    5  *  Copyright (c) 2012-2019 ircd-hybrid development team
    6  *
    7  *  This program is free software; you can redistribute it and/or modify
    8  *  it under the terms of the GNU General Public License as published by
    9  *  the Free Software Foundation; either version 2 of the License, or
   10  *  (at your option) any later version.
   11  *
   12  *  This program is distributed in the hope that it will be useful,
   13  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
   14  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   15  *  GNU General Public License for more details.
   16  *
   17  *  You should have received a copy of the GNU General Public License
   18  *  along with this program; if not, write to the Free Software
   19  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
   20  *  USA
   21  */
   22 
   23 /*! \file conf_db.h
   24  * \brief Includes file utilities for database handling
   25  * \version $Id: conf_db.h 8751 2019-01-01 11:06:50Z michael $
   26  */
   27 
   28 #ifndef INCLUDED_conf_db_h
   29 #define INCLUDED_conf_db_h
   30 
   31 struct dbFILE
   32 {
   33   char mode;  /**< 'r' for reading, 'w' for writing */
   34   FILE *fp;  /**< The file pointer itself */
   35   char filename[HYB_PATH_MAX + 1];  /**< Name of the database file */
   36   char tempname[HYB_PATH_MAX + 1];  /**< Name of the temporary file (for writing) */
   37 };
   38 
   39 extern bool read_uint16(uint16_t *, struct dbFILE *);
   40 extern bool write_uint16(uint16_t, struct dbFILE *);
   41 extern bool read_uint32(uint32_t *, struct dbFILE *);
   42 extern bool write_uint32(uint32_t, struct dbFILE *);
   43 extern bool read_uint64(uint64_t *, struct dbFILE *);
   44 extern bool write_uint64(uint64_t, struct dbFILE *);
   45 extern bool read_string(char **, struct dbFILE *);
   46 extern bool write_string(const char *, struct dbFILE *);
   47 
   48 extern void load_kline_database(const char *);
   49 extern void save_kline_database(const char *);
   50 extern void load_dline_database(const char *);
   51 extern void save_dline_database(const char *);
   52 extern void load_xline_database(const char *);
   53 extern void save_xline_database(const char *);
   54 extern void load_resv_database(const char *);
   55 extern void save_resv_database(const char *);
   56 extern void save_all_databases(void *);
   57 
   58 enum { DATABASE_UPDATE_TIMEOUT = 300 };
   59 enum { KLINE_DB_VERSION = 1 };
   60 #endif