Ring Daemon 16.0.0
Loading...
Searching...
No Matches
jami::PreferenceHandler Class Referenceabstract

This abstract class is an API we need to implement from plugin side. More...

#include <preferencehandler.h>

Collaboration diagram for jami::PreferenceHandler:
Collaboration graph

Public Member Functions

virtual std::map< std::string, std::string > getHandlerDetails ()=0
 Returns a map with handler's name, iconPath, and pluginId.
 
std::string id () const
 Returns the dataPath of the plugin that created this PreferenceHandler.
 
virtual bool preferenceMapHasKey (const std::string &key)=0
 If a preference can be stored as per accountId, this function should return True.
 
virtual void resetPreferenceAttributes (const std::string &accountId)=0
 Reset stored preferences for given accountId.
 
virtual void setId (const std::string &id) final
 Should be called by the PreferenceHandler creator to set the plugins id_ variable.
 
virtual void setPreferenceAttribute (const std::string &accountId, const std::string &key, const std::string &value)=0
 If a preference can have different values depending on accountId, those values should be stored in the plugin through this function.
 
virtual ~PreferenceHandler ()
 

Detailed Description

This abstract class is an API we need to implement from plugin side.

In other words, a plugin functionality that handles preferences per account must start from the implementation of this class.

Definition at line 29 of file preferencehandler.h.

Constructor & Destructor Documentation

◆ ~PreferenceHandler()

virtual jami::PreferenceHandler::~PreferenceHandler ( )
inlinevirtual

Definition at line 32 of file preferencehandler.h.

Member Function Documentation

◆ getHandlerDetails()

virtual std::map< std::string, std::string > jami::PreferenceHandler::getHandlerDetails ( )
pure virtual

Returns a map with handler's name, iconPath, and pluginId.

◆ id()

std::string jami::PreferenceHandler::id ( ) const
inline

Returns the dataPath of the plugin that created this PreferenceHandler.

Definition at line 67 of file preferencehandler.h.

Referenced by setId().

◆ preferenceMapHasKey()

virtual bool jami::PreferenceHandler::preferenceMapHasKey ( const std::string &  key)
pure virtual

If a preference can be stored as per accountId, this function should return True.

Parameters
key
Returns
True if preference can be changed through setPreferenceAttribute method.

◆ resetPreferenceAttributes()

virtual void jami::PreferenceHandler::resetPreferenceAttributes ( const std::string &  accountId)
pure virtual

Reset stored preferences for given accountId.

Parameters
accountId

◆ setId()

virtual void jami::PreferenceHandler::setId ( const std::string &  id)
inlinefinalvirtual

Should be called by the PreferenceHandler creator to set the plugins id_ variable.

Definition at line 72 of file preferencehandler.h.

References id().

Here is the call graph for this function:

◆ setPreferenceAttribute()

virtual void jami::PreferenceHandler::setPreferenceAttribute ( const std::string &  accountId,
const std::string &  key,
const std::string &  value 
)
pure virtual

If a preference can have different values depending on accountId, those values should be stored in the plugin through this function.

Parameters
accountId
key
value

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