Welcome to mirror list, hosted at ThFree Co, Russian Federation.

BonjourClient.cpp « mumble « src - github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c260a0508e94754d581af925a5443e8330f872ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright 2005-2019 The Mumble Developers. All rights reserved.
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file at the root of the
// Mumble source tree or at <https://www.mumble.info/LICENSE>.

#include "BonjourClient.h"

#include "BonjourServiceBrowser.h"
#include "BonjourServiceResolver.h"

BonjourClient::BonjourClient() {
	bsrResolver = NULL;
	bsbBrowser = NULL;
#ifdef Q_OS_WIN
	HMODULE hLib = LoadLibrary(L"DNSSD.DLL");
	if (hLib == NULL) {
		qWarning("Bonjour: Failed to load dnssd.dll");
		return;
	}
	FreeLibrary(hLib);
#endif
	bsbBrowser = new BonjourServiceBrowser(this);
	bsbBrowser->browseForServiceType(QLatin1String("_mumble._tcp"));
	bsrResolver = new BonjourServiceResolver(this);
	return;
}

BonjourClient::~BonjourClient() {
	delete bsbBrowser;
	delete bsrResolver;
}