FX::TnFXSQLDBServer Class Reference

#include <TnFXSQLDB_ipc.h>

Inheritance diagram for FX::TnFXSQLDBServer:

Inheritance graph
[legend]

List of all members.


Detailed Description

Serves a database over an IPC channel.

The implementation of this class is trickier than it might be due to needing to be compatible with Tn's capability infrastructure, but the bonus is that it makes it very flexible.

By default, TnFXSQLDBServer refuses to serve everything FX::TnFXSQLDB_ipc requests for security. You must add databases which can be served using addDatabase() which accepts patterns. If the pattern matches, the database is served.

Public Member Functions

 TnFXSQLDBServer ()
TnFXSQLDBServeraddDatabase (const FXString &driverName, const FXString &dbname, const FXString &user="*", const QHostAddress &host=QHostAddress(), FXushort port=0)
bool removeDatabase (const FXString &driverName, const FXString &dbname, const FXString &user="*", const QHostAddress &host=QHostAddress(), FXushort port=0)
FXIPCChannel::HandledCode handleMsg (FXIPCMsg *msg)

Protected Member Functions

FXIPCChannelchannel () const throw ()
FXuint msgChunk () const throw ()
FXuint msgRouting () const throw ()
template<class msgchunk, class channel>
void setIPCChannel (channel *_channel, FXuint addToMsgType=msgchunk::BaseCode, FXuint _routing=0)
template<class msgacktype, class msgtype>
bool sendMsg (msgacktype *FXRESTRICT msgack, msgtype *FXRESTRICT msg, FXuint waitfor=FXINFINITE)
template<class msgacktype, class msgtype>
bool sendMsg (msgacktype &msgack, msgtype &msg, FXuint waitfor=FXINFINITE)
template<class msgtype>
bool sendMsg (msgtype *msg)
template<class msgtype>
bool sendMsg (msgtype &msg)
bool getMsgAck (FXIPCMsg *FXRESTRICT msgack, FXIPCMsg *FXRESTRICT msg, FXuint waitfor=FXINFINITE)
bool getMsgAck (FXIPCMsg &msgack, FXIPCMsg &msg, FXuint waitfor=FXINFINITE)


Constructor & Destructor Documentation

FX::TnFXSQLDBServer::TnFXSQLDBServer (  ) 

Instantiates a server of databases


Member Function Documentation

TnFXSQLDBServer& FX::TnFXSQLDBServer::addDatabase ( const FXString driverName,
const FXString dbname,
const FXString user = "*",
const QHostAddress host = QHostAddress(),
FXushort  port = 0 
)

Adds a database which is allowed to be served. You can use wildcards in the driver name, database name and user according to fxfilematch() - see FX::QDir for more. A null host and port means match anything.

bool FX::TnFXSQLDBServer::removeDatabase ( const FXString driverName,
const FXString dbname,
const FXString user = "*",
const QHostAddress host = QHostAddress(),
FXushort  port = 0 
)

Removes a previously added database.

FXIPCChannel* FX::FXIPCChannelIndirector::channel (  )  const throw () [inline, protected, inherited]

Returns the channel this is using.

FXuint FX::FXIPCChannelIndirector::msgChunk (  )  const throw () [inline, protected, inherited]

Returns the message chunk this is using.

FXuint FX::FXIPCChannelIndirector::msgRouting (  )  const throw () [inline, protected, inherited]

Returns the routing this is using.

template<class msgchunk, class channel>
void FX::FXIPCChannelIndirector::setIPCChannel ( channel *  _channel,
FXuint  addToMsgType = msgchunk::BaseCode,
FXuint  _routing = 0 
) [inline, protected, inherited]

Sets indirector to use the specified channel and message chunk, applying routing to all sent messages.

template<class msgacktype, class msgtype>
bool FX::FXIPCChannelIndirector::sendMsg ( msgacktype *FXRESTRICT  msgack,
msgtype *FXRESTRICT  msg,
FXuint  waitfor = FXINFINITE 
) [inline, protected, inherited]

Sends a message via the previously set channel, applying the previously specified routing and adding the previously specified message chunk. See FX::FXIPCChannel::sendMsg()

References FXSTATIC_ASSERT.

bool FX::FXIPCChannelIndirector::getMsgAck ( FXIPCMsg *FXRESTRICT  msgack,
FXIPCMsg *FXRESTRICT  msg,
FXuint  waitfor = FXINFINITE 
) [inline, protected, inherited]

Gets the ack for a message previously sent using sendMsg(). See FX::FXIPCChannel::getMsgAck().


The documentation for this class was generated from the following file:

(C) 2002-2008 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Jun 13 22:29:41 2008 for TnFOX by doxygen v1.5.6