- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

# uds_connection.h

Go to the documentation of this file.

    00001
    00002
    00003
    00004 /***********************************************************************
    00005  Copyright (c) 2007-2008 by Educational Technology Resources, Inc.
    00006  Others may also hold copyrights on code in this file.  See the
    00007  CREDITS.txt file in the top directory of the distribution for details.
    00008
    00009  This file is part of MySQL++.
    00010
    00011  MySQL++ is free software; you can redistribute it and/or modify it
    00012  under the terms of the GNU Lesser General Public License as published
    00013  by the Free Software Foundation; either version 2.1 of the License, or
    00014  (at your option) any later version.
    00015
    00016  MySQL++ is distributed in the hope that it will be useful, but WITHOUT
    00017  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    00018  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
    00019  License for more details.
    00020
    00021  You should have received a copy of the GNU Lesser General Public
    00022  License along with MySQL++; if not, write to the Free Software
    00023  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
    00024  USA
    00025 ***********************************************************************/
    00026
    00027 #if !defined(MYSQLPP_UDS_CONNECTION_H)
    00028 #define MYSQLPP_UDS_CONNECTION_H
    00029
    00030 #include "connection.h"
    00031
    00032 namespace mysqlpp {
    00033
    00038
    00039 class UnixDomainSocketConnection : public Connection
    00040 {
    00041 public:
    00043         UnixDomainSocketConnection() :
    00044         Connection()
    00045         {
    00046         }
    00047
    00060         UnixDomainSocketConnection(const char* path, const char* db = 0,
    00061                         const char* user = 0, const char* password = 0) :
    00062         Connection()
    00063         {
    00064                 connect(path, db, user, password);
    00065         }
    00066
    00071         UnixDomainSocketConnection(const UnixDomainSocketConnection& other) :
    00072         Connection(other)
    00073         {
    00074         }
    00075
    00077         ~UnixDomainSocketConnection() { }
    00078
    00087         bool connect(const char* path, const char* db = 0,
    00088                         const char* user = 0, const char* password = 0);
    00089
    00098         static bool is_socket(const char* path, std::string* error = 0);
    00099
    00100 private:
    00104         UnixDomainSocketConnection(bool) { }
    00105         UnixDomainSocketConnection(const char*, const char*, const char*,
    00106                         const char*, unsigned int) { }
    00107
    00110         bool connect(const char*, const char*, const char*, const char*,
    00111                         unsigned int) { return false; }
    00112 };
    00113
    00114
    00115 } // end namespace mysqlpp
    00116
    00117 #endif // !defined(MYSQLPP_UDS_CONNECTION_H)
    00118