ContentLoader¶
-
class
kanzi::connect::ContentLoader¶ Abstract class that retrieves content from external location.
Subclassed by DefaultContentLoader
Public Functions
-
ContentLoader()¶ Constructor.
-
virtual
~ContentLoader() = default¶ dtor
-
void
addObserver(Observer *observer)¶ Subscribe to content notification callbacks.
- Parameters
observer – Observer to add.
-
void
removeObserver(Observer *observer)¶ Unsubscribe from content notification callbacks.
- Parameters
observer – Observer to remove.
Function to start tracking the external content.
- Parameters
args – arguments for the content query
-
virtual void
startRuntime(const string uri, int credits, int creditReturnInterval) = 0¶ Starts runtime loading of data from a specific address.
- Parameters
uri – the uri where from to load.
credits – total amount of transfer credits.
creditReturnInterval – after how many received packets credits are returned to sender.
-
virtual void
stop() = 0¶ Function to stop / cancel the tracking process.
-
class
Observer¶ Class that contains callbacks to deliver the results.
Subclassed by ContentAdapter, DebugContentObserver, RuntimeDataSubscriber
Public Functions
-
virtual void
onContentInvalidated(ContentLoader *loader) = 0¶ Callback to notify that previously loaded content is no longer valid.
- Parameters
loader – Content loader that invalidated the content.
-
virtual void
onContentLoaded(ContentLoader *loader, ContentResult *result) = 0¶ Callback to notify that new content has been loaded.
- Parameters
loader – Content loader that finished loading.
result – Result of content query.
-
virtual void
onRuntimeDataUpdateReceived(ContentLoader *loader, const string &uri, const string &stream) = 0¶ Callback to notify when runtime data update is received.
-
virtual void
-