| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <iostream> | 5 #include <iostream> |
| 6 #include <base/basictypes.h> | 6 #include <base/basictypes.h> |
| 7 #include <base/command_line.h> | 7 #include <base/command_line.h> |
| 8 #include <chromeos/dbus/dbus.h> | 8 #include <chromeos/dbus/dbus.h> |
| 9 #include <chromeos/dbus/service_constants.h> | 9 #include <chromeos/dbus/service_constants.h> |
| 10 #include <chromeos/glib/object.h> | 10 #include <chromeos/glib/object.h> |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 gboolean SpeechSynthesizerService::AddProperties(gchar *properties) { | 115 gboolean SpeechSynthesizerService::AddProperties(gchar *properties) { |
| 116 if (properties == NULL) { | 116 if (properties == NULL) { |
| 117 return false; | 117 return false; |
| 118 } | 118 } |
| 119 string props(properties); | 119 string props(properties); |
| 120 if (props.compare("") == 0) { | 120 if (props.compare("") == 0) { |
| 121 return true; | 121 return true; |
| 122 } | 122 } |
| 123 string token = ""; | 123 string token = ""; |
| 124 while(1) { | 124 while(1) { |
| 125 int sep = props.find(";"); | 125 unsigned int sep = props.find(";"); |
| 126 if (sep == string::npos) { | 126 if (sep == string::npos) { |
| 127 token = props; | 127 token = props; |
| 128 } else { | 128 } else { |
| 129 token = props.substr(0, sep); | 129 token = props.substr(0, sep); |
| 130 props = props.substr(sep + 1); | 130 props = props.substr(sep + 1); |
| 131 } | 131 } |
| 132 if (token.empty() || token.compare("") == 0) { | 132 if (token.empty() || token.compare("") == 0) { |
| 133 break; | 133 break; |
| 134 } | 134 } |
| 135 int eq = token.find("="); | 135 int eq = token.find("="); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 | 194 |
| 195 gboolean SpeechSynthesizerService::IsSpeaking( | 195 gboolean SpeechSynthesizerService::IsSpeaking( |
| 196 gboolean* OUT_isSpeaking_requested, | 196 gboolean* OUT_isSpeaking_requested, |
| 197 GError **error) { | 197 GError **error) { |
| 198 *OUT_isSpeaking_requested = (ttsService->GetStatus() == TTS_BUSY); | 198 *OUT_isSpeaking_requested = (ttsService->GetStatus() == TTS_BUSY); |
| 199 return true; | 199 return true; |
| 200 } | 200 } |
| 201 | 201 |
| 202 } // namespace speech_synthesis | 202 } // namespace speech_synthesis |
| 203 | 203 |
| OLD | NEW |