summaryrefslogtreecommitdiff
path: root/navit/speech.c
diff options
context:
space:
mode:
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2008-05-18 10:01:53 +0000
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2008-05-18 10:01:53 +0000
commit0b74d7f4ee6d448ac811e2741e8cb1ed04f5ce76 (patch)
treebe7bb1cb1020f4022e41c004e2fa9d561ea3580d /navit/speech.c
parentf46eb419c46011d6d103b7f06cb2c842a2cbe6c9 (diff)
downloadnavit-0b74d7f4ee6d448ac811e2741e8cb1ed04f5ce76.tar.gz
Fix:Core:Renamed src to navit for cleanup of includes
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@1059 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/speech.c')
-rw-r--r--navit/speech.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/navit/speech.c b/navit/speech.c
new file mode 100644
index 000000000..0e49cd753
--- /dev/null
+++ b/navit/speech.c
@@ -0,0 +1,41 @@
+#include <glib.h>
+#include <string.h>
+#include "debug.h"
+#include "speech.h"
+#include "plugin.h"
+
+struct speech {
+ struct speech_priv *priv;
+ struct speech_methods meth;
+};
+
+struct speech *
+speech_new(const char *type, const char *data)
+{
+ struct speech *this_;
+ struct speech_priv *(*speech_new)(const char *data, struct speech_methods *meth);
+
+ dbg(1,"enter type=%s data=%s\n", type, data);
+ speech_new=plugin_get_speech_type(type);
+ dbg(1,"new=%p\n", speech_new);
+ if (! speech_new) {
+ return NULL;
+ }
+ this_=g_new0(struct speech, 1);
+ this_->priv=speech_new(data, &this_->meth);
+ dbg(1, "say=%p\n", this_->meth.say);
+ dbg(1,"priv=%p\n", this_->priv);
+ if (! this_->priv) {
+ g_free(this_);
+ return NULL;
+ }
+ dbg(1,"return %p\n", this_);
+ return this_;
+}
+
+int
+speech_say(struct speech *this_, const char *text)
+{
+ dbg(1, "this_=%p text='%s' calling %p\n", this_, text, this_->meth.say);
+ return (this_->meth.say)(this_->priv, text);
+}