KNetwork::KResolverResults

KNetwork::KResolverResults Class Reference

#include <k3resolver.h>

Inheritance diagram for KNetwork::KResolverResults:

Public Member Functions

 KResolverResults ()
 
 KResolverResults (const KResolverResults &other)
 
virtual ~KResolverResults ()
 
int error () const
 
QString nodeName () const
 
KResolverResultsoperator= (const KResolverResults &other)
 
QString serviceName () const
 
void setAddress (const QString &host, const QString &service)
 
void setError (int errorcode, int systemerror=0)
 
int systemError () const
 
- Public Member Functions inherited from QList< KResolverEntry >
 QList (const QList< KResolverEntry > &other)
 
 QList (std::initializer_list< KResolverEntry > args)
 
 QList (InputIterator first, InputIterator last)
 
 QList (QList< KResolverEntry > &&other)
 
void append (const KResolverEntry &value)
 
void append (const QList< KResolverEntry > &value)
 
const KResolverEntry & at (int i) const const
 
KResolverEntry & back ()
 
const KResolverEntry & back () const const
 
QList::iterator begin ()
 
QList::const_iterator begin () const const
 
QList::const_iterator cbegin () const const
 
QList::const_iterator cend () const const
 
void clear ()
 
QList::const_iterator constBegin () const const
 
QList::const_iterator constEnd () const const
 
const KResolverEntry & constFirst () const const
 
const KResolverEntry & constLast () const const
 
bool contains (const KResolverEntry &value) const const
 
int count (const KResolverEntry &value) const const
 
int count () const const
 
QList::const_reverse_iterator crbegin () const const
 
QList::const_reverse_iterator crend () const const
 
bool empty () const const
 
QList::iterator end ()
 
QList::const_iterator end () const const
 
bool endsWith (const KResolverEntry &value) const const
 
QList::iterator erase (QList::iterator pos)
 
QList::iterator erase (QList::iterator begin, QList::iterator end)
 
const KResolverEntry & first () const const
 
KResolverEntry & first ()
 
KResolverEntry & front ()
 
const KResolverEntry & front () const const
 
int indexOf (const KResolverEntry &value, int from) const const
 
void insert (int i, const KResolverEntry &value)
 
QList::iterator insert (QList::iterator before, const KResolverEntry &value)
 
bool isEmpty () const const
 
KResolverEntry & last ()
 
const KResolverEntry & last () const const
 
int lastIndexOf (const KResolverEntry &value, int from) const const
 
int length () const const
 
QList< KResolverEntry > mid (int pos, int length) const const
 
void move (int from, int to)
 
bool operator!= (const QList< KResolverEntry > &other) const const
 
QList< KResolverEntry > operator+ (const QList< KResolverEntry > &other) const const
 
QList< KResolverEntry > & operator+= (const QList< KResolverEntry > &other)
 
QList< KResolverEntry > & operator+= (const KResolverEntry &value)
 
bool operator< (const QList< KResolverEntry > &lhs, const QList< KResolverEntry > &rhs)
 
QDataStreamoperator<< (QDataStream &out, const QList< KResolverEntry > &list)
 
QList< KResolverEntry > & operator<< (const QList< KResolverEntry > &other)
 
QList< KResolverEntry > & operator<< (const KResolverEntry &value)
 
bool operator<= (const QList< KResolverEntry > &lhs, const QList< KResolverEntry > &rhs)
 
QList< KResolverEntry > & operator= (QList< KResolverEntry > &&other)
 
QList< KResolverEntry > & operator= (const QList< KResolverEntry > &other)
 
bool operator== (const QList< KResolverEntry > &other) const const
 
bool operator> (const QList< KResolverEntry > &lhs, const QList< KResolverEntry > &rhs)
 
bool operator>= (const QList< KResolverEntry > &lhs, const QList< KResolverEntry > &rhs)
 
QDataStreamoperator>> (QDataStream &in, QList< KResolverEntry > &list)
 
const KResolverEntry & operator[] (int i) const const
 
KResolverEntry & operator[] (int i)
 
void pop_back ()
 
void pop_front ()
 
void prepend (const KResolverEntry &value)
 
void push_back (const KResolverEntry &value)
 
void push_front (const KResolverEntry &value)
 
uint qHash (const QList< KResolverEntry > &key, uint seed)
 
QList::reverse_iterator rbegin ()
 
QList::const_reverse_iterator rbegin () const const
 
int removeAll (const KResolverEntry &value)
 
void removeAt (int i)
 
void removeFirst ()
 
void removeLast ()
 
bool removeOne (const KResolverEntry &value)
 
QList::const_reverse_iterator rend () const const
 
QList::reverse_iterator rend ()
 
void replace (int i, const KResolverEntry &value)
 
void reserve (int alloc)
 
int size () const const
 
bool startsWith (const KResolverEntry &value) const const
 
void swap (int i, int j)
 
void swap (QList< KResolverEntry > &other)
 
void swapItemsAt (int i, int j)
 
KResolverEntry takeAt (int i)
 
KResolverEntry takeFirst ()
 
KResolverEntry takeLast ()
 
QSet< KResolverEntry > toSet () const const
 
std::list< KResolverEntry > toStdList () const const
 
QVector< KResolverEntry > toVector () const const
 
KResolverEntry value (int i) const const
 
KResolverEntry value (int i, const KResolverEntry &defaultValue) const const
 

Protected Member Functions

virtual void virtual_hook (int id, void *data)
 

Additional Inherited Members

- Static Public Member Functions inherited from QList< KResolverEntry >
QList< KResolverEntry > fromSet (const QSet< KResolverEntry > &set)
 
QList< KResolverEntry > fromStdList (const std::list< KResolverEntry > &list)
 
QList< KResolverEntry > fromVector (const QVector< KResolverEntry > &vector)
 
- Public Attributes inherited from QList< KResolverEntry >
typedef const_pointer
 
typedef const_reference
 
typedef const_reverse_iterator
 
typedef ConstIterator
 
typedef difference_type
 
typedef Iterator
 
typedef pointer
 
typedef reference
 
typedef reverse_iterator
 
typedef size_type
 
typedef value_type
 

Detailed Description

Name and service resolution results.

This object contains the results of a name and service resolution, as those performed by KResolver. It is also a descendant of QValueList, so you may use all its member functions here to access the elements.

A KResolverResults object is associated with a resolution, so, in addition to the resolved elements, you can also retrieve information about the resolution process itself, like the nodename that was resolved or an error code.

Note Resolver also uses KResolverResults objects to indicate failure, so you should test for failure.

Author
Thiago Macieira thiag[email protected][email protected][email protected]e.org
Deprecated:
Use KSocketFactory or KLocalSocket instead

Definition at line 212 of file k3resolver.h.

Constructor & Destructor Documentation

KResolverResults::KResolverResults ( )

Default constructor.

Constructs an empty list.

Definition at line 196 of file k3resolver.cpp.

KResolverResults::KResolverResults ( const KResolverResults other)

Copy constructor.

Creates a new object with the contents of the other one. Data will be shared by the two objects, like QValueList

Definition at line 202 of file k3resolver.cpp.

KResolverResults::~KResolverResults ( )
virtual

Destructor.

Destroys the object and frees associated resources.

Definition at line 209 of file k3resolver.cpp.

Member Function Documentation

int KResolverResults::error ( ) const

Retrieves the error code associated with this resolution.

The values here are the same as in KResolver::ErrorCodes.

Definition at line 227 of file k3resolver.cpp.

QString KResolverResults::nodeName ( ) const

The nodename to which the resolution was performed.

Definition at line 246 of file k3resolver.cpp.

KResolverResults & KResolverResults::operator= ( const KResolverResults other)

Assignment operator.

Copies the contents of the other container into this one, discarding our current values.

Definition at line 215 of file k3resolver.cpp.

QString KResolverResults::serviceName ( ) const

The service name to which the resolution was performed.

Definition at line 252 of file k3resolver.cpp.

void KResolverResults::setAddress ( const QString host,
const QString service 
)

Sets the new nodename and service name.

Definition at line 258 of file k3resolver.cpp.

void KResolverResults::setError ( int  errorcode,
int  systemerror = 0 
)

Sets the error codes.

Parameters
errorcodethe error code in KResolver::ErrorCodes
systemerrorthe system error code associated, if any

Definition at line 239 of file k3resolver.cpp.

int KResolverResults::systemError ( ) const

Retrieves the system error code, if any.

See also
KResolver::systemError for more information

Definition at line 233 of file k3resolver.cpp.

void KResolverResults::virtual_hook ( int  id,
void *  data 
)
protectedvirtual

Standard hack to add virtuals later.

Definition at line 265 of file k3resolver.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Jul 8 2020 22:57:14 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.