libmpd++
DASH MPD parsing and manipulation library
 
Loading...
Searching...
No Matches
XLink.hh
Go to the documentation of this file.
1#ifndef _BBC_PARSE_DASH_MPD_XLINK_HH_
2#define _BBC_PARSE_DASH_MPD_XLINK_HH_
3/*****************************************************************************
4 * DASH MPD parsing library in C++: XLink class
5 *****************************************************************************
6 * Copyright: (C) 2025 British Broadcasting Corporation
7 * Author(s): David Waring <david.waring2@bbc.co.uk>
8 * License: LGPLv3
9 *
10 * For full license terms please see the LICENSE file distributed with this
11 * library or refer to: https://www.gnu.org/licenses/lgpl-3.0.txt.
12 */
13#include <optional>
14
15#include "macros.hh"
16
19// Forward declarations for types only used by pointer or reference
20namespace xmlpp {
21 class Element;
22 class Node;
23}
26
28
29class Period;
30class AdaptationSet;
31
40public:
45
49
50 enum ShowEnum {
52 };
53
55 :m_href()
56 ,m_actuate(ACTUATE_ON_REQUEST)
57 ,m_type(TYPE_SIMPLE)
58 ,m_show(SHOW_EMBED)
59 {};
61 :m_href(href)
62 ,m_actuate(actuate)
63 ,m_type(typ)
64 ,m_show(show)
65 {};
66 XLink(const XLink &other)
67 :m_href(other.m_href)
68 ,m_actuate(other.m_actuate)
69 ,m_type(other.m_type)
70 ,m_show(other.m_show)
71 {};
72 XLink(XLink &&other)
73 :m_href(std::move(other.m_href))
74 ,m_actuate(other.m_actuate)
75 ,m_type(other.m_type)
76 ,m_show(other.m_show)
77 {};
78
79 virtual ~XLink() {};
80
81 XLink &operator=(const XLink &other) {
82 m_href = other.m_href;
83 m_actuate = other.m_actuate;
84 m_type = other.m_type;
85 m_show = other.m_show;
86 return *this;
87 }
88 XLink &operator=(XLink &&other) {
89 m_href = std::move(other.m_href);
90 m_actuate = other.m_actuate;
91 m_type = other.m_type;
92 m_show = other.m_show;
93 return *this;
94 }
95
96 bool operator==(const XLink &other) const;
97
98 const URI &href() const { return m_href; };
99
100 const ActuateEnum actuate() const { return m_actuate; };
101
102 const TypeEnum type() const { return m_type; };
103
104 const ShowEnum show() const { return m_show; };
105
107protected:
108 friend class Period;
109 friend class AdaptationSet;
110 //XLink(xmlpp::Node&);
111 //void setXMLElement(xmlpp::Element&) const;
113
114private:
115 URI m_href;
116 ActuateEnum m_actuate;
117 TypeEnum m_type;
118 ShowEnum m_show;
119};
120
122
123/* vim:ts=8:sts=4:sw=4:expandtab:
124 */
125#endif /*_BBC_PARSE_DASH_MPD_XLINK_HH_*/
AdaptationSet class.
Definition AdaptationSet.hh:60
Definition Period.hh:53
Definition URI.hh:40
#define LIBMPDPP_NAMESPACE_END
Definition macros.hh:54
#define LIBMPDPP_PUBLIC_API
Used to mark something as part of the public API.
Definition macros.hh:21
#define LIBMPDPP_NAMESPACE_BEGIN
Definition macros.hh:50
Definition SegmentAvailability.hh:87