From 406452f019f097bf52d8db529eabe8dd2d0e977a Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Fri, 1 Nov 2013 19:26:01 +0100 Subject: UPnP database plugin [mk: renamed source files, applied coding style, reduced bloat, using MPD's threading library, using MPD's error reporting and logging library and refactoring, fixed lots of bugs] --- src/db/upnp/Util.hxx | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/db/upnp/Util.hxx (limited to 'src/db/upnp/Util.hxx') diff --git a/src/db/upnp/Util.hxx b/src/db/upnp/Util.hxx new file mode 100644 index 000000000..2fdc3890f --- /dev/null +++ b/src/db/upnp/Util.hxx @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2003-2014 The Music Player Daemon Project + * http://www.musicpd.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#ifndef MPD_UPNP_UTIL_HXX +#define MPD_UPNP_UTIL_HXX + +#include + +std::string +caturl(const std::string& s1, const std::string& s2); + +void +trimstring(std::string &s, const char *ws = " \t\n"); + +std::string +path_getfather(const std::string &s); + +template +bool csvToStrings(const std::string& s, T &tokens); + +#define UPNPP_DEBUG + +#if defined(UPNPP_DEBUG) && defined(DEBUG) +#include +#define PLOGINF(...) UpnpPrintf(UPNP_INFO, API, __FILE__, __LINE__, __VA_ARGS__) +#else +#define PLOGINF(...) +#endif + +#endif /* _UPNPP_H_X_INCLUDED_ */ -- cgit v1.2.3