blob: 97a53a18672f1b787b271c8251fa5b17c712210e (
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
|
// Copyright 2005-2020 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 "BonjourServer.h"
#include "BonjourServiceRegister.h"
BonjourServer::BonjourServer() {
bsrRegister = NULL;
#ifdef Q_OS_WIN
static bool bDelayLoadFailed = false;
if (bDelayLoadFailed) return;
HMODULE hLib = LoadLibrary(L"DNSSD.DLL");
if (hLib == NULL) {
bDelayLoadFailed = true;
qWarning("Bonjour: Failed to load dnssd.dll");
return;
}
FreeLibrary(hLib);
#endif
bsrRegister = new BonjourServiceRegister(this);
}
BonjourServer::~BonjourServer() {
delete bsrRegister;
}
|