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: Sat, 11 Sep 2010 18:47:00 -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                   |    2 +-
 configure.ac                  |    3 +-
 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               |    5 +-
 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           |    3 +-
 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(+), 440 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 822e876..572b6f3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,6 +2,6 @@
 
 SUBDIRS= src config doc po
 
-EXTRA_DIST=  intl build.sh
+EXTRA_DIST=  build.sh
 
 MAINTAINERCLEANFILES=configure
diff --git a/configure.ac b/configure.ac
index 129fa49..d36e016 100644
--- a/configure.ac
+++ b/configure.ac
@@ -414,5 +414,4 @@ AC_SUBST(RDYNAMIC)
 localedir=${datadir}/locale
 AC_SUBST(localedir)
 
-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 src/audio/static_plugins.c config/Makefile 
config/modules/Makefile config/clients/Makefile doc/Makefile 
src/python/Makefile src/python/speechd/Makefile 
src/python/speechd_config/Makefile po/Makefile.in])
-
+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 
src/audio/static_plugins.c config/Makefile config/modules/Makefile 
config/clients/Makefile doc/Makefile src/python/Makefile 
src/python/speechd/Makefile src/python/speechd_config/Makefile po/Makefile.in])
diff --git a/doc/speech-dispatcher.texi b/doc/speech-dispatcher.texi
index ff609ca..4b2d9d1 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{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{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..929024e
--- /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 fa6a695..5bb50ef 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -10,12 +10,11 @@ EXTRA_DIST = cl/ChangeLog cl/README cl/configuration.lisp 
cl/elisp.lisp \
              guile/ChangeLog guile/Makefile guile/README guile/gssip.scm.in \
              guile/gssip.c guile/gssip.h
 
-SUBDIRS=server audio c modules tests
+SUBDIRS=common server audio c modules tests
 
 if HAVE_PYTHON
 SUBDIRS += python
 endif
 
-DIST_SUBDIRS=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 98d5efa..d356d46 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/"
 
 include_HEADERS = spd_audio_plugin.h
 
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 ede727c..7ef94c2 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 345decf..efb4bca 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_builddir)/src/c/api
 
 AM_CFLAGS = -DLOCALEDIR=\"$(localedir)\" $(inc_local) @glib_include@ 
-I$(top_srcdir)/src/c/api
diff --git a/src/common/Makefile.am b/src/common/Makefile.am
new file mode 100644
index 0000000..20572f6
--- /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
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 dc93b1c..f411124 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_builddir)/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_builddir)/src/audio -I$(top_srcdir)/src/audio $(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_main.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_main.c module_utils.c 
module_utils_addvoice.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 festival_client.c festival_client.h 
module_main.c module_utils.c module_utils.h
 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_main.c module_utils.c 
module_utils_addvoice.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_main.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_main.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 ivona_client.c ivona_client.h module_main.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_main.c module_utils.c 
module_utils_addvoice.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 2540abe..c01c022 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 <sys/poll.h>
 #include <fcntl.h>
diff --git a/src/modules/dummy.c b/src/modules/dummy.c
index ea75d42..2815063 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"
 
diff --git a/src/modules/espeak.c b/src/modules/espeak.c
index c96d757..040b06a 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 affef18..c1f655a 100644
--- a/src/modules/festival.c
+++ b/src/modules/festival.c
@@ -23,7 +23,7 @@
 
 #include <stdio.h>
 
-#include "fdset.h"
+#include <speechd_types.h>
 #include "fdsetconv.h"
 
 #include "festival_client.h"
diff --git a/src/modules/flite.c b/src/modules/flite.c
index bb052ea..dbd5662 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 503966c..14dc01d 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"
 
diff --git a/src/modules/ibmtts.c b/src/modules/ibmtts.c
index d5d8494..ae66720 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"
 
 #if HAVE_SNDFILE
diff --git a/src/modules/ivona.c b/src/modules/ivona.c
index e946463..0c3897f 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"
 #include "ivona_client.h"
diff --git a/src/modules/module_utils.c b/src/modules/module_utils.c
index b6d938f..8849183 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 99a23d5..7c695e9 100644
--- a/src/modules/module_utils.h
+++ b/src/modules/module_utils.h
@@ -47,6 +47,21 @@
 #include "fdset.h"
 #include "spd_audio.h"
 
+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 0c56c68..fb90268 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" -D_GNU_SOURCE
diff --git a/src/server/config.c b/src/server/config.c
index 95bd75d..1a647af 100644
--- a/src/server/config.c
+++ b/src/server/config.c
@@ -26,13 +26,28 @@
 
 #include "speechd.h"
 #include "config.h"
-#include "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 0f15e87..a91e3b6 100644
--- a/src/server/output.c
+++ b/src/server/output.c
@@ -21,9 +21,8 @@
  * $Id: output.c,v 1.38 2008-06-27 12:28:48 hanke Exp $
  */
 
+#include <fdsetconv.h>
 #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 f28c38a..2bab8a0 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 fbfc65e..f5424f9 100644
--- a/src/server/speechd.h
+++ b/src/server/speechd.h
@@ -50,6 +50,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
@@ -66,11 +68,62 @@ union semun {
 };
 #endif
 
-#include "def.h"
-#include "fdset.h"
+#include <speechd_types.h>
 #include "module.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 7fdf847..314f423 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_builddir)/src/c/api
 
 AM_CFLAGS = -I$(top_srcdir)/src/c/api -DLOCALEDIR=\"$(localedir)\" 
$(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 f2e87fa..e5f99c8 100644
--- a/src/tests/run_test.c
+++ b/src/tests/run_test.c
@@ -34,7 +34,6 @@
 #include <ctype.h>
 #include <errno.h>
 
-#include "def.h"
 
 #define FATAL(msg) { printf(msg"\n"); exit(1); }
 
-- 
1.7.2.2




reply via email to

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