diff options
author | christian mueller <christian.ei.mueller@bmw.de> | 2012-02-29 13:27:27 +0100 |
---|---|---|
committer | christian mueller <christian.ei.mueller@bmw.de> | 2012-02-29 13:27:27 +0100 |
commit | d3ccf97331935b181041394b80be20dca282ea71 (patch) | |
tree | f85e7b649c8a6d58c11e9728b2442cdcff53826d /PluginRoutingInterfaceAsync/include/RoutingSenderAsyn.h | |
parent | aa93713377d28a8ce7821466ef828f79a18e982d (diff) | |
download | audiomanager-d3ccf97331935b181041394b80be20dca282ea71.tar.gz |
* [ performance] for classes that do not need to be derived from, removed virtual desctructor
* implemented confirmation of routing ready in RoutingReceiver
* [Sockethandler] automatically set gDispatchDone to 0 when starting mainloop
* fixed unit text to work with latest changes (expect Dbus command interface)
* [GAM-4] added way to do synchronous calling on interfaces with the help of CAmSerializer.h
* reworked AsyncRoutingPlugin to work with CAmSerializer.h
* reworked AsyncRoutingPlugin to register elemtes in thread using CAmSerializer.h
* reworked AsncPlugin Tests to work with remodelled Plugin
Diffstat (limited to 'PluginRoutingInterfaceAsync/include/RoutingSenderAsyn.h')
-rw-r--r-- | PluginRoutingInterfaceAsync/include/RoutingSenderAsyn.h | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/PluginRoutingInterfaceAsync/include/RoutingSenderAsyn.h b/PluginRoutingInterfaceAsync/include/RoutingSenderAsyn.h index dd88be1..96e1b5c 100644 --- a/PluginRoutingInterfaceAsync/include/RoutingSenderAsyn.h +++ b/PluginRoutingInterfaceAsync/include/RoutingSenderAsyn.h @@ -29,6 +29,7 @@ #include <routing/RoutingSendInterface.h> #include "RoutingReceiverAsyncShadow.h" #include <semaphore.h> +#include <memory.h> namespace am { @@ -208,6 +209,12 @@ public: */ void updateDomainstateSafe(am_domainID_t domainID, am_DomainState_e domainState); + void updateDomainListSafe(std::vector<am_Domain_s> listDomains); + + void updateSourceListSafe(std::vector<am_Source_s> listSource); + + void updateSinkListSafe(std::vector<am_Sink_s> listSinks); + private: /** * Extra thread that handles dbus stimulation for interrupt tests @@ -216,12 +223,11 @@ private: * it is used just for testing, not intended to be used otherwise... * @param data */ - static void* InterruptEvents(void* data); std::vector<am_Domain_s> createDomainTable(); std::vector<am_Sink_s> createSinkTable(); std::vector<am_Source_s> createSourceTable(); std::vector<am_Gateway_s> createGatewayTable(); - RoutingReceiverAsyncShadow mShadow; + RoutingReceiverAsyncShadow* mShadow; RoutingReceiveInterface* mReceiveInterface; SocketHandler *mSocketHandler; std::vector<am_Domain_s> mDomains; @@ -372,6 +378,21 @@ private: am_DomainState_e mDomainState; }; +class syncRegisterWorker: public Worker +{ +public: + syncRegisterWorker(AsyncRoutingSender * asyncSender, WorkerThreadPool* pool, RoutingReceiverAsyncShadow* shadow, const std::vector<am_Domain_s> domains, const std::vector<am_Sink_s> sinks, const std::vector<am_Source_s> sources, const uint16_t handle); + void start2work(); + void cancelWork(); +private: + AsyncRoutingSender * mAsyncSender; + RoutingReceiverAsyncShadow *mShadow; + std::vector<am_Domain_s> mListDomains; + std::vector<am_Sink_s> mListSinks; + std::vector<am_Source_s> mListSources; + uint16_t mHandle; +}; + } #endif /* ROUTINGSENDER_H_ */ |