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

Interface for protocols supporting multiuser chat rooms. More...

#include "imucprotocol.h"

Public Member Functions

virtual ~IMUCProtocol ()
 
virtual QWidget * GetMUCJoinWidget ()=0
 Returns the widget used to set up the MUC join options. More...
 
virtual QVariantMap TryGuessMUCIdentifyingData (const QString &input, QObject *entryObj)
 Tries to guess MUC identifying data from user input. More...
 

Detailed Description

Interface for protocols supporting multiuser chat rooms.

This interface should be implemented by protocol objects supporting multiuser chat rooms.

Definition at line 24 of file imucprotocol.h.

Constructor & Destructor Documentation

◆ ~IMUCProtocol()

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

Definition at line 27 of file imucprotocol.h.

Member Function Documentation

◆ GetMUCJoinWidget()

virtual QWidget* LC::Azoth::IMUCProtocol::GetMUCJoinWidget ( )
pure virtual

Returns the widget used to set up the MUC join options.

The returned widget must implement IMUCJoinWidget.

The caller takes the ownership of the widget, so each time a newly constructed widget should be returned, and the plugin shouldn't delete the widget by itself.

If the protocol doesn't support joining multi-user chats, it is safe to return nullptr here.

Returns
The widget used for joining MUCs, which must implement IMUCJoinWidget, or nullptr if not supported.
See also
IMUCJoinWidget

◆ TryGuessMUCIdentifyingData()

virtual QVariantMap LC::Azoth::IMUCProtocol::TryGuessMUCIdentifyingData ( const QString &  input,
QObject *  entryObj 
)
inlinevirtual

Tries to guess MUC identifying data from user input.

This method is used by Azoth core and other plugins to try to guess MUC identifying data from the given user input. The input, for example, may be a string like c_plu.nosp@m.s_pl.nosp@m.us@co.nosp@m.nfer.nosp@m.ence..nosp@m.jabb.nosp@m.er.ru in case of a XMPP MUC.

The method should return a variant map suitable to passing to IMUCJoinWidget::SetIdentifyingData().

The entryObj can be used to get additional information about the context of the user input. For example, if only room name is given, it can be used to get the corresponding server address.

Parameters
[in]inputThe user input, like a human-readable MUC name.
[in]entryObjThe entry this input is relevant to.
Returns
The MUC identifying data suitable for passing to IMUCJoinWidget::SetIdentifyingData(), or an empty variantmap if guessing failed.
See also
IMUCJoinWidget::SetIdentifyingData()

Definition at line 72 of file imucprotocol.h.


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