An authenticated Microsoft SQL Server connection info. More...
#include <MSSQLConnectionInfo.h>
Public Member Functions | |
const std::wstring & | GetIPAddress () const |
get the database ip address or host name | |
void | SetIPAddress (const std::wstring &ipaddress) |
set the database ip address or host name | |
int | GetPort () const |
get the database port number | |
void | SetPort (int port) |
set the database port number | |
AppSecInc::Databases::ODBC::ODBCConnectionProtocol | GetProtocol () const |
get the connection protocol: TCP/IP or named pipes | |
void | SetProtocol (AppSecInc::Databases::ODBC::ODBCConnectionProtocol protocol) |
set the connection protocol | |
bool | GetTrustedAuth () const |
get whether to use trusted auth | |
void | SetTrustedAuth (bool value) |
set whether to use trusted auth | |
const std::wstring & | GetUsername () const |
get username | |
void | SetUsername (const std::wstring &username) |
set username | |
const std::wstring & | GetPassword () const |
get password | |
void | SetPassword (const std::wstring &password) |
set password | |
const std::wstring & | GetDatabase () const |
get default database name | |
void | SetDatabase (const std::wstring &database) |
set default database name | |
const std::wstring & | GetAppName () const |
get application name | |
void | SetAppName (const std::wstring &value) |
set application name | |
const std::wstring & | GetInstanceName () const |
get the database instance name | |
void | SetInstanceName (const std::wstring &instancename) |
set the database instance name | |
const std::wstring & | GetNamedPipeValue () const |
get the instance named pipe value | |
void | SetNamedPipeValue (const std::wstring &namedpipe) |
set the instance named pipe value | |
MSSQLConnectionInfo (const MSSQLConnectionInfo &) | |
constructors/destructors | |
MSSQLConnectionInfo (const std::wstring &ipaddress=DEFAULT_IPADDRESS, int port=DEFAULT_PORT) | |
~MSSQLConnectionInfo () | |
void | operator= (const MSSQLConnectionInfo &) |
std::wstring | GetConnectionString () const |
get the connection string | |
Static Public Attributes | |
static LPCWSTR | DEFAULT_IPADDRESS = "localhost" |
the default ip address | |
static const int | INVALID_PORT = -1 |
an invalid port | |
static const int | DEFAULT_PORT = 1433 |
the default port | |
static LPCWSTR | DefaultInstanceName = "MSSQLSERVER" |
the default instance name; MSSQLSERVER | |
Protected Attributes | |
std::wstring | _ipaddress |
the database ip address | |
int | _port |
the database port | |
AppSecInc::Databases::ODBC::ODBCConnectionProtocol | _protocol |
the connection protocol to use; default is unspecified | |
std::wstring | _instancename |
the name of the database instance | |
bool | _trusted_auth |
use trusted auth (windows auth) | |
std::wstring | _username |
username | |
std::wstring | _password |
password | |
std::wstring | _database |
database name | |
std::wstring | _appname |
application name connecting to the remote database | |
std::wstring | _namedpipe |
named pipe for the database instance |
An authenticated Microsoft SQL Server connection info.
MSSQLConnectionInfo::MSSQLConnectionInfo | ( | const MSSQLConnectionInfo & | info | ) |
constructors/destructors
MSSQLConnectionInfo::MSSQLConnectionInfo | ( | const std::wstring & | ipaddress = DEFAULT_IPADDRESS , |
int | port = DEFAULT_PORT |
||
) |
MSSQLConnectionInfo::~MSSQLConnectionInfo | ( | ) |
const std::wstring& AppSecInc::Databases::MSSQL::MSSQLConnectionInfo::GetAppName | ( | ) | const [inline] |
get application name
std::wstring MSSQLConnectionInfo::GetConnectionString | ( | ) | const [virtual] |
get the connection string
Implements AppSecInc::Databases::ODBC::ODBCConnectionInfo.
const std::wstring& AppSecInc::Databases::MSSQL::MSSQLConnectionInfo::GetDatabase | ( | ) | const [inline] |
get default database name
const std::wstring& AppSecInc::Databases::MSSQL::MSSQLConnectionInfo::GetInstanceName | ( | ) | const [inline] |
get the database instance name
const std::wstring& AppSecInc::Databases::MSSQL::MSSQLConnectionInfo::GetIPAddress | ( | ) | const [inline] |
get the database ip address or host name
const std::wstring& AppSecInc::Databases::MSSQL::MSSQLConnectionInfo::GetNamedPipeValue | ( | ) | const [inline] |
get the instance named pipe value
const std::wstring& AppSecInc::Databases::MSSQL::MSSQLConnectionInfo::GetPassword | ( | ) | const [inline] |
get password
int AppSecInc::Databases::MSSQL::MSSQLConnectionInfo::GetPort | ( | ) | const [inline] |
get the database port number
AppSecInc::Databases::ODBC::ODBCConnectionProtocol AppSecInc::Databases::MSSQL::MSSQLConnectionInfo::GetProtocol | ( | ) | const [inline] |
get the connection protocol: TCP/IP or named pipes
bool AppSecInc::Databases::MSSQL::MSSQLConnectionInfo::GetTrustedAuth | ( | ) | const [inline] |
get whether to use trusted auth
const std::wstring& AppSecInc::Databases::MSSQL::MSSQLConnectionInfo::GetUsername | ( | ) | const [inline] |
get username
void MSSQLConnectionInfo::operator= | ( | const MSSQLConnectionInfo & | info | ) |
void AppSecInc::Databases::MSSQL::MSSQLConnectionInfo::SetAppName | ( | const std::wstring & | value | ) | [inline] |
set application name
void AppSecInc::Databases::MSSQL::MSSQLConnectionInfo::SetDatabase | ( | const std::wstring & | database | ) | [inline] |
set default database name
void AppSecInc::Databases::MSSQL::MSSQLConnectionInfo::SetInstanceName | ( | const std::wstring & | instancename | ) | [inline] |
set the database instance name
void AppSecInc::Databases::MSSQL::MSSQLConnectionInfo::SetIPAddress | ( | const std::wstring & | ipaddress | ) | [inline] |
set the database ip address or host name
void AppSecInc::Databases::MSSQL::MSSQLConnectionInfo::SetNamedPipeValue | ( | const std::wstring & | namedpipe | ) | [inline] |
set the instance named pipe value
void AppSecInc::Databases::MSSQL::MSSQLConnectionInfo::SetPassword | ( | const std::wstring & | password | ) | [inline] |
set password
void AppSecInc::Databases::MSSQL::MSSQLConnectionInfo::SetPort | ( | int | port | ) | [inline] |
set the database port number
void AppSecInc::Databases::MSSQL::MSSQLConnectionInfo::SetProtocol | ( | AppSecInc::Databases::ODBC::ODBCConnectionProtocol | protocol | ) | [inline] |
set the connection protocol
void AppSecInc::Databases::MSSQL::MSSQLConnectionInfo::SetTrustedAuth | ( | bool | value | ) | [inline] |
set whether to use trusted auth
void AppSecInc::Databases::MSSQL::MSSQLConnectionInfo::SetUsername | ( | const std::wstring & | username | ) | [inline] |
set username
std::wstring AppSecInc::Databases::MSSQL::MSSQLConnectionInfo::_appname [protected] |
application name connecting to the remote database
std::wstring AppSecInc::Databases::MSSQL::MSSQLConnectionInfo::_database [protected] |
database name
std::wstring AppSecInc::Databases::MSSQL::MSSQLConnectionInfo::_instancename [protected] |
the name of the database instance
std::wstring AppSecInc::Databases::MSSQL::MSSQLConnectionInfo::_ipaddress [protected] |
the database ip address
std::wstring AppSecInc::Databases::MSSQL::MSSQLConnectionInfo::_namedpipe [protected] |
named pipe for the database instance
std::wstring AppSecInc::Databases::MSSQL::MSSQLConnectionInfo::_password [protected] |
password
int AppSecInc::Databases::MSSQL::MSSQLConnectionInfo::_port [protected] |
the database port
AppSecInc::Databases::ODBC::ODBCConnectionProtocol AppSecInc::Databases::MSSQL::MSSQLConnectionInfo::_protocol [protected] |
the connection protocol to use; default is unspecified
bool AppSecInc::Databases::MSSQL::MSSQLConnectionInfo::_trusted_auth [protected] |
use trusted auth (windows auth)
std::wstring AppSecInc::Databases::MSSQL::MSSQLConnectionInfo::_username [protected] |
username
LPCWSTR MSSQLConnectionInfo::DEFAULT_IPADDRESS = "localhost" [static] |
the default ip address
const int AppSecInc::Databases::MSSQL::MSSQLConnectionInfo::DEFAULT_PORT = 1433 [static] |
the default port
LPCWSTR MSSQLConnectionInfo::DefaultInstanceName = "MSSQLSERVER" [static] |
the default instance name; MSSQLSERVER
const int AppSecInc::Databases::MSSQL::MSSQLConnectionInfo::INVALID_PORT = -1 [static] |
an invalid port
© Application Security Inc. - All Rights Reserved | http://msiext.codeplex.com |