wnp_connection.h
Go to the documentation of this file.
/***********************************************************************
Copyright (c) 2007-2008 by Educational Technology Resources, Inc.
Others may also hold copyrights on code in this file. See the
CREDITS.txt file in the top directory of the distribution for details.
This file is part of MySQL++.
MySQL++ is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
MySQL++ is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with MySQL++; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
USA
***********************************************************************/
#if !defined(MYSQLPP_WNP_CONNECTION_H)
#define MYSQLPP_WNP_CONNECTION_H
#include "connection.h"
namespace mysqlpp {
class MYSQLPP_EXPORT WindowsNamedPipeConnection : public Connection
{
public:
WindowsNamedPipeConnection() :
Connection()
{
}
WindowsNamedPipeConnection(const char* db, const char* user = 0,
const char* password = 0) :
Connection()
{
connect(db, user, password);
}
WindowsNamedPipeConnection(const WindowsNamedPipeConnection& other) :
Connection(other)
{
}
~WindowsNamedPipeConnection() { }
bool connect(const char* db = 0, const char* user = 0,
const char* password = 0);
static bool is_wnp(const char* server);
private:
WindowsNamedPipeConnection(bool) { }
WindowsNamedPipeConnection(const char*, const char*, const char*,
const char*, unsigned int) { }
bool connect(const char*, const char*, const char*, const char*,
unsigned int) { return false; }
};
} // end namespace mysqlpp
#endif // !defined(MYSQLPP_WNP_CONNECTION_H)
connection.h
Declares the Connection class.
mysqlpp::Connection
Manages the connection to the database server.
Definition: connection.h:59
mysqlpp::WindowsNamedPipeConnection::WindowsNamedPipeConnection
WindowsNamedPipeConnection(const char *db, const char *user=0, const char *password=0)
Create object and connect to database server over Windows named pipes in one step.
Definition: wnp_connection.h:55
mysqlpp::WindowsNamedPipeConnection
Specialization of Connection for Windows named pipes.
Definition: wnp_connection.h:39
mysqlpp::WindowsNamedPipeConnection::WindowsNamedPipeConnection
WindowsNamedPipeConnection(const WindowsNamedPipeConnection &other)
Establish a new connection using the same parameters as an existing connection.
Definition: wnp_connection.h:66
mysqlpp::WindowsNamedPipeConnection::WindowsNamedPipeConnection
WindowsNamedPipeConnection()
Create object without connecting it to the MySQL server.
Definition: wnp_connection.h:43
mysqlpp::WindowsNamedPipeConnection::~WindowsNamedPipeConnection
~WindowsNamedPipeConnection()
Destroy object.
Definition: wnp_connection.h:72