libupnpp 0.16.0
A C++ wrapper for the Portable UPnP reference library
upnpavutils.hxx
1/* Copyright (C) 2006-2016 J.F.Dockes
2 *
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public
5 * License as published by the Free Software Foundation; either
6 * version 2.1 of the License, or (at your option) any later version.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
16 * 02110-1301 USA
17 */
18#ifndef _UPNPAVUTILS_HXX_INCLUDED_
19#define _UPNPAVUTILS_HXX_INCLUDED_
20
21#include <string>
22#include <vector>
23#include <unordered_map>
24
25#include "upnppexports.hxx"
26
27namespace UPnPP {
28
30std::string UPNPP_API upnpduration(int ms);
31
33int UPNPP_API upnpdurationtos(const std::string& dur);
34
36bool UPNPP_API ohplIdArrayToVec(const std::string& data, std::vector<int> *ids);
37
40 std::string protocol;
41 std::string network;
42 std::string contentFormat;
43 std::unordered_map<std::string, std::string> content_params;
44 std::string additional;
45};
46
48bool UPNPP_API parseProtoInfEntry(const std::string& protoinfo, ProtocolinfoEntry& e);
49
51bool UPNPP_API parseProtocolInfo(const std::string& pinfo, std::vector<ProtocolinfoEntry>& entries);
52
53}
54
55#endif /* _UPNPAVUTILS_HXX_INCLUDED_ */
Deal with data for the SOAP action protocol.
Definition base64.cxx:26
string upnpduration(int ms)
Format milliseconds into H+:MM:SS.
Definition upnpavutils.cxx:38
bool parseProtocolInfo(const std::string &pinfo, std::vector< ProtocolinfoEntry > &entries)
Decode comma-separated bunch of procolinfo entries.
Definition upnpavutils.cxx:130
Decoded protocolinfo entry data.
Definition upnpavutils.hxx:39