X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Fdali-toolkit-test-utils%2Ftest-platform-abstraction.h;h=bb62c262a3db9048439189584d8eb1ef371231c3;hp=f31561ecdd1499111daa366292c13a8a0ba17728;hb=268f651469300b3950b3f314fa33803b6c24273e;hpb=e40f95b837ab8e9f1ce9094ebf4e6ac781e7bf6f diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-platform-abstraction.h b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-platform-abstraction.h index f31561e..bb62c26 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-platform-abstraction.h +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-platform-abstraction.h @@ -1,8 +1,8 @@ -#ifndef __DALI_TEST_PLATFORM_ABSTRACTION_H__ -#define __DALI_TEST_PLATFORM_ABSTRACTION_H__ +#ifndef DALI_TEST_PLATFORM_ABSTRACTION_H +#define DALI_TEST_PLATFORM_ABSTRACTION_H /* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 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. @@ -72,23 +72,32 @@ public: /** * @copydoc PlatformAbstraction::LoadResourceSynchronously() */ - virtual Integration::ResourcePointer LoadImageSynchronously( const Integration::BitmapResourceType& resourceType, const std::string& resourcePath ); + Integration::ResourcePointer LoadImageSynchronously( const Integration::BitmapResourceType& resourceType, const std::string& resourcePath ) override; /** * @copydoc PlatformAbstraction::DecodeBuffer() */ - virtual Integration::BitmapPtr DecodeBuffer( const Dali::Integration::BitmapResourceType& resourceType, uint8_t * buffer, size_t size ); + Integration::BitmapPtr DecodeBuffer( const Dali::Integration::BitmapResourceType& resourceType, uint8_t * buffer, size_t size ) override; /** * @copydoc PlatformAbstraction::LoadShaderBinaryFile() */ - virtual bool LoadShaderBinaryFile( const std::string& filename, Dali::Vector< unsigned char >& buffer ) const; + bool LoadShaderBinaryFile( const std::string& filename, Dali::Vector< unsigned char >& buffer ) const override; /** * @copydoc PlatformAbstraction::SaveShaderBinaryFile() */ virtual bool SaveShaderBinaryFile( const std::string& filename, const unsigned char * buffer, unsigned int numBytes ) const { return true; } + /** + * @copydoc PlatformAbstraction::StartTimer() + */ + uint32_t StartTimer( uint32_t milliseconds, CallbackBase* callback ) override; + + /* + * @copydoc PlatformAbstraction::CancelTimer() + */ + void CancelTimer ( uint32_t timerId ) override; public: // TEST FUNCTIONS @@ -129,7 +138,7 @@ public: // TEST FUNCTIONS * @brief Sets the value returned by GetClosestImageSize. * @param[in] size The size that should be returned. */ - void SetClosestImageSize(const Vector2& size); + void SetClosestImageSize( const Vector2& size ); /** * @brief Sets the result return by LoadFile. @@ -156,6 +165,11 @@ public: // TEST FUNCTIONS */ void SetDecodedBitmap( Integration::BitmapPtr bitmap ); + /** + * @brief Triggers the previously stored callback function + */ + void TriggerTimer(); + private: TestPlatformAbstraction( const TestPlatformAbstraction& ); ///< Undefined @@ -177,15 +191,18 @@ private: mutable TraceCallStack mTrace; bool mIsLoadingResult; - Vector2 mClosestSize; + ImageDimensions mClosestSize; LoadFileResult mLoadFileResult; bool mSaveFileResult; Integration::ResourcePointer mSynchronouslyLoadedResource; Integration::BitmapPtr mDecodedBitmap; + + uint32_t mTimerId; + CallbackBase* mCallbackFunction; }; } // Dali -#endif /* __DALI_TEST_PLATFORM_ABSTRACTION_H__ */ +#endif /* DALI_TEST_PLATFORM_ABSTRACTION_H */