Merge "Set proper locale to harfbuzz" into devel/master
[platform/core/uifw/dali-adaptor.git] / adaptors / public-api / adaptor-framework / tts-player.cpp
1 /*
2  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  *
16  */
17
18 // CLASS HEADER
19 #include <tts-player.h>
20
21 // INTERNAL INCLUDES
22 #include <tts-player-impl.h>
23 #include <adaptor-impl.h>
24
25 namespace Dali
26 {
27
28 TtsPlayer::TtsPlayer()
29 {
30 }
31
32 TtsPlayer TtsPlayer::Get(Dali::TtsPlayer::Mode mode)
33 {
34   TtsPlayer ttsPlayer;
35
36   if ( Adaptor::IsAvailable() )
37   {
38     ttsPlayer = Internal::Adaptor::Adaptor::GetImplementation( Adaptor::Get() ).GetTtsPlayer(mode);
39   }
40
41   return ttsPlayer;
42 }
43
44 TtsPlayer::~TtsPlayer()
45 {
46 }
47
48 TtsPlayer::TtsPlayer(const TtsPlayer& handle)
49 : BaseHandle(handle)
50 {
51 }
52
53 TtsPlayer& TtsPlayer::operator=(const TtsPlayer& rhs)
54 {
55   BaseHandle::operator=(rhs);
56   return *this;
57 }
58
59 void TtsPlayer::Play(const std::string& text)
60 {
61   GetImplementation(*this).Play(text);
62 }
63
64 void TtsPlayer::Stop()
65 {
66   GetImplementation(*this).Stop();
67 }
68
69 void TtsPlayer::Pause()
70 {
71   GetImplementation(*this).Pause();
72 }
73
74 void TtsPlayer::Resume()
75 {
76   GetImplementation(*this).Resume();
77 }
78
79 TtsPlayer::State TtsPlayer::GetState()
80 {
81   return GetImplementation(*this).GetState();
82 }
83
84 TtsPlayer::StateChangedSignalType& TtsPlayer::StateChangedSignal()
85 {
86   return GetImplementation(*this).StateChangedSignal();
87 }
88
89 TtsPlayer::TtsPlayer( Internal::Adaptor::TtsPlayer* player )
90 : BaseHandle( player )
91 {
92 }
93
94 } // namespace Dali