TSDuck v3.46-4930
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::mcast::NetworkInformationFile Class Reference

#include <tsmcastNetworkInformationFile.h>

Inheritance diagram for ts::mcast::NetworkInformationFile:
Collaboration diagram for ts::mcast::NetworkInformationFile:

Classes

class  BootstrapStream
class  BroadcastNetwork
class  DVBS2_NIPDeliveryParameters
class  DVBS2X_NIPDeliveryParameters
class  DVBT2_NIPDeliveryParameters
class  NIPStream
class  SatellitePosition
class  T2_descriptor

Public Member Functions

 NetworkInformationFile ()=default
 NetworkInformationFile (Report &report, const FluteFile &file, bool strict)
ByteBlock & content ()
const ByteBlock & content () const
const ByteBlockPtr contentPointer () const
const UString & fullType () const
bool isValid () const
const UString & name () const
const FluteSessionId & sessionId () const
size_t size () const
uint64_t toi () const
UString toText () const
UString toXML () const
const UString & type () const

Public Attributes

BroadcastNetwork actual {}
 Element <ActualBroadcastNetwork>.
UString nif_type {}
 Element <NIFType>.
std::list< BroadcastNetwork > others {}
 Elements <OtherBroadcastNetwork>.
Time version_update {}
 Element <VersionUpdate>.

Protected Member Functions

bool parseXML (xml::Document &xml_doc, const UChar *expected_root=nullptr, bool ignore_namespace=false)

Protected Attributes

bool _valid = true
 The validity field can be updated by subclasses.

Detailed Description

Representation of a NetworkInformationFile (DVB-NIP).

See also
ETSI TS 103 876, section 8.4.2.2
ServiceInformationFile

Constructor & Destructor Documentation

◆ NetworkInformationFile() [1/2]

ts::mcast::NetworkInformationFile::NetworkInformationFile ( )
default

Default constructor.

◆ NetworkInformationFile() [2/2]

ts::mcast::NetworkInformationFile::NetworkInformationFile ( Report & report,
const FluteFile & file,
bool strict )

Constructor.

Parameters
[in,out]reportWhere to report errors.
[in]fileReceived file from FLUTE demux.
[in]strictStrict XML parsing, do not tolerate missing mandatory elements or attributes.

Member Function Documentation

◆ isValid()

bool ts::mcast::FluteFile::isValid ( ) const
inlineinherited

Check if the file is valid (for instance is XML content was successfully parsed).

Returns
True if the file is valid. False otherwise.

◆ sessionId()

const FluteSessionId & ts::mcast::FluteFile::sessionId ( ) const
inlineinherited

Get the session id of the file.

Returns
A constant reference to the session in the object.

◆ toi()

uint64_t ts::mcast::FluteFile::toi ( ) const
inlineinherited

Get the Transport Object Identifier (TOI) of the file.

Returns
The Transport Object Identifier.

◆ name()

const UString & ts::mcast::FluteFile::name ( ) const
inlineinherited

Get the name or URN of the file.

Returns
A constant reference to the name in the object.

◆ type()

const UString & ts::mcast::FluteFile::type ( ) const
inlineinherited

Get the base MIME type of the file, excluding qualification such as "charset=utf-8".

Returns
A constant reference to the type string in the object.

◆ fullType()

const UString & ts::mcast::FluteFile::fullType ( ) const
inlineinherited

Get the original full MIME type of the file.

Returns
A constant reference to the type string in the object.

◆ size()

size_t ts::mcast::FluteFile::size ( ) const
inlineinherited

Get the size of the file.

Returns
The size of the file in bytes.

◆ content() [1/2]

ByteBlock & ts::mcast::FluteFile::content ( )
inlineinherited

Access the content of the file (modifiable version).

Returns
A reference to the content of the file.

◆ content() [2/2]

const ByteBlock & ts::mcast::FluteFile::content ( ) const
inlineinherited

Access the content of the file (constant version).

Returns
A constant reference to the content of the file.

◆ contentPointer()

const ByteBlockPtr ts::mcast::FluteFile::contentPointer ( ) const
inlineinherited

Get a shared pointer (std::shared_ptr) to the content of the file. This allow to keep the content for some time, even after the FluteFile object is deleted.

Returns
A shared pointer to the content of the file.

◆ toText()

UString ts::mcast::FluteFile::toText ( ) const
inherited

Get a character string version of the file, if it is a text file.

Returns
A string resulting from the conversion of the file content from UTF-8.

◆ toXML()

UString ts::mcast::FluteFile::toXML ( ) const
inherited

Get an indented XML character string version of the file, if it is a text file.

Returns
A string resulting from the conversion of the file content from UTF-8 and XML reindentation. If the text is not XML, the original text is returned.

◆ parseXML()

bool ts::mcast::FluteFile::parseXML ( xml::Document & xml_doc,
const UChar * expected_root = nullptr,
bool ignore_namespace = false )
protectedinherited

Parse the document using XML format.

Parameters
[in,out]xml_docXML document to parse.
[in]expected_rootExpected root name in XML text. Ignored if null or empty.
[in]ignore_namespaceSpecify if XML namespace is ignored by default in this document.
Returns
True on success, false on error.

The documentation for this class was generated from the following file: