• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdenetwork API Reference
  • KDE Home
  • Contact Us
 

kopete/libkopete

  • sources
  • kde-4.14
  • kdenetwork
  • kopete
  • libkopete
kopetemimetypehandler.h
Go to the documentation of this file.
1 /*
2  kopetemimetypehandler.h - Kopete Mime-type Handlers
3 
4  Copyright (c) 2004 by Richard Smith <kde@metafoo.co.uk>
5 
6  Kopete (c) 2004 by the Kopete developers <kopete-devel@kde.org>
7 
8  *************************************************************************
9  * *
10  * This library is free software; you can redistribute it and/or *
11  * modify it under the terms of the GNU Lesser General Public *
12  * License as published by the Free Software Foundation; either *
13  * version 2 of the License, or (at your option) any later version. *
14  * *
15  *************************************************************************
16 */
17 
18 #ifndef KOPETEMIMETYPEHANDLER_H
19 #define KOPETEMIMETYPEHANDLER_H
20 
21 #include <kurl.h>
22 
23 class QString;
24 class QStringList;
25 
26 #include "kopete_export.h"
27 
28 namespace Kopete
29 {
30 
36 class KOPETE_EXPORT MimeTypeHandler
37 {
38 protected:
39  MimeTypeHandler( bool canAcceptRemoteFiles = false );
40 public:
41  virtual ~MimeTypeHandler();
42 
50  static bool dispatchURL( const KUrl &url );
51 
55  const QStringList mimeTypes() const;
56 
60  const QStringList protocols() const;
61 
67  bool canAcceptRemoteFiles() const;
68 
72  virtual KDE_DEPRECATED void handleURL( const KUrl &url ) const;
73 
80  virtual void handleURL( const QString &mimeType, const KUrl &url ) const;
81 
82 protected:
89  bool registerAsMimeHandler( const QString &mimeType );
90 
97  bool registerAsProtocolHandler( const QString &protocol );
98 
99 private:
110  static bool dispatchToHandler( const KUrl &url, const QString &mimeType, MimeTypeHandler *handler );
111 
112  class Private;
113  Private * const d;
114 };
115 
119 class KOPETE_EXPORT EmoticonMimeTypeHandler : public MimeTypeHandler
120 {
121 public:
122  EmoticonMimeTypeHandler();
123 
124  const QStringList mimeTypes() const;
125 
126  void handleURL( const QString &mimeType, const KUrl &url ) const;
127  KDE_DEPRECATED void handleURL( const KUrl &url ) const;
128 };
129 
130 } // Kopete
131 
132 #endif
133 // vim: set noet ts=4 sts=4 sw=4:
KOPETE_EXPORT
#define KOPETE_EXPORT
Definition: kopete_export.h:27
Kopete::MimeTypeHandler
A handler for some set of mime-types A mime type handler is responsible for handling requests to open...
Definition: kopetemimetypehandler.h:36
Kopete::EmoticonMimeTypeHandler
Mime-type handler class for Kopete emoticon files.
Definition: kopetemimetypehandler.h:119
kopete_export.h
QString
QStringList
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:29:19 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kopete/libkopete

Skip menu "kopete/libkopete"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdenetwork API Reference

Skip menu "kdenetwork API Reference"
  • kget
  • kopete
  •   kopete
  •   libkopete
  • krdc
  • krfb

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal