[Windows] Remove redundant DirectSound error codes
[xbmc.git] / xbmc / platform / android / network / ZeroconfAndroid.h
blobb31f20416c9f7dd4ae4025bb67bc4f2951add773
1 /*
2 * Copyright (C) 2017 Christian Browet
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
9 #pragma once
11 #include "network/Zeroconf.h"
12 #include "threads/CriticalSection.h"
14 #include "platform/android/activity/JNIXBMCNsdManagerRegistrationListener.h"
16 #include <androidjni/NsdManager.h>
17 #include <androidjni/NsdServiceInfo.h>
19 class CZeroconfAndroid : public CZeroconf
21 public:
22 CZeroconfAndroid();
23 ~CZeroconfAndroid() override;
25 // CZeroconf interface
26 protected:
27 bool doPublishService(const std::string& fcr_identifier, const std::string& fcr_type, const std::string& fcr_name, unsigned int f_port, const std::vector<std::pair<std::string, std::string>>& txt) override;
28 bool doForceReAnnounceService(const std::string& fcr_identifier) override;
29 bool doRemoveService(const std::string& fcr_ident) override;
30 void doStop() override;
32 private:
33 jni::CJNINsdManager m_manager;
35 //lock + data (accessed from runloop(main thread) + the rest)
36 CCriticalSection m_data_guard;
37 struct tServiceRef
39 jni::CJNINsdServiceInfo serviceInfo;
40 jni::CJNIXBMCNsdManagerRegistrationListener registrationListener;
41 int updateNumber;
43 typedef std::map<std::string, struct tServiceRef> tServiceMap;
44 tServiceMap m_services;