kwave  18.07.70
CodecManager.h
Go to the documentation of this file.
1 /***************************************************************************
2  CodecManager.h - manager for Kwave's coders and decoders
3  -------------------
4  begin : Mar 10 2002
5  copyright : (C) 2002 by Thomas Eschenbacher
6  email : Thomas Eschenbacher <thomas.eschenbacher@gmx.de>
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef CODEC_MANAGER_H
19 #define CODEC_MANAGER_H
20 
21 #include "config.h"
22 
23 #include <QtGlobal>
24 #include <QList>
25 #include <QObject>
26 #include <QString>
27 #include <QStringList>
28 
29 namespace Kwave
30 {
31 
32  class Decoder;
33  class Encoder;
34 
35  class Q_DECL_EXPORT CodecManager: public QObject
36  {
37  Q_OBJECT
38  public:
39 
41  CodecManager();
42 
44  virtual ~CodecManager();
45 
51  static void registerEncoder(Kwave::Encoder &encoder);
52 
57  static void unregisterEncoder(Kwave::Encoder *encoder);
58 
64  static void registerDecoder(Kwave::Decoder &decoder);
65 
70  static void unregisterDecoder(Kwave::Decoder *decoder);
71 
77  static bool canDecode(const QString &mimetype_name);
78 
84  static Kwave::Decoder *decoder(const QString &mimetype_name);
85 
91  static Kwave::Encoder *encoder(const QString &mimetype_name);
92 
99  static QString encodingFilter();
100 
107  static QString decodingFilter();
108 
115  static QString mimeTypeOf(const QUrl &url);
116 
118  static QStringList encodingMimeTypes();
119 
120  private:
122  static QList<Kwave::Encoder *> m_encoders;
123 
125  static QList<Kwave::Decoder *> m_decoders;
126  };
127 }
128 
129 #endif /* CODEC_MANAGER_H */
130 
131 //***************************************************************************
132 //***************************************************************************
Definition: App.h:33
static QList< Kwave::Decoder * > m_decoders
Definition: CodecManager.h:125
static bool canDecode(const QMimeData *source)
Definition: FileDrag.h:34
static QList< Kwave::Encoder * > m_encoders
Definition: CodecManager.h:122