kwave  18.07.70
CodecBase.h
Go to the documentation of this file.
1 /*************************************************************************
2  CodecBase.h - base class for Encoder and Decoder
3  -------------------
4  begin : Mon Mar 11 2002
5  copyright : (C) 2002 by Thomas Eschenbacher
6  email : 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_BASE_H
19 #define CODEC_BASE_H
20 
21 #include "config.h"
22 
23 #include <QtGlobal>
24 #include <QList>
25 #include <QString>
26 #include <QStringList>
27 
28 #include "libkwave/Compression.h"
29 
30 class QMimeType;
31 class QUrl;
32 
33 namespace Kwave
34 {
35 
36  class Q_DECL_EXPORT CodecBase
37  {
38  public:
39 
41  typedef struct {
42  QString name;
43  QString description;
44  QStringList patterns;
45  } MimeType;
46 
48  CodecBase();
49 
51  virtual ~CodecBase();
52 
54  virtual bool supports(const QMimeType &mimetype);
55 
57  virtual bool supports(const QString &mimetype_name);
58 
60  virtual QStringList extensions(const QString &mimetype_name) const;
61 
63  virtual const QList<CodecBase::MimeType> mimeTypes();
64 
66  virtual const QList<Kwave::Compression::Type> compressionTypes();
67 
79  virtual void addMimeType(const char *name,
80  const QString &description,
81  const char *patterns);
82 
88  virtual void addCompression(Kwave::Compression::Type compression);
89 
96  virtual QString mimeTypeOf(const QUrl &url);
97 
98  private:
99 
101  QList<MimeType> m_supported_mime_types;
102 
104  QList<Kwave::Compression::Type> m_supported_compression_types;
105 
106  };
107 }
108 
109 #endif /* CODEC_BASE_H */
110 
111 //***************************************************************************
112 //***************************************************************************
Definition: App.h:33
const char name[16]
Definition: memcpy.c:510
QList< Kwave::Compression::Type > m_supported_compression_types
Definition: CodecBase.h:104
QList< MimeType > m_supported_mime_types
Definition: CodecBase.h:101