Objective Systems, Inc.  

ooConfig.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2004-2010 by Objective Systems, Inc.
00003  *
00004  * This software is furnished under an open source license and may be
00005  * used and copied only in accordance with the terms of this license.
00006  * The text of the license may generally be found in the root
00007  * directory of this installation in the LICENSE.txt file.  It
00008  * can also be viewed online at the following URL:
00009  *
00010  *   http://www.obj-sys.com/open/license.html
00011  *
00012  * Any redistributions of this file including modified versions must
00013  * maintain this copyright notice.
00014  *
00015  *****************************************************************************/
00025 #ifndef _OOCONFIG_H_
00026 #define _OOCONFIG_H_
00027 
00028 #include "ooCommon.h"
00029 #include "dlist.h"
00030 
00031 /* Configuration name/value pair */
00032 
00033 typedef struct OOConfigNVP {
00034    char* name;
00035    char* value;
00036 } OOConfigNVP;
00037 
00038 /* Configuration section */
00039 
00040 typedef struct OOConfigSection {
00041    char* sectionName;
00042    DList nameValuePairs; /* list of OOConfigNVP */
00043 } OOConfigSection;
00044 
00045 /* Configuration file is a list of configuration sections */
00046 
00047 typedef struct OOConfigFile {
00048    OOCTXT* pctxt;
00049    OOBOOL  bOwnContext;
00050    DList   sections;  /* List of OOConfigSection */
00051 } OOConfigFile;
00052 
00053 #ifdef __cplusplus
00054 extern "C" {
00055 #endif
00056 
00065 EXTERN int ooConfigInit (OOConfigFile* pconfig);
00066 
00075 EXTERN void ooConfigCtxtInit (OOCTXT* pctxt, OOConfigFile* pconfig);
00076 
00086 EXTERN int ooConfigFileRead (const char* filename, OOConfigFile* pconfig);
00087 
00093 EXTERN void ooConfigDestroy (OOConfigFile* pconfig);
00094 
00100 EXTERN void ooConfigPrint (OOConfigFile* pconfig);
00101 
00102 #ifdef __cplusplus
00103 }
00104 #endif
00105 
00109 #endif

This file was last modified on 28 May 2010.
Objective Open H.323 Stack, 0.9.1