ini_config_priv.h

00001 /*
00002     INI LIBRARY
00003 
00004     Header for the internal structures used by INI interface.
00005 
00006     Copyright (C) Dmitri Pal <dpal@redhat.com> 2010
00007 
00008     INI Library is free software: you can redistribute it and/or modify
00009     it under the terms of the GNU Lesser General Public License as published by
00010     the Free Software Foundation, either version 3 of the License, or
00011     (at your option) any later version.
00012 
00013     INI Library is distributed in the hope that it will be useful,
00014     but WITHOUT ANY WARRANTY; without even the implied warranty of
00015     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016     GNU Lesser General Public License for more details.
00017 
00018     You should have received a copy of the GNU Lesser General Public License
00019     along with INI Library.  If not, see <http://www.gnu.org/licenses/>.
00020 */
00021 
00022 #ifndef INI_CONFIG_PRIV_H
00023 #define INI_CONFIG_PRIV_H
00024 
00025 #include "collection.h"
00026 
00027 /* Configuration object */
00028 struct ini_cfgobj {
00029     /* For now just a collection */
00030     struct collection_item *cfg;
00031     /* Boundary */
00032     uint32_t boundary;
00033     /*...         */
00034     /* Statistics? Timestamps? When created? Modified? - TBD */
00035     /*...         */
00036 };
00037 
00038 
00039 /* Configuration file object */
00040 struct ini_cfgfile {
00041     /***********************************/
00042     /* Externally controlled variables */
00043     /***********************************/
00044     /* File name for the configuration file */
00045     char *filename;
00046     /* File stream */
00047     FILE *file;
00048     /* File descriptor that is passed in */
00049     int fd;
00050     /* Error level */
00051     int error_level;
00052     /* Collision flags - define how to merge things */
00053     uint32_t collision_flags;
00054     /* Collision flags - define how to merge things */
00055     uint32_t metadata_flags;
00056     /**********************/
00057     /* Internal variables */
00058     /**********************/
00059     /* Collection of errors detected during parsing */
00060     struct collection_item *error_list;
00061     /* Metadata about the file */
00062     struct collection_item *metadata;
00063     /* Count of error lines */
00064     unsigned count;
00065 };
00066 
00067 /* Parsing error */
00068 struct ini_parse_error {
00069     unsigned line;
00070     int error;
00071 };
00072 
00073 /* Internal cleanup callback */
00074 void ini_cleanup_cb(const char *property,
00075                     int property_len,
00076                     int type,
00077                     void *data,
00078                     int length,
00079                     void *custom_data);
00080 
00081 #endif

Generated on Thu Dec 9 12:11:52 2010 for libini_config by  doxygen 1.4.7