193ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)/*
293ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * Copyright (C) 2013 Google Inc. All rights reserved.
393ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) *
493ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * Redistribution and use in source and binary forms, with or without
593ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * modification, are permitted provided that the following conditions
693ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * are met:
793ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) *  * Redistributions of source code must retain the above copyright
893ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) *    notice, this list of conditions and the following disclaimer.
993ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) *  * Redistributions in binary form must reproduce the above copyright
1093ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) *    notice, this list of conditions and the following disclaimer in the
1193ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) *    documentation and/or other materials provided with the distribution.
1293ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) *
1393ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
1493ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1593ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
1693ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
1793ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
1893ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
1993ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
2093ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
2193ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2293ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2393ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2493ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) */
2593ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
2693ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)#ifndef WebSpeechSynthesisVoice_h
2793ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)#define WebSpeechSynthesisVoice_h
2893ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
2993ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)#include "WebCommon.h"
3093ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)#include "WebPrivatePtr.h"
3193ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)#include "WebString.h"
3293ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
33c1847b1379d12d0e05df27436bf19a9b1bf12deaTorne (Richard Coles)namespace blink {
3493ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
35e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles)class PlatformSpeechSynthesisVoice;
3693ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
3793ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)class WebSpeechSynthesisVoice {
3893ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)public:
39a854de003a23bf3c7f95ec0f8154ada64092ff5cTorne (Richard Coles)    BLINK_PLATFORM_EXPORT WebSpeechSynthesisVoice();
4093ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    WebSpeechSynthesisVoice(const WebSpeechSynthesisVoice& other) { assign(other); }
4193ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    ~WebSpeechSynthesisVoice() { reset(); }
4293ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
4393ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    WebSpeechSynthesisVoice& operator=(const WebSpeechSynthesisVoice& other)
4493ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    {
4593ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)        assign(other);
4693ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)        return *this;
4793ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    }
4893ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
49a854de003a23bf3c7f95ec0f8154ada64092ff5cTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void assign(const WebSpeechSynthesisVoice&);
50a854de003a23bf3c7f95ec0f8154ada64092ff5cTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void reset();
5193ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
52a854de003a23bf3c7f95ec0f8154ada64092ff5cTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void setVoiceURI(const WebString&);
53a854de003a23bf3c7f95ec0f8154ada64092ff5cTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void setName(const WebString&);
54a854de003a23bf3c7f95ec0f8154ada64092ff5cTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void setLanguage(const WebString&);
55a854de003a23bf3c7f95ec0f8154ada64092ff5cTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void setIsLocalService(bool);
56a854de003a23bf3c7f95ec0f8154ada64092ff5cTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void setIsDefault(bool);
5793ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
58a854de003a23bf3c7f95ec0f8154ada64092ff5cTorne (Richard Coles)#if INSIDE_BLINK
59e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles)    BLINK_PLATFORM_EXPORT operator PlatformSpeechSynthesisVoice*() const;
6093ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)#endif
6193ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
6293ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)private:
63e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles)    WebPrivatePtr<PlatformSpeechSynthesisVoice> m_private;
6493ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)};
6593ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
6651b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles)} // namespace blink
6793ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
6893ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)#endif // WebSpeechSynthesisVoice_h
69