All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ImageSourceProviderabstract

Maps image sources to string identifiers.

Overview

This is used to lookup ImageSource instances when they are requested by a web-page.

Static Public Member Functions

static ImageSourceProviderinstance ()
 Get the ImageSourceProvider singleton.
 

Public Member Functions

virtual RefPtr< ImageSourceGetImageSource (const String &id)=0
 Get an ImageSource by its identifier.
 
virtual void AddImageSource (const String &id, RefPtr< ImageSource > image_source)=0
 Add an ImageSource to the provider.
 
virtual void RemoveImageSource (const String &id)=0
 Remove an ImageSource from the provider.
 
virtual void AddListener (ImageSourceProviderListener *listener)=0
 Add a listener to the provider.
 
virtual void RemoveListener (ImageSourceProviderListener *listener)=0
 Remove a listener from the provider.
 

Protected Member Functions

virtual ~ImageSourceProvider ()=default
 

Constructor & Destructor Documentation

◆ ~ImageSourceProvider()

virtual ~ImageSourceProvider ( )
protectedvirtualdefault

Member Function Documentation

◆ AddImageSource()

virtual void AddImageSource ( const String & id,
RefPtr< ImageSource > image_source )
pure virtual

Add an ImageSource to the provider.

Parameters
idThe identifier of the image source.
image_sourceThe ImageSource instance.

◆ AddListener()

virtual void AddListener ( ImageSourceProviderListener * listener)
pure virtual

Add a listener to the provider.

Parameters
listenerThe listener to add.

◆ GetImageSource()

virtual RefPtr< ImageSource > GetImageSource ( const String & id)
pure virtual

Get an ImageSource by its identifier.

Parameters
idThe identifier of the image source.
Returns
The ImageSource instance or nullptr if not found.

◆ instance()

static ImageSourceProvider & instance ( )
static

Get the ImageSourceProvider singleton.

◆ RemoveImageSource()

virtual void RemoveImageSource ( const String & id)
pure virtual

Remove an ImageSource from the provider.

Parameters
idThe identifier of the image source.

◆ RemoveListener()

virtual void RemoveListener ( ImageSourceProviderListener * listener)
pure virtual

Remove a listener from the provider.

Parameters
listenerThe listener to remove.

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