KDECore
kreverseresolver.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef KREVERSERESOLVER_H
00026 #define KREVERSERESOLVER_H
00027
00029
00030 #include <qobject.h>
00031 #include <qstring.h>
00032
00033 #include "ksocketaddress.h"
00034
00035 namespace KNetwork {
00036
00037 class KReverseResolverPrivate;
00050 class KDECORE_EXPORT KReverseResolver: public QObject
00051 {
00052 Q_OBJECT
00053
00054 public:
00074 enum Flags
00075 {
00076 NumericHost = 0x01,
00077 NumericService = 0x02,
00078 NodeNameOnly = 0x04,
00079 Datagram = 0x08,
00080 NumericScope = 0x10,
00081 ResolutionRequired = 0x20
00082 };
00083
00090 KReverseResolver(const KSocketAddress& addr, int flags = 0,
00091 QObject * = 0L, const char * = 0L);
00092
00096 virtual ~KReverseResolver();
00097
00101 bool isRunning() const;
00102
00107 bool success() const;
00108
00113 bool failure() const;
00114
00119 QString node() const;
00120
00125 QString service() const;
00126
00130 const KSocketAddress& address() const;
00131
00136 bool start();
00137
00141 virtual bool event(QEvent* );
00142
00143 signals:
00149 void finished(const KReverseResolver& obj);
00150
00151 public:
00167 static bool resolve(const KSocketAddress& addr, QString& node,
00168 QString& serv, int flags = 0);
00169
00186 static bool resolve(const struct sockaddr* sa, Q_UINT16 salen,
00187 QString& node, QString& serv, int flags = 0);
00188
00189 private:
00190 KReverseResolverPrivate* d;
00191 };
00192
00193 }
00194
00195 #endif