2 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include <dali/dali.h>
25 TtsPlayer::TtsPlayer()
34 class TtsPlayer : public BaseObject
41 void Play(const std::string& text)
57 Dali::TtsPlayer::State GetState()
59 return Dali::TtsPlayer::READY;
62 Dali::TtsPlayer::StateChangedSignalType& StateChangedSignal()
64 return mStateChangedSignal;
67 Dali::TtsPlayer::StateChangedSignalType mStateChangedSignal;
71 inline TtsPlayer& GetImplementation(Dali::TtsPlayer& player)
73 DALI_ASSERT_ALWAYS( player && "TtsPlayer handle is empty" );
74 BaseObject& handle = player.GetBaseObject();
75 return static_cast<Internal::Adaptor::TtsPlayer&>(handle);
78 inline const TtsPlayer& GetImplementation(const Dali::TtsPlayer& player)
80 DALI_ASSERT_ALWAYS( player && "TtsPlayer handle is empty" );
81 const BaseObject& handle = player.GetBaseObject();
82 return static_cast<const Internal::Adaptor::TtsPlayer&>(handle);
88 static IntrusivePtr<Internal::Adaptor::TtsPlayer> ttsSingleton = NULL;
90 TtsPlayer TtsPlayer::Get(Dali::TtsPlayer::Mode mode)
94 ttsSingleton.Reset( new Dali::Internal::Adaptor::TtsPlayer() );
96 TtsPlayer playerHandle(ttsSingleton.Get());
101 TtsPlayer::~TtsPlayer()
105 TtsPlayer::TtsPlayer(const TtsPlayer& handle)
110 TtsPlayer& TtsPlayer::operator=(const TtsPlayer& rhs)
112 BaseHandle::operator=(rhs);
116 void TtsPlayer::Play(const std::string& text)
118 // GetImplementation(*this).Play(text);
121 void TtsPlayer::Stop()
123 // GetImplementation(*this).Stop();
126 void TtsPlayer::Pause()
128 // GetImplementation(*this).Pause();
131 void TtsPlayer::Resume()
133 // GetImplementation(*this).Resume();
136 TtsPlayer::State TtsPlayer::GetState()
138 return READY; // GetImplementation(*this).GetState();
141 TtsPlayer::StateChangedSignalType& TtsPlayer::StateChangedSignal()
143 return Internal::Adaptor::GetImplementation(*this).StateChangedSignal();
146 TtsPlayer::TtsPlayer( Internal::Adaptor::TtsPlayer* player )
147 : BaseHandle( player )