Make encoder name conversion functions static to the base class.
[Rockbox.git] / rbutil / rbutilqt / voicefile.h
blobfb567b32de4215879d3dacb67ba90c2aa05d856f
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
9 * Copyright (C) 2007 by Dominik Wenger
10 * $Id: voicefile.h 15932 2007-12-15 13:13:57Z domonoky $
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
21 #ifndef VOICEFILE_H
22 #define VOICEFILE_H
24 #include <QtCore>
25 #include "progressloggerinterface.h"
27 #include "encoders.h"
28 #include "tts.h"
29 #include "httpget.h"
30 #include "rbsettings.h"
32 extern "C"
34 #include "wavtrim.h"
35 #include "voicefont.h"
38 class VoiceFileCreator :public QObject
40 Q_OBJECT
41 public:
42 VoiceFileCreator(QObject* parent=0);
44 //start creation
45 bool createVoiceFile(ProgressloggerInterface* logger);
47 // set infos
48 void setSettings(RbSettings* sett) { settings = sett;}
50 void setMountPoint(QString mountpoint) {m_mountpoint =mountpoint; }
51 void setTargetId(int id){m_targetid = id;}
52 void setLang(QString name){m_lang =name;}
53 void setWavtrimThreshold(int th){m_wavtrimThreshold = th;}
54 void setProxy(QUrl proxy){m_proxy = proxy;}
56 signals:
57 void done(bool error);
59 private slots:
60 void abort();
61 void downloadDone(bool error);
62 void updateDataReadProgress(int read, int total);
64 private:
66 // ptr to encoder, tts and settings
67 TTSBase* m_tts;
68 EncBase* m_enc;
69 RbSettings* settings;
70 HttpGet *getter;
72 QUrl m_proxy; //proxy
73 QString filename; //the temporary file
75 QString m_mountpoint; //mountpoint of the device
76 QString m_path; //path where the wav and mp3 files are stored to
77 int m_targetid; //the target id
78 QString m_lang; // the language which will be spoken
79 int m_wavtrimThreshold;
81 ProgressloggerInterface* m_logger;
83 bool m_abort;
86 #endif