Representation of the File Delivery Table (FDT) in the FLUTE protocol.
More...
#include <tsFluteFDT.h>
|
|
| FluteFDT ()=default |
| | Default constructor.
|
| |
| | FluteFDT (Report &report, const FluteSessionId &sid, uint32_t instance_id, const ByteBlockPtr &content) |
| | Constructor.
|
| |
| ByteBlock & | content () |
| | Access the content of the file (modifiable version).
|
| |
| const ByteBlock & | content () const |
| | Access the content of the file (constant version).
|
| |
| bool | isValid () const |
| | Check if the file is valid (for instance is XML content was successfully parsed).
|
| |
| const UString & | name () const |
| | Get the name or URN of the file.
|
| |
| const FluteSessionId & | sessionId () const |
| | Get the session id of the file.
|
| |
| size_t | size () const |
| | Get the size of the file.
|
| |
| uint64_t | toi () const |
| | Get the Transport Object Identifier (TOI) of the file.
|
| |
| UString | toText () const |
| | Get a character string version of the file, if it is a text file.
|
| |
| UString | toXML () const |
| | Get an indented XML character string version of the file, if it is a text file.
|
| |
| const UString & | type () const |
| | Get the MIME type of the file.
|
| |
|
|
bool | complete = false |
| | FDT is complete, no new data in future FDT instances.
|
| |
|
UString | content_encoding {} |
| | Encoding type.
|
| |
|
UString | content_type {} |
| | MIME type.
|
| |
|
uint32_t | encoding_symbol_length = 0 |
| | Length of Encoding Symbol in bytes (FEC Encoding ID 0, 128, 129, 130).
|
| |
|
Time | expires {} |
| | FDT expiration date.
|
| |
|
uint32_t | fec_encoding_id = 0 |
| | FEC Encoding ID which was used to parse the structure (not part of the structore).
|
| |
|
uint32_t | fec_instance_id = 0 |
| | FEC Instance ID (FEC Encoding ID 128-255).
|
| |
|
std::list< File > | files {} |
| | List of files in this FDT.
|
| |
|
uint32_t | instance_id = 0 |
| | FDT instance id.
|
| |
|
uint32_t | max_encoding_symbols = 0 |
| | Max number of encoding symbols (FEC Encoding ID 129).
|
| |
|
uint32_t | max_source_block_length = 0 |
| | Max number of source symbols per source block (FEC Encoding ID 0, 128, 129, 130).
|
| |
|
| bool | parseXML (xml::Document &xml_doc, const UChar *expected_root=nullptr, bool ignore_namespace=false) |
| | Parse the document using XML format.
|
| |
|
|
bool | _valid = true |
| | The validity field can be updated by subclasses.
|
| |
Representation of the File Delivery Table (FDT) in the FLUTE protocol.
- See also
- IETF RFC 3926, section 3.4.2
◆ FluteFDT()
Constructor.
- Parameters
-
| [in] | report | Where to report errors. |
| [in] | sid | Session id. |
| [in] | instance_id | FDT Instance ID. |
| [in] | content | File content (XML text in UTF-8 representation). |
◆ isValid()
| bool ts::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()
Get the session id of the file.
- Returns
- A constant reference to the session in the object.
◆ toi()
| uint64_t ts::FluteFile::toi |
( |
| ) |
const |
|
inlineinherited |
Get the Transport Object Identifier (TOI) of the file.
- Returns
- The Transport Object Identifier.
◆ name()
| const UString & ts::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::FluteFile::type |
( |
| ) |
const |
|
inlineinherited |
Get the MIME type of the file.
- Returns
- A constant reference to the type string in the object.
◆ size()
| size_t ts::FluteFile::size |
( |
| ) |
const |
|
inlineinherited |
Get the size of the file.
- Returns
- The size of the file in bytes.
◆ content() [1/2]
Access the content of the file (modifiable version).
- Returns
- A reference to the content of the file.
◆ content() [2/2]
| const ByteBlock & ts::FluteFile::content |
( |
| ) |
const |
|
inlineinherited |
Access the content of the file (constant version).
- Returns
- A constant reference to the content of the file.
◆ toText()
| UString ts::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::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::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_doc | XML document to parse. |
| [in] | expected_root | Expected root name in XML text. Ignored if null or empty. |
| [in] | ignore_namespace | Specify 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: