login_info.h

Go to the documentation of this file.
00001 #ifndef DATABASE_LOGIN_INFO_CLASS
00002 #define DATABASE_LOGIN_INFO_CLASS
00003 
00004 /*****************************************************************************\
00005 *                                                                             *
00006 *  Name   : login_info                                                        *
00007 *  Author : Chris Koeritz                                                     *
00008 *                                                                             *
00009 *******************************************************************************
00010 * Copyright (c) 2008-$now By Author.  This program is free software; you can  *
00011 * redistribute it and/or modify it under the terms of the GNU General Public  *
00012 * License as published by the Free Software Foundation; either version 2 of   *
00013 * the License or (at your option) any later version.  This is online at:      *
00014 *     http://www.fsf.org/copyleft/gpl.html                                    *
00015 * Please send any updates to: fred@gruntose.com                               *
00016 \*****************************************************************************/
00017 
00018 #include "db_freetds_dll.h"
00019 
00020 #include <basis/istring.h>
00021 #include <basis/object_base.h>
00022 
00023 // forward.
00024 class ini_configurator;
00025 
00027 
00036 class DB_FREETDS_CLASS_STYLE database_login_info : public object_base
00037 {
00038 public:
00039   istring user_name;  
00040   istring password;  
00041 
00042   // the hostname where the database server resides.
00043   istring db_host;
00044   // port on that host where we can contact the db server.
00045   int db_port;
00046   // the instance is an alternative to the port.
00047   istring db_instance;
00048   
00049   istring database;  
00050   istring table_name;  
00051 
00052   istring db_section;  
00053 
00054   database_login_info(const istring &db_section);
00056 
00058   ~database_login_info();
00059 
00060   IMPLEMENT_CLASS_NAME("database_login_info");
00061 
00063   bool identical(const database_login_info &to_compare);
00064 
00066   void reset();
00067 
00069   bool read_info(ini_configurator &ini);
00070 
00071   static istring_object &freetds_config_file();
00073 
00074   bool update_freetds_configuration();
00076 
00079   bool replace_value(istring &modify, const istring &tag,
00080           const istring &replacement);
00082 
00084   static bool read_login_info(ini_configurator &ini,
00085           database_login_info &to_fill);
00086 };
00087 
00088 #endif  // outer guard.
00089 

Generated on Fri Nov 21 04:29:42 2008 for HOOPLE Libraries by  doxygen 1.5.1