Move Ubuntu tts player to generic.
[platform/core/uifw/dali-adaptor.git] / dali / internal / accessibility / generic / tts-player-impl-generic.h
1 #ifndef DALI_INTERNAL_ACCESSIBILITY_GENERIC_TTS_PLAYER_IMPL_GENERIC_H
2 #define DALI_INTERNAL_ACCESSIBILITY_GENERIC_TTS_PLAYER_IMPL_GENERIC_H
3
4 /*
5  * Copyright (c) 2019 Samsung Electronics Co., Ltd.
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22
23 #include <string>
24 #include <memory>
25
26 #include <dali/integration-api/debug.h>
27 #include <dali/public-api/object/base-object.h>
28
29 #include <dali/internal/accessibility/common/tts-player-impl.h>
30
31 // INTERNAL INCLUDES
32
33 namespace Dali
34 {
35
36 namespace Internal
37 {
38
39 namespace Adaptor
40 {
41
42 /**
43  * Text-to-speech player
44  */
45 class TtsPlayerGeneric : public Dali::Internal::Adaptor::TtsPlayer
46 {
47
48 public:
49
50   /**
51    * Create a TtsPlayer with the given mode.
52    * This should only be called once by the Adaptor class for each given mode.
53    * @param mode the mode of tts-player
54    * @return A newly created TtsPlayer.
55    */
56   static std::unique_ptr<TtsPlayerGeneric> New(Dali::TtsPlayer::Mode mode);
57
58   /**
59    * @copydoc TtsPlayer::Play()
60    */
61   void Play(const std::string& text) override;
62
63   /**
64    * @copydoc TtsPlayer::Stop()
65    */
66   void Stop() override;
67
68   /**
69    * @copydoc TtsPlayer::Pause()
70    */
71   void Pause() override;
72
73   /**
74    * @copydoc TtsPlayer::Resume()
75    */
76   void Resume() override;
77
78   /**
79    * @copydoc TtsPlayer::GetState()
80    */
81   Dali::TtsPlayer::State GetState() override;
82
83   /**
84    * @copydoc TtsPlayer::StateChangedSignal()
85    */
86   Dali::TtsPlayer::StateChangedSignalType& StateChangedSignal() override;
87
88   /**
89    * Private Constructor; see also TtsPlayer::New()
90    * @param mode the mode of tts-player
91    */
92   TtsPlayerGeneric(Dali::TtsPlayer::Mode mode);
93
94   /**
95    * Destructor
96    */
97   virtual ~TtsPlayerGeneric();
98
99 private:
100
101   Dali::TtsPlayer::StateChangedSignalType mStateChangedSignal; ///< Signal emitted when the TTS state changes (non-functional, for interface compatibility).
102
103 #if defined(DEBUG_ENABLED)
104 public:
105   static Debug::Filter* gLogFilter;
106 #endif
107 };
108
109 } // namespace Adaptor
110
111 } // namespace Internal
112
113 } // namespace Dali
114
115 #endif // DALI_INTERNAL_ACCESSIBILITY_GENERIC_TTS_PLAYER_IMPL_GENERIC_H