MythTV
master
mythtv
libs
libmythupnp
upnpserviceimpl.h
Go to the documentation of this file.
1
// Program Name: upnpserviceimpl.h
3
// Created : Jan 15, 2007
4
//
5
// Purpose : UPnp Device Description parser/generator
6
//
7
// Copyright (c) 2007 David Blain <dblain@mythtv.org>
8
//
9
// Licensed under the GPL v2 or later, see LICENSE for details
10
//
12
13
#ifndef UPNPSERVICEIMPL_H
14
#define UPNPSERVICEIMPL_H
15
16
#include <utility>
17
18
// Qt headers
19
#include <QList>
20
#include <QString>
21
22
// MythTV headers
23
#include "
upnpexp.h
"
24
#include "
upnputil.h
"
25
26
27
class
UPnpDevice
;
28
30
class
UPNP_PUBLIC
UPnpServiceImpl
31
{
32
public
:
33
UPnpServiceImpl
() =
default
;
34
virtual
~
UPnpServiceImpl
() =
default
;
35
36
void
RegisterService(
UPnpDevice
*device);
37
38
protected
:
40
virtual
QString GetServiceType(
void
) = 0;
42
virtual
QString GetServiceId(
void
) = 0;
44
virtual
QString GetServiceControlURL(
void
) = 0;
46
virtual
QString GetServiceDescURL(
void
) = 0;
48
virtual
QString
GetServiceEventURL
(
void
) {
return
{}; }
49
};
50
51
class
UPNP_PUBLIC
UPnPFeature
52
{
53
public
:
54
UPnPFeature
(QString name,
int
version
) :
55
m_name(std::move(name)), m_version(
version
) {}
56
virtual
~
UPnPFeature
() =
default
;
57
58
QString toXML();
59
virtual
QString CreateXML() = 0;
60
61
protected
:
62
QString
m_name
;
63
int
m_version
;
64
};
65
66
class
UPNP_PUBLIC
UPnPFeatureList
67
{
68
public
:
69
UPnPFeatureList
() =
default
;
70
~
UPnPFeatureList
();
71
72
void
AddFeature(
UPnPFeature
*
feature
);
73
void
AddAttribute(
const
NameValue
&attribute );
74
QString toXML();
75
76
private
:
77
NameValues
m_attributes
;
78
QList<UPnPFeature*>
m_features
;
79
80
};
81
82
#endif // UPNPSERVICEIMPL_H
NameValue
Definition:
upnputil.h:36
UPnPFeature::m_name
QString m_name
Definition:
upnpserviceimpl.h:62
UPnpServiceImpl::GetServiceEventURL
virtual QString GetServiceEventURL(void)
Provides the URL of the event portion of the service.
Definition:
upnpserviceimpl.h:48
UPnPFeature::UPnPFeature
UPnPFeature(QString name, int version)
Definition:
upnpserviceimpl.h:54
NameValues
Definition:
upnputil.h:73
feature
static const std::array< featureStruct, 7 > feature
Definition:
audiooutputsettings.cpp:434
UPnpDevice
Definition:
upnpdevice.h:105
UPnPFeatureList::m_features
QList< UPnPFeature * > m_features
Definition:
upnpserviceimpl.h:78
UPnPFeatureList
Definition:
upnpserviceimpl.h:66
UPnPFeatureList::m_attributes
NameValues m_attributes
Definition:
upnpserviceimpl.h:77
UPNP_PUBLIC
#define UPNP_PUBLIC
Definition:
upnpexp.h:9
UPnPFeature
Definition:
upnpserviceimpl.h:51
giantbomb.giantbomb_api.version
string version
Definition:
giantbomb_api.py:78
upnputil.h
UPnpServiceImpl
Base class for services we offer to other UPnP devices.
Definition:
upnpserviceimpl.h:30
UPnPFeature::m_version
int m_version
Definition:
upnpserviceimpl.h:63
upnpexp.h
Generated on Fri Aug 29 2025 03:16:03 for MythTV by
1.8.17