-#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) 2017 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.
// INTERNAL INCLUDES
#include <dali/integration-api/platform-abstraction.h>
+#include <dali/public-api/math/vector2.h>
#include "test-trace-call-stack.h"
/**
* Concrete implementation of the platform abstraction class.
*/
-class DALI_IMPORT_API TestPlatformAbstraction : public Dali::Integration::PlatformAbstraction
+class DALI_CORE_API TestPlatformAbstraction : public Dali::Integration::PlatformAbstraction
{
public:
/**
* @copydoc PlatformAbstraction::LoadResourceSynchronously()
*/
- virtual Integration::ResourcePointer LoadResourceSynchronously( const Integration::ResourceType& resourceType, const std::string& resourcePath );
+ virtual Integration::ResourcePointer LoadImageSynchronously( const Integration::BitmapResourceType& resourceType, const std::string& resourcePath );
/**
* @copydoc PlatformAbstraction::DecodeBuffer()
*/
- virtual Integration::BitmapPtr DecodeBuffer( const Dali::Integration::ResourceType& resourceType, uint8_t * buffer, size_t size );
+ virtual Integration::BitmapPtr DecodeBuffer( const Dali::Integration::BitmapResourceType& resourceType, uint8_t * buffer, size_t size );
/**
* @copydoc PlatformAbstraction::LoadShaderBinaryFile()
*/
virtual bool SaveShaderBinaryFile( const std::string& filename, const unsigned char * buffer, unsigned int numBytes ) const { return true; }
+ /**
+ * @copydoc PlatformAbstraction::StartTimer()
+ */
+ virtual uint32_t StartTimer( uint32_t milliseconds, CallbackBase* callback );
+
+ /*
+ * @copydoc PlatformAbstraction::CancelTimer()
+ */
+ virtual void CancelTimer ( uint32_t timerId );
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.
*/
void SetDecodedBitmap( Integration::BitmapPtr bitmap );
+ /**
+ * @brief Triggers the previously stored callback function
+ */
+ void TriggerTimer();
+
private:
TestPlatformAbstraction( const TestPlatformAbstraction& ); ///< Undefined
mutable TraceCallStack mTrace;
bool mIsLoadingResult;
- Vector2 mSize;
- Vector2 mClosestSize;
+ ImageDimensions mClosestSize;
LoadFileResult mLoadFileResult;
bool mSaveFileResult;
Integration::ResourcePointer mSynchronouslyLoadedResource;
Integration::BitmapPtr mDecodedBitmap;
+
+ uint32_t mTimerId;
+ CallbackBase* mCallbackFunction;
};
} // Dali
-#endif /* __DALI_TET_PLATFORM_ABSTRACTION_H__ */
+#endif /* DALI_TEST_PLATFORM_ABSTRACTION_H */