Kanzi Connect  3.9.9
Kanzi Connect C++ API
kanzi::connect::ContentLoader Class Referenceabstract

Abstract class that retrieves content from external location. More...

#include <content_loader.hpp>

Inheritance diagram for kanzi::connect::ContentLoader:
kanzi::connect::DefaultContentLoader

Classes

class  Observer
 Class that contains callbacks to deliver the results. More...
 

Public Member Functions

void addObserver (Observer *observer)
 Subscribe to content notification callbacks. More...
 
 ContentLoader ()
 Constructor. More...
 
void removeObserver (Observer *observer)
 Unsubscribe from content notification callbacks. More...
 
virtual void start (ContentQueryArgumentsSharedPtr args)=0
 Function to start tracking the external content. More...
 
virtual void startRuntime (const string uri, int credits, int creditReturnInterval)=0
 Starts runtime loading of data from a specific address. More...
 
virtual void stop ()=0
 Function to stop / cancel the tracking process. More...
 
virtual ~ContentLoader ()=default
 dtor More...
 

Protected Member Functions

void notifyContentInvalidated ()
 Invoke observer callback when previously loaded content is invalidated. More...
 
void notifyContentLoaded (ContentResult *result)
 Invoke observer callback when new content result is received. More...
 
void notifyRuntimeDataUpdateReceived (const string &uri, const string &stream)
 

Detailed Description

Abstract class that retrieves content from external location.

Constructor & Destructor Documentation

◆ ContentLoader()

kanzi::connect::ContentLoader::ContentLoader ( )

Constructor.

◆ ~ContentLoader()

virtual kanzi::connect::ContentLoader::~ContentLoader ( )
virtualdefault

dtor

Member Function Documentation

◆ addObserver()

void kanzi::connect::ContentLoader::addObserver ( Observer observer)

Subscribe to content notification callbacks.

Parameters
observerObserver to add.

◆ notifyContentInvalidated()

void kanzi::connect::ContentLoader::notifyContentInvalidated ( )
protected

Invoke observer callback when previously loaded content is invalidated.

◆ notifyContentLoaded()

void kanzi::connect::ContentLoader::notifyContentLoaded ( ContentResult result)
protected

Invoke observer callback when new content result is received.

◆ notifyRuntimeDataUpdateReceived()

void kanzi::connect::ContentLoader::notifyRuntimeDataUpdateReceived ( const string &  uri,
const string &  stream 
)
protected

◆ removeObserver()

void kanzi::connect::ContentLoader::removeObserver ( Observer observer)

Unsubscribe from content notification callbacks.

Parameters
observerObserver to remove.

◆ start()

virtual void kanzi::connect::ContentLoader::start ( ContentQueryArgumentsSharedPtr  args)
pure virtual

Function to start tracking the external content.

Parameters
argsarguments for the content query

Implemented in kanzi::connect::DefaultContentLoader.

◆ startRuntime()

virtual void kanzi::connect::ContentLoader::startRuntime ( const string  uri,
int  credits,
int  creditReturnInterval 
)
pure virtual

Starts runtime loading of data from a specific address.

Parameters
urithe uri where from to load.
creditstotal amount of transfer credits.
creditReturnIntervalafter how many received packets credits are returned to sender.

Implemented in kanzi::connect::DefaultContentLoader.

◆ stop()

virtual void kanzi::connect::ContentLoader::stop ( )
pure virtual

Function to stop / cancel the tracking process.

Implemented in kanzi::connect::DefaultContentLoader.


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