Bump version numbers for 3.13
[maemo-rb.git] / rbutil / rbutilqt / base / encoderbase.h
blob810b38aa9ede4d41b94688cd921b971d5552a706
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
9 * Copyright (C) 2007 by Dominik Wenger
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.
16 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
17 * KIND, either express or implied.
19 ****************************************************************************/
21 #ifndef ENCODERS_H
22 #define ENCODERS_H
24 #include <QtCore>
26 #include "encttssettings.h"
29 class EncoderBase : public EncTtsSettingInterface
31 Q_OBJECT
32 public:
33 EncoderBase(QObject *parent );
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;
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;
50 // static functions
51 static QString getEncoderName(QString name);
52 static EncoderBase* getEncoder(QObject* parent,QString name);
53 static QStringList getEncoderList(void);
55 private:
56 static void initEncodernamesList(void);
58 protected:
59 static QMap<QString,QString> encoderList;
62 #endif