summaryrefslogtreecommitdiff
path: root/AudioManagerUtilities/test/AmSocketHandlerTest/CAmSocketHandlerTest.h
diff options
context:
space:
mode:
authorJens Lorenz <jlorenz@de.adit-jv.com>2018-03-13 13:37:37 +0100
committerGitHub <noreply@github.com>2018-03-13 13:37:37 +0100
commit1d273417806ee5a6b1a8e92586f149f0f7877253 (patch)
treea3ece549d48b4b15653b60102f6ea4bd4599f8b2 /AudioManagerUtilities/test/AmSocketHandlerTest/CAmSocketHandlerTest.h
parentf32875117e54fd4887f3256d19518d3f62db6225 (diff)
downloadaudiomanager-1d273417806ee5a6b1a8e92586f149f0f7877253.tar.gz
Revert "Utility updates capi fixes"revert-26-utilityUpdates_CAPI_fixes
Diffstat (limited to 'AudioManagerUtilities/test/AmSocketHandlerTest/CAmSocketHandlerTest.h')
-rw-r--r--AudioManagerUtilities/test/AmSocketHandlerTest/CAmSocketHandlerTest.h78
1 files changed, 9 insertions, 69 deletions
diff --git a/AudioManagerUtilities/test/AmSocketHandlerTest/CAmSocketHandlerTest.h b/AudioManagerUtilities/test/AmSocketHandlerTest/CAmSocketHandlerTest.h
index 6cda2b3..ba2bf51 100644
--- a/AudioManagerUtilities/test/AmSocketHandlerTest/CAmSocketHandlerTest.h
+++ b/AudioManagerUtilities/test/AmSocketHandlerTest/CAmSocketHandlerTest.h
@@ -101,21 +101,23 @@ namespace am
UNIX, INET
};
CAmSamplePlugin(CAmSocketHandler *mySocketHandler, sockType_e socketType);
- virtual ~CAmSamplePlugin(){ shutdown(mSocket, SHUT_RDWR); }
+ ~CAmSamplePlugin()
+ {
+ }
+ ;
void connectSocket(const pollfd pollfd, const sh_pollHandle_t handle, void* userData);
- virtual void receiveData(const pollfd pollfd, const sh_pollHandle_t handle, void* userData);
- virtual bool dispatchData(const sh_pollHandle_t handle, void* userData);
- virtual bool check(const sh_pollHandle_t handle, void* userData);
+ void receiveData(const pollfd pollfd, const sh_pollHandle_t handle, void* userData);
+ bool dispatchData(const sh_pollHandle_t handle, void* userData);
+ bool check(const sh_pollHandle_t handle, void* userData);
TAmShPollFired<CAmSamplePlugin> connectFiredCB;
TAmShPollFired<CAmSamplePlugin> receiveFiredCB;
TAmShPollDispatch<CAmSamplePlugin> sampleDispatchCB;
TAmShPollCheck<CAmSamplePlugin> sampleCheckCB;
- bool isSocketOpened() { return mSocket>-1; }
- protected:
+
+ private:
CAmSocketHandler *mSocketHandler;
sh_pollHandle_t mConnecthandle, mReceiveHandle;
std::queue<std::string> msgList;
- int mSocket;
};
class CAmTimerSockethandlerController: public MockIAmTimerCb
@@ -160,54 +162,6 @@ namespace am
TAmShTimerCallBack<CAmTimer> pTimerCallback;
};
- class CAmTimerStressTest: public MockIAmTimerCb
- {
- CAmSocketHandler *mpSocketHandler;
- timespec mUpdateTimeout;
- int32_t mRepeats;
- int32_t mId;
- int32_t mHandle;
- public:
- explicit CAmTimerStressTest(CAmSocketHandler *SocketHandler, const timespec &timeout, const int32_t repeats = 0u);
- virtual ~CAmTimerStressTest();
-
- int32_t getId() { return mId; }
- void setId(const int32_t id) { mId=id; }
-
- int32_t getHandle() { return mHandle; }
- void setHandle(const int32_t id) { mHandle=id; }
-
- timespec getUpdateTimeout( ) { return mUpdateTimeout; }
-
- void timerCallback(sh_timerHandle_t handle, void * userData);
-
- TAmShTimerCallBack<CAmTimerStressTest> pTimerCallback;
- };
-
- class CAmTimerStressTest2: public MockIAmTimerCb
- {
- CAmSocketHandler *mpSocketHandler;
- timespec mUpdateTimeout;
- int32_t mRepeats;
- int32_t mId;
- int32_t mHandle;
- public:
- explicit CAmTimerStressTest2(CAmSocketHandler *SocketHandler, const timespec &timeout, const int32_t repeats = 0u);
- virtual ~CAmTimerStressTest2();
-
- int32_t getId() { return mId; }
- void setId(const int32_t id) { mId=id; }
-
- int32_t getHandle() { return mHandle; }
- void setHandle(const int32_t id) { mHandle=id; }
-
- timespec getUpdateTimeout( ) { return mUpdateTimeout; }
-
- void timerCallback(sh_timerHandle_t handle, void * userData);
-
- TAmShTimerCallBack<CAmTimerStressTest2> pTimerCallback;
- };
-
class CAmTimerMeasurment: public MockIAmTimerCb
{
CAmSocketHandler *mSocketHandler;
@@ -234,20 +188,6 @@ namespace am
void SetUp();
void TearDown();
};
-
- class CAmSamplePluginStressTest: public CAmSamplePlugin
- {
- std::vector<CAmTimerStressTest2*> mTimers;
- public:
- CAmSamplePluginStressTest(CAmSocketHandler *mySocketHandler, sockType_e socketType);
- virtual ~CAmSamplePluginStressTest();
-
- void receiveData(const pollfd pollfd, const sh_pollHandle_t handle, void* userData) final;
- bool dispatchData(const sh_pollHandle_t handle, void* userData) final;
- bool check(const sh_pollHandle_t handle, void* userData) final;
-
- std::vector<CAmTimerStressTest2*> & getTimers() { return mTimers; }
- };
} /* namespace am */
#endif /* SOCKETHANDLERTEST_H_ */