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

Interface for protocols supporting import. More...

#include "isupportimport.h"

Public Member Functions

 ~ISupportImport ()
 
virtual QString GetImportProtocolID () const =0
 Returns the "import-style" ID of the protocol. More...
 
virtual bool ImportAccount (const QVariantMap &data)=0
 Should try to import the account from data. More...
 
virtual QString GetEntryID (const QString &hrID, QObject *account)=0
 Returns the unique entry ID for given entry and account. More...
 

Detailed Description

Interface for protocols supporting import.

This interface should be implemented by the protocols supporting import of accounts or IM history.

See also
IProtocol

Definition at line 37 of file isupportimport.h.

Constructor & Destructor Documentation

◆ ~ISupportImport()

LC::Azoth::ISupportImport::~ISupportImport ( )
inline

Definition at line 46 of file isupportimport.h.

Member Function Documentation

◆ GetEntryID()

virtual QString LC::Azoth::ISupportImport::GetEntryID ( const QString &  hrID,
QObject *  account 
)
pure virtual

Returns the unique entry ID for given entry and account.

This function is used to retrieve the unique entry ID from the given human-readable ID (hrID) and account object.

The entry identified by human-readable ID may be absent in the account's contact list.

Parameters
[in]hrIDThe human-readable ID of the entry.
[in]accountThe account object where the entry should belong.
Returns
The would-be unique entry ID.

◆ GetImportProtocolID()

virtual QString LC::Azoth::ISupportImport::GetImportProtocolID ( ) const
pure virtual

Returns the "import-style" ID of the protocol.

The following should be used, if possible:

  • xmpp for XMPP.
  • irc for IRC.
  • icq for ICQ.
Returns
The "import-style" ID of the protocol.

◆ ImportAccount()

virtual bool LC::Azoth::ISupportImport::ImportAccount ( const QVariantMap &  data)
pure virtual

Should try to import the account from data.

The following keys are used globally, where possible:

  • "Name" string for account name.
  • "Jid" string for bare account ID (like JID in XMPP or UIN in ICQ).
  • "Host" string for custom connection host, or empty.
  • "Port" int for custom connection port, or 0.
  • "Nick" string for user's nickname.
Parameters
[in]dataThe variant map with account settings.
Returns
True if import was successful, false otherwise.

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