1 #ifndef DALI_INTERNAL_ACCESSIBILITY_COMMON_TTS_PLAYER_IMPL_H
2 #define DALI_INTERNAL_ACCESSIBILITY_COMMON_TTS_PLAYER_IMPL_H
5 * Copyright (c) 2017 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
22 #include <dali/integration-api/debug.h>
23 #include <dali/public-api/object/base-object.h>
26 #include <dali/public-api/adaptor-framework/tts-player.h>
38 * Text-to-speech player
40 class TtsPlayer : public Dali::BaseObject
46 * Create a TtsPlayer with the given mode.
47 * This should only be called once by the Adaptor class for each given mode.
48 * @param mode the mode of tts-player
49 * @return A newly created TtsPlayer.
51 static Dali::TtsPlayer New(Dali::TtsPlayer::Mode mode);
54 * @copydoc TtsPlayer::Play()
56 virtual void Play(const std::string& text);
59 * @copydoc TtsPlayer::Stop()
64 * @copydoc TtsPlayer::Pause()
69 * @copydoc TtsPlayer::Resume()
71 virtual void Resume();
74 * @copydoc TtsPlayer::GetState()
76 virtual Dali::TtsPlayer::State GetState();
79 * @copydoc TtsPlayer::StateChangedSignal()
81 virtual Dali::TtsPlayer::StateChangedSignalType& StateChangedSignal();
84 } // namespace Adaptor
86 } // namespace Internal
88 // Helpers for public-api forwarding methods
90 inline Internal::Adaptor::TtsPlayer& GetImplementation(Dali::TtsPlayer& player)
92 DALI_ASSERT_ALWAYS( player && "TtsPlayer handle is empty" );
94 BaseObject& handle = player.GetBaseObject();
96 return static_cast<Internal::Adaptor::TtsPlayer&>(handle);
99 inline const Internal::Adaptor::TtsPlayer& GetImplementation(const Dali::TtsPlayer& player)
101 DALI_ASSERT_ALWAYS( player && "TtsPlayer handle is empty" );
103 const BaseObject& handle = player.GetBaseObject();
105 return static_cast<const Internal::Adaptor::TtsPlayer&>(handle);
110 #endif // DALI_INTERNAL_ACCESSIBILITY_COMMON_TTS_PLAYER_IMPL_H