![]() |
LeechCraft Azoth
0.6.70-15082-g543737046d
Modular multiprotocol IM plugin for LeechCraft
|
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... | |
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().
Definition at line 42 of file irichtextmessage.h.
|
inlinevirtual |
Definition at line 51 of file irichtextmessage.h.
|
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.
|
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.
[in] | text | The HTML-formatted contents of the message. |