29 #include <tqcstring.h>
32 #include "kresolver.h"
33 #include "kresolver_p.h"
34 #include "kresolverworkerbase.h"
37 using namespace KNetwork::Internal;
39 KResolverWorkerBase::KResolverWorkerBase()
40 : th(0L), input(0L), m_finished(0), m_reserved(0)
44 KResolverWorkerBase::~KResolverWorkerBase()
48 TQString KResolverWorkerBase::nodeName()
const
52 return TQString::null;
55 TQString KResolverWorkerBase::serviceName()
const
58 return input->service;
59 return TQString::null;
62 int KResolverWorkerBase::flags()
const
69 int KResolverWorkerBase::familyMask()
const
72 return input->familyMask;
76 int KResolverWorkerBase::socketType()
const
79 return input->socktype;
83 int KResolverWorkerBase::protocol()
const
86 return input->protocol;
90 TQCString KResolverWorkerBase::protocolName()
const
94 res = input->protocolName;
98 void KResolverWorkerBase::finished()
103 bool KResolverWorkerBase::postprocess()
108 bool KResolverWorkerBase::enqueue(
KResolver* res)
110 KResolverManager::manager()->enqueue(res, th->data);
114 bool KResolverWorkerBase::enqueue(KResolverWorkerBase* worker)
116 RequestData *myself = th->data;
117 RequestData *newrequest =
new RequestData;
119 newrequest->input = input;
120 newrequest->requestor = myself;
121 newrequest->nRequests = 0;
122 newrequest->worker = worker;
124 KResolverManager::manager()->dispatch(newrequest);
128 bool KResolverWorkerBase::checkResolver()
130 return th->checkResolver();
133 void KResolverWorkerBase::acquireResolver()
135 th->acquireResolver();
138 void KResolverWorkerBase::releaseResolver()
140 th->releaseResolver();
143 KResolverWorkerFactoryBase::KResolverWorkerFactoryBase()
147 KResolverWorkerFactoryBase::~KResolverWorkerFactoryBase()
151 void KResolverWorkerFactoryBase::registerNewWorker(KResolverWorkerFactoryBase* factory)
153 KResolverManager::manager()->registerNewWorker(factory);
Name and service resolution class.
A namespace to store all networking-related (socket) classes.