summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchristian mueller <christian.ei.mueller@bmw.de>2012-02-06 15:57:11 +0100
committerchristian mueller <christian.ei.mueller@bmw.de>2012-02-06 16:18:36 +0100
commitba9e8ff6cfc7de6fadce914b356b6e4b398d5ab3 (patch)
tree9cdf855f63dd103a8ea6811d03251bd07a6a40de
parent74cf9b985164be8c28a3cd1b11076900792594f8 (diff)
downloadaudiomanager-ba9e8ff6cfc7de6fadce914b356b6e4b398d5ab3.tar.gz
* worked in feedback from Thomas Goering towards integration testsver-0.0.9
* corrected startup sequence and modified the testplugin so that the startup sequences match
-rw-r--r--AudioManagerDaemon/src/DatabaseHandler.cpp2
-rw-r--r--AudioManagerDaemon/src/Router.cpp1
-rw-r--r--AudioManagerDaemon/src/main.cpp10
-rw-r--r--CHANGELOG2
-rw-r--r--PluginControlInterface/include/ControlSender.h3
-rw-r--r--PluginControlInterface/src/ControlSender.cpp14
-rw-r--r--PluginRoutingInterfaceAsync/src/RoutingSenderAsync.cpp5
-rw-r--r--includes/config.h2
8 files changed, 27 insertions, 12 deletions
diff --git a/AudioManagerDaemon/src/DatabaseHandler.cpp b/AudioManagerDaemon/src/DatabaseHandler.cpp
index d9f81a6..1082c25 100644
--- a/AudioManagerDaemon/src/DatabaseHandler.cpp
+++ b/AudioManagerDaemon/src/DatabaseHandler.cpp
@@ -2881,7 +2881,6 @@ am_Error_e DatabaseHandler::enterConnectionDB(const am_Connection_s& connection,
am_Error_e DatabaseHandler::enterSinkClassDB(const am_SinkClass_s & sinkClass, am_sinkClass_t & sinkClassID)
{
assert(sinkClass.sinkClassID<DYNAMIC_ID_BOUNDARY);
- assert(!sinkClass.listClassProperties.empty());
assert(!sinkClass.name.empty());
sqlite3_stmt* query = NULL;
@@ -2970,7 +2969,6 @@ am_Error_e DatabaseHandler::enterSinkClassDB(const am_SinkClass_s & sinkClass, a
am_Error_e DatabaseHandler::enterSourceClassDB(am_sourceClass_t & sourceClassID, const am_SourceClass_s & sourceClass)
{
assert(sourceClass.sourceClassID<DYNAMIC_ID_BOUNDARY);
- assert(!sourceClass.listClassProperties.empty());
assert(!sourceClass.name.empty());
sqlite3_stmt* query = NULL;
diff --git a/AudioManagerDaemon/src/Router.cpp b/AudioManagerDaemon/src/Router.cpp
index 2e5f905..4fedf65 100644
--- a/AudioManagerDaemon/src/Router.cpp
+++ b/AudioManagerDaemon/src/Router.cpp
@@ -58,7 +58,6 @@ am_Error_e Router::getRoute(const bool onlyfree, const am_sourceID_t sourceID, c
am_Route_s actualRoute; //holds the actual Route
am_sourceID_t lastSource = 0;
- //TODO: kind of unclean. The separation between database and router could be better.
mDatabaseHandler->getRoutingTree(onlyfree, routingtree, flattree); //Build up the tree out of the database as
//we go through the returned flattree and look for our sink, after that flattree holds only treeItems that match
diff --git a/AudioManagerDaemon/src/main.cpp b/AudioManagerDaemon/src/main.cpp
index c4f4d0d..d483925 100644
--- a/AudioManagerDaemon/src/main.cpp
+++ b/AudioManagerDaemon/src/main.cpp
@@ -300,13 +300,13 @@ int main(int argc, char *argv[])
DatabaseObserver iObserver(&iCommandSender, &iRoutingSender);
#endif
- //since the plugins have been loaded by the *Senders before, we can tell the Controller this:
- iControlSender.hookAllPluginsLoaded();
-
- //the controller should startup the interfaces - this is just for testing
+ //startup all the Plugins and Interfaces
+ iControlSender.startupController(&iControlReceiver);
iCommandSender.startupInterface(&iCommandReceiver);
iRoutingSender.startupRoutingInterface(&iRoutingReceiver);
- iRoutingSender.routingInterfacesReady();
+
+ //when the routingInterface is done, all plugins are loaded:
+ iControlSender.hookAllPluginsLoaded();
#ifdef WITH_SOCKETHANDLER_LOOP
iSocketHandler.start_listenting();
diff --git a/CHANGELOG b/CHANGELOG
index cee400e..fe9885d 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,4 @@
-commit af25985a8ccf00bb7fb080aaac33a47614f5f222
+commit 74cf9b985164be8c28a3cd1b11076900792594f8
Author: christian mueller <christian.ei.mueller@bmw.de>
* add an out of memory handler
diff --git a/PluginControlInterface/include/ControlSender.h b/PluginControlInterface/include/ControlSender.h
index 40be70f..d4bb7bb 100644
--- a/PluginControlInterface/include/ControlSender.h
+++ b/PluginControlInterface/include/ControlSender.h
@@ -78,6 +78,9 @@ public:
void cbAckSetSinkSoundProperties(const am_Handle_s handle, const am_Error_e error);
am_Error_e getConnectionFormatChoice(const am_sourceID_t sourceID, const am_sinkID_t sinkID, const std::vector<am_ConnectionFormat_e> listPossibleConnectionFormats, std::vector<am_ConnectionFormat_e>& listPrioConnectionFormats);
uint16_t getInterfaceVersion() const;
+
+private:
+ ControlReceiveInterface * mControlReceiveInterface;
};
#endif /* CONTROLSENDER_H_ */
diff --git a/PluginControlInterface/src/ControlSender.cpp b/PluginControlInterface/src/ControlSender.cpp
index 6f83444..c92a4b6 100644
--- a/PluginControlInterface/src/ControlSender.cpp
+++ b/PluginControlInterface/src/ControlSender.cpp
@@ -24,6 +24,10 @@
*/
#include "ControlSender.h"
+#include "control/ControlReceiveInterface.h"
+#include <cassert>
+
+using namespace am;
extern "C" ControlSendInterface* PluginControlInterfaceFactory()
{
@@ -35,7 +39,8 @@ extern "C" void destroyControlPluginInterface(ControlSendInterface* controlSendI
delete controlSendInterface;
}
-ControlSenderPlugin::ControlSenderPlugin()
+ControlSenderPlugin::ControlSenderPlugin() :
+ mControlReceiveInterface(NULL)
{
}
@@ -45,7 +50,9 @@ ControlSenderPlugin::~ControlSenderPlugin()
am_Error_e ControlSenderPlugin::startupController(ControlReceiveInterface *controlreceiveinterface)
{
- (void) controlreceiveinterface;
+ assert(controlreceiveinterface);
+ mControlReceiveInterface = controlreceiveinterface;
+ //here is a good place to insert SystemProperties into the database...
return E_NOT_USED;
}
@@ -56,6 +63,9 @@ am_Error_e ControlSenderPlugin::stopController()
void ControlSenderPlugin::hookAllPluginsLoaded()
{
+ //here is a good place to insert Source and SinkClasses into the database...
+ mControlReceiveInterface->setRoutingReady();
+ mControlReceiveInterface->setCommandReady();
}
am_Error_e ControlSenderPlugin::hookUserConnectionRequest(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t & mainConnectionID)
diff --git a/PluginRoutingInterfaceAsync/src/RoutingSenderAsync.cpp b/PluginRoutingInterfaceAsync/src/RoutingSenderAsync.cpp
index d51e943..7527f7d 100644
--- a/PluginRoutingInterfaceAsync/src/RoutingSenderAsync.cpp
+++ b/PluginRoutingInterfaceAsync/src/RoutingSenderAsync.cpp
@@ -774,6 +774,8 @@ std::vector<am_Sink_s> AsyncRoutingSender::createSinkTable()
item.sinkID = i; //take fixed ids to make thins easy
item.sinkClassID = 1;
item.volume = 0;
+ item.available.availability = A_AVAILABLE;
+ item.available.availabilityReason = AR_UNKNOWN;
item.listSoundProperties.push_back(sp);
item.visible = true;
item.listConnectionFormats.push_back(CF_ANALOG);
@@ -793,10 +795,13 @@ std::vector<am_Source_s> AsyncRoutingSender::createSourceTable()
temp << i;
item.domainID = 0; //we cannot know this when the table is created !
item.name = "mySource" + temp.str();
+ item.sourceState = SS_OFF;
item.sourceID = i; //take fixed ids to make thins easy
item.sourceClassID = 1;
item.volume = 0;
item.visible = true;
+ item.available.availability = A_AVAILABLE;
+ item.available.availabilityReason = AR_UNKNOWN;
item.listConnectionFormats.push_back(CF_ANALOG);
table.push_back(item);
}
diff --git a/includes/config.h b/includes/config.h
index b83c8d3..2b4b736 100644
--- a/includes/config.h
+++ b/includes/config.h
@@ -1,7 +1,7 @@
#ifndef _CONFIG_H
#define _CONFIG_H
-#define DAEMONVERSION "ver-0.0.1-23-gaf25985"
+#define DAEMONVERSION "ver-0.0.1-23-g74cf9b9"
#define WITH_DBUS_WRAPPER
#define WITH_SOCKETHANDLER_LOOP