lib/upnp/ContentDirectoryService: include some headers only with libpupnp
This commit is contained in:
@@ -2,16 +2,17 @@
|
|||||||
// Copyright The Music Player Daemon Project
|
// Copyright The Music Player Daemon Project
|
||||||
|
|
||||||
#include "lib/upnp/ContentDirectoryService.hxx"
|
#include "lib/upnp/ContentDirectoryService.hxx"
|
||||||
#include "config.h"
|
|
||||||
#ifdef USING_PUPNP
|
|
||||||
# include "lib/upnp/ixmlwrap.hxx"
|
|
||||||
#endif
|
|
||||||
#include "lib/upnp/UniqueIxml.hxx"
|
|
||||||
#include "lib/upnp/Action.hxx"
|
|
||||||
#include "lib/upnp/Error.hxx"
|
#include "lib/upnp/Error.hxx"
|
||||||
#include "Directory.hxx"
|
#include "Directory.hxx"
|
||||||
#include "util/NumberParser.hxx"
|
#include "util/NumberParser.hxx"
|
||||||
#include "util/ScopeExit.hxx"
|
#include "util/ScopeExit.hxx"
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
#ifdef USING_PUPNP
|
||||||
|
#include "lib/upnp/ixmlwrap.hxx"
|
||||||
|
#include "lib/upnp/Action.hxx"
|
||||||
|
#include "lib/upnp/UniqueIxml.hxx"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <fmt/format.h>
|
#include <fmt/format.h>
|
||||||
|
|
||||||
|
@@ -1,8 +1,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
// Copyright The Music Player Daemon Project
|
// Copyright The Music Player Daemon Project
|
||||||
|
|
||||||
#ifndef MPD_UPNP_ACTION_HXX
|
#pragma once
|
||||||
#define MPD_UPNP_ACTION_HXX
|
|
||||||
|
|
||||||
#include <upnptools.h>
|
#include <upnptools.h>
|
||||||
|
|
||||||
@@ -20,7 +19,6 @@ CountNameValuePairs([[maybe_unused]] const char *name, [[maybe_unused]] const ch
|
|||||||
return 1 + CountNameValuePairs(args...);
|
return 1 + CountNameValuePairs(args...);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USING_PUPNP
|
|
||||||
/**
|
/**
|
||||||
* A wrapper for UpnpMakeAction() that counts the number of name/value
|
* A wrapper for UpnpMakeAction() that counts the number of name/value
|
||||||
* pairs and adds the nullptr sentinel.
|
* pairs and adds the nullptr sentinel.
|
||||||
@@ -35,6 +33,3 @@ MakeActionHelper(const char *action_name, const char *service_type,
|
|||||||
args...,
|
args...,
|
||||||
nullptr, nullptr);
|
nullptr, nullptr);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@@ -1,19 +1,19 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
// Copyright The Music Player Daemon Project
|
// Copyright The Music Player Daemon Project
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#include "ContentDirectoryService.hxx"
|
#include "ContentDirectoryService.hxx"
|
||||||
#include "Device.hxx"
|
#include "Device.hxx"
|
||||||
#include "Error.hxx"
|
#include "Error.hxx"
|
||||||
#include "UniqueIxml.hxx"
|
|
||||||
#ifdef USING_PUPNP
|
|
||||||
# include "ixmlwrap.hxx"
|
|
||||||
#endif
|
|
||||||
#include "Action.hxx"
|
|
||||||
#include "util/IterableSplitString.hxx"
|
#include "util/IterableSplitString.hxx"
|
||||||
#include "util/UriRelative.hxx"
|
#include "util/UriRelative.hxx"
|
||||||
#include "util/UriUtil.hxx"
|
#include "util/UriUtil.hxx"
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
#ifdef USING_PUPNP
|
||||||
|
#include "ixmlwrap.hxx"
|
||||||
|
#include "Action.hxx"
|
||||||
|
#include "UniqueIxml.hxx"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
@@ -1,13 +1,11 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
// Copyright The Music Player Daemon Project
|
// Copyright The Music Player Daemon Project
|
||||||
|
|
||||||
#ifndef MPD_UPNP_UNIQUE_XML_HXX
|
#pragma once
|
||||||
#define MPD_UPNP_UNIQUE_XML_HXX
|
|
||||||
|
|
||||||
#ifdef USING_PUPNP
|
#include <ixml.h>
|
||||||
# include <ixml.h>
|
|
||||||
|
|
||||||
# include <memory>
|
#include <memory>
|
||||||
|
|
||||||
struct UpnpIxmlDeleter {
|
struct UpnpIxmlDeleter {
|
||||||
void operator()(IXML_Document *doc) noexcept {
|
void operator()(IXML_Document *doc) noexcept {
|
||||||
@@ -21,6 +19,3 @@ struct UpnpIxmlDeleter {
|
|||||||
|
|
||||||
typedef std::unique_ptr<IXML_Document, UpnpIxmlDeleter> UniqueIxmlDocument;
|
typedef std::unique_ptr<IXML_Document, UpnpIxmlDeleter> UniqueIxmlDocument;
|
||||||
typedef std::unique_ptr<IXML_NodeList, UpnpIxmlDeleter> UniqueIxmlNodeList;
|
typedef std::unique_ptr<IXML_NodeList, UpnpIxmlDeleter> UniqueIxmlNodeList;
|
||||||
|
|
||||||
#endif /* USING_PUPNP */
|
|
||||||
#endif
|
|
||||||
|
@@ -1,11 +1,9 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
// Copyright J.F.Dockes
|
// Copyright J.F.Dockes
|
||||||
|
|
||||||
#ifndef _IXMLWRAP_H_INCLUDED_
|
#pragma once
|
||||||
#define _IXMLWRAP_H_INCLUDED_
|
|
||||||
|
|
||||||
#ifdef USING_PUPNP
|
#include <ixml.h>
|
||||||
# include <ixml.h>
|
|
||||||
|
|
||||||
namespace ixmlwrap {
|
namespace ixmlwrap {
|
||||||
/**
|
/**
|
||||||
@@ -17,6 +15,3 @@ namespace ixmlwrap {
|
|||||||
const char *name) noexcept;
|
const char *name) noexcept;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* USING_PUPNP */
|
|
||||||
#endif /* _IXMLWRAP_H_INCLUDED_ */
|
|
||||||
|
Reference in New Issue
Block a user