Home · All Classes · Annotated · Functions

QtopiaNetworkInterface Class Reference

The QtopiaNetworkInterface class describes the minimum interface that a network plugin must provide. More...

#include <QtopiaNetworkInterface>

Inherits QObject.

Public Types

Public Functions

Additional Inherited Members


Detailed Description

The QtopiaNetworkInterface class describes the minimum interface that a network plugin must provide.

There is no default implementation available for this interface.


Member Type Documentation

enum QtopiaNetworkInterface::Status

The status provides information about the state of the network interface.

ConstantValueDescription
QtopiaNetworkInterface::Unknown0this is the initial state of a network interface that has not been initialized yet (initialize()). The interface must never return to this state after initialization.
QtopiaNetworkInterface::Down1the interface is ready to be started
QtopiaNetworkInterface::Up2the interface is up and running
QtopiaNetworkInterface::Pending3temporary state of the interface
QtopiaNetworkInterface::Demand4Initiate the link only on demand when data traffic is present
QtopiaNetworkInterface::Unavailable100the interface cannot be started because the network device does not exist and/or cannot be recognised


Member Function Documentation

QtopiaNetworkInterface::~QtopiaNetworkInterface ()   [virtual]

Deconstructor.

void QtopiaNetworkInterface::cleanup ()   [pure virtual]

Cleans up all system and config files (e.g. the dialup plug-in deletes the peer and connect/disconnect chat file) created for this interface. However this function must not remove the network configuration file associated with this plug-in instance as this will be done by the network server.

QtopiaNetworkConfiguration * QtopiaNetworkInterface::configuration ()   [pure virtual]

Allows access to the configuration for this interface.

QString QtopiaNetworkInterface::device () const   [pure virtual]

Returns the name of the network device that is used for connections. (e.g. eth0, wlan1, ppp0). This name is only valid if the interface status is not QtopiaNetworkInterface::Unknown or QtopiaNetworkInterface::Unavailable

void QtopiaNetworkInterface::initialize ()   [pure virtual]

Initializes the network interface configuration. The implementation must change the interface state to a value that is not equal to QtopiaNetworkInterface::Unknown.

void QtopiaNetworkInterface::setDefaultGateway ()   [pure virtual]

This interface becomes the default gateway for the device.

void QtopiaNetworkInterface::setProperties ( const QtopiaNetworkProperties & properties )   [pure virtual]

The content of properties is written to the network configuration for this interface.

bool QtopiaNetworkInterface::start ( const QVariant options = QVariant() )   [pure virtual]

Starts the network service, returning true on success. options is used to pass optional parameter to the interface. The actual value of options is plug-in specific and plug-in developer may use it for any arbitrary value that might be of importance to the startup code.

Note: This function may only be called by the qpe server. Qtopia applications should start an interface via QtopiaNetwork::startInterface().

Status QtopiaNetworkInterface::status ()   [pure virtual]

Updates and returns the current status of the interface. At any given time a call to this function should always perform a status check before returning the results.

See also QtopiaNetworkInterface::Status.

bool QtopiaNetworkInterface::stop ()   [pure virtual]

Stops the network service, returning true on success.

Note: This function may only be called by the qpe server. Qtopia applications should stop a specific interface via QtopiaNetwork::stopInterface() or QtopiaNetwork::shutdownNetwork()

QtopiaNetwork::Type QtopiaNetworkInterface::type () const   [pure virtual]

Returns the type of network interface that this particular interface can handle.


Copyright © 2006 Trolltech Trademarks
Qtopia 4.1.7