cms_cfg.hh
1 /******************************************************************** 2 * Description: cms_cfg.hh 3 * cms_config -- function which reads configuration file. 4 * 5 * Derived from a work by Fred Proctor & Will Shackleford 6 * 7 * Author: 8 * License: LGPL Version 2 9 * System: Linux 10 * 11 * Copyright (c) 2004 All rights reserved. 12 * 13 * Last change: 14 ********************************************************************/ 15 16 #ifndef CMS_CFG_HH 17 #define CMS_CFG_HH 18 19 class CMS; 20 21 /* Config File Definitions. */ 22 #ifndef CMS_CONFIG_LINELEN 23 #define CMS_CONFIG_LINELEN 200 24 #endif 25 #ifndef CMS_CONFIG_COMMENTCHAR 26 #define CMS_CONFIG_COMMENTCHAR '#' 27 #endif 28 29 #ifdef __cplusplus 30 extern "C" { 31 #endif 32 33 /* Function Prototypes. */ 34 extern int cms_config(CMS ** c, const char *b, const char *p, const char *f, 35 int set_to_server = 0, int set_to_master = 0); 36 37 extern int cms_copy(CMS ** dest, CMS * src, 38 int set_to_server = 0, int set_to_master = 0); 39 40 extern int cms_create_from_lines(CMS ** cms, const char *buffer_line, 41 const char *proc_line, int set_to_server = 0, int set_to_master = 0); 42 43 extern int cms_create(CMS ** cms, const char *buf_line, const char *proc_line, 44 const char *buffer_type, const char *proc_type, 45 int set_to_server = 0, int set_to_master = 0); 46 47 extern int load_nml_config_file(const char *file); 48 extern int unload_nml_config_file(const char *file); 49 // extern int print_loaded_nml_config_file_list(); 50 // extern int unload_all_nml_config_files(); 51 extern char *get_buffer_line(const char *buf, const char *file); 52 extern int hostname_matches_bufferline(char *bufline); 53 54 #ifdef __cplusplus 55 } 56 #endif 57 #endif /* !defined(CMS_CFG_HH) */