Merge test folder of test branch
[iotivity.git] / test / src / iBtestapp / common / include / IBtestappCommonUtil.h
1 #ifndef INCLUDE_IBTESTAPP_COMMONUTIL_H
2 #define INCLUDE_IBTESTAPP_COMMONUTIL_H
3
4 #include <iostream>
5 #include <signal.h>
6 #include <string>
7 #include <map>
8 #include <cstdlib>
9 #include <pthread.h>
10 #include <mutex>
11 #include <condition_variable>
12 #include <vector>
13 #include <unistd.h>
14
15 #define IBTESTAPP_CALLBACK_TIMEOUT 10
16
17 using namespace std;
18
19 class IBtestappCommonUtil
20 {
21 private:
22         static IBtestappCommonUtil* s_IBtestappCommonUtilInstance;
23         static std::mutex s_mutex;
24
25 public:
26         IBtestappCommonUtil(void);
27         ~IBtestappCommonUtil(void);
28
29         static bool isTestAppCommonUtilServerResponsed;
30
31     /**
32      * @brief   function for getting class instance
33      * @return  class instance
34      */
35         static IBtestappCommonUtil* getInstance(void);
36
37         static void * executeThread(void *threadID);
38         static void waitForServerResponse();
39 };
40
41 #endif