diff options
Diffstat (limited to 'utils/rbutilqt/base/encoderbase.h')
-rw-r--r-- | utils/rbutilqt/base/encoderbase.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/utils/rbutilqt/base/encoderbase.h b/utils/rbutilqt/base/encoderbase.h new file mode 100644 index 0000000000..810b38aa9e --- /dev/null +++ b/utils/rbutilqt/base/encoderbase.h | |||
@@ -0,0 +1,63 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * | ||
9 | * Copyright (C) 2007 by Dominik Wenger | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or | ||
12 | * modify it under the terms of the GNU General Public License | ||
13 | * as published by the Free Software Foundation; either version 2 | ||
14 | * of the License, or (at your option) any later version. | ||
15 | * | ||
16 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
17 | * KIND, either express or implied. | ||
18 | * | ||
19 | ****************************************************************************/ | ||
20 | |||
21 | #ifndef ENCODERS_H | ||
22 | #define ENCODERS_H | ||
23 | |||
24 | #include <QtCore> | ||
25 | |||
26 | #include "encttssettings.h" | ||
27 | |||
28 | |||
29 | class EncoderBase : public EncTtsSettingInterface | ||
30 | { | ||
31 | Q_OBJECT | ||
32 | public: | ||
33 | EncoderBase(QObject *parent ); | ||
34 | |||
35 | //! Child class should encode a wav file | ||
36 | virtual bool encode(QString input,QString output) =0; | ||
37 | //! Child class should do startup | ||
38 | virtual bool start()=0; | ||
39 | //! Child class should stop | ||
40 | virtual bool stop()=0; | ||
41 | |||
42 | // settings | ||
43 | //! Child class should return true when configuration is ok | ||
44 | virtual bool configOk()=0; | ||
45 | //! Child class should fill in settingsList | ||
46 | virtual void generateSettings() = 0; | ||
47 | //! Child class should commit from SettingsList to permanent storage | ||
48 | virtual void saveSettings() = 0; | ||
49 | |||
50 | // static functions | ||
51 | static QString getEncoderName(QString name); | ||
52 | static EncoderBase* getEncoder(QObject* parent,QString name); | ||
53 | static QStringList getEncoderList(void); | ||
54 | |||
55 | private: | ||
56 | static void initEncodernamesList(void); | ||
57 | |||
58 | protected: | ||
59 | static QMap<QString,QString> encoderList; | ||
60 | }; | ||
61 | |||
62 | #endif | ||
63 | |||