LeechCraft
0.6.70-18450-gabe19ee3b0
Modular cross-platform feature rich live environment.
Toggle main menu visibility
Loading...
Searching...
No Matches
ientitymanager.h
Go to the documentation of this file.
1
/**********************************************************************
2
* LeechCraft - modular cross-platform feature rich internet client.
3
* Copyright (C) 2006-2014 Georg Rudoy
4
*
5
* Distributed under the Boost Software License, Version 1.0.
6
* (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7
**********************************************************************/
8
9
#pragma once
10
11
#include <QObject>
12
#include <QFuture>
13
#include <
util/sll/either.h
>
14
#include <
interfaces/idownload.h
>
15
16
namespace
LC
17
{
18
struct
Entity
;
19
}
20
31
class
Q_DECL_EXPORT
IEntityManager
32
{
33
public
:
36
struct
DelegationResult
37
{
42
QObject *
Handler_
=
nullptr
;
43
46
QFuture<IDownload::Result>
DownloadResult_
;
47
48
explicit
operator
bool ()
const
49
{
50
return
Handler_
;
51
}
52
};
53
54
virtual
~IEntityManager
() {}
55
72
virtual
DelegationResult
DelegateEntity
(
LC::Entity
entity, QObject *desired =
nullptr
) = 0;
73
88
virtual
bool
HandleEntity
(
LC::Entity
entity, QObject *desired =
nullptr
) = 0;
89
96
virtual
bool
CouldHandle
(
const
LC::Entity
& entity) = 0;
97
104
virtual
QList<QObject*>
GetPossibleHandlers
(
const
LC::Entity
& entity) = 0;
105
};
106
107
Q_DECLARE_INTERFACE (
IEntityManager
,
"org.Deviant.LeechCraft.IEntityManager/1.0"
)
IEntityManager
Proxy to core entity manager.
Definition
ientitymanager.h:32
IEntityManager::HandleEntity
virtual bool HandleEntity(LC::Entity entity, QObject *desired=nullptr)=0
Handles the given entity.
IEntityManager::DelegateEntity
virtual DelegationResult DelegateEntity(LC::Entity entity, QObject *desired=nullptr)=0
Delegates the given entity and returns the delegation result.
IEntityManager::GetPossibleHandlers
virtual QList< QObject * > GetPossibleHandlers(const LC::Entity &entity)=0
Queries what plugins can handle the given entity.
IEntityManager::~IEntityManager
virtual ~IEntityManager()
Definition
ientitymanager.h:54
IEntityManager::CouldHandle
virtual bool CouldHandle(const LC::Entity &entity)=0
Queries whether the given entity can be handled at all.
QFuture
Definition
idownload.h:17
QList
Definition
ianrulesstorage.h:14
idownload.h
LC
Definition
constants.h:15
either.h
IEntityManager::DelegationResult
The result of delegating this entity to another plugin.
Definition
ientitymanager.h:37
IEntityManager::DelegationResult::Handler_
QObject * Handler_
The plugin instance object that handles this entity.
Definition
ientitymanager.h:42
IEntityManager::DelegationResult::DownloadResult_
QFuture< IDownload::Result > DownloadResult_
Definition
ientitymanager.h:46
LC::Entity
A message used for inter-plugin communication.
Definition
structures.h:97
src
interfaces
core
ientitymanager.h
Generated by
1.17.0