speechd-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] rearrange code in intl sub directory


From: william hubbs
Subject: [PATCH] rearrange code in intl sub directory
Date: Fri, 6 Aug 2010 20:47:46 -0500

From: William Hubbs <address@hidden>
To: address@hidden

This moves intl/ to src/common and turns that directory into a library
of common routines

This means that we can place other routines in this library also which
are shared between the server and the modules.

Also, this creates an include/ directory at the same level as the src/
directory for include files which are included by multiple parts of the
project.
---
 Makefile.am                   |    4 +-
 configure.in                  |    2 +-
 doc/speech-dispatcher.texi    |   13 ++--
 include/Makefile.am           |    4 +
 include/fdsetconv.h           |   28 +++++++
 include/speechd_types.h       |   92 +++++++++++++++++++++++
 intl/def.h                    |   34 ---------
 intl/fdset.h                  |  161 ----------------------------------------
 intl/fdsetconv.c              |  165 -----------------------------------------
 intl/fdsetconv.h              |   31 --------
 src/Makefile.am               |    4 +-
 src/audio/Makefile.am         |    2 +-
 src/c/api/Makefile.am         |    2 +-
 src/c/api/libspeechd.c        |    1 -
 src/c/api/libspeechd.h        |    2 +
 src/c/clients/say/Makefile.am |    2 +-
 src/common/Makefile.am        |    6 ++
 src/common/fdsetconv.c        |  149 +++++++++++++++++++++++++++++++++++++
 src/modules/Makefile.am       |   20 +++---
 src/modules/cicero.c          |    2 +-
 src/modules/dummy.c           |    2 +-
 src/modules/espeak.c          |    2 +-
 src/modules/festival.c        |    2 +-
 src/modules/flite.c           |    2 +-
 src/modules/generic.c         |    2 +-
 src/modules/ibmtts.c          |    2 +-
 src/modules/ivona.c           |    2 +-
 src/modules/module_utils.c    |    1 -
 src/modules/module_utils.h    |   15 ++++
 src/server/Makefile.am        |    4 +-
 src/server/config.c           |   17 ++++-
 src/server/config.h           |    3 +
 src/server/output.c           |    2 -
 src/server/server.c           |    2 +-
 src/server/speaking.h         |    2 +-
 src/server/speechd.h          |   57 ++++++++++++++-
 src/tests/Makefile.am         |    2 +-
 src/tests/clibrary.c          |    1 -
 src/tests/clibrary2.c         |    1 -
 src/tests/long_message.c      |    1 -
 src/tests/run_test.c          |    1 -
 41 files changed, 408 insertions(+), 439 deletions(-)
 create mode 100644 include/Makefile.am
 create mode 100644 include/fdsetconv.h
 create mode 100644 include/speechd_types.h
 delete mode 100644 intl/def.h
 delete mode 100644 intl/fdset.h
 delete mode 100644 intl/fdsetconv.c
 delete mode 100644 intl/fdsetconv.h
 create mode 100644 src/common/Makefile.am
 create mode 100644 src/common/fdsetconv.c

diff --git a/Makefile.am b/Makefile.am
index 5353ce9..8c0b147 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
 ## Process this file with automake to produce Makefile.in
 
-SUBDIRS= src config doc
+SUBDIRS= include src config doc
 
-EXTRA_DIST= ChangeLog NEWS TODO AUTHORS COPYING INSTALL README intl/*.c 
intl/*.h build.sh version.sh
+EXTRA_DIST= ChangeLog NEWS TODO AUTHORS COPYING INSTALL README build.sh 
version.sh
 
 MAINTAINERCLEANFILES=configure
diff --git a/configure.in b/configure.in
index c4fd90a..c10b75e 100644
--- a/configure.in
+++ b/configure.in
@@ -352,5 +352,5 @@ AC_SUBST(ERROR_CFLAGS)
 AC_SUBST(RPATH)
 AC_SUBST(RDYNAMIC)
 
-AC_OUTPUT([Makefile src/Makefile src/server/Makefile src/modules/Makefile 
src/c/Makefile src/c/api/Makefile src/c/clients/Makefile 
src/c/clients/say/Makefile src/c/clients/spdsend/Makefile src/tests/Makefile 
src/audio/Makefile config/Makefile config/modules/Makefile 
config/clients/Makefile doc/Makefile src/python/Makefile])
+AC_OUTPUT([Makefile include/Makefile src/Makefile src/common/Makefile 
src/server/Makefile src/modules/Makefile src/c/Makefile src/c/api/Makefile 
src/c/clients/Makefile src/c/clients/say/Makefile 
src/c/clients/spdsend/Makefile src/tests/Makefile src/audio/Makefile 
config/Makefile config/modules/Makefile config/clients/Makefile doc/Makefile 
src/python/Makefile])
 
diff --git a/doc/speech-dispatcher.texi b/doc/speech-dispatcher.texi
index ff609ca..fe9a794 100644
--- a/doc/speech-dispatcher.texi
+++ b/doc/speech-dispatcher.texi
@@ -2648,7 +2648,7 @@ corresponding SSIP commands, except that they are written 
with small
 letters. @xref{Top,,Parameter Setting Commands,ssip, SSIP
 Documentation}.  The conversion between these string values and the
 corresponding C enum variables can be easily done using
- at file{intl/fdsetconv.c}.
+ at file{src/common/fdsetconv.c}.
 
 Not all of these parameters must be set and the value of the string
 arguments can also be @code{NULL}. If some of the parameters aren't
@@ -2830,12 +2830,12 @@ in order for us to be in a better legal position 
against possible intruders.
 @node The Skeleton of an Output Module, Output Module Functions, How to Write 
New Output Module, Output Modules
 @subsection The Skeleton of an Output Module 
 
-Each output module should include @file{intl/fdset.h} where the
+Each output module should include @file{speechd_types.h} where the
 SPDMsgSettings structure is defined to be able to handle the different
 speech synthesis settings.
 
 @example
-#include "fdset.h"
+#include "speechd_types.h"
 @end example
 
 Additionally, it's also reccomended to include @file{module_utils.h}
@@ -3057,8 +3057,8 @@ differently, if the synthesizer supports it).
 
 Each output module should take care of setting the output device to
 the parameters from msg_settings (defined in module_utils.h) (See
-SPDMsgSettings in @file{intl/fdset.h}). However, it is not an error if
-some of these values are ignored. At least rate, pitch and language
+SPDMsgSettings in @file{include/speechd_types.h}). However, it is not an
+error if some of these values are ignored. At least rate, pitch and language
 should be set correctly.
 
 Speed and pitch are values between -100 and 100 included. 0 is the default
@@ -3070,7 +3070,8 @@ the name of the language according to RFC 1776 (en, cs, 
fr, ...). If the
 requested language is not supported by this synthesizer, it's ok to abort
 and return 0, because that's an error in user settings.
 
-Other parameters are defined in @code{SPDMsgSettings} in @file{intl/fdset.h}.
+Other parameters are defined in @code{SPDMsgSettings} in
+ at file{include/speechd_types.h}.
 
 An easy way to set the parameters is using the UPDATE_PARAMETER() and
 UPDATE_STRING_PARAMETER() macros. @xref{Module Utils Functions and
diff --git a/include/Makefile.am b/include/Makefile.am
new file mode 100644
index 0000000..7767fb2
--- /dev/null
+++ b/include/Makefile.am
@@ -0,0 +1,4 @@
+## Process this file with automake to produce Makefile.in
+
+noinst_HEADERS = fdsetconv.h speechd_types.h
+
diff --git a/include/fdsetconv.h b/include/fdsetconv.h
new file mode 100644
index 0000000..2a5809f
--- /dev/null
+++ b/include/fdsetconv.h
@@ -0,0 +1,28 @@
+#ifndef FDSETCONV_H
+#define FDSETCONV_H
+
+#include <stdio.h>
+#include <string.h>
+#include <speechd_types.h>
+
+char* EVoice2str(EVoiceType voice);
+
+EVoiceType str2EVoice(char* str);
+
+char* EPunctMode2str(EPunctMode punct);
+
+EPunctMode str2EPunctMode(char* str);
+
+char* ESpellMode2str(ESpellMode spell);
+
+ESpellMode str2ESpellMode(char* str);
+
+char* ECapLetRecogn2str(ECapLetRecogn recogn);
+
+ECapLetRecogn ECapLetRecognstr2ECapLetRecogn(char* str);
+
+EVoiceType str2intpriority(char* str);
+
+ECapLetRecogn str2ECapLetRecogn(char* str);
+
+#endif
diff --git a/include/speechd_types.h b/include/speechd_types.h
new file mode 100644
index 0000000..5414f4e
--- /dev/null
+++ b/include/speechd_types.h
@@ -0,0 +1,92 @@
+
+/*
+ * speechd_types.h - types for Speech Dispatcher
+ *
+ * Copyright (C) 2001, 2002, 2003 Brailcom, o.p.s.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this package; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef SPEECHD_TYPES_H
+#define SPEECHD_TYPES_H
+
+typedef enum 
+    {                  /* Type of voice */
+       NO_VOICE = 0,
+       MALE1 = 1,
+       MALE2 = 2,
+       MALE3 = 3,
+       FEMALE1 = 4,
+       FEMALE2 = 5,
+       FEMALE3 = 6,
+       CHILD_MALE = 7,
+       CHILD_FEMALE = 8
+    }EVoiceType;
+
+typedef enum
+    {
+       SORT_BY_TIME = 0,
+       SORT_BY_ALPHABET = 1
+    }ESort;
+
+typedef enum
+    {
+       MSGTYPE_TEXT = 0,
+       MSGTYPE_SOUND_ICON = 1,
+       MSGTYPE_CHAR = 2,
+       MSGTYPE_KEY = 3,
+       MSGTYPE_SPELL = 99
+    }EMessageType;
+
+typedef enum
+    {
+       RECOGN_NONE = 0,
+       RECOGN_SPELL = 1,
+       RECOGN_ICON = 2
+    }ECapLetRecogn;
+
+typedef enum
+    {
+       PUNCT_NONE = 0,
+       PUNCT_ALL = 1,
+       PUNCT_SOME = 2
+    }EPunctMode;
+
+typedef enum
+    {
+       SPELLING_OFF = 0,
+       SPELLING_ON = 1
+    }ESpellMode;
+
+typedef enum
+    {
+       NOTIFY_NOTHING = 0,
+       NOTIFY_BEGIN = 1,
+       NOTIFY_END = 2,
+       NOTIFY_IM = 4,
+       NOTIFY_CANCEL = 8,
+       NOTIFY_PAUSE = 16,
+       NOTIFY_RESUME = 32
+    }ENotification;
+
+typedef struct {
+  char* name;
+  char* language;
+  char* dialect;
+}VoiceDescription;
+
+
+#endif /* not ifndef FDSET */
diff --git a/intl/def.h b/intl/def.h
deleted file mode 100644
index cffde7c..0000000
--- a/intl/def.h
+++ /dev/null
@@ -1,34 +0,0 @@
-
-/*
- * def.h - Some global definitions for Speech Dispatcher
- *
- * Copyright (C) 2001, 2002, 2003 Brailcom, o.p.s.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this package; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- * $Id: def.h,v 1.19 2006-07-11 16:12:26 hanke Exp $
- */
-
-/* some constants common for speech server and client part */
-
-#ifndef SPEECHD_DEF_I
-       #define SPEECHD_DEF_I
-
-#define SPEECHD_DEFAULT_PORT 6560
-
-#define SPEECHD_DEBUG 0
-
-#endif
diff --git a/intl/fdset.h b/intl/fdset.h
deleted file mode 100644
index 8b337dc..0000000
--- a/intl/fdset.h
+++ /dev/null
@@ -1,161 +0,0 @@
-
-/*
- * fdset.h - Settings for Speech Dispatcher
- *
- * Copyright (C) 2001, 2002, 2003 Brailcom, o.p.s.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this package; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- * $Id: fdset.h,v 1.33 2008-06-09 10:28:08 hanke Exp $
- */
-
-#ifndef FDSET_H
-#define FDSET_H
-
-typedef enum 
-    {                  /* Type of voice */
-       NO_VOICE = 0,
-       MALE1 = 1,
-       MALE2 = 2,
-       MALE3 = 3,
-       FEMALE1 = 4,
-       FEMALE2 = 5,
-       FEMALE3 = 6,
-       CHILD_MALE = 7,
-       CHILD_FEMALE = 8
-    }EVoiceType;
-
-typedef enum
-    {
-       SORT_BY_TIME = 0,
-       SORT_BY_ALPHABET = 1
-    }ESort;
-
-typedef enum
-    {
-       MSGTYPE_TEXT = 0,
-       MSGTYPE_SOUND_ICON = 1,
-       MSGTYPE_CHAR = 2,
-       MSGTYPE_KEY = 3,
-       MSGTYPE_SPELL = 99
-    }EMessageType;
-
-typedef enum
-    {
-       RECOGN_NONE = 0,
-       RECOGN_SPELL = 1,
-       RECOGN_ICON = 2
-    }ECapLetRecogn;
-
-typedef enum
-    {
-       PUNCT_NONE = 0,
-       PUNCT_ALL = 1,
-       PUNCT_SOME = 2
-    }EPunctMode;
-
-typedef enum
-    {
-       SPELLING_OFF = 0,
-       SPELLING_ON = 1
-    }ESpellMode;
-
-typedef enum
-    {
-       NOTIFY_NOTHING = 0,
-       NOTIFY_BEGIN = 1,
-       NOTIFY_END = 2,
-       NOTIFY_IM = 4,
-       NOTIFY_CANCEL = 8,
-       NOTIFY_PAUSE = 16,
-       NOTIFY_RESUME = 32
-    }ENotification;
-
-typedef struct {
-  char* name;
-  char* language;
-  char* dialect;
-}VoiceDescription;
-
-
-typedef struct{
-    unsigned int uid;          /* Unique ID of the client */
-    int fd;                     /* File descriptor the client is on. */
-    int active;                 /* Is this client still active on socket or 
gone?*/
-    int paused;                 /* Internal flag, 1 for paused client or 0 for 
normal. */
-    int paused_while_speaking;  
-    EMessageType type;          /* Type of the message (1=text, 2=icon, 
3=char, 4=key) */
-    int ssml_mode;             /* SSML mode on (1)/off (0) */
-    int priority;               /* Priority between 1 and 3 (1 - highest, 3 - 
lowest) */
-    signed int rate;           /* Speed of voice from <-100;+100>, 0 is the 
default */
-    signed int pitch;          /* Pitch of voice from <-100;+100>, 0 is the 
default */
-    signed int volume;         /* Volume of voice from <-100;+100), 0 is the 
default */
-    EPunctMode punctuation_mode;       /* Punctuation mode: 0, 1 or 2
-                                   0   -       no punctuation
-                                   1   -       all punctuation
-                                   2   -       only user-selected punctuation 
*/
-    ESpellMode spelling_mode;   /* Spelling mode: 0 or 1 (0 - off, 1 - on) */
-    char *client_name;         /* Name of the client. */
-    char *language;             /* Selected language name. (e.g. "en", "cz", 
"fr", ...) */
-    char *output_module;        /* Output module name. (e.g. "festival", 
"flite", "apollo", ...) */
-    EVoiceType voice;           /* see EVoiceType definition above */
-    char *synthesis_voice;
-    ECapLetRecogn cap_let_recogn;         /* Capital letters recognition: (0 - 
off, 1 - on) */
-
-    ENotification notification;        /* Notification about start and stop of 
messages, about reached 
-                                  index marks and state (canceled, paused, 
resumed). */
-
-    int reparted;
-    unsigned int min_delay_progress;
-    int pause_context;          /* Number of words that should be repeated 
after a pause */
-    char* index_mark;           /* Current index mark for the message (only if 
paused) */
-
-    char* audio_output_method;
-    char* audio_oss_device;
-    char* audio_alsa_device;
-    char* audio_nas_server;
-    char* audio_pulse_server;
-    int audio_pulse_min_length;
-    int log_level;
-
-    /* TODO: Should be moved out */
-    unsigned int hist_cur_uid;
-    int hist_cur_pos;
-    ESort hist_sorted;
-
-}TFDSetElement;
-
-typedef struct{
-    char *pattern;
-    TFDSetElement val;
-}TFDSetClientSpecific;
-
-typedef struct{
-    signed int rate;
-    signed int pitch;
-    signed int volume;
-    
-    EPunctMode punctuation_mode;
-    ESpellMode spelling_mode;
-    ECapLetRecogn cap_let_recogn;
-
-    char* language;
-
-    EVoiceType voice;
-    char *synthesis_voice;
-}SPDMsgSettings;
-
-#endif /* not ifndef FDSET */
diff --git a/intl/fdsetconv.c b/intl/fdsetconv.c
deleted file mode 100644
index e98d32c..0000000
--- a/intl/fdsetconv.c
+++ /dev/null
@@ -1,165 +0,0 @@
-
-/*
- * fdsetconv.c - Conversion of types for Speech Dispatcher
- *
- * Copyright (C) 2001, 2002, 2003 Brailcom, o.p.s.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this package; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- * $Id: fdsetconv.c,v 1.5 2007-06-21 20:09:45 hanke Exp $
- */
-
-#include "fdsetconv.h"
-
-char*
-EVoice2str(EVoiceType voice)
-{
-    char *str;
-
-    switch (voice)
-        {
-        case MALE1: str = strdup("male1"); break;
-        case MALE2: str = strdup("male2"); break;
-        case MALE3: str = strdup("male3"); break;
-        case FEMALE1: str = strdup("female1"); break;
-        case FEMALE2: str = strdup("female2"); break;
-        case FEMALE3: str = strdup("female3"); break;
-        case CHILD_MALE: str = strdup("child_male"); break;
-        case CHILD_FEMALE: str = strdup("child_female"); break;
-        default: str = NULL;
-        }
-
-    return str;
-}
-
-EVoiceType
-str2EVoice(char* str)
-{
-    EVoiceType voice;
-
-    if (!strcmp(str, "male1")) voice = MALE1;
-    else if (!strcmp(str, "male2")) voice = MALE2;
-    else if (!strcmp(str, "male3")) voice = MALE3;
-    else if (!strcmp(str, "female1")) voice = FEMALE1;
-    else if (!strcmp(str, "female2")) voice = FEMALE2;
-    else if (!strcmp(str, "female3")) voice = FEMALE3;
-    else if (!strcmp(str, "child_male")) voice = CHILD_MALE;
-    else if (!strcmp(str, "child_female")) voice = CHILD_FEMALE;
-    else voice = NO_VOICE;
-
-    return voice;
-}
-
-char*
-EPunctMode2str(EPunctMode punct)
-{
-    char *str;
-
-    switch (punct)
-        {
-        case PUNCT_NONE: str = strdup("none"); break;
-        case PUNCT_ALL: str = strdup("all"); break;
-        case PUNCT_SOME: str = strdup("some"); break;
-        default: str = NULL;
-        }
-
-    return str;
-}
-
-EPunctMode
-str2EPunctMode(char* str)
-{
-    EPunctMode punct;
-
-    if (!strcmp(str, "none")) punct = PUNCT_NONE;
-    else if (!strcmp(str, "all")) punct = PUNCT_ALL;
-    else if (!strcmp(str, "some")) punct = PUNCT_SOME;
-    else punct = -1;
-
-    return punct;
-}
-
-char*
-ESpellMode2str(ESpellMode spell)
-{
-    char *str;
-
-    switch (spell)
-        {
-        case SPELLING_ON: str = strdup("on"); break;
-        case SPELLING_OFF: str = strdup("off"); break;
-        default: str = NULL;
-        }
-
-    return str;
-}
-
-ESpellMode
-str2ESpellMode(char* str)
-{
-    ESpellMode spell;
-
-    if (!strcmp(str, "on")) spell = SPELLING_ON;
-    else if (!strcmp(str, "off")) spell = SPELLING_OFF;
-    else spell = -1;
-
-    return spell;
-}
-
-char*
-ECapLetRecogn2str(ECapLetRecogn recogn)
-{
-    char *str;
-
-    switch (recogn)
-        {
-        case RECOGN_NONE: str = strdup("none"); break;
-        case RECOGN_SPELL: str = strdup("spell"); break;
-        case RECOGN_ICON: str = strdup("icon"); break;
-        default: str = NULL;
-        }
-
-    return str;
-}
-
-ECapLetRecogn
-str2ECapLetRecogn(char* str)
-{
-    ECapLetRecogn recogn;
-
-    if (!strcmp(str, "none")) recogn = RECOGN_NONE;
-    else if (!strcmp(str, "spell")) recogn = RECOGN_SPELL;
-    else if (!strcmp(str, "icon")) recogn = RECOGN_ICON;
-    else recogn = -1;
-
-    return recogn;
-}
-
-
-EVoiceType
-str2intpriority(char* str)
-{
-    int priority;
-
-    if (!strcmp(str, "important"))  priority = 1;
-    else if (!strcmp(str, "text")) priority = 2;
-    else if (!strcmp(str, "message")) priority = 3;
-    else if (!strcmp(str, "notification")) priority = 4;
-    else if (!strcmp(str, "progress")) priority = 5;
-    else priority = -1;
-
-    return priority;
-}
diff --git a/intl/fdsetconv.h b/intl/fdsetconv.h
deleted file mode 100644
index 240ca27..0000000
--- a/intl/fdsetconv.h
+++ /dev/null
@@ -1,31 +0,0 @@
-
-#include "fdset.h"
-
-#ifndef FDSETCONV_H
-#define FDSETCONV_H
-
-#include <stdio.h>
-#include <string.h>
-#include "fdset.h"
-
-char* EVoice2str(EVoiceType voice);
-
-EVoiceType str2EVoice(char* str);
-
-char* EPunctMode2str(EPunctMode punct);
-
-EPunctMode str2EPunctMode(char* str);
-
-char* ESpellMode2str(ESpellMode spell);
-
-ESpellMode str2ESpellMode(char* str);
-
-char* ECapLetRecogn2str(ECapLetRecogn recogn);
-
-ECapLetRecogn ECapLetRecognstr2ECapLetRecogn(char* str);
-
-EVoiceType str2intpriority(char* str);
-
-ECapLetRecogn str2ECapLetRecogn(char* str);
-
-#endif
diff --git a/src/Makefile.am b/src/Makefile.am
index 666b92a..2dee049 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -10,7 +10,7 @@ python/*.py python/speechd/*.py python/Makefile.in 
python/speechd_config/*.py \
 python/speechd_config/spd-conf python/speechd_config/test.wav \
 python/speechd_config/speechd.desktop
 
-SUBDIRS=server audio c modules tests python
-DIST_SUBDIRS=server audio c modules tests python
+SUBDIRS=common server audio c modules tests python
+DIST_SUBDIRS=common server audio c modules tests python
 
 
diff --git a/src/audio/Makefile.am b/src/audio/Makefile.am
index 3b596f6..0a79aec 100644
--- a/src/audio/Makefile.am
+++ b/src/audio/Makefile.am
@@ -1,6 +1,6 @@
 
 localedir = $(datadir)/locale
-inc_local = "-I$(top_srcdir)/intl/"
+inc_local = "-I$(top_srcdir)/include/"
 
 am_cflags = -DLOCALEDIR=\"$(localedir)\" -I/usr/include/ $(inc_local) 
@glib_include@
 
diff --git a/src/c/api/Makefile.am b/src/c/api/Makefile.am
index d8a1cbd..1c380a5 100644
--- a/src/c/api/Makefile.am
+++ b/src/c/api/Makefile.am
@@ -1,6 +1,6 @@
 
 localedir = $(datadir)/locale
-inc_local = "-I$(top_srcdir)/intl/"
+inc_local = "-I$(top_srcdir)/include/"
 
 AM_CFLAGS = @ERROR_CFLAGS@ -DLOCALEDIR=\"$(localedir)\" -D_GNU_SOURCE 
-I/usr/include/ $(inc_local) @glib_include@ 
-DSPD_SPAWN_CMD=\""@prefix@/bin/speech-dispatcher"\"
 
diff --git a/src/c/api/libspeechd.c b/src/c/api/libspeechd.c
index 3562cd2..93ed1c8 100644
--- a/src/c/api/libspeechd.c
+++ b/src/c/api/libspeechd.c
@@ -42,7 +42,6 @@
 #include <assert.h>
 #include <netdb.h>
 
-#include "def.h"
 #include "libspeechd.h"
 
 /* Comment/uncomment to switch debugging on/off */
diff --git a/src/c/api/libspeechd.h b/src/c/api/libspeechd.h
index 8692540..c88f89f 100644
--- a/src/c/api/libspeechd.h
+++ b/src/c/api/libspeechd.h
@@ -40,6 +40,8 @@ FILE* spd_debug;
 
 /* Unless there is an fatal error, it doesn't print anything */
 #define SPD_FATAL(msg) { printf("Fatal error (libspeechd) [%s:%d]:"msg, 
__FILE__, __LINE__); fflush(stdout); exit(EXIT_FAILURE); }
+/* Speech Dispatcher's default port for inet communication */
+#define SPEECHD_DEFAULT_PORT 6560
 
 /* Arguments for spd_send_data() */
 #define SPD_WAIT_REPLY 1              /* Wait for reply */
diff --git a/src/c/clients/say/Makefile.am b/src/c/clients/say/Makefile.am
index 69ef570..9a725b3 100644
--- a/src/c/clients/say/Makefile.am
+++ b/src/c/clients/say/Makefile.am
@@ -1,6 +1,6 @@
 
 localedir = $(datadir)/locale
-inc_local = "-I$(top_srcdir)/intl/"
+inc_local = "-I$(top_srcdir)/include/"
 c_api = $(top_srcdir)/src/c/api
 
 AM_CFLAGS = -DLOCALEDIR=\"$(localedir)\" -I/usr/include/ $(inc_local) 
@glib_include@ -I$(c_api)
diff --git a/src/common/Makefile.am b/src/common/Makefile.am
new file mode 100644
index 0000000..e292fa3
--- /dev/null
+++ b/src/common/Makefile.am
@@ -0,0 +1,6 @@
+## Process this file with automake to produce Makefile.in
+
+noinst_LTLIBRARIES = libcommon.la
+libcommon_la_CFLAGS = @ERROR_CFLAGS@
+libcommon_la_CPPFLAGS = "-I$(top_builddir)/include/"
+libcommon_la_SOURCES = fdsetconv.c fdsetconv.h
diff --git a/src/common/fdsetconv.c b/src/common/fdsetconv.c
new file mode 100644
index 0000000..ef9b041
--- /dev/null
+++ b/src/common/fdsetconv.c
@@ -0,0 +1,149 @@
+
+/*
+ * fdsetconv.c - Conversion of types for Speech Dispatcher
+ *
+ * Copyright (C) 2001, 2002, 2003 Brailcom, o.p.s.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this package; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ * $Id: fdsetconv.c,v 1.5 2007-06-21 20:09:45 hanke Exp $
+ */
+
+#include "fdsetconv.h"
+
+char*
+EVoice2str(EVoiceType voice)
+{
+    char *str;
+
+    switch (voice)
+        {
+        case MALE1: str = strdup("male1"); break;
+        case MALE2: str = strdup("male2"); break;
+        case MALE3: str = strdup("male3"); break;
+        case FEMALE1: str = strdup("female1"); break;
+        case FEMALE2: str = strdup("female2"); break;
+        case FEMALE3: str = strdup("female3"); break;
+        case CHILD_MALE: str = strdup("child_male"); break;
+        case CHILD_FEMALE: str = strdup("child_female"); break;
+        default: str = NULL;
+        }
+
+    return str;
+}
+
+EVoiceType
+str2EVoice(char* str)
+{
+    EVoiceType voice;
+
+    if (!strcmp(str, "male1")) voice = MALE1;
+    else if (!strcmp(str, "male2")) voice = MALE2;
+    else if (!strcmp(str, "male3")) voice = MALE3;
+    else if (!strcmp(str, "female1")) voice = FEMALE1;
+    else if (!strcmp(str, "female2")) voice = FEMALE2;
+    else if (!strcmp(str, "female3")) voice = FEMALE3;
+    else if (!strcmp(str, "child_male")) voice = CHILD_MALE;
+    else if (!strcmp(str, "child_female")) voice = CHILD_FEMALE;
+    else voice = NO_VOICE;
+
+    return voice;
+}
+
+char*
+EPunctMode2str(EPunctMode punct)
+{
+    char *str;
+
+    switch (punct)
+        {
+        case PUNCT_NONE: str = strdup("none"); break;
+        case PUNCT_ALL: str = strdup("all"); break;
+        case PUNCT_SOME: str = strdup("some"); break;
+        default: str = NULL;
+        }
+
+    return str;
+}
+
+EPunctMode
+str2EPunctMode(char* str)
+{
+    EPunctMode punct;
+
+    if (!strcmp(str, "none")) punct = PUNCT_NONE;
+    else if (!strcmp(str, "all")) punct = PUNCT_ALL;
+    else if (!strcmp(str, "some")) punct = PUNCT_SOME;
+    else punct = -1;
+
+    return punct;
+}
+
+char*
+ESpellMode2str(ESpellMode spell)
+{
+    char *str;
+
+    switch (spell)
+        {
+        case SPELLING_ON: str = strdup("on"); break;
+        case SPELLING_OFF: str = strdup("off"); break;
+        default: str = NULL;
+        }
+
+    return str;
+}
+
+ESpellMode
+str2ESpellMode(char* str)
+{
+    ESpellMode spell;
+
+    if (!strcmp(str, "on")) spell = SPELLING_ON;
+    else if (!strcmp(str, "off")) spell = SPELLING_OFF;
+    else spell = -1;
+
+    return spell;
+}
+
+char*
+ECapLetRecogn2str(ECapLetRecogn recogn)
+{
+    char *str;
+
+    switch (recogn)
+        {
+        case RECOGN_NONE: str = strdup("none"); break;
+        case RECOGN_SPELL: str = strdup("spell"); break;
+        case RECOGN_ICON: str = strdup("icon"); break;
+        default: str = NULL;
+        }
+
+    return str;
+}
+
+ECapLetRecogn
+str2ECapLetRecogn(char* str)
+{
+    ECapLetRecogn recogn;
+
+    if (!strcmp(str, "none")) recogn = RECOGN_NONE;
+    else if (!strcmp(str, "spell")) recogn = RECOGN_SPELL;
+    else if (!strcmp(str, "icon")) recogn = RECOGN_ICON;
+    else recogn = -1;
+
+    return recogn;
+}
diff --git a/src/modules/Makefile.am b/src/modules/Makefile.am
index 4d68489..463500f 100644
--- a/src/modules/Makefile.am
+++ b/src/modules/Makefile.am
@@ -1,12 +1,12 @@
 localedir = $(datadir)/locale
-inc_local = "-I$(top_srcdir)/intl/"
+inc_local = "-I$(top_srcdir)/include/"
 
 SNDFILE_CFLAGS = @SNDFILE_CFLAGS@
 SNDFILE_LIBS = @SNDFILE_LIBS@
 
 EXTRA_DIST = module_main.c module_utils_addvoice.c festival_client.c 
festival_client.h ivona_client.c dummy.c dummy-message.wav
 
-AM_CFLAGS = @ERROR_CFLAGS@ -DLOCALEDIR=\"$(localedir)\" 
-DDATADIR=\"$(snddatadir)\" -I/usr/include/ $(inc_local) @glib_include@ 
-L$(top_srcdir)/src/audio -I$(top_srcdir)/src/audio -I../../intl/ 
$(ibmtts_include) @SNDFILE_CFLAGS@ -D_GNU_SOURCE
+AM_CFLAGS = @ERROR_CFLAGS@ -DLOCALEDIR=\"$(localedir)\" 
-DDATADIR=\"$(snddatadir)\" -I/usr/include/ $(inc_local) @glib_include@ 
-L$(top_srcdir)/src/audio -I$(top_srcdir)/src/audio -I$(top_srcdir)/src/common/ 
$(ibmtts_include) @SNDFILE_CFLAGS@ -D_GNU_SOURCE
 
 modulebin_PROGRAMS = sd_dummy sd_generic sd_festival sd_cicero
 
@@ -30,30 +30,30 @@ endif
 
 sd_flite_SOURCES = flite.c module_utils.c module_utils.h
 sd_flite_LDFLAGS = @RPATH@ '$(spdlibdir)'
-sd_flite_LDADD = -lsdaudio $(flite_kal) $(flite_basic) -lpthread -ldotconf 
@glib_libs@ @gthread_libs@
+sd_flite_LDADD = $(top_builddir)/src/common/libcommon.la -lsdaudio 
$(flite_kal) $(flite_basic) -lpthread -ldotconf @glib_libs@ @gthread_libs@
 
 sd_generic_SOURCES = generic.c module_utils.c module_utils.h
-sd_generic_LDADD = -lsdaudio -lpthread -ldotconf @glib_libs@ @gthread_libs@
+sd_generic_LDADD = $(top_builddir)/src/common/libcommon.la -lsdaudio -lpthread 
-ldotconf @glib_libs@ @gthread_libs@
 
 sd_festival_SOURCES = festival.c module_utils.c
 sd_festival_LDFLAGS = @RPATH@ '$(spdlibdir)'
-sd_festival_LDADD = -lsdaudio -lpthread -ldotconf @glib_libs@ @gthread_libs@ 
@EXTRA_SOCKET_LIBS@
+sd_festival_LDADD = $(top_builddir)/src/common/libcommon.la -lsdaudio 
-lpthread -ldotconf @glib_libs@ @gthread_libs@ @EXTRA_SOCKET_LIBS@
 
 sd_ibmtts_SOURCES = ibmtts.c module_utils.c module_utils.h
 sd_ibmtts_LDFLAGS = @RPATH@ '$(spdlibdir)'
-sd_ibmtts_LDADD = -lsdaudio -lm -lpthread -ldotconf -libmeci @SNDFILE_LIBS@ 
@glib_libs@ @gthread_libs@
+sd_ibmtts_LDADD = $(top_builddir)/src/common/libcommon.la -lsdaudio -lm 
-lpthread -ldotconf -libmeci @SNDFILE_LIBS@ @glib_libs@ @gthread_libs@
 
 sd_cicero_SOURCES = cicero.c module_utils.c module_utils.h
-sd_cicero_LDADD = -lsdaudio -lpthread -ldotconf @glib_libs@ @gthread_libs@
+sd_cicero_LDADD = $(top_builddir)/src/common/libcommon.la -lsdaudio -lpthread 
-ldotconf @glib_libs@ @gthread_libs@
 
 sd_espeak_SOURCES = espeak.c module_utils.c module_utils.h
 sd_espeak_LDFLAGS = @RPATH@ '$(spdlibdir)'
-sd_espeak_LDADD = -lsdaudio -lespeak -ldotconf @glib_libs@ @SNDFILE_LIBS@ 
@gthread_libs@ @EXTRA_ESPEAK_LIBS@
+sd_espeak_LDADD = $(top_builddir)/src/common/libcommon.la -lsdaudio -lespeak 
-ldotconf @glib_libs@ @SNDFILE_LIBS@ @gthread_libs@ @EXTRA_ESPEAK_LIBS@
 
 sd_ivona_SOURCES = ivona.c module_utils.c module_utils.h
 sd_ivona_LDFLAGS = @RPATH@ '$(spdlibdir)'
-sd_ivona_LDADD = -lsdaudio -ldumbtts -lpthread -ldotconf @glib_libs@ 
@SNDFILE_LIBS@ @gthread_libs@
+sd_ivona_LDADD = $(top_builddir)/src/common/libcommon.la -lsdaudio -ldumbtts 
-lpthread -ldotconf @glib_libs@ @SNDFILE_LIBS@ @gthread_libs@
 
 sd_dummy_SOURCES = dummy.c module_utils.c module_utils.h
 sd_dummy_LDFLAGS = @RPATH@ '$(spdlibdir)'
-sd_dummy_LDADD = -lsdaudio -lpthread -ldotconf @glib_libs@ @SNDFILE_LIBS@ 
@gthread_libs@
+sd_dummy_LDADD = $(top_builddir)/src/common/libcommon.la -lsdaudio -lpthread 
-ldotconf @glib_libs@ @SNDFILE_LIBS@ @gthread_libs@
diff --git a/src/modules/cicero.c b/src/modules/cicero.c
index 56b2bd8..66ff709 100644
--- a/src/modules/cicero.c
+++ b/src/modules/cicero.c
@@ -21,7 +21,7 @@
  * @author: Olivier BERT
  */
 
-#include <fdset.h>
+#include <speechd_types.h>
 #include <errno.h>
 #include "module_utils.h"
 #include <sys/poll.h>
diff --git a/src/modules/dummy.c b/src/modules/dummy.c
index 5cde939..b871a61 100644
--- a/src/modules/dummy.c
+++ b/src/modules/dummy.c
@@ -27,7 +27,7 @@
 
 #include <glib.h>
 
-#include "fdset.h"
+#include <speechd_types.h>
 
 #include "module_utils.h"
 #include "module_utils_addvoice.c"
diff --git a/src/modules/espeak.c b/src/modules/espeak.c
index ee2002a..e0ac988 100644
--- a/src/modules/espeak.c
+++ b/src/modules/espeak.c
@@ -40,7 +40,7 @@
 /* Speech Dispatcher includes. */
 #include "config.h"
 #include "spd_audio.h"
-#include "fdset.h"
+#include <speechd_types.h>
 #include "module_utils.h"
 
 #if HAVE_SNDFILE
diff --git a/src/modules/festival.c b/src/modules/festival.c
index ff67eab..5d43d04 100644
--- a/src/modules/festival.c
+++ b/src/modules/festival.c
@@ -21,7 +21,7 @@
  * $Id: festival.c,v 1.82 2008-06-09 10:33:38 hanke Exp $
  */
 
-#include "fdset.h"
+#include <speechd_types.h>
 #include "fdsetconv.h"
 
 #include "module_utils.h"
diff --git a/src/modules/flite.c b/src/modules/flite.c
index 44ab8a1..66dfc6e 100644
--- a/src/modules/flite.c
+++ b/src/modules/flite.c
@@ -29,7 +29,7 @@
 #include <flite/flite.h>
 #include "spd_audio.h"
 
-#include "fdset.h"
+#include <speechd_types.h>
 
 #include "module_utils.h"
 
diff --git a/src/modules/generic.c b/src/modules/generic.c
index 2b615ff..0044be6 100644
--- a/src/modules/generic.c
+++ b/src/modules/generic.c
@@ -24,7 +24,7 @@
 
 #include <glib.h>
 
-#include "fdset.h"
+#include <speechd_types.h>
 
 #include "module_utils.h"
 #include "module_utils_addvoice.c"
diff --git a/src/modules/ibmtts.c b/src/modules/ibmtts.c
index 45a30f6..d581dd8 100644
--- a/src/modules/ibmtts.c
+++ b/src/modules/ibmtts.c
@@ -57,7 +57,7 @@
 /* Speech Dispatcher includes. */
 #include "config.h"
 #include "spd_audio.h"
-#include "fdset.h"
+#include <speechd_types.h>
 #include "module_utils.h"
 #include "module_utils_addvoice.c"
 
diff --git a/src/modules/ivona.c b/src/modules/ivona.c
index 68e10de..c54100b 100644
--- a/src/modules/ivona.c
+++ b/src/modules/ivona.c
@@ -29,7 +29,7 @@
 #include <libdumbtts.h>
 #include "spd_audio.h"
 
-#include "fdset.h"
+#include <speechd_types.h>
 
 #include "module_utils.h"
 
diff --git a/src/modules/module_utils.c b/src/modules/module_utils.c
index 91be0a8..befe307 100644
--- a/src/modules/module_utils.c
+++ b/src/modules/module_utils.c
@@ -22,7 +22,6 @@
  */
 
 #include "fdsetconv.h"
-#include "fdsetconv.c"
 
 #include "module_utils.h"
 
diff --git a/src/modules/module_utils.h b/src/modules/module_utils.h
index 2062509..d40aeed 100644
--- a/src/modules/module_utils.h
+++ b/src/modules/module_utils.h
@@ -55,6 +55,21 @@ typedef struct{
   int audio_pulse_min_length;
 }SPDAudioSettings;
 
+typedef struct{
+    signed int rate;
+    signed int pitch;
+    signed int volume;
+    
+    EPunctMode punctuation_mode;
+    ESpellMode spelling_mode;
+    ECapLetRecogn cap_let_recogn;
+
+    char* language;
+
+    EVoiceType voice;
+    char *synthesis_voice;
+}SPDMsgSettings;
+
 int log_level;
 
 AudioID *module_audio_id;
diff --git a/src/server/Makefile.am b/src/server/Makefile.am
index 2f54450..2178e40 100644
--- a/src/server/Makefile.am
+++ b/src/server/Makefile.am
@@ -2,9 +2,9 @@
 bin_PROGRAMS = speech-dispatcher
 speech_dispatcher_SOURCES = speechd.c speechd.h server.c server.h history.c 
history.h module.c module.h config.c config.h parse.c parse.h set.c set.h msg.h 
alloc.c alloc.h compare.c compare.h speaking.c speaking.h options.c options.h 
output.c output.h sem_functions.c sem_functions.h index_marking.c 
index_marking.h
 
-speech_dispatcher_LDADD = -ldotconf -lglib-2.0 -lgmodule-2.0 @glib_libs@ 
@gthread_libs@ -lpthread @EXTRA_SOCKET_LIBS@
+speech_dispatcher_LDADD=$(top_builddir)/src/common/libcommon.la -ldotconf 
-lglib-2.0 -lgmodule-2.0 @glib_libs@ @gthread_libs@ -lpthread 
@EXTRA_SOCKET_LIBS@
 speech_dispatcher_LDFLAGS = @RDYNAMIC@
 
-inc_local = -I$(top_srcdir)/intl/
+inc_local = -I$(top_srcdir)/include/
 localedir = $(datadir)/locale
 AM_CFLAGS = @ERROR_CFLAGS@ $(inc_local) -I$(localedir) @glib_include@ 
-DSYS_CONF=\"@address@hidden" -DSND_DATA=\"@address@hidden" 
-DMODULEBINDIR=\"@address@hidden"  -DVERSION=\"@address@hidden" 
-DPACKAGE=\"@address@hidden"
diff --git a/src/server/config.c b/src/server/config.c
index 66cfa96..c367597 100644
--- a/src/server/config.c
+++ b/src/server/config.c
@@ -26,13 +26,28 @@
 
 #include "speechd.h"
 #include "config.h"
-#include "intl/fdsetconv.h"
+#include <fdsetconv.h>
 
 static TFDSetClientSpecific *cl_spec_section;
 
 /* So that gcc doesn't comply about casts to char* */
 extern char* spd_strdup(char* string);
 
+EVoiceType
+str2intpriority(char* str)
+{
+    int priority;
+
+    if (!strcmp(str, "important"))  priority = 1;
+    else if (!strcmp(str, "text")) priority = 2;
+    else if (!strcmp(str, "message")) priority = 3;
+    else if (!strcmp(str, "notification")) priority = 4;
+    else if (!strcmp(str, "progress")) priority = 5;
+    else priority = -1;
+
+    return priority;
+}
+
 /* == CONFIGURATION MANAGEMENT FUNCTIONS */
 
 /* Add dotconf configuration option */
diff --git a/src/server/config.h b/src/server/config.h
index 28854d1..05ce810 100644
--- a/src/server/config.h
+++ b/src/server/config.h
@@ -28,6 +28,9 @@
 #include <stdlib.h>
 #include <dotconf.h>
 
+#define SPEECHD_DEFAULT_PORT 6560
+
+
 /* Loading options from DotConf */
 configoption_t *spd_options;
 int spd_num_options;
diff --git a/src/server/output.c b/src/server/output.c
index fa5ba94..901756a 100644
--- a/src/server/output.c
+++ b/src/server/output.c
@@ -22,8 +22,6 @@
  */
 
 #include "output.h"
-
-#include "fdsetconv.c"
 #include "parse.h"
 
 #ifdef TEMP_FAILURE_RETRY      /* GNU libc */
diff --git a/src/server/server.c b/src/server/server.c
index 6b82473..154cec7 100644
--- a/src/server/server.c
+++ b/src/server/server.c
@@ -40,7 +40,7 @@ int last_message_id = 0;
  *          case it means we are reloading the message and the
  *          behavior is slightly different
  *   history_flag -- should this message be included in history?
- *   type -- type of the message (see intl/fdset.h)
+ *   type -- type of the message (see ../include/speechd_types.h)
  *   reparted -- if this is a preprocessed message reparted
  *             in more pieces
  * It returns 0 on success, -1 otherwise.
diff --git a/src/server/speaking.h b/src/server/speaking.h
index 12394b4..a0586f2 100644
--- a/src/server/speaking.h
+++ b/src/server/speaking.h
@@ -26,7 +26,7 @@
 #ifndef SPEAKING_H
 #define SPEAKING_H
 
-#include "fdset.h"
+#include <speechd_types.h>
 
 OutputModule *speaking_module;
 int speaking_uid;
diff --git a/src/server/speechd.h b/src/server/speechd.h
index 555322d..8a04a72 100644
--- a/src/server/speechd.h
+++ b/src/server/speechd.h
@@ -52,6 +52,8 @@
 #include <sys/ipc.h>
 #include <sys/sem.h>
 
+#define SPEECHD_DEBUG 0
+
 /* Definition of semun needed for semaphore manipulation */
 /* TODO: This fixes compilation for Mac OS X but might not be a correct
    solution for other platforms. A better check is needed, possibly including
@@ -68,12 +70,63 @@ union semun {
 };
 #endif
 
-#include "def.h"
-#include "fdset.h"
+#include <speechd_types.h>
 #include "module.h"
 #include "parse.h"
 #include "compare.h"
 
+typedef struct{
+    unsigned int uid;          /* Unique ID of the client */
+    int fd;                     /* File descriptor the client is on. */
+    int active;                 /* Is this client still active on socket or 
gone?*/
+    int paused;                 /* Internal flag, 1 for paused client or 0 for 
normal. */
+    int paused_while_speaking;  
+    EMessageType type;          /* Type of the message (1=text, 2=icon, 
3=char, 4=key) */
+    int ssml_mode;             /* SSML mode on (1)/off (0) */
+    int priority;               /* Priority between 1 and 3 (1 - highest, 3 - 
lowest) */
+    signed int rate;           /* Speed of voice from <-100;+100>, 0 is the 
default */
+    signed int pitch;          /* Pitch of voice from <-100;+100>, 0 is the 
default */
+    signed int volume;         /* Volume of voice from <-100;+100), 0 is the 
default */
+    EPunctMode punctuation_mode;       /* Punctuation mode: 0, 1 or 2
+                                   0   -       no punctuation
+                                   1   -       all punctuation
+                                   2   -       only user-selected punctuation 
*/
+    ESpellMode spelling_mode;   /* Spelling mode: 0 or 1 (0 - off, 1 - on) */
+    char *client_name;         /* Name of the client. */
+    char *language;             /* Selected language name. (e.g. "en", "cz", 
"fr", ...) */
+    char *output_module;        /* Output module name. (e.g. "festival", 
"flite", "apollo", ...) */
+    EVoiceType voice;           /* see EVoiceType definition above */
+    char *synthesis_voice;
+    ECapLetRecogn cap_let_recogn;         /* Capital letters recognition: (0 - 
off, 1 - on) */
+
+    ENotification notification;        /* Notification about start and stop of 
messages, about reached 
+                                  index marks and state (canceled, paused, 
resumed). */
+
+    int reparted;
+    unsigned int min_delay_progress;
+    int pause_context;          /* Number of words that should be repeated 
after a pause */
+    char* index_mark;           /* Current index mark for the message (only if 
paused) */
+
+    char* audio_output_method;
+    char* audio_oss_device;
+    char* audio_alsa_device;
+    char* audio_nas_server;
+    char* audio_pulse_server;
+    int audio_pulse_min_length;
+    int log_level;
+
+    /* TODO: Should be moved out */
+    unsigned int hist_cur_uid;
+    int hist_cur_pos;
+    ESort hist_sorted;
+
+}TFDSetElement;
+
+typedef struct{
+    char *pattern;
+    TFDSetElement val;
+}TFDSetClientSpecific;
+
 /* Size of the buffer for socket communication */
 #define BUF_SIZE 128
 
diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am
index cf5f322..cf59aa7 100644
--- a/src/tests/Makefile.am
+++ b/src/tests/Makefile.am
@@ -1,6 +1,6 @@
 
 localedir = $(datadir)/locale
-inc_local = "-I$(top_srcdir)/intl/"
+inc_local = "-I$(top_srcdir)/include/"
 c_api = $(top_srcdir)/src/c/api
 
 AM_CFLAGS = -I$(c_api) -DLOCALEDIR=\"$(localedir)\" -I/usr/include/ 
$(inc_local) @glib_include@ -I../audio/
diff --git a/src/tests/clibrary.c b/src/tests/clibrary.c
index f01c774..ec2d14c 100644
--- a/src/tests/clibrary.c
+++ b/src/tests/clibrary.c
@@ -27,7 +27,6 @@
 #include <unistd.h>
 
 #include "libspeechd.h"
-#include "def.h"
 
 int main() {
    SPDConnection* conn;
diff --git a/src/tests/clibrary2.c b/src/tests/clibrary2.c
index 7ba410b..4847a04 100644
--- a/src/tests/clibrary2.c
+++ b/src/tests/clibrary2.c
@@ -27,7 +27,6 @@
 #include <unistd.h>
 
 #include "libspeechd.h"
-#include "def.h"
 
 int main() {
    SPDConnection* conn;
diff --git a/src/tests/long_message.c b/src/tests/long_message.c
index 41d9e48..6610e7f 100644
--- a/src/tests/long_message.c
+++ b/src/tests/long_message.c
@@ -26,7 +26,6 @@
 #include <stdlib.h>
 
 #include "libspeechd.h"
-#include "def.h"
 
 int main() {
    SPDConnection *sockfd;
diff --git a/src/tests/run_test.c b/src/tests/run_test.c
index a3f62b8..13ef7b6 100644
--- a/src/tests/run_test.c
+++ b/src/tests/run_test.c
@@ -32,7 +32,6 @@
 #include <assert.h>
 #include <ctype.h>
 
-#include "def.h"
 
 #define FATAL(msg) { printf(msg"\n"); exit(1); }
 
-- 
1.7.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]