class toConnectionProvider

This class is used to implement new database providers. More...

Contains pure virtuals
Definition#include <toconnection.h>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Static Methods


Detailed Description

This class is used to implement new database providers.

 toConnectionProvider (const QString &provider)

toConnectionProvider

Create a new provider with the specified name.

Parameters:
providerName of the provider.

 ~toConnectionProvider ()

~toConnectionProvider

[virtual]

Destructor.

const QStringprovider (void)

provider

[const]

Get name of provider.

toConnection::connectionImplconnection (toConnection *conn)

connection

[pure virtual]

Create an implementation of a connection to this database.

Returns: A connection implementation created with new.

std::list<QString>  modes (void)

modes

[virtual]

List the available modes for this database.

Returns: A list of modes that the connection implementation understands.

std::list<QString>  hosts (void)

hosts

[virtual]

List the available hosts this database provider knows about.

Returns: A list of hosts.

std::list<QString>  databases (const QString &host, const QString &user, const QString &pwd)

databases

[pure virtual]

List the available databases this provider knows about for a given host.

Parameters:
hostHost to return connections for.
userThat might be needed.
passwordThat might be needed.

Returns: A list of databases available for a given host.

toConnectionProviderfetchProvider (const QString &provider)

fetchProvider

[static]

Get the provider object for a given provider name.

Parameters:
providerName of provider.

Returns: Reference to provider object.

std::list<QString>  providers ()

providers

[static]

Get a list of names for providers.

std::list<QString>  modes (const QString &provider)

modes

[static]

Get a list of modes for a given provider.

toConnection::connectionImplconnection (const QString &provider,toConnection *conn)

connection

[static]

Implement a connection for a given provider.

Parameters:
providerProvider to implement.
connConnection to create implementation for.

std::list<QString>  hosts (const QString &provider)

hosts

[static]

Get a list of hosts this provider knows about.

std::list<QString>  databases (const QString &provider,const QString &host, const QString &user,const QString &pwd)

databases

[static]

Get a list of databases for a given provider and host.

Parameters:
providerProvider to fetch databases for.
hostHost to fetch databases for.
userThat might be needed.
passwordThat might be needed.

Returns: List of known databases.

QWidgetconfigurationTab (QWidget *parent)

configurationTab

[virtual]

Create and return configuration tab for this connectiontype. The returned widget should also be a childclass of toSettingTab.

Returns: A pointer to the widget containing the setup tab for this tool or NULL of no settings are available.

const QStringconfig (const QString &tag,const QString &def)

config

Get connection specific settings.

Setting names are hierachical separated by ':' instead of '/' usually used in filenames. As an example all settings for the tool 'Example' would be under the 'Example:{settingname}' name.

Parameters:
tagThe name of the configuration setting.
defContents of this setting.

void  setConfig (const QString &tag,const QString &value)

setConfig

Change connectionspecific setting. Depending on the implementation this can change the contents on disk or not.

Setting names are hierachical separated by ':' instead of '/' usually used in filenames. As an example all settings for the tool 'Example' would be under the 'Example:{settingname}' name.

Parameters:
tagThe name of the configuration setting.
defDefault value of the setting, if it is not available.