Fix touchscreen scrollbar behaviour when it's on the right.
[kugel-rb.git] / rbutil / rbutilqt / base / ttscarbon.h
blobfd5f84849bc01c556979c7638da51c3ff4ffe603
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
9 * Copyright (C) 2010 by Dominik Riebeling
10 * $Id$
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 ****************************************************************************/
20 #ifndef TTSCARBON_H
21 #define TTSCARBON_H
23 #include <QtCore>
24 #include "ttsbase.h"
26 #include <Carbon/Carbon.h>
27 #include <inttypes.h>
29 class TTSCarbon : public TTSBase
31 Q_OBJECT
32 //! Enum to identify the settings
33 enum ConfigValuesCarbon
35 ConfigVoice,
36 ConfigSpeed
38 public:
39 TTSCarbon(QObject *parent = NULL);
41 //! Child class should generate a clip
42 TTSStatus voice(QString text,QString wavfile, QString* errStr);
43 //! Child class should do startup
44 bool start(QString *errStr);
45 //! child class should stop
46 bool stop() ;
48 // configuration
49 //! Child class should return true, when configuration is good
50 bool configOk();
51 //! Child class should generate and insertSetting(..) its settings
52 void generateSettings();
53 //! Chlid class should commit the Settings to permanent storage
54 void saveSettings();
56 Capabilities capabilities();
58 private:
59 SpeechChannel m_channel;
60 CFStringBuiltInEncodings m_voiceScript;
62 unsigned long be2u32(unsigned char* buf);
63 unsigned long be2u16(unsigned char* buf);
64 unsigned char* u32tobuf(unsigned char* buf, uint32_t val);
65 unsigned char* u16tobuf(unsigned char* buf, uint16_t val);
66 unsigned int extended2int(unsigned char* buf);
67 int convertAiffToWav(const char* aiff, const char* wav);
70 protected:
71 // static QMap<QString,QString> ttsList;
74 #endif // TTSCARBON_H