lib/upnp: drop support for libupnp versions older than 1.8
This commit is contained in:
parent
caec384ed0
commit
736a696f98
2
NEWS
2
NEWS
|
@ -14,6 +14,8 @@ ver 0.22 (not yet released)
|
||||||
- io_uring: new plugin for local files on Linux (using liburing)
|
- io_uring: new plugin for local files on Linux (using liburing)
|
||||||
* archive
|
* archive
|
||||||
- iso9660: support seeking
|
- iso9660: support seeking
|
||||||
|
* database
|
||||||
|
- upnp: drop support for libupnp versions older than 1.8
|
||||||
* playlist
|
* playlist
|
||||||
- cue: integrate contents in database
|
- cue: integrate contents in database
|
||||||
* decoder
|
* decoder
|
||||||
|
|
|
@ -33,10 +33,7 @@ static UpnpClient_Handle upnp_client_handle;
|
||||||
|
|
||||||
static int
|
static int
|
||||||
UpnpClientCallback(Upnp_EventType et,
|
UpnpClientCallback(Upnp_EventType et,
|
||||||
#if UPNP_VERSION >= 10800
|
const void *evp,
|
||||||
const
|
|
||||||
#endif
|
|
||||||
void *evp,
|
|
||||||
void *cookie) noexcept
|
void *cookie) noexcept
|
||||||
{
|
{
|
||||||
if (cookie == nullptr)
|
if (cookie == nullptr)
|
||||||
|
|
|
@ -22,51 +22,4 @@
|
||||||
|
|
||||||
#include <upnp.h>
|
#include <upnp.h>
|
||||||
|
|
||||||
#if UPNP_VERSION < 10800
|
|
||||||
/* emulate the libupnp 1.8 API with older versions */
|
|
||||||
|
|
||||||
using UpnpDiscovery = Upnp_Discovery;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if UPNP_VERSION < 10624
|
|
||||||
#include "util/Compiler.h"
|
|
||||||
|
|
||||||
gcc_pure
|
|
||||||
static inline int
|
|
||||||
UpnpDiscovery_get_Expires(const UpnpDiscovery *disco) noexcept
|
|
||||||
{
|
|
||||||
return disco->Expires;
|
|
||||||
}
|
|
||||||
|
|
||||||
gcc_pure
|
|
||||||
static inline const char *
|
|
||||||
UpnpDiscovery_get_DeviceID_cstr(const UpnpDiscovery *disco) noexcept
|
|
||||||
{
|
|
||||||
return disco->DeviceId;
|
|
||||||
}
|
|
||||||
|
|
||||||
gcc_pure
|
|
||||||
static inline const char *
|
|
||||||
UpnpDiscovery_get_DeviceType_cstr(const UpnpDiscovery *disco) noexcept
|
|
||||||
{
|
|
||||||
return disco->DeviceType;
|
|
||||||
}
|
|
||||||
|
|
||||||
gcc_pure
|
|
||||||
static inline const char *
|
|
||||||
UpnpDiscovery_get_ServiceType_cstr(const UpnpDiscovery *disco) noexcept
|
|
||||||
{
|
|
||||||
return disco->ServiceType;
|
|
||||||
}
|
|
||||||
|
|
||||||
gcc_pure
|
|
||||||
static inline const char *
|
|
||||||
UpnpDiscovery_get_Location_cstr(const UpnpDiscovery *disco) noexcept
|
|
||||||
{
|
|
||||||
return disco->Location;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -38,10 +38,6 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
|
||||||
#if UPNP_VERSION < 10800
|
|
||||||
#define UpnpDiscovery Upnp_Discovery
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class ContentDirectoryService;
|
class ContentDirectoryService;
|
||||||
|
|
||||||
class UPnPDiscoveryListener {
|
class UPnPDiscoveryListener {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
upnp_dep = dependency('libupnp', required: get_option('upnp'))
|
upnp_dep = dependency('libupnp', version: '>= 1.8', required: get_option('upnp'))
|
||||||
conf.set('ENABLE_UPNP', upnp_dep.found())
|
conf.set('ENABLE_UPNP', upnp_dep.found())
|
||||||
if not upnp_dep.found()
|
if not upnp_dep.found()
|
||||||
subdir_done()
|
subdir_done()
|
||||||
|
|
Loading…
Reference in New Issue