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

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

#include <chathandler.h>

Collaboration diagram for jami::ChatHandler:
Collaboration graph

Public Member Functions

virtual void detach (chatSubjectPtr subject)=0
 Should detach a chat subject (Observable) and the plugin data process (Observer).
 
virtual std::map< std::string, std::string > getChatHandlerDetails ()=0
 Returns a map with handler's name, iconPath, and pluginId.
 
std::string id () const
 Returns the dataPath of the plugin that created this ChatHandler.
 
virtual void notifyChatSubject (std::pair< std::string, std::string > &subjectConnection, chatSubjectPtr subject)=0
 Should attach a chat subject (Observable) and the plugin data process (Observer).
 
virtual bool preferenceMapHasKey (const std::string &key)=0
 If a preference can be changed without the need to reload the plugin, this function should return True.
 
virtual void setId (const std::string &id) final
 Should be called by the ChatHandler creator to set the plugins id_ variable.
 
virtual void setPreferenceAttribute (const std::string &key, const std::string &value)=0
 If a preference can be changed without the need to reload the plugin, it should be done through this function.
 
virtual ~ChatHandler ()
 

Detailed Description

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

In other words, a plugin functionality that plays with messages, must start from the implementation of this class.

Definition at line 34 of file chathandler.h.

Constructor & Destructor Documentation

◆ ~ChatHandler()

virtual jami::ChatHandler::~ChatHandler ( )
inlinevirtual

Definition at line 37 of file chathandler.h.

Member Function Documentation

◆ detach()

virtual void jami::ChatHandler::detach ( chatSubjectPtr  subject)
pure virtual

Should detach a chat subject (Observable) and the plugin data process (Observer).

Parameters
subjectchat subject pointer

◆ getChatHandlerDetails()

virtual std::map< std::string, std::string > jami::ChatHandler::getChatHandlerDetails ( )
pure virtual

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

◆ id()

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

Returns the dataPath of the plugin that created this ChatHandler.

Definition at line 78 of file chathandler.h.

Referenced by setId().

◆ notifyChatSubject()

virtual void jami::ChatHandler::notifyChatSubject ( std::pair< std::string, std::string > &  subjectConnection,
chatSubjectPtr  subject 
)
pure virtual

Should attach a chat subject (Observable) and the plugin data process (Observer).

Parameters
subjectConnectionaccountId, peerId pair
subjectchat Subject pointer

◆ preferenceMapHasKey()

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

If a preference can be changed without the need to reload the plugin, this function should return True.

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

◆ setId()

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

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

Definition at line 83 of file chathandler.h.

References id().

Here is the call graph for this function:

◆ setPreferenceAttribute()

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

If a preference can be changed without the need to reload the plugin, it should be done through this function.

Parameters
key
value

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