• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KDECore

  • sources
  • kde-4.14
  • kdelibs
  • kdecore
  • network
k3resolverstandardworkers_p.h
Go to the documentation of this file.
1 /* -*- C++ -*-
2  * Copyright (C) 2003,2005 Thiago Macieira <thiago@kde.org>
3  *
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining
6  * a copy of this software and associated documentation files (the
7  * "Software"), to deal in the Software without restriction, including
8  * without limitation the rights to use, copy, modify, merge, publish,
9  * distribute, sublicense, and/or sell copies of the Software, and to
10  * permit persons to whom the Software is furnished to do so, subject to
11  * the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included
14  * in all copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20  * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23  */
24 
25 #ifndef KRESOLVERSTANDARDWORKERS_P_H
26 #define KRESOLVERSTANDARDWORKERS_P_H
27 
28 #include <sys/types.h>
29 #include <netdb.h>
30 
31 #include <QList>
32 #include <QByteArray>
33 #include <QStringList>
34 
35 #include "k3resolver.h"
36 #include "k3resolverworkerbase.h"
37 
38 #include <config.h>
39 #include <config-network.h>
40 
41 namespace KNetwork { namespace Internal
42 {
43  extern void initStandardWorkers() KDE_NO_EXPORT;
44 
49  class KBlacklistWorker: public KNetwork::KResolverWorkerBase
50  {
51  public:
52  static QStringList blacklist;
53 
54  static void loadBlacklist();
55  static void init();
56  static bool isBlacklisted(const QString&);
57 
58  virtual bool preprocess();
59  virtual bool run();
60  virtual bool postprocess() { return true; }
61  };
62 
66  class KStandardWorker: public KNetwork::KResolverWorkerBase
67  {
68  protected:
69  mutable QByteArray m_encodedName;
70  quint16 port;
71  int scopeid;
72  QList<KNetwork::KResolverResults*> resultList;
73 
74  public:
75  virtual ~KStandardWorker();
76  bool sanityCheck();
77 
78  virtual bool preprocess();
79  virtual bool run();
80  virtual bool postprocess();
81 
82  bool resolveScopeId();
83  bool resolveService();
84  bool resolveNumerically();
85 
86  KNetwork::KResolver::ErrorCodes addUnix();
87  };
88 
89 #if defined(HAVE_GETADDRINFO)
90 
95  class KGetAddrinfoWorker: public KStandardWorker
96  {
97  public:
98  KGetAddrinfoWorker()
99  { }
100 
101  virtual ~KGetAddrinfoWorker();
102  virtual bool preprocess();
103  virtual bool run();
104  virtual bool postprocess() { return true; }
105 
106  bool wantThis(int family);
107  };
108 #endif // HAVE_GETADDRINFO
109 
110 } } // namespace KNetwork::Internal
111 
112 
113 #endif
k3resolverworkerbase.h
KNetwork::Internal::KStandardWorker::postprocess
virtual bool postprocess()
This function gets called during post processing for this class.
Definition: k3resolverstandardworkers.cpp:919
KNetwork::Internal::KStandardWorker::resolveService
bool resolveService()
Definition: k3resolverstandardworkers.cpp:626
KNetwork::Internal::KStandardWorker::addUnix
KNetwork::KResolver::ErrorCodes addUnix()
Definition: k3resolverstandardworkers.cpp:676
QByteArray
KDE_NO_EXPORT
#define KDE_NO_EXPORT
The KDE_NO_EXPORT macro marks the symbol of the given variable to be hidden.
Definition: kdemacros.h.cmake:73
KNetwork::KResolver::ErrorCodes
ErrorCodes
Error codes.
Definition: k3resolver.h:397
KNetwork::Internal::KStandardWorker::port
quint16 port
Definition: k3resolverstandardworkers_p.h:70
KNetwork::Internal::initStandardWorkers
void initStandardWorkers() KDE_NO_EXPORT
Definition: k3resolverstandardworkers.cpp:1038
KNetwork::Internal::KStandardWorker
Definition: k3resolverstandardworkers_p.h:66
KNetwork::Internal::KStandardWorker::resolveScopeId
bool resolveScopeId()
Definition: k3resolverstandardworkers.cpp:600
KNetwork::Internal::KBlacklistWorker::blacklist
static QStringList blacklist
Definition: k3resolverstandardworkers_p.h:52
KNetwork::Internal::KStandardWorker::~KStandardWorker
virtual ~KStandardWorker()
Definition: k3resolverstandardworkers.cpp:555
KNetwork::Internal::KBlacklistWorker::postprocess
virtual bool postprocess()
This function gets called during post processing for this class.
Definition: k3resolverstandardworkers_p.h:60
KNetwork::Internal::KStandardWorker::sanityCheck
bool sanityCheck()
Definition: k3resolverstandardworkers.cpp:560
QString
QList
Definition: kaboutdata.h:33
KNetwork::Internal::KStandardWorker::resolveNumerically
bool resolveNumerically()
Definition: k3resolverstandardworkers.cpp:711
KNetwork::Internal::KStandardWorker::m_encodedName
QByteArray m_encodedName
Definition: k3resolverstandardworkers_p.h:69
QStringList
k3resolver.h
KNetwork::Internal::KStandardWorker::resultList
QList< KNetwork::KResolverResults * > resultList
Definition: k3resolverstandardworkers_p.h:72
KNetwork::Internal::KStandardWorker::run
virtual bool run()
This is the function that should be overridden in derived classes.
Definition: k3resolverstandardworkers.cpp:861
KNetwork::Internal::KBlacklistWorker
Definition: k3resolverstandardworkers_p.h:49
KNetwork::Internal::KStandardWorker::scopeid
int scopeid
Definition: k3resolverstandardworkers_p.h:71
KNetwork::KResolverWorkerBase
Definition: k3resolverworkerbase.h:64
KNetwork::Internal::KStandardWorker::preprocess
virtual bool preprocess()
This function gets called during pre processing for this class and you must override it...
Definition: k3resolverstandardworkers.cpp:813
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:10 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDECore

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal