|
|
This class is used to implement new database providers.
void addProvider (const QCString &provider)
| addProvider |
[protected]
Add a provider to the list that this provider can handle.
void removeProvider (const QCString &provider)
| removeProvider |
[protected]
Remove a provider from the list that this provider can handle.
toConnectionProvider (const QCString &provider,bool add=true)
| toConnectionProvider |
Create a new provider with the specified name.
Parameters:
provider | Name of the provider. |
~toConnectionProvider ()
| ~toConnectionProvider |
[virtual]
Destructor.
toConnection::connectionImpl * provideConnection (const QCString &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 QCString &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 QCString &provider)
| providedHosts |
[virtual]
List the available hosts this database provider knows about.
Returns: A list of hosts.
std::list<QString> providedDatabases (const QCString &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:
host | Host to return connections for. |
user | That might be needed. |
password | That 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.
QWidget * providerConfigurationTab (const QCString &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.
QWidget * configurationTab (const QCString &provider,QWidget *parent)
| configurationTab |
[static]
Get a list of names for providers.
std::list<QCString> providers ()
| providers |
[static]
Get a list of names for providers.
std::list<QString> modes (const QCString &provider)
| modes |
[static]
Get a list of modes for a given provider.
toConnection::connectionImpl * connection (const QCString &provider,toConnection *conn)
| connection |
[static]
Implement a connection for a given provider.
Parameters:
provider | Provider to implement. |
conn | Connection to create implementation for. |
std::list<QString> hosts (const QCString &provider)
| hosts |
[static]
Get a list of hosts this provider knows about.
std::list<QString> databases (const QCString &provider,const QString &host,
const QString &user,const QString &pwd)
| databases |
[static]
Get a list of databases for a given provider and host.
Parameters:
provider | Provider to fetch databases for. |
host | Host to fetch databases for. |
user | That might be needed. |
password | That might be needed. |
Returns: List of known databases.
const QString & config (const QCString &tag,const QCString &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:
tag | The name of the configuration setting. |
def | Contents of this setting. |
void setConfig (const QCString &tag,const QCString &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:
tag | The name of the configuration setting. |
def | Default value of the setting, if it is not available. |
void initializeAll (void)
| initializeAll |
[static]
Call all initializers