LeechCraft  0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
IEntityHandler Class Referenceabstract

Interface for plugins able to handle entities. More...

#include "ientityhandler.h"

Public Member Functions

virtual EntityTestHandleResult CouldHandle (const LC::Entity &entity) const =0
 Returns whether plugin can handle given entity. More...
 
virtual void Handle (LC::Entity entity)=0
 Notifies the plugin that it should handle the given entity. More...
 
virtual ~IEntityHandler ()
 

Detailed Description

Interface for plugins able to handle entities.

This is similar to IDownload, but it doesn't require to implement all functions of IDownload, and IDownloaders and IEntityHandlers are shown in different groups when presented to user, for example, in entity handle dialog.

See also
IDownload

Definition at line 26 of file ientityhandler.h.

Constructor & Destructor Documentation

◆ ~IEntityHandler()

virtual IEntityHandler::~IEntityHandler ( )
inlinevirtual

Definition at line 60 of file ientityhandler.h.

Member Function Documentation

◆ CouldHandle()

virtual EntityTestHandleResult IEntityHandler::CouldHandle ( const LC::Entity entity) const
pure virtual

Returns whether plugin can handle given entity.

This function is used to query every loaded plugin providing the IDownload interface whether it could handle the entity entered by user or generated automatically with given task parameters. Entity could be anything from file name to URL to all kinds of hashes like Magnet links.

Parameters
[in]entityA Entity structure that could possibly be handled by this plugin.
Returns
The result of testing whether the entity can be handled.
See also
Handle
LC::Entity

◆ Handle()

virtual void IEntityHandler::Handle ( LC::Entity  entity)
pure virtual

Notifies the plugin that it should handle the given entity.

This function is called to make IEntityHandle know that it should handle the given entity. The entity is guaranteed to be checked previously against CouldHandle().

Parameters
[in]entityA Entity structure to be handled by this plugin.
See also
LC::Entity

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