libupnpp  0.16.0
A C++ wrapper for the Portable UPnP reference library
mediarenderer.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 _MEDIARENDERER_HXX_INCLUDED_
19 #define _MEDIARENDERER_HXX_INCLUDED_
20 
21 #include <memory>
22 #include <string>
23 #include <vector>
24 
25 #include "libupnpp/control/avtransport.hxx"
26 #include "libupnpp/control/device.hxx"
27 #include "libupnpp/control/ohplaylist.hxx"
28 #include "libupnpp/control/ohproduct.hxx"
29 #include "libupnpp/control/ohtime.hxx"
30 #include "libupnpp/control/ohvolume.hxx"
31 #include "libupnpp/control/renderingcontrol.hxx"
32 #include "libupnpp/control/ohreceiver.hxx"
33 #include "libupnpp/control/ohsender.hxx"
34 #include "libupnpp/control/ohradio.hxx"
35 #include "libupnpp/control/ohinfo.hxx"
36 #include "libupnpp/control/conman.hxx"
37 
38 namespace UPnPClient {
39 
40 class MediaRenderer;
41 class UPnPDeviceDesc;
42 
43 typedef std::shared_ptr<MediaRenderer> MRDH;
44 
50 class UPNPP_API MediaRenderer : public Device {
51 public:
53  MediaRenderer(const UPnPDeviceDesc& desc);
54 
55  ~MediaRenderer();
56 
59  RDCH rdc(); // Rendering control
60  AVTH avt(); // AVTransport
61  CNMH conman(); // Connection Manager
62  OHPRH ohpr(); // OpenHome Product
63  OHPLH ohpl(); // OpenHome Playlist
64  OHTMH ohtm(); // OpenHome Time
65  OHVLH ohvl(); // OpenHome Volume
66  OHRCH ohrc(); // OpenHome Receiver
67  OHRDH ohrd(); // OpenHome Radio
68  OHIFH ohif(); // OpenHome Info
69  OHSNH ohsn(); // OpenHome Sender
70 
71  bool hasOpenHome();
72 
77  static bool getDeviceDescs(std::vector<UPnPDeviceDesc>& devices,
78  const std::string& friendlyName = "");
79  static bool isMRDevice(const std::string& devicetype);
80 
81  bool reSubscribeAll();
82 
83 protected:
84  static const std::string DType;
85 private:
86  class UPNPP_LOCAL Internal;
87  Internal *m;
88 };
89 
90 }
91 
92 #endif /* _MEDIARENDERER_HXX_INCLUDED_ */
For now, the Device class is just a holder for the description object.
Definition: device.hxx:42
The MediaRenderer class mostly holds a bunch of convenience functions to create the different service...
Definition: mediarenderer.hxx:50
Data holder for a UPnP device, parsed from the XML description obtained during discovery.
Definition: description.hxx:142
UPnP Description phase: interpreting the device description which we downloaded from the URL obtained...
Definition: avlastchg.cxx:27