| // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| #ifndef SPEECH_SYNTHESIS_INTERFACE_H_ |
| #define SPEECH_SYNTHESIS_INTERFACE_H_ |
| |
| #include <dbus/dbus-glib.h> |
| #include <dbus/dbus-glib-bindings.h> |
| #include <glib-object.h> |
| #include <stdlib.h> |
| |
| #include <base/logging.h> |
| #include <chromeos/dbus/dbus.h> |
| #include <chromeos/glib/object.h> |
| |
| #include "speech_synthesizer_service.h" |
| |
| // Helpers for using GObjects until we can get a C++ wrapper going. |
| namespace speech_synthesis { |
| namespace gobject { // Namespace hiding the GObject type data. |
| |
| struct SpeechSynthesizer { |
| GObject parent_instance; |
| SpeechSynthesizerService *service; // pointer to implementing service. |
| }; |
| struct SpeechSynthesizerClass { GObjectClass parent_class; }; |
| |
| // speech_synthesizer_get_type() is defined in interface.cc by the |
| // G_DEFINE_TYPE() macro. This macro defines a number of other GLib |
| // class system specific functions and variables discussed in |
| // interface.cc. |
| GType speech_synthesizer_get_type(); // defined by G_DEFINE_TYPE |
| |
| // Interface function prototypes which wrap service. |
| gboolean speech_synthesizer_speak(SpeechSynthesizer *self, |
| gchar *text, |
| GError **error); |
| gboolean speech_synthesizer_set_properties(SpeechSynthesizer *self, |
| gchar *properties, |
| GError **error); |
| gboolean speech_synthesizer_stop(SpeechSynthesizer *self, |
| GError **error); |
| gboolean speech_synthesizer_is_speaking(SpeechSynthesizer *self, |
| gboolean* OUT_isSpeaking_requested, |
| GError **error); |
| } // namespace gobject |
| } // namespace speech_synthesis |
| #endif // SPEECH_SYNTHESIS_INTERFACE_H_ |
| |