# dnssd Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# DNSSD::Query Class Reference

This class provides way to search for specified service type in one domain. Class that represents service query in one domain. More...

`#include <query.h>`

Inheritance diagram for DNSSD::Query:

[legend]
Collaboration diagram for DNSSD::Query:

[legend]
List of all members.

## Signals

void | serviceAdded (DNSSD::RemoteService::Ptr)
void | serviceRemoved (DNSSD::RemoteService::Ptr)
void | finished ()

## Public Member Functions

| Query (const QString &type, const QString &domain)
virtual void | startQuery ()
bool | isRunning () const
bool | isFinished () const
const QString & | domain () const

## Protected Member Functions

virtual void | virtual_hook (int, void *)
virtual void | customEvent (QCustomEvent *event)

## Detailed Description

This class provides way to search for specified service type in one domain. Class that represents service query in one domain.

Depending on domain name, either multicast or unicast DNS will be used.

Author:
  Jakub Stachowski

Definition at line 39 of file query.h.

## Constructor & Destructor Documentation

DNSSD::Query::Query | ( | const QString & | type,
|  | const QString & | domain
| ) |

Creates new query.

Parameters:

  | type | Type of services to browse for
  | domain | Domain name - if set to "local." multicast query will be performed, otherwise unicast

Definition at line 49 of file query.cpp.

References QObject::connect(), and domain().

## Member Function Documentation

void DNSSD::Query::startQuery | ( |  | ) | `[virtual]`

| Starts query. Ignored if query is already running Definition at line 76 of file query.cpp. References finished(). Referenced by DNSSD::ServiceBrowser::addDomain(), and DNSSD::DomainBrowser::startBrowse().

bool DNSSD::Query::isRunning | ( |  | ) | const

| Returns TRUE if query is already running. Definition at line 61 of file query.cpp.

bool DNSSD::Query::isFinished | ( |  | ) | const

| Returns TRUE if all currently announced services has been reported. It does not mean that no more services can be found later and it is not related to isRunning() Definition at line 66 of file query.cpp.

const QString & DNSSD::Query::domain | ( |  | ) | const

| Returns queried domain. Definition at line 71 of file query.cpp. Referenced by Query().

void DNSSD::Query::serviceAdded | ( | DNSSD::RemoteService::Ptr |  | ) | `[signal]`

| Emitted when new service has been discovered.

void DNSSD::Query::serviceRemoved | ( | DNSSD::RemoteService::Ptr |  | ) | `[signal]`

| Emitted when previously discovered service is not longer published.

void DNSSD::Query::finished | ( |  | ) | `[signal]`

| Emitted when all announced services has been reported. Referenced by startQuery().

The documentation for this class was generated from the following files:

- query.h
- query.cpp

This file is part of the documentation for dnssd Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:28:24 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003