QVPNClient Class ReferenceThe QVPNClient class abstracts data and state of a virtual private network. More... #include <QVPNClient> Inherits QObject. Public TypesPublic Functions
Signals
Protected Functions
Additional Inherited Members
Detailed DescriptionThe QVPNClient class abstracts data and state of a virtual private network. An instance of a QVPNClient can be created by using QVPNFactory. Qt Extended currently supports OpenVPN only. New VPN implementations must subclass this abstract class. Each VPNClient instance operates in one of the follwoing two modes:
Every VPN can be identified via a unique identifier returned by id(), has a name() and a type(). The VPN configuration can be changed via configure(). connect() will establish the VPN connection. Once the VPN has been started its state() will change from QVPNCLient::Disconnected to QVPNClient::Pending and eventually to QVPNClient::Connected. Each state change is indicated via the connectionStateChanged() signal. If an error occurs during the startup period the user can obtain a human-readable string describing the nature of the error. If the user decides to delete a VPN connection cleanup() should be called to remove any configuration file that has been created previously. By default Qt Extended saves VPN configuration files in $HOME/Applications/Netork/vpn. See also QVPNFactory. Member Type Documentation
|
Constant | Value | Description |
---|---|---|
QVPNClient::Disconnected | 0 | The VPN connection is offline. |
QVPNClient::Pending | 1 | The VPN connection is in a transitional phase between Disconnected and Connected. |
QVPNClient::Connected | 20 | The VPN connection is active and can be used. |
This enum is used to describe the type of a VPN connection.
Constant | Value | Description |
---|---|---|
QVPNClient::OpenVPN | 0 | VPN solution based on OpenVPN (for details see http://openvpn.net) |
QVPNClient::IPSec | 20 | VPN solution based on IPSec (not yet implemented in Qt Extended and serves as place holder for future implementation) |
Creates a new QVPNClient instance with the given parent. QVPNClient instances can only be created via QVPNFactory::create().
serverMode determines whether this VPN object operates in server mode. Qt Extended applications usually obtain client mode instances of QVPNClient. In this mode all request are forwarded to the QtopiaVpnManager which keeps a reference to a VPNClient instance running in server mode. This allows the synchronization of multiple VPN requests to the same VPN.
This constructor is used internally by QVPNFactory whenever the user creates a new VPN that doesn't exist yet.
See also QtopiaVpnManager and QVPNFactory.
Creates a new QVPNClient instance with the given parent. QVPNClient instances can only be created via QVPNFactory::create().
serverMode determines whether this VPN object operates in server mode. Qt Extended applications usually obtain client mode instances of QVPNClient. In this mode all request are forwarded to the QtopiaVpnManager which keeps a reference to a VPNClient instance running in server mode. This allows the synchronization of multiple VPN requests to the same VPN.
vpnID acts as an identifier for a particular VPN.
See also QtopiaVpnManager and QVPNFactory.
Destroys the virtual private network.
Deletes the VPN client and all files associated to it. This function does nothing if the client is still connected.
Returns the default configuration dialog that is shown to the user when he configures this interface. parent is the parent widget for the returned dialog.
This function starts the VPN connection.
This signal is emitted when the state of the VPN connection changes.
error will be set to true if an error occurred during the last state transition. A human-readable string of the error can be obtained via errorString()
This signal must be emitted by subclasses of QVPNClient when state transitions occur.
This function stops the active connection.
Returns a human-readable description of the last error that occurred. This is useful for presenting an error message to the user when receiving a connectionStateChanged() signal with the error argument set to true;
Returns the unique ID of this virtual private network.
Returns the user set name for this VPN.
Returns the current state of this VPN client.
See also QVPNClient::State.
Returns the VPN client type.
See also QVPNClient::Type.
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt qtextended4.4 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com