5G-MAG Reference Tools - MBMS Middleware
Public Types | Public Member Functions | Private Attributes | List of all members
MBMS_RT::CacheItem Class Referenceabstract

#include <CacheItems.h>

Inheritance diagram for MBMS_RT::CacheItem:
Inheritance graph
Collaboration diagram for MBMS_RT::CacheItem:
Collaboration graph

Public Types

enum class  ItemType { File , Segment , Playlist , Manifest }
 

Public Member Functions

 CacheItem (const std::string &content_location, unsigned long received_at)
 
virtual ~CacheItem ()=default
 
virtual ItemType item_type () const =0
 
virtual char * buffer () const =0
 
virtual uint32_t content_length () const =0
 
virtual ItemSource item_source () const =0
 
std::string item_source_as_string () const
 
std::string content_location () const
 
virtual unsigned long received_at () const
 

Private Attributes

std::string _content_location
 
unsigned long _received_at
 

Detailed Description

Definition at line 26 of file CacheItems.h.

Member Enumeration Documentation

◆ ItemType

Enumerator
File 
Segment 
Playlist 
Manifest 

Definition at line 34 of file CacheItems.h.

34  {
35  File,
36  Segment,
37  Playlist,
38  Manifest
39  };

Constructor & Destructor Documentation

◆ CacheItem()

MBMS_RT::CacheItem::CacheItem ( const std::string &  content_location,
unsigned long  received_at 
)
inline

Definition at line 28 of file CacheItems.h.

std::string _content_location
Definition: CacheItems.h:60
unsigned long _received_at
Definition: CacheItems.h:64
std::string content_location() const
Definition: CacheItems.h:59
virtual unsigned long received_at() const
Definition: CacheItems.h:60

◆ ~CacheItem()

virtual MBMS_RT::CacheItem::~CacheItem ( )
virtualdefault

Member Function Documentation

◆ buffer()

virtual char* MBMS_RT::CacheItem::buffer ( ) const
pure virtual

◆ content_length()

virtual uint32_t MBMS_RT::CacheItem::content_length ( ) const
pure virtual

◆ content_location()

std::string MBMS_RT::CacheItem::content_location ( ) const
inline

Definition at line 59 of file CacheItems.h.

59 { return _content_location; };

◆ item_source()

virtual ItemSource MBMS_RT::CacheItem::item_source ( ) const
pure virtual

◆ item_source_as_string()

std::string MBMS_RT::CacheItem::item_source_as_string ( ) const
inline

Definition at line 45 of file CacheItems.h.

45  {
46  switch (item_source()) {
48  return "5G-BC";
49  case ItemSource::CDN:
50  return "CDN";
52  return "GEN";
54  default:
55  return "-";
56  }
57  }
virtual ItemSource item_source() const =0

◆ item_type()

virtual ItemType MBMS_RT::CacheItem::item_type ( ) const
pure virtual

◆ received_at()

virtual unsigned long MBMS_RT::CacheItem::received_at ( ) const
inlinevirtual

Reimplemented in MBMS_RT::CachedManifest, MBMS_RT::CachedPlaylist, and MBMS_RT::CachedSegment.

Definition at line 60 of file CacheItems.h.

60 { return _received_at; };

Member Data Documentation

◆ _content_location

std::string MBMS_RT::CacheItem::_content_location
private

Definition at line 63 of file CacheItems.h.

◆ _received_at

unsigned long MBMS_RT::CacheItem::_received_at
private

Definition at line 64 of file CacheItems.h.


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