1926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles)/* 2926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) * Copyright (C) 2013 Apple Computer, Inc. All rights reserved. 3926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) * 4926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) * Redistribution and use in source and binary forms, with or without 5926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) * modification, are permitted provided that the following conditions 6926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) * are met: 7926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) * 1. Redistributions of source code must retain the above copyright 8926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) * notice, this list of conditions and the following disclaimer. 9926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) * 2. Redistributions in binary form must reproduce the above copyright 10926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) * notice, this list of conditions and the following disclaimer in the 11926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) * documentation and/or other materials provided with the distribution. 12926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) * 13926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY 14926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR 17926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 21926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) */ 25926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) 26926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles)#ifndef PlatformSpeechSynthesisVoice_h 27926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles)#define PlatformSpeechSynthesisVoice_h 28926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) 29a854de003a23bf3c7f95ec0f8154ada64092ff5cTorne (Richard Coles)#include "platform/PlatformExport.h" 305d92fedcae5e801a8b224de090094f2d9df0b54aTorne (Richard Coles)#include "platform/heap/Handle.h" 317757ec2eadfa2dd8ac2aeed0a4399e9b07ec38cbBen Murdoch#include "wtf/text/WTFString.h" 32926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) 33c1847b1379d12d0e05df27436bf19a9b1bf12deaTorne (Richard Coles)namespace blink { 34926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) 355d92fedcae5e801a8b224de090094f2d9df0b54aTorne (Richard Coles)class PLATFORM_EXPORT PlatformSpeechSynthesisVoice FINAL : public GarbageCollectedFinalized<PlatformSpeechSynthesisVoice> { 36926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles)public: 375d92fedcae5e801a8b224de090094f2d9df0b54aTorne (Richard Coles) static PlatformSpeechSynthesisVoice* create(const String& voiceURI, const String& name, const String& lang, bool localService, bool isDefault); 385d92fedcae5e801a8b224de090094f2d9df0b54aTorne (Richard Coles) static PlatformSpeechSynthesisVoice* create(); 39926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) 40926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) const String& voiceURI() const { return m_voiceURI; } 41926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) void setVoiceURI(const String& voiceURI) { m_voiceURI = voiceURI; } 42926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) 43926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) const String& name() const { return m_name; } 44926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) void setName(const String& name) { m_name = name; } 45926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) 46926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) const String& lang() const { return m_lang; } 47926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) void setLang(const String& lang) { m_lang = lang; } 48926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) 49926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) bool localService() const { return m_localService; } 50926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) void setLocalService(bool localService) { m_localService = localService; } 51926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) 52926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) bool isDefault() const { return m_default; } 53926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) void setIsDefault(bool isDefault) { m_default = isDefault; } 54926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) 555d92fedcae5e801a8b224de090094f2d9df0b54aTorne (Richard Coles) void trace(Visitor*) { } 565d92fedcae5e801a8b224de090094f2d9df0b54aTorne (Richard Coles) 57926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles)private: 58926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) PlatformSpeechSynthesisVoice(const String& voiceURI, const String& name, const String& lang, bool localService, bool isDefault); 59926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) PlatformSpeechSynthesisVoice(); 60926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) 61926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) String m_voiceURI; 62926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) String m_name; 63926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) String m_lang; 64926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) bool m_localService; 65926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) bool m_default; 66926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles)}; 67926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) 68c1847b1379d12d0e05df27436bf19a9b1bf12deaTorne (Richard Coles)} // namespace blink 69926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles) 70926b001d589ce2f10facb93dd4b87578ea35a855Torne (Richard Coles)#endif // PlatformSpeechSynthesisVoice_h 71