4 * Created on: Dec 19, 2011
8 #ifndef SOCKETHANDLERTEST_H_
9 #define SOCKETHANDLERTEST_H_
11 #include <gtest/gtest.h>
13 #include "SocketHandler.h"
25 SamplePlugin(SocketHandler *mySocketHandler, sockType_e socketType);
26 virtual ~SamplePlugin()
30 void connectSocket(const pollfd pollfd, const sh_pollHandle_t handle, void* userData);
31 void receiveData(const pollfd pollfd, const sh_pollHandle_t handle, void* userData);
32 bool dispatchData(const sh_pollHandle_t handle, void* userData);
33 bool check(const sh_pollHandle_t handle, void* userData);
34 shPollFired_T<SamplePlugin> connectFiredCB;
35 shPollFired_T<SamplePlugin> receiveFiredCB;
36 shPollDispatch_T<SamplePlugin> sampleDispatchCB;
37 shPollCheck_T<SamplePlugin> sampleCheckCB;
39 SocketHandler *mSocketHandler;
40 sh_pollHandle_t mConnecthandle, mReceiveHandle;
41 std::queue<std::string> msgList;
47 timerCallBack(SocketHandler *SocketHandler);
48 virtual ~timerCallBack();
49 void timer1Callback(sh_timerHandle_t handle, void * userData);
50 void timer2Callback(sh_timerHandle_t handle, void * userData);
51 void timer3Callback(sh_timerHandle_t handle, void * userData);
52 void timer4Callback(sh_timerHandle_t handle, void * userData);
53 shTimerCallBack_T<timerCallBack> pTimer1Callback;
54 shTimerCallBack_T<timerCallBack> pTimer2Callback;
55 shTimerCallBack_T<timerCallBack> pTimer3Callback;
56 shTimerCallBack_T<timerCallBack> pTimer4Callback;
57 SocketHandler *mSocketHandler;
60 class sockethandlerTest: public ::testing::Test
64 virtual ~sockethandlerTest();
70 #endif /* SOCKETHANDLERTEST_H_ */