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
15namespace LC::Monocle
16{
18 {
19 QString TargetPath_;
20 };
21
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
55Q_DECLARE_INTERFACE (LC::Monocle::IRedirectorPlugin, "org.LeechCraft.Monocle.IRedirectorPlugin/1.0")
virtual Util::Task< std::optional< RedirectionResult > > GetRedirection(const QString &filename)=0
Returns the redirection proxy for the given document.
virtual ~IRedirectorPlugin()=default
virtual bool CanRedirectDocument(const QString &filename) const =0
virtual QString GetRedirectionMime(const QString &filename) const =0