kdecore Library API Documentation

kresolverstandardworkers_p.h

00001 /*  -*- C++ -*-
00002  *  Copyright (C) 2003 Thiago Macieira <thiago.macieira@kdemail.net>
00003  *
00004  *
00005  *  Permission is hereby granted, free of charge, to any person obtaining
00006  *  a copy of this software and associated documentation files (the
00007  *  "Software"), to deal in the Software without restriction, including
00008  *  without limitation the rights to use, copy, modify, merge, publish,
00009  *  distribute, sublicense, and/or sell copies of the Software, and to
00010  *  permit persons to whom the Software is furnished to do so, subject to
00011  *  the following conditions:
00012  *
00013  *  The above copyright notice and this permission notice shall be included 
00014  *  in all copies or substantial portions of the Software.
00015  *
00016  *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00017  *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00018  *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
00019  *  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
00020  *  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
00021  *  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
00022  *  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00023  */
00024 
00025 #ifndef KRESOLVERSTANDARDWORKERS_P_H
00026 #define KRESOLVERSTANDARDWORKERS_P_H
00027 
00028 #include <sys/types.h>
00029 #include <netdb.h>
00030 
00031 #include <qptrlist.h>
00032 #include <qcstring.h>
00033 
00034 #include "kdemacros.h"
00035 #include "kresolver.h"
00036 #include "kresolverworkerbase.h"
00037 
00038 #include <config.h>
00039 
00040 namespace KNetwork { namespace Internal
00041 {
00042   extern void initStandardWorkers() KDE_NO_EXPORT;
00043 
00047   class KStandardWorker: public KNetwork::KResolverWorkerBase
00048   {
00049   protected:
00050     mutable QCString m_encodedName;
00051     Q_UINT16 port;
00052     int scopeid;
00053     QPtrList<KNetwork::KResolverResults> resultList;
00054 
00055   public:
00056     bool sanityCheck();
00057 
00058     virtual bool preprocess();
00059     virtual bool run();
00060     virtual bool postprocess();
00061 
00062     bool resolveScopeId();
00063     bool resolveService();
00064     bool resolveNumerically();
00065 
00066     KNetwork::KResolver::ErrorCodes addUnix();
00067   };
00068 
00069 #if defined(HAVE_GETADDRINFO)
00070 
00075   class KGetAddrinfoWorker: public KStandardWorker
00076   {
00077   public:
00078     KGetAddrinfoWorker()
00079     { }
00080 
00081     virtual ~KGetAddrinfoWorker();
00082     virtual bool preprocess();
00083     virtual bool run();
00084     virtual bool postprocess() { return true; }
00085 
00086     bool wantThis(int family);
00087   };
00088 #endif // HAVE_GETADDRINFO
00089 
00090 } } // namespace KNetwork::Internal
00091 
00092 
00093 #endif
KDE Logo
This file is part of the documentation for kdecore Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Jul 22 10:16:18 2005 by doxygen 1.3.6 written by Dimitri van Heesch, © 1997-2003