Return Animation information
[platform/core/uifw/dali-core.git] / dali / internal / event / animation / animation-playlist.cpp
index 55c9b91..c39385f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -127,6 +127,21 @@ void AnimationPlaylist::NotifyProgressReached( const SceneGraph::Animation* scen
   }
 }
 
+uint32_t AnimationPlaylist::GetAnimationCount()
+{
+  return mAnimations.Size();
+}
+
+Dali::Animation AnimationPlaylist::GetAnimationAt( uint32_t index )
+{
+  if( index >= mAnimations.Size() )
+  {
+    DALI_LOG_ERROR( "Animation index is out of bounds.\n" );
+    return Dali::Animation();
+  }
+  return Dali::Animation( mAnimations[index] );
+}
+
 } // namespace Internal
 
 } // namespace Dali