LeechCraft Azoth  0.6.70-15082-g543737046d
Modular multiprotocol IM plugin for LeechCraft
LC::Azoth::IRichTextMessage Class Referenceabstract

Interface for messages supporting rich text contents. More...

#include "irichtextmessage.h"

Public Member Functions

virtual ~IRichTextMessage ()
 
virtual QString GetRichBody () const =0
 Returns the rich text contents. More...
 
virtual void SetRichBody (const QString &text)=0
 Sets the rich text contents. More...
 

Detailed Description

Interface for messages supporting rich text contents.

If a message supports rich text contents (like HTML formatting or inline images) and wants to advertise this, it should also implement this interface in addition to the plain IMessage.

The contents returned by GetRichBody() should only supplement the plain text string returned by IMessage::GetBody(). That is, the string returned IMessage::GetBody() should have basically the same meaning as the one from GetRichBody().

See also
IMessage

Definition at line 42 of file irichtextmessage.h.

Constructor & Destructor Documentation

◆ ~IRichTextMessage()

virtual LC::Azoth::IRichTextMessage::~IRichTextMessage ( )
inlinevirtual

Definition at line 51 of file irichtextmessage.h.

Member Function Documentation

◆ GetRichBody()

virtual QString LC::Azoth::IRichTextMessage::GetRichBody ( ) const
pure virtual

Returns the rich text contents.

The returned string is expected to be an HTML string. It should be possible to append the string contents as the child of HTML's body element.

The contents of the returned string should have the same semantic meaning to the user as the ones of the string returned by the IMessage::GetBody(). Ideally, the latter should be equal to the contents of this one stripped of all the HTML formatting.

The string contents aren't escaped by the core. All the required escaping should be done by the interface implementation itself.

Returns
The HTML-formatted rich text string.
See also
SetRichBody(), IMessage::GetBody()

◆ SetRichBody()

virtual void LC::Azoth::IRichTextMessage::SetRichBody ( const QString &  text)
pure virtual

Sets the rich text contents.

This function is called to set the HTML-formatted rich contents of the message. The passed string satisfies all the requirements mentioned in the GetRichBody() documentation.

This function should NOT update the usual plain-text body of the message, it would be set separately.

Parameters
[in]textThe HTML-formatted contents of the message.
See also
GetRichBody(), IMessage::SetBody()

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