$(adaptor_devel_api_dir)/adaptor-framework/style-monitor.cpp \
$(adaptor_devel_api_dir)/adaptor-framework/tilt-sensor.cpp \
$(adaptor_devel_api_dir)/adaptor-framework/lifecycle-controller.cpp \
- $(adaptor_devel_api_dir)/adaptor-framework/tts-player.cpp \
$(adaptor_devel_api_dir)/adaptor-framework/virtual-keyboard.cpp
$(adaptor_devel_api_dir)/adaptor-framework/sound-player.h \
$(adaptor_devel_api_dir)/adaptor-framework/style-monitor.h \
$(adaptor_devel_api_dir)/adaptor-framework/tilt-sensor.h \
- $(adaptor_devel_api_dir)/adaptor-framework/tts-player.h \
$(adaptor_devel_api_dir)/adaptor-framework/virtual-keyboard.h \
$(adaptor_devel_api_dir)/adaptor-framework/physical-keyboard.h
TtsPlayer();
/**
- * @brief Gets the singleton of the TtsPlayer for each mode.
+ * @brief Gets the singleton of the TtsPlayer for the given mode.
*
- * Internally, each tts player handles (singleton instance) are managed for each mode.
* @param mode the mode of tts-player
- * @return A handle of the Ttsplayer for given mode.
+ * @return A handle of the Ttsplayer for the given mode.
*/
static TtsPlayer Get(Dali::TtsPlayer::Mode mode = Dali::TtsPlayer::DEFAULT);
~TtsPlayer();
/**
+ * @brief This copy constructor is required for (smart) pointer semantics.
+ *
+ * @param [in] handle A reference to the copied handle
+ */
+ TtsPlayer(const TtsPlayer& handle);
+
+ /**
+ * @brief This assignment operator is required for (smart) pointer semantics.
+ *
+ * @param [in] rhs A reference to the copied handle
+ * @return A reference to this
+ */
+ TtsPlayer& operator=(const TtsPlayer& rhs);
+
+ /**
* @brief Start playing the audio data synthesized from the specified text.
*
* @pre The TtsPlayer needs to be initialized.
$(adaptor_public_api_dir)/adaptor-framework/key.cpp \
$(adaptor_public_api_dir)/adaptor-framework/window.cpp \
$(adaptor_public_api_dir)/adaptor-framework/timer.cpp \
+ $(adaptor_public_api_dir)/adaptor-framework/tts-player.cpp \
$(adaptor_public_api_dir)/adaptor-framework/pixmap-image.cpp \
$(adaptor_public_api_dir)/dali-adaptor-version.cpp
$(adaptor_public_api_dir)/adaptor-framework/key.h \
$(adaptor_public_api_dir)/adaptor-framework/style-change.h \
$(adaptor_public_api_dir)/adaptor-framework/timer.h \
+ $(adaptor_public_api_dir)/adaptor-framework/tts-player.h \
$(adaptor_public_api_dir)/adaptor-framework/pixmap-image.h \
$(adaptor_public_api_dir)/adaptor-framework/window.h
--- /dev/null
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <dali/dali.h>
+#include <dali-test-suite-utils.h>
+
+using namespace Dali;
+
+void utc_dali_ttsplayer_startup(void)
+{
+ test_return_value = TET_UNDEF;
+}
+
+void utc_dali_ttsplayer_cleanup(void)
+{
+ test_return_value = TET_PASS;
+}
+
+namespace
+{
+
+} // unnamed namespace
+
+int UtcDaliTtsPlayerConstructorP(void)
+{
+ Dali::TtsPlayer player;
+ DALI_TEST_CHECK( !player );
+ END_TEST;
+}
+
+int UtcDaliTtsPlayerCopyConstructorP(void)
+{
+ Dali::TtsPlayer player;
+ Dali::TtsPlayer copy( player );
+ DALI_TEST_CHECK( copy == player );
+
+ END_TEST;
+}
+
+int UtcDaliTtsPlayerAssignmentOperatorP(void)
+{
+ Dali::TtsPlayer player;
+ Dali::TtsPlayer copy;
+ DALI_TEST_CHECK( ! copy );
+ copy = player;
+ DALI_TEST_CHECK( copy == player );
+
+ END_TEST;
+}
+
+int UtcDaliTtsPlayerDestructorP(void)
+{
+ Dali::TtsPlayer* player = new Dali::TtsPlayer();
+ delete player;
+
+ DALI_TEST_CHECK( true );
+ END_TEST;
+}
+
+int UtcDaliTtsPlayerConstructorFromInternalPointerN(void)
+{
+ Internal::Adaptor::TtsPlayer* internalPlayer = NULL;
+ Dali::TtsPlayer player(internalPlayer);
+ DALI_TEST_CHECK( !player ); // Should not reach here!
+
+ END_TEST;
+}
+
+int UtcDaliTtsPlayerGetP(void)
+{
+ Dali::TtsPlayer player = Dali::TtsPlayer::Get();
+ DALI_TEST_CHECK( !player );
+ END_TEST;
+}
+
+int UtcDaliTtsPlayerPlayN(void)
+{
+ Dali::TtsPlayer player = Dali::TtsPlayer::Get();
+
+ try
+ {
+ player.Play("text");
+ DALI_TEST_CHECK( false ); // Should not reach here!
+ }
+ catch( ... )
+ {
+ DALI_TEST_CHECK( true );
+ }
+
+ END_TEST;
+}
+
+int UtcDaliTtsPlayerStopN(void)
+{
+ Dali::TtsPlayer player = Dali::TtsPlayer::Get();
+
+ try
+ {
+ player.Stop();
+ DALI_TEST_CHECK( false ); // Should not reach here!
+ }
+ catch( ... )
+ {
+ DALI_TEST_CHECK( true );
+ }
+
+ END_TEST;
+}
+
+int UtcDaliTtsPlayerPauseN(void)
+{
+ Dali::TtsPlayer player = Dali::TtsPlayer::Get();
+
+ try
+ {
+ player.Pause();
+ DALI_TEST_CHECK( false ); // Should not reach here!
+ }
+ catch( ... )
+ {
+ DALI_TEST_CHECK( true );
+ }
+
+ END_TEST;
+}
+
+int UtcDaliTtsPlayerResumeN(void)
+{
+ Dali::TtsPlayer player = Dali::TtsPlayer::Get();
+
+ try
+ {
+ player.Resume();
+ DALI_TEST_CHECK( false ); // Should not reach here!
+ }
+ catch( ... )
+ {
+ DALI_TEST_CHECK( true );
+ }
+
+ END_TEST;
+}
+