2 * Navit, a modular navigation system.
3 * Copyright (C) 2005-2008 Navit Team
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * version 2 as published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
35 speech_dbus_say(struct speech_priv *this, const char *text)
37 struct attr attr1,attr2,cb,*attr_list[3];
42 attr2.u.str=(char *)text;
46 if (navit_get_attr(this->nav, attr_callback_list, &cb, NULL))
47 callback_list_call_attr_4(cb.u.callback_list, attr_command, "dbus_send_signal", attr_list, NULL, &valid);
52 speech_dbus_destroy(struct speech_priv *this) {
56 static struct speech_methods speech_dbus_meth = {
61 static struct speech_priv *
62 speech_dbus_new(struct speech_methods *meth, struct attr **attrs, struct attr *parent) {
63 struct speech_priv *this;
64 if (!parent || parent->type != attr_navit)
66 this=g_new(struct speech_priv,1);
67 this->nav=parent->u.navit;
68 *meth=speech_dbus_meth;
76 plugin_register_speech_type("dbus", speech_dbus_new);