LeechCraft Monocle  0.6.70-18450-gabe19ee3b0
Modular document viewer for LeechCraft
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 
15 namespace 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 
105 Q_DECLARE_INTERFACE (LC::Monocle::IBackendPlugin, "org.LeechCraft.Monocle.IBackendPlugin/1.0")
virtual IDocument_ptr LoadDocument(const QString &filename)=0
Loads the given document.
virtual bool CanLoadDocument(const QString &filename)=0
Checks whether the given document can be loaded.
static QByteArray PluginClass
std::shared_ptr< IDocument > IDocument_ptr
Shared pointer to a document.
Definition: idocument.h:197
virtual QStringList GetSupportedMimes() const =0
Returns the MIME types supported by the backend.
virtual ~IBackendPlugin()=default
Basic interface for plugins providing support for various document formats for Monocle.