LeechCraft Monocle 0.6.70-17609-g3dde4097dd
Modular document viewer for LeechCraft
Loading...
Searching...
No Matches
ibackendplugin.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 "idocument.h"
14
15namespace LC::Monocle
16{
34 {
35 protected:
36 virtual ~IBackendPlugin () = default;
37 public:
38 static inline QByteArray PluginClass = "org.LeechCraft.Monocle.IBackendPlugin";
64 virtual bool CanLoadDocument (const QString& filename) = 0;
65
88 virtual IDocument_ptr LoadDocument (const QString& filename) = 0;
89
101 virtual QStringList GetSupportedMimes () const = 0;
102 };
103}
104
105Q_DECLARE_INTERFACE (LC::Monocle::IBackendPlugin, "org.LeechCraft.Monocle.IBackendPlugin/1.0")
Basic interface for plugins providing support for various document formats for Monocle.
virtual ~IBackendPlugin()=default
virtual QStringList GetSupportedMimes() const =0
Returns the MIME types supported by the backend.
virtual bool CanLoadDocument(const QString &filename)=0
Checks whether the given document can be loaded.
static QByteArray PluginClass
virtual IDocument_ptr LoadDocument(const QString &filename)=0
Loads the given document.
std::shared_ptr< IDocument > IDocument_ptr
Shared pointer to a document.
Definition idocument.h:197