Commit Graph

130 Commits

Author SHA1 Message Date
Benedek Kupper
d466206fb3 use uniform utf-8 encoding 2023-07-06 15:05:44 +02:00
Jonathan Bagg
9e8addde36 README.md - add Android NDS note 2023-05-22 16:03:56 -04:00
Jonathan Bagg
65e0713bc3 Android: Call nsd.stopServiceDiscovery() when going to sleep
If Android is on it's way to suspend when stopBrowser() is called, we need
to call nsd.stopServiceDiscovery() synchronously to force it to run
before the device goes to sleep.

Was an issue on Android 10 on Levono Tab M10 FHD Plus
TB-X606FA_S300554-220630_BMP
2023-05-22 15:48:52 -04:00
Jonathan Bagg
4fada0fb2a Example - Add java source dir to test app example for Android NDS
The java source actually needs to be in $$PWD/android/src/ even though
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
2023-05-22 15:41:12 -04:00
Jonathan Bagg
58d9ca7e7b AndroidNds - change java to BSD license for simpler app integration. 2023-05-22 11:36:00 -04:00
Jonathan Bagg
39e96235ce update readme Apple App Store deployment & added Distribution Requirements 2023-05-22 11:34:18 -04:00
Jonathan Bagg
6df17b9760 AndroidNds - add interface parameter to startServicePublish()
This is just to fix compiling on master, interface is not actually used.
2023-05-22 11:34:01 -04:00
Jonathan Bagg
da386b2ac3 Android: Call nsd.unregisterService() synchronously when going to sleep
If Android is on it's way to suspend when stopServicePublish() is called,
we need to call nsd.unregisterService() synchronously to force it to run
before the device goes to sleep.  If instead it is scheduled to run in the
Android thread, it will not run until the device is woken back up.
2023-05-22 09:08:15 -04:00
Jonathan Bagg
f89c73695e Android: Fix missing or corrupt service name
The publish service name and type are passed to startServicePublish() as
char pointers.  startServicePublish() calls runOnAndroidThread which asks
the java code to run registerService().  If name and type are objects on
the stack, they could get freed  / deleted before the registerService() is
run in the java thread which would cause registerService() to use deleted
objects.  Fix --> make permanent objects for name and type.
2023-05-22 09:08:15 -04:00
Michael Zanetti
61f5676248 also set pointer size to 64bit fixed on the C++ size
Signed-off-by: Jonathan Bagg <drwho@infidigm.net>
2023-05-22 09:08:15 -04:00
Michael Zanetti
2a7a8fb9d8 Use jlong instead of jint for intptr_t
Signed-off-by: Jonathan Bagg <drwho@infidigm.net>
2023-05-22 09:08:15 -04:00
Michael Zanetti
966877a9a0 Queue resolver calls
Signed-off-by: Jonathan Bagg <drwho@infidigm.net>
2023-05-22 09:08:15 -04:00
Michael Zanetti
3f5650388c use proper pointer type
Signed-off-by: Jonathan Bagg <drwho@infidigm.net>
2023-05-22 09:08:15 -04:00
Michael Zanetti
24debe31b0 Move Android part to use native Android mDNS API
Signed-off-by: Jonathan Bagg <drwho@infidigm.net>
2023-05-22 09:08:15 -04:00
Jonathan Bagg
473d8520f9 Avahi Client - fix crashing is avahi daemon is not running. pre_Android_api30 2023-05-06 08:32:19 -04:00
probonopd
7b066b1aed Fix building on FreeBSD, including the example
Closes #55
2022-11-01 08:42:06 -04:00
Marc Reilly
3d7b094b75 project: examples, enable building as standalone
Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
2022-11-01 20:20:35 +11:00
Marc Reilly
668f7358c4 project: cmake: change include path for INSTALL_INTERFACE
This updates the include path used when this project is used/consumed
via find_package(). The include paths no longer need to be prefixed
with 'QtZeroConf', and so now they can be included the same regardless
of whether this project is being used via FetchContent or find_package

Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
2022-11-01 20:14:05 +11:00
Marc Reilly
2318fb1987 project: bump min required cmake version to 3.4
Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
2022-11-01 10:30:24 +11:00
Marc Reilly
81253d92da project: CMake, set SOVERSION for shared libs. Project VERSION
Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
2022-11-01 10:30:24 +11:00
Marc Reilly
d807d5ab37 project: link against avahi-common
Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
2022-11-01 10:30:24 +11:00
Marc Reilly
0889adbc23 project: cmake: allow building with Qt6
Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
2022-11-01 10:30:24 +11:00
Jonathan Bagg
c75cd78cff Add optional parameter for binding service to specific interface
Forgot Linux
2022-10-28 13:57:08 -04:00
Brian Kendall
16b50c700f Add optional parameter for binding service to specific interface 2022-10-28 13:12:56 -04:00
Florian Meinicke
29be12c558 Fix "multiple socket notifiers for same socket"
because the `addressNotifier` of the `Resolver` is deleted after a new
`QSocketNotifier` has been created. That means there are two socket
notifiers for the same socket for a brief moment causing this warning.
2022-10-04 08:05:29 +02:00
morixhub
74402496b0 Fixed handling of TXT records longer than 127 bytes 2022-04-08 21:29:56 -04:00
David Kahles (KDV)
31fc8e5c72 Improve finding avahi-client
Unfortunately, there is no FindAvahi.cmake file available. Instead use
find_library and find_path to find the libavahi-client.so and
avahi-client/client.h files. This improves logging if the files are not found
and allows to use CMAKE_FIND_ROOT_PATH to alter the search paths for
crossplatform builds.
2022-04-08 21:19:08 -04:00
David Kahles (KDV)
58e8f6ee1c AvahiCode + Bonjour: use correct datatype for pos
ssize_t is not available on windows (at least not with msvc2019). Use
int as QByteArray::indexOf is defined with int return type.
2022-04-08 21:16:16 -04:00
Jonathan Bagg
c48fc95cf1 AvahiCore + Bonjour - pos should be signed. 2022-02-17 20:45:29 -05:00
Jonathan Bagg
334ca21012 AvahiClient - Fix parsing of TXT records if value contains '='
TXT record values can also contain equals signs. The current
implementation would consider any record where the value contains an
equals sign as an empty record.
2022-02-17 20:41:07 -05:00
Florian Meinicke
01f35f27a3 Fix parsing of TXT records if value contains '='
TXT record values can also contain equals signs. The current
implementation would consider any record where the value contains an
equals sign as an empty record.
2022-02-17 20:36:59 -05:00
Michael Zanetti
7fadf1cff5 add support for compiling for ubuntu touch
with builtin avahi

Signed-off-by: Jonathan Bagg <drwho@infidigm.net>
2021-09-17 20:30:36 -04:00
Jonathan Bagg
2fb144933e Add clang-format config 2021-09-17 20:18:09 -04:00
Jonathan Bagg
9d1293191d Added iOS 14 note to README.md 2021-09-17 20:17:18 -04:00
jbagg
df4a1581ab Merge pull request #39 from rumengb/master
fix for gcc compilation on windows
2020-10-29 21:32:35 -04:00
jbagg
4646051dab Merge pull request #43 from FMeinicke/fix-cmake
Add proper CMake config file to install
2020-10-29 21:30:22 -04:00
Florian Meinicke
755854a87f Add missing INSTALL_CMAKEDIR variable 2020-10-29 08:39:56 +01:00
Florian Meinicke
ab274491fc Add proper CMake config file to install
so that QtZeroConf can be easily integrated with find_package
2020-10-29 07:52:08 +01:00
jbagg
c80376bd86 Merge pull request #41 from FMeinicke/cmake
Add CMake support
2020-10-04 22:32:31 -04:00
jbagg
1995137301 Merge pull request #42 from FMeinicke/fix-linker-error
Fix linker error due to missing export of debug operator
2020-10-04 22:31:17 -04:00
Florian Meinicke
dca11a1c36 Fix linker error in example
when building QtZeroConf as shared library: The debug operator<< for
QZeroConfService was not properly exported
2020-10-04 14:35:00 +02:00
Florian Meinicke
fe9d3cbc63 Add CMake project for example 2020-09-14 13:03:26 +02:00
Florian Meinicke
3fdf9dd8d8 Fix CMakeLists.txt for linux
Have to link to 'avahi-client' and not 'libavahi'
2020-09-14 13:03:26 +02:00
Florian Meinicke
a8084c9eac Update CMakeLists.txt
to make QtZeroConf installable and usable from other projects
2020-09-14 13:03:26 +02:00
Florian Meinicke
d630284b10 Update README with CMake build instructions 2020-09-14 12:45:48 +02:00
Florian Meinicke
fe3751ecdb Fix CMakeLists.txt
* Add `project`
* Remove hardcoded values for controlling the library type (i.e. shared
or static) in favour of using `BUILD_SHARED_LIBS` and letting CMake
manage the rest
* Fix linker error (at least on Windows w/ MinGW) that
'legacy_stdio_definitions.lib' couldn't be found
2020-09-14 12:45:48 +02:00
Corentin Jabot
26521fb848 Fix build on azure 2020-09-14 12:45:48 +02:00
Corentin Jabot
10f457f2bf Fix windows build 2020-09-14 12:45:48 +02:00
Corentin Jabot
351a834af7 Fix windows build 2020-09-14 12:45:48 +02:00
Corentin Jabot
a504ec17c7 Compile as static lib 2020-09-14 12:45:48 +02:00