Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

KDB::Plugin Class Reference

A Plugin handles all connections related to a DBMS (Postgres, MySQL, and so on). More...

#include <plugin.h>

Inheritance diagram for KDB::Plugin:

KDB::Object KDB::QObject List of all members.

Public Methods

 Plugin (const char * name = 0, QObject *parent = 0)
virtual ~Plugin ()
virtual PluginInfo info () = 0
 Returns the information about the plugin.

ConnectionopenConnection (const QString &host, int port = 0, const QString &user = QString::null, const QString &password = QString::null)
 Create a connection, append it to the connection list, open the connection and return it.

virtual ConnectionaddConnection (const QString &host, int port = 0, const QString &user = QString::null, const QString &password = QString::null)
 Same as connect, but does not perform the connection.

void remove (Connection *)
 Removes a connection from the list of connections. More...

ConnectionfindConnection (const QString &host, const QString & user)
 Return a connection to the specified host for the given user. More...

ConnectionIterator begin ()
 Returns an iterator that points to the first Connection object.

virtual bool provides (capability cap) = 0
 returns true if the plugin can handle a given capability.

virtual CapabilitycreateObject (capability cap) = 0
 Create an object that will handle the specific capability if the plugin does not support a capability, an exception is thrown.


Signals

void closing (Plugin *)

Protected Methods

void registerConnection (Connection *)
virtual ConnectorcreateConnector () = 0

Protected Slots

void slotConnectionClose (Connection *)

Friends

class  Connection

Detailed Description

A Plugin handles all connections related to a DBMS (Postgres, MySQL, and so on).

This class allows traversal of the list of available connections, and can be queried about general informations and implemented capabilities through provides()

The Plugin is also responsible of creating "capability objects", that is objects that can implement a specific capabilities.

Actually we have found the following capabilities:

Author(s):
Alessandro Praduroux <pradu@thekompany.com> , Michael Koch <m_kock@bigfoot.de>
Version:
kdbcore 0.0.2


Constructor & Destructor Documentation

Plugin ( const char * name = 0,
QObject * parent = 0 )
 

virtual ~Plugin ( ) [virtual]
 


Member Function Documentation

Connection * addConnection ( const QString & host,
int port = 0,
const QString & user = QString::null,
const QString & password = QString::null ) [virtual]
 

Same as connect, but does not perform the connection.

ConnectionIterator begin ( )
 

Returns an iterator that points to the first Connection object.

void closing ( Plugin * ) [signal]
 

virtual Connector* createConnector ( ) [protected, pure virtual]
 

Capability * createObject ( capability cap ) [pure virtual]
 

Create an object that will handle the specific capability if the plugin does not support a capability, an exception is thrown.

Connection * findConnection ( const QString & host,
const QString & user )
 

Return a connection to the specified host for the given user.

If no connection is found 0L is returned.

PluginInfo info ( ) [pure virtual]
 

Returns the information about the plugin.

Connection * openConnection ( const QString & host,
int port = 0,
const QString & user = QString::null,
const QString & password = QString::null )
 

Create a connection, append it to the connection list, open the connection and return it.

bool provides ( capability cap ) [pure virtual]
 

returns true if the plugin can handle a given capability.

void registerConnection ( Connection * ) [protected]
 

void remove ( Connection * )
 

Removes a connection from the list of connections.

This will delete the connection, so make sure to not have dangling reference to the connection.

void slotConnectionClose ( Connection * ) [protected, slot]
 


Friends And Related Function Documentation

class Connection [friend]
 


The documentation for this class was generated from the following file:
Generated at Fri Sep 29 16:32:22 2000 for KDB by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000