Qt 4.8
Public Functions | Public Variables | Private Functions | List of all members
QNetworkInterfaceManager Class Reference

#include <qnetworkinterface_p.h>

Public Functions

QList< QSharedDataPointer< QNetworkInterfacePrivate > > allInterfaces ()
 
QSharedDataPointer< QNetworkInterfacePrivateinterfaceFromIndex (int index)
 
QSharedDataPointer< QNetworkInterfacePrivateinterfaceFromName (const QString &name)
 
 QNetworkInterfaceManager ()
 
 ~QNetworkInterfaceManager ()
 

Public Variables

QSharedDataPointer< QNetworkInterfacePrivateempty
 

Private Functions

QList< QNetworkInterfacePrivate * > scan ()
 

Detailed Description

Definition at line 101 of file qnetworkinterface_p.h.

Constructors and Destructors

◆ QNetworkInterfaceManager()

QNetworkInterfaceManager::QNetworkInterfaceManager ( )

Definition at line 84 of file qnetworkinterface.cpp.

85 {
86 }

◆ ~QNetworkInterfaceManager()

QNetworkInterfaceManager::~QNetworkInterfaceManager ( )

Definition at line 88 of file qnetworkinterface.cpp.

89 {
90 }

Functions

◆ allInterfaces()

QList< QSharedDataPointer< QNetworkInterfacePrivate > > QNetworkInterfaceManager::allInterfaces ( )

Definition at line 114 of file qnetworkinterface.cpp.

Referenced by interfaceFromIndex(), and interfaceFromName().

115 {
118 
119  foreach (QNetworkInterfacePrivate *ptr, list)
120  result << QSharedDataPointer<QNetworkInterfacePrivate>(ptr);
121 
122  return result;
123 }
QList< QNetworkInterfacePrivate * > scan()
const T * ptr(const T &t)
static QList< QNetworkInterfacePrivate * > postProcess(QList< QNetworkInterfacePrivate *> list)
The QList class is a template class that provides lists.
Definition: qdatastream.h:62

◆ interfaceFromIndex()

QSharedDataPointer< QNetworkInterfacePrivate > QNetworkInterfaceManager::interfaceFromIndex ( int  index)

Definition at line 103 of file qnetworkinterface.cpp.

104 {
106  QList<QSharedDataPointer<QNetworkInterfacePrivate> >::ConstIterator it = interfaceList.constBegin();
107  for ( ; it != interfaceList.constEnd(); ++it)
108  if ((*it)->index == index)
109  return *it;
110 
111  return empty;
112 }
#define it(className, varName)
const_iterator constBegin() const
Returns a const STL-style iterator pointing to the first item in the list.
Definition: qlist.h:269
QSharedDataPointer< QNetworkInterfacePrivate > empty
quint16 index
QList< QSharedDataPointer< QNetworkInterfacePrivate > > allInterfaces()
The QList class is a template class that provides lists.
Definition: qdatastream.h:62
const_iterator constEnd() const
Returns a const STL-style iterator pointing to the imaginary item after the last item in the list...
Definition: qlist.h:272

◆ interfaceFromName()

QSharedDataPointer< QNetworkInterfacePrivate > QNetworkInterfaceManager::interfaceFromName ( const QString name)

Definition at line 92 of file qnetworkinterface.cpp.

93 {
95  QList<QSharedDataPointer<QNetworkInterfacePrivate> >::ConstIterator it = interfaceList.constBegin();
96  for ( ; it != interfaceList.constEnd(); ++it)
97  if ((*it)->name == name)
98  return *it;
99 
100  return empty;
101 }
#define it(className, varName)
const_iterator constBegin() const
Returns a const STL-style iterator pointing to the first item in the list.
Definition: qlist.h:269
QSharedDataPointer< QNetworkInterfacePrivate > empty
QList< QSharedDataPointer< QNetworkInterfacePrivate > > allInterfaces()
The QList class is a template class that provides lists.
Definition: qdatastream.h:62
const_iterator constEnd() const
Returns a const STL-style iterator pointing to the imaginary item after the last item in the list...
Definition: qlist.h:272

◆ scan()

QList< QNetworkInterfacePrivate * > QNetworkInterfaceManager::scan ( )
private

Definition at line 453 of file qnetworkinterface_unix.cpp.

Referenced by allInterfaces(), and interfaceListing().

454 {
455  return interfaceListing();
456 }
static QList< QNetworkInterfacePrivate * > interfaceListing()

Properties

◆ empty

QSharedDataPointer<QNetworkInterfacePrivate> QNetworkInterfaceManager::empty

Definition at line 112 of file qnetworkinterface_p.h.

Referenced by interfaceFromIndex(), and interfaceFromName().


The documentation for this class was generated from the following files: