kopete/libkopete
Kopete::MimeTypeHandler Class Reference
#include <kopetemimetypehandler.h>

Detailed Description
A handler for some set of mime-types A mime type handler is responsible for handling requests to open files of certain mime types presented to the main application.Definition at line 36 of file kopetemimetypehandler.h.
Public Member Functions | |
| virtual | ~MimeTypeHandler () |
| const QStringList | mimeTypes () const |
| const QStringList | protocols () const |
| bool | canAcceptRemoteFiles () const |
| virtual void | handleURL (const KUrl &url) const |
| virtual void | handleURL (const QString &mimeType, const KUrl &url) const |
Static Public Member Functions | |
| static bool | dispatchURL (const KUrl &url) |
Protected Member Functions | |
| MimeTypeHandler (bool canAcceptRemoteFiles=false) | |
| bool | registerAsMimeHandler (const QString &mimeType) |
| bool | registerAsProtocolHandler (const QString &protocol) |
Constructor & Destructor Documentation
| Kopete::MimeTypeHandler::MimeTypeHandler | ( | bool | canAcceptRemoteFiles = false |
) | [protected] |
Definition at line 50 of file kopetemimetypehandler.cpp.
| Kopete::MimeTypeHandler::~MimeTypeHandler | ( | ) | [virtual] |
Definition at line 55 of file kopetemimetypehandler.cpp.
Member Function Documentation
| bool Kopete::MimeTypeHandler::dispatchURL | ( | const KUrl & | url | ) | [static] |
Finds a MimeTypeHandler for a given URL, and tells that handler to handle it.
- Parameters:
-
url the url to dispatch
- Returns:
- true if a handler was registered for the mime type, false otherwise
Definition at line 111 of file kopetemimetypehandler.cpp.
| const QStringList Kopete::MimeTypeHandler::mimeTypes | ( | ) | const |
Returns a list of mime types this object is registered to handle.
Reimplemented in Kopete::EmoticonMimeTypeHandler.
Definition at line 96 of file kopetemimetypehandler.cpp.
| const QStringList Kopete::MimeTypeHandler::protocols | ( | ) | const |
Returns a list of protocols this object is registered to handle.
Definition at line 101 of file kopetemimetypehandler.cpp.
| bool Kopete::MimeTypeHandler::canAcceptRemoteFiles | ( | ) | const |
Returns true if this handler can accept remote files direcltly; If false, remote files are downloaded via KIO::NetAccess before being passed to handleURL.
Definition at line 106 of file kopetemimetypehandler.cpp.
| void Kopete::MimeTypeHandler::handleURL | ( | const KUrl & | url | ) | const [virtual] |
Handles the URL url.
- Parameters:
-
url The url to handle
Definition at line 186 of file kopetemimetypehandler.cpp.
| void Kopete::MimeTypeHandler::handleURL | ( | const QString & | mimeType, | |
| const KUrl & | url | |||
| ) | const [virtual] |
Handles the URL url, which has the mime type mimeType.
- Parameters:
-
mimeType The mime type of the URL url The url to handle
Reimplemented in Kopete::EmoticonMimeTypeHandler.
Definition at line 191 of file kopetemimetypehandler.cpp.
| bool Kopete::MimeTypeHandler::registerAsMimeHandler | ( | const QString & | mimeType | ) | [protected] |
Register this object as the handler of type mimeType.
- Parameters:
-
mimeType the mime type to handle
- Returns:
- true if registration succeeded, false if another handler is already set for this mime type.
Definition at line 66 of file kopetemimetypehandler.cpp.
| bool Kopete::MimeTypeHandler::registerAsProtocolHandler | ( | const QString & | protocol | ) | [protected] |
Register this object as the handler of type protocol.
- Parameters:
-
protocol the protocol to handle
- Returns:
- true if registration succeeded, false if another handler is already set for this protocol.
Definition at line 81 of file kopetemimetypehandler.cpp.
The documentation for this class was generated from the following files:
KDE 4.0 API Reference