LeechCraft Monocle
0.6.70-17609-g3dde4097dd
Modular document viewer for LeechCraft
Loading...
Searching...
No Matches
iredirectorplugin.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 <QString>
12
#include <QMetaType>
13
#include <util/threads/coro/taskfwd.h>
14
15
namespace
LC::Monocle
16
{
17
struct
RedirectionResult
18
{
19
QString
TargetPath_
;
20
};
21
22
class
IRedirectorPlugin
23
{
24
public
:
25
static
inline
QByteArray
PluginClass
=
"org.LeechCraft.Monocle.IRedirectorPlugin"
;
26
27
virtual
bool
CanRedirectDocument
(
const
QString& filename)
const
= 0;
28
29
virtual
QString
GetRedirectionMime
(
const
QString& filename)
const
= 0;
30
49
virtual
Util::Task<std::optional<RedirectionResult>>
GetRedirection
(
const
QString& filename) = 0;
50
protected
:
51
virtual
~IRedirectorPlugin
() =
default
;
52
};
53
}
54
55
Q_DECLARE_INTERFACE (
LC::Monocle::IRedirectorPlugin
,
"org.LeechCraft.Monocle.IRedirectorPlugin/1.0"
)
LC::Monocle::IRedirectorPlugin
Definition
iredirectorplugin.h:23
LC::Monocle::IRedirectorPlugin::GetRedirection
virtual Util::Task< std::optional< RedirectionResult > > GetRedirection(const QString &filename)=0
Returns the redirection proxy for the given document.
LC::Monocle::IRedirectorPlugin::~IRedirectorPlugin
virtual ~IRedirectorPlugin()=default
LC::Monocle::IRedirectorPlugin::CanRedirectDocument
virtual bool CanRedirectDocument(const QString &filename) const =0
LC::Monocle::IRedirectorPlugin::PluginClass
static QByteArray PluginClass
Definition
iredirectorplugin.h:25
LC::Monocle::IRedirectorPlugin::GetRedirectionMime
virtual QString GetRedirectionMime(const QString &filename) const =0
LC::Monocle
Definition
coordsbase.h:15
LC::Monocle::RedirectionResult
Definition
iredirectorplugin.h:18
LC::Monocle::RedirectionResult::TargetPath_
QString TargetPath_
Definition
iredirectorplugin.h:19
src
plugins
monocle
interfaces
monocle
iredirectorplugin.h
Generated by
1.14.0