2 /**************************************************************************
3 ** (c) Copyright 2002, Andromeda Technology & Automation
4 ***************************************************************************
5 ** MODULE INFORMATION *
6 ***********************
7 ** FILE NAME : gnucomo_config.cpp
8 ** SYSTEM NAME : Gnucomo - Gnu Computer Monitoring
9 ** VERSION NUMBER : $Revision: 1.2 $
11 ** DESCRIPTION : Implementation of the gnucomo_config class.
16 ***************************************************************************
17 ** ADMINISTRATIVE INFORMATION *
18 ********************************
19 ** ORIGINAL AUTHOR : Arjen Baart - arjen@andromeda.nl
20 ** CREATION DATE : Jul 24, 2002
21 ** LAST UPDATE : Nov 02, 2002
23 **************************************************************************/
25 /*****************************
26 $Log: gnucomo_config.cpp,v $
27 Revision 1.2 2002-11-04 10:13:36 arjen
28 Use proper namespace for iostream classes
30 Revision 1.1 2002/10/05 10:25:49 arjen
31 Creation of gcm_input and a first approach to a web interface
33 *****************************/
35 static const char *RCSID = "$Id: gnucomo_config.cpp,v 1.2 2002-11-04 10:13:36 arjen Exp $";
37 #include "gnucomo_config.h"
41 /*=========================================================================
43 ** SYNOPSIS : String gnucomo_config::Database()
45 ** RETURN VALUE : The database access string
53 ** LAST MODIFIED : Nov 02, 2002
54 **=========================================================================
57 String gnucomo_config::Database()
60 String access_string("");
62 param = find_parameter("database", "name");
65 access_string += "dbname=" + param;
68 param = find_parameter("database", "user");
71 access_string += " user=" + param;
73 param = find_parameter("database", "password");
76 access_string += " password=" + param;
79 param = find_parameter("database", "host");
82 access_string += " host=" + param;
84 param = find_parameter("database", "port");
87 access_string += " port=" + param;