cohtml::IDataStorageHandler
Class that will handle data storage requests.
#include <DataStorage.h>
Public Functions
Section titled “Public Functions”| Name | |
|---|---|
| IDataStorageHandler() | |
| virtual | ~IDataStorageHandler() |
| virtual void | OnDataStorageRead(const cohtml::IDataStorageRequest * request, cohtml::IDataStorageResponse * response) =0 Called when data storage needs a key or value data. |
| virtual bool | OnDataStorageWrite(const char * id, const char * key, const char * value) =0 Called when data storage needs a data to be stored for a specific ID and key If data collection for that ID doesn’t exist it should be created. |
| virtual void | OnDataStorageRemove(const char * id, const char * key) =0 Called when data storage needs a data to be removed from the collection. |
| virtual void | OnDataStorageClear(const char * id) =0 Called when data storage needs all data for a given collection to be cleared. |
| virtual unsigned long | OnDataStorageCount(const char * id) =0 Called when data storage needs the count of all data stored in a specific collection. |
Public Functions Documentation
Section titled “Public Functions Documentation”function IDataStorageHandler
Section titled “function IDataStorageHandler”IDataStorageHandler()function ~IDataStorageHandler
Section titled “function ~IDataStorageHandler”virtual ~IDataStorageHandler()function OnDataStorageRead
Section titled “function OnDataStorageRead”virtual void OnDataStorageRead( const cohtml::IDataStorageRequest * request, cohtml::IDataStorageResponse * response) =0Called when data storage needs a key or value data.
Parameters:
- request object describing the data requested
- response object where to pass the data read
function OnDataStorageWrite
Section titled “function OnDataStorageWrite”virtual bool OnDataStorageWrite( const char * id, const char * key, const char * value) =0Called when data storage needs a data to be stored for a specific ID and key If data collection for that ID doesn’t exist it should be created.
Parameters:
- id of the data collection
- key for storing the value
- value that needs to be stored
function OnDataStorageRemove
Section titled “function OnDataStorageRemove”virtual void OnDataStorageRemove( const char * id, const char * key) =0Called when data storage needs a data to be removed from the collection.
Parameters:
- id of the data collection
- key that needs to be removed
function OnDataStorageClear
Section titled “function OnDataStorageClear”virtual void OnDataStorageClear( const char * id) =0Called when data storage needs all data for a given collection to be cleared.
Parameters:
- id of the data collection
function OnDataStorageCount
Section titled “function OnDataStorageCount”virtual unsigned long OnDataStorageCount( const char * id) =0Called when data storage needs the count of all data stored in a specific collection.
Parameters:
- id of the data collection
© 2026 Coherent Labs. All rights reserved.