Home · All Classes · Grouped Classes · Annotated · Functions

QtopiaNetworkFactoryIface Class Reference

The QtopiaNetworkFactoryIface class defines the interface to network plug-ins. More...

    #include <QtopiaNetworkFactoryIface>

Inherited by QtopiaNetworkPlugin.

Public Functions

Detailed Description

The QtopiaNetworkFactoryIface class defines the interface to network plug-ins.

The QtopiaNetworkFactoryIface class defines the interface to network plug-ins. Plug-ins will typically inherit from QtopiaNetworkPlugin rather than this class.

See also QtopiaNetworkPlugin and QtopiaNetworkInterface.

Member Function Documentation

QByteArray QtopiaNetworkFactoryIface::customID () const   [pure virtual]

The network server automatically matches network plug-ins and network configurations by comparing QtopiaNetworkFactoryIface::type() and QNetworkState::deviceType(). This may mean that in some situations several plug-ins match the same network configuration. If these plug-ins provide different functionality or user interfaces the user may become confused because the matching process may cause a race condition.

To resolve such problems the QtopiaNetwork::Custom flag can be used in combination with this function to uniquely match a network configuration with a particular plug-in. If a plug-in sets the custom flag the network server will compare the custom ID of the current network configuration with the value returned by this function. Only if they match the plug-in will be allowed to manage this configuration. The custom ID string can be any string as long as it is unique and not empty. The custom flag is not raised when the configuration doesn't set the customID field. Note that the remaining type flags must still match.

For more details about the network configuration file format refer to the Network Services documentation.

QPointer<QtopiaNetworkInterface> QtopiaNetworkFactoryIface::network ( const QString & handle )   [pure virtual]

Returns the instance of the QtopiaNetworkInterface provided by the plug-in. Multiple calls to this function will return several instances. handle is the configuration file that this interface should be initialized with.

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

Returns the type of network interfaces that the current plug-in can handle. This function is usually called by the QtopiaNetworkServer to check whether this plug-in is appropriate for the given network interface.

See also QtopiaNetworkServer.

Copyright © 2008 Nokia Trademarks
Qtopia 4.3.3