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

This is an abstract class (API) that needs to be implemented by a plugin. More...

#include <webviewhandler.h>

Collaboration diagram for jami::WebViewHandler:
Collaboration graph

Public Member Functions

std::string id () const
 Returns the dataPath of the plugin that created this WebViewHandler.
 
virtual std::string pluginWebViewAttach (const std::string &accountId, const std::string &webViewId, const std::string &action)=0
 Called by the daemon whenever the client attaches a new webview.
 
virtual void pluginWebViewDetach (const std::string &webViewId)=0
 Called by the daemon whenever the client detaches a webview.
 
virtual void pluginWebViewMessage (const std::string &webViewId, const std::string &messageId, const std::string &payload)=0
 Called by the daemon whenever the client webview sends a message to the plugin.
 
virtual void setId (const std::string &id) final
 Should be called by the WebViewHandler creator to set the plugin's id_ variable.
 
virtual ~WebViewHandler ()
 

Detailed Description

This is an abstract class (API) that needs to be implemented by a plugin.

Any plugin that wants to open a WebView needs to implement this class.

Definition at line 28 of file webviewhandler.h.

Constructor & Destructor Documentation

◆ ~WebViewHandler()

virtual jami::WebViewHandler::~WebViewHandler ( )
inlinevirtual

Definition at line 31 of file webviewhandler.h.

Member Function Documentation

◆ id()

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

Returns the dataPath of the plugin that created this WebViewHandler.

Definition at line 36 of file webviewhandler.h.

Referenced by setId().

◆ pluginWebViewAttach()

virtual std::string jami::WebViewHandler::pluginWebViewAttach ( const std::string &  accountId,
const std::string &  webViewId,
const std::string &  action 
)
pure virtual

Called by the daemon whenever the client attaches a new webview.

Returns
Relative path to an HTML file inside of the plugin's datapath

◆ pluginWebViewDetach()

virtual void jami::WebViewHandler::pluginWebViewDetach ( const std::string &  webViewId)
pure virtual

Called by the daemon whenever the client detaches a webview.

◆ pluginWebViewMessage()

virtual void jami::WebViewHandler::pluginWebViewMessage ( const std::string &  webViewId,
const std::string &  messageId,
const std::string &  payload 
)
pure virtual

Called by the daemon whenever the client webview sends a message to the plugin.

◆ setId()

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

Should be called by the WebViewHandler creator to set the plugin's id_ variable.

Definition at line 41 of file webviewhandler.h.

References id().

Here is the call graph for this function:

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