summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author <philippe colliot>2015-12-10 15:12:55 +0100
committer <philippe colliot>2015-12-10 15:12:55 +0100
commit42b73e847d58ada53c8a71f9a0b85f9eabf334f6 (patch)
treef50d6efbab3909cb6b83887de2fc1f94b2021682
parent0a00affdc77ed4fb1865a421b87bc6a61d8b983f (diff)
downloadpoi-service-42b73e847d58ada53c8a71f9a0b85f9eabf334f6.tar.gz
Update of the franca files after telco
-rw-r--r--api/franca/hmi/speechoutputservice/CMakeLists.txt (renamed from api/franca/hmi/speechservice/CMakeLists.txt)0
-rw-r--r--api/franca/hmi/speechoutputservice/SpeechOutput.fidl (renamed from api/franca/hmi/speechservice/SpeechOutput.fidl)4
-rwxr-xr-xapi/franca/navigation/NavigationTypes.fidl22
-rwxr-xr-xapi/franca/navigation/freetextsearchservice/FreeTextSearch.fidl39
-rw-r--r--api/speech-service/CMakeLists.txt46
-rw-r--r--api/speech-service/constants.xsl71
-rw-r--r--api/speech-service/enum.xsl32
-rw-r--r--api/speech-service/genivi-speechservice-constants.xml55
-rw-r--r--api/speech-service/genivi-speechservice-speechoutput.xml122
-rw-r--r--api/speech-service/introspect.xsd147
-rw-r--r--api/speech-service/introspect.xsl183
-rw-r--r--src/navigation/CMakeLists.txt6
-rw-r--r--src/navigation/navigation-core/CMakeLists.txt1
-rw-r--r--src/navigation/navigation-core/navit_genivi_navigationcore.xsl2
-rw-r--r--src/navigation/navigation-core/speech-plugin/.gitignore9
-rw-r--r--src/navigation/navigation-core/speech-plugin/CMakeLists.txt39
-rw-r--r--src/navigation/navigation-core/speech-plugin/genivi_navigationcore_speechoutput.cxx160
17 files changed, 897 insertions, 41 deletions
diff --git a/api/franca/hmi/speechservice/CMakeLists.txt b/api/franca/hmi/speechoutputservice/CMakeLists.txt
index 94ec064..94ec064 100644
--- a/api/franca/hmi/speechservice/CMakeLists.txt
+++ b/api/franca/hmi/speechoutputservice/CMakeLists.txt
diff --git a/api/franca/hmi/speechservice/SpeechOutput.fidl b/api/franca/hmi/speechoutputservice/SpeechOutput.fidl
index e4107d6..99091f1 100644
--- a/api/franca/hmi/speechservice/SpeechOutput.fidl
+++ b/api/franca/hmi/speechoutputservice/SpeechOutput.fidl
@@ -7,7 +7,7 @@
// Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
// this file, You can obtain one at http://mozilla.org/MPL/2.0/.
-package org.genivi.hmi.speechservice
+package org.genivi.hmi.speechoutputservice
import org.genivi.CommonTypes.* from "../../CommonTypes.fidl"
@@ -137,7 +137,7 @@ interface SpeechOutput {
// *** notification methods
/**
- * The notifiy status messages will be send to signal the status as feedback on control of prompting functionalities.
+ * The notify status messages will be send to signal the status as feedback on control of prompting functionalities.
*/
<** @description : Notifies the connection status **>
diff --git a/api/franca/navigation/NavigationTypes.fidl b/api/franca/navigation/NavigationTypes.fidl
index c1cf0c2..2f652ad 100755
--- a/api/franca/navigation/NavigationTypes.fidl
+++ b/api/franca/navigation/NavigationTypes.fidl
@@ -8,6 +8,18 @@ package org.genivi.navigation
typeCollection NavigationTypes {
+ <** @description: version.**>
+ struct Version {
+ <** @description : when the major changes, then backward compatibility with previous releases is not granted.**>
+ UInt16 ^versionMajor
+ <** @description : when the minor changes, then backward compatibility with previous releases is granted, but something changed in the implementation of the API (e.g. new methods may have been added).**>
+ UInt16 ^versionMinor
+ <** @description : when the micro changes, then backward compatibility with previous releases is granted (bug fixes or documentation modifications).**>
+ UInt16 ^versionMicro
+ <** @description : release date (e.g. 21-06-2011).**>
+ String date
+ }
+
typedef Handle is UInt32
<** @description: Handle to a location.
@@ -19,11 +31,14 @@ typeCollection NavigationTypes {
/* geometric types */
struct Coordinate2D {
+ <** @description: latitude of the current position (according WGS84). Range [-90:+90]. Example: 48.053250 .**>
Double latitude
+ <** @description: longitude of the current position (according WGS84). Range [-180:+180]. Example: 8.324500 .**>
Double longitude
}
struct Coordinate3D extends Coordinate2D {
+ <** @description: altitude above the sea level of the current position in meters .**>
Int32 altitude
}
@@ -50,13 +65,6 @@ typeCollection NavigationTypes {
DistanceInMeters radius
}
- <** @description: Kind of shapes. **>
- enumeration ShapeType {
- CIRCLE
- RECTANGLE
- POLYGON
- }
-
typedef Timestamp is UInt64
diff --git a/api/franca/navigation/freetextsearchservice/FreeTextSearch.fidl b/api/franca/navigation/freetextsearchservice/FreeTextSearch.fidl
index c64516f..6eebedd 100755
--- a/api/franca/navigation/freetextsearchservice/FreeTextSearch.fidl
+++ b/api/franca/navigation/freetextsearchservice/FreeTextSearch.fidl
@@ -1,3 +1,4 @@
+
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2015-2016, PCA Peugeot Citroën, XS Embedded GmbH, TomTom International B.V., Continental Automotive GmbH,
// Alpine Electronics R&D Europe GmbH, Harman-Becker Automotive GmbH.
@@ -7,7 +8,6 @@
package org.genivi.navigation.freetextsearchservice
-import org.genivi.CommonTypes.* from "../../CommonTypes.fidl"
import org.genivi.navigation.NavigationTypes.* from "../NavigationTypes.fidl"
<** @description : This interface allows a user to find locations by entering a single text string.
@@ -63,19 +63,12 @@ interface FreeTextSearch {
<** @description: A union to contain any of the possble search shapes. **>
- union ShapeSpecificDetails {
+ union Shape {
Circle circle
Rectangle rectangle
}
- <** @description: A shape. **>
- struct Shape {
- ShapeType shapeType
- ShapeSpecificDetails shapeDetails
- }
-
-
<** @description: A list of shapes.
maximum length = 31
**>
@@ -107,7 +100,7 @@ interface FreeTextSearch {
}
<** @description: An OR-ed combination of SearchOption flags.
- Range[0:0x7fffffff]
+ Range[0:0xffffffff]
**>
typedef SearchOptions is UInt32
@@ -142,7 +135,7 @@ interface FreeTextSearch {
<** @description: Handle to a location.
- Range[0:0x7fffffff]
+ Range[0:0xffffffff]
**>
typedef LocationHandle is UInt32
@@ -153,14 +146,6 @@ interface FreeTextSearch {
array LocationHandleList of LocationHandle
- <** @description: An address can represent a street, a named place, or a mapcode. **>
- enumeration AddressType {
- STREET
- PLACE
- MAP_CODE
- }
-
-
<** @description: If a user entered a non-existing house number then the closest existing
number is returned. The houseNumberFromInput will contain the house
number from the user input, the houseNumber will contain closest house number.
@@ -204,7 +189,8 @@ interface FreeTextSearch {
<** @description: Mapcode details. **>
struct MapCodeDetails {
- <** @description: If the location of the mapcode is close to a street, this field
+ <** @description: Mapcodes are a free, open way to make every house or location on Earth addressable by a short code.
+ If the location of the mapcode is close to a street, this field
contains the name of that street, otherwise this field is left empty.
**>
FtsString closestStreetName
@@ -212,24 +198,17 @@ interface FreeTextSearch {
<** @description: A union to contain any of the specific types of address details. **>
- union AddressTypeSpecificDetails {
+ union AddressDetails {
StreetDetails streetDetails
PlaceDetails placeDetails
MapCodeDetails mapCodeDetails
}
- <** @description: Address details for lines, nodes and mapcodes. **>
- struct AddressDetails {
- AddressType addressType
- AddressTypeSpecificDetails addressTypeSpecificDetails
- }
-
-
<** @description: A higher score means a better match.
- Range[0:0x7fff]
+ Range[0:0xffff]
**>
- typedef Score is Int16
+ typedef Score is UInt16
<** @description: Address information. **>
diff --git a/api/speech-service/CMakeLists.txt b/api/speech-service/CMakeLists.txt
new file mode 100644
index 0000000..8541643
--- /dev/null
+++ b/api/speech-service/CMakeLists.txt
@@ -0,0 +1,46 @@
+###########################################################################
+# @licence app begin@
+# SPDX-License-Identifier: MPL-2.0
+#
+# Component Name: speech service
+#
+# Author: Philippe Colliot
+#
+# Copyright (C) 2014, PCA Peugeot Citroën
+#
+# License:
+# This Source Code Form is subject to the terms of the
+# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+# this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# @licence end@
+###########################################################################
+project(speech-service)
+cmake_minimum_required(VERSION 2.8)
+
+message(STATUS "generation of DBus files for speech-service")
+
+find_program(XSLTPROC xsltproc REQUIRED)
+find_program(DBUSXML2CPP dbusxx-xml2cpp REQUIRED)
+
+file (GLOB XML_TO_DBUS
+ ${CMAKE_CURRENT_SOURCE_DIR}/genivi-speechservice-speechoutput.xml
+)
+foreach (RAW_FILE ${XML_TO_DBUS})
+ get_filename_component(FILE ${RAW_FILE} NAME_WE)
+ execute_process(
+ COMMAND ${DBUSXML2CPP} ${RAW_FILE} --proxy=${CMAKE_CURRENT_BINARY_DIR}/${FILE}_proxy.h
+ COMMAND ${DBUSXML2CPP} ${RAW_FILE} --adaptor=${CMAKE_CURRENT_BINARY_DIR}/${FILE}_adaptor.h
+ )
+endforeach()
+
+file (GLOB XML_TO_DBUS_CONSTANT
+ ${CMAKE_CURRENT_SOURCE_DIR}/genivi-speechservice-constants.xml
+)
+foreach (RAW_FILE ${XML_TO_DBUS_CONSTANT})
+ get_filename_component(FILE ${RAW_FILE} NAME_WE)
+ execute_process(
+ OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/${FILE}.h
+ COMMAND ${XSLTPROC} ${CMAKE_CURRENT_SOURCE_DIR}/enum.xsl ${RAW_FILE}
+ )
+endforeach()
diff --git a/api/speech-service/constants.xsl b/api/speech-service/constants.xsl
new file mode 100644
index 0000000..e45a37a
--- /dev/null
+++ b/api/speech-service/constants.xsl
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
+<!-- SPDX-License-Identifier: MPL-2.0
+ Copyright (C) 2014, BMW Car IT GmbH, Continental Automotive GmbH, PCA Peugeot Citroën, XS Embedded GmbH, TomTom International B.V., Alpine Electronics R&D Europe GmbH, AISIN AW CO., LTD., Neusoft Technology Solutions GmbH, Jaguar Land Rover Limited, Visteon Corporation
+ This Source Code Form is subject to the terms of the
+ Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+ this file, you can obtain one at http://mozilla.org/MPL/2.0/.
+-->
+<!-- 09.3.2011 Marco Residori: First Draft -->
+<!-- 14.3.2011 Marco Residori: Improved layout -->
+ <xsl:output method="xml" version="1.0" encoding="iso-8859-15" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" indent="yes"/>
+ <xsl:template match="/">
+ <html>
+ <!-- head -->
+ <head>
+ <title>DBUS Introspection Data</title>
+ <style type="text/css">
+ body { color: black; background-color: white }
+ h1 { font-family: sans-serif }
+ ul { list-style-type: none; margin-bottom: 10px }
+ li { font-family: sans-serif }
+ .keyword { font-style: italic }
+ .id { font-style: italic; font-size:8pt; }
+ .title { font-style: italic; color: blue }
+ .line { font-style: italic; font-size:8pt; color: green}
+ .version { font-family: monospace }
+ </style>
+ </head>
+ <!-- body -->
+ <body>
+ <!-- definitions -->
+ <xsl:apply-templates select="constants"/>
+ </body>
+ </html>
+ </xsl:template>
+ <xsl:template match="constants">
+ <div class="constants">
+ <h1>
+ <span class="keyword">constants</span>
+ <xsl:text> </xsl:text>
+ <span class="title">
+ <xsl:value-of select="@name"/>
+ </span>
+ <xsl:text> </xsl:text>
+ <span class="version">version</span>
+ <xsl:text> </xsl:text>
+ <span class="version">
+ <xsl:value-of select="version"/>
+ </span>
+ </h1>
+ <xsl:apply-templates select="doc"/>
+ <xsl:for-each select="id">
+ <hr/>
+ <li>
+ <xsl:apply-templates select="doc"/>
+ <span class="id"><xsl:value-of select="@name"/> = <xsl:value-of select="@value"/></span>
+ </li>
+ </xsl:for-each>
+ </div>
+ </xsl:template>
+ <xsl:template match="doc">
+ <li>
+ <span class="line">
+ <xsl:for-each select="line">
+ <xsl:value-of select="."/>
+ <xsl:element name="br"/>
+ </xsl:for-each>
+ </span>
+ </li>
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/api/speech-service/enum.xsl b/api/speech-service/enum.xsl
new file mode 100644
index 0000000..4c093e8
--- /dev/null
+++ b/api/speech-service/enum.xsl
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- ************************************************************************
+* Component Name: Navit POC
+* Author: Martin Schaller <martin.schaller@it-schaller.de>
+*
+* Copyright (C) 2012, GENIVI Alliance, Inc.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License version 2 as
+* published by the Free Software Foundation.
+*
+* This program 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 program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*
+************************************************************************ -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
+ <xsl:output method="text" encoding="iso-8859-15"/>
+ <xsl:template match="constants">
+ <xsl:variable name="constants" select="translate(@name,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
+/* This is an automatically generated file, do not edit */
+
+enum GENIVI_<xsl:value-of select="$constants"/>_Constants {<xsl:for-each select="id">
+ GENIVI_<xsl:value-of select="$constants"/>_<xsl:value-of select="translate(@name,'-','_')"/> = <xsl:value-of select="@value"/>,</xsl:for-each>
+};
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/api/speech-service/genivi-speechservice-constants.xml b/api/speech-service/genivi-speechservice-constants.xml
new file mode 100644
index 0000000..bee6d27
--- /dev/null
+++ b/api/speech-service/genivi-speechservice-constants.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="constants.xsl"?>
+<!-- SPDX-License-Identifier: MPL-2.0
+ Copyright (C) 2014, BMW Car IT GmbH, Continental Automotive GmbH, PCA Peugeot Citroën, XS Embedded GmbH, TomTom International B.V., Alpine Electronics R&D Europe GmbH, AISIN AW CO., LTD., Neusoft Technology Solutions GmbH, Jaguar Land Rover Limited, Visteon Corporation
+ This Source Code Form is subject to the terms of the
+ Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+ this file, you can obtain one at http://mozilla.org/MPL/2.0/.
+-->
+<constants name="SpeechService">
+ <version>1.0.0 (21-01-2014)</version>
+ <doc>
+ <line>This document defines the constants used in the Speech service APIs</line>
+ </doc>
+
+ <id name="MAX_CHUNK_LENGTH" value="1024" />
+ <id name="CS_UNKNOWN " value="0x0000" />/* no instance of prompter available for member initialization purposes. */
+ <id name="CS_ESTABLISHED " value="0x0001" />/* success status, client is connected */
+ <id name="CS_REFUSED " value="0x0002" />/* currently a connection with the given priority is not possible. */
+ <id name="CS_POSSIBLE " value="0x0003" />/* notification that after a rejected prompt, a new attempt would be successful */
+ <id name="CS_PENDING " value="0x0004" />/* while connecting to service */
+ <id name="CS_PAUSED " value="0x0005" />/* client is paused */
+ <id name="CS_TERMINATED " value="0x0006" />/* client is disconnected */
+ <id name="CS_MAX " value="0x0007" />/* max value shall be error checked */
+
+ <id name="CT_NAVIGATION" value="0x0010" />/* reserved for internal Navigation application */
+ <id name="CT_READER" value="0x0011" />/* reserved for internal Reader application */
+ <id name="CT_GEN_HIGH" value="0x0012" />/* reserved for connections of generic application with high priority */
+ <id name="CT_GEN_MEDIUM" value="0x0013" />/* reserved for connections of generic application with medium priority */
+ <id name="CT_GEN_LOW" value="0x0014" />/* reserved for connections of generic application with low priority */
+ <id name="CT_MAX" value="0x0015" />/* max value shall be error checked */
+
+ <id name="PPT_DIALOG" value="0x0020" />/* activates preprocessing rules for Dialog context */
+ <id name="PPT_NAVIGATION" value="0x0021" />/* activates preprocessing rules for Navigation context */
+ <id name="PPT_NONE" value="0x0022" />/* resets preprocessing rules */
+ <id name="PPT_READER" value="0x0023" />/* activates preprocessing rules for Reader context */
+ <id name="PPT_MAX" value="0x0024" />/* max value shall be error checked */
+
+ <id name="QS_UNKNOWN" value="0x0030" />/* no instance of prompter available for member initialization purposes. */
+ <id name="QS_FULL" value="0x0031" />/* chunk was rejected because chunk doesn't fit into buffer */
+ <id name="QS_HIGH_FILL" value="0x0032" />/* was added, but less than n% space missing. The client should consider delaying further additions. There is a risk successive chunk additions will not be heard and return an error. */
+ <id name="QS_LOW_FILL" value="0x0033" />/* the chunk was added, and there is enough memory for more chunks available */
+ <id name="QS_MAX" value="0x0034" />/* max value shall be error checked */
+
+ <id name="TS_UNKNOWN" value="0x0040" />/* no instance of prompter available for member initialization purposes. */
+ <id name="TS_NOT_INITIALIZED" value="0x0041" />/* prompter is not ready (startup , language change) */
+ <id name="TS_ACTIVE" value="0x0042" />/* prompter is active */
+ <id name="TS_ABORTED" value="0x0043" />/* prompter was aborted */
+ <id name="TS_MARKER" value="0x0044" />/* marker reached */
+ <id name="TS_IDLE" value="0x0045" />/* prompter in idle state */
+ <id name="TS_ENQUEUED" value="0x0046" />/* queue not empty, new chunk arrived */
+ <id name="TS_FINISHED" value="0x0047" />/* prompter finished speaking */
+ <id name="TS_FAILED" value="0x0048" />/* prompting failed */
+ <id name="TS_MAX" value="0x0049" />/* max value shall be error checked */
+
+</constants>
diff --git a/api/speech-service/genivi-speechservice-speechoutput.xml b/api/speech-service/genivi-speechservice-speechoutput.xml
new file mode 100644
index 0000000..35838c3
--- /dev/null
+++ b/api/speech-service/genivi-speechservice-speechoutput.xml
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="introspect.xsl"?>
+<!-- This D-Bus Introspection model has been created from a Franca IDL file. -->
+<!-- Input file: 'SpeechOutput.fidl' -->
+<node xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="introspect.xsd" name="org.genivi.hmi.speechservice">
+ <interface name="org.genivi.hmi.speechservice.SpeechOutput">
+ <version>0.1</version>
+ <method name="getVersion">
+ <doc>
+ <line>getVersion = This method returns the API version implemented by the content access module.</line>
+ </doc>
+ <arg direction="out" name="version" type="(qqqs)">
+ <doc>
+ <line>version (of type Version) = .</line>
+ <line>Version struct[versionMajor, versionMinor, versionMicro, date] = version.</line>
+ <line>0: Version.versionMajor ('q') = when the major changes, then backward compatibility with previous releases is not granted.</line>
+ <line>1: Version.versionMinor ('q') = when the minor changes, then backward compatibility with previous releases is granted, but something changed in the implementation of the API (e.g. new methods may have been added).</line>
+ <line>2: Version.versionMicro ('q') = when the micro changes, then backward compatibility with previous releases is granted (bug fixes or documentation modifications).</line>
+ <line>3: Version.date ('s') = release date (e.g. 21-06-2011).</line>
+ </doc>
+ </arg>
+ </method>
+ <method name="openPrompter">
+ <doc>
+ <line>openPrompter = Must be called to open a SpeechOutputService session and to get the audio connection.</line>
+ </doc>
+ <arg direction="in" name="connectionType" type="u">
+ <doc>
+ <line>connectionType (of type ConnectionType) = Sets the Audio connection that should be used for the prompter application.</line>
+ <line>enum[CT_NAVIGATION (null), CT_READER (null), CT_GEN_HIGH (null), CT_GEN_MEDIUM (null), CT_GEN_LOW (null), CT_MAX (null)]</line>
+ </doc>
+ </arg>
+ <arg direction="in" name="preProcessingType" type="u">
+ <doc>
+ <line>preProcessingType (of type PreProcessingType) = Sets the text normaization mode and which active prompt data base will be activated.</line>
+ <line>enum[PPT_DIALOG (null), PPT_NAVIGATION (null), PPT_NONE (null), PPT_READER (null), PPT_MAX (null)]</line>
+ </doc>
+ </arg>
+ </method>
+ <method name="addTextChunk">
+ <doc>
+ <line>addTextChunk = The prompter must be opened to trigger the playback of the provided prompt.</line>
+ <line>The prompt length must not exceed the length of a PromptChunk buffer.</line>
+ <line>Synthesizes the provided text or if using the escape sequence of the engine supplier a wave file in a supported sampling rate is provided, the system will back back also wave files.</line>
+ <line>The text will be normalized using the context identifier provided to openprompter. This applies to matching prerecorded files as well as the synthesis of number and words that are matched to a lexical dictionary.</line>
+ <line>The synthesize will start if the prompter is idle, if the prompter is already playing the playback will be delayed until all previously added text chunks are played back. For every text chunk provided a notification will be send.</line>
+ </doc>
+ <arg direction="in" name="chunk" type="s">
+ <doc>
+ <line>chunk (of type Chunk) = String containing the prompt to play.</line>
+ <line>lineComment to be defined</line>
+ </doc>
+ </arg>
+ <arg direction="out" name="chunkID" type="u">
+ <doc>
+ <line>chunkID (of type ChunkID) = Index of the added prompt, zero based.</line>
+ <line>lineComment to be defined</line>
+ </doc>
+ </arg>
+ </method>
+ <method name="abortPrompter">
+ <doc>
+ <line>abortPrompter = A prompt must be playing to perform an abort action. If no prompting operation in progress there will be no reaction of the system.</line>
+ </doc>
+ </method>
+ <method name="closePrompter">
+ <doc>
+ <line>closePrompter = The prompter is closed after the last text chunk submitted has finished playing.</line>
+ </doc>
+ </method>
+ <signal name="notifyConnectionStatus">
+ <doc>
+ <line>notifyConnectionStatus = Notifies the connection status</line>
+ </doc>
+ <arg direction="out" name="connectionStatus" type="u">
+ <doc>
+ <line>connectionStatus (of type ConnectionStatus) = Client connection status.</line>
+ <line>enum[CS_UNKNOWN (null), CS_ESTABLISHED (null), CS_REFUSED (null), CS_POSSIBLE (null), CS_PENDING (null), CS_PAUSED (null), CS_TERMINATED (null), CS_MAX (null)]</line>
+ </doc>
+ </arg>
+ </signal>
+ <signal name="notifyMarkerReached">
+ <doc>
+ <line>notifyMarkerReached = Notifies the last reached marker.</line>
+ </doc>
+ <arg direction="out" name="chunkID" type="u">
+ <doc>
+ <line>chunkID (of type ChunkID) = ID of the processed chunk.</line>
+ <line>lineComment to be defined</line>
+ </doc>
+ </arg>
+ <arg direction="out" name="marker" type="s">
+ <doc>
+ <line>marker (of type Marker) = String with the name of the reached marker (if TTS engine supports inserting bookmarks with a name).</line>
+ <line>lineComment to be defined</line>
+ </doc>
+ </arg>
+ </signal>
+ <signal name="notifyQueueStatus">
+ <doc>
+ <line>notifyQueueStatus = Notifies the queue status.</line>
+ </doc>
+ <arg direction="out" name="queueStatus" type="u">
+ <doc>
+ <line>queueStatus (of type QueueStatus) = Fill status of the text buffer.</line>
+ <line>enum[QS_UNKNOWN (null), QS_FULL (null), QS_HIGH_FILL (null), QS_LOW_FILL (null), QS_MAX (null)]</line>
+ </doc>
+ </arg>
+ </signal>
+ <signal name="notifyTTSStatus">
+ <doc>
+ <line>notifyTTSStatus = Notifies the TTS engine status.</line>
+ </doc>
+ <arg direction="out" name="ttsStatus" type="u">
+ <doc>
+ <line>ttsStatus (of type TtsStatus) = Current status of the TTS.</line>
+ <line>enum[TS_UNKNOWN (null), TS_NOT_INITIALIZED (null), TS_ACTIVE (null), TS_ABORTED (null), TS_MARKER (null), TS_IDLE (null), TS_ENQUEUED (null), TS_FINISHED (null), TS_FAILED (null), TS_MAX (null)]</line>
+ </doc>
+ </arg>
+ </signal>
+ </interface>
+</node>
diff --git a/api/speech-service/introspect.xsd b/api/speech-service/introspect.xsd
new file mode 100644
index 0000000..76ed7ef
--- /dev/null
+++ b/api/speech-service/introspect.xsd
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wmh="http://www.wmhelp.com/2003/eGenerator" elementFormDefault="qualified">
+ <!-- xmlns="introspect.dtd"
+ targetNamespace="introspect.dtd"> -->
+ <xs:element name="node">
+ <xs:annotation>
+ <xs:documentation> DTD for D-Bus Introspection data
+ </xs:documentation>
+ <xs:documentation> (C) 2005-02-02 David A. Wheeler; released under
+ the D-Bus licenses,
+ GNU GPL version 2 (or greater) and AFL 1.1 (or
+ greater)
+ </xs:documentation>
+ <xs:documentation> see D-Bus specification for documentation
+ </xs:documentation>
+ <xs:documentation> Method arguments SHOULD include "direction",
+ while
+ signal and error arguments SHOULD not (since there's no point).
+ The
+ DTD format can't express that subtlety.
+ </xs:documentation>
+ <xs:documentation> Generic metadata </xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="node"/>
+ <xs:element name="interface" type="interfaceType"/>
+ </xs:choice>
+ <xs:attribute name="name" type="xs:string"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:complexType name="interfaceType">
+ <xs:sequence>
+ <xs:element name="version" type="xs:string"/>
+ <xs:element name="doc" type="docType"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="method" type="methodType"/>
+ <xs:element name="signal" type="signalType"/>
+ <xs:element name="property" type="propertyType"/>
+ <xs:element name="annotation" type="annotationType"/>
+ </xs:choice>
+ </xs:sequence>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ </xs:complexType>
+ <xs:complexType name="methodType">
+ <xs:sequence>
+ <xs:element name="status" type="statusType" minOccurs="0"/>
+ <xs:element name="poc" type="pocType" minOccurs="0"/>
+ <xs:element name="obligation" type="obligationType" minOccurs="0"/>
+ <xs:element name="doc" type="docType"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="arg" type="argType"/>
+ <xs:element name="annotation" type="annotationType"/>
+ <xs:element name="error" type="errorType"/>
+ </xs:choice>
+ </xs:sequence>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ </xs:complexType>
+ <xs:complexType name="signalType">
+ <xs:sequence>
+ <xs:element name="status" type="statusType" minOccurs="0"/>
+ <xs:element name="poc" type="pocType" minOccurs="0"/>
+ <xs:element name="obligation" type="obligationType" minOccurs="0"/>
+ <xs:element name="doc" type="docType"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="arg" type="argType"/>
+ <xs:element name="annotation" type="annotationType"/>
+ <xs:element name="error" type="errorType"/>
+ </xs:choice>
+ </xs:sequence>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ </xs:complexType>
+ <xs:complexType name="argType">
+ <xs:sequence>
+ <xs:element name="doc" type="docType"/>
+ </xs:sequence>
+ <xs:attribute name="name" type="xs:string"/>
+ <xs:attribute name="type" type="xs:string" use="required"/>
+ <xs:attribute name="direction" default="in">
+ <xs:simpleType>
+ <xs:restriction base="xs:NMTOKEN">
+ <xs:enumeration value="in"/>
+ <xs:enumeration value="out"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:complexType>
+ <xs:complexType name="propertyType">
+ <xs:annotation>
+ <xs:documentation> AKA "attribute" </xs:documentation>
+ </xs:annotation>
+ <xs:sequence minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="status" type="statusType" minOccurs="0"/>
+ <xs:element name="poc" type="pocType" minOccurs="0"/>
+ <xs:element name="obligation" type="obligationType" minOccurs="0"/>
+ <xs:element name="annotation" type="annotationType"/>
+ </xs:sequence>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ <xs:attribute name="type" type="xs:string" use="required"/>
+ <xs:attribute name="access" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:NMTOKEN">
+ <xs:enumeration value="read"/>
+ <xs:enumeration value="write"/>
+ <xs:enumeration value="readwrite"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:complexType>
+ <xs:complexType name="annotationType">
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ <xs:attribute name="value" type="xs:string" use="required"/>
+ </xs:complexType>
+ <!-- proprietary extensions from LBS-EG -->
+ <!-- <xs:complexType name="versionType" /> -->
+ <xs:complexType name="docType">
+ <xs:sequence>
+ <!-- <xs:element maxOccurs="unbounded" name="line" type="lineType"/> -->
+ <xs:element maxOccurs="unbounded" name="line" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:simpleType name="statusType">
+ <xs:restriction base="xs:NMTOKEN">
+ <xs:enumeration value="Approved"/>
+ <xs:enumeration value="Pending"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="pocType">
+ <xs:restriction base="xs:NMTOKEN">
+ <xs:enumeration value="Yes"/>
+ <xs:enumeration value="No"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="obligationType">
+ <xs:restriction base="xs:NMTOKEN">
+ <xs:enumeration value="Mandatory"/>
+ <xs:enumeration value="Optional"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:complexType name="errorType">
+ <xs:sequence>
+ <xs:element name="doc" type="docType"/>
+ </xs:sequence>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ </xs:complexType>
+ <!-- <xs:complexType name="lineType" /> -->
+</xs:schema>
diff --git a/api/speech-service/introspect.xsl b/api/speech-service/introspect.xsl
new file mode 100644
index 0000000..29cc34c
--- /dev/null
+++ b/api/speech-service/introspect.xsl
@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
+ <!--
+ Copyright (C) 2005 Lennart Poettering.
+
+ Licensed under the Academic Free License version 2.1
+
+ This program 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 of the License, or
+ (at your option) any later version.
+
+ This program 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 program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+-->
+
+ <!-- v0.1 26-06-2011 Marco Residori: Added support for inline documentation (tags doc,line and version) -->
+ <!-- v0.2 12-01-2012 Marco Residori: Added support for inline documentation (tags status,type) -->
+ <!-- v0.3 18-01-2012 Marco Residori: Added support for inline documentation (tag error) -->
+ <!-- v0.4 14-03-2012 Marco Residori: Added support for property-type and property-access. Replaced tag 'type' with 'obligation' -->
+
+ <!-- $Id$ -->
+ <xsl:output method="xml" version="1.0" encoding="iso-8859-15" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" indent="yes"/>
+ <xsl:template match="/">
+ <html>
+ <!-- head -->
+ <head>
+ <title>DBUS Introspection Data</title>
+ <style type="text/css">
+ body { color: black; background-color: white }
+ h1 { font-family: sans-serif }
+ ul { list-style-type: none; margin-bottom: 10px }
+ li { font-family: sans-serif }
+ .keyword { font-style: italic }
+ .type { font-weight: bold; font-size: 10pt }
+ .symbol { font-family: monospace }
+ .title { font-style: italic; color: blue }
+ .interface { padding: 10px; margin: 10px }
+
+ .line { font-style: italic; font-size:8pt; color: green}
+ .version { font-family: monospace }
+ .status { font-weight: bold; font-size:6pt }
+ .obligation { font-weight: bold; font-size:6pt }
+ .error { font-style: italic; font-size:8pt; color: black}
+ </style>
+ </head>
+ <!-- body -->
+ <body>
+ <!-- interfaces -->
+ <xsl:for-each select="node/interface">
+ <div class="interface">
+ <h1>
+ <span class="keyword">interface</span>
+ <xsl:text> </xsl:text>
+ <span class="title">
+ <xsl:value-of select="@name"/>
+ </span>
+ <xsl:text> </xsl:text>
+ <span class="version">version</span>
+ <xsl:text> </xsl:text>
+ <span class="version">
+ <xsl:value-of select="version"/>
+ </span>
+ </h1>
+ <ul>
+ <xsl:apply-templates select="doc"/>
+ </ul>
+ <ul>
+ <xsl:apply-templates select="annotation"/>
+ <!-- methods, signals and properties -->
+ <xsl:for-each select="method|signal|property">
+ <hr/>
+ <li>
+ <xsl:if test="status !=''">
+ <span class="status">[<xsl:value-of select="status"/>] </span>
+ </xsl:if>
+ <xsl:if test="obligation !=''">
+ <span class="obligation">[<xsl:value-of select="obligation"/>] </span>
+ </xsl:if>
+ <xsl:apply-templates select="doc"/>
+ <span class="keyword">
+ <xsl:value-of select="name()"/>
+ </span>
+ <xsl:text> </xsl:text>
+ <span class="symbol">
+ <xsl:value-of select="@name"/>
+ </span>
+ <xsl:text> </xsl:text>
+ <span class="keyword">
+ <xsl:value-of select="@access"/>
+ </span>
+ <xsl:text> </xsl:text>
+ <span class="type">
+ <xsl:value-of select="@type"/>
+ </span>
+ <xsl:text> </xsl:text>
+ <ul>
+ <xsl:apply-templates select="annotation"/>
+ <!-- arguments -->
+ <xsl:for-each select="arg">
+ <br/>
+ <xsl:apply-templates select="doc"/>
+ <li>
+ <span class="keyword">
+ <xsl:choose>
+ <xsl:when test="@direction !=''">
+ <xsl:value-of select="@direction"/>
+ </xsl:when>
+ <xsl:when test="name(..) ='signal'">
+ out
+ </xsl:when>
+ <xsl:otherwise>
+ in
+ </xsl:otherwise>
+ </xsl:choose>
+ </span>
+ <xsl:text> </xsl:text>
+ <span class="type">
+ <xsl:value-of select="@type"/>
+ </span>
+ <xsl:text> </xsl:text>
+ <span class="symbol">
+ <xsl:value-of select="@name"/>
+ </span>
+ <xsl:text> </xsl:text>
+ </li>
+ </xsl:for-each>
+ <br/>
+ <!-- errors -->
+ <xsl:apply-templates select="error"/>
+ <br/>
+ </ul>
+ </li>
+ </xsl:for-each>
+ </ul>
+ </div>
+ </xsl:for-each>
+ </body>
+ </html>
+ </xsl:template>
+ <xsl:template match="annotation">
+ <li>
+ <span class="keyword">annotation</span>
+ <code>
+ <xsl:value-of select="@name"/>
+ </code>
+ <xsl:text> = </xsl:text>
+ <code>
+ <xsl:value-of select="@value"/>
+ </code>
+ </li>
+ </xsl:template>
+ <xsl:template match="doc">
+ <li>
+ <span class="line">
+ <xsl:for-each select="line">
+ <xsl:value-of select="."/>
+ <xsl:element name="br"/>
+ </xsl:for-each>
+ </span>
+ </li>
+ </xsl:template>
+ <xsl:template match="error">
+ <li>
+ <xsl:apply-templates select="doc"/>
+ <span class="keyword">error</span>
+ <xsl:text> </xsl:text>
+ <span class="error">
+ <code>
+ <xsl:value-of select="@name"/>
+ </code>
+ </span>
+ <xsl:element name="br"/>
+ <br/>
+ </li>
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/src/navigation/CMakeLists.txt b/src/navigation/CMakeLists.txt
index 5751e99..e39333b 100644
--- a/src/navigation/CMakeLists.txt
+++ b/src/navigation/CMakeLists.txt
@@ -55,10 +55,12 @@ set(API_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../api")
if(NOT ${YOCTO_CONFIG})
set(NAVIT_CMAKE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/navit/navit/cmake")
set(DBUS_GENERATED_INCLUDE_DIR_POSITIONING "${CMAKE_CURRENT_BINARY_DIR}/enhanced-position-service/dbus/api") # this one is for positioning
+ set(DBUS_GENERATED_INCLUDE_DIR_SPEECH "${CMAKE_CURRENT_BINARY_DIR}/dbus-include/speech-service") # this one is for speech
set(NAVIT_CONFIG_H_DIR "${CMAKE_CURRENT_BINARY_DIR}/navit/navit")
else()
set(NAVIT_CMAKE_DIR "${STAGING_LIBDIR}/navit/cmake")
set(DBUS_GENERATED_INCLUDE_DIR_POSITIONING "${STAGING_INCDIR}/positioning") # this one is for positioning
+ set(DBUS_GENERATED_INCLUDE_DIR_SPEECH "${STAGING_INCDIR}/speechservice") # this one is for speech
set(NAVIT_CONFIG_H_DIR "${STAGING_DATADIR}")
endif()
@@ -105,6 +107,8 @@ add_subdirectory(${API_DIR}/map-viewer "${DBUS_GENERATED_INCLUDE_DIR}/map-viewer
add_subdirectory(${API_DIR}/poi-service "${DBUS_GENERATED_INCLUDE_DIR}/poi-service")
+add_subdirectory(${API_DIR}/speech-service "${DBUS_GENERATED_INCLUDE_DIR}/speech-service")
+
include(${NAVIT_CMAKE_DIR}/navit_macros.cmake)
add_subdirectory(navigation-core)
@@ -113,5 +117,3 @@ add_subdirectory(map-viewer)
add_subdirectory(poi-cam)
-
-
diff --git a/src/navigation/navigation-core/CMakeLists.txt b/src/navigation/navigation-core/CMakeLists.txt
index f7119a4..9990edb 100644
--- a/src/navigation/navigation-core/CMakeLists.txt
+++ b/src/navigation/navigation-core/CMakeLists.txt
@@ -87,4 +87,5 @@ add_subdirectory(session-plugin)
add_subdirectory(enhancedposition-plugin)
+add_subdirectory(speech-plugin)
diff --git a/src/navigation/navigation-core/navit_genivi_navigationcore.xsl b/src/navigation/navigation-core/navit_genivi_navigationcore.xsl
index c736e6b..45ddba3 100644
--- a/src/navigation/navigation-core/navit_genivi_navigationcore.xsl
+++ b/src/navigation/navigation-core/navit_genivi_navigationcore.xsl
@@ -37,6 +37,8 @@
<xsl:text>&#x0A; </xsl:text>
<plugin path="../../../navigation-core/enhancedposition-plugin/.libs/libgenivi_positioning_enhancedposition.so" ondemand="no"/>
<xsl:text>&#x0A; </xsl:text>
+ <plugin path="../../../navigation-core/speech-plugin/.libs/libgenivi_speechservice_speechoutput.so" ondemand="no"/>
+ <xsl:text>&#x0A; </xsl:text>
<plugin path="../../../poi-cam/.libs/libgenivi_poiservice_cam_navit.so" ondemand="no"/>
</xsl:template>
<xsl:template match="/config/plugins/plugin">
diff --git a/src/navigation/navigation-core/speech-plugin/.gitignore b/src/navigation/navigation-core/speech-plugin/.gitignore
new file mode 100644
index 0000000..96372cd
--- /dev/null
+++ b/src/navigation/navigation-core/speech-plugin/.gitignore
@@ -0,0 +1,9 @@
+CMakeCache.txt
+CMakeFiles/
+cmake_install.cmake
+compat_includes
+compat_libs
+*_adaptor.h
+Makefile
+.svn
+.libs
diff --git a/src/navigation/navigation-core/speech-plugin/CMakeLists.txt b/src/navigation/navigation-core/speech-plugin/CMakeLists.txt
new file mode 100644
index 0000000..6020aaa
--- /dev/null
+++ b/src/navigation/navigation-core/speech-plugin/CMakeLists.txt
@@ -0,0 +1,39 @@
+###########################################################################
+# @licence app begin@
+# SPDX-License-Identifier: MPL-2.0
+#
+# \copyright Copyright (C) 2013-2014, PCA Peugeot Citroen
+#
+# \file CMakeLists.txt
+#
+# \brief This file is part of the build system.
+#
+# \author Philippe Colliot <philippe.colliot@mpsa.com>
+#
+# \version 1.0
+#
+# This Source Code Form is subject to the terms of the
+# Mozilla Public License (MPL), v. 2.0.
+# If a copy of the MPL was not distributed with this file,
+# You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# For further information see http://www.genivi.org/.
+#
+# List of changes:
+#
+# <date>, <name>, <description of change>
+#
+# @licence end@
+###########################################################################
+project(navigation)
+cmake_minimum_required(VERSION 2.8)
+
+message(STATUS "speech-output")
+
+include_directories(${DBUS_GENERATED_INCLUDE_DIR_SPEECH})
+
+set(genivi_navigationcore_speechoutput_LIBS ${PLUGIN_LDFLAGS})
+set(genivi_navigationcore_speechoutput_LIBRARY_DIRS ${PLUGIN_LIBRARIES})
+
+module_add_library(genivi_navigationcore_speechoutput genivi_navigationcore_speechoutput.cxx ${DBUS_GENERATED_INCLUDE_DIR_SPEECH}/genivi-speechservice-speechoutput_proxy.h ${DBUS_GENERATED_INCLUDE_DIR_SPEECH}/genivi-speechservice-constants.h)
+
diff --git a/src/navigation/navigation-core/speech-plugin/genivi_navigationcore_speechoutput.cxx b/src/navigation/navigation-core/speech-plugin/genivi_navigationcore_speechoutput.cxx
new file mode 100644
index 0000000..eb77439
--- /dev/null
+++ b/src/navigation/navigation-core/speech-plugin/genivi_navigationcore_speechoutput.cxx
@@ -0,0 +1,160 @@
+/**
+* @licence app begin@
+* SPDX-License-Identifier: MPL-2.0
+*
+* \copyright Copyright (C) 2013-2014, PCA Peugeot Citroen
+*
+* \file genivi_navigationcore_speechoutput.cxx
+*
+* \brief This file is part of the Navit POC.
+*
+* \author Philippe Colliot <philippe.colliot@mpsa.com>
+*
+* \version 1.0
+*
+* This Source Code Form is subject to the terms of the
+* Mozilla Public License (MPL), v. 2.0.
+* If a copy of the MPL was not distributed with this file,
+* You can obtain one at http://mozilla.org/MPL/2.0/.
+*
+* For further information see http://www.genivi.org/.
+*
+* List of changes:
+*
+* <date>, <name>, <description of change>
+*
+* @licence end@
+*/
+#include <dbus-c++/glib-integration.h>
+#include "genivi-speechservice-constants.h"
+#include "genivi-speechservice-speechoutput_proxy.h"
+#include "config.h"
+#define USE_PLUGINS 1
+#include "debug.h"
+#include "plugin.h"
+#include "item.h"
+#include "config_.h"
+#include "navit.h"
+#include "search.h"
+#include "callback.h"
+#include "event.h"
+#include "coord.h"
+#include "transform.h"
+#include "speech.h"
+
+#if (!DEBUG_ENABLED)
+#undef dbg
+#define dbg(level,...) ;
+#endif
+
+DBus::Glib::BusDispatcher dispatcher;
+DBus::Connection *conn;
+
+struct speech_priv {
+ class SpeechOutput *speech_output;
+ struct callback_list *cbl;
+ struct callback *cb;
+ GList *free_buffers;
+ GList *phrases;
+};
+
+class SpeechOutput
+: public org::genivi::hmi::speechservice::SpeechOutput_proxy,
+ public DBus::ObjectProxy
+{
+ public:
+ struct speech_priv *m_priv;
+ SpeechOutput(DBus::Connection &connection, struct vehicle_priv *priv)
+ : DBus::ObjectProxy(connection,
+ "/org/genivi/hmi/speechservice/SpeechOutput",
+ "org.genivi.hmi.speechservice.SpeechOutput")
+ {
+ m_priv=priv;
+ }
+
+ void notifyConnectionStatus(const uint32_t& connectionStatus)
+ {
+
+ }
+
+ void notifyMarkerReached(const uint32_t& chunkID, const std::string& marker)
+ {
+
+ }
+
+ void notifyQueueStatus(const uint32_t& queueStatus)
+ {
+
+ }
+
+ void notifyTTSStatus(const uint32_t& ttsStatus)
+ {
+
+ }
+};
+
+static void
+free_list(gpointer pointer, gpointer list )
+{
+ if ( list )
+ {
+ struct speech_priv *sp_priv = (struct speech_priv *)list;
+ }
+ g_free(pointer);
+}
+
+static void
+genivi_speechoutput_destroy(struct speech_priv *sp_priv)
+{
+ dbg(lvl_debug,"enter\n");
+ DBus::default_dispatcher = &dispatcher;
+ delete(sp_priv->speech_output);
+ callback_destroy(sp_priv->cb);
+ g_free(priv);
+}
+
+static int
+genivi_speechoutput_say(struct speech_priv *sp_priv, const char *text) {
+ char *phrase = g_strdup(text);
+ dbg(lvl_debug, "Speak: '%s'\n", text);
+
+ return 0;
+}
+
+static struct speech_methods genivi_speechoutput_meth = {
+ genivi_speechoutput_destroy,
+ genivi_speechoutput_say,
+};
+
+static void
+genivi_speechoutput_callback(struct speech_priv *sp_priv)
+{
+}
+
+static struct speech_priv *
+genivi_speechoutput_new(struct speech_methods *meth, genivi_speech, struct callback_list *cb_list) {
+ struct speech_priv *ret = NULL;
+
+ dbg(lvl_debug, "enter\n");
+
+ *meth=genivi_speechoutput_meth;
+
+ ret=g_new(struct speech_priv,1);
+ ret->speech_output = new SpeechOutput(*conn,ret);
+ ret->cb=callback_new_1(callback_cast(genivi_speechoutput_callback), ret);
+ ret->cbl=cb_list;
+
+ return ret;
+}
+
+void plugin_init(void)
+{
+ event_request_system("glib","genivi_speechservice_speechoutput");
+ dispatcher.attach(NULL);
+ DBus::default_dispatcher = &dispatcher;
+ conn = new DBus::Connection(DBus::Connection::SessionBus());
+ conn->setup(&dispatcher);
+ dbg(lvl_debug,"enter\n");
+
+ plugin_register_speech_type("genivi_speech", genivi_speechoutput_new);
+}