Purge underscored header file barriers
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / toolkit-event-thread-callback.h
index d67ca24..9693e6e 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_TOOLKIT_EVENT_THREAD_CALLBACK_H__
-#define __DALI_TOOLKIT_EVENT_THREAD_CALLBACK_H__
+#ifndef DALI_TOOLKIT_EVENT_THREAD_CALLBACK_H
+#define DALI_TOOLKIT_EVENT_THREAD_CALLBACK_H
 
 /*
- * Copyright (c) 2015 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.
  * limitations under the License.
  *
  */
-#define __DALI_EVENT_THREAD_CALLBACK_H_
+#define DALI_EVENT_THREAD_CALLBACK_H
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/common/dali-common.h>
+#include <dali-toolkit/public-api/dali-toolkit-common.h>
 #include <dali/public-api/signals/callback.h>
 
 namespace Dali
 {
 
-class DALI_IMPORT_API EventThreadCallback
+class DALI_TOOLKIT_API EventThreadCallback
 {
 public:
 
@@ -36,12 +36,10 @@ public:
 
   void Trigger();
 
-  void WaitingForTrigger(unsigned int count);
+  bool WaitingForTrigger();
 
   CallbackBase* GetCallback();
 
-  static EventThreadCallback* Get();
-
 private:
 
   // undefined copy constructor.
@@ -58,4 +56,19 @@ private:
 
 }
 
-#endif /* __DALI_TOOLKIT_EVENT_THREAD_CALLBACK_H__ */
+namespace Test
+{
+
+/**
+ * Wait for the tested code to create an event trigger, then
+ * wait for triggerCount Trigger calls to occur, and execute the trigger
+ * callback afterwards.
+ *
+ * Will wait for a maximum of 30s before failing the test and returning.
+ */
+bool WaitForEventThreadTrigger( int triggerCount, int timeoutInSeconds=30 );
+
+}
+
+
+#endif // DALI_TOOLKIT_EVENT_THREAD_CALLBACK_H