• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

libsolidcontrol

Solid::Control::Networking

Solid::Control::Networking Namespace Reference


Detailed Description

This class allow to query the underlying system to discover the available network interfaces and reachable network.It has also the responsibility to notify when a network interface or a network appear or disappear.

It's the unique entry point for network management. Applications should use it to find network interfaces, or to be notified about network related changes.

Note that it's implemented as a singleton and encapsulates the backend logic.


Enumerations

enum  Result { Accepted, AlreadyConnected, Denied }

Functions

SOLIDCONTROL_EXPORT Result beginManagingSocket (QAbstractSocket *socket, uint autoDisconnectTimeout=0)
void releaseConnection ()
Solid::Control::Networking::Result requestConnection (QObject *receiver=0, const char *member=0)
SOLIDCONTROL_EXPORT void stopManagingSocket (QAbstractSocket *socket)

Enumeration Type Documentation

enum Solid::Control::Networking::Result

Describe the result of a connection request

  • Accepted : the request was accepted and is being acted upon
  • AlreadyConnected : the system was already connected
  • Denied : the request was denied.

Enumerator:
Accepted 
AlreadyConnected 
Denied 

Definition at line 51 of file networking.h.


Function Documentation

SOLIDCONTROL_EXPORT Result Solid::Control::Networking::beginManagingSocket ( QAbstractSocket *  socket,
uint  autoDisconnectTimeout = 0 
)

Magic network management for application's sockets.

When the socket begins to connect it will automatically bring up networking, if not already available. When the network disconnects, optionally disconnects the socket early so that an application may continue.

Parameters:
socket the socket to manage.
autoDisconnectTimeout wait this many milliseconds after receiving a disconnected event from the networking subsystem before disconnecting the socket. A value of 0 means never automatically disconnect.
Returns:
whether the management request succeeded.

SOLIDCONTROL_EXPORT void Solid::Control::Networking::releaseConnection (  ) 

Activates or deactivates networking (as a whole).

Parameters:
enabled true to activate networking, false otherwise

Definition at line 70 of file networking.cpp.

SOLIDCONTROL_EXPORT Result Solid::Control::Networking::requestConnection ( QObject *  receiver = 0,
const char *  member = 0 
)

Requests that the networking subsystem makes a connection.

If an on-demand connection is started as a result of this request, the connection is refcounted and KDE's use of the connection is dropped when the last application uses it calls releaseConnection(). Optionally, pass in a QObject and slot to call on it, to receive notification when the connection is available or not. The slot may take a Solid::Networking::Status to indicate success or failure.

Parameters:
receiver the QObject to call a slot on.
member the slot to call.
Returns:
a Result indication whether the request was accepted.

Definition at line 65 of file networking.cpp.

SOLIDCONTROL_EXPORT void Solid::Control::Networking::stopManagingSocket ( QAbstractSocket *  socket  ) 

Remove the socket from the list of sockets to manage.

The socket's state is unaltered.

Parameters:
socket the socket to stop managing.

libsolidcontrol

Skip menu "libsolidcontrol"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libplasma
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal