Ardour
9.0-pre0-380-gbbdb6b0e63
zeroconf.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2022 Robin Gareus <robin@gareus.org>
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; either version 2 of the License, or
7
* (at your option) any later version.
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License along
15
* with this program; if not, write to the Free Software Foundation, Inc.,
16
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17
*/
18
19
#include <cstdint>
20
#include <string>
21
22
#ifdef __APPLE__
23
#include <dns_sd.h>
24
#include <glibmm/iochannel.h>
25
#include <glibmm/main.h>
26
#endif
27
28
#include "
ardour/libardour_visibility.h
"
29
#include "
ardour/system_exec.h
"
30
31
namespace
ARDOUR
{
32
33
class
LIBARDOUR_API
ZeroConf
34
{
35
public
:
36
ZeroConf
(std::string
const
& type =
"_osc._udp"
, uint16_t port = 3819, std::string
const
& host =
""
);
37
~ZeroConf
();
38
39
private
:
40
bool
start
();
41
void
stop
();
42
43
std::string
_type
;
44
uint16_t
_port
;
45
std::string
_host
;
46
47
#ifdef __APPLE__
48
static
gboolean event (GIOChannel*, GIOCondition, gpointer);
49
50
DNSServiceRef _ref;
51
guint _source_id;
52
GIOChannel* _gio_channel;
53
#else
54
SystemExec
*
_avahi
;
55
#endif
56
};
57
58
};
// namespace ARDOUR
system_exec.h
ARDOUR::SystemExec
Definition:
ardour/ardour/system_exec.h:29
ARDOUR::ZeroConf
Definition:
zeroconf.h:34
ARDOUR::ZeroConf::start
bool start()
ARDOUR::ZeroConf::_type
std::string _type
Definition:
zeroconf.h:43
ARDOUR::ZeroConf::ZeroConf
ZeroConf(std::string const &type="_osc._udp", uint16_t port=3819, std::string const &host="")
ARDOUR::ZeroConf::stop
void stop()
ARDOUR::ZeroConf::_port
uint16_t _port
Definition:
zeroconf.h:44
ARDOUR::ZeroConf::_avahi
SystemExec * _avahi
Definition:
zeroconf.h:54
ARDOUR::ZeroConf::_host
std::string _host
Definition:
zeroconf.h:45
ARDOUR::ZeroConf::~ZeroConf
~ZeroConf()
libardour_visibility.h
LIBARDOUR_API
#define LIBARDOUR_API
Definition:
libardour_visibility.h:38
ARDOUR
Definition:
analysis_window.h:44
libs
ardour
ardour
zeroconf.h
Generated on Fri Nov 8 2024 05:34:57 for Ardour by
1.9.1