libupnpp 0.16.0
A C++ wrapper for the Portable UPnP reference library
ohinfo.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 _OHINFO_HXX_INCLUDED_
19#define _OHINFO_HXX_INCLUDED_
20
21#include <unordered_map>
22#include <string>
23#include <vector>
24
25#include "service.hxx"
26
27
28namespace UPnPClient {
29
30class OHInfo;
31class UPnPDeviceDesc;
32class UPnPServiceDesc;
33
34typedef std::shared_ptr<OHInfo> OHIFH;
35
39class UPNPP_API OHInfo : public Service {
40public:
41 using Service::Service;
42
44 static bool isOHInfoService(const std::string& st);
45 bool serviceTypeMatch(const std::string& tp) override;
46
47 int counters(int *trackcount, int *detailscount, int *metatextcount);
48 int track(std::string *uri, UPnPDirObject *dirent);
49 int details(int *duration, int *bitrate, int *bitdepth, int *samplerate,
50 bool *lossless, std::string *codecname);
51 int metatext(UPnPDirObject *dirent);
52
53protected:
54 /* My service type string */
55 static const std::string SType;
56
57private:
58 void UPNPP_LOCAL evtCallback(
59 const std::unordered_map<std::string, std::string>&);
60 void UPNPP_LOCAL registerCallback() override;
61};
62
63} // namespace UPnPClient
64
65#endif /* _OHINFO_HXX_INCLUDED_ */
OHInfo Service client class.
Definition ohinfo.hxx:39
Definition service.hxx:88
UPnP Media Server directory entry, converted from XML data.
Definition cdircontent.hxx:60
UPnP Description phase: interpreting the device description which we downloaded from the URL obtained...
Definition avlastchg.cxx:28