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

Protected Methods


Detailed Description

This class is used to implement new database providers.

void  addProvider (const QString &provider)

addProvider

[protected]

Add a provider to the list that this provider can handle.

void  removeProvider (const QString &provider)

removeProvider

[protected]

Remove a provider from the list that this provider can handle.

 toConnectionProvider (const QString &provider,bool add=true)

toConnectionProvider

Create a new provider with the specified name.

Parameters:
providerName of the provider.

 ~toConnectionProvider ()

~toConnectionProvider

[virtual]

Destructor.

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

provideConnection

[pure virtual]

Create an implementation of a connection to this database.

Returns: A connection implementation created with new.

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

providedModes

[virtual]

List the available modes for this database.

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

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

providedHosts

[virtual]

List the available hosts this database provider knows about.

Returns: A list of hosts.

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

providedDatabases

[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.

void  initialize (void)

initialize

[virtual]

Will be called after program has been started and before connections have been opened. Use for initialization.

QWidgetproviderConfigurationTab (const QString &provider,QWidget *parent)

providerConfigurationTab

[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.

QWidgetconfigurationTab (const QString &provider,QWidget *parent)

configurationTab

[static]

Get a list of names for providers.

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.

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. Observe that the settings are stored under the main provider name as passed to the toConnectionProvider constructor.

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. Observe that the settings are stored under the main provider name as passed to the toConnectionProvider constructor.

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

void  initializeAll (void)

initializeAll

[static]

Call all initializers