.TH "KNetwork::KReverseResolver" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdecore Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KNetwork::KReverseResolver \- Run a reverse-resolution on a socket address.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kreverseresolver.h>\fP
.PP
Inherits \fBQObject\fP.
.PP
.SS "Public Types"

.in +1c
.ti -1c
.RI "enum \fBFlags\fP { \fBNumericHost\fP =  0x01, \fBNumericService\fP =  0x02, \fBNodeNameOnly\fP =  0x04, \fBDatagram\fP =  0x08, \fBNumericScope\fP =  0x10, \fBResolutionRequired\fP =  0x20 }"
.br
.in -1c
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBfinished\fP (const \fBKReverseResolver\fP &obj)"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKReverseResolver\fP (const \fBKSocketAddress\fP &addr, int flags=0, \fBQObject\fP *=0L, const char *=0L)"
.br
.ti -1c
.RI "virtual \fB~KReverseResolver\fP ()"
.br
.ti -1c
.RI "bool \fBisRunning\fP () const "
.br
.ti -1c
.RI "bool \fBsuccess\fP () const "
.br
.ti -1c
.RI "bool \fBfailure\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBnode\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBservice\fP () const "
.br
.ti -1c
.RI "const \fBKSocketAddress\fP & \fBaddress\fP () const "
.br
.ti -1c
.RI "bool \fBstart\fP ()"
.br
.ti -1c
.RI "virtual bool \fBevent\fP (\fBQEvent\fP *)"
.br
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "static bool \fBresolve\fP (const \fBKSocketAddress\fP &addr, \fBQString\fP &node, \fBQString\fP &serv, int flags=0)"
.br
.ti -1c
.RI "static bool \fBresolve\fP (const struct sockaddr *sa, Q_UINT16 salen, \fBQString\fP &node, \fBQString\fP &serv, int flags=0)"
.br
.in -1c
.SH "Detailed Description"
.PP 
Run a reverse-resolution on a socket address. 

This class is provided as a counterpart to \fBKResolver\fP in such a way as it produces a reverse resolution: it resolves a socket address from its binary representations into a textual representation.
.PP
Most users will use the static functions \fBresolve\fP, which work both synchronously (blocking) and asynchronously (non-blocking).
.PP
\fBAuthor:\fP
.RS 4
Thiago Macieira <thiago.macieira@kdemail.net> 
.RE
.PP

.PP
Definition at line 50 of file kreverseresolver.h.
.SH "Member Enumeration Documentation"
.PP 
.SS "enum \fBKNetwork::KReverseResolver::Flags\fP"
.PP
Flags for the reverse resolution. 
.PP
These flags are used by the reverse resolution functions for setting resolution parameters. The possible values are: 
.PD 0

.IP "\(bu" 2
NumericHost: don't try to resolve the host address to a text form. Instead, convert the address to its numeric textual representation. 
.IP "\(bu" 2
NumericService: the same as NumericHost, but for the service name 
.IP "\(bu" 2
NodeNameOnly: returns the node name only (i.e., not the Fully Qualified Domain Name) 
.IP "\(bu" 2
Datagram: in case of ambiguity in the service name, prefer the name associated with the datagram protocol 
.IP "\(bu" 2
NumericScope: for those addresses which have the concept of scope, resolve using the numeric value instead of the proper scope name. 
.IP "\(bu" 2
ResolutionRequired: normally, when resolving, if the name resolution fails, the process normally converts the numeric address into its presentation forms. This flag causes the function to return with error instead. 
.PP

.PP
Definition at line 74 of file kreverseresolver.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KReverseResolver::KReverseResolver (const \fBKSocketAddress\fP & addr, int flags = \fC0\fP, \fBQObject\fP * = \fC0L\fP, const char * = \fC0L\fP)"
.PP
Constructs this object to resolve the given socket address. 
.PP
\fBParameters:\fP
.RS 4
\fIaddr\fP the address to resolve 
.br
\fIflags\fP the flags to use, see \fBFlags\fP 
.RE
.PP

.PP
Definition at line 113 of file kreverseresolver.cpp.
.SS "KReverseResolver::~\fBKReverseResolver\fP ()\fC [virtual]\fP"
.PP
Destructor. 
.PP
Definition at line 120 of file kreverseresolver.cpp.
.SH "Member Function Documentation"
.PP 
.SS "bool KReverseResolver::isRunning () const"
.PP
This function returns 'true' if the processing is still running. 
.PP
Definition at line 126 of file kreverseresolver.cpp.
.PP
Referenced by failure(), and success().
.SS "bool KReverseResolver::success () const"
.PP
This function returns true if the processing has finished with success, false if it's still running or failed. 
.PP
Definition at line 131 of file kreverseresolver.cpp.
.PP
References isRunning().
.SS "bool KReverseResolver::failure () const"
.PP
This function returns true if the processing has finished with failure, false if it's still running or succeeded. 
.PP
Definition at line 136 of file kreverseresolver.cpp.
.PP
References isRunning().
.SS "\fBQString\fP KReverseResolver::node () const"
.PP
Returns the resolved node name, if the resolution has finished successfully, or QString::null otherwise. 
.PP
Definition at line 141 of file kreverseresolver.cpp.
.PP
Referenced by resolve().
.SS "\fBQString\fP KReverseResolver::service () const"
.PP
Returns the resolved service name, if the resolution has finished successfully, or QString::null otherwise. 
.PP
Definition at line 146 of file kreverseresolver.cpp.
.SS "const \fBKSocketAddress\fP & KReverseResolver::address () const"
.PP
Returns the socket address which was subject to resolution. 
.PP
Definition at line 151 of file kreverseresolver.cpp.
.SS "bool KReverseResolver::start ()"
.PP
Starts the resolution. 
.PP
This function returns 'true' if the resolution has started successfully. 
.PP
Definition at line 156 of file kreverseresolver.cpp.
.SS "bool KReverseResolver::event (\fBQEvent\fP *)\fC [virtual]\fP"
.PP
Overrides event handling. 
.PP
Reimplemented from \fBQObject\fP.
.PP
Definition at line 173 of file kreverseresolver.cpp.
.PP
References QObject::event(), and finished().
.SS "void KNetwork::KReverseResolver::finished (const \fBKReverseResolver\fP & obj)\fC [signal]\fP"
.PP
This signal is emitted when the resolution has finished. 
.PP
\fBParameters:\fP
.RS 4
\fIobj\fP this class, which contains the results 
.RE
.PP

.PP
Referenced by event().
.SS "bool KReverseResolver::resolve (const \fBKSocketAddress\fP & addr, \fBQString\fP & node, \fBQString\fP & serv, int flags = \fC0\fP)\fC [static]\fP"
.PP
Resolves a socket address to its textual representation. 
.PP
FIXME!! How can we do this in a non-blocking manner!?
.PP
This function is used to resolve a socket address from its binary representation to a textual form, even if numeric only.
.PP
\fBParameters:\fP
.RS 4
\fIaddr\fP the socket address to be resolved 
.br
\fInode\fP the \fBQString\fP where we will store the resolved node 
.br
\fIserv\fP the \fBQString\fP where we will store the resolved service 
.br
\fIflags\fP flags to be used for this resolution. 
.RE
.PP
\fBReturns:\fP
.RS 4
true if the resolution succeeded, false if not 
.RE
.PP
\fBSee also:\fP
.RS 4
ReverseFlags for the possible values for \fCflags\fP 
.RE
.PP

.PP
Definition at line 193 of file kreverseresolver.cpp.
.PP
References node().
.PP
Referenced by resolve().
.SS "bool KReverseResolver::resolve (const struct sockaddr * sa, Q_UINT16 salen, \fBQString\fP & node, \fBQString\fP & serv, int flags = \fC0\fP)\fC [static]\fP"
.PP
Resolves a socket address to its textual representation. 
.PP
FIXME!! How can we do this in a non-blocking manner!?
.PP
This function behaves just like the above one, except it takes a sockaddr structure and its size as parameters.
.PP
\fBParameters:\fP
.RS 4
\fIsa\fP the sockaddr structure containing the address to be resolved 
.br
\fIsalen\fP the length of the sockaddr structure 
.br
\fInode\fP the \fBQString\fP where we will store the resolved node 
.br
\fIserv\fP the \fBQString\fP where we will store the resolved service 
.br
\fIflags\fP flags to be used for this resolution. 
.RE
.PP
\fBReturns:\fP
.RS 4
true if the resolution succeeded, false if not 
.RE
.PP
\fBSee also:\fP
.RS 4
ReverseFlags for the possible values for \fCflags\fP 
.RE
.PP

.PP
Definition at line 206 of file kreverseresolver.cpp.
.PP
References node(), and resolve().

.SH "Author"
.PP 
Generated automatically by Doxygen for kdecore Library from the source code.
