Qt Extended Home · Index · Classes · Headers · Overviews codeless banner

QDConPlugin Class Reference

The QDConPlugin class is responsible for maintaining a connection. More...

    #include <QDConPlugin>

Inherits QDPlugin.

Public Types

Public Functions

Signals

Additional Inherited Members


Detailed Description

The QDConPlugin class is responsible for maintaining a connection.

This plugin should be used to establish a connection to a device.


Member Type Documentation

enum QDConPlugin::State

This enum type specifies the state of the connection.

ConstantValueDescription
QDConPlugin::Connected0A connection has been established and any handshaking has been performed.
QDConPlugin::Disconnected1There is no connection.
QDConPlugin::Connecting2A connection attempt is in progress.
QDConPlugin::Matching3An attempt is being made to match this connection to a device.


Member Function Documentation

QDConPlugin::QDConPlugin ( QObject * parent = 0 )

Construct a QDConPlugin with parent as the owning QObject.

QDConPlugin::~QDConPlugin ()   [virtual]

Destructor.

bool QDConPlugin::claim ( QDDevPlugin * dev )   [pure virtual]

This is called by dev to attempt to claim the connection, which stops other plugins from getting control of it. The return value indicates success or failure.

See also device().

QString QDConPlugin::conProperty ( const QString & key )   [pure virtual]

Retrieve property key from the connection. Typically properties are set during the handshake phase.

void QDConPlugin::connected ( QDDevPlugin * dev )   [pure virtual]

Called by dev to report that handshaking is done. Note that dev is checked against the device that has claimed the connection.

See also claim().

QDDevPlugin * QDConPlugin::device ()   [pure virtual]

Returns the device that has claimed this connection.

See also claim().

int QDConPlugin::port ()   [pure virtual]

Return the port to connect to (for TCP/IP-based communications).

void QDConPlugin::setState ( QDConPlugin * plugin, int state )   [signal]

This signal should be emitted by the plugin to indicate changes in state using a constant from the QDConPlugin::State enum.

void QDConPlugin::stop ()   [pure virtual]

Stop trying to connect to something.

bool QDConPlugin::tryConnect ( QDLinkPlugin * link )   [pure virtual]

Attempt to connect using the socket from link. Return false to indicate immediate failure and the setState() signal to indicate asynchronous failure.


Copyright © 2009 Trolltech
Qt Extended Sync Agent Documentation