LeechCraft Monocle  0.6.70-6645-gcd10d7e
Modular document viewer for LeechCraft
LeechCraft::Monocle::IRedirectProxy Class Referenceabstract

Interface for redirecting document opening requests. More...

#include "iredirectproxy.h"

Public Member Functions

virtual ~IRedirectProxy ()
 
virtual QObject * GetQObject ()=0
 Returns this object as a QObject. More...
 
virtual QString GetRedirectSource () const =0
 Returns the source filename of the document. More...
 
virtual QString GetRedirectTarget () const =0
 Returns the filename of the converted document. More...
 
virtual QString GetRedirectedMime () const =0
 Returns the MIME type of the converted document. More...
 

Protected Member Functions

virtual void ready (const QString &target)=0
 Emitted when the document has finished converting. More...
 

Detailed Description

Interface for redirecting document opening requests.

This interface is used when a backend can't open a document, but can convert it to a format probably openable by another Monocle plugin.

The GetRedirectedMime() method returns the MIME of the converted document.

GetRedirectSource() returns the filename of the source document, and GetRedirectTarget() returns the filename of the converted document.

The redirect proxy should start converting after a small delay after construction (like after spinning the main event loop via QTimer with a zero timeout). This is because temporary IRedirectProxy objects can be requested by Monocle to get the MIME type of the redirected document without actually converting it.

See also
IBackendPlugin
IBackendPlugin::GetRedirection()

Definition at line 61 of file iredirectproxy.h.

Constructor & Destructor Documentation

virtual LeechCraft::Monocle::IRedirectProxy::~IRedirectProxy ( )
inlinevirtual

Definition at line 64 of file iredirectproxy.h.

References GetQObject(), GetRedirectedMime(), GetRedirectSource(), GetRedirectTarget(), Q_DECLARE_INTERFACE(), and ready().

+ Here is the call graph for this function:

Member Function Documentation

virtual QObject* LeechCraft::Monocle::IRedirectProxy::GetQObject ( )
pure virtual

Returns this object as a QObject.

Returns
This object as a QObject.

Referenced by ~IRedirectProxy().

+ Here is the caller graph for this function:

virtual QString LeechCraft::Monocle::IRedirectProxy::GetRedirectedMime ( ) const
pure virtual

Returns the MIME type of the converted document.

This function should return valid data even before ready() is emitted.

Returns
The MIME type of the converted document.

Referenced by ~IRedirectProxy().

+ Here is the caller graph for this function:

virtual QString LeechCraft::Monocle::IRedirectProxy::GetRedirectSource ( ) const
pure virtual

Returns the source filename of the document.

The source filename is what's been passed to the IBackendPlugin::GetRedirection() method.

This function should return valid data even before ready() is emitted.

Returns
The file name of the source document being converted.

Referenced by ~IRedirectProxy().

+ Here is the caller graph for this function:

virtual QString LeechCraft::Monocle::IRedirectProxy::GetRedirectTarget ( ) const
pure virtual

Returns the filename of the converted document.

This function should return valid data even before ready() is emitted.

Returns
The file name of the converted document.

Referenced by ~IRedirectProxy().

+ Here is the caller graph for this function:

virtual void LeechCraft::Monocle::IRedirectProxy::ready ( const QString &  target)
protectedpure virtual

Emitted when the document has finished converting.

This signal should be emitted both when document is converted successfully and when it failed to be converted.

Note
This function is expected to be a signal.
Parameters
[out]targetThe target document.

Referenced by ~IRedirectProxy().

+ Here is the caller graph for this function:


The documentation for this class was generated from the following file: