Umsci
Upmix Spatial Control Interface — OCA/OCP.1 spatial audio utility
Loading...
Searching...
No Matches
UmsciZeroconfDiscoverComboComponent.h
Go to the documentation of this file.
1/* Copyright (c) 2026, Christian Ahrens
2 *
3 * This file is part of Umsci <https://github.com/ChristianAhrens/Umsci>
4 *
5 * This tool is free software; you can redistribute it and/or modify it under
6 * the terms of the GNU Lesser General Public License version 3.0 as published
7 * by the Free Software Foundation.
8 *
9 * This tool is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12 * details.
13 *
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this tool; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
18
19#pragma once
20
21#include <JuceHeader.h>
22
23#include <ZeroconfDiscoverComponent.h>
24
25
57 : public juce::Component,
58 public ZeroconfSearcher::ZeroconfSearcher::ZeroconfSearcherListener
59{
60public:
63
64 //==============================================================================
65 void resized() override;
69 void parentSizeChanged() override;
70
71 //==============================================================================
73 void handleServicesChanged(std::string serviceName) override;
74
75 //==============================================================================
80 std::function<void(const ZeroconfSearcher::ZeroconfSearcher::ServiceInfo&)> onServiceSelected;
81
82private:
83 //==============================================================================
85 void updateComboBox();
86
87 //==============================================================================
88 std::unique_ptr<ZeroconfSearcher::ZeroconfSearcher> m_searcher;
89 std::unique_ptr<juce::ComboBox> m_comboBox;
90 std::vector<ZeroconfSearcher::ZeroconfSearcher::ServiceInfo> m_services;
91
92 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(UmsciZeroconfDiscoverComboComponent)
93};
A ComboBox that continuously scans the local network for DS100 devices announced via Zeroconf/mDNS an...
std::function< void(const ZeroconfSearcher::ZeroconfSearcher::ServiceInfo &)> onServiceSelected
Fired when the user selects a device from the combo box. The ServiceInfo contains the resolved hostna...
void parentSizeChanged() override
Resizes the component to 80 % of the parent's width whenever the parent (AlertWindow) is resized,...
void handleServicesChanged(std::string serviceName) override
ZeroconfSearcherListener callback — called when devices appear or disappear.