*.project
.metadata/
/music/navi.mp3
+/test
+++ /dev/null
-cmake_minimum_required(VERSION 2.6)
-
-PROJECT(AudioGui)
-
-set(CMAKE_CXX_FLAGS "-g -pipe -g -Wall -W -D_REENTRANT")
-
-set(STD_INCLUDE_DIRS "/usr/include")
-set(EXECUTABLE_OUTPUT_PATH ../../bin/)
-set(DBUS_FOLDER ${CMAKE_SOURCE_DIR}/../dbusInterfaces)
-set(DOC_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/../doc/AudioGui)
-set(DOCUMENT $ENV{gendoc})
-
-cmake_policy(SET CMP0015 NEW)
-
-file(MAKE_DIRECTORY ${DOC_OUTPUT_PATH})
-
-FIND_PACKAGE(Qt4 REQUIRED)
-FIND_PACKAGE(PkgConfig)
-pkg_check_modules(GLIB REQUIRED glib-2.0)
-
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR} ${STD_INCLUDE_DIRS})
-
-# add Qt modules here, the include will setup QT_LIBRARIES
-SET(QT_USE_QTDBUS TRUE)
-SET(QT_USE_QTGUI TRUE)
-SET(QT_USE_QTNETWORK TRUE)
-
-INCLUDE(${QT_USE_FILE})
-
-SET( UI_FILES
- audiomangui.ui
- popup_ta.ui
- popup_navi.ui
-)
-
-#all source files go here
-SET(AUDIOGUI_SRCS_CXX
- main.cpp
- audiomangui.cpp
- ${DBUS_FOLDER}/DBusTypes.cpp
- ${CMAKE_CURRENT_BINARY_DIR}/DBusSend.cpp
-)
-
-INCLUDE_DIRECTORIES(
- include
- ${CMAKE_SOURCE_DIR}
- ${STD_INCLUDE_DIRS}
- ${GLIB_INCLUDE_DIRS}
- ${CMAKE_CURRENT_BINARY_DIR}
- ${DBUS_FOLDER}
-)
-
-#every header that contains QT stuff like Q_OBJECT .... and must be mocced
-SET(AUDIOGUI_MOC_SRCS
- audiomangui.h
- ${CMAKE_CURRENT_BINARY_DIR}/DBusSend.h
-)
-
-LINK_DIRECTORIES(
- ${LINK_DIRECTORIES}
- ${GLIB_LIBRARY_DIRS}DOXYGEN_EXECUTABLE
-)
-
-QT4_WRAP_UI(UI_HDRS ${UI_FILES} )
-
-
-#now take the headers, moc them and append the resulting moc files to the sources
-QT4_WRAP_CPP(AUDIOGUI_SRCS_CXX ${AUDIOGUI_MOC_SRCS})
-
-ADD_EXECUTABLE(AudioGui ${AUDIOGUI_SRCS_CXX} ${UI_HDRS})
-
-TARGET_LINK_LIBRARIES(AudioGui
- ${QT_LIBRARIES}
-)
-
-add_custom_command(
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/DBusSend_.h ${CMAKE_CURRENT_BINARY_DIR}/DBusSend.cpp
- COMMAND qdbusxml2cpp ARGS -v -c DBusSend -p DBusSend.h:DBusSend.cpp ${DBUS_FOLDER}/DBusAudioManager.xml
- MAIN_DEPENDENCY ${DBUS_FOLDER}/DBusAudioManager.xml
-)
-
-add_custom_command(
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/DBusSend.h
- COMMAND sed ARGS -i '1i \#include \"../dbusInterfaces/DBusTypes.h\"' DBusSend.h
- MAIN_DEPENDENCY ${CMAKE_CURRENT_BINARY_DIR}/DBusSend_.h
-)
-
-#add a target to generate API documentation with Doxygen
-find_package(Doxygen)
-if(DOXYGEN_FOUND)
-if(DOCUMENT)
- configure_file(Doxyfile.in ${PROJECT_BINARY_DIR}/Doxyfile @ONLY IMMEDIATE)
- add_custom_target (Docs ALL
- COMMAND ${DOXYGEN_EXECUTABLE} ${PROJECT_BINARY_DIR}/Doxyfile WORKING_DIRECTORY ${DOC_OUTPUT_PATH}
- SOURCES ${PROJECT_BINARY_DIR}/Doxyfile)
-endif(DOCUMENT)
-endif(DOXYGEN_FOUND)
+++ /dev/null
-/**
- * Copyright (C) 2011, BMW AG
- *
- * AudioManGui
- *
- * \file audiomangui.cpp
- *
- * \date 20.05.2011
- * \author Christian Müller (christian.ei.mueller@bmw.de)
- *
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
- */
-
-#include "audiomangui.h"
-
-AudioManGUI::AudioManGUI(QWidget *parent) :
- m_taPop(new taPopup()), m_naviPop(new naviPopup()) {
-
- (void)parent;
- ui.setupUi(this);
- ui.SourceView->setHeaderLabel("Sources");
- ui.SinkView->setHeaderLabel("Sinks");
- QObject::connect((const QObject*) ui.SourceView, SIGNAL (itemClicked(QTreeWidgetItem*,int)), (const QObject*) this, SLOT (slot_selectionChanged(QTreeWidgetItem *, int)));
- QObject::connect((const QObject*) ui.SinkView, SIGNAL (itemClicked(QTreeWidgetItem*,int)), (const QObject*) this, SLOT (slot_selectionChanged(QTreeWidgetItem *, int)));
- QObject::connect((const QObject*) ui.pushButton, SIGNAL(pressed()), (const QObject*) this, SLOT(slot_connectPressed()));
- QObject::connect((const QObject*) ui.pushButton_2, SIGNAL(pressed()), (const QObject*) this, SLOT(slot_disconnectPressed()));
- QObject::connect((const QObject*) ui.SinkView, SIGNAL (itemDoubleClicked(QTreeWidgetItem*,int)), (const QObject*) this, SLOT (slot_doubleClickedSource(QTreeWidgetItem *, int)));
-
- //setup DBus Connection
- REGISTER_METATYPES
- sender = new DBusSend("org.Genivi.ControllerInterface", "/Control", QDBusConnection::sessionBus(), 0);
-
- QObject::connect((const QObject*) sender, SIGNAL(signal_connectionChanged()), (const QObject*) this, SLOT(slot_connectionChanged()));
- QObject::connect((const QObject*) sender, SIGNAL(signal_numberOfSinksChanged()), (const QObject*) this, SLOT(slot_numberOfSinksChanged()));
- QObject::connect((const QObject*) sender, SIGNAL(signal_numberOfSourcesChanged()), (const QObject*) this, SLOT(slot_numberOfSourcesChanged()));
-
- m_taActive = false;
- m_naviActive = false;
-
- //initial fill
- QList<SourceType> sources = sender->getListSources();
- foreach (SourceType s,sources) {
- this->insertSource(s.ID, s.name);
- }
-
- QList<SinkType> sinks = sender->getListSinks();
- foreach (SinkType s, sinks) {
- this->insertSink(s.ID, s.name);
- }
-
- QList<ConnectionType> connections = sender->getListConnections();
- foreach (ConnectionType c, connections) {
- this->connect(c.Source_ID, c.Sink_ID);
- }
-}
-
-AudioManGUI::~AudioManGUI() {
- delete m_taPop;
- delete m_naviPop;
-
-}
-
-void AudioManGUI::insertSource(int ID, QString name) {
- SourceItem* Source = new SourceItem(ui.SourceView, ID, name);
- m_sourceList.append(Source);
-}
-
-void AudioManGUI::insertSink(int ID, QString name) {
- SinkItem* Sink = new SinkItem(ui.SinkView, ID, name);
- m_sinkList.append(Sink);
-}
-
-
-void AudioManGUI::connect(int SourceID, int SinkID) {
- Connection_t connect;
- foreach (SourceItem* Source, m_sourceList)
- {
- if (SourceID == Source->getSourceID()) {
- connect.Source = Source;
- }
- }
-
- foreach (SinkItem* Sink,m_sinkList)
- {
- if (SinkID == Sink->getSinkID()) {
- connect.Sink = Sink;
- }
- }
- m_connectionList.append(connect);
- QWidget::update();
-}
-
-SinkItem* AudioManGUI::returnSelectedSink(void) {
- SinkItem* SinkI = NULL;
-
- QList<QTreeWidgetItem*> SinkL = ui.SinkView->selectedItems();
- if (SinkL.size() > 0) {
- SinkI = static_cast<SinkItem*> (SinkL.first());
- }
- return SinkI;
-}
-
-SourceItem* AudioManGUI::returnSelectedSource(void) {
- SourceItem* SourceI = NULL;
-
- QList<QTreeWidgetItem*> SourceL = ui.SourceView->selectedItems();
- if (SourceL.size() > 0) {
- SourceI = static_cast<SourceItem*> (SourceL.first());
- }
- return SourceI;
-}
-
-SourceItem* AudioManGUI::returnSourceItemfromID(int ID) {
- foreach (SourceItem* i, m_sourceList) {
- if (i->getSourceID() == ID) {
- return i;
- }
- }
- return NULL;
-
-}
-
-void AudioManGUI::paintEvent(QPaintEvent * event) {
- (void)event;
- QPainter painter(this);
- QPen pen(Qt::black, 2, Qt::SolidLine);
- painter.setPen(pen);
- QRect rect;
- int x1 = ui.SourceView->geometry().x() + ui.SourceView->geometry().width() + 5;
- int x2 = ui.SinkView->geometry().x() - 5;
- rect = ui.SourceView->visualItemRect(ui.SourceView->topLevelItem(0));
- int y1 = rect.height();
- int ylevel = ui.SinkView->geometry().topLeft().y() + y1 * 1.5;
-
- foreach (Connection_t con, m_connectionList) {
- rect = ui.SourceView->visualItemRect(con.Source);
- int y1 = (rect.top() + rect.height() / 2) + ylevel;
-
- rect = ui.SinkView->visualItemRect(con.Sink);
- int y2 = (rect.top() + rect.height() / 2) + ylevel;
-
- painter.drawLine(QPoint(x1, y1), QPoint(x2, y2));
- }
-}
-
-void AudioManGUI::slot_connectPressed() {
- SourceItem* SourceI = returnSelectedSource();
- SinkItem* SinkI = returnSelectedSink();
-
- if (SourceI && SinkI) {
- connect(SourceI->getSourceID(), SinkI->getSinkID());
- sender->connect(SourceI->getSourceID(), SinkI->getSinkID());
- }
- updateButtons();
-}
-
-void AudioManGUI::slot_disconnectPressed() {
- SourceItem* SourceI = returnSelectedSource();
- SinkItem* SinkI = returnSelectedSink();
-
- if (SourceI && SinkI) {
- sender->disconnect(SourceI->getSourceID(), SinkI->getSinkID());
- }
- updateButtons();
-}
-
-void AudioManGUI::updateButtons() {
- int rem = 0;
- SourceItem* SourceI = returnSelectedSource();
- SinkItem* SinkI = returnSelectedSink();
-
- if (SourceI && SinkI) {
- int sourceID = SourceI->getSourceID();
- int sinkID = SinkI->getSinkID();
- foreach (Connection_t con,m_connectionList)
- {
- if (sinkID == con.Sink->getSinkID() && sourceID == con.Source->getSourceID()) {
- rem = 1;
- }
- }
- }
-
- if (rem == 1) {
- ui.pushButton_2->setEnabled(true);
- ui.pushButton->setEnabled(false);
- } else {
- ui.pushButton->setEnabled(true);
- ui.pushButton_2->setEnabled(false);
- }
-
- QWidget::update();
-}
-
-void AudioManGUI::slot_selectionChanged(QTreeWidgetItem *current, int column) {
- (void) current;
- (void) column;
- updateButtons();
-}
-
-void AudioManGUI::slot_doubleClickedSource(QTreeWidgetItem *current, int column) {
- (void) current;
- (void) column;
- QFrame *popup1;
- popup1 = new QFrame(this, Qt::Popup);
- popup1->resize(30, 100);
- QRect rect = ui.SinkView->visualItemRect(current);
- int width = ui.horizontalSpacer_4->geometry().width() + ui.horizontalSpacer_3->geometry().width() + ui.horizontalSpacer_5->geometry().width() + ui.pushButton_2->geometry().width();
- rect.setBottomRight(QPoint(rect.bottomRight().x() + width, rect.bottomRight().y()));
- popup1->move(mapToGlobal(rect.bottomRight()));
-
- QSlider* slider;
- slider = new QSlider(popup1);
- slider->resize(30, 100);
- slider->setMaximum(0xFFFF);
- slider->show();
- popup1->show();
- QObject::connect((const QObject*) slider, SIGNAL(valueChanged(int)), (const QObject*) this, SLOT(slot_volumeChanged(int)));
-}
-
-void AudioManGUI::slot_volumeChanged(int volume) {
- SinkItem* SinkI = returnSelectedSink();
- sender->setVolume(SinkI->getSinkID(), volume);
-
-}
-
-void AudioManGUI::slot_connectionChanged() {
- QList<ConnectionType> connections = sender->getListConnections();
- m_connectionList.clear();
- m_taActive = false;
- m_naviActive = false;
- foreach (ConnectionType c, connections) {
- this->connect(c.Source_ID, c.Sink_ID);
- if (returnSourceItemfromID(c.Source_ID)->getName().compare("ta") == 0) {
- m_taActive = true;
- } else if (returnSourceItemfromID(c.Source_ID)->getName().compare("navigation") == 0) {
- m_naviActive = true;
- }
- }
-
- //state changed?
- if (m_taActive) {
- m_taPop->show();
- m_taPop->move(this->geometry().center());
- } else {
- m_taPop->hide();
- }
-
- if (m_naviActive) {
- m_naviPop->show();
- m_taPop->move(mapToGlobal(ui.SourceView->pos()));
- } else {
- m_naviPop->hide();
- }
-
- QWidget::update();
-}
-
-void AudioManGUI::slot_numberOfSinksChanged() {
- QList<SinkType> sinks = sender->getListSinks();
- foreach (SinkType s, sinks) {
- bool exist = false;
- foreach (SinkItem* item, m_sinkList)
- {
- if (item->getSinkID() == s.ID) {
- exist = true;
- }
- }
- if (!exist) {
- this->insertSink(s.ID, s.name);
- QWidget::update();
- }
- }
-}
-
-void AudioManGUI::slot_numberOfSourcesChanged() {
- QList<SourceType> sources = sender->getListSources();
- foreach (SourceType s,sources) {
- bool exist = false;
- foreach (SourceItem* item, m_sourceList) {
- if (item->getSourceID() == s.ID) {
- exist = true;
- }
- }
- if (!exist) {
- this->insertSource(s.ID, s.name);
- QWidget::update();
- }
- }
-}
-
-naviPopup::naviPopup(QWidget* parent) {
- (void)parent;
- navi_pop.setupUi(this);
-}
-
-naviPopup::~naviPopup() {
-
-}
-
-taPopup::taPopup(QWidget* parent) {
- (void) parent;
- ta_pop.setupUi(this);
-}
-
-taPopup::~taPopup() {
-
-}
-
-SinkItem::SinkItem(QTreeWidget* parent, int givenID, QString givenName) {
- ID = givenID;
- name = givenName;
- QTreeWidgetItem::setText(0, givenName);
- parent->insertTopLevelItem(0, this);
-}
-
-int SinkItem::getSinkID() {
- return ID;
-}
-
-SinkItem::~SinkItem() {
-}
-
-SourceItem::SourceItem(QTreeWidget* parent, int givenID, QString givenName) {
- ID = givenID;
- name = givenName;
- QTreeWidgetItem::setText(0, givenName);
- parent->insertTopLevelItem(0, this);
-}
-
-QString SourceItem::getName() {
- return name;
-}
-
-int SourceItem::getSourceID() {
- return ID;
-}
-
-SourceItem::~SourceItem() {
-
-}
-
+++ /dev/null
-/**
- *
- * Copyright (C) 2011, BMW AG
- *
- * AudioManGui
- *
- * \file audiomangui.h
- *
- * \date 20.05.2011
- * \author Christian Müller (christian.ei.mueller@bmw.de)
- *
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
- */
-
-#ifndef AUDIOMANGUI_H
-#define AUDIOMANGUI_H
-
-#include <QCoreApplication>
-#include <QtGui/QWidget>
-#include "qstandarditemmodel.h"
-#include "ui_audiomangui.h"
-#include "ui_popup_navi.h"
-#include "ui_popup_ta.h"
-#include "qtreewidget.h"
-#include "qtreeview.h"
-#include "DBusSend.h"
-#include "DBusTypes.h"
-#include "audiomangui.h"
-#include "qlist.h"
-#include "qtableview.h"
-#include "qstring.h"
-#include "qstringlist.h"
-#include "qpainter.h"
-#include "qmessagebox.h"
-#include "qdial.h"
-
-class SourceItem;
-class SinkItem;
-class naviPopup;
-class taPopup;
-
-struct Connection_t {
- SinkItem* Sink;
- SourceItem* Source;
-};
-
-/**\class AudioManGUI
- * \brief Main Gui Class
- * This class is used to display source sink connections and to test the AudioManager
- * \brief constructor
- * \fn AudioManGUI::insertSource(int ID, QString name);
- * \brief inserts a source
- * \fn AudioManGUI::insertSink(int ID, QString name);
- * \brief inserts a sink
- * \fn AudioManGUI::connect(int SourceID, int SinkID);
- * \brief connects source and sink
- * \fn AudioManGUI::disconnect(int SourceID, int SinkID);
- * \brief disconnects source and sink
- * \fn SinkItem* AudioManGUI::returnSelectedSink(void);
- * \brief returns the selected sink
- * \fn SourceItem* AudioManGUI::returnSelectedSource(void);
- * \brief returns the selected source
- * \fn SourceItem* AudioManGUI::returnSourceItemfromID(int ID);
- * \brief returns a source item from an ID
- * \param ID the id
- * \fn void AudioManGUI::updateButtons(void);
- * \brief is called to update the buttons
- */
-class AudioManGUI: public QWidget {
-Q_OBJECT
-
-public:
- AudioManGUI(QWidget *parent = 0);
- ~AudioManGUI();
-
- void insertSource(int ID, QString name);
- void insertSink(int ID, QString name);
- void connect(int SourceID, int SinkID);
- void disconnect(int SourceID, int SinkID);
-
-public slots:
- void slot_selectionChanged(QTreeWidgetItem *current, int column);
- void slot_doubleClickedSource(QTreeWidgetItem *current, int column);
- void slot_connectPressed(void);
- void slot_disconnectPressed(void);
- void slot_connectionChanged(void);
- void slot_numberOfSinksChanged(void);
- void slot_numberOfSourcesChanged(void);
- void slot_volumeChanged(int);
-
-protected:
- void paintEvent(QPaintEvent *);
-
-private:
- SinkItem* returnSelectedSink(void);
- SourceItem* returnSelectedSource(void);
- SourceItem* returnSourceItemfromID(int ID);
- void updateButtons(void);
-
- Ui::AudioManGUIClass ui;
- taPopup* m_taPop;
- naviPopup* m_naviPop;
- QList<SourceItem*> m_sourceList;
- QList<SinkItem*> m_sinkList;
- QList<Connection_t> m_connectionList;
- DBusSend* sender;
- bool m_taActive;
- bool m_naviActive;
-
-};
-
-/**This is the navigation popup widget
- *
- */
-class naviPopup: public QWidget {
-Q_OBJECT
-public:
- naviPopup(QWidget *parent = 0);
- virtual ~naviPopup();
-private:
- Ui::naviPopup navi_pop;
-};
-
-/**The traffic announcement widget
- *
- */
-class taPopup: public QWidget {
-Q_OBJECT
-public:
- taPopup(QWidget *parent = 0);
- virtual ~taPopup();
-private:
- Ui::taPopup ta_pop;
-};
-
-/** \class SinkItem
- * \brief This class represents a sink item
- * \fn SinkItem::SinkItem(QTreeWidget* parent = 0, int ID = 0, QString Name = "");
- * \brief constructor
- * \param ID the Id of the sink
- * \param parent pointer to the parent
- * \param Name the name of the sink
- * \fn SinkItem::getSinkID(void);
- * \brief returns the Sink ID
- */
-class SinkItem: SinkType, public QTreeWidgetItem {
-public:
- SinkItem(QTreeWidget* parent = 0, int ID = 0, QString Name = "");
- virtual ~SinkItem();
- int getSinkID(void);
-};
-
-/**
- * \class SourceItem
- * \brief This class represents a source item
- * \fn SourceItem::SourceItem(QTreeWidget* parent = 0, int ID = 0, QString Name = "");
- * \brief constructor
- * \param ID the Id of the source
- * \param parent pointer to parent
- * \param Name the name of the source
- * \fn SourceItem::getSourceID(void);
- * \brief returns the Source ID
- * \fn SourceItem::getName(void);
- * \brief returns the name of the source item
- * \return returns the name of the source item
- */
-class SourceItem: SourceType, public QTreeWidgetItem {
-public:
- SourceItem(QTreeWidget* parent = 0, int ID = 0, QString Name = "");
- virtual ~SourceItem();
- int getSourceID(void);
- QString getName(void);
-};
-
-#endif // AUDIOMANGUI_H
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>AudioManGUIClass</class>
- <widget class="QWidget" name="AudioManGUIClass">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>658</width>
- <height>516</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>AudioManGUI</string>
- </property>
- <property name="windowIcon">
- <iconset>
- <normaloff>Bild1.png</normaloff>Bild1.png</iconset>
- </property>
- <layout class="QGridLayout" name="gridLayout">
- <item row="0" column="0">
- <layout class="QVBoxLayout" name="verticalLayout_2"/>
- </item>
- <item row="1" column="1">
- <spacer name="horizontalSpacer_4">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>60</width>
- <height>0</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="8" column="0" colspan="4">
- <layout class="QHBoxLayout" name="horizontalLayout"/>
- </item>
- <item row="0" column="3">
- <layout class="QHBoxLayout" name="horizontalLayout_2"/>
- </item>
- <item row="1" column="0">
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QTreeWidget" name="SourceView">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <attribute name="headerVisible">
- <bool>true</bool>
- </attribute>
- <attribute name="headerShowSortIndicator" stdset="0">
- <bool>false</bool>
- </attribute>
- <attribute name="headerStretchLastSection">
- <bool>true</bool>
- </attribute>
- <column>
- <property name="text">
- <string notr="true">1</string>
- </property>
- </column>
- </widget>
- </item>
- </layout>
- </item>
- <item row="6" column="0">
- <layout class="QHBoxLayout" name="horizontalLayout_3">
- <item>
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="pushButton">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string>Connect</string>
- </property>
- <property name="icon">
- <iconset>
- <normaloff>Bild1.png</normaloff>Bild1.png</iconset>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer_2">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item row="6" column="3">
- <layout class="QHBoxLayout" name="horizontalLayout_4">
- <item>
- <spacer name="horizontalSpacer_5">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="pushButton_2">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string>Disconnect</string>
- </property>
- <property name="icon">
- <iconset>
- <normaloff>Bild1.png</normaloff>Bild1.png</iconset>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer_3">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item row="1" column="3">
- <widget class="QTreeWidget" name="SinkView">
- <column>
- <property name="text">
- <string notr="true">1</string>
- </property>
- </column>
- </widget>
- </item>
- </layout>
- </widget>
- <layoutdefault spacing="6" margin="11"/>
- <resources/>
- <connections/>
-</ui>
+++ /dev/null
-/**
- * Copyright (C) 2011, BMW AG
- *
- * AudioManGui
- *
- * \file main.cpp
- *
- * \date 20.05.2011
- * \author Christian Müller (christian.ei.mueller@bmw.de)
- *
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
- *
- * This Tool serves as test HMI interface in order to test the Genivi AudioManager. It is not intended to be production SW.
- *
- */
-
-#include "audiomangui.h"
-
-#include <QtCore>
-#include <QCoreApplication>
-
-int main(int argc, char *argv[])
-{
- QApplication a(argc, argv);
- AudioManGUI w;
- w.show();
-
- return a.exec();
-}
+++ /dev/null
-/**
- * \mainpage
- * \image html "Bild1.png"
- * Copyright Copyright (C) 2011, BMW AG
- *
- * \date 22.06.2011
- * \author Christian Müller (christian.ei.mueller@bmw.de)
- *
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
- *
- * \section About About AudioManGUI
- * This program serves as test User Interface for the AudioManager. It is designed to be a test & demonstration tool. It is not meant to be used in series production.
- *
- * \section Info More information
- * can be found at <https://collab.genivi.org/wiki/display/genivi/GENIVI+Home>
- *
- * \todo Currently the GUI does only support a very basic interface for updates. For example every time there is a new connection, it retrieves the complete list of connections new.
- * This should be changed into a smarter way.
- * \todo Improve the interface further
- * \todo Volume changes are only set, not read out before setting. This results into a none nice way of changing the volume
- * \todo nicer layouts.
- */
-
-#ifndef MAINPAGE_H_
-#define MAINPAGE_H_
-
-
-#endif /* MAINPAGE_H_ */
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>naviPopup</class>
- <widget class="QWidget" name="naviPopup">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>414</width>
- <height>155</height>
- </rect>
- </property>
- <property name="windowIcon">
- <iconset>
- <normaloff>Bild1.png</normaloff>Bild1.png</iconset>
- </property>
- <widget class="QLabel" name="label">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>10</y>
- <width>151</width>
- <height>141</height>
- </rect>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="pixmap">
- <pixmap>Bild1.png</pixmap>
- </property>
- </widget>
- <widget class="QLabel" name="label_2">
- <property name="geometry">
- <rect>
- <x>170</x>
- <y>20</y>
- <width>201</width>
- <height>131</height>
- </rect>
- </property>
- <property name="text">
- <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
-<html><head><meta name="qrichtext" content="1" /><style type="text/css">
-p, li { white-space: pre-wrap; }
-</style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;">
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16pt; font-weight:600;">A Navigation prompt is just coming through</span></p></body></html></string>
- </property>
- <property name="textFormat">
- <enum>Qt::RichText</enum>
- </property>
- <property name="scaledContents">
- <bool>true</bool>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- </widget>
- <widget class="QLabel" name="label_3">
- <property name="geometry">
- <rect>
- <x>250</x>
- <y>140</y>
- <width>161</width>
- <height>17</height>
- </rect>
- </property>
- <property name="text">
- <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
-<html><head><meta name="qrichtext" content="1" /><style type="text/css">
-p, li { white-space: pre-wrap; }
-</style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;">
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:6pt;">Headphone Icons by http://dryicons.com</span></p>
-<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:6pt;"></p></body></html></string>
- </property>
- </widget>
- </widget>
- <resources/>
- <connections/>
-</ui>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>taPopup</class>
- <widget class="QWidget" name="taPopup">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>414</width>
- <height>155</height>
- </rect>
- </property>
- <property name="windowIcon">
- <iconset>
- <normaloff>Bild1.png</normaloff>Bild1.png</iconset>
- </property>
- <widget class="QLabel" name="label">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>10</y>
- <width>151</width>
- <height>141</height>
- </rect>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="pixmap">
- <pixmap>Bild1.png</pixmap>
- </property>
- </widget>
- <widget class="QLabel" name="label_2">
- <property name="geometry">
- <rect>
- <x>170</x>
- <y>20</y>
- <width>201</width>
- <height>131</height>
- </rect>
- </property>
- <property name="text">
- <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
-<html><head><meta name="qrichtext" content="1" /><style type="text/css">
-p, li { white-space: pre-wrap; }
-</style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;">
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16pt; font-weight:600;">A Traffic Announcement is just coming through</span></p></body></html></string>
- </property>
- <property name="textFormat">
- <enum>Qt::RichText</enum>
- </property>
- <property name="scaledContents">
- <bool>true</bool>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- </widget>
- <widget class="QLabel" name="label_3">
- <property name="geometry">
- <rect>
- <x>250</x>
- <y>140</y>
- <width>161</width>
- <height>17</height>
- </rect>
- </property>
- <property name="text">
- <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
-<html><head><meta name="qrichtext" content="1" /><style type="text/css">
-p, li { white-space: pre-wrap; }
-</style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;">
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:6pt;">Headphone Icons by http://dryicons.com</span></p>
-<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:6pt;"></p></body></html></string>
- </property>
- </widget>
- </widget>
- <resources/>
- <connections/>
-</ui>
+++ /dev/null
-/**
- * Copyright (C) 2011, BMW AG
- *
- * AudioManangerDeamon
- *
- * \file AudioManagerCore.cpp
- *
- * \date 20.05.2011
- * \author Christian Müller (christian.ei.mueller@bmw.de)
- *
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
- *
- *
- */
-
-
-#include "AudioManagerCore.h"
-#include <dirent.h>
-#include <dlfcn.h>
-#include <libgen.h>
-
-Task::Task() {
-}
-
-Task::~Task() {
-}
-
-Task::Task(AudioManagerCore* core) {
- m_core = core;
-}
-
-TaskAsyncConnect::TaskAsyncConnect(AudioManagerCore* core, sink_t sink,
- source_t source) :
- Task(core), m_ParamSink(sink), m_ParamSource(source) {
-}
-
-TaskAsyncConnect::~TaskAsyncConnect() {
-}
-
-void TaskAsyncConnect::executeTask(Queue* queue) {
- /**
- * \todo remove signals and slots, change to non QT timers
- */
-// QObject::connect((const QObject*) this, SIGNAL(signal_nextTask()),
-// (const QObject*) queue, SLOT(slot_nextTask()));
-// QObject::connect((const QObject*) m_core->returnReceiver(),
-// SIGNAL(signal_ackConnect(genHandle_t, genError_t)),
-// (const QObject*) this,
-// SLOT(slot_connect_finished(genHandle_t, genError_t)));
-// m_timer = new QTimer();
-// m_timer->setSingleShot(true);
-// QObject::connect(m_timer, SIGNAL(timeout()), (const QObject*) this,
-// SLOT(slot_timeout()));
-// DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Started Connect"));
-// m_timer->start(CONNECT_TIMEOUT);
- m_core->connect(m_ParamSource, m_ParamSink, &m_handle);
-}
-
-void TaskAsyncConnect::setSink(sink_t sink) {
- m_ParamSink = sink;
-}
-
-void TaskAsyncConnect::setSource(source_t source) {
- m_ParamSource = source;
-}
-
-sink_t TaskAsyncConnect::getSink() {
- return m_ParamSink;
-}
-
-source_t TaskAsyncConnect::getSource() {
- return m_ParamSource;
-}
-
-void TaskAsyncConnect::slot_connect_finished(genHandle_t handle,
- genError_t error) {
-// if (handle == m_handle && error == GEN_OK) {
-// m_timer->stop();
-// delete m_timer;
-// m_timer = NULL;
-// DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Connect returned"));
-// emit signal_nextTask();
-// } else {
-// DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Somethings wrong with the connection"));
-// }
-}
-
-/**
- * \todo handle this event better.
- */
-void TaskAsyncConnect::slot_timeout() {
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Connection timed out"));
-}
-
-TaskConnect::TaskConnect(AudioManagerCore* core, sink_t sink, source_t source) :
- Task(core), m_ParamSink(sink), m_ParamSource(source) {
-}
-
-TaskConnect::~TaskConnect() {
-}
-
-void TaskConnect::executeTask(Queue* queue) {
-// QObject::connect((const QObject*) this, SIGNAL(signal_nextTask()),
-// (const QObject*) queue, SLOT(slot_nextTask()));
-// DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Started Syncronous Connect"));
- m_core->connect(m_ParamSource, m_ParamSink);
- //emit signal_nextTask();
-}
-
-TaskDisconnect::TaskDisconnect(AudioManagerCore* core, connection_t ID) :
- Task(core), m_ParamConnectionID(ID) {
-}
-
-TaskDisconnect::~TaskDisconnect() {
-}
-
-void TaskDisconnect::executeTask(Queue* queue) {
-// QObject::connect((const QObject*) this, SIGNAL(signal_nextTask()),
-// (const QObject*) queue, SLOT(slot_nextTask()));
- m_core->disconnect(m_ParamConnectionID);
-// emit signal_nextTask();
-}
-
-TaskInterruptWait::TaskInterruptWait(AudioManagerCore* core,
- genInt_t interruptID) :
- Task(core), m_interruptID(interruptID) {
-}
-
-TaskInterruptWait::~TaskInterruptWait() {
-
-}
-
-void TaskInterruptWait::executeTask(Queue* queue) {
-// QObject::connect((const QObject*) this, SIGNAL(signal_nextTask()),
-// (const QObject*) queue, SLOT(slot_nextTask()));
-// QObject::connect((const QObject*) m_core->returnCommandInterface(),
-// SIGNAL(signal_interruptResume(genInt_t)), (const QObject*) this,
-// SLOT(slot_interrupt_ready(genInt_t)));
-}
-
-void TaskInterruptWait::slot_interrupt_ready(genInt_t ID) {
- if (ID == m_interruptID) {
- //emit signal_nextTask();
- }
-}
-
-TaskSetVolume::TaskSetVolume(AudioManagerCore* core, volume_t newVolume,
- sink_t sink) :
- Task(core), m_volume(newVolume), m_sink(sink) {
-
-}
-
-TaskSetVolume::~TaskSetVolume() {
-}
-
-void TaskSetVolume::setVolume(volume_t newVolume) {
- m_volume = newVolume;
-}
-
-void TaskSetVolume::setSink(sink_t sink) {
- m_sink = sink;
-}
-
-volume_t TaskSetVolume::getVolume() {
- return m_volume;
-}
-
-sink_t TaskSetVolume::getSink() {
- return m_sink;
-}
-
-void TaskSetVolume::executeTask(Queue* queue) {
-// QObject::connect((const QObject*) this, SIGNAL(signal_nextTask()),
-// (const QObject*) queue, SLOT(slot_nextTask()));
-// DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Started Changed Volume"));
- m_core->setVolume(m_sink, m_volume);
-// emit signal_nextTask();
-}
-
-TaskSetSourceVolume::TaskSetSourceVolume(AudioManagerCore* core,
- volume_t newVolume, source_t source) :
- Task(core), m_volume(newVolume), m_source(source) {
-
-}
-
-TaskSetSourceVolume::~TaskSetSourceVolume() {
-
-}
-
-void TaskSetSourceVolume::setVolume(volume_t newVolume) {
- m_volume = newVolume;
-}
-
-void TaskSetSourceVolume::setSource(source_t source) {
- m_source = source;
-}
-
-volume_t TaskSetSourceVolume::getVolume() {
- return m_volume;
-}
-source_t TaskSetSourceVolume::getSource() {
- return m_source;
-}
-
-void TaskSetSourceVolume::executeTask(Queue* queue) {
-// QObject::connect((const QObject*) this, SIGNAL(signal_nextTask()),
-// (const QObject*) queue, SLOT(slot_nextTask()));
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Started Changed Source Volume"));
- m_core->setSourceVolume(m_source, m_volume);
-// emit signal_nextTask();
-}
-
-TaskWait::TaskWait(AudioManagerCore* core, int mseconds) :
- Task(core), m_ParamMSeconds(mseconds) {
-}
-
-TaskWait::~TaskWait() {
-}
-
-void TaskWait::setTime(int mseconds) {
- m_ParamMSeconds = mseconds;
-}
-
-int TaskWait::getTime() {
- return m_ParamMSeconds;
-}
-
-void TaskWait::executeTask(Queue* queue) {
-// QObject::connect((const QObject*) this, SIGNAL(signal_nextTask()),
-// (const QObject*) queue, SLOT(slot_nextTask()));
-// m_timer = new QTimer();
-// m_timer->setSingleShot(true);
-// QObject::connect(m_timer, SIGNAL(timeout()), (const QObject*) this,
-// SLOT(slot_timeIsup()));
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Start Sleep "));
-// m_timer->start(m_ParamMSeconds);
-}
-
-void TaskWait::slot_timeIsup() {
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Stop Sleep "));
-// m_timer->stop();
-// emit signal_nextTask();
-}
-
-TaskEnterUserConnect::TaskEnterUserConnect(AudioManagerCore* core,
- genRoute_t route, connection_t connID) :
- Task(core), m_route(route), m_connectionID(connID) {
-}
-
-TaskEnterUserConnect::~TaskEnterUserConnect() {
-}
-
-void TaskEnterUserConnect::setConnection(genRoute_t route, connection_t connID) {
- m_route = route;
- m_connectionID = connID;
-}
-
-genRoute_t TaskEnterUserConnect::returnConnection() {
- return m_route;
-}
-
-void TaskEnterUserConnect::executeTask(Queue* queue) {
-// QObject::connect((const QObject*) this, SIGNAL(signal_nextTask()),
-// (const QObject*) queue, SLOT(slot_nextTask()));
- m_core->returnDatabaseHandler()->updateMainConnection(m_connectionID,
- m_route);
-// emit signal_nextTask();
-}
-
-TaskRemoveUserConnect::TaskRemoveUserConnect(AudioManagerCore* core,
- connection_t connID) :
- Task(core), m_connectionID(connID) {
-}
-
-TaskRemoveUserConnect::~TaskRemoveUserConnect() {
-
-}
-
-void TaskRemoveUserConnect::setConnectionID(connection_t connID) {
- m_connectionID = connID;
-}
-
-connection_t TaskRemoveUserConnect::returnConnectionID() {
- return m_connectionID;
-}
-
-void TaskRemoveUserConnect::executeTask(Queue* queue) {
-// QObject::connect((const QObject*) this, SIGNAL(signal_nextTask()),
-// (const QObject*) queue, SLOT(slot_nextTask()));
- m_core->returnDatabaseHandler()->removeMainConnection(m_connectionID);
-// emit signal_nextTask();
-}
-
-TaskEnterInterrupt::TaskEnterInterrupt(AudioManagerCore* core, genInt_t ID,
- bool mixed, connection_t connID, std::list<source_t> listInterruptedSources) :
- Task(core), m_intID(ID), m_mixed(mixed), m_connectionID(connID),
- m_interruptedSourcesList(listInterruptedSources) {
-}
-
-TaskEnterInterrupt::~TaskEnterInterrupt() {
-}
-
-void TaskEnterInterrupt::executeTask(Queue* queue) {
-// QObject::connect((const QObject*) this, SIGNAL(signal_nextTask()),
-// (const QObject*) queue, SLOT(slot_nextTask()));
- m_core->returnDatabaseHandler()->updateInterrupt(m_intID, m_connectionID,
- m_mixed, m_interruptedSourcesList);
-// emit signal_nextTask();
-}
-
-TaskRemoveInterrupt::TaskRemoveInterrupt(AudioManagerCore* core, genInt_t ID) :
- Task(core), m_intID(ID) {
-}
-
-TaskRemoveInterrupt::~TaskRemoveInterrupt() {
-}
-
-void TaskRemoveInterrupt::executeTask(Queue* queue) {
-// QObject::connect((const QObject*) this, SIGNAL(signal_nextTask()),
-// (const QObject*) queue, SLOT(slot_nextTask()));
- m_core->returnDatabaseHandler()->removeInterrupt(m_intID);
-// emit signal_nextTask();
-}
-
-TaskSetSourceMute::TaskSetSourceMute(AudioManagerCore* core, source_t source) :
- Task(core), m_source(source) {
-}
-
-TaskSetSourceMute::~TaskSetSourceMute() {
-}
-
-void TaskSetSourceMute::executeTask(Queue* queue) {
-// QObject::connect((const QObject*) this, SIGNAL(signal_nextTask()),
-// (const QObject*) queue, SLOT(slot_nextTask()));
- m_core->setSourceMute(m_source);
-// emit signal_nextTask();
-}
-
-TaskSetSourceUnmute::TaskSetSourceUnmute(AudioManagerCore* core,
- source_t source) :
- Task(core), m_source(source) {
-}
-
-TaskSetSourceUnmute::~TaskSetSourceUnmute() {
-}
-
-void TaskSetSourceUnmute::executeTask(Queue* queue) {
-// QObject::connect((const QObject*) this, SIGNAL(signal_nextTask()),
-// (const QObject*) queue, SLOT(slot_nextTask()));
- m_core->setSourceUnMute(m_source);
-// emit signal_nextTask();
-}
-
-TaskEmitSignalConnect::TaskEmitSignalConnect(AudioManagerCore* core) :
- Task(core) {
-}
-
-TaskEmitSignalConnect::~TaskEmitSignalConnect() {
-}
-
-void TaskEmitSignalConnect::executeTask(Queue* queue) {
-// QObject::connect((const QObject*) this, SIGNAL(signal_nextTask()),
-// (const QObject*) queue, SLOT(slot_nextTask()));
- m_core->emitSignalConnect();
-// emit signal_nextTask();
-}
-
-Queue::Queue(AudioManagerCore* core, std::string name) :
- m_core(core), m_currentIndex(0), m_name(name), m_taskList(std::list<Task*> ()) {
- m_core->addQueue(this);
-}
-
-Queue::~Queue() {
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("shoot all tasks"));
-// foreach (Task* task, m_taskList) {
-// delete task;
-// }
- m_core->removeQueue(this);
-}
-
-void Queue::run() {
- if (m_taskList.empty() == false) {
- Task* task = m_taskList.front();
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Started to execute Task"));
- task->executeTask(this);
- } else {
- DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("empty tasklist was attempted to run "));
- }
-
-}
-
-void Queue::slot_nextTask() {
- m_currentIndex++;
-// if (m_currentIndex < m_taskList.size()) {
-// //m_currentIndex->executeTask(*this);
-// } else {
-// DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Finished all Tasks"));
-// this->~Queue();
-// }
-}
-
-void Queue::addTask(Task* task) {
- m_taskList.push_back(task);
-}
-
-genError_t Queue::removeTask(Task* task) {
-// if (m_taskList.remove(task) > 0) {
-// return GEN_OK;
-// }
- return GEN_OUTOFRANGE;
- void addQueue(Queue* queue);
-
-}
-
-std::list<Task*> Queue::getTaskList() {
- return m_taskList;
-}
-
-std::string Queue::returnName() {
- return m_name;
-}
-
-AudioManagerCore::AudioManagerCore() :
- m_queueList(std::list<Queue*> ()),m_dbusHandler(0) {
-}
-
-AudioManagerCore::~AudioManagerCore() {
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("delete all running queues"));
- std::list<Queue*>::iterator qIterator;
- for(qIterator=m_queueList.begin();qIterator!=m_queueList.end();qIterator++) {
- delete *qIterator;
- }
-}
-
-Router* AudioManagerCore::returnRouter() {
- return m_router;
-}
-
-DataBaseHandler* AudioManagerCore::returnDatabaseHandler() {
- return m_databaseHandler;
-}
-
-RoutingReceiver* AudioManagerCore::returnReceiver() {
- return m_receiver;
-}
-
-CommandInterface* AudioManagerCore::returnCommandInterface() {
- return m_command;
-}
-
-void AudioManagerCore::registerBushandler(Bushandler* handler) {
- m_busHandler = handler;
-}
-
-void AudioManagerCore::registerDatabasehandler(DataBaseHandler* handler) {
- m_databaseHandler = handler;
-}
-
-void AudioManagerCore::registerRouter(Router* router) {
- m_router = router;
-}
-
-void AudioManagerCore::registerHookEngine(HookHandler* handler) {
- m_hookHandler = handler;
-}
-
-void AudioManagerCore::registerReceiver(RoutingReceiver* receiver) {
- m_receiver = receiver;
-}
-
-void AudioManagerCore::registerCommandInterface(CommandInterface* command) {
- m_command = command;
-}
-
-genError_t AudioManagerCore::UserConnect(source_t source, sink_t sink) {
- Queue* userConnectionRequestQ = new Queue(this, "User Connect");
- m_hookHandler->fireHookUserConnectionRequest(userConnectionRequestQ,
- source, sink);
- userConnectionRequestQ->run();
- return GEN_OK;
-}
-
-genError_t AudioManagerCore::UserDisconnect(connection_t connID) {
- Queue* userDisconnectionRequestQ = new Queue(this, "User Disconnect");
- m_hookHandler->fireHookUserDisconnectionRequest(userDisconnectionRequestQ,
- connID);
- userDisconnectionRequestQ->run();
- return GEN_OK;
-}
-
-genError_t AudioManagerCore::UserSetVolume(sink_t sink, volume_t volume) {
- m_hookHandler->fireHookVolumeChange(volume, sink);
- return GEN_OK;
-}
-
-std::list<ConnectionType> AudioManagerCore::getListConnections() {
- return m_databaseHandler->getListAllMainConnections();
-}
-
-std::list<SinkType> AudioManagerCore::getListSinks() {
- std::list<SinkType> sinkList;
- m_databaseHandler->getListofSinks(&sinkList);
- return sinkList;
-}
-
-std::list<SourceType> AudioManagerCore::getListSources() {
- std::list<SourceType> sourceList;
- m_databaseHandler->getListofSources(&sourceList);
- return sourceList;
-}
-
-void AudioManagerCore::emitSignalConnect() {
-// emit signal_connecionChanged();
-}
-
-genError_t AudioManagerCore::connect(source_t source, sink_t sink,
- genHandle_t* handle) {
- genHandle_t localhandle;
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Connect"), DLT_INT(source), DLT_STRING(" to "), DLT_INT(sink));
- domain_t domainID = m_databaseHandler->get_Domain_ID_from_Source_ID(source);
- RoutingSendInterface* iface = m_busHandler->getInterfaceforBus(
- m_databaseHandler->get_Bus_from_Domain_ID(domainID));
- localhandle = m_databaseHandler->insertConnection(source, sink);
-
- if (handle) {
- *handle = localhandle;
- }
- iface->connect(source, sink, localhandle);
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Connect finished"));
- return GEN_OK;
- /**
- * \todo implement error handling
- */
-}
-
-genError_t AudioManagerCore::disconnect(connection_t ID) {
- domain_t domainID = m_databaseHandler->get_Domain_ID_from_Connection_ID(ID);
- RoutingSendInterface* iface = m_busHandler->getInterfaceforBus(
- m_databaseHandler->get_Bus_from_Domain_ID(domainID));
- iface->disconnect(ID);
- m_databaseHandler->removeConnection(ID);
- return GEN_OK;
- /**
- * \todo failure handling
- */
-}
-
-genError_t AudioManagerCore::setVolume(sink_t sink, volume_t volume) {
- RoutingSendInterface* iface = m_busHandler->getInterfaceforBus(
- m_databaseHandler->get_Bus_from_Domain_ID(
- m_databaseHandler->get_Domain_ID_from_Sink_ID(sink)));
- iface->setSinkVolume(volume, sink);
- return GEN_OK;
- /**
- * \todo failure handling
- */
-}
-
-genError_t AudioManagerCore::interruptRequest(source_t interruptSource,
- sink_t sink, genInt_t* interrupt) {
- Queue* interruptRequestQ = new Queue(this, "Interrupt Request");
- m_hookHandler->fireHookInterruptRequest(interruptRequestQ, interruptSource,
- sink, interrupt);
- interruptRequestQ->run();
- return GEN_OK;
-}
-
-genError_t AudioManagerCore::setSourceVolume(source_t source, volume_t volume) {
- RoutingSendInterface* iface = m_busHandler->getInterfaceforBus(
- m_databaseHandler->get_Bus_from_Domain_ID(
- m_databaseHandler->get_Domain_ID_from_Source_ID(source)));
- iface->setSourceVolume(volume, source);
- return GEN_OK;
-}
-
-genError_t AudioManagerCore::setSourceMute(source_t source) {
- RoutingSendInterface* iface = m_busHandler->getInterfaceforBus(
- m_databaseHandler->get_Bus_from_Domain_ID(
- m_databaseHandler->get_Domain_ID_from_Source_ID(source)));
- iface->muteSource(source);
- return GEN_OK;
-}
-
-genError_t AudioManagerCore::setSourceUnMute(source_t source) {
- RoutingSendInterface* iface = m_busHandler->getInterfaceforBus(
- m_databaseHandler->get_Bus_from_Domain_ID(
- m_databaseHandler->get_Domain_ID_from_Source_ID(source)));
- iface->unmuteSource(source);
- return GEN_OK;
-}
-
-genError_t AudioManagerCore::getRoute(const bool onlyfree,
- const source_t source, const sink_t sink, std::list<genRoute_t>* ReturnList) {
- m_hookHandler->fireHookRoutingRequest(onlyfree, source, sink, ReturnList);
- return GEN_OK;
-}
-
-connection_t AudioManagerCore::returnConnectionIDforSinkSource(sink_t sink,
- source_t source) {
- return m_databaseHandler->getConnectionID(source, sink);
-}
-
-genError_t AudioManagerCore::removeQueue(Queue* queue) {
-// if (m_queueList.remove(*queue)) {
-// return GEN_OK;
-// } else {
-// return GEN_OUTOFRANGE;
-// }
-}
-
-source_t AudioManagerCore::returnSourceIDfromName(const std::string name) {
- return m_databaseHandler->get_Source_ID_from_Name(name);
-}
-
-sink_t AudioManagerCore::returnSinkIDfromName(const std::string name) {
- return m_databaseHandler->get_Sink_ID_from_Name(name);
-}
-
-void AudioManagerCore::addQueue(Queue* queue) {
- m_queueList.push_back(queue);
-}
-
-std::list<std::string> AudioManagerCore::getSharedLibrariesFromDirectory(std::string dirName) {
-
- std::list<std::string> fileList;
- // open directory
- DIR *directory = opendir(dirName.c_str());
- if (!directory)
- {
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Error opening directory "),DLT_STRING(dirName.c_str()));
- return fileList;
- }
-
- // iterate content of directory
- struct dirent *itemInDirectory = 0;
- while ((itemInDirectory = readdir(directory)))
- {
- unsigned char entryType = itemInDirectory->d_type;
- std::string entryName = itemInDirectory->d_name;
-
- bool regularFile = (entryType == DT_REG);
- bool sharedLibExtension = ("so" == entryName.substr(entryName.find_last_of(".") + 1));
-
- if (regularFile && sharedLibExtension)
- {
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("PluginSearch adding file "),DLT_STRING(entryName.c_str()));
- fileList.push_back(dirName + "/" + entryName);
- }
- else
- {
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("PluginSearch ignoring file "),DLT_STRING(entryName.c_str()));
- }
- }
-
- closedir(directory);
- return fileList;
-}
-
-void AudioManagerCore::registerDbusRootHandler(dbusRoothandler* handler){
- m_dbusHandler=handler;
-}
-
-dbusRoothandler* AudioManagerCore::returnDbusHandler(){
- return m_dbusHandler;
-}
-
-
-
-
-
-
+++ /dev/null
-/**
- * Copyright (C) 2011, BMW AG
- *
- * AudioManangerDeamon
- *
- * \file AudioManagerCore.h
- *
- * \date 20.05.2011
- * \author Christian Müller (christian.ei.mueller@bmw.de)
- *
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
- *
- *
- */
-
-#ifndef AUDIOMANAGERCORE_H_
-#define AUDIOMANAGERCORE_H_
-
-
-#include "audioManagerIncludes.h"
-
-/**CONSTANT for the Connection timeout when using asynchronous connect. In mseconds.
- *
- */
-#define CONNECT_TIMEOUT 3000
-
-class HookHandler;
-class AudioManagerCore;
-class Queue;
-class Router;
-class Bushandler;
-class CommandInterface;
-
-/**
- * \class Task
- * \brief Base Class for all Tasks
- * \details a Base Class for a basic operation together with a set of parameters
- * Every Task that can be created by the Hook Plugins is derived from this class
- * Be sure to implement executeTask() because this will be called when the task is executed
- * Whenever the task is finished, you need to emit the signal signal_nextTask() that will call the next
- * Task in the queue.
- * \fn virtual void Task::executeTask(Queue* queue)=0
- * \brief This needs to be overwritten in implementation of the class
- * The queue calls this function to start the execution of the task
- * \param queue pointer to the queue
- * \fn void Task::signal_nextTask()
- * \brief by emitting this signal, the next task in the queue is triggered
- */
-class Task {
-public:
- Task();
- Task(AudioManagerCore* core);
- virtual ~Task();
- virtual void executeTask(Queue* queue)=0;
-
- void signal_nextTask();
-protected:
- AudioManagerCore* m_core; //!< pointer to the core
-};
-
-/**
- * \class TaskAsyncConnect
- * \brief This task is used to connect a source and a sink asynchronous
- *
- * \fn TaskAsyncConnect::TaskAsyncConnect(AudioManagerCore* core, sink_t sink, source_t source)
- * \brief Constructor
- * \param core pointer to the core
- * \param sink the sink to be connected
- * \param source the source to be connected
- *
- * \fn void TaskAsyncConnect::setSink(sink_t sink)
- * \brief Sets the Sink that should be connected to
- * \param sink the sink
- *
- * \fn void TaskAsyncConnect::setSource(source_t source)
- * \brief sets the source
- * \param source the source
- *
- * \fn sink_t TaskAsyncConnect::getSink()
- * \brief returns the sink
- *
- * \fn source_t TaskAsyncConnect::getSource()
- * \brief returns the source
- *
- * \fn void TaskAsyncConnect::slot_connect_finished(genHandle_t handle, genError_t error)
- * \brief is used to receive the asynchronous answer.
- *
- * \fn void TaskAsyncConnect::slot_timeout()
- * \brief used to handle the timeout
- */
-class TaskAsyncConnect: public Task {
-
-public:
- TaskAsyncConnect(AudioManagerCore* core, sink_t sink, source_t source);
- virtual ~TaskAsyncConnect();
- void setSink(sink_t sink);
- void setSource(source_t source);
- sink_t getSink();
- source_t getSource();
- void executeTask(Queue* queue);
-
- void slot_connect_finished(genHandle_t handle, genError_t error);
- void slot_timeout();
-private:
- sink_t m_ParamSink; //!< the sink to be connected
- source_t m_ParamSource; //!< the source to be connected
- genHandle_t m_handle; //!< the handle (ConnectionID)
- //QTimer* m_timer; //!< pointer to a timer used for timeout tracking
- /**
- * \todo implement non QT Timer
- */
-};
-
-/**
- * \class TaskConnect
- * \brief This task is used to connect a source and a sink synchronous
- *
- * \fn TaskConnect::TaskConnect(AudioManagerCore* core, sink_t sink, source_t source)
- * \brief constructor
- * \param core pointer to the core
- * \param sink the sink to be connected
- * \param source the source to be connected
- *
- */
-class TaskConnect: public Task {
-
-public:
- TaskConnect(AudioManagerCore* core, sink_t sink, source_t source);
- virtual ~TaskConnect();
- void executeTask(Queue* queue);
-
-private:
- sink_t m_ParamSink; //!< the sink to be connected
- source_t m_ParamSource; //!< the source to be connected
-};
-
-/**
- * \class TaskDisconnect
- * \brief This task is used to connect a source and a sink synchronous
- *
- * \fn TaskDisconnect::TaskDisconnect(AudioManagerCore* core, connection_t ID)
- * \brief constructor
- * \param core pointer to the core
- * \param ID the connection ID to be disconnected
- *
- */
-class TaskDisconnect: public Task {
-
-public:
- TaskDisconnect(AudioManagerCore* core, connection_t ID);
- virtual ~TaskDisconnect();
- void executeTask(Queue* queue);
-private:
- connection_t m_ParamConnectionID; //!< the connection to disconnect
-};
-
-/**
- * \class TaskInterruptWait
- * \brief this class waits for an interrupt to be resumed
- *
- * \fn TaskInterruptWait::TaskInterruptWait(AudioManagerCore* core, genInt_t connectionID)
- * \brief Constructor
- * \param core link to AudioManagercore
- * \param connectionID the connection ID to be waited for
- *
- * \fn void TaskInterruptWait::slot_interrupt_ready(genInt_t ID)
- * \brief slot that is called when the interrupt resumes
- * \param ID the interrupt ID of the interrupt that resumed
- */
-class TaskInterruptWait: public Task {
-
-public:
- TaskInterruptWait(AudioManagerCore* core, genInt_t connectionID);
- virtual ~TaskInterruptWait();
- void executeTask(Queue* queue);
-
- void slot_interrupt_ready(genInt_t ID);
-private:
- genInt_t m_interruptID; //!< the interrupt ID that should be waited for
-};
-
-/**
- * \class TaskSetVolume
- * \brief a task that sets the volume for a sink
- *
- * \fn TaskSetVolume::TaskSetVolume(AudioManagerCore* core, volume_t newVolume=0, sink_t sink=0)
- * \brief constructor
- * \param core the pointer to the AudioManagerCore
- * \param newVolume the volume to be set
- * \param sink the sink that the volume shall be applied to
- *
- * \fn void TaskSetVolume::setVolume(volume_t newVolume)
- * \brief sets the volume
- *
- * \fn void TaskSetVolume::setSink(sink_t sink)
- * \brief sets the sink
- *
- * \fn volume_t TaskSetVolume::getVolume()
- * \brief returns the volume
- *
- * \fn sink_t TaskSetVolume::getSink()
- * \brief returns the volume
- */
-class TaskSetVolume: public Task {
-
-public:
- TaskSetVolume(AudioManagerCore* core, volume_t newVolume=0, sink_t sink=0);
- virtual ~TaskSetVolume();
-
- void setVolume(volume_t newVolume);
- void setSink(sink_t sink);
-
- volume_t getVolume();
- sink_t getSink();
-
- void executeTask(Queue* queue);
-private:
- volume_t m_volume; //!< the volume
- sink_t m_sink; //!< the sink
-};
-
-/**
- * \class TaskSetSourceVolume
- * \brief sets the volume of a source
- *
- * \fn TaskSetSourceVolume::TaskSetSourceVolume(AudioManagerCore* core, volume_t newVolume=0, source_t source=0)
- * \brief constructor
- * \param core the pointer to the AudioManagerCore
- * \param newVolume the volumesink_t to be set
- * \param source the source that the volume shall be applied to
- *
- * * \fn void TaskSetSourceVolume::setVolume(volume_t newVolume)
- * \brief sets the volume
- *
- * \fn void TaskSetSourceVolume::setSource (source_t source)
- * \brief sets the sink
- *
- * \fn volume_t TaskSetSourceVolume::getVolume()
- * \brief returns the volume
- */
-class TaskSetSourceVolume: public Task {
-
-public:
- TaskSetSourceVolume(AudioManagerCore* core, volume_t newVolume=0, source_t source=0);
- virtual ~TaskSetSourceVolume();
-
- void setVolume(volume_t newVolume);
- void setSource(source_t source);
-
- volume_t getVolume();
- source_t getSource();
-
- void executeTask(Queue* queue);
-private:
- volume_t m_volume; //!< the volume
- source_t m_source; //!< the source
-};
-
-/**
- * \class TaskWait
- * \brief implements a wait in msecons
- *
- * \fn TaskWait::TaskWait(AudioManagerCore* core, int mseconds)
- * \brief constructor
- * \param core the pointer to the AudioManagerCore
- * \param mseconds delay in milliseconds
- *
- * \fn void TaskWait::setTime(int mseconds)
- * \brief sets the time
- *
- * \fn int TaskWait::getTime()
- * \brief returns the time
- *
- * \fn void TaskWait::slot_timeIsup()
- * \brief slot called when the time is up
- */
-class TaskWait: public Task {
-
-public:
- TaskWait(AudioManagerCore* core, int mseconds);
- virtual ~TaskWait();
- void setTime(int mseconds);
- int getTime();
- void executeTask(Queue* queue);
- void slot_timeIsup();
-private:
- int m_ParamMSeconds;//!< time to be delayed in milli seconds
-// QTimer* m_timer; //!< pointer to timer
- /**
- *\todo replace Qtimer
- */
-};
-
-/**
- * \class TaskEnterUserConnect
- * \brief This task enters the user connection into the struct of the AudioManagerCore
- * \details We need this because the connection shall be entered not before it is build up
- *
- * \fn TaskEnterUserConnect::TaskEnterUserConnect(AudioManagerCore* core, genRoute_t route, connection_t connID=0)
- * \brief enters a user connect into the database
- */
-class TaskEnterUserConnect: public Task {
-
-public:
- TaskEnterUserConnect(AudioManagerCore* core, genRoute_t route, connection_t connID=0);
- virtual ~TaskEnterUserConnect();
- void setConnection(genRoute_t route, connection_t connID);
- genRoute_t returnConnection();
- void executeTask(Queue* queue);
-private:
- genRoute_t m_route; //!< the route to be entered
- connection_t m_connectionID; //!< the connection ID
-};
-
-/**
- * \class TaskRemoveUserConnect
- * \brief removes a user Connect
- *
- * \fn TaskRemoveUserConnect::TaskRemoveUserConnect(AudioManagerCore* core, connection_t connID)
- * \brief constructor
- */
-class TaskRemoveUserConnect : public Task {
-
-public:
- TaskRemoveUserConnect(AudioManagerCore* core, connection_t connID);
- virtual ~TaskRemoveUserConnect();
- void setConnectionID(connection_t connID);
- connection_t returnConnectionID();
- void executeTask(Queue* queue);
-private:
- connection_t m_connectionID; //!< the connection ID
-};
-
-/**
- * \class TaskEnterInterrupt
- * \brief enters an interrupt into the database
- */
-class TaskEnterInterrupt: public Task {
-
-public:
- TaskEnterInterrupt(AudioManagerCore* core, genInt_t ID,bool mixed, connection_t connID, std::list<source_t> listInterruptedSources);
- virtual ~TaskEnterInterrupt();
- void executeTask(Queue* queue);
-private:
- genInt_t m_intID; //!< the interrupt ID
- bool m_mixed; //!< true if mixed
- connection_t m_connectionID; //!< the connection ID
- std::list<source_t> m_interruptedSourcesList; //!< the list of interrupted sources
-};
-
-/**
- * \class TaskRemoveInterrupt
- * \brief removes an interrupt
- */
-class TaskRemoveInterrupt: public Task {
-
-public:
- TaskRemoveInterrupt(AudioManagerCore* core, genInt_t ID);
- virtual ~TaskRemoveInterrupt();
- void executeTask(Queue* queue);
-private:
- genInt_t m_intID; //!< the interrupt ID
-};
-
-/**
- * \class TaskSetSourceMute
- * \brief mutes a source
- */
-class TaskSetSourceMute: public Task {
-
-public:
- TaskSetSourceMute(AudioManagerCore* core, source_t source);
- virtual ~TaskSetSourceMute();
- void executeTask(Queue* queue);
-private:
- source_t m_source; //!< the source to be muted
-};
-
-/**
- * \class TaskSetSourceUnmute
- * \brief unmutes a source
- */
-class TaskSetSourceUnmute: public Task {
-
-public:
- TaskSetSourceUnmute(AudioManagerCore* core, source_t source);
- virtual ~TaskSetSourceUnmute();
- void executeTask(Queue* queue);
-private:
- source_t m_source; //!< the source to be unmuted
-};
-
-/**
- * \class TaskEmitSignalConnect
- * \brief emits the signal connect
- */
-class TaskEmitSignalConnect: public Task {
-public:
- TaskEmitSignalConnect(AudioManagerCore* core);
- virtual ~TaskEmitSignalConnect();
- void executeTask(Queue* queue);
-};
-
-/**
- * \class Queue
- * \brief With the help of this class, all events that need to be processed are organized and queued
- * \details tasks to be added have to be created with new, after the queue is done all tasks will be deleted and the memory freed.
- * \todo error handling
- * \todo sorting of tasks
- * \todo add some function to attach parameters to the Queue so that organizing and handling is possible
- *
- * \fn Queue::Queue(AudioManagerCore* core,std::string name="")
- * \brief constructor
- * \param name give the queue a name
- * \param core pointer to AudioManagerCore
- *
- * \fn void Queue::run()
- * \brief starts the queue
- *
- * \fn void Queue::addTask(Task* task)
- * \brief add a task to the queue
- * \param task pointer to the task
- *
- * \fn genError_t Queue::removeTask(Task* task)
- * \brief removes a task
- * \param task pointer to the task
- * \return GEN_OK on success
- *
- * \fn std::list<Task*> Queue::getTaskList()
- * \brief returns the actual task list
- * \return list with pointers to the tasks
- *
- * \fn std::string Queue::returnName()
- * \brief returns the name of the Queue
- * \return the name in std::string format
- *
- * \fn void Queue::slot_nextTask()
- * \brief is called when a task is finished and the next task can be called
- */
-class Queue{
-
-public:
- Queue(AudioManagerCore* core,std::string name="");
- virtual ~Queue();
- void run();
- void addTask(Task* task);
- genError_t removeTask(Task* task);
- std::list<Task*> getTaskList();
- std::string returnName();
-
- void slot_nextTask();
-private:
- AudioManagerCore* m_core; //!< pointer to AudioManagerCore
- std::list<Task*>::iterator m_currentIndex; //!< the index of the list wich is currently worked on
- std::string m_name; //!< name of the Queue
- std::list<Task*> m_taskList; //!< the list with pointers to the tasks
-};
-
-/**:3: error: ISO C++ forbids declaration of ‘type name’ with no type
- *
- * \class AudioManagerCore
- * \brief The central Managing Class of the AudioManager
- *
- * \fn genError_t AudioManagerCore::UserConnect(source_t source, sink_t sink)
- * \brief does a user connect
- *
- * \fn genError_t AudioManagerCore::UserDisconnect(connection_t connID)
- * \brief does a user disconnect
- *
- * \fn genError_t AudioManagerCore::UserSetVolume(sink_t sink, volume_t volume)
- * \brief set the user volume (on sink level)
- *
- * \fn genError_t AudioManagerCore::connect(source_t source, sink_t sink, genHandle_t* handle = NULL)
- * \brief connects sources and sinks
- *
- * \fn genError_t AudioManagerCore::disconnect(connection_t ID)
- * \brief disconnects sources and sinks
- *
- * \fn genError_t AudioManagerCore::setVolume(sink_t sink, volume_t volume)
- * \brief sets the volume to a sink
- *
- * \fn genError_t AudioManagerCore::interruptRequest(source_t interruptSource, sink_t sink, genInt_t* interruptID)
- * \brief via this call, an interrupt is requested
- *
- * \fn genError_t AudioManagerCore::setSourceVolume (source_t source, volume_t volume)
- * \brief sets the source volume
- *
- * \fn genError_t AudioManagerCore::setSourceMute (source_t source)
- * \brief mutes a source
- *
- * \fn genError_t AudioManagerCore::setSourceUnMute (source_t source)
- * \brief unmutes a source
- *
- * \fn genError_t AudioManagerCore::getRoute(const bool onlyfree, const source_t source, const sink_t sink, std::list<genRoute_t>* ReturnList)
- * \brief returns a route
- *
- * \fn connection_t AudioManagerCore::returnConnectionIDforSinkSource (sink_t sink, source_t source)
- * \brief returns the connection ID for a sink source combination
- *
- * \fn source_t AudioManagerCore::returnSourceIDfromName(const std::string name)
- * \brief returns the source ID for a name
- *
- * \fn sink_t AudioManagerCore::returnSinkIDfromName(const std::string name)
- * \brief returns the sink ID for a given name
- *
- * \fn std::list<ConnectionType> AudioManagerCore::getListConnections()
- * \brief returns the list of connections
- *
- * \fn std::list<SinkType> AudioManagerCore::getListSinks()
- * \brief returns a list of all sinks
- *
- * \fn std::list<SourceType> AudioManagerCore::getListSources()
- * \brief returns a list of all sources
- *
- * \fn void AudioManagerCore::emitSignalConnect()
- * \brief emits the signal connect
- *
- * \fn Router* AudioManagerCore::returnRouter()
- * \brief returns the pointer to the router
- *
- * \fn DataBaseHandler* AudioManagerCore::returnDatabaseHandler()
- * \brief returns the pointer to the database handler
- *
- * \fn RoutingReceiver* AudioManagerCore::returnReceiver()
- * \brief returns the pointer to the receiver
- *
- * \fn DBusCommandInterface* AudioManagerCore::returnCommandInterface()
- * \brief returns the pointer to the command interface
- *
- * \fn void AudioManagerCore::registerDatabasehandler(DataBaseHandler * handler)
- * \brief registers the database handler @ the core
- *
- * \fn void AudioManagerCore::registerRouter(Router* router)
- * \brief registers the router @ the core
- *
- * \fn void AudioManagerCore::registerBushandler(Bushandler* handler)
- * \brief registers the bushandler @ the core
- *
- * \fn void AudioManagerCore::registerHookEngine(HookHandler* handler)
- * \brief registers the hook engine @ the core
- *
- * \fn void AudioManagerCore::registerReceiver(RoutingReceiver* receiver)
- * \brief registers the receiver @ the core
- *
- * \fn void AudioManagerCore::registerCommandInterface(DBusCommandInterface* command)
- * \brief registers the command interface @ the core
- *
- * \fn void AudioManagerCore::addQueue(Queue* queue)
- * \brief adds a queue
- *
- * \fn genError_t AudioManagerCore::removeQueue(Queue* queue)
- * \brief removes a queue
- *
- *
- */
-class AudioManagerCore {
-
-public:
- AudioManagerCore();
- virtual ~AudioManagerCore();
-
- genError_t UserConnect(source_t source, sink_t sink);
- genError_t UserDisconnect(connection_t connID);
- genError_t UserSetVolume(sink_t sink, volume_t volume);
- genError_t connect(source_t source, sink_t sink, genHandle_t* handle = NULL);
- genError_t disconnect(connection_t ID);
- genError_t setVolume(sink_t sink, volume_t volume);
- genError_t interruptRequest(source_t interruptSource, sink_t sink, genInt_t* interruptID);
- genError_t setSourceVolume (source_t source, volume_t volume);
- genError_t setSourceMute (source_t source);
- genError_t setSourceUnMute (source_t source);
-
- genError_t getRoute(const bool onlyfree, const source_t source, const sink_t sink, std::list<genRoute_t>* ReturnList);
- connection_t returnConnectionIDforSinkSource (sink_t sink, source_t source);
- source_t returnSourceIDfromName(const std::string name);
- sink_t returnSinkIDfromName(const std::string name);
-
- std::list<ConnectionType> getListConnections();
- std::list<SinkType> getListSinks();
- std::list<SourceType> getListSources();
-
- void emitSignalConnect();
-
- Router* returnRouter();
- DataBaseHandler* returnDatabaseHandler();
- RoutingReceiver* returnReceiver();
- CommandInterface* returnCommandInterface();
- dbusRoothandler* returnDbusHandler();
-
- void registerDatabasehandler(DataBaseHandler * handler);
- void registerRouter(Router* router);
- void registerBushandler(Bushandler* handler);
- void registerHookEngine(HookHandler* handler);
- void registerReceiver(RoutingReceiver* receiver);
- void registerCommandInterface(CommandInterface* command);
- void registerDbusRootHandler(dbusRoothandler* handler);
-
- void addQueue(Queue* queue);
- genError_t removeQueue(Queue* queue);
-
- void signal_connectionChanged();
- void signal_numberOfSinksChanged();
- void signal_numberOfSourcesChanged();
-
- std::list<std::string> getSharedLibrariesFromDirectory(std::string dirName);
- template<class T>T* getCreateFunction(std::string libname);
-
-private:
- DataBaseHandler* m_databaseHandler; //!< pointer to the DataBasehandler Class
- Router* m_router; //!< pointer to the Router Class
- Bushandler* m_busHandler; //!< pointer to the Bushandler Class
- HookHandler* m_hookHandler; //!< pointer to the HookHandler CLass
- RoutingReceiver* m_receiver; //!< pointer to the Routing receiver Class
- dbusRoothandler* m_dbusHandler;
- CommandInterface* m_command; //!< pointer to the command Interface Class
-
- std::list<Queue*> m_queueList; //!< List of pointers to all running queues
-};
-
-#endif /* AUDIOMANAGERCORE_H_ */
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}")
set(STD_INCLUDE_DIRS "/usr/include")
-set(EXECUTABLE_OUTPUT_PATH ../../bin/)
-set(DOC_OUTPUT_PATH ../../doc/)
set(DBUS_FOLDER ${CMAKE_SOURCE_DIR}/../dbusInterfaces)
+set(AUDIO_INCLUDES_FOLDER ${CMAKE_SOURCE_DIR}/../includes)
+set(DBUS_INCLUDES_FOLDER ${CMAKE_SOURCE_DIR}/../dbusIncludes)
+set(INCLUDES_FOLDER ${CMAKE_SOURCE_DIR}/include)
set(DOC_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/../doc/AudioManager)
+set(EXECUTABLE_OUTPUT_PATH ../../bin/)
+set(DOC_OUTPUT_PATH ../../doc/)
set(DOCUMENT $ENV{gendoc})
file(MAKE_DIRECTORY ${DOC_OUTPUT_PATH})
FIND_PACKAGE(DBUS REQUIRED)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR} ${STD_INCLUDE_DIRS})
-#all source files go here
-SET(AUDIOMAN_SRCS_CXX
- main.cpp
- AudioManagerCore.cpp
- CommandHandler.cpp
- CommandReceive.cpp
- DataBaseHandler.cpp
- HookEngine.cpp
- Router.cpp
- RoutingReceive.cpp
- dbusRoothandler.cpp
-)
+file(GLOB AUDIOMAN_SRCS_CXX "src/*.cpp")
-INCLUDE_DIRECTORIES(
- include
+INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}
${STD_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}
${DLT_INCLUDE_DIRS}
${DBUS_INCLUDE_DIR}
+ ${AUDIO_INCLUDES_FOLDER}
+ ${INCLUDES_FOLDER}
${DBUS_ARCH_INCLUDE_DIR}
+ ${DBUS_INCLUDES_FOLDER}
)
${CMAKE_THREAD_LIBS_INIT}
)
+add_subdirectory (test)
+
#add a target to generate API documentation with Doxygen
find_package(Doxygen)
if(DOXYGEN_FOUND)
+++ /dev/null
-/*
- * CommandHandler.cpp
- *
- * Created on: Jul 27, 2011
- * Author: christian
- */
-
-#include "CommandHandler.h"
-#include "audioManagerIncludes.h"
-
-const char* commandPluginDirectories[] = { "/home/christian/workspace/gitserver/build/plugins/command"};
-uint commandPluginDirectoriesCount = sizeof(commandPluginDirectories) / sizeof(commandPluginDirectories[0]);
-
-CommandHandler::CommandHandler(AudioManagerCore* core) :m_core(core) {
- // TODO Auto-generated constructor stub
-
-}
-
-CommandHandler::~CommandHandler() {
- // TODO Auto-generated destructor stub
-}
-
-void CommandHandler::registerReceiver(CommandReceiveInterface *iface) {
- m_receiver=iface;
-}
-
-void CommandHandler::loadPlugins(){
- std::list<std::string> sharedLibraryNameList;
-
- for (uint dirIndex = 0; dirIndex < commandPluginDirectoriesCount; ++dirIndex) {
- const char* directoryName = commandPluginDirectories[dirIndex];
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Searching for Command in"),DLT_STRING(directoryName));
- std::list<std::string> newList=m_core->getSharedLibrariesFromDirectory(directoryName);
- sharedLibraryNameList.insert(sharedLibraryNameList.end(),newList.begin(),newList.end());
- }
-
-
- // iterate all communicator plugins and start them
- std::list<std::string>::iterator iter = sharedLibraryNameList.begin();
- std::list<std::string>::iterator iterEnd = sharedLibraryNameList.end();
-
- for (; iter != iterEnd; ++iter)
- {
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Loading Command plugin"),DLT_STRING(iter->c_str()));
-
- CommandSendInterface* (*createFunc)();
- createFunc = getCreateFunction<CommandSendInterface*()>(*iter);
-
- if (!createFunc) {
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Entry point of Communicator not found"));
- continue;
- }
-
- CommandSendInterface* CommandPlugin = createFunc();
-
-
- if (!CommandPlugin) {
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("RoutingPlugin initialization failed. Entry Function not callable"));
- continue;
- }
-
-
- CommandPlugin->startupInterface(m_receiver,m_core->returnDbusHandler());
- DLT_LOG( AudioManager, DLT_LOG_INFO, DLT_STRING("Registered Routing Plugin"));
- m_interfaceList.push_back(CommandPlugin);
- }
-}
-
-
-
+++ /dev/null
-/*
- * CommandHandler.h
- *
- * Created on: Jul 27, 2011
- * Author: christian
- */
-
-#ifndef COMMANDHANDLER_H_
-#define COMMANDHANDLER_H_
-
-#include "audioManagerIncludes.h"
-#include "commandInterface.h"
-
-class CommandReceiveInterface;
-class CommandSendInterface;
-
-
-class CommandHandler {
-public:
- CommandHandler(AudioManagerCore* core);
- void registerReceiver(CommandReceiveInterface* iface);
- virtual ~CommandHandler();
- void loadPlugins();
-private:
- AudioManagerCore* m_core;
- CommandReceiveInterface* m_receiver;
- std::list<CommandSendInterface*> m_interfaceList;
-};
-
-#endif /* COMMANDHANDLER_H_ */
+++ /dev/null
-/*
- * CommandReceive.cpp
- *
- * Created on: Jul 26, 2011
- * Author: christian
- */
-
-#include "CommandReceive.h"
-
-
-CommandReceive::CommandReceive(){
-}
-
-CommandReceive::~CommandReceive() {
-
-}
-
-void CommandReceive::registerAudiomanagerCore(AudioManagerCore *core){
- m_core=core;
-}
-
-
-connection_t CommandReceive::connect(source_t source, sink_t sink) {
- DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("Connect"));
- if (m_core->UserConnect(source, sink) == GEN_OK) {
- return 1;
- }
- return -1;
-
- /**
- * \todo returns a connection_t but this is always one. Somethings not right....
- */
-}
-
-connection_t CommandReceive::disconnect(source_t source, source_t sink) {
-
- genRoute_t ReturnRoute;
- if (int value=m_core->returnDatabaseHandler()->returnMainconnectionIDforSinkSourceID(sink,source)>0) {
- return m_core->UserDisconnect(value);
- } else {
- return -1;
- }
-
- /**
- * \todo not sure if the test of existance of thatconnection should be done here...
- */
-}
-
-std::list<ConnectionType> CommandReceive::getListConnections() {
- return m_core->getListConnections();
-}
-
-std::list<SinkType> CommandReceive::getListSinks() {
- return m_core->getListSinks();
-}
-
-std::list<SourceType> CommandReceive::getListSources() {
- return m_core->getListSources();
-}
-
-genInt_t CommandReceive::interruptRequest(const std::string & SourceName,
- const std::string & SinkName) {
- source_t sourceID = m_core->returnSourceIDfromName(SourceName);
- sink_t sinkID = m_core->returnSinkIDfromName(SinkName);
- genInt_t intID = -1;
- if (m_core->interruptRequest(sourceID, sinkID, &intID) == GEN_OK) {
- return intID;
- }
-
- return -1;
-
- /**
- * \todo need to change something?
- */
-}
-
-interrupt_t CommandReceive::interruptResume(interrupt_t interrupt) {
- /**
- * \todo here a callback mechanism needs to be installed....
- */
-
- return 1;
-}
-
-volume_t CommandReceive::setVolume(sink_t sink, volume_t volume) {
- if (m_core->UserSetVolume(sink, volume) == GEN_OK) {
- return 1;
- }
- return -1;
-}
-
-
-
-
+++ /dev/null
-/*
- * CommandReceive.h
- *
- * Created on: Jul 26, 2011
- * Author: christian
- */
-
-#ifndef COMMANDRECEIVE_H_
-#define COMMANDRECEIVE_H_
-
-#include "commandInterface.h"
-#include "audioManagerIncludes.h"
-
-class CommandReceiveInterface;
-
-class CommandReceive : public CommandReceiveInterface {
-public:
- CommandReceive();
- virtual ~CommandReceive();
-
- void registerAudiomanagerCore(AudioManagerCore* core);
-
- void startupInterface();
- void stop();
- connection_t connect(source_t source, sink_t sink);
- connection_t disconnect(source_t source, source_t sink);
- std::list<ConnectionType> getListConnections();
- std::list<SinkType> getListSinks();
- std::list<SourceType> getListSources();
- genInt_t interruptRequest(const std::string &SourceName, const std::string &SinkName);
- interrupt_t interruptResume(interrupt_t interrupt);
- volume_t setVolume(sink_t sink, volume_t volume);
-private:
- AudioManagerCore* m_core;
-};
-
-#endif /* COMMANDRECEIVE_H_ */
+++ /dev/null
-/**
- * Copyright (C) 2011, BMW AG
- *
- * AudioManangerDeamon
- *
- * \file DataBaseHandler.cpp
- * if (query.exec(command) != true) {
-
- }
- * \date 20.05.2011
- * \author Christian Müller (christian.ei.mueller@bmw.de)
- *
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
- *
- *
- */
-
-#include "DataBaseHandler.h"
-#include <cstdlib>
-#include <fstream>
-#include <stdio.h>
-#include <cstring>
-#include <sstream>
-#include <sqlite3.h>
-
-DataBaseHandler::DataBaseHandler() {
-
- //knock down database
- m_path = "/tmp";
-
- m_path.append("/");
- m_path.append(AUDIO_DATABASE);
- DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("Database path:"), DLT_STRING(m_path.c_str()));
-
- std::ifstream infile(m_path.c_str());
-
- if (infile) {
- remove(m_path.c_str());
- DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("Knocked down database"));
- }
- if (!this->open_database()) {
- DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("Problems with opening the database"));
- }
-}
-
-DataBaseHandler::~DataBaseHandler() {
- this->close_database();
-}
-
-bool DataBaseHandler::pQuery(std::string command) {
- sqlite3_stmt* query;
- if (sqlite3_exec(m_database,command.c_str(),NULL,&query,NULL)!= SQLITE_OK) {
- DLT_LOG( AudioManager, DLT_LOG_ERROR, DLT_STRING("SQL Query failed:"), DLT_STRING(command.c_str()));
- return false;
- }
- return true;
-}
-
-std::string DataBaseHandler::int2string(int i) {
- std::stringstream out;
- out << i;
- return out.str();
-}
-
-bool DataBaseHandler::open_database() {
- if (sqlite3_open_v2(m_path.c_str(), &m_database,SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_FULLMUTEX, NULL) == SQLITE_OK) {
- return true;
- } else {
- return false;
- }
-}
-
-void DataBaseHandler::close_database() {
- DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("Closed Database"));
- sqlite3_close(m_database);
-}
-
-bool DataBaseHandler::delete_data(std::string table) {
- std::string command = "DELETE FROM" + table;
- if (!this->pQuery(command)) return false;
- return true;
-}
-
-bool DataBaseHandler::create_tables() {
- std::string command;
- command="CREATE TABLE " + std::string(DOMAIN_TABLE) + " (ID INTEGER NOT NULL, DomainName VARCHAR(50), BusName VARCHAR(50), NodeName VARCHAR(50), EarlyMode BOOL, PRIMARY KEY(ID));";
- if (!this->pQuery(command)) return false;
-
- command = "CREATE TABLE " + std::string(SOURCE_CLASS_TABLE) + " (ID INTEGER NOT NULL, ClassName VARCHAR(50), VolumeOffset INTEGER, IsInterrupt BOOL, IsMixed BOOL, PRIMARY KEY(ID));";
- if (!this->pQuery(command)) return false;
-
- command = "CREATE TABLE " + std::string(SINK_CLASS_TABLE) + " (ID INTEGER NOT NULL, ClassName VARCHAR(50), PRIMARY KEY(ID));";
- if (!this->pQuery(command)) return false;
-
- command = "CREATE TABLE " + std::string(SOURCE_TABLE) + " (ID INTEGER NOT NULL, Name VARCHAR(50), Class_ID INTEGER, Domain_ID INTEGER, IsGateway BOOL, PRIMARY KEY(ID), FOREIGN KEY (Domain_ID) REFERENCES " + DOMAIN_TABLE + "(ID), FOREIGN KEY (Class_ID) REFERENCES " + SOURCE_CLASS_TABLE + "(ID));";
- if (!this->pQuery(command)) return false;
-
- command = "CREATE TABLE " + std::string(SINK_TABLE) + " (ID INTEGER NOT NULL, Name VARCHAR(50), Class_ID INTEGER, Domain_ID INTEGER, IsGateway BOOL, PRIMARY KEY(ID), FOREIGN KEY (DOMAIN_ID) REFERENCES " + DOMAIN_TABLE + "(ID), FOREIGN KEY (Class_ID) REFERENCES " + SOURCE_CLASS_TABLE + "(ID));";
- if (!this->pQuery(command)) return false;
-
- command = "CREATE TABLE " + std::string(GATEWAY_TABLE) + " (ID INTEGER NOT NULL, Name VARCHAR(50), Sink_ID INTEGER, Source_ID INTEGER, DomainSource_ID INTEGER, DomainSink_ID INTEGER, ControlDomain_ID Integer, IsBlocked BOOL, PRIMARY KEY(ID), FOREIGN KEY (Sink_ID) REFERENCES " + SINK_TABLE + "(ID), FOREIGN KEY (Source_ID) REFERENCES " + SOURCE_TABLE + "(ID),FOREIGN KEY (DomainSource_ID) REFERENCES " + DOMAIN_TABLE + "(ID),FOREIGN KEY (DomainSink_ID) REFERENCES " + DOMAIN_TABLE + "(ID));";
- if (!this->pQuery(command)) return false;
-
- command = "CREATE TABLE " + std::string(CONNECTION_TABLE) + " (ID INTEGER NOT NULL, Source_ID INTEGER, Sink_ID INTEGER, PRIMARY KEY(ID));";
- if (!this->pQuery(command)) return false;
-
- command = "CREATE TABLE " + std::string(INTERRUPT_TABLE) + " (ID INTEGER NOT NULL, Source_ID INTEGER, Sink_ID INTEGER, Connection_ID INTEGER, mixed BOOL, listInterruptedSources INTEGER, PRIMARY KEY(ID));";
- if (!this->pQuery(command)) return false;
-
- command = "CREATE TABLE " + std::string(MAIN_TABLE) + " (ID INTEGER NOT NULL, Source_ID INTEGER, Sink_ID INTEGER, route INTEGER, PRIMARY KEY(ID));";
- if (!this->pQuery(command)) return false;
-
- return true;
-}
-
-domain_t DataBaseHandler::insert_into_Domains_table(std::string DomainName, std::string BusName, std::string NodeName, bool EarlyMode) {
- sqlite3_stmt* query;
- std::string _EarlyMode = "false";
- if (EarlyMode) {
- _EarlyMode = "true";
- }
-
- std::string command = "SELECT BusName,ID FROM " + std::string(DOMAIN_TABLE) + " WHERE DomainName='" + DomainName + "'";
-
- if (SQexecute(command)) {
- if (sqlite3_step(query)==SQLITE_ROW) {
- std::string name((const char*) sqlite3_column_text(query,0));
- if (!name.empty()) {
- return sqlite3_column_int(query,1);
- } else {
- command = "UPDATE " + std::string(DOMAIN_TABLE) + "SET Busname=" + BusName + " Nodename=" + NodeName + " EarlyMode=" + _EarlyMode + " WHERE DomainName=" + DomainName;
- }
- } else {
- command = "INSERT INTO " + std::string(DOMAIN_TABLE) + " (DomainName, BusName, NodeName, EarlyMode) VALUES ('" + DomainName + "','" + BusName + "','" + NodeName + "','" + _EarlyMode + "')";
- }
- }
-
- sqlite3_finalize(query);
-
- if (!this->pQuery(command)) {
- return -1;
- } else {
- return get_Domain_ID_from_Name(DomainName);
- }
-}
-
-sourceClass_t DataBaseHandler::insert_into_Source_Class_table(std::string ClassName, volume_t VolumeOffset, bool IsInterrupt, bool IsMixed) {
- sqlite3_stmt* query;
- std::string _IsInterrupt = "false";
- std::string _IsMixed = "false";
-
- if (IsInterrupt) {
- _IsInterrupt = "true";
- }
- if (IsMixed) {
- _IsMixed = "true";
- }
-
- std::string command = "SELECT ID FROM " + std::string(SOURCE_CLASS_TABLE) + " WHERE ClassName='" + ClassName + "';";
-
- if (SQexecute(command)) {
- if (sqlite3_step(query)==SQLITE_ROW) {
- return sqlite3_column_int(query,0);
- }
- }
-
- command = "INSERT INTO " + std::string(SOURCE_CLASS_TABLE) + " (ClassName, VolumeOffset, IsInterrupt, IsMixed) VALUES ('" + ClassName + "'," + int2string(VolumeOffset) + ",'" + _IsInterrupt + "','" + _IsMixed + "')";
-
- if (!this->pQuery(command)) {
- return -1;
- } else {
- return sqlite3_last_insert_rowid(m_database);
- }
-}
-
-sink_t DataBaseHandler::insert_into_Sink_Class_table(std::string ClassName) {
- sqlite3_stmt* query;
-
- std::string command = "SELECT ID FROM " + std::string(SINK_CLASS_TABLE) + " WHERE ClassName='" + ClassName + "';";
-
- if (SQexecute(command)) {
- if (sqlite3_step(query)) {
- return sqlite3_column_int(query,0);
- }
- }
-
- command = "INSERT INTO " + std::string(SINK_CLASS_TABLE) + " (ClassName) VALUES ('" + ClassName + "')";
-
- if (!this->pQuery(command)) {
- return -1;
- } else {
- return sqlite3_last_insert_rowid(m_database);
- }
-}
-
-source_t DataBaseHandler::insert_into_Source_table(std::string Name, sourceClass_t Class_ID, domain_t Domain_ID, bool IsGateway) {
- sqlite3_stmt* query;
- std::string _IsGateway = "false";
-
- if (IsGateway) {
- _IsGateway = "true";
- }
-
- std::string command = "SELECT ID FROM " + std::string(SOURCE_TABLE) + " WHERE Name='" + Name + "';";
-
- if (SQexecute(command)) {
- if (sqlite3_step(query)==SQLITE_ROW) {
- return sqlite3_column_int(query,0);
- }
- }
-
- command = "INSERT INTO " + std::string(SOURCE_TABLE) + " (Name, Class_ID, Domain_ID, IsGateway) VALUES ('" + Name + "'," + int2string(Class_ID) + ",'" + int2string(Domain_ID) + "','" + _IsGateway + "')";
-
- if (this->pQuery(command)!=true) {
- return -1;
- } else {
- //emit signal_numberOfSourcesChanged();
- return sqlite3_last_insert_rowid(m_database);
- }
-}
-
-sink_t DataBaseHandler::insert_into_Sink_table(std::string Name, sinkClass_t Class_ID, domain_t Domain_ID, bool IsGateway) {
- sqlite3_stmt* query;
- std::string _IsGateway = "false";
-
- if (IsGateway) {
- _IsGateway = "true";
- }
-
- std::string command = "SELECT ID FROM " + std::string(SINK_TABLE) + " WHERE Name='" + Name + "';";
-
- if (SQexecute(command)) {
- if (sqlite3_step(query)==SQLITE_ROW) {
- return sqlite3_column_int(query,0);
- }
- }
-
- command = "INSERT INTO " + std::string(SINK_TABLE) + " (Name, Class_ID, Domain_ID, IsGateway) VALUES ('" + Name + "'," + int2string(Class_ID) + ",'" + int2string(Domain_ID) + "','" + _IsGateway + "')";
-
- if (!this->pQuery(command)) {
- return -1;
- } else {
- return sqlite3_last_insert_rowid(m_database);
- }
-}
-
-gateway_t DataBaseHandler::insert_into_Gatway_table(std::string Name, sink_t Sink_ID, source_t Source_ID, domain_t DomainSource_ID, domain_t DomainSink_ID, domain_t ControlDomain_ID) {
- sqlite3_stmt* query;
- std::string command = "SELECT ID FROM " + std::string(GATEWAY_TABLE) + " WHERE Name='" + Name + "';";
-
- if (SQexecute(command)) {
- if (sqlite3_step(query)==SQLITE_ROW) {
- return sqlite3_column_int(query,0);
- }
- }
-
- command = "INSERT INTO " + std::string(GATEWAY_TABLE) + " (Name, Sink_ID, Source_ID, DomainSource_ID, DomainSink_ID, ControlDomain_ID, IsBlocked) VALUES ('" + Name + "'," + int2string(Sink_ID) + "," + int2string(Source_ID) + "," + int2string(DomainSource_ID) + "," + int2string(DomainSink_ID) + "," + int2string(ControlDomain_ID) + ",'false')";
-
- if (!this->pQuery(command)) {
- return -1;
- } else {
- return sqlite3_last_insert_rowid(m_database);
- }
-}
-
-genInt_t DataBaseHandler::reserveInterrupt(sink_t Sink_ID, source_t Source_ID) {
- sqlite3_stmt* query;
- std::string command= "INSERT INTO " + std::string(INTERRUPT_TABLE) + "(Source_ID, Sink_ID) VALUES(:Source_ID, :Sink_ID)";
- sqlite3_prepare_v2(m_database,command.c_str(),NULL,&query,NULL);
- sqlite3_bind_int(query,0, Source_ID);
- sqlite3_bind_int(query,1, Sink_ID);
-
- if (!this->pQuery(command)) {
- return -1;
- } else {
- return sqlite3_last_insert_rowid(m_database);
- }
-}
-
-genError_t DataBaseHandler::updateInterrupt(const genInt_t intID, connection_t connID, bool mixed, std::list<source_t> listInterruptedSources) {
- sqlite3_stmt* query;
- std::string _mixed = "false";
-
- if (mixed) {
- _mixed = "true";
- }
-
- //This information is not handy to be stored directly in the database. So we put it on the heap and store the pointer to it.
- std::list<source_t>* pointer = new std::list<source_t>;
- pointer=&listInterruptedSources;
-
- std::string command="UPDATE " + std::string(INTERRUPT_TABLE) + " SET Connection_ID=:Connection_ID, mixed=:mixed ,listInterruptedSources=:listInterruptedSources WHERE ID=:id";
- sqlite3_prepare_v2(m_database,command.c_str(),NULL,&query,NULL);
- sqlite3_bind_int(query,0,connID);
- sqlite3_bind_text(query,1,_mixed.c_str(),_mixed.size(),NULL);
- sqlite3_bind_int(query,2,int(pointer));
- sqlite3_bind_int(query,3,intID);
-
- if (!this->pQuery(command)) {
- return GEN_DATABASE_ERROR;
- } else {
- return GEN_OK;
- }
-}
-
-genError_t DataBaseHandler::getInterruptDatafromID(const genInt_t intID, connection_t* return_connID, sink_t* return_Sink_ID, source_t* return_Source_ID, bool* return_mixed, std::list<source_t>** return_listInterruptedSources) {
- sqlite3_stmt* query;
- std::string command = "SELECT Connection_ID, Sink_ID, Source_ID, mixed, listInterruptedSources FROM " + std::string(INTERRUPT_TABLE) + " WHERE ID=" + int2string(intID) + ";";
-
- if (SQexecute(command)!=true) {
- return GEN_DATABASE_ERROR;
- } else {
- if (sqlite3_step(query)==SQLITE_ROW) {
- *return_connID = sqlite3_column_int(query,0);
- *return_Sink_ID = sqlite3_column_int(query,1);
- *return_Source_ID = sqlite3_column_int(query,2);
- *return_mixed = sqlite3_column_int(query,3);
- *return_listInterruptedSources = reinterpret_cast<std::list<source_t>*>(sqlite3_column_int(query,4));
- return GEN_OK;
- } else {
- return GEN_UNKNOWN;
- }
- }
-}
-
-genError_t DataBaseHandler::removeInterrupt(const genInt_t intID) {
- sqlite3_stmt* query;
- std::string command = "SELECT listInterruptedSources FROM " + std::string(INTERRUPT_TABLE) + " WHERE ID=" + int2string(intID) + ";";
- if (SQexecute(command) != true) {
- return GEN_DATABASE_ERROR;
- } else {
- if (sqlite3_step(query)==SQLITE_ROW) {
- delete reinterpret_cast<std::list<source_t>*>(sqlite3_column_int(query,0));
- command = "DELETE FROM " + std::string(INTERRUPT_TABLE) + " WHERE ID='" + int2string(intID) + "';";
- if (!this->pQuery(command)) {
- return GEN_DATABASE_ERROR;
- } else {
- return GEN_OK;
- }
- }
- }
- return GEN_UNKNOWN;
-}
-
-domain_t DataBaseHandler::peek_Domain_ID(std::string DomainName) {
- sqlite3_stmt* query;
-
- std::string command = "SELECT ID FROM " + std::string(DOMAIN_TABLE) + " WHERE DomainName='" + DomainName + "';";
-
- if (SQexecute(command)) {
- if (sqlite3_step(query)==SQLITE_ROW) {
- return sqlite3_column_int(query,0);
- } else {
- command = "INSERT INTO " + std::string(DOMAIN_TABLE) + " (DomainName) VALUES ('" + DomainName + "')";
- }
- }
-
- if (!this->pQuery(command)) {
- return -1;
- } else {
- return sqlite3_last_insert_rowid(m_database);
- }
-}
-
-domain_t DataBaseHandler::get_Domain_ID_from_Source_ID(source_t Source_ID) {
- sqlite3_stmt* query;
- std::string command = "SELECT Domain_ID FROM " + std::string(SOURCE_TABLE) + " WHERE ID=" + int2string(Source_ID) + ";";
-
- if (SQexecute(command)) {
- return -1;
- } else {
- sqlite3_step(query);
- return sqlite3_column_int(query,0);
- }
-}
-
-domain_t DataBaseHandler::get_Domain_ID_from_Sink_ID(sink_t Sink_ID) {
- sqlite3_stmt* query;
- std::string command = "SELECT Domain_ID FROM " + std::string(SINK_TABLE) + " WHERE ID=" + int2string(Sink_ID) + ";";
-
- if (SQexecute(command)) {
- return -1;
- } else {
- sqlite3_step(query);
- return sqlite3_column_int(query,0);
- }
-}
-
-source_t DataBaseHandler::get_Source_ID_from_Name(std::string name) {
- sqlite3_stmt* query;
- std::string command = "SELECT ID FROM " + std::string(SOURCE_TABLE) + " WHERE Name='" + name + "';";
-
- if (SQexecute(command)) {
- return -1;
- } else {
- sqlite3_step(query);
- return sqlite3_column_int(query,0);
- }
-}
-
-sourceClass_t DataBaseHandler::get_Source_Class_ID_from_Name(std::string name) {
- sqlite3_stmt* query;
- std::string command = "SELECT ID FROM " + std::string(SOURCE_CLASS_TABLE) + " WHERE ClassName='" + name + "';";
- int p=0;
- if (SQexecute(command)!=true) {
- return -1;
- } else {
- p=sqlite3_step(query);
- if (p==SQLITE_ROW) {
- return sqlite3_column_int(query,0);
- } else {
- p=p+1;
- }
- }
-}
-
-domain_t DataBaseHandler::get_Domain_ID_from_Name(std::string name) {
- sqlite3_stmt* query;
- std::string command = "SELECT ID FROM " + std::string(DOMAIN_TABLE) + " WHERE DomainName='" + name + "';";
-
- if (SQexecute(command)!=true) {
- return -1;
- } else {
- sqlite3_step(query);
- return sqlite3_column_int(query,0);
- }
-}
-
-gateway_t DataBaseHandler::get_Gateway_ID_with_Domain_ID(domain_t startDomain_ID, domain_t targetDomain_ID) {
- sqlite3_stmt* query;
- std::string command = "SELECT ID FROM " + std::string(GATEWAY_TABLE) + " WHERE DomainSource_ID=" + int2string(startDomain_ID) + " AND DomainSink_ID=" + int2string(targetDomain_ID) + ";";
-
- if (SQexecute(command)) {
- return -1;
- } else {
- sqlite3_step(query);
- return sqlite3_column_int(query,0);
- }
-}
-
-genError_t DataBaseHandler::get_Gateway_Source_Sink_Domain_ID_from_ID(gateway_t Gateway_ID, source_t* return_Source_ID, sink_t* return_Sink_ID, domain_t* return_ControlDomain_ID) {
- sqlite3_stmt* query;
- std::string command = "SELECT Source_ID, Sink_ID, ControlDomain_ID FROM " + std::string(GATEWAY_TABLE) + " WHERE ID=" + int2string(Gateway_ID) + ";";
-
- if (SQexecute(command)) {
- return GEN_DATABASE_ERROR;
- } else {
- if (sqlite3_step(query)) {
- *return_Source_ID = sqlite3_column_int(query,0);
- *return_Sink_ID = sqlite3_column_int(query,1);
- *return_ControlDomain_ID = sqlite3_column_int(query,2);
- return GEN_OK;
- } else {
- return GEN_UNKNOWN;
- }
- }
-}
-
-void DataBaseHandler::get_Domain_ID_Tree(bool onlyfree, RoutingTree* Tree, std::list<RoutingTreeItem*>* allItems) {
- sqlite3_stmt* query;
- int RootID = Tree->returnRootDomainID();
- RoutingTreeItem *parent = Tree->returnRootItem();
- std::string _onlyfree = "false";
- unsigned int i = 0;
-
- if (onlyfree) {
- _onlyfree = "true";
- }
-
- std::string command="SELECT ID,DomainSource_ID FROM " + std::string(GATEWAY_TABLE) + " WHERE DomainSink_ID=:id AND IsBlocked=:flag;";
-
- sqlite3_prepare_v2(m_database,command.c_str(),NULL,&query,NULL);
- do {
- sqlite3_bind_int(query,0,RootID);
- sqlite3_bind_text(query,1,_onlyfree.c_str(),_onlyfree.size(),NULL);
- while (sqlite3_step(query)) {
- allItems->push_back(Tree->insertItem(sqlite3_column_int(query,1), sqlite3_column_int(query,0), parent));
- }
- std::list<RoutingTreeItem*>::iterator it=allItems->begin();
- std::advance(it,i);
- RootID = (*it)->returnDomainID();
- i++;
- } while (allItems->size() > i);
-}
-
-std::string DataBaseHandler::get_Bus_from_Domain_ID(domain_t Domain_ID) {
- sqlite3_stmt* query;
- std::string command = "SELECT BusName FROM " + std::string(DOMAIN_TABLE) + " WHERE ID=" + int2string(Domain_ID) + ";";
-
- if (SQexecute(command)) {
- return std::string("");
- } else {
- sqlite3_step(query);
- return std::string((const char*)sqlite3_column_text(query,0));
- }
-}
-
-domain_t DataBaseHandler::get_Domain_ID_from_Connection_ID(connection_t ID) {
- sqlite3_stmt* query;
- std::string command = "SELECT Source_ID FROM " + std::string(CONNECTION_TABLE) + " WHERE ID=" + int2string(ID) + ";";
-
- if (SQexecute(command)) {
- return -1;
- }
-
- sqlite3_step(query);
- int SourceID = sqlite3_column_int(query,0);
- command = "SELECT Domain_ID FROM " + std::string(SOURCE_TABLE) + " WHERE ID=" + int2string(SourceID) + ";";
-
- if (SQexecute(command)) {
- return -1;
- } else {
- sqlite3_step(query);
- return sqlite3_column_int(query,0);
- }
-}
-
-void DataBaseHandler::getListofSources(std::list<SourceType>* SourceList) {
- sqlite3_stmt* query;
- SourceType sType;
- std::string command = "SELECT ID,NAME FROM " + std::string(SOURCE_TABLE) + " WHERE isGateway='false';";
- if (SQexecute(command)) {
- while (sqlite3_step(query)) {
- sType.ID = sqlite3_column_int(query,0);
- sType.name = std::string((const char*)sqlite3_column_text(query,1));
- SourceList->push_back(sType);
- }
- }
-}
-
-void DataBaseHandler::getListofSinks(std::list<SinkType>* SinkList) {
- sqlite3_stmt* query;
- SinkType sType;
- std::string command = "SELECT ID,NAME FROM " + std::string(SINK_TABLE) + ";";
- if (SQexecute(command)) {
- while (sqlite3_step(query)) {
- sType.ID = sqlite3_column_int(query,0);
- sType.name = std::string((const char*)sqlite3_column_text(query,1));
- SinkList->push_back(sType);
- }
- }
-}
-
-void DataBaseHandler::getListofConnections(std::list<ConnectionType>* ConnectionList) {
- sqlite3_stmt* query;
- ConnectionType cType;
- std::string command = "SELECT Source_ID,Sink_ID FROM " + std::string(CONNECTION_TABLE) + ";";
- if (SQexecute(command)) {
- while (sqlite3_step(query)) {
- cType.Source_ID = sqlite3_column_int(query,0);
- cType.Sink_ID = sqlite3_column_int(query,1);
- ConnectionList->push_back(cType);
- }
- }
-}
-
-bool DataBaseHandler::is_source_Mixed(source_t source) {
- sqlite3_stmt* query;
- int classID = 0;
-
- std::string command = "SELECT Class_ID FROM " + std::string(SOURCE_TABLE) + " WHERE ID='" + int2string(source) + "';";
- if (SQexecute(command)) {
- if (sqlite3_step(query)) {
- classID = sqlite3_column_int(query,0);
- }
- }
- command = "SELECT isMixed FROM " + std::string(SOURCE_CLASS_TABLE) + " WHERE ID='" + int2string(classID) + "';";
-
- if (SQexecute(command)) {
- if (sqlite3_step(query)) {
- char* answer=(char*)sqlite3_column_text(query,0);
- if (strcmp(answer,"true") == 0) {
- return true;
- }
- }
- }
- return false;
-}
-
-sink_t DataBaseHandler::get_Sink_ID_from_Name(std::string name) {
- sqlite3_stmt* query;
- std::string command = "SELECT ID FROM " + std::string(SINK_TABLE) + " WHERE Name='" + name + "';";
-
- if (SQexecute(command)) {
- return -1;
- } else {
- sqlite3_step(query);
- return sqlite3_column_int(query,0);
- }
-}
-
-connection_t DataBaseHandler::getConnectionID(source_t SourceID, sink_t SinkID) {
- sqlite3_stmt* query;
- std::string command="SELECT ID FROM " + std::string(MAIN_TABLE) + " WHERE Source_ID=:sourceID AND Sink_ID=:sinkID";
- sqlite3_prepare_v2(m_database,command.c_str(),NULL,&query,NULL);
- sqlite3_bind_int(query,0,SourceID);
- sqlite3_bind_int(query,1,SinkID);
-
- if (SQexecute(command)) {
- return -1;
- } else {
- sqlite3_step(query);
- return sqlite3_column_int(query,0);
- }
-}
-
-connection_t DataBaseHandler::insertConnection(source_t SourceID, sink_t SinkID) {
- std::string command = "INSERT INTO " + std::string(CONNECTION_TABLE) + " (Source_ID, Sink_ID) VALUES (" + int2string(SourceID) + "," + int2string(SinkID) + ");";
- if (!this->pQuery(command)) {
- return -1;
- } else {
- return sqlite3_last_insert_rowid(m_database);
- }
-}
-
-genError_t DataBaseHandler::removeConnection(connection_t ConnectionID) {
- std::string command = "DELETE FROM " + std::string(CONNECTION_TABLE) + " WHERE ID='" + int2string(ConnectionID) + "';";
- if (!this->pQuery(command)) {
- return GEN_DATABASE_ERROR;
- } else {
- return GEN_OK;
- }
-}
-
-connection_t DataBaseHandler::reserveMainConnection(source_t source, sink_t sink) {
- sqlite3_stmt* query;
- std::string command = "INSERT INTO " + std::string(MAIN_TABLE) + "(Source_ID, Sink_ID) VALUES(:Source_ID, :Sink_ID)";
- sqlite3_prepare_v2(m_database,command.c_str(),NULL,&query,NULL);
- sqlite3_bind_int(query,0,source);
- sqlite3_bind_int(query,1,sink);
- if (!this->pQuery(command)) {
- return -1;
- } else {
- return sqlite3_last_insert_rowid(m_database);
- }
-}
-
-genError_t DataBaseHandler::updateMainConnection(connection_t connID, genRoute_t route) {
- sqlite3_stmt* query;
-
- //This information is not handy to be stored directly in the database. So we put it on the heap and store the pointer to it.
- genRoute_t* routeheap = new genRoute_t(route);
-
- std::string command = "UPDATE " + std::string(MAIN_TABLE) + " SET route=:route WHERE ID=:connID";
- sqlite3_prepare_v2(m_database,command.c_str(),NULL,&query,NULL);
- sqlite3_bind_int(query,0,connID);
- sqlite3_bind_int(query,1,int(routeheap));
-
- if (!this->pQuery(command)) {
- return GEN_DATABASE_ERROR;
- } else {
- return GEN_OK;
- }
-}
-
-genError_t DataBaseHandler::getMainConnectionDatafromID(const connection_t connID, sink_t* return_sinkID, source_t* return_sourceID, genRoute_t** return_route) {
- sqlite3_stmt* query;
- std::string command = "SELECT Sink_ID, Source_ID, route FROM " + std::string(MAIN_TABLE) + " WHERE ID=" + int2string(connID) + ";";
-
- if (SQexecute(command)) {
- return GEN_DATABASE_ERROR;
- } else {
- if (sqlite3_step(query)) {
- *return_sinkID = sqlite3_column_int(query,0);
- *return_sourceID = sqlite3_column_int(query,1);
- *return_route = reinterpret_cast<genRoute_t*>(sqlite3_column_int(query,2));
- return GEN_OK;
- } else {
- return GEN_UNKNOWN;
- }
- }
-}
-
-connection_t DataBaseHandler::returnMainconnectionIDforSinkSourceID(sink_t sink, source_t source) {
- sqlite3_stmt* query;
- std::string command="SELECT ID FROM " + std::string(MAIN_TABLE) + " WHERE Sink_ID=:sinkID AND Source_ID=:SourceID";
- sqlite3_prepare_v2(m_database,command.c_str(),NULL,&query,NULL);
- sqlite3_bind_int(query,0,sink);
- sqlite3_bind_int(query,1,source);
-
- if (SQexecute(command)) {
- return -1;
- } else {
- sqlite3_step(query);
- return sqlite3_column_int(query,0);
- }
-}
-
-std::list<source_t> DataBaseHandler::getSourceIDsForSinkID(sink_t sink) {
- std::list<source_t> list;
- sqlite3_stmt* query;
-
- std::string command="SELECT Source_ID FROM " + std::string(MAIN_TABLE) + " WHERE Sink_ID=" + int2string(sink);
-
- if (SQexecute(command)) {
- while (sqlite3_step(query)) {
- list.push_back(sqlite3_column_int(query,0));
- }
- }
- return list;
-}
-
-std::list<ConnectionType> DataBaseHandler::getListAllMainConnections() {
- std::list<ConnectionType> connectionList;
- sqlite3_stmt* query;
- std::string command = "SELECT Sink_ID, Source_ID FROM " + std::string(MAIN_TABLE) + ";";
-
- if (SQexecute(command)) {
- while (sqlite3_step(query)) {
- ConnectionType temp;
- temp.Sink_ID = sqlite3_column_int(query,0);
- temp.Source_ID = sqlite3_column_int(query,1);
- connectionList.push_back(temp);
- DLT_LOG( AudioManager, DLT_LOG_INFO, DLT_STRING("Added Connection"), DLT_INT(temp.Sink_ID), DLT_INT(temp.Source_ID));
- }
- }
- return connectionList;
-}
-
-genError_t DataBaseHandler::removeMainConnection(connection_t connID) {
- sqlite3_stmt* query;
- std::string command = "SELECT route FROM " + std::string(MAIN_TABLE) + " WHERE ID=" + int2string(connID) + ";";
- if (SQexecute(command)) {
- if (sqlite3_step(query)) {
- delete reinterpret_cast<genRoute_t*>(sqlite3_column_int(query,0));
- command = "DELETE FROM " + std::string(MAIN_TABLE) + " WHERE ID='" + int2string(connID) + "';";
- if (SQexecute(command)!=true) {
- return GEN_DATABASE_ERROR;
- } else {
- return GEN_OK;
- }
- }
- }
- return GEN_UNKNOWN;
-}
+++ /dev/null
-/**
- * Copyright (C) 2011, BMW AG
- *
- * AudioManangerDeamon
- *
- * \file DataBaseHandler.h
- *
- * \date 20.05.2011
- * \author Christian Müller (christian.ei.mueller@bmw.de)
- *
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
- *
- *
- */
-
-#ifndef DATABASEHANDLER_H_
-#define DATABASEHANDLER_H_
-
-#include <string>
-#include <sqlite3.h>
-
-#define AUDIO_DATABASE "audiomanagerDB.sqlite"
-
-#define DOMAIN_TABLE "Domains"
-#define SOURCE_CLASS_TABLE "SourceClasses"
-#define SINK_CLASS_TABLE "SinkClasses"
-#define SOURCE_TABLE "Sources"
-#define SINK_TABLE "Sinks"
-#define GATEWAY_TABLE "Gateways"
-#define CONNECTION_TABLE "Connections"
-#define INTERRUPT_TABLE "Interrupts"
-#define MAIN_TABLE "MainTable"
-
-#define SQexecute(command) sqlite3_prepare_v2(m_database,command.c_str(),-1,&query,NULL)== SQLITE_OK
-
-#include "audioManagerIncludes.h"
-
-class RoutingTreeItem;
-class Router;
-class SinkType;
-class SourceType;
-class ConnectionType;
-class RoutingTree;
-
-/**
- * \class DataBaseHandler
- * \brief The handler of the database
- * \details creates, deletes inserts and reads data in the database. Works on top of SQLite
- *
- *\fn bool DataBaseHandler::open_database()
- * \brief opens the database
- *
- * \fn DataBaseHandler::close_database()
- * \brief closes the database
- *
- * \fn bool DataBaseHandler::delete_data(std::string table)
- * \brief deletes the data of a complete table
- * \param table the name of the table to be deleted
- *
- * \fn bool DataBaseHandler::create_tables()
- * \brief creates all neccessary tables
- *
- * \fn domain_t DataBaseHandler::insert_into_Domains_table(std::string DomainName, std::string BusName, std::string NodeName, bool EarlyMode)
- * \brief inserts data into the domain table
- * \param DomainName the name to be inserted
- * \param BusName the name of the Bus that is used for the domain
- * \param NodeName the name of the RoutingAdaptor that belongs to the domain
- * \param EarlyMode true if the domain is an early domain
- * \return the domain id (unique)
- *
- * \fn sourceClass_t DataBaseHandler::insert_into_Source_Class_table(std::string ClassName, volume_t VolumeOffset, bool IsInterrupt, bool IsMixed)
- * \brief inserts data into the Source Class table
- * \param ClassName name of the class
- * \param VolumeOffset the volume offset of the class
- * \param IsInterrupt true if it is an interrupt
- * \param IsMixed true if it is mixed
- * \return the unique Class ID
- *
- * \fn sinkClass_t DataBaseHandler::insert_into_Sink_Class_table(std::string ClassName)
- * \brief enters new Sink Class in the Class Table
- * \param ClassName the name of the class
- * \return unique class ID
- *
- * \fn source_t DataBaseHandler::insert_into_Source_table(std::string Name, sourceClass_t Class_ID, domain_t Domain_ID, bool IsGateway)
- * \brief inserts a new source into the source table
- * \param Name the name of the source
- * \param Class_ID the class ID of the source
- * \param Domain_ID the domain ID
- * \param IsGateway true if it is a gateway
- * \return returns a new source ID
- *
- * \fn sink_t DataBaseHandler::insert_into_Sink_table(std::string Name, sinkClass_t Class_ID, domain_t Domain_ID, bool IsGateway)
- * \brief inserts a new Sink into the table
- * \param Name the name of the sink
- * \param Class_ID the class ID
- * \param Domain_ID the domain ID
- * \param IsGateway true if it is a gateway
- * \return the new Sink ID
- *
- * \fn gateway_t DataBaseHandler::insert_into_Gatway_table(std::string Name, sink_t Sink_ID, source_t Source_ID, domain_t DomainSource_ID, domain_t DomainSink_ID, domain_t ControlDomain_ID)
- * \brief inserts a gateway into the database
- * \param Name the name of the gateway
- * \param Sink_ID the sink id of the gateway
- * \param Source_ID the source id of the gateway
- * \param DomainSource_ID the domain id where the source is in
- * \param DomainSink_ID the domain id where the sinḱ is in
- * \param ControlDomain_ID the domain which controls the gateway
- * \return the unique id of the gateway
- *
- * \fn domain_t DataBaseHandler::peek_Domain_ID(std::string DomainName)
- * \brief reserves a domain ID but does not register it.
- * \details This function is used to register Gateways. The problem is that a gateway is registered from one domain that does not know if the other end of the gateway domain is already registered.
- * this can be solved via peeking a domain ID. By using this function the domain is only "reserved" not registered.
- * \param DomainName the name of the domain to be peeked
- * \return the Domain ID
- *
- * \fn domain_t DataBaseHandler::get_Domain_ID_from_Source_ID(source_t Source_ID)
- * \brief returns the domain if from a source given via an Id
- * \param Source_ID the source that the domain shall be returned of
- * \return the domain ID
- *
- * \fn domain_t DataBaseHandler::get_Domain_ID_from_Sink_ID(sink_t Sink_ID)
- * \brief returns the domain from a given sink ID
- * \param Sink_ID the sink ID
- * \return the domain ID
- *
- * \fn source_t DataBaseHandler::get_Source_ID_from_Name(std::string name)
- * \brief returns the source ID from a name
- * \param name the name for witch the source ID shall be returned
- * \return the source ID
- *
- * \fn sourceClass_t DataBaseHandler::get_Source_Class_ID_from_Name(std::string name)
- * \brief returns the source class ID from a given class name
- * \return the source class ID
- *
- * \fn domain_t DataBaseHandler::get_Domain_ID_from_Name(std::string name)
- * \brief returns the domain ID from given domain name
- * \param name the name
- * \return the domain ID
- *
- * \fn sink_t DataBaseHandler::get_Sink_ID_from_Name(std::string name)
- * \brief returns the Sink ID from a given name
- * \param name the name
- * \return the sink ID
- *
- * \fn std::string DataBaseHandler::get_Bus_from_Domain_ID(domain_t Domain_ID)
- * \brief returns the bus name for a given domain ID
- * \param Domain_ID the domain ID
- * \return the name of the bus
- *
- * \fn domain_t DataBaseHandler::get_Domain_ID_from_Connection_ID(connection_t ID)
- * \brief returns the domain ID from a given Connection ID
- * \param ID the connection ID
- * \return the domain ID
- *
- * \fn bool DataBaseHandler::is_source_Mixed(source_t source)
- * \brief is used to find out if a source is mixed. Used for interrrupt sources
- * \param source the source
- * \return true if source is mixed.
- *
- * \fn gateway_t DataBaseHandler::get_Gateway_ID_with_Domain_ID(domain_t startDomain_ID, domain_t targetDomain_ID)
- * \brief returns a gateway ID for a given domain connection
- * \param startDomain_ID the domain ID where the gateway should start
- * \param targetDomain_ID the domain ID where the gateway should stop
- * \return the gateway ID
- *
- * \fn genError_t DataBaseHandler::get_Gateway_Source_Sink_Domain_ID_from_ID(gateway_t Gateway_ID,source_t* return_Source_ID,sink_t* return_Sink_ID,domain_t* return_ControlDomain_ID)
- * \brief retruns informations about gateways
- * \param Gateway_ID the gateways ID as input
- * \param return_Source_ID call by reference source ID return value
- * \param return_Sink_ID call by reference Sink ID return value
- * \param return_ControlDomain_ID call by reference Control Domain ID return value
- *
- * \fn void DataBaseHandler::get_Domain_ID_Tree(bool onlyfree, RoutingTree* Tree, std::list<RoutingTreeItem*>* allItems)
- * \brief is used to create a Tree out of RoutingTreeItems. Used for routing algorithm
- * \param onlyfree if called with true then only routes via free gateways will be returned
- * \param Tree pointer the the Routing Tree
- * \param allItems pointer to a list of all Routing Tree Items as call by reference value
- *
- * \fn void DataBaseHandler::getListofSources(std::list<SourceType>* SourceList)
- * \brief returns a list of all sources
- * \param SourceList call by reference pointer to return value
- *
- * \fn void DataBaseHandler::getListofSinks(std::list<SinkType>* SinkList)
- * \brief returns a list of all sinks
- * \param SinkList call by reference pointer to return value
- *
- * \fn void DataBaseHandler::getListofConnections(std::list<ConnectionType>* ConnectionList)
- * \brief returns a list of all connections
- * \param ConnectionList call by reference pointer to return value
- *
- * \fn connection_t DataBaseHandler::getConnectionID(source_t SourceID,sink_t SinkID)
- * \brief returns the connection ID for a given source sink combination
- * \param SourceID the source ID
- * \param SinkID the sink ID
- * \return the connection ID, -1 if there is no connection
- *
- * \fn connection_t DataBaseHandler::insertConnection(source_t SourceID,sink_t SinkID)
- * \brief inserts a connection into the database
- * \param SourceID the source ID
- * \param SinkID the sink ID
- * \return the connection ID of the newly entered connection
- *
- * \fn genError_t DataBaseHandler::removeConnection(connection_t ConnectionID)
- * \brief removes a connection from the database
- * \param ConnectionID the connection ID
- * \return GEN_OK if everything was ok
- *
- * \fn connection_t DataBaseHandler::reserveMainConnection(source_t source,sink_t sink)
- * \brief reserves a main connection ID
- * \param source the source
- * \param sink the sink
- * \return the main connection ID of the newly entered main connection
- *
- * \fn genError_t DataBaseHandler::updateMainConnection(connection_t connID,genRoute_t route)
- * \brief updates the main connection. Enters the missing information into the main connection that was reserved before
- * \param connID connection ID
- * \param route the route information to be entered
- * \return GEN_OK on success
- *
- * \fn genError_t DataBaseHandler::getMainConnectionDatafromID(const connection_t connID, sink_t* return_sinkID,source_t* return_sourceID,genRoute_t** return_route)
- * \brief returns details for a connection ID
- * \param connID the connection ID
- * \param return_sinkID call by reference pointer to return Sink ID
- * \param return_sourceID call by reference pointer to return Source ID
- * \param return_route call by reference pointer to return pointer of the route
- * \return GEN_OK on success
- *
- * \fn connection_t DataBaseHandler::returnMainconnectionIDforSinkSourceID (sink_t sink, source_t source)
- * \brief return a main connection ID for a sink source combination
- * \param sink the sink ID
- * \param source the source ID
- * \return the connection ID
- *
- * \fn std::list<source_t> DataBaseHandler::getSourceIDsForSinkID (sink_t sink)
- * \brief returns the list of source IDs that are connected to a sink ID
- * \param sink the sink ID
- * \return a list of source IDs
- *
- * \fn std::list<ConnectionType> DataBaseHandler::getListAllMainConnections()
- * \brief returns a list of all mainconnections
- * \return a list of all connections
- *
- * \fn genError_t DataBaseHandler::removeMainConnection(connection_t connID)
- * \brief removes a main connection ID
- * \param connID the connection ID to be removed
- * \return GEN_OK on success
- *
- * \fn genInt_t DataBaseHandler::reserveInterrupt(sink_t Sink_ID, source_t Source_ID)
- * \brief reserve an interrupt
- * \details use this to reserve an interrupt ID before the actual connections is build up. Via DataBaseHandler::updateInterrupt the information can be complemented afterwards
- * \param Sink_ID the sink ID
- * \param Source_ID the source ID
- * \return the interrupt ID
- *
- * \fn genError_t DataBaseHandler::updateInterrupt(const genInt_t intID,connection_t connID, bool mixed, std::list<source_t> listInterrruptedSources)
- * \brief use this to enter the missing information into a reserved Interrupt into the database
- * \param intID the interrupt ID
- * \param connID the connection ID that is used
- * \param mixed true if the interrupt is mixed
- * \param listInterrruptedSources the list of interrupted sources. Used to restore the old state afterwards
- * \return GEN_OK on success
- *
- * \fn genError_t DataBaseHandler::getInterruptDatafromID(const genInt_t intID, connection_t* return_connID, sink_t* return_Sink_ID, source_t* return_Source_ID, bool* return_mixed, std::list<source_t>** return_listInterrruptedSources)
- * \brief returns information about interrupts from the ID
- * \param intID the interrupt ID
- * \param return_connID pointer to call by reference connection ID
- * \param return_Sink_ID pointer to call by reference sink ID
- * \param return_Source_ID pointer to call by reference source ID
- * \param return_mixed pointer to call by reference mixed value
- * \param return_listInterrruptedSources pointer to call by reference list of interrupted sources
- * \return GEN_OK on success
- *
- * \fn genError_t DataBaseHandler::removeInterrupt(const genInt_t intID)
- * \brief removes an interrupt from the database
- * \param intID the interrrupt ID to be removed
- * \return GEN_OK on success
- *
- * \fn void DataBaseHandler::signal_connectionChanged()
- * \brief this signal is emitted when connections are changed
- *
- * \fn void DataBaseHandler::signal_numberOfSinksChanged()
- * \brief this signal is emitted when the number of sinks changed
- *
- * \fn void DataBaseHandler::signal_numberOfSourcesChanged()
- * \brief this signal is emitted when the number of sources changed
- *
- */
-
-class DataBaseHandler {
-
-public:
- DataBaseHandler();
- virtual ~DataBaseHandler();
-
- bool open_database();
- void close_database();
- bool delete_data(std::string table);
- bool create_tables();
-
- domain_t insert_into_Domains_table(std::string DomainName, std::string BusName,
- std::string NodeName, bool EarlyMode);
- sourceClass_t insert_into_Source_Class_table(std::string ClassName,
- volume_t VolumeOffset, bool IsInterrupt, bool IsMixed);
- sinkClass_t insert_into_Sink_Class_table(std::string ClassName);
- source_t insert_into_Source_table(std::string Name, sourceClass_t Class_ID,
- domain_t Domain_ID, bool IsGateway);
- sink_t insert_into_Sink_table(std::string Name, sinkClass_t Class_ID,
- domain_t Domain_ID, bool IsGateway);
- gateway_t insert_into_Gatway_table(std::string Name, sink_t Sink_ID,
- source_t Source_ID, domain_t DomainSource_ID,
- domain_t DomainSink_ID, domain_t ControlDomain_ID);
-
- domain_t peek_Domain_ID(std::string DomainName);
- domain_t get_Domain_ID_from_Source_ID(source_t Source_ID);
- domain_t get_Domain_ID_from_Sink_ID(sink_t Sink_ID);
-
- source_t get_Source_ID_from_Name(std::string name);
- sourceClass_t get_Source_Class_ID_from_Name(std::string name);
- domain_t get_Domain_ID_from_Name(std::string name);
- sink_t get_Sink_ID_from_Name(std::string name);
- std::string get_Bus_from_Domain_ID(domain_t Domain_ID);
- domain_t get_Domain_ID_from_Connection_ID(connection_t ID);
-
- bool is_source_Mixed(source_t source);
-
- gateway_t get_Gateway_ID_with_Domain_ID(domain_t startDomain_ID,
- domain_t targetDomain_ID);
- genError_t get_Gateway_Source_Sink_Domain_ID_from_ID(gateway_t Gateway_ID,
- source_t* return_Source_ID, sink_t* return_Sink_ID,
- domain_t* return_ControlDomain_ID);
- void get_Domain_ID_Tree(bool onlyfree, RoutingTree* Tree,
- std::list<RoutingTreeItem*>* allItems);
-
- void getListofSources(std::list<SourceType>* SourceList);
- void getListofSinks(std::list<SinkType>* SinkList);
- void getListofConnections(std::list<ConnectionType>* ConnectionList);
-
- connection_t getConnectionID(source_t SourceID, sink_t SinkID);
- connection_t insertConnection(source_t SourceID, sink_t SinkID);
- genError_t removeConnection(connection_t ConnectionID);
- connection_t reserveMainConnection(source_t source, sink_t sink);
- genError_t updateMainConnection(connection_t connID, genRoute_t route);
- genError_t getMainConnectionDatafromID(const connection_t connID,
- sink_t* return_sinkID, source_t* return_sourceID,
- genRoute_t** return_route);
- connection_t returnMainconnectionIDforSinkSourceID(sink_t sink,
- source_t source);
- std::list<source_t> getSourceIDsForSinkID(sink_t sink);
- std::list<ConnectionType> getListAllMainConnections();
- genError_t removeMainConnection(connection_t connID);
- genInt_t reserveInterrupt(sink_t Sink_ID, source_t Source_ID);
- genError_t updateInterrupt(const genInt_t intID, connection_t connID,
- bool mixed, std::list<source_t> listInterrruptedSources);
- genError_t getInterruptDatafromID(const genInt_t intID,
- connection_t* return_connID, sink_t* return_Sink_ID,
- source_t* return_Source_ID, bool* return_mixed,
- std::list<source_t>** return_listInterrruptedSources);
- genError_t removeInterrupt(const genInt_t intID);
-
- void signal_connectionChanged();
- void signal_numberOfSinksChanged();
- void signal_numberOfSourcesChanged();
-
-private:
- bool pQuery(std::string command);
- std::string int2string(int i);
- sqlite3 *m_database; //!< pointer to database
- std::string m_path;
-};
-
-#endif /* DATABASEHANDLER_H_ */
+++ /dev/null
-# Doxyfile 1.7.1
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
-#
-# All text after a hash (#) is considered a comment and will be ignored
-# The format is:
-# TAG = value [value, ...]
-# For lists items can also be appended using:
-# TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all
-# text before the first occurrence of this tag. Doxygen uses libiconv (or the
-# iconv built into libc) for the transcoding. See
-# http://www.gnu.org/software/libiconv for the list of possible encodings.
-
-DOXYFILE_ENCODING = UTF-8
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
-# by quotes) that should identify the project.
-
-PROJECT_NAME = AudioManager
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number.
-# This could be handy for archiving the generated documentation or
-# if some version control system is used.
-
-PROJECT_NUMBER = 0.1
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
-# base path where the generated documentation will be put.
-# If a relative path is entered, it will be relative to the location
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY =
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
-# 4096 sub-directories (in 2 levels) under the output directory of each output
-# format and will distribute the generated files over these directories.
-# Enabling this option can be useful when feeding doxygen a huge amount of
-# source files, where putting all generated files in the same directory would
-# otherwise cause performance problems for the file system.
-
-CREATE_SUBDIRS = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# The default language is English, other supported languages are:
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
-# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
-# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
-# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
-# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
-# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
-
-OUTPUT_LANGUAGE = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
-# include brief member descriptions after the members that are listed in
-# the file and class documentation (similar to JavaDoc).
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
-# the brief description of a member or function before the detailed description.
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator
-# that is used to form the text in various listings. Each string
-# in this list, if found as the leading text of the brief description, will be
-# stripped from the text and the result after processing the whole list, is
-# used as the annotated text. Otherwise, the brief description is used as-is.
-# If left blank, the following values are used ("$name" is automatically
-# replaced with the name of the entity): "The $name class" "The $name widget"
-# "The $name file" "is" "provides" "specifies" "contains"
-# "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF = "The $name class" \
- "The $name widget" \
- "The $name file" \
- is \
- provides \
- specifies \
- contains \
- represents \
- a \
- an \
- the
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# Doxygen will generate a detailed section even if there is only a brief
-# description.
-
-ALWAYS_DETAILED_SEC = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
-# operators of the base classes will not be shown.
-
-INLINE_INHERITED_MEMB = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
-# path before files name in the file list and in the header files. If set
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES = YES
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
-# can be used to strip a user-defined part of the path. Stripping is
-# only done if one of the specified strings matches the left-hand part of
-# the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the
-# path to strip.
-
-STRIP_FROM_PATH =
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
-# the path mentioned in the documentation of a class, which tells
-# the reader which header file to include in order to use a class.
-# If left blank only the name of the header file containing the class
-# definition is used. Otherwise one should specify the include paths that
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH =
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-# (but less readable) file names. This can be useful is your file systems
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
-# will interpret the first line (until the first dot) of a JavaDoc-style
-# comment as the brief description. If set to NO, the JavaDoc
-# comments will behave just like regular Qt-style comments
-# (thus requiring an explicit @brief command for a brief description.)
-
-JAVADOC_AUTOBRIEF = YES
-
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
-# interpret the first line (until the first dot) of a Qt-style
-# comment as the brief description. If set to NO, the comments
-# will behave just like regular Qt-style comments (thus requiring
-# an explicit \brief command for a brief description.)
-
-QT_AUTOBRIEF = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
-# treat a multi-line C++ special comment block (i.e. a block of //! or ///
-# comments) as a brief description. This used to be the default behaviour.
-# The new default is to treat a multi-line C++ comment block as a detailed
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it
-# re-implements.
-
-INHERIT_DOCS = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
-# a new page for each member. If set to NO, the documentation of a member will
-# be part of the file/class/namespace that contains it.
-
-SEPARATE_MEMBER_PAGES = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab.
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE = 8
-
-# This tag can be used to specify a number of aliases that acts
-# as commands in the documentation. An alias has the form "name=value".
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to
-# put the command \sideeffect (or @sideeffect) in the documentation, which
-# will result in a user-defined paragraph with heading "Side Effects:".
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
-# sources only. Doxygen will then generate output that is more tailored for C.
-# For instance, some of the names that are used will be different. The list
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C = NO
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
-# sources only. Doxygen will then generate output that is more tailored for
-# Java. For instance, namespaces will be presented as packages, qualified
-# scopes will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA = NO
-
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-# sources only. Doxygen will then generate output that is more tailored for
-# Fortran.
-
-OPTIMIZE_FOR_FORTRAN = NO
-
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-# sources. Doxygen will then generate output that is tailored for
-# VHDL.
-
-OPTIMIZE_OUTPUT_VHDL = NO
-
-# Doxygen selects the parser to use depending on the extension of the files it
-# parses. With this tag you can assign which parser to use for a given extension.
-# Doxygen has a built-in mapping, but you can override or extend it using this
-# tag. The format is ext=language, where ext is a file extension, and language
-# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
-# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
-# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
-# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
-# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
-
-EXTENSION_MAPPING =
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
-# to include (a tag file for) the STL sources as input, then you should
-# set this tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
-# func(std::string) {}). This also make the inheritance and collaboration
-# diagrams that involve STL classes more complete and accurate.
-
-BUILTIN_STL_SUPPORT = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-
-CPP_CLI_SUPPORT = NO
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
-# Doxygen will parse them like normal C++ but will assume all classes use public
-# instead of private inheritance when no explicit protection keyword is present.
-
-SIP_SUPPORT = NO
-
-# For Microsoft's IDL there are propget and propput attributes to indicate getter
-# and setter methods for a property. Setting this option to YES (the default)
-# will make doxygen to replace the get and set methods by a property in the
-# documentation. This will only work if the methods are indeed getting or
-# setting a simple type. If this is not the case, or you want to show the
-# methods anyway, you should set this option to NO.
-
-IDL_PROPERTY_SUPPORT = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
-# the same type (for instance a group of public functions) to be put as a
-# subgroup of that type (e.g. under the Public Functions section). Set it to
-# NO to prevent subgrouping. Alternatively, this can be done per class using
-# the \nosubgrouping command.
-
-SUBGROUPING = YES
-
-# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
-# is documented as struct, union, or enum with the name of the typedef. So
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
-# with name TypeT. When disabled the typedef will appear as a member of a file,
-# namespace, or class. And the struct will be named TypeS. This can typically
-# be useful for C code in case the coding convention dictates that all compound
-# types are typedef'ed and only the typedef is referenced, never the tag name.
-
-TYPEDEF_HIDES_STRUCT = YES
-
-# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
-# determine which symbols to keep in memory and which to flush to disk.
-# When the cache is full, less often used symbols will be written to disk.
-# For small to medium size projects (<1000 input files) the default value is
-# probably good enough. For larger projects a too small cache size can cause
-# doxygen to be busy swapping symbols to and from disk most of the time
-# causing a significant performance penality.
-# If the system has enough physical memory increasing the cache will improve the
-# performance by keeping more symbols in memory. Note that the value works on
-# a logarithmic scale so increasing the size by one will rougly double the
-# memory usage. The cache size is given by this formula:
-# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols
-
-SYMBOL_CACHE_SIZE = 0
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available.
-# Private class members and static file members will be hidden unless
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL = YES
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
-# will be included in the documentation.
-
-EXTRACT_PRIVATE = YES
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file
-# will be included in the documentation.
-
-EXTRACT_STATIC = YES
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
-# defined locally in source files will be included in the documentation.
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES = YES
-
-# This flag is only useful for Objective-C code. When set to YES local
-# methods, which are defined in the implementation section but not in
-# the interface are included in the documentation.
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS = YES
-
-# If this flag is set to YES, the members of anonymous namespaces will be
-# extracted and appear in the documentation as a namespace called
-# 'anonymous_namespace{file}', where file will be replaced with the base
-# name of the file that contains the anonymous namespace. By default
-# anonymous namespace are hidden.
-
-EXTRACT_ANON_NSPACES = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
-# undocumented members of documented classes, files or namespaces.
-# If set to NO (the default) these members will be included in the
-# various overviews, but no documentation section is generated.
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS = NO
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy.
-# If set to NO (the default) these classes will be included in the various
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES = NO
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
-# friend (class|struct|union) declarations.
-# If set to NO (the default) these declarations will be included in the
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
-# documentation blocks found inside the body of a function.
-# If set to NO (the default) these blocks will be appended to the
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS = NO
-
-# The INTERNAL_DOCS tag determines if documentation
-# that is typed after a \internal command is included. If the tag is set
-# to NO (the default) then the documentation will be excluded.
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
-# file names in lower-case letters. If set to YES upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES = NO
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
-# will show members with their full class and namespace scopes in the
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
-# will put a list of the files that are included by a file in the documentation
-# of that file.
-
-SHOW_INCLUDE_FILES = YES
-
-# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
-# will list include files with double quotes in the documentation
-# rather than with sharp brackets.
-
-FORCE_LOCAL_INCLUDES = NO
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
-# is inserted in the documentation for inline members.
-
-INLINE_INFO = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
-# will sort the (detailed) documentation of file and class members
-# alphabetically by member name. If set to NO the members will appear in
-# declaration order.
-
-SORT_MEMBER_DOCS = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
-# brief documentation of file, namespace and class members alphabetically
-# by member name. If set to NO (the default) the members will appear in
-# declaration order.
-
-SORT_BRIEF_DOCS = YES
-
-# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
-# will sort the (brief and detailed) documentation of class members so that
-# constructors and destructors are listed first. If set to NO (the default)
-# the constructors will appear in the respective orders defined by
-# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
-# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
-# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
-
-SORT_MEMBERS_CTORS_1ST = NO
-
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
-# hierarchy of group names into alphabetical order. If set to NO (the default)
-# the group names will appear in their defined order.
-
-SORT_GROUP_NAMES = YES
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
-# sorted by fully-qualified names, including namespaces. If set to
-# NO (the default), the class list will be sorted only by class name,
-# not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or
-# disable (NO) the todo list. This list is created by putting \todo
-# commands in the documentation.
-
-GENERATE_TODOLIST = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or
-# disable (NO) the test list. This list is created by putting \test
-# commands in the documentation.
-
-GENERATE_TESTLIST = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or
-# disable (NO) the bug list. This list is created by putting \bug
-# commands in the documentation.
-
-GENERATE_BUGLIST = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
-# disable (NO) the deprecated list. This list is created by putting
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS =
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-# the initial value of a variable or define consists of for it to appear in
-# the documentation. If the initializer consists of more lines than specified
-# here it will be hidden. Use a value of 0 to hide initializers completely.
-# The appearance of the initializer of individual variables and defines in the
-# documentation can be controlled using \showinitializer or \hideinitializer
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
-# at the bottom of the documentation of classes and structs. If set to YES the
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES = YES
-
-# If the sources in your project are distributed over multiple directories
-# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
-# in the documentation. The default is NO.
-
-SHOW_DIRECTORIES = NO
-
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
-# This will remove the Files entry from the Quick Index and from the
-# Folder Tree View (if specified). The default is YES.
-
-SHOW_FILES = YES
-
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
-# Namespaces page. This will remove the Namespaces entry from the Quick Index
-# and from the Folder Tree View (if specified). The default is YES.
-
-SHOW_NAMESPACES = YES
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from
-# the version control system). Doxygen will invoke the program by executing (via
-# popen()) the command <command> <input-file>, where <command> is the value of
-# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
-# provided by doxygen. Whatever the program writes to standard output
-# is used as the file version. See the manual for examples.
-
-FILE_VERSION_FILTER =
-
-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
-# by doxygen. The layout file controls the global structure of the generated
-# output files in an output format independent way. The create the layout file
-# that represents doxygen's defaults, run doxygen with the -l option.
-# You can optionally specify a file name after the option, if omitted
-# DoxygenLayout.xml will be used as the name of the layout file.
-
-LAYOUT_FILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated by doxygen. Possible values are YES and NO. If left blank
-# NO is used.
-
-WARNINGS = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED = YES
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some
-# parameters in a documented function, or documenting parameters that
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR = YES
-
-# This WARN_NO_PARAMDOC option can be abled to get warnings for
-# functions that are documented, but have no documentation for their parameters
-# or return value. If set to NO (the default) doxygen will only warn about
-# wrong or incomplete parameter documentation, but not about the absence of
-# documentation.
-
-WARN_NO_PARAMDOC = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that
-# doxygen can produce. The string should contain the $file, $line, and $text
-# tags, which will be replaced by the file and line number from which the
-# warning originated and the warning text. Optionally the format may contain
-# $version, which will be replaced by the version of the file (if it could
-# be obtained via FILE_VERSION_FILTER)
-
-WARN_FORMAT = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning
-# and error messages should be written. If left blank the output is written
-# to stderr.
-
-WARN_LOGFILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain
-# documented source files. You may enter file names like "myfile.cpp" or
-# directories like "/usr/src/myproject". Separate the files or directories
-# with spaces.
-
-INPUT = @CMAKE_CURRENT_SOURCE_DIR@
-
-# This tag can be used to specify the character encoding of the source files
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
-# also the default input encoding. Doxygen uses libiconv (or the iconv built
-# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
-# the list of possible encodings.
-
-INPUT_ENCODING = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank the following patterns are tested:
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
-# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
-
-FILE_PATTERNS = *.c \
- *.cc \
- *.cxx \
- *.cpp \
- *.c++ \
- *.d \
- *.java \
- *.ii \
- *.ixx \
- *.ipp \
- *.i++ \
- *.inl \
- *.h \
- *.hh \
- *.hxx \
- *.hpp \
- *.h++ \
- *.idl \
- *.odl \
- *.cs \
- *.php \
- *.php3 \
- *.inc \
- *.m \
- *.mm \
- *.dox \
- *.py \
- *.f90 \
- *.f \
- *.vhd \
- *.vhdl
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories
-# should be searched for input files as well. Possible values are YES and NO.
-# If left blank NO is used.
-
-RECURSIVE = YES
-
-# The EXCLUDE tag can be used to specify files and/or directories that should
-# excluded from the INPUT source files. This way you can easily exclude a
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-
-EXCLUDE =
-
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
-# directories that are symbolic links (a Unix filesystem feature) are excluded
-# from the input.
-
-EXCLUDE_SYMLINKS = NO
-
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories. Note that the wildcards are matched
-# against the file with absolute path, so to exclude all test directories
-# for example use the pattern */test/*
-
-EXCLUDE_PATTERNS =
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-# (namespaces, classes, functions, etc.) that should be excluded from the
-# output. The symbol name can be a fully qualified name, a word, or if the
-# wildcard * is used, a substring. Examples: ANamespace, AClass,
-# AClass::ANamespace, ANamespace::*Test
-
-EXCLUDE_SYMBOLS =
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or
-# directories that contain example code fragments that are included (see
-# the \include command).
-
-EXAMPLE_PATH =
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank all files are included.
-
-EXAMPLE_PATTERNS = *
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude
-# commands irrespective of the value of the RECURSIVE tag.
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or
-# directories that contain image that are included in the documentation (see
-# the \image command).
-
-IMAGE_PATH = ../../AudioManGUI
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command <filter> <input-file>, where <filter>
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
-# input file. Doxygen will then use the output that the filter program writes
-# to standard output. If FILTER_PATTERNS is specified, this tag will be
-# ignored.
-
-INPUT_FILTER =
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis. Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match. The filters are a list of the form:
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
-# is applied to all files.
-
-FILTER_PATTERNS =
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will be used to filter the input files when producing source
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will
-# be generated. Documented entities will be cross-referenced with these sources.
-# Note: To get rid of all source code in the generated output, make sure also
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER = YES
-
-# Setting the INLINE_SOURCES tag to YES will include the body
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
-# doxygen to hide any special comment blocks from generated source code
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES
-# then for each documented function all documented
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = NO
-
-# If the REFERENCES_RELATION tag is set to YES
-# then for each documented function all documented entities
-# called/used by that function will be listed.
-
-REFERENCES_RELATION = NO
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code. Otherwise they will link to the documentation.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code
-# will point to the HTML generated by the htags(1) tool instead of doxygen
-# built-in source browser. The htags tool is part of GNU's global source
-# tagging system (see http://www.gnu.org/software/global/global.html). You
-# will need version 4.8.6 or higher.
-
-USE_HTAGS = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
-# will generate a verbatim copy of the header file for each class for
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
-# of all compounds will be generated. Enable this if the project
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX = YES
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX = 5
-
-# In case all classes in a project start with a common prefix, all
-# classes will be put under the same header in the alphabetical index.
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX =
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
-# generate HTML output.
-
-GENERATE_HTML = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT = html
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard header.
-
-HTML_HEADER =
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard footer.
-
-HTML_FOOTER =
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
-# style sheet that is used by each HTML page. It can be used to
-# fine-tune the look of the HTML output. If the tag is left blank doxygen
-# will generate a default style sheet. Note that doxygen will try to copy
-# the style sheet file to the HTML output directory, so don't put your own
-# stylesheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET =
-
-# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
-# Doxygen will adjust the colors in the stylesheet and background images
-# according to this color. Hue is specified as an angle on a colorwheel,
-# see http://en.wikipedia.org/wiki/Hue for more information.
-# For instance the value 0 represents red, 60 is yellow, 120 is green,
-# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
-# The allowed range is 0 to 359.
-
-HTML_COLORSTYLE_HUE = 220
-
-# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
-# the colors in the HTML output. For a value of 0 the output will use
-# grayscales only. A value of 255 will produce the most vivid colors.
-
-HTML_COLORSTYLE_SAT = 100
-
-# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
-# the luminance component of the colors in the HTML output. Values below
-# 100 gradually make the output lighter, whereas values above 100 make
-# the output darker. The value divided by 100 is the actual gamma applied,
-# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
-# and 100 does not change the gamma.
-
-HTML_COLORSTYLE_GAMMA = 80
-
-# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
-# page will contain the date and time when the page was generated. Setting
-# this to NO can help when comparing the output of multiple runs.
-
-HTML_TIMESTAMP = YES
-
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
-# files or namespaces will be aligned in HTML using tables. If set to
-# NO a bullet list will be used.
-
-HTML_ALIGN_MEMBERS = YES
-
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
-# documentation will contain sections that can be hidden and shown after the
-# page has loaded. For this to work a browser that supports
-# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
-# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
-
-HTML_DYNAMIC_SECTIONS = YES
-
-# If the GENERATE_DOCSET tag is set to YES, additional index files
-# will be generated that can be used as input for Apple's Xcode 3
-# integrated development environment, introduced with OSX 10.5 (Leopard).
-# To create a documentation set, doxygen will generate a Makefile in the
-# HTML output directory. Running make will produce the docset in that
-# directory and running "make install" will install the docset in
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
-# it at startup.
-# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
-# for more information.
-
-GENERATE_DOCSET = NO
-
-# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
-# feed. A documentation feed provides an umbrella under which multiple
-# documentation sets from a single provider (such as a company or product suite)
-# can be grouped.
-
-DOCSET_FEEDNAME = "Doxygen generated docs"
-
-# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
-# should uniquely identify the documentation set bundle. This should be a
-# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
-# will append .docset to the name.
-
-DOCSET_BUNDLE_ID = org.doxygen.Project
-
-# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
-# the documentation publisher. This should be a reverse domain-name style
-# string, e.g. com.mycompany.MyDocSet.documentation.
-
-DOCSET_PUBLISHER_ID = org.doxygen.Publisher
-
-# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
-
-DOCSET_PUBLISHER_NAME = Publisher
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-# will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
-# be used to specify the file name of the resulting .chm file. You
-# can add a path in front of the file if the result should not be
-# written to the html output directory.
-
-CHM_FILE =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
-# be used to specify the location (absolute path including file name) of
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
-# controls if a separate .chi index file is generated (YES) or that
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
-# is used to encode HtmlHelp index (hhk), content (hhc) and project file
-# content.
-
-CHM_INDEX_ENCODING =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
-# controls whether a binary table of contents is generated (YES) or a
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND = NO
-
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
-# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
-# that can be used as input for Qt's qhelpgenerator to generate a
-# Qt Compressed Help (.qch) of the generated HTML documentation.
-
-GENERATE_QHP = NO
-
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
-# be used to specify the file name of the resulting .qch file.
-# The path specified is relative to the HTML output folder.
-
-QCH_FILE =
-
-# The QHP_NAMESPACE tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#namespace
-
-QHP_NAMESPACE = org.doxygen.Project
-
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#virtual-folders
-
-QHP_VIRTUAL_FOLDER = doc
-
-# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
-# add. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#custom-filters
-
-QHP_CUST_FILTER_NAME =
-
-# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
-# custom filter to add. For more information please see
-# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
-# Qt Help Project / Custom Filters</a>.
-
-QHP_CUST_FILTER_ATTRS =
-
-# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
-# project's
-# filter section matches.
-# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
-# Qt Help Project / Filter Attributes</a>.
-
-QHP_SECT_FILTER_ATTRS =
-
-# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
-# be used to specify the location of Qt's qhelpgenerator.
-# If non-empty doxygen will try to run qhelpgenerator on the generated
-# .qhp file.
-
-QHG_LOCATION =
-
-# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
-# will be generated, which together with the HTML files, form an Eclipse help
-# plugin. To install this plugin and make it available under the help contents
-# menu in Eclipse, the contents of the directory containing the HTML and XML
-# files needs to be copied into the plugins directory of eclipse. The name of
-# the directory within the plugins directory should be the same as
-# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
-# the help appears.
-
-GENERATE_ECLIPSEHELP = YES
-
-# A unique identifier for the eclipse help plugin. When installing the plugin
-# the directory name containing the HTML and XML files should also have
-# this name.
-
-ECLIPSE_DOC_ID = org.doxygen.Project
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
-# top of each HTML page. The value NO (the default) enables the index and
-# the value YES disables it.
-
-DISABLE_INDEX = NO
-
-# This tag can be used to set the number of enum values (range [1..20])
-# that doxygen will group on one line in the generated HTML documentation.
-
-ENUM_VALUES_PER_LINE = 4
-
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information.
-# If the tag value is set to YES, a side panel will be generated
-# containing a tree-like index structure (just like the one that
-# is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
-# Windows users are probably better off using the HTML help feature.
-
-GENERATE_TREEVIEW = YES
-
-# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
-# and Class Hierarchy pages using a tree view instead of an ordered list.
-
-USE_INLINE_TREES = YES
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
-# used to set the initial width (in pixels) of the frame in which the tree
-# is shown.
-
-TREEVIEW_WIDTH = 250
-
-# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
-# links to external symbols imported via tag files in a separate window.
-
-EXT_LINKS_IN_WINDOW = NO
-
-# Use this tag to change the font size of Latex formulas included
-# as images in the HTML documentation. The default is 10. Note that
-# when you change the font size after a successful doxygen run you need
-# to manually remove any form_*.png images from the HTML output directory
-# to force them to be regenerated.
-
-FORMULA_FONTSIZE = 10
-
-# Use the FORMULA_TRANPARENT tag to determine whether or not the images
-# generated for formulas are transparent PNGs. Transparent PNGs are
-# not supported properly for IE 6.0, but are supported on all modern browsers.
-# Note that when changing this option you need to delete any form_*.png files
-# in the HTML output before the changes have effect.
-
-FORMULA_TRANSPARENT = YES
-
-# When the SEARCHENGINE tag is enabled doxygen will generate a search box
-# for the HTML output. The underlying search engine uses javascript
-# and DHTML and should work on any modern browser. Note that when using
-# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
-# (GENERATE_DOCSET) there is already a search function so this one should
-# typically be disabled. For large projects the javascript based search engine
-# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
-
-SEARCHENGINE = YES
-
-# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
-# implemented using a PHP enabled web server instead of at the web client
-# using Javascript. Doxygen will generate the search PHP script and index
-# file to put on the web server. The advantage of the server
-# based approach is that it scales better to large projects and allows
-# full text search. The disadvances is that it is more difficult to setup
-# and does not have live searching capabilities.
-
-SERVER_BASED_SEARCH = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
-# generate Latex output.
-
-GENERATE_LATEX = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked. If left blank `latex' will be used as the default command name.
-# Note that when enabling USE_PDFLATEX this option is only used for
-# generating bitmaps for formulas in the HTML output, but not in the
-# Makefile that is written to the output directory.
-
-LATEX_CMD_NAME = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
-# generate index for LaTeX. If left blank `makeindex' will be used as the
-# default command name.
-
-MAKEINDEX_CMD_NAME = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
-# LaTeX documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_LATEX = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used
-# by the printer. Possible values are: a4, a4wide, letter, legal and
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE = a4wide
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES =
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
-# the generated latex document. The header should contain everything until
-# the first chapter. If it is left blank doxygen will generate a
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER =
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will
-# contain links (just like the HTML output) instead of page references
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS = YES
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
-# plain latex in the generated Makefile. Set this option to YES to get a
-# higher quality PDF documentation.
-
-USE_PDFLATEX = YES
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
-# command to the generated LaTeX files. This will instruct LaTeX to keep
-# running if errors occur, instead of asking the user for help.
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not
-# include the index chapters (such as File Index, Compound Index, etc.)
-# in the output.
-
-LATEX_HIDE_INDICES = NO
-
-# If LATEX_SOURCE_CODE is set to YES then doxygen will include
-# source code with syntax highlighting in the LaTeX output.
-# Note that which sources are shown also depends on other settings
-# such as SOURCE_BROWSER.
-
-LATEX_SOURCE_CODE = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
-# The RTF output is optimized for Word 97 and may not look very pretty with
-# other RTF readers or editors.
-
-GENERATE_RTF = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
-# RTF documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_RTF = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
-# will contain hyperlink fields. The RTF file will
-# contain links (just like the HTML output) instead of page references.
-# This makes the output suitable for online browsing using WORD or other
-# programs which support those fields.
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's
-# config file, i.e. a series of assignments. You only have to provide
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE =
-
-# Set optional variables used in the generation of an rtf document.
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
-# generate man pages
-
-GENERATE_MAN = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT = man
-
-# The MAN_EXTENSION tag determines the extension that is added to
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
-# then it will generate one additional man file for each entity
-# documented in the real man page(s). These additional files
-# only source the real man page, but without them the man command
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will
-# generate an XML file that captures the structure of
-# the code including all documentation.
-
-GENERATE_XML = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_SCHEMA =
-
-# The XML_DTD tag can be used to specify an XML DTD,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_DTD =
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
-# dump the program listings (including syntax highlighting
-# and cross-referencing information) to the XML output. Note that
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
-# generate an AutoGen Definitions (see autogen.sf.net) file
-# that captures the structure of the code including all
-# documentation. Note that this feature is still experimental
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will
-# generate a Perl module file that captures the structure of
-# the code including all documentation. Note that this
-# feature is still experimental and incomplete at the
-# moment.
-
-GENERATE_PERLMOD = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
-# nicely formatted so it can be parsed by a human reader. This is useful
-# if you want to understand what is going on. On the other hand, if this
-# tag is set to NO the size of the Perl module output will be much smaller
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY = YES
-
-# The names of the make variables in the generated doxyrules.make file
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
-# This is useful so different doxyrules.make files included by the same
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
-# evaluate all C-preprocessor directives found in the sources and include
-# files.
-
-ENABLE_PREPROCESSING = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
-# names in the source code. If set to NO (the default) only conditional
-# compilation will be performed. Macro expansion can be done in a controlled
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
-# then the macro expansion is limited to the macros specified with the
-# PREDEFINED and EXPAND_AS_DEFINED tags.
-
-EXPAND_ONLY_PREDEF = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
-# in the INCLUDE_PATH (see below) will be search if a #include is found.
-
-SEARCH_INCLUDES = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by
-# the preprocessor.
-
-INCLUDE_PATH =
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will
-# be used.
-
-INCLUDE_FILE_PATTERNS =
-
-# The PREDEFINED tag can be used to specify one or more macro names that
-# are defined before the preprocessor is started (similar to the -D option of
-# gcc). The argument of the tag is a list of macros of the form: name
-# or name=definition (no spaces). If the definition and the = are
-# omitted =1 is assumed. To prevent a macro definition from being
-# undefined via #undef or recursively expanded use the := operator
-# instead of the = operator.
-
-PREDEFINED =
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
-# this tag can be used to specify a list of macro names that should be expanded.
-# The macro definition that is found in the sources will be used.
-# Use the PREDEFINED tag if you want to use a different macro definition.
-
-EXPAND_AS_DEFINED =
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-# doxygen's preprocessor will remove all function-like macros that are alone
-# on a line, have an all uppercase name, and do not end with a semicolon. Such
-# function macros are typically used for boiler-plate code, and will confuse
-# the parser if not removed.
-
-SKIP_FUNCTION_MACROS = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles.
-# Optionally an initial location of the external documentation
-# can be added for each tagfile. The format of a tag file without
-# this location is as follows:
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where "loc1" and "loc2" can be relative or absolute paths or
-# URLs. If a location is present for each tag, the installdox tool
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen
-# is run, you must also specify the path to the tagfile here.
-
-TAGFILES =
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE =
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed
-# in the class index. If set to NO only the inherited external classes
-# will be listed.
-
-ALLEXTERNALS = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will
-# be listed.
-
-EXTERNAL_GROUPS = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
-# or super classes. Setting the tag to NO turns the diagrams off. Note that
-# this option is superseded by the HAVE_DOT option below. This is only a
-# fallback. It is recommended to install and use dot, since it yields more
-# powerful graphs.
-
-CLASS_DIAGRAMS = NO
-
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see
-# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-MSCGEN_PATH =
-
-# If set to YES, the inheritance and collaboration graphs will hide
-# inheritance and usage relations if the target is undocumented
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz, a graph visualization
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT = YES
-
-# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
-# allowed to run in parallel. When set to 0 (the default) doxygen will
-# base this on the number of processors available in the system. You can set it
-# explicitly to a value larger than 0 to get control over the balance
-# between CPU load and processing speed.
-
-DOT_NUM_THREADS = 0
-
-# By default doxygen will write a font called FreeSans.ttf to the output
-# directory and reference it in all dot files that doxygen generates. This
-# font does not include all possible unicode characters however, so when you need
-# these (or just want a differently looking font) you can specify the font name
-# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
-# which can be done by putting it in a standard location or by setting the
-# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
-# containing the font.
-
-DOT_FONTNAME = FreeSans.ttf
-
-# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
-# The default size is 10pt.
-
-DOT_FONTSIZE = 10
-
-# By default doxygen will tell dot to use the output directory to look for the
-# FreeSans.ttf font (which doxygen will put there itself). If you specify a
-# different font using DOT_FONTNAME you can set the path where dot
-# can find it using this tag.
-
-DOT_FONTPATH =
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect inheritance relations. Setting this tag to YES will force the
-# the CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect implementation dependencies (inheritance, containment, and
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH = YES
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for groups, showing the direct groups dependencies
-
-GROUP_GRAPHS = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
-# Language.
-
-UML_LOOK = NO
-
-# If set to YES, the inheritance and collaboration graphs will show the
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS = NO
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
-# tags are set to YES then doxygen will generate a graph for each documented
-# file showing the direct and indirect include dependencies of the file with
-# other documented files.
-
-INCLUDE_GRAPH = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
-# documented header file showing the documented files that directly or
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH = YES
-
-# If the CALL_GRAPH and HAVE_DOT options are set to YES then
-# doxygen will generate a call dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable call graphs
-# for selected functions only using the \callgraph command.
-
-CALL_GRAPH = YES
-
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
-# doxygen will generate a caller dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable caller
-# graphs for selected functions only using the \callergraph command.
-
-CALLER_GRAPH = YES
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
-# will graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY = YES
-
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
-# then doxygen will show the dependencies a directory has on other directories
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
-
-DIRECTORY_GRAPH = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot. Possible values are png, jpg, or gif
-# If left blank png will be used.
-
-DOT_IMAGE_FORMAT = png
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be
-# found. If left blank, it is assumed the dot tool can be found in the path.
-
-DOT_PATH =
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the
-# \dotfile command).
-
-DOTFILE_DIRS =
-
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
-# nodes that will be shown in the graph. If the number of nodes in a graph
-# becomes larger than this value, doxygen will truncate the graph, which is
-# visualized by representing a node as a red box. Note that doxygen if the
-# number of direct children of the root node in a graph is already larger than
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
-# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-
-DOT_GRAPH_MAX_NODES = 50
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
-# graphs generated by dot. A depth value of 3 means that only nodes reachable
-# from the root by following a path via at most 3 edges will be shown. Nodes
-# that lay further from the root node will be omitted. Note that setting this
-# option to 1 or 2 may greatly reduce the computation time needed for large
-# code bases. Also note that the size of a graph can be further restricted by
-# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
-
-MAX_DOT_GRAPH_DEPTH = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, because dot on Windows does not
-# seem to support this out of the box. Warning: Depending on the platform used,
-# enabling this option may lead to badly anti-aliased labels on the edges of
-# a graph (i.e. they become hard to read).
-
-DOT_TRANSPARENT = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10)
-# support this, this feature is disabled by default.
-
-DOT_MULTI_TARGETS = NO
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
-# generate a legend page explaining the meaning of the various boxes and
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
-# remove the intermediate dot files that are used to generate
-# the various graphs.
-
-DOT_CLEANUP = YES
+++ /dev/null
-/**
- * Copyright (C) 2011, BMW AG
- *
- * AudioManangerDeamon
- *
- * \file HookEngine.cpp
- *
- * \date 20.05.2011
- * \author Christian Müller (christian.ei.mueller@bmw.de)
- *
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
- *
- *
- */
-
-#include "HookEngine.h"
-#include <dirent.h>
-#include <dlfcn.h>
-#include <libgen.h>
-#include <unistd.h>
-
-DLT_DECLARE_CONTEXT(AudioManager);
-
-/**
- * this path needs to be adjusted to whatever is suitable on the system
- */
-const char* hookPluginDirectories[] = { "/home/christian/workspace/gitserver/build/plugins/hook"};
-uint hookPluginDirectoriesCount = sizeof(hookPluginDirectories) / sizeof(hookPluginDirectories[0]);
-
-BaseHook::BaseHook() {
-}
-
-BaseHook::~BaseHook() {
-}
-
-HookHandler::HookHandler() {
-}
-
-HookHandler::~HookHandler() {
- for (std::list<BaseHook*>::iterator hook = m_listofPlugins.begin(); hook != m_listofPlugins.end(); hook++) {
- (*hook)->DeinitHook();
- }
-}
-
-void BaseHook::registerAudioManagerCore(AudioManagerCore* core) {
- m_core = core;
-}
-
-genError_t BaseHook::registerHookEngine(HookHandler* engine) {
- m_hookhandler = engine;
- return GEN_OK;
-}
-
-genError_t HookHandler::registerHook(hookprio_t prio, genHook_t hookType, BaseHook* hookClass) {
- prioList newEntry;
- std::list<prioList>* list;
-
- if (prio < 0 || prio > 100) {
- DLT_LOG( AudioManager, DLT_LOG_WARN, DLT_STRING("Register Hook: Priority out of range: "), DLT_INT(prio));
- return GEN_OUTOFRANGE;
- }
-
- newEntry.prio = prio;
- newEntry.hook = hookClass;
-
- switch (hookType) {
- case HOOK_DOMAIN_REGISTER:
- list = &m_domainRegisterList;
- break;
- case HOOK_DOMAIN_DEREGISTER:
- list = &m_domainDeregisterList;
- break;
- case HOOK_SINK_REGISTER:
- list = &m_sinkRegisterList;
- break;
- case HOOK_SINK_DEREGISTER:
- list = &m_sinkDeregisterList;
- break;
- case HOOK_SOURCE_REGISTER:
- list = &m_sourceRegisterList;
- break;
- case HOOK_SOURCE_DEREGISTER:
- list = &m_sourceDeregisterList;
- break;
- case HOOK_GATEWAY_REGISTER:
- list = &m_gatewayRegisterList;
- break;
- case HOOK_GATEWAY_DERGISTER:
- list = &m_gatewayDeregisterList;
- break;
- case HOOK_ROUTING_REQUEST:
- list = &m_routingRequestList;
- break;
- case HOOK_ROUTING_COMPLETE:
- list = &m_routingCompleteList;
- break;
- case HOOK_SYSTEM_READY:
- list = &m_systemReadyList;
- break;
- case HOOK_SYSTEM_DOWN:
- list = &m_systemDownList;
- break;
- case HOOK_VOLUME_CHANGE:
- list = &m_volumeChangeList;
- break;
- case HOOK_MUTE_SOURCE:
- list = &m_muteSourceList;
- break;
- case HOOK_UNMUTE_SOURCE:
- list = &m_unmuteSourceList;
- break;
- case HOOK_MUTE_SINK:
- list = &m_muteSinkList;
- break;
- case HOOK_UNMUTE_SINK:
- list = &m_unmuteSinkList;
- break;
- case HOOK_USER_CONNECTION_REQUEST:
- list = &m_userConnectionRequestList;
- break;
- case HOOK_USER_DISCONNECTION_REQUEST:
- list = &m_userDisconnectionReuestList;
- break;
- case HOOK_CONNECTION_REQUEST:
- list = &m_connectionRequestList;
- break;
- case HOOK_DISCONNECTION_REQUEST:
- list = &m_disconnectionReuestList;
- break;
- case HOOK_INTERRUPT_REQUEST:
- list = &m_interruptRequestList;
- break;
- default:
- DLT_LOG(AudioManager, DLT_LOG_WARN, DLT_STRING("Trying to register unknown Hook "));
- return GEN_OUTOFRANGE;
- }
-
- int index = 0;
- std::list<prioList>::iterator l;
- for (l = list->begin(); l != list->end(); l++) {
- if (l->prio > prio) {
- index++;
- }
- }
- std::advance(l, index);
- list->insert(l, newEntry);
- //TODO test the sorting of the hooks with more than one plugin
-
- return GEN_OK;
-}
-
-genError_t HookHandler::fireHookDomainRegister(char* Name, domain_t ID) {
- for (std::list<prioList>::iterator hook = m_domainRegisterList.begin(); hook != m_domainDeregisterList.end(); hook++) {
- if (hook->hook->hookDomainRegister(Name, ID) == HOOK_STOP)
- break;
- }
- return GEN_OK;
-}
-
-genError_t HookHandler::fireHookDomainDeregister(domain_t ID) {
- for (std::list<prioList>::iterator hook = m_domainDeregisterList.begin(); hook != m_domainDeregisterList.end(); hook++) {
- if (hook->hook->hookDomainDeregister(ID) == HOOK_STOP)
- break;
- }
- return GEN_OK;
-}
-
-genError_t HookHandler::fireHookSinkRegister(char* Name, sink_t ID) {
- for (std::list<prioList>::iterator hook = m_sinkRegisterList.begin(); hook != m_sinkRegisterList.end(); hook++) {
- if (hook->hook->hookSinkRegister(Name, ID) == HOOK_STOP)
- break;
- }
- return GEN_OK;
-}
-
-genError_t HookHandler::fireHookSinkDeregister(sink_t ID) {
- for (std::list<prioList>::iterator hook = m_sinkDeregisterList.begin(); hook != m_sinkDeregisterList.end(); hook++) {
- if (hook->hook->hookSinkDeregister(ID) == HOOK_STOP)
- break;
- }
- return GEN_OK;
-}
-
-genError_t HookHandler::fireHookSourceRegister(char* Name, source_t ID) {
- for (std::list<prioList>::iterator hook = m_sourceRegisterList.begin(); hook != m_sourceRegisterList.end(); hook++) {
- if (hook->hook->hookSourceRegister(Name, ID) == HOOK_STOP)
- break;
- }
- return GEN_OK;
-}
-
-genError_t HookHandler::fireHookSourceDeregister(source_t ID) {
- for (std::list<prioList>::iterator hook = m_sourceDeregisterList.begin(); hook != m_sourceDeregisterList.end(); hook++) {
- if (hook->hook->hookSourceDeregister(ID) == HOOK_STOP)
- break;
- }
- return GEN_OK;
-}
-
-genError_t HookHandler::fireHookGatewayRegister(char* Name, gateway_t ID) {
- for (std::list<prioList>::iterator hook = m_gatewayRegisterList.begin(); hook != m_gatewayRegisterList.end(); hook++) {
- if (hook->hook->hookGatewayRegister(Name, ID) == HOOK_STOP)
- break;
- }
- return GEN_OK;
-}
-
-genError_t HookHandler::fireHookGatewayDeregister(gateway_t ID) {
- for (std::list<prioList>::iterator hook = m_gatewayDeregisterList.begin(); hook != m_gatewayDeregisterList.end(); hook++) {
- if (hook->hook->hookGatewayDeregister(ID) == HOOK_STOP)
- break;
- }
- return GEN_OK;
-}
-
-genError_t HookHandler::fireHookSystemReady(void) {
- for (std::list<prioList>::iterator hook = m_systemReadyList.begin(); hook != m_systemReadyList.end(); hook++) {
- if (hook->hook->hookSystemReady() == HOOK_STOP)
- break;
- }
- return GEN_OK;
-}
-
-genError_t HookHandler::fireHookSystemDown(void) {
- for (std::list<prioList>::iterator hook = m_systemDownList.begin(); hook != m_systemDownList.end(); hook++) {
- if (hook->hook->hookSystemDown() == HOOK_STOP)
- break;
- }
- return GEN_OK;
-}
-
-genError_t HookHandler::fireHookConnectionRequest(source_t SourceID, sink_t SinkID) {
- for (std::list<prioList>::iterator hook = m_connectionRequestList.begin(); hook != m_connectionRequestList.end(); hook++) {
- if (hook->hook->hookConnectionRequest(SourceID, SinkID) == HOOK_STOP)
- break;
- }
- return GEN_OK;
-}
-
-genError_t HookHandler::fireHookDisconnectionRequest(connection_t ID) {
- for (std::list<prioList>::iterator hook = m_disconnectionReuestList.begin(); hook != m_disconnectionReuestList.end(); hook++) {
- if (hook->hook->hookDisconnectionRequest(ID) == HOOK_STOP)
- break;
- }
- return GEN_OK;
-}
-
-genError_t HookHandler::fireHookUserConnectionRequest(Queue* queue, source_t SourceID, sink_t SinkID) {
- for (std::list<prioList>::iterator hook = m_userConnectionRequestList.begin(); hook != m_userConnectionRequestList.end(); hook++) {
- if (hook->hook->hookUserConnectionRequest(queue, SourceID, SinkID) == HOOK_STOP)
- break;
- }
- return GEN_OK;
-}
-
-genError_t HookHandler::fireHookUserDisconnectionRequest(Queue* queue, connection_t connID) {
- for (std::list<prioList>::iterator hook = m_userDisconnectionReuestList.begin(); hook != m_userDisconnectionReuestList.end(); hook++) {
- if (hook->hook->hookUserDisconnectionRequest(queue, connID) == HOOK_STOP)
- break;
- }
- return GEN_OK;
-}
-
-genError_t HookHandler::fireHookRoutingRequest(bool onlyfree, source_t source, sink_t sink, std::list<genRoute_t>* ReturnList) {
- for (std::list<prioList>::iterator hook = m_routingRequestList.begin(); hook != m_routingRequestList.end(); hook++) {
- if (hook->hook->hookRoutingRequest(onlyfree, source, sink, ReturnList) == HOOK_STOP)
- break;
- }
- return GEN_OK;
-}
-
-//todo change type
-genError_t HookHandler::fireHookRoutingComplete(genRoute_t route) {
- for (std::list<prioList>::iterator hook = m_routingCompleteList.begin(); hook != m_routingCompleteList.end(); hook++) {
- if (hook->hook->hookRoutingComplete(route) == HOOK_STOP)
- break;
- }
- return GEN_OK;
-}
-
-genError_t HookHandler::fireHookVolumeChange(volume_t newVolume, sink_t SinkID) {
- for (std::list<prioList>::iterator hook = m_volumeChangeList.begin(); hook != m_volumeChangeList.end(); hook++) {
- if (hook->hook->hookVolumeChange(newVolume, SinkID) == HOOK_STOP)
- break;
- }
- return GEN_OK;
-}
-
-genError_t HookHandler::fireHookMuteSource(source_t ID) {
- for (std::list<prioList>::iterator hook = m_muteSourceList.begin(); hook != m_muteSourceList.end(); hook++) {
- if (hook->hook->hookMuteSource(ID) == HOOK_STOP)
- break;
- }
- return GEN_OK;
-}
-
-genError_t HookHandler::fireHookUnmuteSource(source_t ID) {
- for (std::list<prioList>::iterator hook = m_unmuteSourceList.begin(); hook != m_unmuteSourceList.end(); hook++) {
- if (hook->hook->hookUnmuteSource(ID) == HOOK_STOP)
- break;
- }
- return GEN_OK;
-}
-
-genError_t HookHandler::fireHookMuteSink(sink_t ID) {
- for (std::list<prioList>::iterator hook = m_muteSinkList.begin(); hook != m_muteSinkList.end(); hook++) {
- if (hook->hook->hookMuteSink(ID) == HOOK_STOP)
- break;
- }
- return GEN_OK;
-}
-
-genError_t HookHandler::fireHookUnmuteSink(sink_t ID) {
- for (std::list<prioList>::iterator hook = m_unmuteSinkList.begin(); hook != m_unmuteSinkList.end(); hook++) {
- if (hook->hook->hookUnmuteSink(ID) == HOOK_STOP)
- break;
- }
- return GEN_OK;
-}
-
-genError_t HookHandler::fireHookInterruptRequest(Queue* queue, source_t interruptSource, sink_t sink, genInt_t* interruptID) {
- for (std::list<prioList>::iterator hook = m_interruptRequestList.begin(); hook != m_interruptRequestList.end(); hook++) {
- if (hook->hook->hookInterruptRequest(queue, interruptSource, sink, interruptID) == HOOK_STOP)
- break;
- }
- return GEN_OK;
-}
-
-void HookHandler::registerAudioManagerCore(AudioManagerCore* core) {
- m_core = core;
-}
-
-void HookHandler::loadHookPlugins() {
-
- std::list<std::string> sharedLibraryNameList;
-
- // search communicator plugins in configured directories
- for (uint dirIndex = 0; dirIndex < hookPluginDirectoriesCount; ++dirIndex) {
- const char* directoryName = hookPluginDirectories[dirIndex];
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Searching for HookPlugins in"),DLT_STRING(directoryName));
- std::list<std::string> newList=m_core->getSharedLibrariesFromDirectory(directoryName);
- sharedLibraryNameList.insert(sharedLibraryNameList.end(),newList.begin(),newList.end());
- }
-
-
- // iterate all communicator plugins and start them
- std::list<std::string>::iterator iter = sharedLibraryNameList.begin();
- std::list<std::string>::iterator iterEnd = sharedLibraryNameList.end();
-
- for (; iter != iterEnd; ++iter)
- {
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Loading Hook plugin"),DLT_STRING(iter->c_str()));
-
- BaseHook* (*createFunc)();
- createFunc = getCreateFunction<BaseHook*()>(*iter);
-
- if (!createFunc) {
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Entry point of Communicator not found"));
- continue;
- }
-
- BaseHook* HookPlugin = createFunc();
-
- if (!HookPlugin) {
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("HookPlugin initialization failed. Entry Function not callable"));
- continue;
- }
-
- HookPlugin->registerHookEngine(this);
- HookPlugin->registerAudioManagerCore(m_core);
- HookPlugin->InitHook();
- char pName[40];
- HookPlugin->returnPluginName(pName);
- DLT_LOG( AudioManager, DLT_LOG_INFO, DLT_STRING("Registered Hook Plugin:"), DLT_STRING(pName));
- m_listofPlugins.push_back(HookPlugin);
- }
-
-}
-
+++ /dev/null
-/**
- * Copyright (C) 2011, BMW AG
- *
- * AudioManangerDeamon
- *
- * \file HookEngine.h
- *
- * \date 20.05.2011
- * \author Christian Müller (christian.ei.mueller@bmw.de)
- *
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
- *
- *
- */
-
-#ifndef HOOKENGINE_H_
-#define HOOKENGINE_H_
-
-#include "audioManagerIncludes.h"
-
-class AudioManagerCore;
-class Queue;
-
-/**These define the different types of Hooks available in the system
- *
- */
-typedef enum genHook {
- HOOK_DOMAIN_REGISTER, //!< HOOK_DOMAIN_REGISTER
- HOOK_DOMAIN_DEREGISTER, //!< HOOK_DOMAIN_DEREGISTER
- HOOK_SOURCE_REGISTER, //!< HOOK_SOURCE_REGISTER
- HOOK_SOURCE_DEREGISTER, //!< HOOK_SOURCE_DEREGISTER
- HOOK_SINK_REGISTER, //!< HOOK_SINK_REGISTER
- HOOK_SINK_DEREGISTER, //!< HOOK_SINK_DEREGISTER
- HOOK_GATEWAY_REGISTER, //!< HOOK_GATEWAY_REGISTER
- HOOK_GATEWAY_DERGISTER, //!< HOOK_GATEWAY_DERGISTER
- HOOK_SYSTEM_READY, //!< HOOK_SYSTEM_READY
- HOOK_SYSTEM_DOWN, //!< HOOK_SYSTEM_DOWN
- HOOK_USER_CONNECTION_REQUEST, //!< HOOK_USER_CONNECTION_REQUEST
- HOOK_USER_DISCONNECTION_REQUEST, //!< HOOK_USER_DISCONNECTION_REQUEST
- HOOK_CONNECTION_REQUEST, //!< HOOK_CONNECTION_REQUEST
- HOOK_DISCONNECTION_REQUEST, //!< HOOK_DISCONNECTION_REQUEST
- HOOK_ROUTING_REQUEST, //!< HOOK_ROUTING_REQUEST
- HOOK_ROUTING_COMPLETE, //!< HOOK_ROUTING_COMPLETE
- HOOK_VOLUME_CHANGE, //!< HOOK_VOLUME_CHANGE
- HOOK_MUTE_SOURCE, //!< HOOK_MUTE_SOURCEDataBaseHandler
- HOOK_UNMUTE_SOURCE, //!< HOOK_UNMUTE_SOURCE
- HOOK_MUTE_SINK, //!< HOOK_MUTE_SINK
- HOOK_UNMUTE_SINK, //!< HOOK_UNMUTE_SINK
- HOOK_INTERRUPT_REQUEST
-//!< HOOK_INTERRUPT_REQUEST
-} genHook_t;
-
-class HookHandler;
-
-/**This is the base class for all HookPlugins
- * To implement a HookPlugin, a QTPlugin HookPluginFactory Class needs to be created which factors an instance of a class that is derived from
- * BaseHook.
- * All Hooks that are possible are implemented here as virtual functions. To use a hook, the derived class needs simply to overwrite the
- * virtual hook functions. This means a plugin can only have one hook function for each hook (more than one does not make sense anyway).
- * Each plugin need to implement a Init function. Within this function the hooks that the plugin wants to use need to be registered.
- *
- */
-class BaseHook {
-public:
- BaseHook();
- virtual ~BaseHook();
-
- void registerAudioManagerCore(AudioManagerCore* core);
-
- /**This function is used to register the HookHandler in the plugin.
- *
- * @param engine pointer to the instance of the HookHandler
- * @return GEN_OK on success
- */
- genError_t registerHookEngine(HookHandler* engine);
-
- /**This is the init function. Register your hooks here, like for example register to the domainregisterhook with prio 10:
- * @code m_hookhandler->registerHook(10,HOOK_DOMAIN_REGISTER,this); @endcode
- *
- * @return GEN_OK on success
- */
- virtual genError_t InitHook(void)=0;
-
- /**Deinit function. If you need to store or cleaup -> here is the right place to do it
- *
- * @return GEN_OK on success
- */
- virtual genError_t DeinitHook(void)=0;
-
- /**Retrieve the name of the plugin
- * max length of the name: 40 chars
- * @param PluginName buffer to write the name to
- * @return GEN_OK on success
- */
- virtual genError_t returnPluginName(char* PluginName)=0;
-
- virtual genHookResult_t hookDomainRegister(char* Name, domain_t ID) {
- (void) Name;
- (void) ID;
- return HOOK_UNUSED;
- }
- ;
- virtual genHookResult_t hookDomainDeregister(domain_t ID) {
- (void) ID;
- return HOOK_UNUSED;
- }
- ;
- virtual genHookResult_t hookSinkRegister(char* Name, sink_t ID) {
- (void) Name;
- (void) ID;
- return HOOK_UNUSED;
- }
- ;
- virtual genHookResult_t hookSinkDeregister(sink_t ID) {
- (void) ID;
- return HOOK_UNUSED;
- }
- ;
- virtual genHookResult_t hookSourceRegister(char* Name, source_t ID) {
- (void) Name;
- (void) ID;
- return HOOK_UNUSED;
- }
- ;
- virtual genHookResult_t hookSourceDeregister(source_t ID) {
- (void) ID;
- return HOOK_UNUSED;
- }
- ;
- virtual genHookResult_t hookGatewayRegister(char* Name, gateway_t ID) {
- (void) Name;
- (void) ID;
- return HOOK_UNUSED;
- }
- ;
- virtual genHookResult_t hookGatewayDeregister(gateway_t ID) {
- (void) ID;
- return HOOK_UNUSED;
- }
- ;
- virtual genHookResult_t hookSystemReady(void) {
- return HOOK_UNUSED;
- }
- ;
- virtual genHookResult_t hookSystemDown(void) {
- return HOOK_UNUSED;
- }
- ;
- virtual genHookResult_t hookUserConnectionRequest(Queue* queue,
- source_t SourceID, sink_t SinkID) {
- (void) queue;
- (void) SourceID;
- (void) SinkID;
- return HOOK_UNUSED;
- }
- ;
- virtual genHookResult_t hookUserDisconnectionRequest(Queue* queue,
- connection_t connID) {
- (void) queue;
- (void) connID;
- return HOOK_UNUSED;
- }
- ;
- virtual genHookResult_t hookConnectionRequest(source_t SourceID,
- sink_t SinkID) {
- (void) SourceID;
- (void) SinkID;
- return HOOK_UNUSED;
- }
- ;
- virtual genHookResult_t hookDisconnectionRequest(connection_t ID) {
- (void) ID;
- return HOOK_UNUSED;
- }
- ;
- virtual genHookResult_t hookRoutingRequest(bool onlyfree, source_t source,
- sink_t sink, std::list<genRoute_t>* ReturnList) {
- (void) onlyfree;
- (void) source;
- (void) sink;
- (void) ReturnList;
- return HOOK_UNUSED;
- }
- ;
- virtual genHookResult_t hookRoutingComplete(genRoute_t route) {
- (void) route;
- return HOOK_UNUSED;
- }
- ;
- virtual genHookResult_t hookVolumeChange(volume_t newVolume, sink_t SinkID) {
- (void) newVolume;
- (void) SinkID;
- return HOOK_UNUSED;
- }
- ;
- virtual genHookResult_t hookMuteSource(source_t ID) {
- (void) ID;
- return HOOK_UNUSED;
- }
- ;
- virtual genHookResult_t hookUnmuteSource(source_t ID) {
- (void) ID;
- return HOOK_UNUSED;
- }
- ;
- virtual genHookResult_t hookMuteSink(sink_t ID) {
- (void) ID;
- return HOOK_UNUSED;
- }
- ;
- virtual genHookResult_t hookUnmuteSink(sink_t ID) {
- (void) ID;
- return HOOK_UNUSED;
- }
- ;
- virtual genHookResult_t hookInterruptRequest(Queue* queue,
- source_t interruptSource, sink_t sink, genInt_t* interruptID) {
- (void) queue;
- (void) interruptSource;
- (void) sink;
- (void) interruptID;
- return HOOK_UNUSED;
- }
- ;
-
-protected:
- HookHandler* m_hookhandler;
- AudioManagerCore* m_core;
-};
-
-/**This class handles all the hooks.
- * It maintains a list of all registered hooks and calls them if desired.
- *
- */
-class HookHandler {
-public:
- HookHandler();
- virtual ~HookHandler();
- /**By calling this functions, all Plugins that are related to hooks are automatically loaded
- * The init function is called as well, so that the plugins can register their hooks
- */
- void loadHookPlugins();
-
- /**This function is used to register a hook
- *
- * @param prio the prio (between 0 and 100, 100 is max)
- * @param hookType gives the type of the hook. Must match the hook callback of course !
- * @param hookClass This is a pointer to the Class registering the hook. Usually this.
- * @return GEN_OK on success
- */
- genError_t registerHook(hookprio_t prio, genHook_t hookType,
- BaseHook* hookClass);
-
- void registerAudioManagerCore(AudioManagerCore* core);
-
- /**All functions starting with fire are called to execute the hook. They will go throDataBaseHandler::ugh the list
- * of registered hooks and call them after the priorities.
- */
-
- genError_t fireHookDomainRegister(char* Name, domain_t ID);
- genError_t fireHookDomainDeregister(domain_t ID);
- genError_t fireHookSinkRegister(char* Name, sink_t ID);
- genError_t fireHookSinkDeregister(sink_t ID);
- genError_t fireHookSourceRegister(char* Name, source_t ID);
- genError_t fireHookSourceDeregister(source_t ID);
- genError_t fireHookGatewayRegister(char* Name, gateway_t ID);
- genError_t fireHookGatewayDeregister(gateway_t ID);
- genError_t fireHookSystemReady(void);
- genError_t fireHookSystemDown(void);
- genError_t fireHookConnectionRequest(source_t SourceID, sink_t SinkID);
- genError_t fireHookDisconnectionRequest(connection_t ID);
- genError_t fireHookUserConnectionRequest(Queue* queue, source_t SourceID,
- sink_t SinkID);
- genError_t fireHookUserDisconnectionRequest(Queue* queue,
- connection_t connID);
- genError_t fireHookRoutingRequest(bool onlyfree, source_t SourceID, sink_t SinkID, std::list<genRoute_t>* ReturnList);
- genError_t fireHookRoutingComplete(genRoute_t route);
- genError_t fireHookVolumeChange(volume_t newVolume, sink_t SinkID);
- genError_t fireHookMuteSource(source_t ID);
- genError_t fireHookUnmuteSource(source_t ID);
- genError_t fireHookMuteSink(sink_t ID);
- genError_t fireHookUnmuteSink(sink_t ID);
- genError_t fireHookInterruptRequest(Queue* queue, source_t interruptSource,
- sink_t sink, genInt_t* interruptID);
-
-private:
- /**Struct for managing the hookLists
- * This struct holds the pointer to the instance of the hook to be called and the priority after that the list ist sorted.
- *
- */
- struct prioList {
- BaseHook* hook;
- hookprio_t prio;
- };
-
- std::list<prioList> m_domainRegisterList;
- std::list<prioList> m_domainDeregisterList;
- std::list<prioList> m_sinkRegisterList;
- std::list<prioList> m_sinkDeregisterList;
- std::list<prioList> m_sourceRegisterList;
- std::list<prioList> m_sourceDeregisterList;
- std::list<prioList> m_gatewayRegisterList;
- std::list<prioList> m_gatewayDeregisterList;
- std::list<prioList> m_systemReadyList;
- std::list<prioList> m_systemDownList;
- std::list<prioList> m_connectionRequestList;
- std::list<prioList> m_disconnectionReuestList;
- std::list<prioList> m_userConnectionRequestList;
- std::list<prioList> m_userDisconnectionReuestList;
- std::list<prioList> m_routingRequestList;
- std::list<prioList> m_routingCompleteList;
- std::list<prioList> m_volumeChangeList;
- std::list<prioList> m_muteSourceList;
- std::list<prioList> m_unmuteSourceList;
- std::list<prioList> m_muteSinkList;
- std::list<prioList> m_unmuteSinkList;
- std::list<prioList> m_interruptRequestList;
-
- AudioManagerCore* m_core;
- std::list<BaseHook*> m_listofPlugins;
-};
-
-#endif /* HOOKENGINE_H_ */
+++ /dev/null
-/**
- * Copyright (C) 2011, BMW AG
- *
- * AudioManangerDeamon
- *
- * \file Router.cpp
- *
- * \date 20.05.2011
- * \author Christian Müller (christian.ei.mueller@bmw.de)
- *
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
- *
- *
- */
-
-#include <iostream>
-#include <stdio.h>
-#include <dirent.h>
-#include <dlfcn.h>
-#include <libgen.h>
-#include <unistd.h>
-#include <string>
-
-#include "audioManagerIncludes.h"
-
-const char* routingPluginDirectories[] = { "/home/christian/workspace/gitserver/build/plugins/routing"};
-uint routingPluginDirectoriesCount = sizeof(routingPluginDirectories) / sizeof(routingPluginDirectories[0]);
-
-Router::Router() {
-}
-
-Router::~Router() {
-}
-
-void Router::registerDatabasehandler(DataBaseHandler* db_handler) {
- m_dbHandler = db_handler;
-}
-
-bool Router::get_Route_from_Source_ID_to_Sink_ID(const bool onlyfree,
- const source_t Source_ID, const sink_t Sink_ID,
- std::list<genRoute_t>* ReturnList) {
-
- domain_t Source_Domain = m_dbHandler->get_Domain_ID_from_Source_ID(
- Source_ID); //first find out in which domains the source and sink are
- domain_t Sink_Domain = m_dbHandler->get_Domain_ID_from_Sink_ID(Sink_ID);
-
- if (Source_Domain == -1 || Sink_Domain == -1) {
- return false;
- } //if source or sink does not exists, exit here
-
- RoutingTree routingtree(Source_Domain); //Build up a Tree from the Source_Domain to every other domain.
- std::list<RoutingTreeItem*> flattree; //This list is the flat tree
- std::list<RoutingTreeItem*> matchtree; //This List holds all TreeItems which have the right Domain Sink IDs
- std::list<gateway_t> gwids; //holds all gateway ids of the route
- genRoutingElement_t element;
- std::list<genRoutingElement_t> actualRoutingElement;//intermediate list of current routing pairs
- genRoute_t actualRoute; //holds the actual Route
- source_t ReturnSource = 0;
- sink_t ReturnSink = 0;
- source_t LastSource = 0;
- domain_t ReturnDomain = 0;
-
- //TODO: kind of unclean. The separation between database and router could be better.
- m_dbHandler->get_Domain_ID_Tree(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
- for(std::list<RoutingTreeItem*>::iterator rTree=flattree.begin();rTree!=flattree.end();rTree++) {
- RoutingTreeItem *p=*rTree;
- if (p->returnDomainID() == Sink_Domain) {
- matchtree.push_back(*rTree);
- }
- }
-
- //No we need to trace back the routes for each entry in matchtree
- for(std::list<RoutingTreeItem*>::iterator match=matchtree.begin(); match!=matchtree.end(); match++)
- {
- //getting the route for the actual item
- actualRoute.len = routingtree.getRoute(*match, &gwids); //This gives only the Gateway IDs we need more
-
- //go throught the gatewayids and get more information
- for (std::list<gateway_t>::iterator i=gwids.begin(); i!=gwids.end();i++) {
- m_dbHandler->get_Gateway_Source_Sink_Domain_ID_from_ID(*i, &ReturnSource, &ReturnSink,&ReturnDomain);
- //first routing pair is source to ReturnSink of course;
-// if (i == 0) {
-// element.source = Source_ID;
-// element.sink = ReturnSink;
-// element.Domain_ID = Source_Domain;
-// }
-//
-// else {
-// element.source = LastSource;
-// element.sink = ReturnSink;
-// element.Domain_ID = ReturnDomain;
-// }
- actualRoutingElement.push_back(element);
- LastSource = ReturnSource;
- }
- element.source = LastSource;
- element.sink = Sink_ID;
- element.Domain_ID = Sink_Domain;
- actualRoutingElement.push_back(element);
-
- actualRoute.Source_ID = Source_ID;
- actualRoute.Sink_ID = Sink_ID;
- actualRoute.route = actualRoutingElement;
- ReturnList->push_back(actualRoute);
- }
-
- return true;
- //TODO: return actual status !
-}
-
-RoutingTreeItem::RoutingTreeItem(const domain_t Domain_Id,
- const gateway_t Gateway_Id, RoutingTreeItem *parent) {
- parentItem = parent;
- m_domainID = Domain_Id;
- m_gatewayID = Gateway_Id;
-}
-
-RoutingTreeItem::RoutingTreeItem() {
-
-}
-
-RoutingTreeItem::~RoutingTreeItem() {
- for (std::list<RoutingTreeItem*>::iterator i=childItems.begin();i!=childItems.end();i++) {
- delete *i;
- }
-}
-
-void RoutingTreeItem::appendChild(RoutingTreeItem *item) {
- childItems.push_back(item);
-}
-
-RoutingTreeItem *RoutingTreeItem::return_Parent() {
- return parentItem;
-}
-
-domain_t RoutingTreeItem::returnDomainID() {
- return m_domainID;
-}
-
-gateway_t RoutingTreeItem::returnGatewayID() {
- return m_gatewayID;
-}
-
-RoutingTree::RoutingTree(const domain_t Root_ID) :
- m_rootItem(RoutingTreeItem(Root_ID)) {
-}
-
-RoutingTree::~RoutingTree() {
-}
-
-RoutingTreeItem* RoutingTree::insertItem(const domain_t Domain_ID,
- const gateway_t Gateway_ID, RoutingTreeItem *parentItem) {
- RoutingTreeItem *newTree = new RoutingTreeItem(Domain_ID, Gateway_ID,
- parentItem);
- parentItem->appendChild(newTree);
- m_allChildList.push_back(newTree);
- return newTree;
-}
-
-int RoutingTree::getRoute(RoutingTreeItem* Targetitem, std::list<gateway_t>* route) {
- int hopps = 0;
- RoutingTreeItem *parentItem = Targetitem;
- while (parentItem != &m_rootItem) {
- route->push_front(parentItem->returnGatewayID());
- hopps++;
- parentItem = parentItem->return_Parent();
- }
- return hopps;
-}
-
-int RoutingTree::returnRootDomainID() {
- return m_rootItem.returnDomainID();
-}
-
-RoutingTreeItem* RoutingTree::returnRootItem() {
- return &m_rootItem;
-}
-
-
-void Bushandler::load_Bus_plugins() {
- std::list<std::string> sharedLibraryNameList;
-
- for (uint dirIndex = 0; dirIndex < routingPluginDirectoriesCount; ++dirIndex) {
- const char* directoryName = routingPluginDirectories[dirIndex];
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Searching for Routing in"),DLT_STRING(directoryName));
- std::list<std::string> newList=m_core->getSharedLibrariesFromDirectory(directoryName);
- sharedLibraryNameList.insert(sharedLibraryNameList.end(),newList.begin(),newList.end());
- }
-
-
- // iterate all communicator plugins and start them
- std::list<std::string>::iterator iter = sharedLibraryNameList.begin();
- std::list<std::string>::iterator iterEnd = sharedLibraryNameList.end();
-
- for (; iter != iterEnd; ++iter)
- {
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Loading Routing plugin"),DLT_STRING(iter->c_str()));
-
- RoutingSendInterface* (*createFunc)();
- createFunc = getCreateFunction<RoutingSendInterface*()>(*iter);
-
- if (!createFunc) {
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Entry point of Communicator not found"));
- continue;
- }
-
- RoutingSendInterface* RoutingPlugin = createFunc();
-
-
- if (!RoutingPlugin) {
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("RoutingPlugin initialization failed. Entry Function not callable"));
- continue;
- }
-
- Bus newBus;
- char BusName[40];
- RoutingPlugin->return_BusName(BusName);
- newBus.Name=std::string(BusName);
- newBus.sendInterface=RoutingPlugin;
- RoutingPlugin->startup_interface(m_receiver,m_core->returnDbusHandler());
- DLT_LOG( AudioManager, DLT_LOG_INFO, DLT_STRING("Registered Routing Plugin:"), DLT_STRING(BusName));
- Busses.push_back(newBus);
- }
-}
-
-void Bushandler::StartupInterfaces() {
- std::list<Bus>::iterator busIter;
- std::list<Bus>::iterator busStart=Busses.begin();
- std::list<Bus>::iterator busEnd=Busses.end();
-
- for (busIter=busStart;busIter!=busEnd;busIter++) {
- busIter->sendInterface->system_ready();
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Bushandler:Started Interface"), DLT_STRING(busIter->Name.c_str()));
- }
-}
-
-void Bushandler::registerReceiver(RoutingReceiver * receiver) {
- m_receiver = receiver;
-}
-
-void Bushandler::registerCore (AudioManagerCore* core) {
- m_core=core;
-}
-
-RoutingSendInterface* Bushandler::getInterfaceforBus(std::string bus) {
- /**
- * \todo this could be done more nicer and faster with a hash lookup or so.. worht it??
- */
- std::list<Bus>::iterator busIter;
- std::list<Bus>::iterator busStart=Busses.begin();
- std::list<Bus>::iterator busEnd=Busses.end();
-
- for (busIter=busStart;busIter!=busEnd;busIter++) {
- {
- if (busIter->Name.compare(bus) == 0) {
- return busIter->sendInterface;
- }
- }
- }
- return NULL;
-}
-
+++ /dev/null
-/**
- * Copyright (C) 2011, BMW AG
- *
- * AudioManangerDeamon
- *
- * \file Router.h
- *
- * \date 20.05.2011
- * \author Christian Müller (christian.ei.mueller@bmw.de)
- *
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
- *
- *
- */
-
-#ifndef ROUTER_H_
-#define ROUTER_H_
-
-#include "audioManagerIncludes.h"
-
-class DataBaseHandler;
-class RoutingReceiver;
-class AudioManagerCore;
-
-/**calculates routes from sinks to sources
- * navigation for audio
- */
-class Router {
-public:
- Router();
- virtual ~Router();
-
- /**Registers the database handler
- *
- * @param db_handler pointer to dabase handler
- */
- void registerDatabasehandler(DataBaseHandler* db_handler);
-
- /**the routing algorithm. Returns a list of routes
- *
- * @param onlyfree true if only free gateways shall be used
- * @param Source_ID the source ID from wich the route should start
- * @param Sink_ID the sink ID where the route should end
- * @param ReturnList buffer for the answer.
- * @return returns true on success
- */
- bool get_Route_from_Source_ID_to_Sink_ID(const bool onlyfree,
- const source_t Source_ID, const sink_t Sink_ID,
- std::list<genRoute_t>* ReturnList);
-
-private:
- DataBaseHandler* m_dbHandler;
-};
-
-/**This represents one Item in the RoutingTree
- *
- */
-class RoutingTreeItem {
-public:
- RoutingTreeItem();
- virtual ~RoutingTreeItem();
-
- /**overloaded Constructor
- *
- * @param Domain_Id the domain ID where the gateway ends
- * @param Gateway_Id the gateway ID that connects the domains
- * @param parent pointer to the parent item in the tree
- */
- RoutingTreeItem(const domain_t Domain_Id, const gateway_t Gateway_Id = 0,
- RoutingTreeItem *parent = 0);
-
- /**appends a child from the same type to the tree
- *
- * @param child
- */
- void appendChild(RoutingTreeItem *child);
-
- /**returns a list of all child items
- *
- * @param ChildItems buffer for the child items
- */
- void returnChildItems(std::list<RoutingTreeItem*> ChildItems);
-
- /**returns the domain ID
- *
- * @return the domain ID
- */
- domain_t returnDomainID();
-
- /**returns the gateway ID
- *
- * @return gateway ID
- */
- gateway_t returnGatewayID(void);
-
- /** is used to retrieve the parent item
- *
- * @return pointer to parent RoutingTreeItem
- */
- RoutingTreeItem* return_Parent();
-
-private:
- std::list<RoutingTreeItem*> childItems; //!< List of all child items
- domain_t m_domainID; //!< the domain ID of the item
- gateway_t m_gatewayID; //!< the gateway Id
- RoutingTreeItem *parentItem; //!< pointer to the parent item
-};
-
-/**The routing tree iself
- *
- */
-class RoutingTree {
-public:
-
- /**constructor must always be called with the root domain ID
- *
- * @param Root_Domain_ID
- */
- RoutingTree(const domain_t Root_Domain_ID);
- ~RoutingTree();
-
- /**Insert an item in the Tree with the parent parentItem
- *
- * @param Domain_ID the domain Id
- * @param Gateway_ID the gateway ID
- * @param parentItem pointer to the parent Item
- * @return returns a pointer to the new item
- */
- RoutingTreeItem* insertItem(const domain_t Domain_ID,
- const gateway_t Gateway_ID, RoutingTreeItem* parentItem);
-
- /**reverses the tree to get a route to the TargetItem
- *
- * @param TargetItem pointer to the Item from which should be reversed
- * @param route pointer to a list of gateway IDs that need to be connected
- * @return the length of the route.
- */
- int getRoute(RoutingTreeItem* TargetItem, std::list<gateway_t>* route);
-
- /**returns the DomainId of the rootItem
- *
- * @return domain ID of the root Item
- */
- domain_t returnRootDomainID(void);
-
- /**returns a pointer to the rootitem
- *
- * @return pointer to the rootitem
- */
- RoutingTreeItem* returnRootItem(void);
-
-private:
- RoutingTreeItem m_rootItem; //!< pointer to root item
- std::list<RoutingTreeItem*> m_allChildList; //!< list of all childs
-};
-
-/**This class is responsible for loading the RoutingInterface Plugins
- * In order to let a plugin be loaded by the BusManager, just add it in main.cpp like this
- * @code Q_IMPORT_PLUGIN(RoutingPlugin) @code
- */
-class Bushandler {
-
-public:
- Bushandler() {};
- virtual ~Bushandler() {};
-
- /**by calling this, all bus plugins are loaded
- *
- */
- void load_Bus_plugins();
-
- /**needed to register the m_receiver Instance
- * via this function the receiver instance is given to the plugins so that they can call methods to talk to the audiomanager
- * @param m_receiver pointer to the receiver
- */
- void registerReceiver(RoutingReceiver* Receiver);
-
- void registerCore (AudioManagerCore* core);
-
- /**By calling this function the plugins are called to startup.
- * Init functions etc are done by the plugins in this phase
- */
- void StartupInterfaces();
-
- /**This function returns the pointer to the actual interface for a Bus
- *
- * @param bus the name of the bus
- * @return pointer to the interface
- */
- RoutingSendInterface* getInterfaceforBus(std::string bus);
-
- /**This signal informs the plugins that the AudioManager is ready to register Domains Sinks and Sources
- *
- */
- void signal_system_ready(void);
-
-private:
- /**Struct to save Name and Interface together
- *
- */
- struct Bus {
- RoutingSendInterface* sendInterface;
- std::string Name;
- };
-
- std::list<Bus> Busses; //!< list of all busses
- RoutingReceiver* m_receiver; //!< pointer to the routing receiver
- AudioManagerCore* m_core;
-};
-
-#endif /* ROUTER_H_ */
+++ /dev/null
-/**
- * Copyright (C) 2011, BMW AG
- *
- * AudioManangerDeamon
- *
- * \file RoutingReceive.cpp
- *
- * \date 20.05.2011
- * \author Christian Müller (christian.ei.mueller@bmw.de)
- *
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
- *
- *
- */
-
-#include "RoutingReceive.h"
-
-void RoutingReceiver::register_Databasehandler(DataBaseHandler* handler_) {
- handler = handler_;
-}
-
-int RoutingReceiver::registerDomain(char* name, char* busname, char* node, bool earlymode) {
- DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("Domain Registered: "), DLT_STRING(name));
- return handler->insert_into_Domains_table(std::string(name), std::string(busname), std::string(node), earlymode);
-}
-
-int RoutingReceiver::registerSource(char* name, char* audioclass, char* domain) {
- int id_class = handler->get_Source_Class_ID_from_Name(std::string(audioclass));
- int id_domain = handler->get_Domain_ID_from_Name(std::string(domain));
-
- if (id_class == 0) {
- DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("Class unknown: "), DLT_STRING(audioclass));
- return -1;
- } else if (id_class == -1) {
- DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("Database Error: "));
- return -1;
- }
- if (id_domain == 0) {
- DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("Domain unknown: "));
- return -1;
- } else if (id_class == -1) {
- DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("Database Error: "));
- return -1;
- }
-
- return handler->insert_into_Source_table(std::string(name), id_class, id_domain, false);
-}
-int RoutingReceiver::registerSink(char* name, char* sinkclass, char* domain) {
- //TODO: Integrate Sink Classes
- (void) sinkclass;
- int id_sinkclass = 1;
- int id_domain = handler->get_Domain_ID_from_Name(std::string(domain));
-
- if (id_domain == 0) {
- DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("Domain unknown: "));
- return -1;
- }
-
- return handler->insert_into_Sink_table(std::string(name), id_sinkclass, id_domain, false);
-}
-int RoutingReceiver::registerGateway(char* name, char* sink, char* source, char *domainSource, char* domainSink, char* controlDomain) {
-
- int domainSourceID = handler->get_Domain_ID_from_Name(std::string(domainSource));
- if (domainSourceID == 0) {
- domainSourceID = handler->peek_Domain_ID(std::string(domainSource));
- }
- int domainSinkID = handler->get_Domain_ID_from_Name(std::string(domainSink));
- if (domainSinkID == 0) {
- domainSinkID = handler->peek_Domain_ID(std::string(domainSink));
- }
- int domainControlID = handler->get_Domain_ID_from_Name(std::string(controlDomain));
-
- if (domainSourceID == 0) {
- DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("Domain Source unknown: "));
- return -1;
- }
- if (domainSink == 0) {
- DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("Domain Sink unknown: "));
- return -1;
- }
- if (domainControlID == 0) {
- DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("Domain Control unknown: "));
- return -1;
- }
-
- int sourceId = handler->insert_into_Source_table(std::string(source), 0, domainSourceID, true);
- int sinkID = handler->insert_into_Sink_table(std::string(sink), 0, domainSinkID, true);
- return handler->insert_into_Gatway_table(std::string(name), sinkID, sourceId, domainSourceID, domainSinkID, domainControlID);
-
-}
-
-int RoutingReceiver::peekDomain(char* name) {
- return handler->peek_Domain_ID(std::string(name));
-}
-
-void RoutingReceiver::ackConnect(genHandle_t handle, genError_t error) {
- //emit signal_ackConnect(handle, error);
-}
-
-RoutingReceiver::RoutingReceiver()
-{
-}
-
-void RoutingReceiver::ackDisconnect(genHandle_t handle, genError_t error)
-{
-}
-
-
-
-void RoutingReceiver::signal_ackConnect(genHandle_t handle, genError_t error)
-{
-}
-
-
-
-
+++ /dev/null
-/**
- * Copyright (C) 2011, BMW AG
- *
- * AudioManangerDeamon
- *
- * \file RoutingReceive.h
- *
- * \date 20.05.2011
- * \author Christian Müller (christian.ei.mueller@bmw.de)
- *
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
- *
- *
- */
-
-#ifndef DEAMONACTIONS_H_
-#define DEAMONACTIONS_H_
-
-#include "audioManagerIncludes.h"
-
-class DataBaseHandler;
-
-/**implementation of the interface
- *
- */
-class RoutingReceiver: public RoutingReceiveInterface {
-
-public:
- RoutingReceiver();
- virtual ~RoutingReceiver() {}
- void register_Databasehandler(DataBaseHandler* handler_); //is used to register the Database handler
-
- int registerDomain(char* name, char* busname, char* node, bool earlymode);
- int registerGateway(char* name, char* sink, char* source, char *domainSource, char* domainSink, char* controlDomain);
- int registerSink(char* name, char* sinkclass, char* domain);
- int registerSource(char* name, char* audioclass, char* domain);
- int peekDomain(char* name);
- void ackConnect(genHandle_t handle, genError_t error);
- void ackDisconnect(genHandle_t handle, genError_t error);
-
- void signal_ackConnect(genHandle_t handle, genError_t error);
-
-private:
- DataBaseHandler* handler;
-};
-
-#endif /* DEAMONACTIONS_H_ */
+++ /dev/null
-/**
- * Copyright (C) 2011, BMW AG
- *
- * AudioManangerDeamon
- *
- * \file audioManagerIncludes.h
- * include this file to have all the basic headers used by the AudioManager included
- *
- * \date 20.05.2011
- * \author Christian Müller (christian.ei.mueller@bmw.de)
- *
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
- *
- *
- */
-
-#ifndef AUDIOMANAGERINCLUDES_H_
-#define AUDIOMANAGERINCLUDES_H_
-
-#define WITH_DBUS 1
-
-#include "dlt/dlt.h"
-DLT_IMPORT_CONTEXT(AudioManager)
-
-#include "dataTypes.h"
-#include "routinginterface.h"
-#include "commandInterface.h"
-#include "DataBaseHandler.h"
-#include "RoutingReceive.h"
-#include "Router.h"
-#include "HookEngine.h"
-#include "AudioManagerCore.h"
-#include "pluginTemplate.h"
-#include "CommandHandler.h"
-#include "CommandReceive.h"
-
-#endif /* AUDIOMANAGERINCLUDES_H_ */
+++ /dev/null
-/**\r
- * Copyright (C) 2011, BMW AG\r
- *\r
- * AudioManangerDeamon\r
- *\r
- * \file DBusCommandInterface.h\r
- *\r
- * \date 20.05.2011\r
- * \author Christian Müller (christian.ei.mueller@bmw.de)\r
- *\r
- * \section License\r
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)\r
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de\r
- *\r
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.\r
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.\r
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.\r
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.\r
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.\r
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.\r
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.\r
- *\r
- *\r
- */\r
-\r
-#ifndef COMMANDINTERFACE_H\r
-#define COMMANDINTERFACE_H\r
-\r
-#include "audioManagerIncludes.h"\r
-\r
-\r
-#define SERVICEINTERFACE "org.Genivi.ControllerInterface"\r
-\r
-class CommandSendInterface;\r
-\r
-/**\r
- * The interface towards the Controlling Instace (e.g HMI).\r
- * It handles the communication towards the HMI. It also implements some\r
- * Application logic that needs to be triggered to execute the actions demanded by\r
- * the Controller.\r
- * \todo: make a clear seperation between hmi Interface and Application Logic\r
- */\r
-class CommandReceiveInterface {\r
-\r
-public:\r
- virtual connection_t connect(source_t source, sink_t sink)=0;\r
- virtual connection_t disconnect(source_t source, source_t sink)=0;\r
- virtual std::list<ConnectionType> getListConnections()=0;\r
- virtual std::list<SinkType> getListSinks()=0;\r
- virtual std::list<SourceType> getListSources()=0;\r
- virtual genInt_t interruptRequest(const std::string &SourceName, const std::string &SinkName)=0;\r
- virtual interrupt_t interruptResume(interrupt_t interrupt)=0;\r
- virtual volume_t setVolume(sink_t sink, volume_t volume)=0;\r
-};\r
-\r
-class CommandSendInterface {\r
-public:\r
- virtual void startupInterface(CommandReceiveInterface * action, dbusRoothandler* dbushandler)=0;\r
- virtual void stop()=0;\r
- /**\r
- * Callback that is called when the number of connections change\r
- */\r
- virtual void cbConnectionChanged()=0;\r
- /**\r
- * Callback that is called when the number of sinks change\r
- */\r
- virtual void cbNumberOfSinksChanged()=0;\r
- /**\r
- * Callback that is called when the number of sources change\r
- */\r
- virtual void cbNumberOfSourcesChanged()=0;\r
-};\r
-\r
-#endif /* COMMANDINTERFACE_H */\r
+++ /dev/null
-/*
- * Copyright (C) 2011, BMW AG
- *
- * AudioManagerDeamon
- *
- * @file dataTypes.h
- *
- * @date: 20.05.2011
- * @author: Christian Müller (christian.ei.mueller@bmw.de)
- *
- */
-
-#ifndef DATATYPES_H_
-#define DATATYPES_H_
-
-#include <list>
-#include <string>
-
-typedef int source_t;
-typedef int sink_t;
-typedef int domain_t;
-typedef int gateway_t;
-typedef int connection_t;
-typedef int interrupt_t;
-typedef int volume_t;
-typedef int genHandle_t;
-typedef int genInt_t;
-typedef int hookprio_t;
-typedef int sourceClass_t;
-typedef int sinkClass_t;
-
-/**Global defined error Type
- *
- */
-typedef enum genError {
- GEN_OK, //!< GEN_OK
- GEN_UNKNOWN, //!< GEN_UNKNOWN
- GEN_OUTOFRANGE, //!< GEN_OUTOFRANGE
- GEN_NOTUSED, //!< GEN_NOTUSED
- GEN_DATABASE_ERROR
-//!< GEN_DATABASE_ERROR
-} genError_t;
-
-/** the resulttype for the hooks
- *
- */
-typedef enum genHookResult {
- HOOK_OK, //!< HOOK_OK
- HOOK_STOP,//!< HOOK_STOP
- HOOK_UNUSED
-//!< HOOK_UNUSED
-} genHookResult_t;
-
-/** This represents one "hopp" in the route
- * TODO: change from public structs into own public classes
- */
-struct genRoutingElement_t {
- source_t source;
- sink_t sink;
- domain_t Domain_ID;
-};
-
-/**This is a container for a complete route.
- * A List of "hopps" and a length.
- */
-class genRoute_t {
-public:
- int len;
- source_t Source_ID;
- sink_t Sink_ID;
- std::list<genRoutingElement_t> route;
-};
-
-/**This class describes the interrupt Type.
- * \var ID the ID of the Interrupt (unique)
- * \var connID the Connection ID that is used
- * \var sourceID the SourceID of the Interrupt
- * \var sinkID the sinkID of the interrupt
- * \var mixed true if interrupt is mixed into current audio
- * \var listInterruptSources the list of the interrupted sources.
- */
-class interruptType_t {
-public:
- genInt_t ID;
- connection_t connID;
- source_t sourceID;
- sink_t SinkID;
- bool mixed;
- std::list<source_t> listInterruptedSources;
-};
-
-class SinkType {
-public:
- std::string name;
- sink_t ID;
-};
-
-class SourceType {
-public:
- std::string name;
- source_t ID;
-};
-
-class ConnectionType {
-public:
- source_t Source_ID;
- sink_t Sink_ID;
-};
-
-#endif /* DATATYPES_H_ */
+++ /dev/null
-/*
- * dbusRoothandler.cpp
- *
- * Created on: Aug 1, 2011
- * Author: christian
- */
-
-#include "audioManagerIncludes.h"
-#ifdef WITH_DBUS
-
-#include "dbusRoothandler.h"
-
-#define ROOT_INTROSPECT_XML \
-DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE \
-"<node>" \
-"<interface name='org.freedesktop.DBus.Introspectable'>" \
-"<method name='Introspect'>" \
-" <arg name='xml_data' type='s' direction='out'/>" \
-"</method>" \
-"</interface>" \
-
-
-dbusRoothandler* dbusRoothandler::m_reference = NULL;
-
-static DBusObjectPathVTable vtable =
-{
- NULL,dbusRoothandler::cbRootIntrospection,NULL, NULL, NULL, NULL
-};
-
-
-DBusHandlerResult dbusRoothandler::cbRootIntrospection(DBusConnection *conn, DBusMessage *msg, void *reference) {
- m_reference=(dbusRoothandler*)reference;
- std::list<std::string>nodesList=m_reference->m_nodesList;
- DBusMessage * reply;
- DBusMessageIter args;
- dbus_uint32_t serial = 0;
- DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("Root Callback called"));
- if (dbus_message_is_method_call(msg, DBUS_INTERFACE_INTROSPECTABLE, "Introspect")) {
- std::list<std::string>::iterator nodeIter;
- std::list<std::string>::iterator nodeIterStart=nodesList.begin();
- std::list<std::string>::iterator nodeIterEnd=nodesList.end();
- const char *xml=ROOT_INTROSPECT_XML;
- std::stringstream introspect;
- introspect << std::string(xml);
- for(nodeIter=nodeIterStart;nodeIter!=nodeIterEnd;nodeIter++) {
- introspect<<"<node name='"<<nodeIter->c_str()<<"'/>";
- }
- introspect<<"</node>";
-
- reply = dbus_message_new_method_return(msg);
- std::string s = introspect.str();
- const char* string=s.c_str();
-
- // add the arguments to the reply
- dbus_message_iter_init_append(reply, &args);
- if (!dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING, &string))
- {
- DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("DBUS Out Of Memory!"));
- }
-
- // send the reply && flush the connection
- if (!dbus_connection_send(conn, reply, &serial))
- {
- DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("DBUS Out Of Memory!"));
- }
- dbus_connection_flush(conn);
- // free the reply
- dbus_message_unref(reply);
-
- return DBUS_HANDLER_RESULT_HANDLED;
- } else {
- return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
- }
-}
-
-dbusRoothandler::dbusRoothandler() : m_pConnection(0),m_err(),m_nodesList() {
- dbus_error_init(&m_err);
-
- // connect to the bus and check for errors
- m_pConnection = dbus_bus_get(DBUS_BUS_SESSION, &m_err);
- if (dbus_error_is_set(&m_err))
- {
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Error while getting the DBus"));
- dbus_error_free(&m_err);
- }
- if (NULL == m_pConnection)
- {
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("DBus Connection is null"));
- }
-
- dbus_connection_register_object_path(m_pConnection, DBUS_SERVICE_ROOT, &vtable, this);
- int ret = dbus_bus_request_name(m_pConnection,DBUS_SERVICE_SERVICE,DBUS_NAME_FLAG_DO_NOT_QUEUE, &m_err);
- if (dbus_error_is_set(&m_err))
- {
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("DBUSCommunicator Name Error"),DLT_STRING(m_err.message));
- dbus_error_free(&m_err);
- }
- if (DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER != ret)
- {
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("DBUSCommunicatorNot Primary Owner"), DLT_INT(ret));
- }
-
- // TODO Auto-generated constructor stub
-
-}
-
-dbusRoothandler::~dbusRoothandler() {
- // TODO Auto-generated destructor stub
-}
-
-
-DBusConnection *dbusRoothandler::returnConnection(){
- return m_pConnection;
-}
-
-void dbusRoothandler::registerNode(std::string node){
- m_nodesList.push_back(node);
-}
-
-#endif
-
-
-
-
+++ /dev/null
-/*
- * dbusRoothandler.h
- *
- * Created on: Aug 1, 2011
- * Author: christian
- */
-
-#ifndef DBUSROOTHANDLER_H_
-#define DBUSROOTHANDLER_H_
-
-#include "audioManagerIncludes.h"
-#ifdef WITH_DBUS
-#include <dbus/dbus.h>
-#include <string.h>
-#include <list>
-#include <sstream>
-
-const char DBUS_SERVICE_SERVICE[]="org.genivi.audiomanager\0";
-const char DBUS_SERVICE_ROOT[]="/org/genivi/audiomanager\0";
-
-class dbusRoothandler {
-public:
- dbusRoothandler();
- virtual ~dbusRoothandler();
- DBusConnection* returnConnection();
- static DBusHandlerResult cbRootIntrospection(DBusConnection *conn, DBusMessage *msg, void *reference);
- void registerNode(std::string node);
-private:
- static dbusRoothandler* m_reference;
- DBusConnection* m_pConnection;
- DBusError m_err;
- std::list<std::string> m_nodesList;
-};
-
-#endif
-#endif /* DBUSROOTHANDLER_H_ */
--- /dev/null
+/*
+ * CommandReceiver.h
+ *
+ * Created on: Oct 24, 2011
+ * Author: christian
+ */
+
+#ifndef COMMANDRECEIVER_H_
+#define COMMANDRECEIVER_H_
+
+
+#include <command/CommandReceiveInterface.h>
+#include "DatabaseHandler.h"
+#include "DBusWrapper.h"
+
+using namespace am;
+
+class CommandReceiver: public CommandReceiveInterface {
+public:
+ CommandReceiver(DatabaseHandler* iDatabaseHandler, DBusWrapper* iDBusWrapper);
+ virtual ~CommandReceiver();
+ am_Error_e connect(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t& mainConnectionID) ;
+ am_Error_e disconnect(const am_mainConnectionID_t mainConnectionID) ;
+ am_Error_e setVolume(const am_sinkID_t sinkID, const am_mainVolume_t volume) ;
+ am_Error_e volumeStep(const am_sinkID_t sinkID, const int16_t volumeStep) ;
+ am_Error_e setSinkMuteState(const am_sinkID_t sinkID, const am_MuteState_e muteState) ;
+ am_Error_e setMainSinkSoundProperty(const am_MainSoundProperty_s& soundProperty, const am_sinkID_t sinkID) ;
+ am_Error_e setMainSourceSoundProperty(const am_MainSoundProperty_s& soundProperty, const am_sourceID_t sourceID) ;
+ am_Error_e setSystemProperty(const am_SystemProperty_s& property) ;
+ am_Error_e getListMainConnections(std::vector<am_MainConnectionType_s>& listConnections) const ;
+ am_Error_e getListMainSinks(std::vector<am_SinkType_s>& listMainSinks) const ;
+ am_Error_e getListMainSources(std::vector<am_SourceType_s>& listMainSources) const ;
+ am_Error_e getListMainSinkSoundProperties(const am_sinkID_t sinkID, std::vector<am_MainSoundProperty_s>& listSoundProperties) const ;
+ am_Error_e getListMainSourceSoundProperties(const am_sourceID_t sourceID, std::vector<am_MainSoundProperty_s>& listSourceProperties) const ;
+ am_Error_e getListSourceClasses(std::vector<am_SourceClass_s>& listSourceClasses) const ;
+ am_Error_e getListSinkClasses(std::vector<am_SinkClass_s>& listSinkClasses) const ;
+ am_Error_e getListSystemProperties(std::vector<am_SystemProperty_s>& listSystemProperties) const ;
+ am_Error_e getTimingInformation(const am_mainConnectionID_t mainConnectionID, am_timeSync_t& delay) const ;
+ am_Error_e getDBusConnectionWrapper(DBusWrapper*& dbusConnectionWrapper) const ;
+
+private:
+ DatabaseHandler* mDatabaseHandler;
+ DBusWrapper* mDBusWrapper;
+};
+
+#endif /* COMMANDRECEIVER_H_ */
--- /dev/null
+/*
+ * CommandSender.h
+ *
+ * Created on: Oct 26, 2011
+ * Author: christian
+ */
+
+#ifndef COMMANDSENDER_H_
+#define COMMANDSENDER_H_
+
+#include "pluginTemplate.h"
+#include "command/CommandSendInterface.h"
+
+using namespace am;
+
+class CommandSender {
+public:
+ CommandSender();
+ virtual ~CommandSender();
+ am_Error_e startupInterface(CommandReceiveInterface* commandreceiveinterface) ;
+ am_Error_e stopInterface() ;
+ void cbCommunicationReady() ;
+ void cbCommunicationRundown() ;
+ void cbNumberOfMainConnectionsChanged() ;
+ void cbNumberOfSinksChanged() ;
+ void cbNumberOfSourcesChanged() ;
+ void cbNumberOfSinkClassesChanged() ;
+ void cbNumberOfSourceClassesChanged() ;
+ void cbMainConnectionStateChanged(const am_mainConnectionID_t connectionID, const am_ConnectionState_e connectionState) ;
+ void cbMainSinkSoundPropertyChanged(const am_sinkID_t sinkID, const am_MainSoundProperty_s SoundProperty) ;
+ void cbMainSourceSoundPropertyChanged(const am_sourceID_t sourceID, const am_MainSoundProperty_s& SoundProperty) ;
+ void cbSinkAvailabilityChanged(const am_sinkID_t sinkID, const am_Availability_s& availability) ;
+ void cbSourceAvailabilityChanged(const am_sourceID_t sourceID, const am_Availability_s& availability) ;
+ void cbVolumeChanged(const am_sinkID_t sinkID, const am_mainVolume_t volume) ;
+ void cbSinkMuteStateChanged(const am_sinkID_t sinkID, const am_MuteState_e muteState) ;
+ void cbSystemPropertyChanged(const am_SystemProperty_s& SystemProperty) ;
+ void cbTimingInformationChanged(const am_mainConnectionID_t mainConnection, const am_timeSync_t time) ;
+private:
+ std::vector<CommandSendInterface*> mListInterfaces;
+};
+
+#endif /* COMMANDSENDER_H_ */
--- /dev/null
+/*
+ * ControlLoader.h
+ *
+ * Created on: Oct 25, 2011
+ * Author: christian
+ */
+
+#ifndef CONTROLLOADER_H_
+#define CONTROLLOADER_H_
+
+#include "control/ControlSendInterface.h"
+
+using namespace am;
+
+class ControlLoader {
+public:
+ ControlLoader();
+ virtual ~ControlLoader();
+ ControlSendInterface* returnControl();
+private:
+ ControlSendInterface* mControler;
+};
+
+#endif /* CONTROLLOADER_H_ */
--- /dev/null
+/*
+ * ContronlReceiver.h
+ *
+ * Created on: Oct 24, 2011
+ * Author: christian
+ */
+
+#ifndef CONTRONLRECEIVER_H_
+#define CONTRONLRECEIVER_H_
+
+#include <control/ControlReceiveInterface.h>
+#include "DatabaseHandler.h"
+
+using namespace am;
+
+class ControlReceiver: public ControlReceiveInterface {
+public:
+ ControlReceiver(DatabaseHandler* iDatabaseHandler);
+ virtual ~ControlReceiver();
+ am_Error_e getRoute(const bool onlyfree, const am_sourceID_t sourceID, const am_sinkID_t sinkID, std::vector<am_Route_s>& returnList) ;
+ am_Error_e connect(am_Handle_s& handle, am_connectionID_t& connectionID, const am_ConnectionFormat_e format, const am_sourceID_t sourceID, const am_sinkID_t sinkID) ;
+ am_Error_e disconnect(am_Handle_s& handle, const am_connectionID_t connectionID) ;
+ am_Error_e crossfade(am_Handle_s& handle, const am_HotSink_e hotSource, const am_crossfaderID_t crossfaderID, const am_RampType_e rampType, const am_time_t rampTime) ;
+ am_Error_e setSourceState(am_Handle_s& handle, const am_sourceID_t sourceID, const am_SourceState_e state) ;
+ am_Error_e setSinkVolume(am_Handle_s& handle, const am_sinkID_t sinkID, const am_volume_t volume, const am_RampType_e ramp, const am_time_t time) ;
+ am_Error_e setSourceVolume(am_Handle_s& handle, const am_sourceID_t sourceID, const am_volume_t volume, const am_RampType_e rampType, const am_time_t time) ;
+ am_Error_e setSinkSoundProperty(am_Handle_s& handle, const am_sinkID_t sinkID, const am_SoundProperty_s& soundProperty) ;
+ am_Error_e setSourceSoundProperty(am_Handle_s& handle, const am_sourceID_t sourceID, const am_SoundProperty_s& soundProperty) ;
+ am_Error_e setDomainState(const am_domainID_t domainID, const am_DomainState_e domainState) ;
+ am_Error_e abortAction(const am_Handle_s handle) ;
+ am_Error_e enterDomainDB(const am_Domain_s& domainData, am_domainID_t& domainID) ;
+ am_Error_e enterMainConnectionDB(const am_MainConnection_s& mainConnectionData, am_mainConnectionID_t& connectionID) ;
+ am_Error_e enterSinkDB(const am_Sink_s& sinkData, am_sinkID_t& sinkID) ;
+ am_Error_e enterCrossfaderDB(const am_Crossfader_s& crossfaderData, am_crossfaderID_t& crossfaderID) ;
+ am_Error_e enterGatewayDB(const am_Gateway_s& gatewayData, am_gatewayID_t& gatewayID) ;
+ am_Error_e enterSourceDB(const am_Source_s& sourceData, am_sourceID_t& sourceID) ;
+ am_Error_e enterSinkClassDB(const am_SinkClass_s & sinkClass, am_sinkClass_t & sinkClassID) ;
+ am_Error_e enterSourceClassDB(am_sourceClass_t & sourceClassID, const am_SourceClass_s & sourceClass) ;
+ am_Error_e enterSystemPropertiesListDB(const std::vector<am_SystemProperty_s>& listSystemProperties) ;
+ am_Error_e changeMainConnectionRouteDB(const am_mainConnectionID_t mainconnectionID, const am_Route_s& route) ;
+ am_Error_e changeMainConnectionStateDB(const am_mainConnectionID_t mainconnectionID, const am_ConnectionState_e connectionState) ;
+ am_Error_e changeSinkMainVolumeDB(const am_mainVolume_t mainVolume, const am_sinkID_t sinkID) ;
+ am_Error_e changeSinkAvailabilityDB(const am_Availability_s& availability, const am_sinkID_t sinkID) ;
+ am_Error_e changDomainStateDB(const am_DomainState_e domainState, const am_domainID_t domainID) ;
+ am_Error_e changeSinkMuteStateDB(const am_MuteState_e muteState, const am_sinkID_t sinkID) ;
+ am_Error_e changeMainSinkSoundPropertyDB(const am_MainSoundProperty_s& soundProperty, const am_sinkID_t sinkID) ;
+ am_Error_e changeMainSourceSoundPropertyDB(const am_MainSoundProperty_s& soundProperty, const am_sourceID_t sourceID) ;
+ am_Error_e changeSourceAvailabilityDB(const am_Availability_s& availability, const am_sourceID_t sourceID) ;
+ am_Error_e changeSystemPropertyDB(const am_SystemProperty_s& property) ;
+ am_Error_e changeSinkClassInfoDB(const am_SinkClass_s& classInfo) ;
+ am_Error_e changeSourceClassInfoDB(const am_SourceClass_s& classInfo) ;
+ am_Error_e removeMainConnectionDB(const am_mainConnectionID_t mainConnectionID) ;
+ am_Error_e removeSinkDB(const am_sinkID_t sinkID) ;
+ am_Error_e removeSourceDB(const am_sourceID_t sourceID) ;
+ am_Error_e removeGatewayDB(const am_gatewayID_t gatewayID) ;
+ am_Error_e removeCrossfaderDB(const am_crossfaderID_t crossfaderID) ;
+ am_Error_e removeDomainDB(const am_domainID_t domainID) ;
+ am_Error_e removeSinkClassDB(const am_sinkClass_t sinkClassID) ;
+ am_Error_e removeSourceClassDB(const am_sourceClass_t sourceClassID) ;
+ am_Error_e getSourceClassInfoDB(const am_sourceID_t sourceID, am_SourceClass_s& classInfo) const ;
+ am_Error_e getSinkClassInfoDB(const am_sinkID_t sinkID, am_SinkClass_s& sinkClass) const ;
+ am_Error_e getGatewayInfoDB(const am_gatewayID_t gatewayID, am_Gateway_s& gatewayData) const ;
+ am_Error_e getCrossfaderInfoDB(const am_crossfaderID_t crossfaderID, am_Crossfader_s& crossfaderData) const ;
+ am_Error_e getListSinksOfDomain(const am_domainID_t domainID, std::vector<am_sinkID_t>& listSinkID) const ;
+ am_Error_e getListSourcesOfDomain(const am_domainID_t domainID, std::vector<am_sourceID_t>& listSourceID) const ;
+ am_Error_e getListCrossfadersOfDomain(const am_domainID_t domainID, std::vector<am_crossfaderID_t>& listGatewaysID) const ;
+ am_Error_e getListGatewaysOfDomain(const am_domainID_t domainID, std::vector<am_gatewayID_t>& listGatewaysID) const ;
+ am_Error_e getListMainConnections(std::vector<am_MainConnection_s>& listMainConnections) const ;
+ am_Error_e getListDomains(std::vector<am_Domain_s>& listDomains) const ;
+ am_Error_e getListConnections(std::vector<am_Connection_s>& listConnections) const ;
+ am_Error_e getListSinks(std::vector<am_Sink_s>& listSinks) const ;
+ am_Error_e getListSources(std::vector<am_Source_s>& lisSources) const ;
+ am_Error_e getListSourceClasses(std::vector<am_SourceClass_s>& listSourceClasses) const ;
+ am_Error_e getListHandles(std::vector<am_Handle_s>& listHandles) const ;
+ am_Error_e getListCrossfaders(std::vector<am_Crossfader_s>& listCrossfaders) const ;
+ am_Error_e getListGateways(std::vector<am_Gateway_s>& listGateways) const ;
+ am_Error_e getListSinkClasses(std::vector<am_SinkClass_s>& listSinkClasses) const ;
+ am_Error_e getListSystemProperties(std::vector<am_SystemProperty_s>& listSystemProperties) const ;
+ void setRoutingReady() ;
+ void setCommandReady() ;
+
+private:
+ DatabaseHandler* mDatabaseHandler;
+};
+
+#endif /* CONTRONLRECEIVER_H_ */
--- /dev/null
+/*
+ * DatabaseHandler.h
+ *
+ * Created on: Oct 24, 2011
+ * Author: christian
+ */
+
+#ifndef DATABASEHANDLER_H_
+#define DATABASEHANDLER_H_
+
+#include "audiomanagertypes.h"
+#include <map>
+#include <string>
+#include <vector>
+#include <sqlite3.h>
+
+using namespace am;
+
+#define DYNAMIC_ID_BOUNDARY 100
+
+//todo: we do not have to create MainSoundProperty tables if visible = false.
+//todo: check the enum values before entering & changing in the database.
+//todo: change asserts for dynamic boundary checks into failure answers.#
+//todo: check autoincrement boundary and set to 16bit limits
+//todo: If the sink is part of a gateway, the listconnectionFormats is copied to the gatewayInformation. Check this statement for sinks & sources
+
+class DatabaseHandler {
+public:
+ DatabaseHandler();
+ virtual ~DatabaseHandler();
+ am_Error_e enterDomainDB(const am_Domain_s& domainData, am_domainID_t& domainID) ;
+ am_Error_e enterMainConnectionDB(const am_MainConnection_s& mainConnectionData, am_mainConnectionID_t& connectionID) ;
+ am_Error_e enterSinkDB(const am_Sink_s& sinkData, am_sinkID_t& sinkID) ;
+ am_Error_e enterCrossfaderDB(const am_Crossfader_s& crossfaderData, am_crossfaderID_t& crossfaderID) ;
+ am_Error_e enterGatewayDB(const am_Gateway_s& gatewayData, am_gatewayID_t& gatewayID) ;
+ am_Error_e enterSourceDB(const am_Source_s& sourceData, am_sourceID_t& sourceID) ;
+ am_Error_e enterConnectionDB(const am_Connection_s& connection, am_connectionID_t& connectionID);
+ am_Error_e enterSinkClassDB(const am_SinkClass_s& sinkClass, am_sinkClass_t& sinkClassID) ;
+ am_Error_e enterSourceClassDB(am_sourceClass_t& sourceClassID, const am_SourceClass_s& sourceClass) ;
+ am_Error_e enterSystemProperties(const std::vector<am_SystemProperty_s>& listSystemProperties) ;
+ am_Error_e changeMainConnectionRouteDB(const am_mainConnectionID_t mainconnectionID, const am_Route_s& route) ;
+ am_Error_e changeMainConnectionStateDB(const am_mainConnectionID_t mainconnectionID, const am_ConnectionState_e connectionState) ;
+ am_Error_e changeSinkMainVolumeDB(const am_mainVolume_t mainVolume, const am_sinkID_t sinkID) ;
+ am_Error_e changeSinkAvailabilityDB(const am_Availability_s& availability, const am_sinkID_t sinkID) ;
+ am_Error_e changDomainStateDB(const am_DomainState_e domainState, const am_domainID_t domainID) ;
+ am_Error_e changeSinkMuteStateDB(const am_MuteState_e muteState, const am_sinkID_t sinkID) ;
+ am_Error_e changeMainSinkSoundPropertyDB(const am_MainSoundProperty_s& soundProperty, const am_sinkID_t sinkID) ;
+ am_Error_e changeMainSourceSoundPropertyDB(const am_MainSoundProperty_s& soundProperty, const am_sourceID_t sourceID) ;
+ am_Error_e changeSourceAvailabilityDB(const am_Availability_s& availability, const am_sourceID_t sourceID) ;
+ am_Error_e changeSystemPropertyDB(const am_SystemProperty_s& property) ;
+ am_Error_e changeDelayMainConnection(const am_timeSync_t & delay, const am_mainConnectionID_t & connectionID) ;
+ am_Error_e changeSinkClassInfoDB(const am_SinkClass_s& sinkClass) ;
+ am_Error_e changeSourceClassInfoDB(const am_SourceClass_s& sourceClass) ;
+ am_Error_e changeConnectionTimingInformation(const am_connectionID_t connectionID, const am_timeSync_t delay) ;
+ am_Error_e removeMainConnectionDB(const am_mainConnectionID_t mainConnectionID) ;
+ am_Error_e removeSinkDB(const am_sinkID_t sinkID) ;
+ am_Error_e removeSourceDB(const am_sourceID_t sourceID) ;
+ am_Error_e removeGatewayDB(const am_gatewayID_t gatewayID) ;
+ am_Error_e removeCrossfaderDB(const am_crossfaderID_t crossfaderID) ;
+ am_Error_e removeDomainDB(const am_domainID_t domainID) ;
+ am_Error_e removeSinkClassDB(const am_sinkClass_t sinkClassID) ;
+ am_Error_e removeSourceClassDB(const am_sourceClass_t sourceClassID) ;
+ am_Error_e getSourceClassInfoDB(const am_sourceID_t sourceID, am_SourceClass_s& classInfo) const ;
+ am_Error_e getSinkClassInfoDB(const am_sinkID_t sinkID, am_SinkClass_s& sinkClass) const ;
+ am_Error_e getGatewayInfoDB(const am_gatewayID_t gatewayID, am_Gateway_s& gatewayData) const ;
+ am_Error_e getCrossfaderInfoDB(const am_crossfaderID_t crossfaderID, am_Crossfader_s& crossfaderData) const ;
+ am_Error_e getListSinksOfDomain(const am_domainID_t domainID, std::vector<am_sinkID_t>& listSinkID) const ;
+ am_Error_e getListSourcesOfDomain(const am_domainID_t domainID, std::vector<am_sourceID_t>& listSourceID) const ;
+ am_Error_e getListCrossfadersOfDomain(const am_domainID_t domainID, std::vector<am_crossfaderID_t>& listGatewaysID) const ;
+ am_Error_e getListGatewaysOfDomain(const am_domainID_t domainID, std::vector<am_gatewayID_t>& listGatewaysID) const ;
+ am_Error_e getListMainConnections(std::vector<am_MainConnection_s>& listMainConnections) const ;
+ am_Error_e getListDomains(std::vector<am_Domain_s>& listDomains) const ;
+ am_Error_e getListConnections(std::vector<am_Connection_s>& listConnections) const ;
+ am_Error_e getListSinks(std::vector<am_Sink_s>& listSinks) const ;
+ am_Error_e getListSources(std::vector<am_Source_s>& lisSources) const ;
+ am_Error_e getListSourceClasses(std::vector<am_SourceClass_s>& listSourceClasses) const ;
+ am_Error_e getListCrossfaders(std::vector<am_Crossfader_s>& listCrossfaders) const ;
+ am_Error_e getListGateways(std::vector<am_Gateway_s>& listGateways) const ;
+ am_Error_e getListSinkClasses(std::vector<am_SinkClass_s>& listSinkClasses) const ;
+ am_Error_e getListVisibleMainConnections(std::vector<am_MainConnectionType_s>& listConnections) const ;
+ am_Error_e getListMainSinks(std::vector<am_SinkType_s>& listMainSinks) const ;
+ am_Error_e getListMainSources(std::vector<am_SourceType_s>& listMainSources) const ;
+ am_Error_e getListMainSinkSoundProperties(const am_sinkID_t sinkID, std::vector<am_MainSoundProperty_s>& listSoundProperties) const ;
+ am_Error_e getListMainSourceSoundProperties(const am_sourceID_t sourceID, std::vector<am_MainSoundProperty_s>& listSourceProperties) const ;
+ am_Error_e getListSystemProperties(std::vector<am_SystemProperty_s>& listSystemProperties) const ;
+ am_Error_e getTimingInformation(const am_mainConnectionID_t mainConnectionID, am_timeSync_t& delay) const ;
+ am_Error_e getDomainOfSource(const am_sourceID_t sourceID, am_domainID_t& domainID) const;
+
+
+ /**
+ * checks for a certain mainConnection
+ * @param mainConnectionID to be checked for
+ * @return true if it exists
+ */
+ bool existMainConnection(const am_mainConnectionID_t mainConnectionID) const;
+
+ /**
+ * checks for a certain Source
+ * @param sourceID to be checked for
+ * @return true if it exists
+ */
+ bool existSource(const am_sourceID_t sourceID) const;
+
+ /**
+ * checks for a certain Sink
+ * @param sinkID to be checked for
+ * @return true if it exists
+ */
+ bool existSink(const am_sinkID_t sinkID) const;
+
+ /**
+ * checks for a certain domain
+ * @param domainID to be checked for
+ * @return true if it exists
+ */
+ bool existDomain(const am_domainID_t domainID) const;
+
+ /**
+ * checks for certain gateway
+ * @param gatewayID to be checked for
+ * @return true if it exists
+ */
+ bool existGateway(const am_gatewayID_t gatewayID) const;
+
+ /**
+ * checks for certain SinkClass
+ * @param sinkClassID
+ * @return true if it exists
+ */
+ bool existSinkClass(const am_sinkClass_t sinkClassID) const;
+
+ /**
+ * checks for certain sourceClass
+ * @param sourceClassID
+ * @return true if it exists
+ */
+ bool existSourceClass(const am_sourceClass_t sourceClassID) const;
+
+private:
+ bool sqQuery(const std::string& query);
+ bool openDatabase();
+ void createTables();
+ sqlite3 *mDatabase; //!< pointer to database
+ std::string mPath;
+ bool mFirstStaticSink;
+ bool mFirstStaticSource;
+ bool mFirstStaticGateway;
+ bool mFirstStaticSinkClass;
+ bool mFirstStaticSourceClass;
+ typedef std::map<am_gatewayID_t,std::vector<bool> > ListConnectionFormat;
+ ListConnectionFormat mListConnectionFormat;
+};
+
+#endif /* DATABASEHANDLER_H_ */
--- /dev/null
+/*
+ * RoutingReceiver.h
+ *
+ * Created on: Oct 24, 2011
+ * Author: christian
+ */
+
+#ifndef ROUTINGRECEIVER_H_
+#define ROUTINGRECEIVER_H_
+
+#include "routing/RoutingReceiveInterface.h"
+
+using namespace am;
+
+class RoutingReceiver : public RoutingReceiveInterface {
+public:
+ RoutingReceiver();
+ virtual ~RoutingReceiver();
+ void ackConnect(const am_Handle_s handle, const am_connectionID_t connectionID, const am_Error_e error) ;
+ void ackDisconnect(const am_Handle_s handle, const am_connectionID_t connectionID, const am_Error_e error) ;
+ void ackSetSinkVolumeChange(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error) ;
+ void ackSetSourceVolumeChange(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error) ;
+ void ackSetSourceState(const am_Handle_s handle, const am_Error_e error) ;
+ void ackSetSinkSoundProperty(const am_Handle_s handle, const am_Error_e error) ;
+ void ackSetSourceSoundProperty(const am_Handle_s handle, const am_Error_e error) ;
+ void ackCrossFading(const am_Handle_s handle, const am_HotSink_e hotSink, const am_Error_e error) ;
+ void ackSourceVolumeTick(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume) ;
+ void ackSinkVolumeTick(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume) ;
+ am_Error_e peekDomain(const std::string& name, am_domainID_t& domainID) ;
+ am_Error_e registerDomain(const am_Domain_s& domainData, am_domainID_t& domainID) ;
+ am_Error_e deregisterDomain(const am_domainID_t domainID) ;
+ am_Error_e registerGateway(const am_Gateway_s& gatewayData, am_gatewayID_t& gatewayID) ;
+ am_Error_e deregisterGateway(const am_gatewayID_t gatewayID) ;
+ am_Error_e peekSink(const std::string& name, am_sinkID_t& sinkID) ;
+ am_Error_e registerSink(const am_Sink_s& sinkData, am_sinkID_t& sinkID) ;
+ am_Error_e deregisterSink(const am_sinkID_t sinkID) ;
+ am_Error_e peekSource(const std::string& name, am_sourceID_t& sourceID) ;
+ am_Error_e registerSource(const am_Source_s& sourceData, am_sourceID_t& sourceID) ;
+ am_Error_e deregisterSource(const am_sourceID_t sourceID) ;
+ am_Error_e registerCrossfader(const am_Crossfader_s& crossfaderData, am_crossfaderID_t& crossfaderID) ;
+ am_Error_e deregisterCrossfader(const am_crossfaderID_t crossfaderID) ;
+ void hookInterruptStatusChange(const am_sourceID_t sourceID, const am_InterruptState_e interruptState) ;
+ void hookDomainRegistrationComplete(const am_domainID_t domainID) ;
+ void hookSinkAvailablityStatusChange(const am_sinkID_t sinkID, const am_Availability_s& availability) ;
+ void hookSourceAvailablityStatusChange(const am_sourceID_t sourceID, const am_Availability_s& availability) ;
+ void hookDomainStateChange(const am_domainID_t domainID, const am_DomainState_e domainState) ;
+ void hookTimingInformationChanged(const am_connectionID_t connectionID, const am_timeSync_t delay) ;
+ am_Error_e sendChangedData(const std::vector<am_EarlyData_s>& earlyData) ;
+ am_Error_e getDBusConnectionWrapper(DBusWrapper* dbusConnectionWrapper) const ;
+ am_Error_e registerDbusNode(const std::string& nodeName) ;
+};
+
+#endif /* ROUTINGRECEIVER_H_ */
--- /dev/null
+/*
+ * RoutingSender.h
+ *
+ * Created on: Oct 26, 2011
+ * Author: christian
+ */
+
+#ifndef ROUTINGSENDER_H_
+#define ROUTINGSENDER_H_
+
+#include "pluginTemplate.h"
+#include "routing/RoutingSendInterface.h"
+#include <map>
+
+using namespace am;
+
+class RoutingSender {
+public:
+ RoutingSender();
+ virtual ~RoutingSender();
+ /**
+ * @author Christian
+ * this adds the domain to the lookup table of the Router. The data is used to have a quick lookup of the correct pluginInterface.
+ * This must be done whenever a domain is registered.
+ */
+ am_Error_e addDomainLookup(const am_Domain_s& domainData);
+ /**
+ * @author Christian
+ * this adds the Source to the lookup table of the Router. The data is used to have a quick lookup of the correct pluginInterface.
+ * This must be done whenever a Source is registered.
+ */
+ am_Error_e addSourceLookup(const am_Source_s& sourceData);
+ /**
+ * @author Christian
+ * this adds the Sink to the lookup table of the Router. The data is used to have a quick lookup of the correct pluginInterface.
+ * This must be done whenever a Sink is registered.
+ */
+ am_Error_e addSinkLookup(const am_Sink_s& sinkData);
+ /**
+ * @author Christian
+ * this adds the Crossfader to the lookup table of the Router. The data is used to have a quick lookup of the correct pluginInterface.
+ * This must be done whenever a Crossfader is registered.
+ */
+ am_Error_e addCrossfaderLookup(const am_Crossfader_s& crossfaderData);
+ /**
+ * @author Christian
+ * this removes the Domain to the lookup table of the Router. This must be done everytime a domain is deregistered.
+ */
+ am_Error_e removeDomainLookup(const am_domainID_t domainID);
+ /**
+ * @author Christian
+ * this removes the Source to the lookup table of the Router. This must be done everytime a source is deregistered.
+ */
+ am_Error_e removeSourceLookup(const am_sourceID_t sourceID);
+ /**
+ * @author Christian
+ * this removes the Sink to the lookup table of the Router. This must be done everytime a sink is deregistered.
+ */
+ am_Error_e removeSinkLookup(const am_sinkID_t sinkID);
+ /**
+ * @author Christian
+ * this removes the Crossfader to the lookup table of the Router. This must be done everytime a crossfader is deregistered.
+ */
+ am_Error_e removeCrossfaderLookup(const am_crossfaderID_t crossfaderID);
+ void startupRoutingInterface(RoutingReceiveInterface* routingreceiveinterface) ;
+ void routingInterfacesReady() ;
+ void routingInterfacesRundown() ;
+ am_Error_e asyncAbort(const am_Handle_s handle) ;
+ am_Error_e asyncConnect(const am_Handle_s handle, const am_connectionID_t connectionID, const am_sourceID_t sourceID, const am_sinkID_t sinkID, const am_ConnectionFormat_e connectionFormat) ;
+ am_Error_e asyncDisconnect(const am_Handle_s handle, const am_connectionID_t connectionID) ;
+ am_Error_e asyncSetSinkVolume(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume, const am_RampType_e ramp, const am_time_t time) ;
+ am_Error_e asyncSetSourceVolume(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume, const am_RampType_e ramp, const am_time_t time) ;
+ am_Error_e asyncSetSourceState(const am_Handle_s handle, const am_sourceID_t sourceID, const am_SourceState_e state) ;
+ am_Error_e asyncSetSinkSoundProperty(const am_Handle_s handle, const am_sinkID_t sinkID, const am_SoundProperty_s& soundProperty) ;
+ am_Error_e asyncSetSourceSoundProperty(const am_Handle_s handle, const am_sourceID_t sourceID, const am_SoundProperty_s& soundProperty) ;
+ am_Error_e asyncCrossFade(const am_Handle_s handle, const am_crossfaderID_t crossfaderID, const am_HotSink_e hotSink, const am_RampType_e rampType, const am_time_t time) ;
+ am_Error_e setDomainState(const am_domainID_t domainID, const am_DomainState_e domainState) ;
+ am_Error_e returnBusName(std::string& BusName) const ;
+private:
+
+ struct InterfaceNamePairs
+ {
+ RoutingSendInterface* routingInterface;
+ std::string busName;
+ };
+
+ typedef std::map<am_domainID_t, RoutingSendInterface*> DomainInterfaceMap;
+ typedef std::map<am_sinkID_t, RoutingSendInterface*> SinkInterfaceMap;
+ typedef std::map<am_sourceID_t, RoutingSendInterface*> SourceInterfaceMap;
+ typedef std::map<am_crossfaderID_t, RoutingSendInterface*> CrossfaderInterfaceMap;
+ typedef std::map<am_connectionID_t, RoutingSendInterface*> ConnectionInterfaceMap;
+
+ std::vector<InterfaceNamePairs> mListInterfaces;
+ DomainInterfaceMap mMapDomainInterface;
+ SinkInterfaceMap mMapSinkInterface;
+ SourceInterfaceMap mMapSourceInterface;
+ CrossfaderInterfaceMap mMapCrossfaderInterface;
+ ConnectionInterfaceMap mMapConnectionInterface;
+};
+
+#endif /* ROUTINGSENDER_H_ */
--- /dev/null
+/**
+* Copyright (C) 2011, BMW AG
+*
+* GeniviAudioMananger AudioManagerDaemon
+*
+* \file pluginTemplate.h
+*
+* \date 20-Oct-2011 3:42:04 PM
+* \author Christian Mueller (christian.ei.mueller@bmw.de)
+*
+* \section License
+* GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
+* Copyright (C) 2011, BMW AG Christian Mueller Christian.ei.mueller@bmw.de
+*
+* This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
+* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
+* You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
+* Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
+* Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
+* As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
+* Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
+*
+* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
+*/
+
+#ifndef PLUGINTEMPLATE_H_
+#define PLUGINTEMPLATE_H_
+
+#include <iostream>
+#include <stdio.h>
+#include <dirent.h>
+#include <dlfcn.h>
+#include <libgen.h>
+#include <unistd.h>
+#include <string>
+#include <dlt/dlt.h>
+
+DLT_IMPORT_CONTEXT(AudioManager);
+
+/**
+ * This template tries to load a library and cast ot to a class
+ * @param libname the full path to the library to be loaded
+ * @return returns the pointer to the class to be loaded
+ */
+template<class T>T* getCreateFunction(std::string libname) {
+
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Trying to load libray with name: "),DLT_STRING(libname.c_str()));
+
+ // cut off directories
+ char* fileWithPath = const_cast<char*>(libname.c_str());
+ std::string libFileName = basename(fileWithPath);
+
+ // cut off "lib" in front and cut off .so end"
+ std::string createFunctionName = libFileName.substr(3, libFileName.length() - 6) + "Factory";
+
+ // open library
+ void *libraryHandle;
+ dlerror(); // Clear any existing error
+ libraryHandle = dlopen(libname.c_str(), RTLD_NOW /*LAZY*/);
+ const char* dlopen_error = dlerror();
+ if (!libraryHandle || dlopen_error)
+ {
+ DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("dlopen failed"),DLT_STRING(dlopen_error));
+ return 0;
+ }
+
+ // get entry point from shared lib
+ dlerror(); // Clear any existing error
+
+ union
+ {
+ void* voidPointer;
+ T* typedPointer;
+ } functionPointer;
+
+ // Note: direct cast is not allowed by ISO C++. e.g.
+ // T* createFunction = reinterpret_cast<T*>(dlsym(libraryHandle, createFunctionName.c_str()));
+ // compiler warning: "forbids casting between pointer-to-function and pointer-to-object"
+
+ functionPointer.voidPointer = dlsym(libraryHandle, createFunctionName.c_str());
+ T* createFunction = functionPointer.typedPointer;
+
+ const char* dlsym_error = dlerror();
+ if (!createFunction || dlsym_error)
+ {
+ DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("Failed to load shared lib entry point"),DLT_STRING(dlsym_error));
+ }
+ else
+ {
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("loaded successfully plugin"),DLT_STRING(createFunctionName.c_str()));
+ }
+ return createFunction;
+}
+
+
+#endif /* PLUGINTEMPLATE_H_ */
+++ /dev/null
-/**
- * Copyright (C) 2011, BMW AG
- *
- * AudioManangerDeamon
- *
- * \file main.cpp
- *
- * \date 20.05.2011
- * \author Christian Müller (christian.ei.mueller@bmw.de)
- *
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
- *
- *
- */
-
-#include "audioManagerIncludes.h"
-
-#ifdef WITH_DBUS
-#include "dbusRoothandler.h"
-#endif
-/**
- * \todo: write some documentation about Plugin mechanism
- *
- */
-
-int main(int argc, char *argv[]) {
-
- //of course, we need some logging :-)
- DLT_REGISTER_APP("AudioManagerDeamon","AudioManagerDeamon");
- DLT_REGISTER_CONTEXT(AudioManager,"Main","Main Context");
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("The AudioManager is started "));
-
-
- //Here are our Main Classes
- AudioManagerCore core;
- DataBaseHandler dhandler;
- RoutingReceiver breceiver;
- CommandReceive creceiver;
- Bushandler bushandler;
- Router router;
- HookHandler hookhandler;
- CommandHandler chandler(&core);
- dbusRoothandler dbushandler;
-
- //meet and greet: register all the classes @ each other
- hookhandler.registerAudioManagerCore(&core);
- creceiver.registerAudiomanagerCore(&core);
- core.registerBushandler(&bushandler);
- core.registerDatabasehandler(&dhandler);
- core.registerRouter(&router);
- core.registerHookEngine(&hookhandler);
- core.registerReceiver(&breceiver);
- core.registerDbusRootHandler(&dbushandler);
-// core.registerCommandInterface(&commandIface);
- router.registerDatabasehandler(&dhandler);
- //commandIface.registerDatabasehandler(&dhandler);
-
- chandler.registerReceiver(&creceiver);
- breceiver.register_Databasehandler(&dhandler);
- bushandler.registerReceiver(&breceiver);
- bushandler.registerCore(&core);
-
- /**
- * \todo: we do not have to knock down the database whole the time - this can be done different
- */
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("create tables for database"));
- dhandler.create_tables();
-
- /**
- * \todo replace this static implementation with an XML file that is parsed
- */
- dhandler.insert_into_Source_Class_table("default", 10, false, false);
- dhandler.insert_into_Source_Class_table("nav", 10, true, true);
- dhandler.insert_into_Source_Class_table("ta", 10, true, false);
- dhandler.insert_into_Source_Class_table("rad", 10, false, false);
- dhandler.insert_into_Sink_Class_table("default");
-
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("load hook plugins"));
- hookhandler.loadHookPlugins();
-
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("load bus plugins"));
- bushandler.load_Bus_plugins();
- bushandler.StartupInterfaces();
- chandler.loadPlugins();
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Init phase is over, everything up and running"));
-
- DBusConnection* con=dbushandler.returnConnection();
-
- while (dbus_connection_read_write_dispatch(con, -1))
- {
- DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("Dispatching Dbus message..."));
- }
-}
-
+++ /dev/null
-/**
- * \mainpage
- * \image html "Bild1.png"
- * Copyright Copyright (C) 2011, BMW AG
- *
- * \date 22.06.2011
- * \author Christian Müller (christian.ei.mueller@bmw.de)
- *
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
- *
- * \section About About AudioManager
- * The AudioManager is a Deamon that manages all Audio Connections in a GENIVI headunit.
- * It is a managing instance that uses so called RoutingAdaptors to control AudioDomains that then do the "real" connections.
- *
- * \section Info More information
- * can be found at <https://collab.genivi.org/wiki/display/genivi/GENIVI+Home>
- *
- * \todo enhance Interface
- */
-
-#ifndef MAINPAGE_H_
-#define MAINPAGE_H_
-
-#endif /* MAINPAGE_H_ */
+++ /dev/null
-/*
- * pluginTemplate.h
- *
- * Created on: Jul 27, 2011
- * Author: christian
- */
-
-#ifndef PLUGINTEMPLATE_H_
-#define PLUGINTEMPLATE_H_
-
-#include <iostream>
-#include <stdio.h>
-#include <dirent.h>
-#include <dlfcn.h>
-#include <libgen.h>
-#include <unistd.h>
-#include <string>
-
-#include "audioManagerIncludes.h"
-
-template<class T>T* getCreateFunction(std::string libname) {
-
- // cut off directories
- char* fileWithPath = const_cast<char*>(libname.c_str());
- std::string libFileName = basename(fileWithPath);
-
- // cut off "lib" in front and cut off .so end"
- std::string createFunctionName = libFileName.substr(3, libFileName.length() - 6) + "Factory";
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Lib entry point name "),DLT_STRING(createFunctionName.c_str()));
-
- // open library
- void *libraryHandle;
- dlerror(); // Clear any existing error
- libraryHandle = dlopen(libname.c_str(), RTLD_NOW /*LAZY*/);
- const char* dlopen_error = dlerror();
- if (!libraryHandle || dlopen_error)
- {
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("dlopen failed"),DLT_STRING(dlopen_error));
- return 0;
- }
-
- // get entry point from shared lib
- dlerror(); // Clear any existing error
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("loading external function with name"),DLT_STRING(createFunctionName.c_str()));
-
- union
- {
- void* voidPointer;
- T* typedPointer;
- } functionPointer;
-
- // Note: direct cast is not allowed by ISO C++. e.g.
- // T* createFunction = reinterpret_cast<T*>(dlsym(libraryHandle, createFunctionName.c_str()));
- // compiler warning: "forbids casting between pointer-to-function and pointer-to-object"
-
- functionPointer.voidPointer = dlsym(libraryHandle, createFunctionName.c_str());
- T* createFunction = functionPointer.typedPointer;
-
- const char* dlsym_error = dlerror();
- if (!createFunction || dlsym_error)
- {
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Failed to load shared lib entry point"),DLT_STRING(dlsym_error));
- }
-
- return createFunction;
-}
-
-
-#endif /* PLUGINTEMPLATE_H_ */
+++ /dev/null
-/**\r
- * Copyright (C) 2011, BMW AG\r
- *\r
- * AudioManangerDeamon\r
- *\r
- * \file routinginterface.h\r
- *\r
- * \date 20.05.2011\r
- * \author Christian Müller (christian.ei.mueller@bmw.de)\r
- *\r
- * \section License\r
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)\r
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de\r
- *\r
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.\r
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.\r
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.\r
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.\r
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.\r
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.\r
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.\r
- *\r
- *\r
- */\r
-\r
-#ifndef ROUTINGINTERFACE_H_\r
-#define ROUTINGINTERFACE_H_\r
-\r
-#include "dataTypes.h"\r
-\r
-class RoutingSendInterface;\r
-class dbusRoothandler;\r
-\r
-/** Routing Receive sendInterface description.\r
- * This class implements everything from RoutingAdapter -> Audiomanager\r
- */\r
-class RoutingReceiveInterface {\r
-public:\r
-\r
- /**\r
- * What happens now?\r
- */\r
- virtual domain_t registerDomain(char* name, char* busname, char* node, bool earlymode) =0;\r
-\r
- /** Registers a Gateway at the Audiomanager\r
- * \return a unique ID of the gateway */\r
- virtual gateway_t registerGateway(char* name, char* sink, char* source, char* domainSource, char* domainSink, char* controlDomain) =0;\r
-\r
- /** registers a Sink at the Audiomanager\r
- * \return a unique ID of the sink.*/\r
- virtual sink_t registerSink(char* name, char* sinkclass, char* domain) =0;\r
-\r
- /** registers a Source at the Audiomanager *\r
- * \return unique ID of the source */\r
- virtual source_t registerSource(char* name, char* audioclass, char* domain) =0;\r
-\r
- /** just get the ID of a domain without registering it. This is used to register Gateways.\r
- * During the time of registration it is unclear if the other Domain already exists. This function will either\r
- * return the already existing ID or reserve an ID with is then used later when the domain is registered. *\r
- * \return the unique Id of the domain. */\r
- virtual domain_t peekDomain(char* name) =0;\r
-\r
- /**Acknowledgement of a connect. This function shall be called when a connect event is finished\r
- *\r
- * @param handle the the handle for the connection\r
- * @param error reads GEN_OK on success, other errors in case of problems\r
- */\r
- virtual void ackConnect(genHandle_t handle, genError_t error)=0;\r
- /**\r
- * Just check me out I am the comment\r
- */\r
- virtual void ackDisconnect(genHandle_t handle, genError_t error)=0;\r
-\r
-};\r
-\r
-/** Routing Send sendInterface\r
- * This class implements everything from Audiomanager -> RoutingAdapter\r
- */\r
-class RoutingSendInterface {\r
-public:\r
-\r
- /** starts up the interface. In the implementations, here is the best place for\r
- * init routines.\r
- */\r
- virtual void startup_interface(RoutingReceiveInterface * action, dbusRoothandler* dbushandler\r
- )=0;\r
-\r
- /** connect a source to a sink\r
- * \return the unique ID of the connection.\r
- */\r
- virtual genError_t connect(source_t source, sink_t sink, connection_t con_ID) =0;\r
-\r
- /** disconnect a connection\r
- * \return true on success\r
- */\r
- virtual genError_t disconnect(connection_t connection_ID) =0;\r
-\r
- /** this method is used to retrieve the busname during startup of the plugin.\r
- * Needs to be implemented\r
- */\r
- virtual void return_BusName(char* BusName) =0;\r
-\r
- /** this method is used to set the volume of a sink\r
- * \return returns the new value or -1 on error or impossible.\r
- * It is not mandatory that a Plugin implements this feature.\r
- */\r
- virtual genError_t setSinkVolume(volume_t volume, sink_t sinkID) =0;\r
-\r
- /** this method is used to set the volume of a source\r
- * \return returns the new value or -1 on error or impossible.\r
- * It is not mandatory that a Plugin implements this feature.\r
- */\r
- virtual genError_t setSourceVolume(volume_t volume, source_t sourceID) =0;\r
-\r
- /** this method is used to mute a source\r
- *\r
- * \return true if succeeded\r
- * \todo add error codes to answers\r
- */\r
- virtual genError_t muteSource(source_t sourceID) =0;\r
-\r
- /** this method is used to mute a sink\r
- *\r
- * \return true if succeeded\r
- * \todo add error codes to answers\r
- */\r
- virtual genError_t muteSink(sink_t sinkID) =0;\r
-\r
- /** this method is used to unmute a source\r
- *\r
- * \return true if succeeded\r
- * \todo add error codes to answers\r
- */\r
- virtual genError_t unmuteSource(source_t sourceID) =0;\r
-\r
- /** this method is used to unmute a sink\r
- *\r
- * \return true if succeeded\r
- * \todo add error codes to answers\r
- */\r
- virtual genError_t unmuteSink(sink_t sinkID) =0;\r
-\r
- /**\r
- * connect a source to a sink \return the unique ID of the connection.\r
- */\r
-// virtual genError_t asyncConnect(source_t source, sink_t sink, connection_t con_ID) =0;\r
- /**\r
- * disconnect a connection \return true on success\r
- */\r
-// virtual genError_t asyncDisconnect(connection_t connection_ID) =0;\r
- /** signal that tells the plugin that the system is ready. Is used to trigger a registration of Domains, etc..*/\r
- virtual void system_ready()=0;\r
-};\r
-\r
-#endif /* ROUTINGINTERFACE_H_ */\r
--- /dev/null
+/*
+ * CommandReceiver.cpp
+ *
+ * Created on: Oct 24, 2011
+ * Author: christian
+ */
+
+#include "CommandReceiver.h"
+
+CommandReceiver::CommandReceiver(DatabaseHandler* iDatabaseHandler, DBusWrapper* iDBusWrapper)
+: mDatabaseHandler(iDatabaseHandler), mDBusWrapper(iDBusWrapper)
+{
+}
+
+CommandReceiver::~CommandReceiver()
+{
+}
+
+am_Error_e CommandReceiver::connect(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t & mainConnectionID)
+{
+ mainConnectionID=4;
+ return E_OK;
+}
+
+
+
+am_Error_e CommandReceiver::disconnect(const am_mainConnectionID_t mainConnectionID)
+{
+}
+
+
+
+am_Error_e CommandReceiver::setVolume(const am_sinkID_t sinkID, const am_mainVolume_t volume)
+{
+}
+
+
+
+am_Error_e CommandReceiver::volumeStep(const am_sinkID_t sinkID, const int16_t volumeStep)
+{
+}
+
+
+
+am_Error_e CommandReceiver::setSinkMuteState(const am_sinkID_t sinkID, const am_MuteState_e muteState)
+{
+}
+
+
+
+am_Error_e CommandReceiver::setMainSinkSoundProperty(const am_MainSoundProperty_s & soundProperty, const am_sinkID_t sinkID)
+{
+}
+
+
+
+am_Error_e CommandReceiver::setMainSourceSoundProperty(const am_MainSoundProperty_s & soundProperty, const am_sourceID_t sourceID)
+{
+}
+
+
+
+am_Error_e CommandReceiver::setSystemProperty(const am_SystemProperty_s & property)
+{
+}
+
+
+
+am_Error_e CommandReceiver::getListMainConnections(std::vector<am_MainConnectionType_s> & listConnections) const
+{
+ mDatabaseHandler->getListVisibleMainConnections(listConnections);
+
+}
+
+
+
+am_Error_e CommandReceiver::getListMainSinks(std::vector<am_SinkType_s>& listMainSinks) const
+{
+}
+
+
+
+am_Error_e CommandReceiver::getListMainSources(std::vector<am_SourceType_s>& listMainSources) const
+{
+}
+
+
+
+am_Error_e CommandReceiver::getListMainSinkSoundProperties(const am_sinkID_t sinkID, std::vector<am_MainSoundProperty_s> & listSoundProperties) const
+{
+}
+
+
+
+am_Error_e CommandReceiver::getListMainSourceSoundProperties(const am_sourceID_t sourceID, std::vector<am_MainSoundProperty_s> & listSourceProperties) const
+{
+}
+
+
+
+am_Error_e CommandReceiver::getListSourceClasses(std::vector<am_SourceClass_s> & listSourceClasses) const
+{
+}
+
+
+
+am_Error_e CommandReceiver::getListSinkClasses(std::vector<am_SinkClass_s> & listSinkClasses) const
+{
+}
+
+
+
+am_Error_e CommandReceiver::getListSystemProperties(std::vector<am_SystemProperty_s> & listSystemProperties) const
+{
+}
+
+
+
+am_Error_e CommandReceiver::getTimingInformation(const am_mainConnectionID_t mainConnectionID, am_timeSync_t & delay) const
+{
+}
+
+
+
+am_Error_e CommandReceiver::getDBusConnectionWrapper(DBusWrapper*& dbusConnectionWrapper) const
+{
+ dbusConnectionWrapper=mDBusWrapper;
+ return E_OK;
+}
+
+
+
+
+
+
+
--- /dev/null
+/*
+ * CommandSender.cpp
+ *
+ * Created on: Oct 26, 2011
+ * Author: christian
+ */
+
+#include "CommandSender.h"
+#include "command/CommandSendInterface.h"
+#include "pluginTemplate.h"
+using namespace am;
+
+#define CALL_ALL_INTERFACES(...) \
+ std::vector<CommandSendInterface*>::iterator iter = mListInterfaces.begin(); \
+ std::vector<CommandSendInterface*>::iterator iterEnd = mListInterfaces.end(); \
+ for (; iter<iterEnd;++iter) \
+ { \
+ (*iter)->__VA_ARGS__; \
+ }
+
+
+const char* commandPluginDirectories[] = { "/home/christian/workspace/gitserver/build/plugins/command"};
+uint16_t commandPluginDirectoriesCount = sizeof(commandPluginDirectories) / sizeof(commandPluginDirectories[0]);
+
+CommandSender::CommandSender()
+{
+ std::vector<std::string> sharedLibraryNameList;
+
+ // search communicator plugins in configured directories
+ for (uint16_t dirIndex = 0; dirIndex < commandPluginDirectoriesCount; dirIndex++)
+ {
+ const char* directoryName = commandPluginDirectories[dirIndex];
+ //DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Searching for HookPlugins in"),DLT_STRING(directoryName));
+ DIR *directory = opendir(directoryName);
+
+ if (!directory)
+ {
+ //DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Error opening directory "),DLT_STRING(dirName.c_str()));
+ }
+
+ // iterate content of directory
+ struct dirent *itemInDirectory = 0;
+ while ((itemInDirectory = readdir(directory)))
+ {
+ unsigned char entryType = itemInDirectory->d_type;
+ std::string entryName = itemInDirectory->d_name;
+
+ bool regularFile = (entryType == DT_REG);
+ bool sharedLibExtension = ("so" == entryName.substr(entryName.find_last_of(".") + 1));
+
+ if (regularFile && sharedLibExtension)
+ {
+ // DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("PluginSearch adding file "),DLT_STRING(entryName.c_str()));
+ std::string name(directoryName);
+ sharedLibraryNameList.push_back(name + "/" + entryName);
+ }
+ else
+ {
+ //DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("PluginSearch ignoring file "),DLT_STRING(entryName.c_str()));
+ }
+ }
+
+ closedir(directory);
+ }
+
+ // iterate all communicator plugins and start them
+ std::vector<std::string>::iterator iter = sharedLibraryNameList.begin();
+ std::vector<std::string>::iterator iterEnd = sharedLibraryNameList.end();
+
+ for (; iter < iterEnd; ++iter)
+ {
+ //DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Loading Hook plugin"),DLT_STRING(iter->c_str()));
+ CommandSendInterface* (*createFunc)();
+ createFunc = getCreateFunction<CommandSendInterface*()>(*iter);
+
+ if (!createFunc)
+ {
+ // DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Entry point of Communicator not found"));
+ continue;
+ }
+
+ CommandSendInterface* commander = createFunc();
+
+ if (!commander)
+ {
+ //DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("HookPlugin initialization failed. Entry Function not callable"));
+ continue;
+ }
+
+ mListInterfaces.push_back(commander);
+ }
+}
+
+CommandSender::~CommandSender()
+{
+}
+
+
+am_Error_e CommandSender::stopInterface()
+{
+ am_Error_e returnError=E_OK;
+
+ std::vector<CommandSendInterface*>::iterator iter = mListInterfaces.begin();
+ std::vector<CommandSendInterface*>::iterator iterEnd = mListInterfaces.end();
+ for (; iter<iterEnd;++iter)
+ {
+ am_Error_e error=(*iter)->stopInterface();
+ if (error!= E_OK)
+ {
+ returnError=error;
+ }
+ }
+ return returnError;
+}
+
+
+am_Error_e CommandSender::startupInterface(CommandReceiveInterface *commandreceiveinterface)
+{
+ am_Error_e returnError=E_OK;
+
+ std::vector<CommandSendInterface*>::iterator iter = mListInterfaces.begin();
+ std::vector<CommandSendInterface*>::iterator iterEnd = mListInterfaces.end();
+ for (; iter<iterEnd;++iter)
+ {
+ am_Error_e error=(*iter)->startupInterface(commandreceiveinterface);
+ if (error!= E_OK)
+ {
+ returnError=error;
+ }
+ }
+ return returnError;
+}
+
+
+void CommandSender::cbCommunicationReady()
+{
+ CALL_ALL_INTERFACES(cbCommunicationReady())
+}
+
+void CommandSender::cbCommunicationRundown()
+{
+ CALL_ALL_INTERFACES(cbCommunicationRundown())
+}
+
+void CommandSender::cbNumberOfMainConnectionsChanged()
+{
+ CALL_ALL_INTERFACES(cbNumberOfMainConnectionsChanged())
+}
+
+void CommandSender::cbNumberOfSinksChanged()
+{
+ CALL_ALL_INTERFACES(cbNumberOfSinksChanged())
+}
+
+void CommandSender::cbNumberOfSourcesChanged()
+{
+ CALL_ALL_INTERFACES(cbNumberOfSourcesChanged())
+}
+
+void CommandSender::cbNumberOfSinkClassesChanged()
+{
+ CALL_ALL_INTERFACES(cbNumberOfSinkClassesChanged())
+}
+
+void CommandSender::cbNumberOfSourceClassesChanged()
+{
+ CALL_ALL_INTERFACES(cbNumberOfSourceClassesChanged())
+}
+
+
+void CommandSender::cbMainConnectionStateChanged(const am_mainConnectionID_t connectionID, const am_ConnectionState_e connectionState)
+{
+ CALL_ALL_INTERFACES(cbMainConnectionStateChanged(connectionID,connectionState))
+}
+
+
+
+void CommandSender::cbMainSinkSoundPropertyChanged(const am_sinkID_t sinkID, const am_MainSoundProperty_s SoundProperty)
+{
+ CALL_ALL_INTERFACES(cbMainSinkSoundPropertyChanged(sinkID,SoundProperty))
+}
+
+
+
+void CommandSender::cbMainSourceSoundPropertyChanged(const am_sourceID_t sourceID, const am_MainSoundProperty_s & SoundProperty)
+{
+ CALL_ALL_INTERFACES(cbMainSourceSoundPropertyChanged(sourceID,SoundProperty))
+}
+
+
+
+void CommandSender::cbSinkAvailabilityChanged(const am_sinkID_t sinkID, const am_Availability_s & availability)
+{
+ CALL_ALL_INTERFACES(cbSinkAvailabilityChanged(sinkID,availability))
+}
+
+
+
+void CommandSender::cbSourceAvailabilityChanged(const am_sourceID_t sourceID, const am_Availability_s & availability)
+{
+ CALL_ALL_INTERFACES(cbSourceAvailabilityChanged(sourceID,availability))
+}
+
+
+
+void CommandSender::cbVolumeChanged(const am_sinkID_t sinkID, const am_mainVolume_t volume)
+{
+ CALL_ALL_INTERFACES(cbVolumeChanged(sinkID,volume))
+}
+
+
+
+void CommandSender::cbSinkMuteStateChanged(const am_sinkID_t sinkID, const am_MuteState_e muteState)
+{
+ CALL_ALL_INTERFACES(cbSinkMuteStateChanged(sinkID,muteState))
+}
+
+
+
+void CommandSender::cbSystemPropertyChanged(const am_SystemProperty_s & SystemProperty)
+{
+ CALL_ALL_INTERFACES(cbSystemPropertyChanged(SystemProperty))
+}
+
+
+
+void CommandSender::cbTimingInformationChanged(const am_mainConnectionID_t mainConnection, const am_timeSync_t time)
+{
+ CALL_ALL_INTERFACES(cbTimingInformationChanged(mainConnection,time))
+}
+
+
+
--- /dev/null
+/*
+ * ControlLoader.cpp
+ *
+ * Created on: Oct 25, 2011
+ * Author: christian
+ */
+
+#include "ControlLoader.h"
+#include "pluginTemplate.h"
+#include <string>
+
+ControlLoader::ControlLoader()
+{
+ ControlSendInterface* (*createFunc)();
+ std::string libPath="/home/christian/workspace/gitserver/build/plugins/control/libPluginControlInterface.so";
+ createFunc = getCreateFunction<ControlSendInterface*()>(libPath);
+
+ if (!createFunc) {
+ //DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Entry point of Communicator not found"));
+ }
+
+ //mControler = createFunc();
+
+ if (!mControler) {
+ //DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("RoutingPlugin initialization failed. Entry Function not callable"));
+ }
+
+}
+
+
+
+ControlLoader::~ControlLoader()
+{
+}
+
+
+
+ControlSendInterface *ControlLoader::returnControl()
+{
+ return mControler;
+}
+
--- /dev/null
+/*
+ * ContronlReceiver.cpp
+ *
+ * Created on: Oct 24, 2011
+ * Author: christian
+ */
+
+#include "ControlReceiver.h"
+
+ControlReceiver::ControlReceiver(DatabaseHandler* iDatabaseHandler) : mDatabaseHandler(iDatabaseHandler)
+{
+}
+
+ControlReceiver::~ControlReceiver()
+{
+}
+
+am_Error_e ControlReceiver::getRoute(const bool onlyfree, const am_sourceID_t sourceID, const am_sinkID_t sinkID, std::vector<am_Route_s> & returnList)
+{
+}
+
+
+
+am_Error_e ControlReceiver::connect(am_Handle_s & handle, am_connectionID_t & connectionID, const am_ConnectionFormat_e format, const am_sourceID_t sourceID, const am_sinkID_t sinkID)
+{
+}
+
+
+
+am_Error_e ControlReceiver::disconnect(am_Handle_s & handle, const am_connectionID_t connectionID)
+{
+}
+
+
+
+am_Error_e ControlReceiver::crossfade(am_Handle_s & handle, const am_HotSink_e hotSource, const am_crossfaderID_t crossfaderID, const am_RampType_e rampType, const am_time_t rampTime)
+{
+}
+
+
+
+am_Error_e ControlReceiver::setSourceState(am_Handle_s & handle, const am_sourceID_t sourceID, const am_SourceState_e state)
+{
+}
+
+
+
+am_Error_e ControlReceiver::setSinkVolume(am_Handle_s & handle, const am_sinkID_t sinkID, const am_volume_t volume, const am_RampType_e ramp, const am_time_t time)
+{
+}
+
+
+
+am_Error_e ControlReceiver::setSourceVolume(am_Handle_s & handle, const am_sourceID_t sourceID, const am_volume_t volume, const am_RampType_e rampType, const am_time_t time)
+{
+}
+
+
+
+am_Error_e ControlReceiver::setSinkSoundProperty(am_Handle_s & handle, const am_sinkID_t sinkID, const am_SoundProperty_s & soundProperty)
+{
+}
+
+
+
+am_Error_e ControlReceiver::setSourceSoundProperty(am_Handle_s & handle, const am_sourceID_t sourceID, const am_SoundProperty_s & soundProperty)
+{
+}
+
+
+
+am_Error_e ControlReceiver::setDomainState(const am_domainID_t domainID, const am_DomainState_e domainState)
+{
+}
+
+
+
+am_Error_e ControlReceiver::abortAction(const am_Handle_s handle)
+{
+}
+
+
+
+am_Error_e ControlReceiver::enterDomainDB(const am_Domain_s & domainData, am_domainID_t & domainID)
+{
+ return mDatabaseHandler->enterDomainDB(domainData,domainID);
+}
+
+
+
+am_Error_e ControlReceiver::enterMainConnectionDB(const am_MainConnection_s & mainConnectionData, am_mainConnectionID_t & connectionID)
+{
+ return mDatabaseHandler->enterMainConnectionDB(mainConnectionData,connectionID);
+}
+
+
+
+am_Error_e ControlReceiver::enterSinkDB(const am_Sink_s & sinkData, am_sinkID_t & sinkID)
+{
+ return mDatabaseHandler->enterSinkDB(sinkData,sinkID);
+}
+
+
+
+am_Error_e ControlReceiver::enterCrossfaderDB(const am_Crossfader_s & crossfaderData, am_crossfaderID_t & crossfaderID)
+{
+ return mDatabaseHandler->enterCrossfaderDB(crossfaderData,crossfaderID);
+}
+
+
+
+am_Error_e ControlReceiver::enterGatewayDB(const am_Gateway_s & gatewayData, am_gatewayID_t & gatewayID)
+{
+ return mDatabaseHandler->enterGatewayDB(gatewayData,gatewayID);
+}
+
+
+
+am_Error_e ControlReceiver::enterSourceDB(const am_Source_s & sourceData, am_sourceID_t & sourceID)
+{
+ return mDatabaseHandler->enterSourceDB(sourceData,sourceID);
+}
+
+am_Error_e ControlReceiver::enterSinkClassDB(const am_SinkClass_s & sinkClass, am_sinkClass_t & sinkClassID)
+{
+ return mDatabaseHandler->enterSinkClassDB(sinkClass,sinkClassID);
+}
+
+am_Error_e ControlReceiver::enterSourceClassDB(am_sourceClass_t & sourceClassID, const am_SourceClass_s & sourceClass)
+{
+ return mDatabaseHandler->enterSourceClassDB(sourceClassID,sourceClass);
+}
+
+
+am_Error_e ControlReceiver::enterSystemPropertiesListDB(const std::vector<am_SystemProperty_s> & listSystemProperties)
+{
+ return mDatabaseHandler->enterSystemProperties(listSystemProperties);
+}
+
+
+am_Error_e ControlReceiver::changeMainConnectionRouteDB(const am_mainConnectionID_t mainconnectionID, const am_Route_s & route)
+{
+ return mDatabaseHandler->changeMainConnectionRouteDB(mainconnectionID,route);
+}
+
+
+
+am_Error_e ControlReceiver::changeMainConnectionStateDB(const am_mainConnectionID_t mainconnectionID, const am_ConnectionState_e connectionState)
+{
+ return mDatabaseHandler->changeMainConnectionStateDB(mainconnectionID,connectionState);
+}
+
+
+
+am_Error_e ControlReceiver::changeSinkMainVolumeDB(const am_mainVolume_t mainVolume, const am_sinkID_t sinkID)
+{
+ return mDatabaseHandler->changeSinkMainVolumeDB(mainVolume,sinkID);
+}
+
+
+
+am_Error_e ControlReceiver::changeSinkAvailabilityDB(const am_Availability_s & availability, const am_sinkID_t sinkID)
+{
+ return mDatabaseHandler->changeSinkAvailabilityDB(availability,sinkID);
+}
+
+
+
+am_Error_e ControlReceiver::changDomainStateDB(const am_DomainState_e domainState, const am_domainID_t domainID)
+{
+ return mDatabaseHandler->changDomainStateDB(domainState,domainID);
+}
+
+
+
+am_Error_e ControlReceiver::changeSinkMuteStateDB(const am_MuteState_e muteState, const am_sinkID_t sinkID)
+{
+ return mDatabaseHandler->changeSinkMuteStateDB(muteState,sinkID);
+}
+
+
+
+am_Error_e ControlReceiver::changeMainSinkSoundPropertyDB(const am_MainSoundProperty_s & soundProperty, const am_sinkID_t sinkID)
+{
+ return mDatabaseHandler->changeMainSinkSoundPropertyDB(soundProperty,sinkID);
+}
+
+
+
+am_Error_e ControlReceiver::changeMainSourceSoundPropertyDB(const am_MainSoundProperty_s & soundProperty, const am_sourceID_t sourceID)
+{
+ return mDatabaseHandler->changeMainSinkSoundPropertyDB(soundProperty,sourceID);
+}
+
+
+
+am_Error_e ControlReceiver::changeSourceAvailabilityDB(const am_Availability_s & availability, const am_sourceID_t sourceID)
+{
+ return mDatabaseHandler->changeSourceAvailabilityDB(availability,sourceID);
+}
+
+
+
+am_Error_e ControlReceiver::changeSystemPropertyDB(const am_SystemProperty_s & property)
+{
+ return mDatabaseHandler->changeSystemPropertyDB(property);
+}
+
+
+
+am_Error_e ControlReceiver::removeMainConnectionDB(const am_mainConnectionID_t mainConnectionID)
+{
+ return mDatabaseHandler->removeMainConnectionDB(mainConnectionID);
+}
+
+
+
+am_Error_e ControlReceiver::removeSinkDB(const am_sinkID_t sinkID)
+{
+ return mDatabaseHandler->removeSinkDB(sinkID);
+}
+
+
+
+am_Error_e ControlReceiver::removeSourceDB(const am_sourceID_t sourceID)
+{
+ return mDatabaseHandler->removeSourceDB(sourceID);
+}
+
+
+
+am_Error_e ControlReceiver::removeGatewayDB(const am_gatewayID_t gatewayID)
+{
+ return mDatabaseHandler->removeGatewayDB(gatewayID);
+}
+
+
+
+am_Error_e ControlReceiver::removeCrossfaderDB(const am_crossfaderID_t crossfaderID)
+{
+ return mDatabaseHandler->removeCrossfaderDB(crossfaderID);
+}
+
+
+
+am_Error_e ControlReceiver::removeDomainDB(const am_domainID_t domainID)
+{
+ return mDatabaseHandler->removeDomainDB(domainID);
+}
+
+
+
+am_Error_e ControlReceiver::getSourceClassInfoDB(const am_sourceID_t sourceID, am_SourceClass_s & classInfo) const
+{
+ return mDatabaseHandler->getSourceClassInfoDB(sourceID,classInfo);
+}
+
+
+am_Error_e ControlReceiver::getSinkClassInfoDB(const am_sinkID_t sinkID, am_SinkClass_s & sinkClass) const
+{
+ return mDatabaseHandler->getSinkClassInfoDB(sinkID,sinkClass);
+}
+
+
+
+am_Error_e ControlReceiver::getGatewayInfoDB(const am_gatewayID_t gatewayID, am_Gateway_s & gatewayData) const
+{
+ return mDatabaseHandler->getGatewayInfoDB(gatewayID,gatewayData);
+}
+
+
+
+am_Error_e ControlReceiver::getCrossfaderInfoDB(const am_crossfaderID_t crossfaderID, am_Crossfader_s & crossfaderData) const
+{
+ return mDatabaseHandler->getCrossfaderInfoDB(crossfaderID,crossfaderData);
+}
+
+
+
+am_Error_e ControlReceiver::getListSinksOfDomain(const am_domainID_t domainID, std::vector<am_sinkID_t> & listSinkID) const
+{
+ return mDatabaseHandler->getListSinksOfDomain(domainID,listSinkID);
+}
+
+
+
+am_Error_e ControlReceiver::getListSourcesOfDomain(const am_domainID_t domainID, std::vector<am_sourceID_t> & listSourceID) const
+{
+ return mDatabaseHandler->getListSourcesOfDomain(domainID,listSourceID);
+}
+
+
+
+am_Error_e ControlReceiver::getListCrossfadersOfDomain(const am_domainID_t domainID, std::vector<am_crossfaderID_t> & listGatewaysID) const
+{
+ return mDatabaseHandler->getListCrossfadersOfDomain(domainID,listGatewaysID);
+}
+
+
+
+am_Error_e ControlReceiver::getListGatewaysOfDomain(const am_domainID_t domainID, std::vector<am_gatewayID_t> & listGatewaysID) const
+{
+ return mDatabaseHandler->getListGatewaysOfDomain(domainID,listGatewaysID);
+}
+
+
+
+am_Error_e ControlReceiver::getListMainConnections(std::vector<am_MainConnection_s> & listMainConnections) const
+{
+ return mDatabaseHandler->getListMainConnections(listMainConnections);
+}
+
+
+
+am_Error_e ControlReceiver::getListDomains(std::vector<am_Domain_s> & listDomains) const
+{
+ return mDatabaseHandler->getListDomains(listDomains);
+}
+
+
+
+am_Error_e ControlReceiver::getListConnections(std::vector<am_Connection_s> & listConnections) const
+{
+ return mDatabaseHandler->getListConnections(listConnections);
+}
+
+
+
+am_Error_e ControlReceiver::getListSinks(std::vector<am_Sink_s> & listSinks) const
+{
+ return mDatabaseHandler->getListSinks(listSinks);
+}
+
+
+
+am_Error_e ControlReceiver::getListSources(std::vector<am_Source_s> & listSources) const
+{
+ return mDatabaseHandler->getListSources(listSources);
+}
+
+
+
+am_Error_e ControlReceiver::getListSourceClasses(std::vector<am_SourceClass_s> & listSourceClasses) const
+{
+ return mDatabaseHandler->getListSourceClasses(listSourceClasses);
+}
+
+
+
+am_Error_e ControlReceiver::getListHandles(std::vector<am_Handle_s> & listHandles) const
+{
+ //todo: implement getListHandles
+}
+
+
+
+am_Error_e ControlReceiver::getListCrossfaders(std::vector<am_Crossfader_s> & listCrossfaders) const
+{
+ return mDatabaseHandler->getListCrossfaders(listCrossfaders);
+}
+
+
+
+am_Error_e ControlReceiver::getListGateways(std::vector<am_Gateway_s> & listGateways) const
+{
+ return mDatabaseHandler->getListGateways(listGateways);
+}
+
+
+
+am_Error_e ControlReceiver::getListSinkClasses(std::vector<am_SinkClass_s> & listSinkClasses) const
+{
+ return mDatabaseHandler->getListSinkClasses(listSinkClasses);
+}
+
+
+am_Error_e ControlReceiver::getListSystemProperties(std::vector<am_SystemProperty_s> & listSystemProperties) const
+{
+ return mDatabaseHandler->getListSystemProperties(listSystemProperties);
+}
+
+
+void ControlReceiver::setRoutingReady()
+{
+}
+
+
+am_Error_e ControlReceiver::changeSinkClassInfoDB(const am_SinkClass_s & classInfo)
+{
+}
+
+am_Error_e ControlReceiver::changeSourceClassInfoDB(const am_SourceClass_s & classInfo)
+{
+}
+
+am_Error_e ControlReceiver::removeSinkClassDB(const am_sinkClass_t sinkClassID)
+{
+}
+
+am_Error_e ControlReceiver::removeSourceClassDB(const am_sourceClass_t sourceClassID)
+{
+}
+
+void ControlReceiver::setCommandReady()
+{
+}
+
+
+
--- /dev/null
+/**
+* Copyright (C) 2011, BMW AG
+*
+* GeniviAudioMananger AudioManagerDaemon
+*
+* \file DBusWrapper.cpp
+*
+* \date 20-Oct-2011 3:42:04 PM
+* \author Christian Mueller (christian.ei.mueller@bmw.de)
+*
+* \section License
+* GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
+* Copyright (C) 2011, BMW AG Christian Mueller Christian.ei.mueller@bmw.de
+*
+* This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
+* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
+* You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
+* Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
+* Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
+* As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
+* Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
+*
+* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
+*/
+
+#include "DBusWrapper.h"
+#include <dlt/dlt.h>
+#include <fstream>
+#include <sstream>
+#include <string>
+
+DLT_IMPORT_CONTEXT(AudioManager);
+
+
+#define ROOT_INTROSPECT_XML \
+DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE \
+"<node>" \
+"<interface name='org.freedesktop.DBus.Introspectable'>" \
+"<method name='Introspect'>" \
+" <arg name='xml_data' type='s' direction='out'/>" \
+"</method>" \
+"</interface>" \
+
+DBusWrapper* DBusWrapper::mReference = NULL;
+
+
+DBusWrapper::DBusWrapper()
+ : mDbusConnection(0),
+ mDBusError(),
+ mNodesList()
+{
+ dbus_error_init(&mDBusError);
+
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("DBusWrapper::DBusWrapper Opening DBus connection"));
+
+ mDbusConnection=dbus_bus_get(DBUS_BUS_SESSION, &mDBusError);
+ if (dbus_error_is_set(&mDBusError))
+ {
+ DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::DBusWrapper Error while getting the DBus"));
+ dbus_error_free(&mDBusError);
+ }
+ if (NULL == mDbusConnection)
+ {
+ DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::DBusWrapper DBus Connection is null"));
+ }
+
+ mObjectPathVTable.message_function=DBusWrapper::cbRootIntrospection;
+ dbus_connection_register_object_path(mDbusConnection,DBUS_SERVICE_OBJECT_PATH , &mObjectPathVTable, this);
+ int ret = dbus_bus_request_name(mDbusConnection,DBUS_SERVICE_PREFIX,DBUS_NAME_FLAG_DO_NOT_QUEUE, &mDBusError);
+ if (dbus_error_is_set(&mDBusError))
+ {
+ DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::DBusWrapper Name Error"),DLT_STRING(mDBusError.message));
+ dbus_error_free(&mDBusError);
+ }
+ if (DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER != ret)
+ {
+ DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::DBusWrapper Wrapper is not the Primary Owner"), DLT_INT(ret));
+ }
+}
+
+DBusWrapper::~DBusWrapper()
+{
+ //close the connection again
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("DBusWrapper::~DBusWrapper Closing DBus connection"));
+ dbus_connection_close(mDbusConnection);
+}
+
+void DBusWrapper::registerCallback(const DBusObjectPathVTable* vtable, const std::string& path, void* userdata)
+{
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("DBusWrapper::~registerCallback register callback:"),DLT_STRING(path.c_str()));
+
+ std::string completePath=std::string(DBUS_SERVICE_OBJECT_PATH)+"/"+path;
+ dbus_error_init(&mDBusError);
+ mDbusConnection=dbus_bus_get(DBUS_BUS_SESSION, &mDBusError);
+ dbus_connection_register_object_path(mDbusConnection,completePath.c_str(), vtable, userdata);
+ if (dbus_error_is_set(&mDBusError))
+ {
+ DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::registerCallack error: "),DLT_STRING(mDBusError.message));
+ dbus_error_free(&mDBusError);
+ }
+ mNodesList.push_back(path);
+}
+
+DBusHandlerResult DBusWrapper::cbRootIntrospection(DBusConnection *conn, DBusMessage *msg, void *reference)
+{
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("DBusWrapper::~cbRootIntrospection called:"));
+
+ mReference=(DBusWrapper*)reference;
+ std::list<std::string>nodesList=mReference->mNodesList;
+ DBusMessage * reply;
+ DBusMessageIter args;
+ dbus_uint32_t serial = 0;
+ if (dbus_message_is_method_call(msg, DBUS_INTERFACE_INTROSPECTABLE, "Introspect"))
+ {
+ std::list<std::string>::iterator nodeIter=nodesList.begin();
+ const char *xml=ROOT_INTROSPECT_XML;
+ std::stringstream introspect;
+ introspect << std::string(xml);
+ for(;nodeIter!=nodesList.end();++nodeIter)
+ {
+ introspect<<"<node name='"<<nodeIter->c_str()<<"'/>";
+ }
+ introspect<<"</node>";
+
+ reply = dbus_message_new_method_return(msg);
+ std::string s = introspect.str();
+ const char* string=s.c_str();
+
+ // add the arguments to the reply
+ dbus_message_iter_init_append(reply, &args);
+ if (!dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING, &string))
+ {
+ DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::~cbRootIntrospection DBUS Out Of Memory!"));
+ }
+
+ // send the reply && flush the connection
+ if (!dbus_connection_send(conn, reply, &serial))
+ {
+ DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::~cbRootIntrospection DBUS Out Of Memory!"));
+ }
+ dbus_connection_flush(conn);
+ // free the reply
+ dbus_message_unref(reply);
+
+ return DBUS_HANDLER_RESULT_HANDLED;
+ }
+ else
+ {
+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+ }
+}
+
+void DBusWrapper::dbusMainLoop()
+{
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("DBusWrapper::~dbusMainLoop Entering MainLoop"));
+
+ while (dbus_connection_read_write_dispatch(mDbusConnection, -1))
+ {
+
+ }
+}
+
+void DBusWrapper::getDBusConnection(DBusConnection *& connection) const
+{
+ connection=mDbusConnection;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+/*
+ * DatabaseHandler.cpp
+ *
+ * Created on: Oct 24, 2011
+ * Author: christian
+ */
+
+#include "DatabaseHandler.h"
+#include <dlt/dlt.h>
+#include <assert.h>
+#include <stdint.h>
+#include <fstream>
+#include <sstream>
+#include <stdlib.h>
+#include <stdio.h>
+#include <malloc.h>
+#include <string.h>
+
+DLT_IMPORT_CONTEXT(AudioManager);
+
+//#define DATABASE_PATH "/tmp/audiomanager.sqlite"
+#define DATABASE_PATH ":memory:"
+
+#define DOMAIN_TABLE "Domains"
+#define SOURCE_CLASS_TABLE "SourceClasses"
+#define SINK_CLASS_TABLE "SinkClasses"
+#define SOURCE_TABLE "Sources"
+#define SINK_TABLE "Sinks"
+#define GATEWAY_TABLE "Gateways"
+#define CONNECTION_TABLE "Connections"
+#define MAINCONNECTION_TABLE "MainConnections"
+#define INTERRUPT_TABLE "Interrupts"
+#define MAIN_TABLE "MainTable"
+#define SYSTEM_TABLE "SystemProperties"
+
+const std::string databaseTables[]={
+ " Domains (domainID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, name VARCHAR(50), busname VARCHAR(50), nodename VARCHAR(50), early BOOL, complete BOOL, state INTEGER);",
+ " SourceClasses (sourceClassID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, name VARCHAR(50));",
+ " SinkClasses (sinkClassID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, name VARCHAR(50));",
+ " Sources (sourceID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, domainID INTEGER, name VARCHAR(50), sourceClassID INTEGER, sourceState INTEGER, volume INTEGER, visible BOOL, availability INTEGER, availabilityReason INTEGER, interruptState INTEGER);",
+ " Sinks (sinkID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, name VARCHAR(50), domainID INTEGER, sinkClassID INTEGER, volume INTEGER, visible BOOL, availability INTEGER, availabilityReason INTEGER, muteState INTEGER, mainVolume INTEGER);",
+ " Gateways (gatewayID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, name VARCHAR(50), sinkID INTEGER, sourceID INTEGER, domainSinkID INTEGER, domainSourceID INTEGER, controlDomainID INTEGER);",
+ " Connections (connectionID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, sourceID INTEGER, sinkID INTEGER, delay INTEGER, connectionFormat INTEGER );",
+ " MainConnections (mainConnectionID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, sourceID INTEGER, sinkID INTEGER, connectionState INTEGER, delay INTEGER);",
+ " SystemProperties (type INTEGER PRIMARY KEY, value INTEGER);"
+};
+
+/**
+ * template to converts T to std::string
+ * @param i the value to be converted
+ * @return the string
+ */
+
+std::string int2string(int i) {
+ std::stringstream out;
+ out << i;
+ return out.str();
+}
+
+
+DatabaseHandler::DatabaseHandler()
+ : mDatabase(NULL),
+ mPath(DATABASE_PATH),
+ mFirstStaticSink(true),
+ mFirstStaticSource(true),
+ mFirstStaticGateway(true),
+ mFirstStaticSinkClass(true),
+ mFirstStaticSourceClass(true),
+ mListConnectionFormat()
+{
+
+ /**
+ *\todo: this erases the database. just for testing!
+ */
+ std::ifstream infile(mPath.c_str());
+
+ if (infile)
+ {
+ remove(mPath.c_str());
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::DatabaseHandler Knocked down database"));
+ }
+
+ bool dbOpen=openDatabase();
+ if (!dbOpen)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::DatabaseHandler problems opening the database!"));
+ assert(!dbOpen);
+ }
+
+ createTables();
+}
+
+
+
+DatabaseHandler::~DatabaseHandler()
+{
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("Closed Database"));
+ sqlite3_close(mDatabase);
+}
+
+
+
+am_Error_e DatabaseHandler::enterDomainDB(const am_Domain_s & domainData, am_domainID_t & domainID)
+{
+ assert(domainData.domainID==0);
+ assert(!domainData.name.empty());
+ assert(!domainData.busname.empty());
+ assert(domainData.state>=DS_CONTROLLED && domainData.state<=DS_INDEPENDENT_RUNDOWN);
+
+
+ sqlite3_stmt* query=NULL;
+ int eCode=0;
+ std::string command= "INSERT INTO " + std::string(DOMAIN_TABLE) + "(name, busname, nodename, early, complete, state) VALUES (?,?,?,?,?,?)";
+
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ sqlite3_bind_text(query,1, domainData.name.c_str(),domainData.name.size(),SQLITE_STATIC);
+ sqlite3_bind_text(query,2, domainData.busname.c_str(),domainData.busname.size(),SQLITE_STATIC);
+ sqlite3_bind_text(query,3, domainData.nodename.c_str(),domainData.nodename.size(),SQLITE_STATIC);
+ sqlite3_bind_int(query,4, domainData.early);
+ sqlite3_bind_int(query,5, domainData.complete);
+ sqlite3_bind_int(query,6, domainData.state);
+
+ if((eCode=sqlite3_step(query))!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterDomainDB SQLITE Step error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterDomainDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ domainID=sqlite3_last_insert_rowid(mDatabase);
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterDomainDB entered new domain with name"), DLT_STRING(domainData.name.c_str()),
+ DLT_STRING("busname:"),DLT_STRING(domainData.busname.c_str()),
+ DLT_STRING("nodename:"),DLT_STRING(domainData.nodename.c_str()),
+ DLT_STRING("early:"), DLT_BOOL(domainData.early),
+ DLT_STRING("complete:"),DLT_BOOL(domainData.complete),
+ DLT_STRING("state:"),DLT_INT(domainData.state),
+ DLT_STRING("assigned ID:"),DLT_INT16(domainID));
+ return E_OK;
+}
+
+
+
+am_Error_e DatabaseHandler::enterMainConnectionDB(const am_MainConnection_s & mainConnectionData, am_mainConnectionID_t & connectionID)
+{
+ assert(mainConnectionData.connectionID==0);
+ assert(mainConnectionData.connectionState>=CS_CONNECTING && mainConnectionData.connectionState<=CS_SUSPENDED);
+ assert(mainConnectionData.route.sinkID!=0);
+ assert(mainConnectionData.route.sourceID!=0);
+
+ sqlite3_stmt* query=NULL;
+ int eCode=0;
+ std::string command= "INSERT INTO " + std::string(MAINCONNECTION_TABLE) + "(sourceID, sinkID, connectionState) VALUES (?,?,?)";
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ sqlite3_bind_int(query,1, mainConnectionData.route.sourceID);
+ sqlite3_bind_int(query,2, mainConnectionData.route.sinkID);
+ sqlite3_bind_int(query,3, mainConnectionData.connectionState);
+
+ if((eCode=sqlite3_step(query))!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterMainConnectionDB SQLITE Step error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterMainConnectionDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ connectionID=sqlite3_last_insert_rowid(mDatabase);
+
+ //now check the connectionTabel for all connections in the route. IF a particular route is not found, we return with error
+ std::vector<uint16_t> listOfConnections;
+ int16_t delay=0;
+ command="SELECT connectionID, delay FROM "+std::string(CONNECTION_TABLE)+(" WHERE sourceID=? AND sinkID=? AND connectionFormat=?");
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ std::vector<am_RoutingElement_s>::const_iterator elementIterator=mainConnectionData.route.route.begin();
+ for (;elementIterator<mainConnectionData.route.route.end();++elementIterator)
+ {
+ sqlite3_bind_int(query,1, elementIterator->sourceID);
+ sqlite3_bind_int(query,2, elementIterator->sinkID);
+ sqlite3_bind_int(query,3, elementIterator->connectionFormat);
+
+ if((eCode=sqlite3_step(query))==SQLITE_ROW)
+ {
+ listOfConnections.push_back(sqlite3_column_int(query,0));
+ int16_t temp_delay=sqlite3_column_int(query,1);
+ if (temp_delay!=-1 && delay!=-1) delay+=temp_delay;
+ else delay=-1;
+ }
+ else
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterMainConnectionDB did not find route for MainConnection:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+ sqlite3_reset(query);
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterMainConnectionDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ //now we create a table with references to the connections;
+ command="CREATE TABLE MainConnectionRoute" + int2string(connectionID) + std::string("(connectionID INTEGER)");
+ assert(this->sqQuery(command));
+
+ command= "INSERT INTO MainConnectionRoute" + int2string(connectionID) + "(connectionID) VALUES (?)";
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ std::vector<uint16_t>::iterator listConnectionIterator=listOfConnections.begin();
+ for(;listConnectionIterator<listOfConnections.end();++listConnectionIterator)
+ {
+ sqlite3_bind_int(query,1, *listConnectionIterator);
+ if((eCode=sqlite3_step(query))!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterMainConnectionDB SQLITE Step error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+ sqlite3_reset(query);
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterMainConnectionDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterMainConnectionDB entered new mainConnection with sourceID"), DLT_INT(mainConnectionData.route.sourceID),
+ DLT_STRING("sinkID:"),DLT_INT16(mainConnectionData.route.sinkID),
+ DLT_STRING("delay:"),DLT_INT16(delay),
+ DLT_STRING("assigned ID:"),DLT_INT16(connectionID));
+
+ //finally, we update the delay value for the maintable
+ if (delay==0) delay=-1;
+ return changeDelayMainConnection(delay,connectionID);
+}
+
+
+
+am_Error_e DatabaseHandler::enterSinkDB(const am_Sink_s & sinkData, am_sinkID_t & sinkID)
+{
+ assert(sinkData.sinkID<DYNAMIC_ID_BOUNDARY);
+ assert(sinkData.domainID!=0);
+ assert(!sinkData.name.empty());
+ assert(sinkData.sinkClassID!=0); // \todo: need to check if class exists?
+ assert(!sinkData.listConnectionFormats.empty());
+ assert(sinkData.muteState>=MS_MUTED && sinkData.muteState<=MS_UNMUTED);
+
+ sqlite3_stmt* query=NULL;
+ int eCode=0;
+ std::string command;
+
+ //if sinkID is zero and the first Static Sink was already entered, the ID is created
+ if (sinkData.sinkID==0 && !mFirstStaticSink)
+ {
+ command= "INSERT INTO " + std::string(SINK_TABLE) + "(name, domainID, sinkClassID, volume, visible, availability, availabilityReason, muteState, mainVolume) VALUES (?,?,?,?,?,?,?,?,?)";
+ }
+ else
+ {
+ //check if the ID already exists
+ if(existSink(sinkData.sinkID)) return E_ALREADY_EXISTS;
+ command= "INSERT INTO " + std::string(SINK_TABLE) + "(name, domainID, sinkClassID, volume, visible, availability, availabilityReason, muteState, mainVolume, sinkID) VALUES (?,?,?,?,?,?,?,?,?,?)";
+ }
+
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ sqlite3_bind_text(query,1, sinkData.name.c_str(),sinkData.name.size(),SQLITE_STATIC);
+ sqlite3_bind_int(query,2, sinkData.domainID);
+ sqlite3_bind_int(query,3, sinkData.sinkClassID);
+ sqlite3_bind_int(query,4, sinkData.volume);
+ sqlite3_bind_int(query,5, sinkData.visible);
+ sqlite3_bind_int(query,6, sinkData.available.availability);
+ sqlite3_bind_int(query,7, sinkData.available.availabilityReason);
+ sqlite3_bind_int(query,8, sinkData.muteState);
+ sqlite3_bind_int(query,9, sinkData.mainVolume);
+
+ //if the ID is not created, we add it to the query
+ if(sinkData.sinkID!=0)
+ {
+ sqlite3_bind_int(query,10, sinkData.sinkID);
+ }
+
+ //if the first static sink is entered, we need to set it onto the boundary
+ else if(mFirstStaticSink)
+ {
+ sqlite3_bind_int(query,10, DYNAMIC_ID_BOUNDARY);
+ mFirstStaticSink=false;
+ }
+
+ if((eCode=sqlite3_step(query))!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkDB SQLITE Step error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ sinkID=sqlite3_last_insert_rowid(mDatabase); //todo:change last_insert implementations for mulithread usage...
+
+ //now we need to create the additional tables:
+ command="CREATE TABLE SinkConnectionFormat" + int2string(sinkID) + std::string("(soundFormat INTEGER)");
+ assert(this->sqQuery(command));
+ command="CREATE TABLE SinkMainSoundProperty" + int2string(sinkID) + std::string("(soundPropertyType INTEGER, value INTEGER)");
+ assert(this->sqQuery(command));
+ command="CREATE TABLE SinkSoundProperty" + int2string(sinkID) + std::string("(soundPropertyType INTEGER, value INTEGER)");
+ assert(this->sqQuery(command));
+
+ //fill ConnectionFormats
+ command="INSERT INTO SinkConnectionFormat" + int2string(sinkID) + std::string("(soundFormat) VALUES (?)");
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ std::vector<am_ConnectionFormat_e>::const_iterator connectionFormatIterator=sinkData.listConnectionFormats.begin();
+ for(;connectionFormatIterator<sinkData.listConnectionFormats.end();++connectionFormatIterator)
+ {
+ sqlite3_bind_int(query,1, *connectionFormatIterator);
+ if((eCode=sqlite3_step(query))!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkDB SQLITE Step error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+ sqlite3_reset(query);
+ }
+
+ //Fill MainSinkSoundProperties
+ command="INSERT INTO SinkMainSoundProperty" + int2string(sinkID) + std::string("(soundPropertyType,value) VALUES (?,?)");
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ std::vector<am_MainSoundProperty_s>::const_iterator mainSoundPropertyIterator=sinkData.listMainSoundProperties.begin();
+ for(;mainSoundPropertyIterator<sinkData.listMainSoundProperties.end();++mainSoundPropertyIterator)
+ {
+ sqlite3_bind_int(query,1, mainSoundPropertyIterator->type);
+ sqlite3_bind_int(query,2, mainSoundPropertyIterator->value);
+ if((eCode=sqlite3_step(query))!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkDB SQLITE Step error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+ sqlite3_reset(query);
+ }
+
+ //Fill SinkSoundProperties
+ command="INSERT INTO SinkSoundProperty" + int2string(sinkID) + std::string("(soundPropertyType,value) VALUES (?,?)");
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ std::vector<am_SoundProperty_s>::const_iterator SoundPropertyIterator=sinkData.listSoundProperties.begin();
+ for(;SoundPropertyIterator<sinkData.listSoundProperties.end();++SoundPropertyIterator)
+ {
+ sqlite3_bind_int(query,1, SoundPropertyIterator->type);
+ sqlite3_bind_int(query,2, SoundPropertyIterator->value);
+ if((eCode=sqlite3_step(query))!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkDB SQLITE Step error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+ sqlite3_reset(query);
+ }
+
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterSinkDB entered new sink with name"), DLT_STRING(sinkData.name.c_str()),
+ DLT_STRING("domainID:"),DLT_INT(sinkData.domainID),
+ DLT_STRING("classID:"),DLT_INT(sinkData.sinkClassID),
+ DLT_STRING("volume:"),DLT_INT(sinkData.volume),
+ DLT_STRING("visible:"),DLT_BOOL(sinkData.visible),
+ DLT_STRING("available.availability:"),DLT_INT(sinkData.available.availability),
+ DLT_STRING("available.availabilityReason:"),DLT_INT(sinkData.available.availabilityReason),
+ DLT_STRING("muteState:"),DLT_INT(sinkData.muteState),
+ DLT_STRING("mainVolume:"),DLT_INT(sinkData.mainVolume),
+ DLT_STRING("assigned ID:"),DLT_INT16(sinkID));
+
+ return E_OK;
+}
+
+
+
+am_Error_e DatabaseHandler::enterCrossfaderDB(const am_Crossfader_s & crossfaderData, am_crossfaderID_t & crossfaderID)
+{
+ //todo: implement crossfader
+ (void)crossfaderData;
+ (void)crossfaderID;
+ return E_UNKNOWN;
+}
+
+
+
+am_Error_e DatabaseHandler::enterGatewayDB(const am_Gateway_s & gatewayData, am_gatewayID_t & gatewayID)
+{
+ assert(gatewayData.gatewayID<DYNAMIC_ID_BOUNDARY);
+ assert(gatewayData.sinkID!=0);
+ assert(gatewayData.sourceID!=0);
+ assert(gatewayData.controlDomainID!=0);
+ assert(gatewayData.domainSinkID!=0);
+ assert(gatewayData.domainSourceID!=0);
+ assert(!gatewayData.name.empty());
+ assert(!gatewayData.convertionMatrix.empty());
+ assert(!gatewayData.listSinkFormats.empty());
+ assert(!gatewayData.listSourceFormats.empty());
+
+ sqlite3_stmt* query=NULL;
+ int eCode=0;
+ std::string command;
+
+ //if sinkID is zero and the first Static Sink was already entered, the ID is created
+ if (gatewayData.gatewayID==0 && !mFirstStaticGateway)
+ {
+ command= "INSERT INTO " + std::string(GATEWAY_TABLE) + "(name, sinkID, sourceID, domainSinkID, domainSourceID, controlDomainID) VALUES (?,?,?,?,?,?)";
+ }
+ else
+ {
+ //check if the ID already exists
+ if (existGateway(gatewayData.gatewayID)) return E_ALREADY_EXISTS;
+ command= "INSERT INTO " + std::string(GATEWAY_TABLE) + "(name, sinkID, sourceID, domainSinkID, domainSourceID, controlDomainID, gatewayID) VALUES (?,?,?,?,?,?,?)";
+ }
+
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ sqlite3_bind_text(query,1, gatewayData.name.c_str(),gatewayData.name.size(),SQLITE_STATIC);
+ sqlite3_bind_int(query,2, gatewayData.sinkID);
+ sqlite3_bind_int(query,3, gatewayData.sourceID);
+ sqlite3_bind_int(query,4, gatewayData.domainSinkID);
+ sqlite3_bind_int(query,5, gatewayData.domainSourceID);
+ sqlite3_bind_int(query,6, gatewayData.controlDomainID);
+
+ //if the ID is not created, we add it to the query
+ if(gatewayData.gatewayID!=0)
+ {
+ sqlite3_bind_int(query,7, gatewayData.gatewayID);
+ }
+
+ //if the first static sink is entered, we need to set it onto the boundary
+ else if(mFirstStaticGateway)
+ {
+ sqlite3_bind_int(query,7, DYNAMIC_ID_BOUNDARY);
+ mFirstStaticGateway=false;
+ }
+
+ if((eCode=sqlite3_step(query))!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterGatewayDB SQLITE Step error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterGatewayDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ gatewayID=sqlite3_last_insert_rowid(mDatabase);
+
+ //now the convertion matrix todo: change the map implementation sometimes to blob in sqlite
+ mListConnectionFormat.insert(std::make_pair(gatewayID,gatewayData.convertionMatrix));
+
+ command="CREATE TABLE GatewaySourceFormat" + int2string(gatewayID) + std::string("(soundFormat INTEGER)");
+ assert(this->sqQuery(command));
+ command="CREATE TABLE GatewaySinkFormat" + int2string(gatewayID) + std::string("(soundFormat INTEGER)");
+ assert(this->sqQuery(command));
+
+ //fill ConnectionFormats
+ command="INSERT INTO GatewaySourceFormat" + int2string(gatewayID) + std::string("(soundFormat) VALUES (?)");
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ std::vector<am_ConnectionFormat_e>::const_iterator connectionFormatIterator=gatewayData.listSourceFormats.begin();
+ for(;connectionFormatIterator<gatewayData.listSourceFormats.end();++connectionFormatIterator)
+ {
+ sqlite3_bind_int(query,1, *connectionFormatIterator);
+ if((eCode=sqlite3_step(query))!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterGatewayDB SQLITE Step error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+ sqlite3_reset(query);
+ }
+
+ command="INSERT INTO GatewaySinkFormat" + int2string(gatewayID) + std::string("(soundFormat) VALUES (?)");
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ connectionFormatIterator=gatewayData.listSinkFormats.begin();
+ for(;connectionFormatIterator<gatewayData.listSinkFormats.end();++connectionFormatIterator)
+ {
+ sqlite3_bind_int(query,1, *connectionFormatIterator);
+ if((eCode=sqlite3_step(query))!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterGatewayDB SQLITE Step error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+ sqlite3_reset(query);
+ }
+
+
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterGatewayDB entered new gateway with name"), DLT_STRING(gatewayData.name.c_str()),
+ DLT_STRING("sourceID:"),DLT_INT(gatewayData.sourceID),
+ DLT_STRING("sinkID:"),DLT_INT(gatewayData.sinkID),
+ DLT_STRING("domainSinkID:"),DLT_INT(gatewayData.domainSinkID),
+ DLT_STRING("domainSourceID:"),DLT_BOOL(gatewayData.domainSourceID),
+ DLT_STRING("controlDomainID:"),DLT_INT(gatewayData.controlDomainID),
+ DLT_STRING("assigned ID:"),DLT_INT16(gatewayID));
+
+ return E_OK;
+}
+
+
+
+am_Error_e DatabaseHandler::enterSourceDB(const am_Source_s & sourceData, am_sourceID_t & sourceID)
+{
+ assert(sourceData.sourceID<DYNAMIC_ID_BOUNDARY);
+ assert(sourceData.domainID!=0);
+ assert(!sourceData.name.empty());
+ assert(sourceData.sourceClassID!=0); // \todo: need to check if class exists?
+ assert(!sourceData.listConnectionFormats.empty());
+ assert(sourceData.sourceState>=SS_ON && sourceData.sourceState<=SS_PAUSED);
+
+ sqlite3_stmt* query=NULL;
+ int eCode=0;
+ std::string command;
+
+ //if sinkID is zero and the first Static Sink was already entered, the ID is created
+ if (sourceData.sourceID==0 && !mFirstStaticSource)
+ {
+ command= "INSERT INTO " + std::string(SOURCE_TABLE) + "(name, domainID, sourceClassID, sourceState, volume, visible, availability, availabilityReason, interruptState) VALUES (?,?,?,?,?,?,?,?,?)";
+ }
+ else
+ {
+ //check if the ID already exists
+ if (existSource(sourceData.sourceID)) return E_ALREADY_EXISTS;
+ else command= "INSERT INTO " + std::string(SOURCE_TABLE) + "(name, domainID, sourceClassID, sourceState, volume, visible, availability, availabilityReason, interruptState, sourceID) VALUES (?,?,?,?,?,?,?,?,?,?)";
+ }
+
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ sqlite3_bind_text(query,1, sourceData.name.c_str(),sourceData.name.size(),SQLITE_STATIC);
+ sqlite3_bind_int(query,2, sourceData.domainID);
+ sqlite3_bind_int(query,3, sourceData.sourceClassID);
+ sqlite3_bind_int(query,4, sourceData.sourceState);
+ sqlite3_bind_int(query,5, sourceData.volume);
+ sqlite3_bind_int(query,6, sourceData.visible);
+ sqlite3_bind_int(query,7, sourceData.available.availability);
+ sqlite3_bind_int(query,8, sourceData.available.availabilityReason);
+ sqlite3_bind_int(query,9, sourceData.interruptState);
+
+ //if the ID is not created, we add it to the query
+ if(sourceData.sourceID!=0)
+ {
+ sqlite3_bind_int(query,10, sourceData.sourceID);
+ }
+
+ //if the first static sink is entered, we need to set it onto the boundary
+ else if(mFirstStaticSource)
+ {
+ sqlite3_bind_int(query,10, DYNAMIC_ID_BOUNDARY);
+ mFirstStaticSource=false;
+ }
+
+ if((eCode=sqlite3_step(query))!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceDB SQLITE Step error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ sourceID=sqlite3_last_insert_rowid(mDatabase);
+
+ //now we need to create the additional tables:
+ command="CREATE TABLE SourceConnectionFormat" + int2string(sourceID) + std::string("(soundFormat INTEGER)");
+ assert(this->sqQuery(command));
+ command="CREATE TABLE SourceMainSoundProperty" + int2string(sourceID) + std::string("(soundPropertyType INTEGER, value INTEGER)");
+ assert(this->sqQuery(command));
+ command="CREATE TABLE SourceSoundProperty" + int2string(sourceID) + std::string("(soundPropertyType INTEGER, value INTEGER)");
+ assert(this->sqQuery(command));
+
+ //fill ConnectionFormats
+ command="INSERT INTO SourceConnectionFormat" + int2string(sourceID) + std::string("(soundFormat) VALUES (?)");
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ std::vector<am_ConnectionFormat_e>::const_iterator connectionFormatIterator=sourceData.listConnectionFormats.begin();
+ for(;connectionFormatIterator<sourceData.listConnectionFormats.end();++connectionFormatIterator)
+ {
+ sqlite3_bind_int(query,1, *connectionFormatIterator);
+ if((eCode=sqlite3_step(query))!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceDB SQLITE Step error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+ sqlite3_reset(query);
+ }
+
+ //Fill MainSinkSoundProperties
+ command="INSERT INTO SourceMainSoundProperty" + int2string(sourceID) + std::string("(soundPropertyType,value) VALUES (?,?)");
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ std::vector<am_MainSoundProperty_s>::const_iterator mainSoundPropertyIterator=sourceData.listMainSoundProperties.begin();
+ for(;mainSoundPropertyIterator<sourceData.listMainSoundProperties.end();++mainSoundPropertyIterator)
+ {
+ sqlite3_bind_int(query,1, mainSoundPropertyIterator->type);
+ sqlite3_bind_int(query,2, mainSoundPropertyIterator->value);
+ if((eCode=sqlite3_step(query))!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceDB SQLITE Step error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+ sqlite3_reset(query);
+ }
+
+ //Fill SinkSoundProperties
+ command="INSERT INTO SourceSoundProperty" + int2string(sourceID) + std::string("(soundPropertyType,value) VALUES (?,?)");
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ std::vector<am_SoundProperty_s>::const_iterator SoundPropertyIterator=sourceData.listSoundProperties.begin();
+ for(;SoundPropertyIterator<sourceData.listSoundProperties.end();++SoundPropertyIterator)
+ {
+ sqlite3_bind_int(query,1, SoundPropertyIterator->type);
+ sqlite3_bind_int(query,2, SoundPropertyIterator->value);
+ if((eCode=sqlite3_step(query))!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkDB SQLITE Step error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+ sqlite3_reset(query);
+ }
+
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterSinkDB entered new source with name"), DLT_STRING(sourceData.name.c_str()),
+ DLT_STRING("domainID:"),DLT_INT(sourceData.domainID),
+ DLT_STRING("classID:"),DLT_INT(sourceData.sourceClassID),
+ DLT_STRING("volume:"),DLT_INT(sourceData.volume),
+ DLT_STRING("visible:"),DLT_BOOL(sourceData.visible),
+ DLT_STRING("available.availability:"),DLT_INT(sourceData.available.availability),
+ DLT_STRING("available.availabilityReason:"),DLT_INT(sourceData.available.availabilityReason),
+ DLT_STRING("interruptState:"),DLT_INT(sourceData.interruptState),
+ DLT_STRING("assigned ID:"),DLT_INT16(sourceID));
+
+ return E_OK;
+}
+
+
+
+am_Error_e DatabaseHandler::changeMainConnectionRouteDB(const am_mainConnectionID_t mainconnectionID, const am_Route_s & route)
+{
+ assert(mainconnectionID!=0);
+ if(!existMainConnection(mainconnectionID))
+ {
+ return E_NON_EXISTENT;
+ }
+ sqlite3_stmt* query=NULL;
+ int eCode=0;
+ std::string command;
+
+ std::vector<uint16_t> listOfConnections;
+ int16_t delay=0;
+ command="SELECT connectionID, delay FROM "+std::string(CONNECTION_TABLE)+(" WHERE sourceID=? AND sinkID=? AND connectionFormat=?");
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ std::vector<am_RoutingElement_s>::const_iterator elementIterator=route.route.begin();
+ for (;elementIterator<route.route.end();++elementIterator)
+ {
+ sqlite3_bind_int(query,1, elementIterator->sourceID);
+ sqlite3_bind_int(query,2, elementIterator->sinkID);
+ sqlite3_bind_int(query,3, elementIterator->connectionFormat);
+
+ if((eCode=sqlite3_step(query))==SQLITE_ROW)
+ {
+ listOfConnections.push_back(sqlite3_column_int(query,0));
+ int16_t temp_delay=sqlite3_column_int(query,1);
+ if (temp_delay!=-1 && delay!=-1) delay+=temp_delay;
+ else delay=-1;
+ }
+ else
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainConnectionRouteDB did not find route for MainConnection:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+ sqlite3_reset(query);
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainConnectionRouteDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ //now we delete the data in the table
+ command="DELETE from MainConnectionRoute" + int2string(mainconnectionID);
+ assert(this->sqQuery(command));
+
+ command= "INSERT INTO MainConnectionRoute" + int2string(mainconnectionID) + "(connectionID) VALUES (?)";
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ std::vector<uint16_t>::iterator listConnectionIterator=listOfConnections.begin();
+ for(;listConnectionIterator<listOfConnections.end();++listConnectionIterator)
+ {
+ sqlite3_bind_int(query,1, *listConnectionIterator);
+ if((eCode=sqlite3_step(query))!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainConnectionRouteDB SQLITE Step error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+ sqlite3_reset(query);
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainConnectionRouteDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeMainConnectionRouteDB entered new route:"),DLT_INT(mainconnectionID));
+ return E_OK;
+}
+
+am_Error_e DatabaseHandler::changeMainConnectionStateDB(const am_mainConnectionID_t mainconnectionID, const am_ConnectionState_e connectionState)
+{
+ assert(mainconnectionID!=0);
+
+ sqlite3_stmt* query=NULL;
+ int eCode=0;
+ std::string command;
+
+ if (!existMainConnection(mainconnectionID))
+ {
+ return E_NON_EXISTENT;
+ }
+ command = "UPDATE " + std::string(MAINCONNECTION_TABLE) + " SET connectionState=? WHERE mainConnectionID=" + int2string(mainconnectionID);
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ sqlite3_bind_int(query,1, connectionState);
+ if((eCode=sqlite3_step(query))!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainConnectionStateDB SQLITE Step error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainConnectionStateDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeMainConnectionStateDB changed mainConnectionState of MainConnection:"),DLT_INT(mainconnectionID),DLT_STRING("to:"),DLT_INT(connectionState));
+ return E_OK;
+}
+
+
+
+am_Error_e DatabaseHandler::changeSinkMainVolumeDB(const am_mainVolume_t mainVolume, const am_sinkID_t sinkID)
+{
+ assert(sinkID!=0);
+
+ sqlite3_stmt* query=NULL;
+ int eCode=0;
+ std::string command;
+
+ if (!existSink(sinkID))
+ {
+ return E_NON_EXISTENT;
+ }
+ command = "UPDATE " + std::string(SINK_TABLE) + " SET mainVolume=? WHERE sinkID=" + int2string(sinkID);
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ sqlite3_bind_int(query,1, mainVolume);
+ if((eCode=sqlite3_step(query))!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkMainVolumeDB SQLITE Step error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkMainVolumeDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeSinkMainVolumeDB changed mainVolume of sink:"),DLT_INT(sinkID),DLT_STRING("to:"),DLT_INT(mainVolume));
+ return E_OK;
+}
+
+
+
+am_Error_e DatabaseHandler::changeSinkAvailabilityDB(const am_Availability_s & availability, const am_sinkID_t sinkID)
+{
+ assert(sinkID!=0);
+
+ sqlite3_stmt* query=NULL;
+ int eCode=0;
+ std::string command;
+
+ if (!existSink(sinkID))
+ {
+ return E_NON_EXISTENT;
+ }
+ command = "UPDATE " + std::string(SINK_TABLE) + " SET availability=?, availabilityReason=? WHERE sinkID=" + int2string(sinkID);
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ sqlite3_bind_int(query,1, availability.availability);
+ sqlite3_bind_int(query,2, availability.availabilityReason);
+ if((eCode=sqlite3_step(query))!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkAvailabilityDB SQLITE Step error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ } assert(sinkID!=0);
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkAvailabilityDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeSinkAvailabilityDB changed sinkAvailability of sink:"),DLT_INT(sinkID),DLT_STRING("to:"),DLT_INT(availability.availability), DLT_STRING("Reason:"),DLT_INT(availability.availabilityReason));
+ return E_OK;
+}
+
+
+
+am_Error_e DatabaseHandler::changDomainStateDB(const am_DomainState_e domainState, const am_domainID_t domainID)
+{
+ assert(domainID!=0);
+
+ sqlite3_stmt* query=NULL;
+ int eCode=0;
+ std::string command;
+
+ if (!existDomain(domainID))
+ {
+ return E_NON_EXISTENT;
+ }
+ command = "UPDATE " + std::string(DOMAIN_TABLE) + " SET state=? WHERE domainID=" + int2string(domainID);
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ sqlite3_bind_int(query,1, domainState);
+ if((eCode=sqlite3_step(query))!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changDomainStateDB SQLITE Step error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changDomainStateDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changDomainStateDB changed domainState of domain:"),DLT_INT(domainID),DLT_STRING("to:"),DLT_INT(domainState));
+ return E_OK;
+}
+
+
+
+am_Error_e DatabaseHandler::changeSinkMuteStateDB(const am_MuteState_e muteState, const am_sinkID_t sinkID)
+{
+ assert(sinkID!=0);
+
+ sqlite3_stmt* query=NULL;
+ int eCode=0;
+ std::string command;
+
+ if (!existSink(sinkID))
+ {
+ return E_NON_EXISTENT;
+ }
+ command = "UPDATE " + std::string(SINK_TABLE) + " SET muteState=? WHERE sinkID=" + int2string(sinkID);
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ sqlite3_bind_int(query,1, muteState);
+ if((eCode=sqlite3_step(query))!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkMuteStateDB SQLITE Step error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ } assert(sinkID!=0);
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkMuteStateDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeSinkMuteStateDB changed sinkMuteState of sink:"),DLT_INT(sinkID),DLT_STRING("to:"),DLT_INT(muteState));
+ return E_OK;
+}
+
+
+
+am_Error_e DatabaseHandler::changeMainSinkSoundPropertyDB(const am_MainSoundProperty_s & soundProperty, const am_sinkID_t sinkID)
+{
+ //todo: add checks if soundproperty exists!
+ assert(sinkID!=0);
+
+ sqlite3_stmt* query=NULL;
+ int eCode=0;
+ std::string command;
+
+ if (!existSink(sinkID))
+ {
+ return E_NON_EXISTENT;
+ }
+ command = "UPDATE SinkMainSoundProperty" + int2string(sinkID)+ " SET value=? WHERE soundPropertyType=" + int2string(soundProperty.type);
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ sqlite3_bind_int(query,1, soundProperty.value);
+ if((eCode=sqlite3_step(query))!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainSinkSoundPropertyDB SQLITE Step error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ } assert(sinkID!=0);
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainSinkSoundPropertyDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeMainSinkSoundPropertyDB changed MainSinkSoundProperty of sink:"),DLT_INT(sinkID),DLT_STRING("type:"),DLT_INT(soundProperty.type),DLT_STRING("to:"),DLT_INT(soundProperty.value));
+ return E_OK;
+}
+
+
+
+am_Error_e DatabaseHandler::changeMainSourceSoundPropertyDB(const am_MainSoundProperty_s & soundProperty, const am_sourceID_t sourceID)
+{
+ //todo: add checks if soundproperty exists!
+ assert(sourceID!=0);
+
+ sqlite3_stmt* query=NULL;
+ int eCode=0;
+ std::string command;
+
+ if (!existSource(sourceID))
+ {
+ return E_NON_EXISTENT;
+ }
+ command = "UPDATE SourceMainSoundProperty" + int2string(sourceID)+ " SET value=? WHERE soundPropertyType=" + int2string(soundProperty.type);
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ sqlite3_bind_int(query,1, soundProperty.value);
+ if((eCode=sqlite3_step(query))!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainSourceSoundPropertyDB SQLITE Step error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainSourceSoundPropertyDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeMainSourceSoundPropertyDB changed MainSinkSoundProperty of source:"),DLT_INT(sourceID),DLT_STRING("type:"),DLT_INT(soundProperty.type),DLT_STRING("to:"),DLT_INT(soundProperty.value));
+ return E_OK;
+}
+
+
+
+am_Error_e DatabaseHandler::changeSourceAvailabilityDB(const am_Availability_s & availability, const am_sourceID_t sourceID)
+{
+ assert(sourceID!=0);
+
+ sqlite3_stmt* query=NULL;
+ int eCode=0;
+ std::string command;
+
+ if (!existSource(sourceID))
+ {
+ return E_NON_EXISTENT;
+ }
+ command = "UPDATE " + std::string(SOURCE_TABLE) + " SET availability=?, availabilityReason=? WHERE sourceID=" + int2string(sourceID);
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ sqlite3_bind_int(query,1, availability.availability);
+ sqlite3_bind_int(query,2, availability.availabilityReason);
+ if((eCode=sqlite3_step(query))!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSourceAvailabilityDB SQLITE Step error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSourceAvailabilityDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeSourceAvailabilityDB changed changeSourceAvailabilityDB of source:"),DLT_INT(sourceID),DLT_STRING("to:"),DLT_INT(availability.availability), DLT_STRING("Reason:"),DLT_INT(availability.availabilityReason));
+ return E_OK;
+}
+
+
+
+am_Error_e DatabaseHandler::changeSystemPropertyDB(const am_SystemProperty_s & property)
+{
+ sqlite3_stmt* query=NULL;
+ int eCode=0;
+ std::string command="UPDATE " + std::string(SYSTEM_TABLE) + " set value=? WHERE type=?";
+
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ sqlite3_bind_int(query,1, property.value);
+ sqlite3_bind_int(query,2, property.type);
+
+ if((eCode=sqlite3_step(query))!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSystemPropertyDB SQLITE Step error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSystemPropertyDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeSystemPropertyDB changed system property"));
+ return E_OK;
+}
+
+
+
+am_Error_e DatabaseHandler::removeMainConnectionDB(const am_mainConnectionID_t mainConnectionID)
+{
+ assert(mainConnectionID!=0);
+
+ if (!existMainConnection(mainConnectionID))
+ {
+ return E_NON_EXISTENT;
+ }
+ std::string command = "DELETE from " + std::string(MAINCONNECTION_TABLE) + " WHERE mainConnectionID=" + int2string(mainConnectionID);
+ std::string command1 = "DROP table MainConnectionRoute" + int2string(mainConnectionID);
+ if(!sqQuery(command)) return E_DATABASE_ERROR;
+ if(!sqQuery(command1)) return E_DATABASE_ERROR;
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeMainConnectionDB removed:"),DLT_INT(mainConnectionID));
+ return E_OK;
+}
+
+
+
+am_Error_e DatabaseHandler::removeSinkDB(const am_sinkID_t sinkID)
+{
+ assert(sinkID!=0);
+
+ if (!existSink(sinkID))
+ {
+ return E_NON_EXISTENT;
+ }
+ std::string command = "DELETE from " + std::string(SINK_TABLE) + " WHERE sinkID=" + int2string(sinkID);
+ std::string command1 = "DROP table SinkConnectionFormat" + int2string(sinkID);
+ std::string command2 = "DROP table SinkMainSoundProperty" + int2string(sinkID);
+ std::string command3 = "DROP table SinkSoundProperty" + int2string(sinkID);
+ if(!sqQuery(command)) return E_DATABASE_ERROR;
+ if(!sqQuery(command1)) return E_DATABASE_ERROR;
+ if(!sqQuery(command2)) return E_DATABASE_ERROR;
+ if(!sqQuery(command3)) return E_DATABASE_ERROR;
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeSinkDB removed:"),DLT_INT(sinkID));
+ return E_OK;
+}
+
+
+
+am_Error_e DatabaseHandler::removeSourceDB(const am_sourceID_t sourceID)
+{
+ assert(sourceID!=0);
+
+ if (!existSource(sourceID))
+ {
+ return E_NON_EXISTENT;
+ }
+ std::string command = "DELETE from " + std::string(SOURCE_TABLE) + " WHERE sourceID=" + int2string(sourceID);
+ std::string command1 = "DROP table SourceConnectionFormat" + int2string(sourceID);
+ std::string command2 = "DROP table SourceMainSoundProperty" + int2string(sourceID);
+ std::string command3 = "DROP table SourceSoundProperty" + int2string(sourceID);
+ if(!sqQuery(command)) return E_DATABASE_ERROR;
+ if(!sqQuery(command1)) return E_DATABASE_ERROR;
+ if(!sqQuery(command2)) return E_DATABASE_ERROR;
+ if(!sqQuery(command3)) return E_DATABASE_ERROR;
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeSourceDB removed:"),DLT_INT(sourceID));
+ return E_OK;
+}
+
+
+
+am_Error_e DatabaseHandler::removeGatewayDB(const am_gatewayID_t gatewayID)
+{
+ assert(gatewayID!=0);
+
+ if (!existGateway(gatewayID))
+ {
+ return E_NON_EXISTENT;
+ }
+ std::string command = "DELETE from " + std::string(GATEWAY_TABLE) + " WHERE gatewayID=" + int2string(gatewayID);
+ if(!sqQuery(command)) return E_DATABASE_ERROR;
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeGatewayDB removed:"),DLT_INT(gatewayID));
+ return E_OK;
+}
+
+
+
+am_Error_e DatabaseHandler::removeCrossfaderDB(const am_crossfaderID_t crossfaderID)
+{
+ //todo: implement crossdfader
+ (void)crossfaderID;
+ return E_UNKNOWN;
+}
+
+
+
+am_Error_e DatabaseHandler::removeDomainDB(const am_domainID_t domainID)
+{
+ assert(domainID!=0);
+
+ if (!existDomain(domainID))
+ {
+ return E_NON_EXISTENT;
+ }
+ std::string command = "DELETE from " + std::string(DOMAIN_TABLE) + " WHERE domainID=" + int2string(domainID);
+ if(!sqQuery(command)) return E_DATABASE_ERROR;
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeDomainDB removed:"),DLT_INT(domainID));
+
+ return E_OK;
+}
+
+am_Error_e DatabaseHandler::removeSinkClassDB(const am_sinkClass_t sinkClassID)
+{
+ assert(sinkClassID!=0);
+
+ if (!existSinkClass(sinkClassID))
+ {
+ return E_NON_EXISTENT;
+ }
+ std::string command = "DELETE from " + std::string(SINK_CLASS_TABLE) + " WHERE sinkClassID=" + int2string(sinkClassID);
+ std::string command1 = "DROP table SinkClassProperties" + int2string(sinkClassID);
+ if(!sqQuery(command)) return E_DATABASE_ERROR;
+ if(!sqQuery(command1)) return E_DATABASE_ERROR;
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeSinkClassDB removed:"),DLT_INT(sinkClassID));
+ return E_OK;
+}
+
+am_Error_e DatabaseHandler::removeSourceClassDB(const am_sourceClass_t sourceClassID)
+{
+ assert(sourceClassID!=0);
+
+ if (!existSourceClass(sourceClassID))
+ {
+ return E_NON_EXISTENT;
+ }
+ std::string command = "DELETE from " + std::string(SOURCE_CLASS_TABLE) + " WHERE sourceClassID=" + int2string(sourceClassID);
+ std::string command1 = "DROP table SourceClassProperties" + int2string(sourceClassID);
+ if(!sqQuery(command)) return E_DATABASE_ERROR;
+ if(!sqQuery(command1)) return E_DATABASE_ERROR;
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeSourceClassDB removed:"),DLT_INT(sourceClassID));
+ return E_OK;
+}
+
+
+am_Error_e DatabaseHandler::getSourceClassInfoDB(const am_sourceID_t sourceID, am_SourceClass_s & classInfo) const
+{
+ assert(sourceID!=0);
+
+ if (!existSource(sourceID))
+ {
+ return E_NON_EXISTENT;
+ }
+ sqlite3_stmt* query=NULL;
+ int eCode=0;
+ am_ClassProperty_s propertyTemp;
+ std::string command= "SELECT sourceClassID FROM " + std::string(SOURCE_TABLE)+ " WHERE sourceID=" + (int2string(sourceID));
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+
+ if((eCode=sqlite3_step(query))==SQLITE_ROW)
+ {
+ classInfo.sourceClassID=sqlite3_column_int(query,0);
+ }
+
+ if((eCode=sqlite3_step(query))!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSourceClassInfoDB SQLITE error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSourceClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ command= "SELECT name FROM " + std::string(SOURCE_CLASS_TABLE)+ " WHERE sourceClassID=" + (int2string(classInfo.sourceClassID));
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+
+ if((eCode=sqlite3_step(query))==SQLITE_ROW)
+ {
+ classInfo.name=std::string((const char*)sqlite3_column_text(query,0));
+ }
+
+ if((eCode=sqlite3_step(query))!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSourceClassInfoDB SQLITE error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSourceClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ //read out Properties
+ command= "SELECT classProperty, value FROM SourceClassProperties"+ int2string(classInfo.sourceClassID);
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ while((eCode=sqlite3_step(query))==SQLITE_ROW)
+ {
+ propertyTemp.classProperty=(am_ClassProperty_e)sqlite3_column_int(query,0);
+ propertyTemp.value=sqlite3_column_int(query,1);
+ classInfo.listClassProperties.push_back(propertyTemp);
+ }
+
+ if(eCode!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSourceClassInfoDB SQLITE error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSourceClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+ return E_OK;
+}
+
+
+
+am_Error_e DatabaseHandler::changeSinkClassInfoDB(const am_SinkClass_s& sinkClass)
+{
+ assert(sinkClass.sinkClassID!=0);
+ assert(!sinkClass.listClassProperties.empty());
+
+
+ sqlite3_stmt* query=NULL;
+ int eCode=0;
+
+ //check if the ID already exists
+ if(!existSinkClass(sinkClass.sinkClassID)) return E_NON_EXISTENT;
+
+ //fill ConnectionFormats
+ std::string command="UPDATE SinkClassProperties" + int2string(sinkClass.sinkClassID) + " set value=? WHERE classProperty=?;";
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ std::vector<am_ClassProperty_s>::const_iterator Iterator=sinkClass.listClassProperties.begin();
+ for(;Iterator<sinkClass.listClassProperties.end();++Iterator)
+ {
+ sqlite3_bind_int(query,1, Iterator->value);
+ sqlite3_bind_int(query,2, Iterator->classProperty);
+ if((eCode=sqlite3_step(query))!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::setSinkClassInfoDB SQLITE Step error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+ sqlite3_reset(query);
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::setSinkClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::setSinkClassInfoDB set setSinkClassInfo"));
+ return E_OK;
+}
+
+
+
+am_Error_e DatabaseHandler::changeSourceClassInfoDB(const am_SourceClass_s& sourceClass)
+{
+ assert(sourceClass.sourceClassID!=0);
+ assert(!sourceClass.listClassProperties.empty());
+
+
+ sqlite3_stmt* query=NULL;
+ int eCode=0;
+
+ //check if the ID already exists
+ if(!existSourceClass(sourceClass.sourceClassID)) return E_NON_EXISTENT;
+
+ //fill ConnectionFormats
+ std::string command="UPDATE SourceClassProperties" + int2string(sourceClass.sourceClassID) + " set value=? WHERE classProperty=?;";
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ std::vector<am_ClassProperty_s>::const_iterator Iterator=sourceClass.listClassProperties.begin();
+ for(;Iterator<sourceClass.listClassProperties.end();++Iterator)
+ {
+ sqlite3_bind_int(query,1, Iterator->value);
+ sqlite3_bind_int(query,2, Iterator->classProperty);
+ if((eCode=sqlite3_step(query))!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::setSinkClassInfoDB SQLITE Step error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+ sqlite3_reset(query);
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::setSinkClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::setSinkClassInfoDB set setSinkClassInfo"));
+ return E_OK;
+}
+
+
+
+am_Error_e DatabaseHandler::getSinkClassInfoDB(const am_sinkID_t sinkID, am_SinkClass_s & sinkClass) const
+{
+ assert(sinkID!=0);
+
+ if (!existSink(sinkID))
+ {
+ return E_NON_EXISTENT;
+ }
+ sqlite3_stmt* query=NULL;
+ int eCode=0;
+ am_ClassProperty_s propertyTemp;
+ std::string command= "SELECT sinkClassID FROM " + std::string(SINK_TABLE)+ " WHERE sinkID=" + (int2string(sinkID));
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+
+ if((eCode=sqlite3_step(query))==SQLITE_ROW)
+ {
+ sinkClass.sinkClassID=sqlite3_column_int(query,0);
+ }
+
+ if((eCode=sqlite3_step(query))!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkClassInfoDB SQLITE error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ command= "SELECT name FROM " + std::string(SINK_CLASS_TABLE)+ " WHERE sinkClassID=" + (int2string(sinkClass.sinkClassID));
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+
+ if((eCode=sqlite3_step(query))==SQLITE_ROW)
+ {
+ sinkClass.name=std::string((const char*)sqlite3_column_text(query,0));
+ }
+
+ if((eCode=sqlite3_step(query))!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkClassInfoDB SQLITE error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ //read out Properties
+ command= "SELECT classProperty, value FROM SinkClassProperties"+ int2string(sinkClass.sinkClassID);
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ while((eCode=sqlite3_step(query))==SQLITE_ROW)
+ {
+ propertyTemp.classProperty=(am_ClassProperty_e)sqlite3_column_int(query,0);
+ propertyTemp.value=sqlite3_column_int(query,1);
+ sinkClass.listClassProperties.push_back(propertyTemp);
+ }
+
+ if(eCode!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkClassInfoDB SQLITE error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+ return E_OK;
+}
+
+
+
+am_Error_e DatabaseHandler::getGatewayInfoDB(const am_gatewayID_t gatewayID, am_Gateway_s & gatewayData) const
+{
+ assert(gatewayID!=0);
+ if (!existGateway(gatewayID))
+ {
+ return E_NON_EXISTENT;
+ }
+ sqlite3_stmt* query=NULL, *qSinkConnectionFormat=NULL, *qSourceConnectionFormat=NULL;
+ int eCode=0;
+ am_ConnectionFormat_e tempConnectionFormat;
+ std::string command= "SELECT name, sinkID, sourceID, domainSinkID, domainSourceID, controlDomainID, gatewayID FROM " + std::string(GATEWAY_TABLE) + " WHERE gatewayID="+int2string(gatewayID);
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+
+ while((eCode=sqlite3_step(query))==SQLITE_ROW)
+ {
+ gatewayData.name=std::string((const char*)sqlite3_column_text(query,0));
+ gatewayData.sinkID=sqlite3_column_int(query,1);
+ gatewayData.sourceID=sqlite3_column_int(query,2);
+ gatewayData.domainSinkID=sqlite3_column_int(query,3);
+ gatewayData.domainSourceID=sqlite3_column_int(query,4);
+ gatewayData.controlDomainID=sqlite3_column_int(query,5);
+ gatewayData.gatewayID=sqlite3_column_int(query,6);
+
+ //convertionMatrix:
+ ListConnectionFormat::const_iterator iter=mListConnectionFormat.begin();
+ iter=mListConnectionFormat.find(gatewayData.gatewayID);
+ if (iter == mListConnectionFormat.end())
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getGatewayInfoDB database error with convertionFormat"));
+ return E_DATABASE_ERROR;
+ }
+ gatewayData.convertionMatrix=iter->second;
+
+ //read out the connectionFormats
+ std::string commandConnectionFormat= "SELECT soundFormat FROM GatewaySourceFormat" + int2string(gatewayData.gatewayID);
+ sqlite3_prepare_v2(mDatabase,commandConnectionFormat.c_str(),-1,&qSourceConnectionFormat,NULL);
+ while((eCode=sqlite3_step(qSourceConnectionFormat))==SQLITE_ROW)
+ {
+ tempConnectionFormat=(am_ConnectionFormat_e)sqlite3_column_int(qSourceConnectionFormat,0);
+ gatewayData.listSourceFormats.push_back(tempConnectionFormat);
+ }
+
+ if((eCode=sqlite3_finalize(qSourceConnectionFormat))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getGatewayInfoDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ //read out sound properties
+ commandConnectionFormat= "SELECT soundFormat FROM GatewaySinkFormat" + int2string(gatewayData.gatewayID);
+ sqlite3_prepare_v2(mDatabase,commandConnectionFormat.c_str(),-1,&qSinkConnectionFormat,NULL);
+ while((eCode=sqlite3_step(qSinkConnectionFormat))==SQLITE_ROW)
+ {
+ tempConnectionFormat=(am_ConnectionFormat_e)sqlite3_column_int(qSinkConnectionFormat,0);
+ gatewayData.listSinkFormats.push_back(tempConnectionFormat);
+ }
+
+ if((eCode=sqlite3_finalize(qSinkConnectionFormat))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getGatewayInfoDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ }
+
+ if(eCode!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getGatewayInfoDB SQLITE error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getGatewayInfoDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ return E_OK;
+
+}
+
+
+
+am_Error_e DatabaseHandler::getCrossfaderInfoDB(const am_crossfaderID_t crossfaderID, am_Crossfader_s & crossfaderData) const
+{
+ //todo: implement crossfader
+ (void)crossfaderID;
+ (void)crossfaderData;
+ return E_UNKNOWN;
+}
+
+
+
+am_Error_e DatabaseHandler::getListSinksOfDomain(const am_domainID_t domainID, std::vector<am_sinkID_t> & listSinkID) const
+{
+ assert(domainID!=0);
+ listSinkID.clear();
+ if (!existDomain(domainID))
+ {
+ return E_NON_EXISTENT;
+ }
+ sqlite3_stmt* query=NULL;
+ int eCode=0;
+ am_sinkID_t temp;
+ std::string command= "SELECT sinkID FROM " + std::string(SINK_TABLE)+ " WHERE domainID=" + (int2string(domainID));
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+
+ while((eCode=sqlite3_step(query))==SQLITE_ROW)
+ {
+ temp=sqlite3_column_int(query,0);
+ listSinkID.push_back(temp);
+ }
+
+ if(eCode!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinksOfDomain SQLITE error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinksOfDomain SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ return E_OK;
+}
+
+
+
+am_Error_e DatabaseHandler::getListSourcesOfDomain(const am_domainID_t domainID, std::vector<am_sourceID_t> & listSourceID) const
+{
+ assert(domainID!=0);
+ listSourceID.clear();
+ if (!existDomain(domainID))
+ {
+ return E_NON_EXISTENT;
+ }
+ sqlite3_stmt* query=NULL;
+ int eCode=0;
+ am_sourceID_t temp;
+ std::string command= "SELECT sourceID FROM " + std::string(SOURCE_TABLE) + " WHERE domainID=" + int2string(domainID);
+
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+
+ while((eCode=sqlite3_step(query))==SQLITE_ROW)
+ {
+ temp=sqlite3_column_int(query,0);
+ listSourceID.push_back(temp);
+ }
+
+ if(eCode!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourcesOfDomain SQLITE error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourcesOfDomain SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ return E_OK;
+}
+
+
+
+am_Error_e DatabaseHandler::getListCrossfadersOfDomain(const am_domainID_t domainID, std::vector<am_crossfaderID_t> & listGatewaysID) const
+{
+ //todo: implement crossfader
+ (void)listGatewaysID;
+ (void)domainID;
+ return E_UNKNOWN;
+
+}
+
+
+
+am_Error_e DatabaseHandler::getListGatewaysOfDomain(const am_domainID_t domainID, std::vector<am_gatewayID_t> & listGatewaysID) const
+{
+ assert(domainID!=0);
+ listGatewaysID.clear();
+ if (!existDomain(domainID))
+ {
+ return E_NON_EXISTENT;
+ }
+ sqlite3_stmt* query=NULL;
+ int eCode=0;
+ am_gatewayID_t temp;
+
+ std::string command= "SELECT gatewayID FROM " + std::string(GATEWAY_TABLE) + " WHERE controlDomainID=" +int2string(domainID);
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+
+ while((eCode=sqlite3_step(query))==SQLITE_ROW)
+ {
+ temp=sqlite3_column_int(query,0);
+ listGatewaysID.push_back(temp);
+ }
+
+ if(eCode!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListGatewaysOfDomain SQLITE error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListGatewaysOfDomain SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ return E_OK;
+}
+
+
+
+am_Error_e DatabaseHandler::getListMainConnections(std::vector<am_MainConnection_s> & listMainConnections) const
+{
+ listMainConnections.clear();
+ sqlite3_stmt *query=NULL, *query1=NULL, *query2=NULL;
+ int eCode=0, eCode1=0, eCode2=0;
+ am_MainConnection_s temp;
+ am_RoutingElement_s tempRoute;
+
+ std::string command= "SELECT mainConnectionID, sourceID, sinkID, connectionState, delay FROM " + std::string(MAINCONNECTION_TABLE);
+ std::string command1= "SELECT connectionID FROM MainConnectionRoute";
+ std::string command2= "SELECT sourceID, sinkID, connectionFormat FROM " + std::string(CONNECTION_TABLE) + " WHERE connectionID=?";
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ sqlite3_prepare_v2(mDatabase,command2.c_str(),-1,&query2,NULL);
+
+ while((eCode=sqlite3_step(query))==SQLITE_ROW)
+ {
+ temp.connectionID=sqlite3_column_int(query,0);
+ temp.route.sourceID=sqlite3_column_int(query,1);
+ temp.route.sinkID=sqlite3_column_int(query,2);
+ temp.connectionState=(am_ConnectionState_e)sqlite3_column_int(query,3);
+ temp.delay=sqlite3_column_int(query,4);
+ std::string statement=command1 + int2string(temp.connectionID);
+ sqlite3_prepare_v2(mDatabase,statement.c_str(),-1,&query1,NULL);
+ while((eCode1=sqlite3_step(query1))==SQLITE_ROW) //todo: check results of eCode1, eCode2
+ {
+ int k=sqlite3_column_int(query1,0);
+ sqlite3_bind_int(query2,1,k);
+ while((eCode2=sqlite3_step(query2))==SQLITE_ROW)
+ {
+ tempRoute.sourceID=sqlite3_column_int(query2,0);
+ tempRoute.sinkID=sqlite3_column_int(query2,1);
+ tempRoute.connectionFormat=(am_ConnectionFormat_e)sqlite3_column_int(query2,2);
+ getDomainOfSource(tempRoute.sourceID,tempRoute.domainID);
+ temp.route.route.push_back(tempRoute);
+ }
+ sqlite3_reset(query2);
+ }
+ listMainConnections.push_back(temp);
+ }
+
+ if(eCode!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListMainConnections SQLITE error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListMainConnections SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ return E_OK;
+}
+
+
+
+am_Error_e DatabaseHandler::getListDomains(std::vector<am_Domain_s> & listDomains) const
+{
+ listDomains.clear();
+ sqlite3_stmt* query=NULL;
+ int eCode=0;
+ am_Domain_s temp;
+ std::string command= "SELECT domainID, name, busname, nodename, early, complete, state FROM " + std::string(DOMAIN_TABLE);
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+
+ while((eCode=sqlite3_step(query))==SQLITE_ROW)
+ {
+ temp.domainID=sqlite3_column_int(query,0);
+ temp.name=std::string((const char*)sqlite3_column_text(query,1));
+ temp.busname=std::string((const char*)sqlite3_column_text(query,2));
+ temp.nodename=std::string((const char*)sqlite3_column_text(query,3));
+ temp.early=sqlite3_column_int(query,4);
+ temp.complete=sqlite3_column_int(query,5);
+ temp.state=(am_DomainState_e)sqlite3_column_int(query,6);
+ listDomains.push_back(temp);
+ }
+
+ if(eCode!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListDomains SQLITE error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListDomains SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ return E_OK;
+}
+
+
+
+am_Error_e DatabaseHandler::getListConnections(std::vector<am_Connection_s> & listConnections) const
+{
+ listConnections.clear();
+ sqlite3_stmt* query=NULL;
+ int eCode=0;
+ am_Connection_s temp;
+ std::string command= "SELECT connectionID, sourceID, sinkID, delay, connectionFormat FROM " + std::string(CONNECTION_TABLE);
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+
+ while((eCode=sqlite3_step(query))==SQLITE_ROW)
+ {
+ temp.connectionID=sqlite3_column_int(query,0);
+ temp.sourceID=sqlite3_column_int(query,1);
+ temp.sinkID=sqlite3_column_int(query,2);
+ temp.delay=sqlite3_column_int(query,3);
+ temp.connectionFormat=(am_ConnectionFormat_e)sqlite3_column_int(query,4);
+ listConnections.push_back(temp);
+ }
+
+ if(eCode!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListConnections SQLITE error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListConnections SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ return E_OK;
+}
+
+
+
+am_Error_e DatabaseHandler::getListSinks(std::vector<am_Sink_s> & listSinks) const
+{
+ listSinks.clear();
+ sqlite3_stmt* query=NULL, *qConnectionFormat=NULL, *qSoundProperty=NULL, *qMAinSoundProperty=NULL;
+ int eCode=0;
+ am_Sink_s temp;
+ am_ConnectionFormat_e tempConnectionFormat;
+ am_SoundProperty_s tempSoundProperty;
+ am_MainSoundProperty_s tempMainSoundProperty;
+ std::string command= "SELECT name, domainID, sinkClassID, volume, visible, availability, availabilityReason, muteState, mainVolume, sinkID FROM " + std::string(SINK_TABLE);
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+
+ while((eCode=sqlite3_step(query))==SQLITE_ROW)
+ {
+ temp.name=std::string((const char*)sqlite3_column_text(query,0));
+ temp.domainID=sqlite3_column_int(query,1);
+ temp.sinkClassID=sqlite3_column_int(query,2);
+ temp.volume=sqlite3_column_int(query,3);
+ temp.visible=sqlite3_column_int(query,4);
+ temp.available.availability=(am_Availablility_e)sqlite3_column_int(query,5);
+ temp.available.availabilityReason=(am_AvailabilityReason_e)sqlite3_column_int(query,6);
+ temp.muteState=(am_MuteState_e)sqlite3_column_int(query,7);
+ temp.mainVolume=sqlite3_column_int(query,8);
+ temp.sinkID=sqlite3_column_int(query,9);
+
+ //read out the connectionFormats
+ std::string commandConnectionFormat= "SELECT soundFormat FROM SinkConnectionFormat"+ int2string(temp.sinkID);
+ sqlite3_prepare_v2(mDatabase,commandConnectionFormat.c_str(),-1,&qConnectionFormat,NULL);
+ while((eCode=sqlite3_step(qConnectionFormat))==SQLITE_ROW)
+ {
+ tempConnectionFormat=(am_ConnectionFormat_e)sqlite3_column_int(qConnectionFormat,0);
+ temp.listConnectionFormats.push_back(tempConnectionFormat);
+ }
+
+ if((eCode=sqlite3_finalize(qConnectionFormat))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinks SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ //read out sound properties
+ std::string commandSoundProperty= "SELECT soundPropertyType, value FROM SinkSoundProperty" + int2string(temp.sinkID);
+ sqlite3_prepare_v2(mDatabase,commandSoundProperty.c_str(),-1,&qSoundProperty,NULL);
+ while((eCode=sqlite3_step(qSoundProperty))==SQLITE_ROW)
+ {
+ tempSoundProperty.type=(am_SoundPropertyType_e)sqlite3_column_int(qSoundProperty,0);
+ tempSoundProperty.value=sqlite3_column_int(qSoundProperty,1);
+ temp.listSoundProperties.push_back(tempSoundProperty);
+ }
+
+ if((eCode=sqlite3_finalize(qSoundProperty))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinks SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ //read out MainSoundProperties
+ std::string commandMainSoundProperty= "SELECT soundPropertyType, value FROM SinkMainSoundProperty"+ int2string(temp.sinkID);
+ sqlite3_prepare_v2(mDatabase,commandMainSoundProperty.c_str(),-1,&qMAinSoundProperty,NULL);
+ while((eCode=sqlite3_step(qMAinSoundProperty))==SQLITE_ROW)
+ {
+ tempMainSoundProperty.type=(am_MainSoundPropertyType_e)sqlite3_column_int(qMAinSoundProperty,0);
+ tempMainSoundProperty.value=sqlite3_column_int(qMAinSoundProperty,1);
+ temp.listMainSoundProperties.push_back(tempMainSoundProperty);
+ }
+
+ if((eCode=sqlite3_finalize(qMAinSoundProperty))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinks SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+ listSinks.push_back(temp);
+ temp.listConnectionFormats.clear();
+ temp.listMainSoundProperties.clear();
+ temp.listSoundProperties.clear();
+ }
+
+ if(eCode!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinks SQLITE error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinks SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ return E_OK;
+}
+
+
+
+am_Error_e DatabaseHandler::getListSources(std::vector<am_Source_s> & listSources) const
+{
+ listSources.clear();
+ sqlite3_stmt* query=NULL, *qConnectionFormat=NULL, *qSoundProperty=NULL, *qMAinSoundProperty=NULL;
+ int eCode=0;
+ am_Source_s temp;
+ am_ConnectionFormat_e tempConnectionFormat;
+ am_SoundProperty_s tempSoundProperty;
+ am_MainSoundProperty_s tempMainSoundProperty;
+ std::string command= "SELECT name, domainID, sourceClassID, sourceState, volume, visible, availability, availabilityReason, interruptState, sourceID FROM " + std::string(SOURCE_TABLE);
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+
+ while((eCode=sqlite3_step(query))==SQLITE_ROW)
+ {
+ temp.name=std::string((const char*)sqlite3_column_text(query,0));
+ temp.domainID=sqlite3_column_int(query,1);
+ temp.sourceClassID=sqlite3_column_int(query,2);
+ temp.sourceState=(am_SourceState_e)sqlite3_column_int(query,3);
+ temp.volume=sqlite3_column_int(query,4);
+ temp.visible=sqlite3_column_int(query,5);
+ temp.available.availability=(am_Availablility_e)sqlite3_column_int(query,6);
+ temp.available.availabilityReason=(am_AvailabilityReason_e)sqlite3_column_int(query,7);
+ temp.interruptState=(am_InterruptState_e)sqlite3_column_int(query,8);
+ temp.sourceID=sqlite3_column_int(query,9);
+
+ //read out the connectionFormats
+ std::string commandConnectionFormat= "SELECT soundFormat FROM SourceConnectionFormat"+ int2string(temp.sourceID);
+ sqlite3_prepare_v2(mDatabase,commandConnectionFormat.c_str(),-1,&qConnectionFormat,NULL);
+ while((eCode=sqlite3_step(qConnectionFormat))==SQLITE_ROW)
+ {
+ tempConnectionFormat=(am_ConnectionFormat_e)sqlite3_column_int(qConnectionFormat,0);
+ temp.listConnectionFormats.push_back(tempConnectionFormat);
+ }
+
+ if((eCode=sqlite3_finalize(qConnectionFormat))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSources SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ //read out sound properties
+ std::string commandSoundProperty= "SELECT soundPropertyType, value FROM SourceSoundProperty" + int2string(temp.sourceID);
+ sqlite3_prepare_v2(mDatabase,commandSoundProperty.c_str(),-1,&qSoundProperty,NULL);
+ while((eCode=sqlite3_step(qSoundProperty))==SQLITE_ROW)
+ {
+ tempSoundProperty.type=(am_SoundPropertyType_e)sqlite3_column_int(qSoundProperty,0);
+ tempSoundProperty.value=sqlite3_column_int(qSoundProperty,1);
+ temp.listSoundProperties.push_back(tempSoundProperty);
+ }
+
+ if((eCode=sqlite3_finalize(qSoundProperty))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSources SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ //read out MainSoundProperties
+ std::string commandMainSoundProperty= "SELECT soundPropertyType, value FROM SourceMainSoundProperty"+ int2string(temp.sourceID);
+ sqlite3_prepare_v2(mDatabase,commandMainSoundProperty.c_str(),-1,&qMAinSoundProperty,NULL);
+ while((eCode=sqlite3_step(qMAinSoundProperty))==SQLITE_ROW)
+ {
+ tempMainSoundProperty.type=(am_MainSoundPropertyType_e)sqlite3_column_int(qMAinSoundProperty,0);
+ tempMainSoundProperty.value=sqlite3_column_int(qMAinSoundProperty,1);
+ temp.listMainSoundProperties.push_back(tempMainSoundProperty);
+ }
+
+ if((eCode=sqlite3_finalize(qMAinSoundProperty))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSources SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+ listSources.push_back(temp);
+ temp.listConnectionFormats.clear();
+ temp.listMainSoundProperties.clear();
+ temp.listSoundProperties.clear();
+ }
+
+ if(eCode!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSources SQLITE error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSources SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ return E_OK;
+}
+
+
+
+am_Error_e DatabaseHandler::getListSourceClasses(std::vector<am_SourceClass_s> & listSourceClasses) const
+{
+ listSourceClasses.clear();
+
+ sqlite3_stmt* query=NULL, *subQuery=NULL;
+ int eCode=0, eCode1;
+ am_SourceClass_s classTemp;
+ am_ClassProperty_s propertyTemp;
+
+ std::string command= "SELECT sourceClassID, name FROM " + std::string(SOURCE_CLASS_TABLE);
+ std::string command2;
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+
+ while((eCode=sqlite3_step(query))==SQLITE_ROW)
+ {
+ classTemp.sourceClassID=sqlite3_column_int(query,0);
+ classTemp.name=std::string((const char*)sqlite3_column_text(query,1));
+
+ //read out Properties
+ command2="SELECT classProperty, value FROM SourceClassProperties"+ int2string(classTemp.sourceClassID);
+ sqlite3_prepare_v2(mDatabase,command2.c_str(),-1,&subQuery,NULL);
+
+ while((eCode1=sqlite3_step(subQuery))==SQLITE_ROW)
+ {
+ propertyTemp.classProperty=(am_ClassProperty_e)sqlite3_column_int(subQuery,0);
+ propertyTemp.value=sqlite3_column_int(subQuery,1);
+ classTemp.listClassProperties.push_back(propertyTemp);
+ }
+
+ if(eCode1!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourceClasses SQLITE error code:"),DLT_INT(eCode1));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode1=sqlite3_finalize(subQuery))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourceClasses SQLITE Finalize error code:"),DLT_INT(eCode1));
+ return E_DATABASE_ERROR;
+ }
+ listSourceClasses.push_back(classTemp);
+ }
+
+ if(eCode!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourceClasses SQLITE error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourceClasses SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ return E_OK;
+}
+
+
+
+am_Error_e DatabaseHandler::getListCrossfaders(std::vector<am_Crossfader_s> & listCrossfaders) const
+{
+ //todo: implement crossfaders
+ (void)listCrossfaders;
+ return E_UNKNOWN;
+}
+
+
+
+am_Error_e DatabaseHandler::getListGateways(std::vector<am_Gateway_s> & listGateways) const
+{
+ listGateways.clear();
+ sqlite3_stmt* query=NULL, *qSinkConnectionFormat=NULL, *qSourceConnectionFormat=NULL;
+ int eCode=0;
+ am_Gateway_s temp;
+ am_ConnectionFormat_e tempConnectionFormat;
+
+ std::string command= "SELECT name, sinkID, sourceID, domainSinkID, domainSourceID, controlDomainID, gatewayID FROM " + std::string(GATEWAY_TABLE);
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+
+ while((eCode=sqlite3_step(query))==SQLITE_ROW)
+ {
+ temp.name=std::string((const char*)sqlite3_column_text(query,0));
+ temp.sinkID=sqlite3_column_int(query,1);
+ temp.sourceID=sqlite3_column_int(query,2);
+ temp.domainSinkID=sqlite3_column_int(query,3);
+ temp.domainSourceID=sqlite3_column_int(query,4);
+ temp.controlDomainID=sqlite3_column_int(query,5);
+ temp.gatewayID=sqlite3_column_int(query,6);
+
+ //convertionMatrix:
+ ListConnectionFormat::const_iterator iter=mListConnectionFormat.begin();
+ iter=mListConnectionFormat.find(temp.gatewayID);
+ if (iter == mListConnectionFormat.end())
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListGateways database error with convertionFormat"));
+ return E_DATABASE_ERROR;
+ }
+ temp.convertionMatrix=iter->second;
+
+ //read out the connectionFormats
+ std::string commandConnectionFormat= "SELECT soundFormat FROM GatewaySourceFormat" + int2string(temp.gatewayID);
+ sqlite3_prepare_v2(mDatabase,commandConnectionFormat.c_str(),-1,&qSourceConnectionFormat,NULL);
+ while((eCode=sqlite3_step(qSourceConnectionFormat))==SQLITE_ROW)
+ {
+ tempConnectionFormat=(am_ConnectionFormat_e)sqlite3_column_int(qSourceConnectionFormat,0);
+ temp.listSourceFormats.push_back(tempConnectionFormat);
+ }
+
+ if((eCode=sqlite3_finalize(qSourceConnectionFormat))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListGateways SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ //read out sound properties
+ commandConnectionFormat= "SELECT soundFormat FROM GatewaySinkFormat" + int2string(temp.gatewayID);
+ sqlite3_prepare_v2(mDatabase,commandConnectionFormat.c_str(),-1,&qSinkConnectionFormat,NULL);
+ while((eCode=sqlite3_step(qSinkConnectionFormat))==SQLITE_ROW)
+ {
+ tempConnectionFormat=(am_ConnectionFormat_e)sqlite3_column_int(qSinkConnectionFormat,0);
+ temp.listSinkFormats.push_back(tempConnectionFormat);
+ }
+
+ if((eCode=sqlite3_finalize(qSinkConnectionFormat))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListGateways SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ listGateways.push_back(temp);
+ temp.listSinkFormats.clear();
+ temp.listSourceFormats.clear();
+ }
+
+ if(eCode!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListGateways SQLITE error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListGateways SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ return E_OK;
+}
+
+
+
+am_Error_e DatabaseHandler::getListSinkClasses(std::vector<am_SinkClass_s> & listSinkClasses) const
+{
+ listSinkClasses.clear();
+
+ sqlite3_stmt* query=NULL, *subQuery=NULL;
+ int eCode=0;
+ am_SinkClass_s classTemp;
+ am_ClassProperty_s propertyTemp;
+
+ std::string command= "SELECT sinkClassID, name FROM " + std::string(SINK_CLASS_TABLE);
+ std::string command2;
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+
+ while((eCode=sqlite3_step(query))==SQLITE_ROW)
+ {
+ classTemp.sinkClassID=sqlite3_column_int(query,0);
+ classTemp.name=std::string((const char*)sqlite3_column_text(query,1));
+
+ //read out Properties
+ command2="SELECT classProperty, value FROM SinkClassProperties"+ int2string(classTemp.sinkClassID);
+ sqlite3_prepare_v2(mDatabase,command2.c_str(),-1,&subQuery,NULL);
+
+ while((eCode=sqlite3_step(subQuery))==SQLITE_ROW)
+ {
+ propertyTemp.classProperty=(am_ClassProperty_e)sqlite3_column_int(subQuery,0);
+ propertyTemp.value=sqlite3_column_int(subQuery,1);
+ classTemp.listClassProperties.push_back(propertyTemp);
+ }
+
+ if(eCode!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourceClasses SQLITE error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode=sqlite3_finalize(subQuery))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourceClasses SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+ listSinkClasses.push_back(classTemp);
+ }
+
+ if(eCode!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourceClasses SQLITE error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourceClasses SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ return E_OK;
+}
+
+
+
+am_Error_e DatabaseHandler::getListVisibleMainConnections(std::vector<am_MainConnectionType_s> & listConnections) const
+{
+ listConnections.clear();
+ sqlite3_stmt *query=NULL;
+ int eCode=0;
+ am_MainConnectionType_s temp;
+
+ std::string command= "SELECT mainConnectionID, sourceID, sinkID, connectionState, delay FROM " + std::string(MAINCONNECTION_TABLE);
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+
+ while((eCode=sqlite3_step(query))==SQLITE_ROW)
+ {
+ temp.mainConnectionID=sqlite3_column_int(query,0);
+ temp.sourceID=sqlite3_column_int(query,1);
+ temp.sinkID=sqlite3_column_int(query,2);
+ temp.connectionState=(am_ConnectionState_e)sqlite3_column_int(query,3);
+ temp.delay=sqlite3_column_int(query,4);
+ listConnections.push_back(temp);
+ }
+
+ if(eCode!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListVisibleMainConnections SQLITE error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListVisibleMainConnections SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ return E_OK;
+}
+
+
+
+am_Error_e DatabaseHandler::getListMainSinks(std::vector<am_SinkType_s> & listMainSinks) const
+{
+ listMainSinks.clear();
+ sqlite3_stmt* query=NULL;
+ int eCode=0;
+ am_SinkType_s temp;
+
+ std::string command= "SELECT name, sinkID, availability, availabilityReason, muteState, mainVolume, sinkClassID FROM " + std::string(SINK_TABLE) + " WHERE visible=1";
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+
+ while((eCode=sqlite3_step(query))==SQLITE_ROW)
+ {
+ temp.name=std::string((const char*)sqlite3_column_text(query,0));
+ temp.sinkID=sqlite3_column_int(query,1);
+ temp.availability.availability=(am_Availablility_e)sqlite3_column_int(query,2);
+ temp.availability.availabilityReason=(am_AvailabilityReason_e)sqlite3_column_int(query,3);
+ temp.muteState=(am_MuteState_e)sqlite3_column_int(query,4);
+ temp.volume=sqlite3_column_int(query,5);
+ temp.sinkClassID=sqlite3_column_int(query,6);
+ listMainSinks.push_back(temp);
+ }
+
+ if(eCode!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinks SQLITE error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinks SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ return E_OK;
+}
+
+
+
+am_Error_e DatabaseHandler::getListMainSources(std::vector<am_SourceType_s> & listMainSources) const
+{
+ listMainSources.clear();
+ sqlite3_stmt* query=NULL;
+ int eCode=0;
+ am_SourceType_s temp;
+ std::string command= "SELECT name, sourceClassID, availability, availabilityReason, sourceID FROM " + std::string(SOURCE_TABLE) + " WHERE visible=1";
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+
+ while((eCode=sqlite3_step(query))==SQLITE_ROW)
+ {
+ temp.name=std::string((const char*)sqlite3_column_text(query,0));
+ temp.sourceClassID=sqlite3_column_int(query,1);
+ temp.availability.availability=(am_Availablility_e)sqlite3_column_int(query,2);
+ temp.availability.availabilityReason=(am_AvailabilityReason_e)sqlite3_column_int(query,3);
+ temp.sourceID=sqlite3_column_int(query,4);
+
+ listMainSources.push_back(temp);
+ }
+
+ if(eCode!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSources SQLITE error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSources SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ return E_OK;
+}
+
+
+
+am_Error_e DatabaseHandler::getListMainSinkSoundProperties(const am_sinkID_t sinkID, std::vector<am_MainSoundProperty_s> & listSoundProperties) const
+{
+ assert(sinkID!=0);
+ if (!existSink(sinkID)) return E_DATABASE_ERROR; // todo: here we could change to non existen, but not shown in sequences
+ listSoundProperties.clear();
+
+ sqlite3_stmt* query=NULL;
+ int eCode=0;
+ am_MainSoundProperty_s temp;
+ std::string command= "SELECT soundPropertyType, value FROM SinkMainSoundProperty" + int2string(sinkID);
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+
+ while((eCode=sqlite3_step(query))==SQLITE_ROW)
+ {
+ temp.type=(am_MainSoundPropertyType_e)sqlite3_column_int(query,0);
+ temp.value=sqlite3_column_int(query,1);
+ listSoundProperties.push_back(temp);
+ }
+
+ if(eCode!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListMainSinkSoundProperties SQLITE error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListMainSinkSoundProperties SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ return E_OK;
+}
+
+
+
+am_Error_e DatabaseHandler::getListMainSourceSoundProperties(const am_sourceID_t sourceID, std::vector<am_MainSoundProperty_s> & listSourceProperties) const
+{
+ assert(sourceID!=0);
+ if (!existSource(sourceID)) return E_DATABASE_ERROR; // todo: here we could change to non existen, but not shown in sequences
+ listSourceProperties.clear();
+
+ sqlite3_stmt* query=NULL;
+ int eCode=0;
+ am_MainSoundProperty_s temp;
+ std::string command= "SELECT soundPropertyType, value FROM SourceMainSoundProperty" + int2string(sourceID);
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+
+ while((eCode=sqlite3_step(query))==SQLITE_ROW)
+ {
+ temp.type=(am_MainSoundPropertyType_e)sqlite3_column_int(query,0);
+ temp.value=sqlite3_column_int(query,1);
+ listSourceProperties.push_back(temp);
+ }
+
+ if(eCode!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListMainSinkSoundProperties SQLITE error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListMainSinkSoundProperties SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ return E_OK;
+}
+
+
+
+am_Error_e DatabaseHandler::getListSystemProperties(std::vector<am_SystemProperty_s> & listSystemProperties) const
+{
+ listSystemProperties.clear();
+
+ sqlite3_stmt* query=NULL;
+ int eCode=0;
+ am_SystemProperty_s temp;
+ std::string command= "SELECT type, value FROM " + std::string(SYSTEM_TABLE);
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+
+ while((eCode=sqlite3_step(query))==SQLITE_ROW)
+ {
+ temp.type=(am_SystemPropertyType_e)sqlite3_column_int(query,0);
+ temp.value=sqlite3_column_int(query,1);
+ listSystemProperties.push_back(temp);
+ }
+
+ if(eCode!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSystemProperties SQLITE error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSystemProperties SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ return E_OK;
+}
+
+
+
+am_Error_e DatabaseHandler::getTimingInformation(const am_mainConnectionID_t mainConnectionID, am_timeSync_t & delay) const
+{
+ assert(mainConnectionID!=0);
+ delay=-1;
+ sqlite3_stmt *query=NULL;
+ int eCode=0;
+
+ std::string command= "SELECT delay FROM " + std::string(MAINCONNECTION_TABLE) + " WHERE mainConnectionID=" + int2string(mainConnectionID);
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+
+ while((eCode=sqlite3_step(query))==SQLITE_ROW)
+ {
+ delay=sqlite3_column_int(query,0);
+ }
+
+ if(eCode!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getTimingInformation SQLITE error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getTimingInformation SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if (delay==-1) return E_NOT_POSSIBLE;
+
+ return E_OK;
+}
+
+bool DatabaseHandler::sqQuery(const std::string& query)
+{
+ sqlite3_stmt* statement;
+ int eCode=0;
+ if ((eCode=sqlite3_exec(mDatabase,query.c_str(),NULL,&statement,NULL))!= SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::sqQuery SQL Query failed:"), DLT_STRING(query.c_str()), DLT_STRING("error code:"),DLT_INT(eCode));
+ return false;
+ }
+ return true;
+}
+
+bool DatabaseHandler::openDatabase()
+{
+ if (sqlite3_open_v2(mPath.c_str(),&mDatabase,SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_FULLMUTEX, NULL) == SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::openDatabase opened database"));
+ return true;
+ }
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::openDatabase failed to open database"));
+ return false;
+}
+
+am_Error_e DatabaseHandler::changeDelayMainConnection(const am_timeSync_t & delay, const am_mainConnectionID_t & connectionID)
+{
+ assert(connectionID!=0);
+
+ sqlite3_stmt* query=NULL;
+ int eCode=0;
+ std::string command="UPDATE " + std::string(MAINCONNECTION_TABLE) + " SET delay=? WHERE mainConnectionID=?;";
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ sqlite3_bind_int(query,1, delay);
+ sqlite3_bind_int(query,2, connectionID);
+
+ if((eCode=sqlite3_step(query))!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeDelayMainConnection SQLITE Step error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeDelayMainConnection SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+ return E_OK;
+}
+
+am_Error_e DatabaseHandler::enterConnectionDB(const am_Connection_s& connection, am_connectionID_t& connectionID)
+{
+ assert(connection.connectionID==0);
+ assert(connection.sinkID!=0);
+ assert(connection.sourceID!=0);
+ //connection format is not checked, because it's project specific
+
+ sqlite3_stmt* query=NULL;
+ int eCode=0;
+ std::string command= "INSERT INTO " + std::string(CONNECTION_TABLE) + "(sinkID, sourceID, delay, connectionFormat) VALUES (?,?,?,?)";
+
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ sqlite3_bind_int(query,1, connection.sinkID);
+ sqlite3_bind_int(query,2, connection.sourceID);
+ sqlite3_bind_int(query,3, connection.delay);
+ sqlite3_bind_int(query,4, connection.connectionFormat);
+
+ if((eCode=sqlite3_step(query))!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterConnectionDB SQLITE Step error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterConnectionDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ connectionID=sqlite3_last_insert_rowid(mDatabase);
+
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterConnectionDB entered new connection sourceID:"), DLT_INT16(connection.sourceID),
+ DLT_STRING("sinkID:"),DLT_INT16(connection.sinkID),
+ DLT_STRING("sourceID:"),DLT_INT16(connection.sourceID),
+ DLT_STRING("delay:"), DLT_INT16(connection.delay),
+ DLT_STRING("connectionFormat:"),DLT_INT16(connection.connectionFormat),
+ DLT_STRING("assigned ID:"),DLT_INT16(connectionID));
+ return E_OK;
+}
+
+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;
+ int eCode=0;
+ std::string command;
+
+ //if sinkID is zero and the first Static Sink was already entered, the ID is created
+ if (sinkClass.sinkClassID==0 && !mFirstStaticSinkClass)
+ {
+ command= "INSERT INTO " + std::string(SINK_CLASS_TABLE) + "(name) VALUES (?)";
+ }
+ else
+ {
+ //check if the ID already exists
+ if(existSinkClass(sinkClass.sinkClassID)) return E_ALREADY_EXISTS;
+ command= "INSERT INTO " + std::string(SINK_CLASS_TABLE) + "(name, sinkClassID) VALUES (?,?)";
+ }
+
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ sqlite3_bind_text(query,1, sinkClass.name.c_str(),sinkClass.name.size(),SQLITE_STATIC);
+
+ //if the ID is not created, we add it to the query
+ if(sinkClass.sinkClassID!=0)
+ {
+ sqlite3_bind_int(query,2, sinkClass.sinkClassID);
+ }
+
+ //if the first static sink is entered, we need to set it onto the boundary
+ else if(mFirstStaticSinkClass)
+ {
+ sqlite3_bind_int(query,2, DYNAMIC_ID_BOUNDARY);
+ mFirstStaticSinkClass=false;
+ }
+
+ if((eCode=sqlite3_step(query))!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkClassDB SQLITE Step error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkClassDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ sinkClassID=sqlite3_last_insert_rowid(mDatabase); //todo:change last_insert implementations for mulithread usage...
+
+ //now we need to create the additional tables:
+ command="CREATE TABLE SinkClassProperties" + int2string(sinkClassID) + std::string("(classProperty INTEGER, value INTEGER)");
+ assert(this->sqQuery(command));
+
+ //fill ConnectionFormats
+ command="INSERT INTO SinkClassProperties" + int2string(sinkClassID) + std::string("(classProperty,value) VALUES (?,?)");
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ std::vector<am_ClassProperty_s>::const_iterator Iterator=sinkClass.listClassProperties.begin();
+ for(;Iterator<sinkClass.listClassProperties.end();++Iterator)
+ {
+ sqlite3_bind_int(query,1, Iterator->classProperty);
+ sqlite3_bind_int(query,2, Iterator->value);
+ if((eCode=sqlite3_step(query))!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkClassDB SQLITE Step error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+ sqlite3_reset(query);
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkClassDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterSinkClassDB entered new sinkClass"));
+ return E_OK;
+}
+
+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;
+ int eCode=0;
+ std::string command;
+
+ //if sinkID is zero and the first Static Sink was already entered, the ID is created
+ if (sourceClass.sourceClassID==0 && !mFirstStaticSourceClass)
+ {
+ command= "INSERT INTO " + std::string(SOURCE_CLASS_TABLE) + "(name) VALUES (?)";
+ }
+ else
+ {
+ //check if the ID already exists
+ if(existSourceClass(sourceClass.sourceClassID)) return E_ALREADY_EXISTS;
+ command= "INSERT INTO " + std::string(SOURCE_CLASS_TABLE) + "(name, sourceClassID) VALUES (?,?)";
+ }
+
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ sqlite3_bind_text(query,1, sourceClass.name.c_str(),sourceClass.name.size(),SQLITE_STATIC);
+
+ //if the ID is not created, we add it to the query
+ if(sourceClass.sourceClassID!=0)
+ {
+ sqlite3_bind_int(query,2, sourceClass.sourceClassID);
+ }
+
+ //if the first static sink is entered, we need to set it onto the boundary
+ else if(mFirstStaticSourceClass)
+ {
+ sqlite3_bind_int(query,2, DYNAMIC_ID_BOUNDARY);
+ mFirstStaticSourceClass=false;
+ }
+
+ if((eCode=sqlite3_step(query))!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceClassDB SQLITE Step error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceClassDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ sourceClassID=sqlite3_last_insert_rowid(mDatabase); //todo:change last_insert implementations for mulithread usage...
+
+ //now we need to create the additional tables:
+ command="CREATE TABLE SourceClassProperties" + int2string(sourceClassID) + std::string("(classProperty INTEGER, value INTEGER)");
+ assert(sqQuery(command));
+
+ //fill ConnectionFormats
+ command="INSERT INTO SourceClassProperties" + int2string(sourceClassID) + std::string("(classProperty,value) VALUES (?,?)");
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ std::vector<am_ClassProperty_s>::const_iterator Iterator=sourceClass.listClassProperties.begin();
+ for(;Iterator<sourceClass.listClassProperties.end();++Iterator)
+ {
+ sqlite3_bind_int(query,1, Iterator->classProperty);
+ sqlite3_bind_int(query,2, Iterator->value);
+ if((eCode=sqlite3_step(query))!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceClassDB SQLITE Step error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+ sqlite3_reset(query);
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceClassDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterSourceClassDB entered new sourceClass"));
+ return E_OK;
+}
+
+am_Error_e DatabaseHandler::enterSystemProperties(const std::vector<am_SystemProperty_s> & listSystemProperties)
+{
+ sqlite3_stmt* query=NULL;
+ int eCode=0;
+ std::vector<am_SystemProperty_s>::const_iterator listIterator =listSystemProperties.begin();
+ std::string command= "DELETE * FROM " + std::string(SYSTEM_TABLE);
+ sqQuery(command);
+
+ command="INSERT INTO " + std::string(SYSTEM_TABLE) + " (type, value) VALUES (?,?)";
+
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ for(;listIterator<listSystemProperties.end();++listIterator)
+ {
+ sqlite3_bind_int(query,1, listIterator->type);
+ sqlite3_bind_int(query,2, listIterator->value);
+
+ if((eCode=sqlite3_step(query))!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSystemProperties SQLITE Step error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ sqlite3_reset(query);
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSystemProperties SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterSystemProperties entered system properties"));
+ return E_OK;
+}
+
+bool DatabaseHandler::existMainConnection(const am_mainConnectionID_t mainConnectionID) const
+{
+ sqlite3_stmt* query=NULL;
+ std::string command = "SELECT mainConnectionID FROM " + std::string(MAINCONNECTION_TABLE) + " WHERE mainConnectionID=" + int2string(mainConnectionID);
+ int eCode=0;
+ bool returnVal=true;
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ if ((eCode=sqlite3_step(query))==SQLITE_DONE) returnVal=false;
+ else if (eCode!=SQLITE_ROW)
+ {
+ returnVal=false;
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existMainConnection database error!:"), DLT_INT(eCode))
+ }
+ sqlite3_finalize(query);
+ return returnVal;
+}
+
+bool DatabaseHandler::existSource(const am_sourceID_t sourceID) const
+{
+ sqlite3_stmt* query=NULL;
+ std::string command = "SELECT sourceID FROM " + std::string(SOURCE_TABLE) + " WHERE sourceID=" + int2string(sourceID);
+ int eCode=0;
+ bool returnVal=true;
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ if ((eCode=sqlite3_step(query))==SQLITE_DONE) returnVal=false;
+ else if (eCode!=SQLITE_ROW)
+ {
+ returnVal=false;
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSource database error!:"), DLT_INT(eCode))
+ }
+ sqlite3_finalize(query);
+ return returnVal;
+}
+
+bool DatabaseHandler::existSink(const am_sinkID_t sinkID) const
+{
+ sqlite3_stmt* query=NULL;
+ std::string command = "SELECT sinkID FROM " + std::string(SINK_TABLE) + " WHERE sinkID=" + int2string(sinkID);
+ int eCode=0;
+ bool returnVal=true;
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ if ((eCode=sqlite3_step(query))==SQLITE_DONE) returnVal=false;
+ else if (eCode!=SQLITE_ROW)
+ {
+ returnVal=false;
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSink database error!:"), DLT_INT(eCode))
+ }
+ sqlite3_finalize(query);
+ return returnVal;
+}
+
+bool DatabaseHandler::existDomain(const am_domainID_t domainID) const
+{
+ sqlite3_stmt* query=NULL;
+ std::string command = "SELECT domainID FROM " + std::string(DOMAIN_TABLE) + " WHERE domainID=" + int2string(domainID);
+ int eCode=0;
+ bool returnVal=true;
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ if ((eCode=sqlite3_step(query))==SQLITE_DONE) returnVal=false;
+ else if (eCode!=SQLITE_ROW)
+ {
+ returnVal=false;
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existDomain database error!:"), DLT_INT(eCode))
+ }
+ sqlite3_finalize(query);
+ return returnVal;
+}
+
+bool DatabaseHandler::existGateway(const am_gatewayID_t gatewayID) const
+{
+ sqlite3_stmt* query=NULL;
+ std::string command = "SELECT gatewayID FROM " + std::string(GATEWAY_TABLE) + " WHERE gatewayID=" + int2string(gatewayID);
+ int eCode=0;
+ bool returnVal=true;
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ if ((eCode=sqlite3_step(query))==SQLITE_DONE) returnVal=false;
+ else if (eCode!=SQLITE_ROW)
+ {
+ returnVal=false;
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existGateway database error!:"), DLT_INT(eCode))
+ }
+ sqlite3_finalize(query);
+ return returnVal;
+}
+
+am_Error_e DatabaseHandler::getDomainOfSource(const am_sourceID_t sourceID, am_domainID_t & domainID) const
+{
+ assert(sourceID!=0);
+
+ sqlite3_stmt* query=NULL;
+ std::string command = "SELECT domainID FROM " + std::string(SOURCE_TABLE) + " WHERE sourceID=" + int2string(sourceID);
+ int eCode=0;
+ am_Error_e returnVal=E_DATABASE_ERROR;
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ if ((eCode=sqlite3_step(query))==SQLITE_ROW)
+ {
+ domainID=sqlite3_column_int(query,0);
+ returnVal=E_OK;
+ }
+ else
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getDomainOfSource database error!:"), DLT_INT(eCode))
+ }
+ sqlite3_finalize(query);
+ return returnVal;
+}
+
+
+bool DatabaseHandler::existSinkClass(const am_sinkClass_t sinkClassID) const
+{
+ sqlite3_stmt* query=NULL;
+ std::string command = "SELECT sinkClassID FROM " + std::string(SINK_CLASS_TABLE) + " WHERE sinkClassID=" + int2string(sinkClassID);
+ int eCode=0;
+ bool returnVal=true;
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ if ((eCode=sqlite3_step(query))==SQLITE_DONE) returnVal=false;
+ else if (eCode!=SQLITE_ROW)
+ {
+ returnVal=false;
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSinkClass database error!:"), DLT_INT(eCode))
+ }
+ sqlite3_finalize(query);
+ return returnVal;
+}
+
+bool DatabaseHandler::existSourceClass(const am_sourceClass_t sourceClassID) const
+{
+ sqlite3_stmt* query=NULL;
+ std::string command = "SELECT sourceClassID FROM " + std::string(SOURCE_CLASS_TABLE) + " WHERE sourceClassID=" + int2string(sourceClassID);
+ int eCode=0;
+ bool returnVal=true;
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ if ((eCode=sqlite3_step(query))==SQLITE_DONE) returnVal=false;
+ else if (eCode!=SQLITE_ROW)
+ {
+ returnVal=false;
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSinkClass database error!:"), DLT_INT(eCode))
+ }
+ sqlite3_finalize(query);
+ return returnVal;
+}
+
+am_Error_e DatabaseHandler::changeConnectionTimingInformation(const am_connectionID_t connectionID, const am_timeSync_t delay)
+{
+ assert(connectionID!=0);
+
+ sqlite3_stmt* query=NULL;
+ int eCode=0;
+ std::string command= "UPDATE " + std::string(CONNECTION_TABLE) + " set delay=? WHERE connectionID=?";
+
+ sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&query,NULL);
+ sqlite3_bind_int(query,1, delay);
+ sqlite3_bind_int(query,2, connectionID);
+
+ if((eCode=sqlite3_step(query))!=SQLITE_DONE)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterConnectionDB SQLITE Step error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterConnectionDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ return E_DATABASE_ERROR;
+ }
+
+ //todo: add DLT Info Message here
+ return E_OK;
+}
+
+void DatabaseHandler::createTables()
+{
+ for(uint16_t i=0;i<sizeof(databaseTables)/sizeof(databaseTables[0]);i++)
+ {
+ assert(sqQuery("CREATE TABLE " + databaseTables[i]));
+ }
+}
+
+
+
+
+
+
--- /dev/null
+/*
+ * RoutingReceiver.cpp
+ *
+ * Created on: Oct 24, 2011
+ * Author: christian
+ */
+
+#include "RoutingReceiver.h"
+
+
+
+RoutingReceiver::RoutingReceiver()
+{
+}
+
+
+
+RoutingReceiver::~RoutingReceiver()
+{
+}
+
+
+
+void RoutingReceiver::ackConnect(const am_Handle_s handle, const am_connectionID_t connectionID, const am_Error_e error)
+{
+}
+
+
+
+void RoutingReceiver::ackDisconnect(const am_Handle_s handle, const am_connectionID_t connectionID, const am_Error_e error)
+{
+}
+
+
+
+void RoutingReceiver::ackSetSinkVolumeChange(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error)
+{
+}
+
+
+
+void RoutingReceiver::ackSetSourceVolumeChange(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error)
+{
+}
+
+
+
+void RoutingReceiver::ackSetSourceState(const am_Handle_s handle, const am_Error_e error)
+{
+}
+
+
+
+void RoutingReceiver::ackSetSinkSoundProperty(const am_Handle_s handle, const am_Error_e error)
+{
+}
+
+
+
+void RoutingReceiver::ackSetSourceSoundProperty(const am_Handle_s handle, const am_Error_e error)
+{
+}
+
+
+
+void RoutingReceiver::ackCrossFading(const am_Handle_s handle, const am_HotSink_e hotSink, const am_Error_e error)
+{
+}
+
+
+
+void RoutingReceiver::ackSourceVolumeTick(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume)
+{
+}
+
+
+
+void RoutingReceiver::ackSinkVolumeTick(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume)
+{
+}
+
+
+
+am_Error_e RoutingReceiver::peekDomain(const std::string & name, am_domainID_t & domainID)
+{
+}
+
+
+
+am_Error_e RoutingReceiver::registerDomain(const am_Domain_s & domainData, am_domainID_t & domainID)
+{
+}
+
+
+
+am_Error_e RoutingReceiver::deregisterDomain(const am_domainID_t domainID)
+{
+}
+
+
+
+am_Error_e RoutingReceiver::registerGateway(const am_Gateway_s & gatewayData, am_gatewayID_t & gatewayID)
+{
+}
+
+
+
+am_Error_e RoutingReceiver::deregisterGateway(const am_gatewayID_t gatewayID)
+{
+}
+
+
+
+am_Error_e RoutingReceiver::peekSink(const std::string& name, am_sinkID_t & sinkID)
+{
+}
+
+
+
+am_Error_e RoutingReceiver::registerSink(const am_Sink_s & sinkData, am_sinkID_t & sinkID)
+{
+}
+
+
+
+am_Error_e RoutingReceiver::deregisterSink(const am_sinkID_t sinkID)
+{
+}
+
+
+
+am_Error_e RoutingReceiver::peekSource(const std::string & name, am_sourceID_t & sourceID)
+{
+}
+
+
+
+am_Error_e RoutingReceiver::registerSource(const am_Source_s & sourceData, am_sourceID_t & sourceID)
+{
+}
+
+
+
+am_Error_e RoutingReceiver::deregisterSource(const am_sourceID_t sourceID)
+{
+}
+
+
+
+am_Error_e RoutingReceiver::registerCrossfader(const am_Crossfader_s & crossfaderData, am_crossfaderID_t & crossfaderID)
+{
+}
+
+
+
+am_Error_e RoutingReceiver::deregisterCrossfader(const am_crossfaderID_t crossfaderID)
+{
+}
+
+
+
+void RoutingReceiver::hookInterruptStatusChange(const am_sourceID_t sourceID, const am_InterruptState_e interruptState)
+{
+}
+
+
+
+void RoutingReceiver::hookDomainRegistrationComplete(const am_domainID_t domainID)
+{
+}
+
+
+
+void RoutingReceiver::hookSinkAvailablityStatusChange(const am_sinkID_t sinkID, const am_Availability_s & availability)
+{
+}
+
+
+
+void RoutingReceiver::hookSourceAvailablityStatusChange(const am_sourceID_t sourceID, const am_Availability_s & availability)
+{
+}
+
+
+
+void RoutingReceiver::hookDomainStateChange(const am_domainID_t domainID, const am_DomainState_e domainState)
+{
+}
+
+
+
+void RoutingReceiver::hookTimingInformationChanged(const am_connectionID_t connectionID, const am_timeSync_t delay)
+{
+}
+
+
+
+am_Error_e RoutingReceiver::sendChangedData(const std::vector<am_EarlyData_s> & earlyData)
+{
+}
+
+
+
+am_Error_e RoutingReceiver::getDBusConnectionWrapper(DBusWrapper *dbusConnectionWrapper) const
+{
+}
+
+
+
+am_Error_e RoutingReceiver::registerDbusNode(const std::string & nodeName)
+{
+}
+
--- /dev/null
+/*
+ * RoutingSender.cpp
+ *
+ * Created on: Oct 26, 2011
+ * Author: christian
+ */
+
+#include "RoutingSender.h"
+#include <utility>
+using namespace am;
+
+#define CALL_ALL_INTERFACES(...) \
+ std::vector<InterfaceNamePairs>::iterator iter = mListInterfaces.begin(); \
+ std::vector<InterfaceNamePairs>::iterator iterEnd = mListInterfaces.end(); \
+ for (; iter<iterEnd;++iter) \
+ { \
+ (*iter).routingInterface->__VA_ARGS__; \
+ }
+
+const char* routingPluginDirectories[] = { "/home/christian/workspace/gitserver/build/plugins/routing"};
+uint16_t routingPluginDirectoriesCount = sizeof(routingPluginDirectories) / sizeof(routingPluginDirectories[0]);
+
+RoutingSender::RoutingSender()
+{
+ std::vector<std::string> sharedLibraryNameList;
+
+ // search communicator plugins in configured directories
+ for (uint16_t dirIndex = 0; dirIndex < routingPluginDirectoriesCount; dirIndex++)
+ {
+ const char* directoryName = routingPluginDirectories[dirIndex];
+ //DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Searching for HookPlugins in"),DLT_STRING(directoryName));
+ DIR *directory = opendir(directoryName);
+
+ if (!directory)
+ {
+ //DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Error opening directory "),DLT_STRING(dirName.c_str()));
+ }
+
+ // iterate content of directory
+ struct dirent *itemInDirectory = 0;
+ while ((itemInDirectory = readdir(directory)))
+ {
+ unsigned char entryType = itemInDirectory->d_type;
+ std::string entryName = itemInDirectory->d_name;
+
+ bool regularFile = (entryType == DT_REG);
+ bool sharedLibExtension = ("so" == entryName.substr(entryName.find_last_of(".") + 1));
+
+ if (regularFile && sharedLibExtension)
+ {
+ // DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("PluginSearch adding file "),DLT_STRING(entryName.c_str()));
+ std::string name(directoryName);
+ sharedLibraryNameList.push_back(name + "/" + entryName);
+ }
+ else
+ {
+ //DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("PluginSearch ignoring file "),DLT_STRING(entryName.c_str()));
+ }
+ }
+
+ closedir(directory);
+ }
+
+ // iterate all communicator plugins and start them
+ std::vector<std::string>::iterator iter = sharedLibraryNameList.begin();
+ std::vector<std::string>::iterator iterEnd = sharedLibraryNameList.end();
+
+ for (; iter != iterEnd; ++iter)
+ {
+ //DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Loading Hook plugin"),DLT_STRING(iter->c_str()));
+
+ RoutingSendInterface* (*createFunc)();
+ createFunc = getCreateFunction<RoutingSendInterface*()>(*iter);
+
+ if (!createFunc)
+ {
+ // DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Entry point of Communicator not found"));
+ continue;
+ }
+
+ RoutingSendInterface* router = createFunc();
+
+ if (!router)
+ {
+ //DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("HookPlugin initialization failed. Entry Function not callable"));
+ continue;
+ }
+
+ InterfaceNamePairs routerInterface;
+ routerInterface.routingInterface = router;
+ router->returnBusName(routerInterface.busName);
+ mListInterfaces.push_back(routerInterface);
+ }
+}
+
+RoutingSender::~RoutingSender()
+{
+}
+
+void RoutingSender::routingInterfacesReady()
+{
+ CALL_ALL_INTERFACES(routingInterfacesReady())
+}
+
+void RoutingSender::routingInterfacesRundown()
+{
+ CALL_ALL_INTERFACES(routingInterfacesRundown())
+}
+
+void RoutingSender::startupRoutingInterface(RoutingReceiveInterface *routingreceiveinterface)
+{
+ CALL_ALL_INTERFACES(startupRoutingInterface(routingreceiveinterface))
+}
+
+am_Error_e RoutingSender::asyncAbort(const am_Handle_s handle)
+{
+ //Todo: map handle to RoutingInterface via Database.
+ return E_UNKNOWN;
+}
+
+
+
+am_Error_e RoutingSender::asyncConnect(const am_Handle_s handle, const am_connectionID_t connectionID, const am_sourceID_t sourceID, const am_sinkID_t sinkID, const am_ConnectionFormat_e connectionFormat)
+{
+ SinkInterfaceMap::iterator iter = mMapSinkInterface.begin();
+ mMapSinkInterface.find(sinkID);
+ if (iter != mMapSinkInterface.end())
+ {
+ return iter->second->asyncConnect(handle,connectionID,sourceID,sinkID,connectionFormat);
+ mMapConnectionInterface.insert(std::make_pair(connectionID,iter->second));
+ }
+
+ return E_NON_EXISTENT;
+}
+
+
+
+am_Error_e RoutingSender::asyncDisconnect(const am_Handle_s handle, const am_connectionID_t connectionID)
+{
+ ConnectionInterfaceMap::iterator iter = mMapConnectionInterface.begin();
+ mMapConnectionInterface.find(connectionID);
+ if (iter != mMapConnectionInterface.end())
+ {
+ return iter->second->asyncDisconnect(handle,connectionID);
+ mMapConnectionInterface.erase(iter);
+ }
+
+ return E_NON_EXISTENT;
+}
+
+
+
+am_Error_e RoutingSender::asyncSetSinkVolume(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume, const am_RampType_e ramp, const am_time_t time)
+{
+ SinkInterfaceMap::iterator iter = mMapSinkInterface.begin();
+ mMapSinkInterface.find(sinkID);
+ if (iter != mMapSinkInterface.end())
+ return iter->second->asyncSetSinkVolume(handle,sinkID,volume,ramp,time);
+ return E_NON_EXISTENT;
+}
+
+
+
+am_Error_e RoutingSender::asyncSetSourceVolume(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume, const am_RampType_e ramp, const am_time_t time)
+{
+ SourceInterfaceMap::iterator iter = mMapSourceInterface.begin();
+ mMapSourceInterface.find(sourceID);
+ if (iter != mMapSourceInterface.end())
+ return iter->second->asyncSetSourceVolume(handle,sourceID,volume,ramp,time);
+ return E_NON_EXISTENT;
+}
+
+
+
+am_Error_e RoutingSender::asyncSetSourceState(const am_Handle_s handle, const am_sourceID_t sourceID, const am_SourceState_e state)
+{
+ SourceInterfaceMap::iterator iter = mMapSourceInterface.begin();
+ mMapSourceInterface.find(sourceID);
+ if (iter != mMapSourceInterface.end())
+ return iter->second->asyncSetSourceState(handle,sourceID,state);
+ return E_NON_EXISTENT;
+}
+
+
+
+am_Error_e RoutingSender::asyncSetSinkSoundProperty(const am_Handle_s handle, const am_sinkID_t sinkID, const am_SoundProperty_s & soundProperty)
+{
+ SinkInterfaceMap::iterator iter = mMapSinkInterface.begin();
+ mMapSinkInterface.find(sinkID);
+ if (iter != mMapSinkInterface.end())
+ return iter->second->asyncSetSinkSoundProperty(handle,soundProperty,sinkID);
+ return E_NON_EXISTENT;
+}
+
+
+
+am_Error_e RoutingSender::asyncSetSourceSoundProperty(const am_Handle_s handle, const am_sourceID_t sourceID, const am_SoundProperty_s & soundProperty)
+{
+ SourceInterfaceMap::iterator iter = mMapSourceInterface.begin();
+ mMapSourceInterface.find(sourceID);
+ if (iter != mMapSourceInterface.end())
+ return iter->second->asyncSetSourceSoundProperty(handle,soundProperty,sourceID);
+ return E_NON_EXISTENT;
+}
+
+
+
+am_Error_e RoutingSender::asyncCrossFade(const am_Handle_s handle, const am_crossfaderID_t crossfaderID, const am_HotSink_e hotSink, const am_RampType_e rampType, const am_time_t time)
+{
+ CrossfaderInterfaceMap::iterator iter = mMapCrossfaderInterface.begin();
+ mMapCrossfaderInterface.find(crossfaderID);
+ if (iter != mMapCrossfaderInterface.end())
+ return iter->second->asyncCrossFade(handle,crossfaderID,hotSink,rampType,time);
+ return E_NON_EXISTENT;
+}
+
+
+
+am_Error_e RoutingSender::setDomainState(const am_domainID_t domainID, const am_DomainState_e domainState)
+{
+ DomainInterfaceMap::iterator iter = mMapDomainInterface.begin();
+ mMapDomainInterface.find(domainID);
+ if (iter != mMapDomainInterface.end())
+ return iter->second->setDomainState(domainID,domainState);
+ return E_NON_EXISTENT;
+}
+
+am_Error_e RoutingSender::addDomainLookup(const am_Domain_s& domainData)
+{
+ std::vector<InterfaceNamePairs>::iterator iter = mListInterfaces.begin();
+ std::vector<InterfaceNamePairs>::iterator iterEnd = mListInterfaces.end();
+ for (; iter<iterEnd;++iter)
+ {
+ if((*iter).busName.compare(domainData.busname) == 0)
+ {
+ mMapDomainInterface.insert(std::make_pair(domainData.domainID,(*iter).routingInterface));
+ return E_OK;
+ }
+ }
+
+ return E_UNKNOWN;
+}
+
+
+
+am_Error_e RoutingSender::addSourceLookup(const am_Source_s& sourceData)
+{
+ DomainInterfaceMap::iterator iter = mMapDomainInterface.begin();
+ mMapDomainInterface.find(sourceData.domainID);
+ if (iter != mMapDomainInterface.end())
+ {
+ mMapSourceInterface.insert(std::make_pair(sourceData.sourceID,iter->second));
+ return E_OK;
+ }
+
+ return E_UNKNOWN;
+}
+
+
+
+am_Error_e RoutingSender::addSinkLookup(const am_Sink_s& sinkData)
+{
+ DomainInterfaceMap::iterator iter = mMapDomainInterface.begin();
+ mMapDomainInterface.find(sinkData.domainID);
+ if (iter != mMapDomainInterface.end())
+ {
+ mMapSinkInterface.insert(std::make_pair(sinkData.sinkID,iter->second));
+ return E_OK;
+ }
+
+ return E_UNKNOWN;
+}
+
+
+
+am_Error_e RoutingSender::addCrossfaderLookup(const am_Crossfader_s& crossfaderData)
+{
+ DomainInterfaceMap::iterator iter = mMapSourceInterface.begin();
+ mMapSourceInterface.find(crossfaderData.sourceID);
+ if (iter != mMapSourceInterface.end())
+ {
+ mMapSourceInterface.insert(std::make_pair(crossfaderData.crossfaderID,iter->second));
+ return E_OK;
+ }
+
+ return E_UNKNOWN;
+}
+
+am_Error_e RoutingSender::removeDomainLookup(const am_domainID_t domainID)
+{
+ DomainInterfaceMap::iterator iter = mMapDomainInterface.begin();
+ mMapDomainInterface.find(domainID);
+ if (iter != mMapDomainInterface.end())
+ {
+ mMapDomainInterface.erase(iter);
+ return E_OK;
+ }
+
+ return E_NON_EXISTENT;
+}
+
+
+
+am_Error_e RoutingSender::removeSourceLookup(const am_sourceID_t sourceID)
+{
+ SourceInterfaceMap::iterator iter = mMapSourceInterface.begin();
+ mMapSourceInterface.find(sourceID);
+ if (iter != mMapSourceInterface.end())
+ {
+ mMapSourceInterface.erase(iter);
+ return E_OK;
+ }
+
+ return E_NON_EXISTENT;
+}
+
+
+
+am_Error_e RoutingSender::removeSinkLookup(const am_sinkID_t sinkID)
+{
+ SinkInterfaceMap::iterator iter = mMapSinkInterface.begin();
+ mMapSinkInterface.find(sinkID);
+ if (iter != mMapSinkInterface.end())
+ {
+ mMapSinkInterface.erase(iter);
+ return E_OK;
+ }
+
+ return E_NON_EXISTENT;
+}
+
+
+
+am_Error_e RoutingSender::removeCrossfaderLookup(const am_crossfaderID_t crossfaderID)
+{
+ CrossfaderInterfaceMap::iterator iter = mMapCrossfaderInterface.begin();
+ mMapCrossfaderInterface.find(crossfaderID);
+ if (iter != mMapCrossfaderInterface.end())
+ {
+ mMapCrossfaderInterface.erase(iter);
+ return E_OK;
+ }
+
+ return E_NON_EXISTENT;
+}
+
+
+
+
+
+
+
--- /dev/null
+/*
+ * main.cpp
+ *
+ * Created on: Oct 24, 2011
+ * Author: christian
+ */
+
+//todo: add debug commandline option to allow to use other than memory database
+#include "RoutingReceiver.h"
+#include "CommandReceiver.h"
+#include "ControlReceiver.h"
+#include "DatabaseHandler.h"
+#include "control/ControlSendInterface.h"
+#include "DBusWrapper.h"
+#include "ControlLoader.h"
+#include "CommandSender.h"
+#include "RoutingSender.h"
+#include <dbus/dbus.h>
+#include <dlt/dlt.h>
+
+DLT_DECLARE_CONTEXT(AudioManager);
+
+using namespace am;
+
+int main(int argc, char *argv[])
+{
+ DLT_REGISTER_APP("AudioManagerDeamon","AudioManagerDeamon");
+ DLT_REGISTER_CONTEXT(AudioManager,"Main","Main Context");
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("The AudioManager is started "));
+
+ DatabaseHandler iDatabaseHandler;
+ DBusWrapper iDBusWrapper;
+ CommandReceiver iCommandReceiver(&iDatabaseHandler,&iDBusWrapper);
+ RoutingReceiver iRoutingReceiver;
+ ControlReceiver iControlReceiver(&iDatabaseHandler);
+ RoutingSender iRoutingSender;
+ CommandSender iCommandSender;
+
+ am_Connection_s lowCon;
+ am_connectionID_t cID;
+ lowCon.connectionID=0;
+ lowCon.sinkID=2;
+ lowCon.sourceID=3;
+ lowCon.connectionFormat=CF_ANALOG;
+ lowCon.delay=-1;
+ iDatabaseHandler.enterConnectionDB(lowCon,cID);
+
+ am_RoutingElement_s re;
+ re.connectionFormat=CF_ANALOG;
+ re.domainID=1;
+ re.sinkID=2;
+ re.sourceID=3;
+
+ am_MainConnection_s con;
+ am_mainConnectionID_t mainC;
+ con.connectionID=0;
+ con.connectionState=CS_CONNECTING;
+ con.route.sinkID=2;
+ con.route.sourceID=3;
+ con.route.route.push_back(re);
+ iControlReceiver.enterMainConnectionDB(con,mainC);
+ //ControlLoader iControlLoader;
+// ControlSendInterface* iControlSender =iControlLoader.returnControl();
+
+
+ iCommandSender.startupInterface(&iCommandReceiver);
+
+ iDBusWrapper.dbusMainLoop();
+
+}
+
+
+
+
--- /dev/null
+ #
+ # Copyright (C) 2011, BMW AG
+ #
+ # AudioManagerDeamon Test
+ #
+ # @file CMakeLists.txt
+ #
+ # @date: 20.05.2011
+ # @author: Christian Müller (christian.ei.mueller@bmw.de)
+ #
+
+cmake_minimum_required(VERSION 2.6)
+
+PROJECT(AudioManagerDeamon)
+
+set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Xlinker -export-dynamic")
+set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic")
+set(CMAKE_CXX_FLAGS "-g -pipe -g -Wall -W -D_REENTRANT")
+
+##todo only when dbus needed!
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}")
+
+set(STD_INCLUDE_DIRS "/usr/include")
+set(DBUS_FOLDER ${CMAKE_SOURCE_DIR}/../../dbusInterfaces)
+set(AUDIO_INCLUDES_FOLDER ${CMAKE_SOURCE_DIR}/../../includes)
+set(DBUS_INCLUDES_FOLDER ${CMAKE_SOURCE_DIR}/../../dbusIncludes)
+set(INCLUDES_FOLDER ${CMAKE_SOURCE_DIR}/../include)
+set(EXECUTABLE_OUTPUT_PATH ../../../test/)
+
+file(MAKE_DIRECTORY ${DOC_OUTPUT_PATH})
+
+FIND_PACKAGE(PkgConfig)
+pkg_check_modules(SQLITE REQUIRED sqlite3)
+pkg_check_modules(DLT REQUIRED automotive-dlt)
+
+file(GLOB DATABASE_SRCS_CXX "../src/DatabaseHandler.cpp")
+
+INCLUDE_DIRECTORIES(
+ ${CMAKE_SOURCE_DIR}
+ ${STD_INCLUDE_DIRS}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${DLT_INCLUDE_DIRS}
+ ${DBUS_INCLUDE_DIR}
+ ${AUDIO_INCLUDES_FOLDER}
+ ${INCLUDES_FOLDER}
+ ${DBUS_ARCH_INCLUDE_DIR}
+ ${DBUS_INCLUDES_FOLDER}
+)
+
+ADD_EXECUTABLE(databasetest databasetest.cpp ${DATABASE_SRCS_CXX})
+
+TARGET_LINK_LIBRARIES(databasetest
+ ${SQLITE_LIBRARIES}
+ ${DLT_LIBRARIES}
+ ${DBUS_LIBRARY}
+ ${CMAKE_THREAD_LIBS_INIT}
+ gtest
+)
+
+
+
--- /dev/null
+/**
+* Copyright (C) 2011, BMW AG
+*
+* GeniviAudioMananger AudioManagerDaemon
+*
+* \file databasetest.cpp
+*
+* \date 20-Oct-2011 3:42:04 PM
+* \author Christian Mueller (christian.ei.mueller@bmw.de)
+*
+* \section License
+* GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
+* Copyright (C) 2011, BMW AG Christian Mueller Christian.ei.mueller@bmw.de
+*
+* This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
+* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
+* You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
+* Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
+* Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
+* As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
+* Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
+*
+* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
+*/
+
+#include "databasetest.h"
+
+int GetRandomNumber(int nLow, int nHigh)
+{
+ return (rand() % (nHigh - nLow + 1)) + nLow;
+}
+
+bool equalSoundProperty (const am_SoundProperty_s a, const am_SoundProperty_s b)
+{
+ return (a.type==b.type && a.value == b.value);
+}
+
+bool equalMainSoundProperty (const am_MainSoundProperty_s a, const am_MainSoundProperty_s b)
+{
+ return (a.type==b.type && a.value == b.value);
+}
+
+bool equalRoutingElement (const am_RoutingElement_s a,const am_RoutingElement_s b)
+{
+ return (a.connectionFormat==b.connectionFormat && a.domainID==b.domainID && a.sinkID==b.sinkID && a.sourceID==b.sourceID);
+}
+
+bool equalClassProperties (const am_ClassProperty_s a,const am_ClassProperty_s b)
+{
+ return (a.classProperty==b.classProperty && a.value==b.value);
+}
+
+void databaseTest::SetUp()
+{
+ DLT_REGISTER_APP("Dtest","AudioManagerDeamon");
+ DLT_REGISTER_CONTEXT(AudioManager,"Main","Main Context");
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Database Test started "));
+}
+
+void databaseTest::TearDown()
+{
+ DLT_UNREGISTER_CONTEXT(AudioManager);
+}
+
+bool databaseTest::compareSource(std::vector<am_Source_s>::iterator listIterator, const am_Source_s& sourceData)
+{
+ return (listIterator->available.availability == sourceData.available.availability)
+ && (listIterator->available.availabilityReason == sourceData.available.availabilityReason)
+ && (listIterator->sourceClassID == sourceData.sourceClassID)
+ && (listIterator->domainID == sourceData.domainID)
+ && (listIterator->interruptState == sourceData.interruptState)
+ && (listIterator->visible == sourceData.visible)
+ && (listIterator->name.compare(sourceData.name)==0)
+ && (listIterator->volume == sourceData.volume)
+ && std::equal(listIterator->listConnectionFormats.begin(),listIterator->listConnectionFormats.end(),sourceData.listConnectionFormats.begin())
+ && std::equal(listIterator->listMainSoundProperties.begin(),listIterator->listMainSoundProperties.end(),sourceData.listMainSoundProperties.begin(),equalMainSoundProperty)
+ && std::equal(listIterator->listSoundProperties.begin(),listIterator->listSoundProperties.end(),sourceData.listSoundProperties.begin(),equalSoundProperty);
+}
+
+bool databaseTest::compareSink(std::vector<am_Sink_s>::iterator listIterator, const am_Sink_s& sinkData)
+{
+ return (listIterator->available.availability == sinkData.available.availability)
+ && (listIterator->available.availabilityReason == sinkData.available.availabilityReason)
+ && (listIterator->sinkClassID == sinkData.sinkClassID)
+ && (listIterator->domainID == sinkData.domainID)
+ && (listIterator->mainVolume == sinkData.mainVolume)
+ && (listIterator->muteState == sinkData.muteState)
+ && (listIterator->visible == sinkData.visible)
+ && (listIterator->name.compare(sinkData.name)==0)
+ && (listIterator->volume == sinkData.volume)
+ && std::equal(listIterator->listConnectionFormats.begin(),listIterator->listConnectionFormats.end(),sinkData.listConnectionFormats.begin())
+ && std::equal(listIterator->listMainSoundProperties.begin(),listIterator->listMainSoundProperties.end(),sinkData.listMainSoundProperties.begin(),equalMainSoundProperty)
+ && std::equal(listIterator->listSoundProperties.begin(),listIterator->listSoundProperties.end(),sinkData.listSoundProperties.begin(),equalSoundProperty);
+}
+
+bool databaseTest::compareGateway(std::vector<am_Gateway_s>::iterator listIterator, const am_Gateway_s& gatewayData)
+{
+ return (listIterator->name.compare(gatewayData.name)==0)
+ && (listIterator->sinkID == gatewayData.sinkID)
+ && (listIterator->sourceID == gatewayData.sourceID)
+ && (listIterator->controlDomainID == gatewayData.controlDomainID)
+ && (listIterator->domainSinkID == gatewayData.domainSinkID)
+ && (listIterator->domainSourceID == gatewayData.domainSourceID)
+ && std::equal(listIterator->convertionMatrix.begin(),listIterator->convertionMatrix.end(),gatewayData.convertionMatrix.begin())
+ && std::equal(listIterator->listSourceFormats.begin(),listIterator->listSourceFormats.end(),gatewayData.listSourceFormats.begin())
+ && std::equal(listIterator->listSinkFormats.begin(),listIterator->listSinkFormats.end(),gatewayData.listSinkFormats.begin());
+}
+
+bool databaseTest::compareGateway1(const am_Gateway_s gateway1, const am_Gateway_s gatewayData)
+{
+ return (gateway1.name.compare(gatewayData.name)==0)
+ && (gateway1.sinkID == gatewayData.sinkID)
+ && (gateway1.sourceID == gatewayData.sourceID)
+ && (gateway1.controlDomainID == gatewayData.controlDomainID)
+ && (gateway1.domainSinkID == gatewayData.domainSinkID)
+ && (gateway1.domainSourceID == gatewayData.domainSourceID)
+ && std::equal(gateway1.convertionMatrix.begin(),gateway1.convertionMatrix.end(),gatewayData.convertionMatrix.begin())
+ && std::equal(gateway1.listSourceFormats.begin(),gateway1.listSourceFormats.end(),gatewayData.listSourceFormats.begin())
+ && std::equal(gateway1.listSinkFormats.begin(),gateway1.listSinkFormats.end(),gatewayData.listSinkFormats.begin());
+}
+
+bool databaseTest::compareSinkMainSink(std::vector<am_SinkType_s>::iterator listIterator, const std::vector<am_Sink_s>& sinkList)
+{
+ std::vector<am_Sink_s>::const_iterator sinkListIterator=sinkList.begin();
+ for(;sinkListIterator<sinkList.end();++sinkListIterator)
+ {
+ if (listIterator->sinkID==sinkListIterator->sinkID)
+ {
+ return (listIterator->name.compare(sinkListIterator->name)==0)
+ && (listIterator->availability.availability==sinkListIterator->available.availability)
+ && (listIterator->availability.availabilityReason==sinkListIterator->available.availabilityReason)
+ && (listIterator->muteState==sinkListIterator->muteState)
+ && (listIterator->volume==sinkListIterator->mainVolume)
+ && (listIterator->sinkClassID==sinkListIterator->sinkClassID);
+ }
+ }
+ return false;
+}
+
+bool databaseTest::compareSinkMainSource(std::vector<am_SourceType_s>::iterator listIterator, const std::vector<am_Source_s>& sourceList)
+{
+ std::vector<am_Source_s>::const_iterator sinkListIterator=sourceList.begin();
+ for(;sinkListIterator<sourceList.end();++sinkListIterator)
+ {
+ if (listIterator->sourceID==sinkListIterator->sourceID)
+ {
+ return (listIterator->name.compare(sinkListIterator->name)==0)
+ && (listIterator->availability.availability==sinkListIterator->available.availability)
+ && (listIterator->availability.availabilityReason==sinkListIterator->available.availabilityReason)
+ && (listIterator->sourceClassID==sinkListIterator->sourceClassID);
+ }
+ }
+ return false;
+}
+
+std::vector<am_ConnectionFormat_e> databaseTest::getStandardConnectionFormatList()
+{
+ std::vector<am_ConnectionFormat_e> list;
+ list.push_back(CF_ANALOG);
+ list.push_back(CF_STEREO);
+ return list;
+}
+
+std::string databaseTest::int2string(int i)
+{
+ std::stringstream out;
+ out << i;
+ return out.str();
+}
+
+std::vector<am_SoundProperty_s> databaseTest::getStandardSoundPropertyList()
+{
+ std::vector<am_SoundProperty_s> soundPropertyList;
+ am_SoundProperty_s soundProperty;
+ soundProperty.type=SP_BASS;
+ soundProperty.value=23;
+ soundPropertyList.push_back(soundProperty);
+ soundProperty.type=SP_MID;
+ soundProperty.value=2;
+ soundPropertyList.push_back(soundProperty);
+ return soundPropertyList;
+}
+
+std::vector<am_MainSoundProperty_s> databaseTest::getStandardMainSoundPropertyList()
+{
+ std::vector<am_MainSoundProperty_s> mainSoundPropertyList;
+ am_MainSoundProperty_s mainSoundProperty;
+ mainSoundProperty.type=MSP_NAVIGATION_OFFSET;
+ mainSoundProperty.value=23;
+ mainSoundPropertyList.push_back(mainSoundProperty);
+ mainSoundProperty.type=MSP_TEST;
+ mainSoundProperty.value=3;
+ mainSoundPropertyList.push_back(mainSoundProperty);
+ return mainSoundPropertyList;
+}
+
+void databaseTest::createSink(
+ am_Sink_s& sink,
+ am_sinkID_t sinkID=0,
+ std::string name="AnySink",
+ am_domainID_t domainID=4,
+ am_Availablility_e availability=A_AVAILABLE,
+ am_AvailabilityReason_e availabilityReason=AR_NEWMEDIA,
+ am_sinkClass_t sinkClassID=1,
+ std::vector<am_ConnectionFormat_e> connectionFormatList=getStandardConnectionFormatList(),
+ std::vector<am_SoundProperty_s> soundPropertyList=getStandardSoundPropertyList(),
+ std::vector<am_MainSoundProperty_s> mainSoundPropertyList=getStandardMainSoundPropertyList(),
+ am_mainVolume_t mainVolume=12,
+ am_MuteState_e muteState=MS_UNMUTED,
+ bool visible=true,
+ am_volume_t volume=23)
+{
+ sink.name=name;
+ sink.domainID=domainID;
+ sink.available.availability=availability;
+ sink.available.availabilityReason=availabilityReason;
+ sink.sinkClassID=sinkClassID;
+ sink.listConnectionFormats=connectionFormatList;
+ sink.listSoundProperties=soundPropertyList;
+ sink.listMainSoundProperties=mainSoundPropertyList;
+ sink.mainVolume=mainVolume;
+ sink.muteState=muteState;
+ sink.visible=visible;
+ sink.volume=volume;
+ sink.sinkID=sinkID;
+}
+
+void databaseTest::createSource(
+ am_Source_s& source,
+ am_sourceID_t sourceID=0,
+ std::string name="AnySource",
+ am_domainID_t domainID=4,
+ am_Availablility_e availability=A_AVAILABLE,
+ am_AvailabilityReason_e availabilityReason=AR_NEWMEDIA,
+ am_sourceClass_t sourceClassID=1,
+ std::vector<am_ConnectionFormat_e> connectionFormatList=getStandardConnectionFormatList(),
+ std::vector<am_SoundProperty_s> soundPropertyList=getStandardSoundPropertyList(),
+ std::vector<am_MainSoundProperty_s> mainSoundPropertyList=getStandardMainSoundPropertyList(),
+ am_InterruptState_e interruptState=IS_OFF,
+ bool visible=true,
+ am_volume_t volume=23,
+ am_SourceState_e sourceState=SS_ON)
+{
+ source.name=name;
+ source.domainID=domainID;
+ source.available.availability=availability;
+ source.available.availabilityReason=availabilityReason;
+ source.sourceClassID=sourceClassID;
+ source.listConnectionFormats=connectionFormatList;
+ source.listSoundProperties=soundPropertyList;
+ source.listMainSoundProperties=mainSoundPropertyList;
+ source.interruptState=interruptState;
+ source.visible=visible;
+ source.volume=volume;
+ source.sourceID=sourceID;
+ source.sourceState=sourceState;
+}
+
+void databaseTest::createDomain(
+ am_Domain_s & domain,
+ am_domainID_t domainID=0,
+ std::string name = "AnyDomain",
+ std::string nodename = "AnyNode",
+ std::string busname = "AnyBusname",
+ bool complete= true,
+ bool early= true,
+ am_DomainState_e state=DS_CONTROLLED)
+{
+
+ domain.domainID=domainID;
+ domain.name=name;
+ domain.nodename=nodename;
+ domain.busname=busname;
+ domain.complete=complete;
+ domain.early=early;
+ domain.state=state;
+}
+
+
+void databaseTest::createGateway(
+ am_Gateway_s & gateway,
+ am_gatewayID_t gatewayID=0,
+ std::string name="AnyGateway",
+ am_sinkID_t sinkID=1,
+ am_sourceID_t sourceID=2,
+ am_domainID_t controlDomainID=1,
+ am_domainID_t domainSinkID=3,
+ am_domainID_t domainSourceID=4,
+ std::vector<bool> convertionMatrix=getStandardConvertionMatrix(),
+ std::vector<am_ConnectionFormat_e> listSourceFormats=getStandardConnectionFormatList(),
+ std::vector<am_ConnectionFormat_e> listSinkFormats=getStandardConnectionFormatList())
+{
+ gateway.name=name;
+ gateway.sinkID= sinkID;
+ gateway.sourceID= sourceID;
+ gateway.controlDomainID= controlDomainID;
+ gateway.domainSinkID= domainSinkID;
+ gateway.domainSourceID= domainSourceID;
+ gateway.convertionMatrix= convertionMatrix;
+ gateway.listSourceFormats=listSourceFormats;
+ gateway.listSinkFormats=listSinkFormats;
+ gateway.gatewayID=gatewayID;
+
+}
+
+void databaseTest::createConnection(
+ am_Connection_s & connection,
+ am_connectionID_t connectionID=0,
+ am_sinkID_t sinkID=1,
+ am_sourceID_t sourceID=2,
+ am_timeSync_t delay=-1,
+ am_ConnectionFormat_e connectionFormat=CF_ANALOG)
+{
+ connection.connectionID=connectionID;
+ connection.sinkID=sinkID;
+ connection.sourceID=sourceID;
+ connection.delay=delay;
+ connection.connectionFormat=connectionFormat;
+}
+
+void databaseTest::createMainConnection(
+ am_MainConnection_s & mainConnection,
+ am_Route_s route,
+ am_timeSync_t delay=-1,
+ am_mainConnectionID_t connectionID=0,
+ am_ConnectionState_e state=CS_CONNECTED)
+{
+ mainConnection.connectionID=connectionID;
+ mainConnection.connectionState=state;
+ mainConnection.route=route;
+ mainConnection.delay=delay;
+}
+
+
+std::vector<bool> databaseTest::getStandardConvertionMatrix()
+{
+ std::vector<bool> convMatrix;
+ convMatrix.push_back(true);
+ convMatrix.push_back(false);
+ convMatrix.push_back(true);
+ convMatrix.push_back(false);
+ convMatrix.push_back(true);
+ convMatrix.push_back(true);
+ return convMatrix;
+}
+
+
+void databaseTest::connectionList2RoutingList(std::vector<am_RoutingElement_s> & routingList, const std::vector<am_Connection_s>& connectionList)
+{
+ am_RoutingElement_s routingElement;
+ std::vector<am_Connection_s>::const_iterator cIterator=connectionList.begin();
+ for(;cIterator<connectionList.end();++cIterator)
+ {
+ routingElement.sinkID=cIterator->sinkID;
+ routingElement.sourceID=cIterator->sourceID;
+ routingElement.connectionFormat=cIterator->connectionFormat;
+ routingElement.domainID=4; //todo: make this test read out the real value
+ routingList.push_back(routingElement);
+ }
+}
+
+void databaseTest::createMainConnectionSetup()
+{
+ //fill the connection database
+ am_Connection_s connection;
+ am_Source_s source;
+ am_Sink_s sink;
+ std::vector<am_Connection_s> connectionList;
+
+ for (uint16_t i=1;i<10;i++)
+ {
+ am_sinkID_t forgetSink;
+ am_sourceID_t forgetSource;
+ am_connectionID_t forgetConnection;
+
+ createConnection(connection,0,i,i);
+ connectionList.push_back(connection);
+
+ createSink(sink,i,"sink" + int2string(i),4);
+ createSource(source,i,"source" + int2string(i),4);
+
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSinkDB(sink,forgetSink))<< "ERROR: database error";
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSourceDB(source,forgetSource))<< "ERROR: database error";
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterConnectionDB(connection,forgetConnection))<< "ERROR: database error";
+ }
+
+ //fill the route
+ std::vector<am_RoutingElement_s> routingList;
+ connectionList2RoutingList(routingList,connectionList);
+
+ //create the Route
+ am_Route_s route;
+ route.route=routingList;
+ route.sinkID=1;
+ route.sourceID=1;
+
+ //create a mainConnection
+ am_MainConnection_s mainConnection;
+ am_mainConnectionID_t mainConnectionID;
+ std::vector<am_MainConnection_s> mainConnectionList;
+ createMainConnection(mainConnection,route);
+
+ //enter mainconnection in database
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterMainConnectionDB(mainConnection,mainConnectionID))<< "ERROR: database error";
+ ASSERT_NE(0,mainConnectionID)<< "ERROR: connectionID zero";
+
+ //read out the mainconnections and check if they are equal to the data written.
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListMainConnections(mainConnectionList));
+ bool equal=true;
+ std::vector<am_MainConnection_s>::iterator listIterator=mainConnectionList.begin();
+ for(;listIterator<mainConnectionList.end();++listIterator)
+ {
+ if(listIterator->connectionID==mainConnectionID) {
+ equal= equal && (listIterator->connectionState == mainConnection.connectionState)
+ && (listIterator->route.sinkID == mainConnection.route.sinkID)
+ && (listIterator->route.sourceID == mainConnection.route.sourceID)
+ && (listIterator->delay == mainConnection.delay)
+ && (std::equal(listIterator->route.route.begin(),listIterator->route.route.end(),routingList.begin(),equalRoutingElement));
+ }
+ }
+ ASSERT_EQ(true,equal);
+}
+
+TEST_F(databaseTest,getSinkClassOfSink)
+{
+ std::vector<am_SinkClass_s> sinkClassList;
+ std::vector<am_ClassProperty_s> classPropertyList;
+ am_SinkClass_s sinkClass, returnClass;
+ am_ClassProperty_s classProperty;
+ am_sinkClass_t sinkClassID;
+ am_Sink_s sink;
+ am_sinkID_t sinkID;
+ classProperty.classProperty=CP_SINK_TYPE;
+ classProperty.value=1;
+ classPropertyList.push_back(classProperty);
+ classProperty.classProperty=CP_SOURCE_TYPE;
+ classProperty.value=4;
+ classPropertyList.push_back(classProperty);
+ sinkClass.name="test";
+ sinkClass.sinkClassID=4;
+ sinkClass.listClassProperties=classPropertyList;
+ createSink(sink);
+ sink.sinkClassID=4;
+
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSinkDB(sink,sinkID));
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSinkClassDB(sinkClass,sinkClassID));
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListSinkClasses(sinkClassList));
+ ASSERT_EQ(sinkClassList[0].name,sinkClass.name);
+ ASSERT_EQ(sinkClassList[0].sinkClassID,4);
+ ASSERT_TRUE(std::equal(sinkClassList[0].listClassProperties.begin(),sinkClassList[0].listClassProperties.end(),classPropertyList.begin(),equalClassProperties));
+ ASSERT_EQ(E_OK,pDatabaseHandler.getSinkClassInfoDB(sinkID,returnClass));
+ ASSERT_EQ(sinkClassList[0].name,returnClass.name);
+ ASSERT_EQ(sinkClassList[0].sinkClassID,returnClass.sinkClassID);
+ ASSERT_TRUE(std::equal(sinkClassList[0].listClassProperties.begin(),sinkClassList[0].listClassProperties.end(),returnClass.listClassProperties.begin(),equalClassProperties));
+}
+
+
+TEST_F(databaseTest,getSourceClassOfSource)
+{
+ std::vector<am_SourceClass_s> sourceClassList;
+ std::vector<am_ClassProperty_s> classPropertyList;
+ am_SourceClass_s sourceClass, sinkSourceClass;
+ am_ClassProperty_s classProperty;
+ am_sourceClass_t sourceClassID;
+ am_Source_s source;
+ am_sourceID_t sourceID;
+ classProperty.classProperty=CP_SINK_TYPE;
+ classProperty.value=1;
+ classPropertyList.push_back(classProperty);
+ classProperty.classProperty=CP_SOURCE_TYPE;
+ classProperty.value=4;
+ classPropertyList.push_back(classProperty);
+ sourceClass.name="test";
+ sourceClass.sourceClassID=1;
+ sourceClass.listClassProperties=classPropertyList;
+ createSource(source);
+
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSourceDB(source,sourceID));
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSourceClassDB(sourceClassID,sourceClass));
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListSourceClasses(sourceClassList));
+ ASSERT_EQ(sourceClassList[0].name,sourceClass.name);
+ ASSERT_EQ(sourceClassList[0].sourceClassID,1);
+ ASSERT_TRUE(std::equal(sourceClassList[0].listClassProperties.begin(),sourceClassList[0].listClassProperties.end(),classPropertyList.begin(),equalClassProperties));
+ ASSERT_EQ(E_OK,pDatabaseHandler.getSourceClassInfoDB(sourceID,sinkSourceClass));
+ ASSERT_EQ(sourceClassList[0].name,sinkSourceClass.name);
+ ASSERT_EQ(sourceClassList[0].sourceClassID,sinkSourceClass.sourceClassID);
+ ASSERT_TRUE(std::equal(sourceClassList[0].listClassProperties.begin(),sourceClassList[0].listClassProperties.end(),sinkSourceClass.listClassProperties.begin(),equalClassProperties));
+}
+
+
+TEST_F(databaseTest,removeSourceClass)
+{
+ std::vector<am_SourceClass_s> sourceClassList;
+ std::vector<am_ClassProperty_s> classPropertyList;
+ am_SourceClass_s sourceClass;
+ am_ClassProperty_s classProperty;
+ am_sourceClass_t sourceClassID;
+ classProperty.classProperty=CP_SINK_TYPE;
+ classProperty.value=1;
+ classPropertyList.push_back(classProperty);
+ classProperty.classProperty=CP_SOURCE_TYPE;
+ classProperty.value=4;
+ classPropertyList.push_back(classProperty);
+ sourceClass.name="test";
+ sourceClass.sourceClassID=3;
+ sourceClass.listClassProperties=classPropertyList;
+
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSourceClassDB(sourceClassID,sourceClass));
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListSourceClasses(sourceClassList));
+ ASSERT_EQ(sourceClassList[0].name,sourceClass.name);
+ ASSERT_EQ(sourceClassList[0].sourceClassID,3);
+ ASSERT_TRUE(std::equal(sourceClassList[0].listClassProperties.begin(),sourceClassList[0].listClassProperties.end(),classPropertyList.begin(),equalClassProperties));
+ ASSERT_EQ(E_OK,pDatabaseHandler.removeSourceClassDB(3));
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListSourceClasses(sourceClassList));
+ ASSERT_TRUE(sourceClassList.empty());
+}
+
+TEST_F(databaseTest,updateSourceClass)
+{
+ std::vector<am_SourceClass_s> sourceClassList;
+ std::vector<am_ClassProperty_s> classPropertyList,changedPropertyList;
+ am_SourceClass_s sourceClass, changedClass;
+ am_ClassProperty_s classProperty;
+ am_sourceClass_t sourceClassID;
+ classProperty.classProperty=CP_SINK_TYPE;
+ classProperty.value=1;
+ classPropertyList.push_back(classProperty);
+ classProperty.classProperty=CP_SOURCE_TYPE;
+ classProperty.value=4;
+ classPropertyList.push_back(classProperty);
+ sourceClass.name="test";
+ sourceClass.sourceClassID=0;
+ sourceClass.listClassProperties=classPropertyList;
+ changedClass=sourceClass;
+ changedClass.listClassProperties[1].value=6;
+ changedPropertyList=changedClass.listClassProperties;
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSourceClassDB(sourceClassID,sourceClass));
+ changedClass.sourceClassID=sourceClassID;
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListSourceClasses(sourceClassList));
+ ASSERT_EQ(sourceClassList[0].name,sourceClass.name);
+ ASSERT_EQ(sourceClassList[0].sourceClassID,100);
+ ASSERT_TRUE(std::equal(sourceClassList[0].listClassProperties.begin(),sourceClassList[0].listClassProperties.end(),classPropertyList.begin(),equalClassProperties));
+ ASSERT_EQ(E_OK,pDatabaseHandler.changeSourceClassInfoDB(changedClass));
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListSourceClasses(sourceClassList));
+ ASSERT_EQ(sourceClassList[0].name,sourceClass.name);
+ ASSERT_EQ(sourceClassList[0].sourceClassID,100);
+ ASSERT_TRUE(std::equal(sourceClassList[0].listClassProperties.begin(),sourceClassList[0].listClassProperties.end(),changedPropertyList.begin(),equalClassProperties));
+}
+
+TEST_F(databaseTest,enterSourceClass)
+{
+ std::vector<am_SourceClass_s> sourceClassList;
+ std::vector<am_ClassProperty_s> classPropertyList;
+ am_SourceClass_s sourceClass;
+ am_ClassProperty_s classProperty;
+ am_sourceClass_t sourceClassID;
+ classProperty.classProperty=CP_SINK_TYPE;
+ classProperty.value=1;
+ classPropertyList.push_back(classProperty);
+ classProperty.classProperty=CP_SOURCE_TYPE;
+ classProperty.value=4;
+ classPropertyList.push_back(classProperty);
+ sourceClass.name="test";
+ sourceClass.sourceClassID=0;
+ sourceClass.listClassProperties=classPropertyList;
+
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSourceClassDB(sourceClassID,sourceClass));
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListSourceClasses(sourceClassList));
+ ASSERT_EQ(sourceClassList[0].name,sourceClass.name);
+ ASSERT_EQ(sourceClassList[0].sourceClassID,100);
+ ASSERT_TRUE(std::equal(sourceClassList[0].listClassProperties.begin(),sourceClassList[0].listClassProperties.end(),classPropertyList.begin(),equalClassProperties));
+}
+
+TEST_F(databaseTest,enterSourceClassStatic)
+{
+ std::vector<am_SourceClass_s> sourceClassList;
+ std::vector<am_ClassProperty_s> classPropertyList;
+ am_SourceClass_s sourceClass;
+ am_ClassProperty_s classProperty;
+ am_sourceClass_t sourceClassID;
+ classProperty.classProperty=CP_SINK_TYPE;
+ classProperty.value=1;
+ classPropertyList.push_back(classProperty);
+ classProperty.classProperty=CP_SOURCE_TYPE;
+ classProperty.value=4;
+ classPropertyList.push_back(classProperty);
+ sourceClass.name="test";
+ sourceClass.sourceClassID=3;
+ sourceClass.listClassProperties=classPropertyList;
+
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSourceClassDB(sourceClassID,sourceClass));
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListSourceClasses(sourceClassList));
+ ASSERT_EQ(sourceClassList[0].name,sourceClass.name);
+ ASSERT_EQ(sourceClassList[0].sourceClassID,3);
+ ASSERT_TRUE(std::equal(sourceClassList[0].listClassProperties.begin(),sourceClassList[0].listClassProperties.end(),classPropertyList.begin(),equalClassProperties));
+}
+
+
+TEST_F(databaseTest,removeSinkClass)
+{
+ std::vector<am_SinkClass_s> sinkClassList;
+ std::vector<am_ClassProperty_s> classPropertyList;
+ am_SinkClass_s sinkClass;
+ am_ClassProperty_s classProperty;
+ am_sinkClass_t sinkClassID;
+ classProperty.classProperty=CP_SINK_TYPE;
+ classProperty.value=1;
+ classPropertyList.push_back(classProperty);
+ classProperty.classProperty=CP_SOURCE_TYPE;
+ classProperty.value=4;
+ classPropertyList.push_back(classProperty);
+ sinkClass.name="test";
+ sinkClass.sinkClassID=0;
+ sinkClass.listClassProperties=classPropertyList;
+
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSinkClassDB(sinkClass,sinkClassID));
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListSinkClasses(sinkClassList));
+ ASSERT_EQ(sinkClassList[0].name,sinkClass.name);
+ ASSERT_EQ(sinkClassList[0].sinkClassID,100);
+ ASSERT_TRUE(std::equal(sinkClassList[0].listClassProperties.begin(),sinkClassList[0].listClassProperties.end(),classPropertyList.begin(),equalClassProperties));
+ ASSERT_EQ(E_OK,pDatabaseHandler.removeSinkClassDB(sinkClassID));
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListSinkClasses(sinkClassList));
+ ASSERT_TRUE(sinkClassList.empty());
+}
+
+TEST_F(databaseTest,updateSinkClass)
+{
+ std::vector<am_SinkClass_s> sinkClassList;
+ std::vector<am_ClassProperty_s> classPropertyList, changedPropertyList;
+ am_SinkClass_s sinkClass, changedClass;
+ am_ClassProperty_s classProperty;
+ am_sinkClass_t sinkClassID;
+ classProperty.classProperty=CP_SINK_TYPE;
+ classProperty.value=1;
+ classPropertyList.push_back(classProperty);
+ classProperty.classProperty=CP_SOURCE_TYPE;
+ classProperty.value=4;
+ classPropertyList.push_back(classProperty);
+ sinkClass.name="test";
+ sinkClass.sinkClassID=0;
+ sinkClass.listClassProperties=classPropertyList;
+ changedClass=sinkClass;
+ changedClass.listClassProperties[1].value=6;
+ changedPropertyList=changedClass.listClassProperties;
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSinkClassDB(sinkClass,sinkClassID));
+ changedClass.sinkClassID=sinkClassID;
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListSinkClasses(sinkClassList));
+ ASSERT_EQ(sinkClassList[0].name,sinkClass.name);
+ ASSERT_EQ(sinkClassList[0].sinkClassID,100);
+ ASSERT_TRUE(std::equal(sinkClassList[0].listClassProperties.begin(),sinkClassList[0].listClassProperties.end(),classPropertyList.begin(),equalClassProperties));
+ ASSERT_EQ(E_OK,pDatabaseHandler.changeSinkClassInfoDB(changedClass));
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListSinkClasses(sinkClassList));
+ ASSERT_EQ(sinkClassList[0].name,sinkClass.name);
+ ASSERT_EQ(sinkClassList[0].sinkClassID,100);
+ ASSERT_TRUE(std::equal(sinkClassList[0].listClassProperties.begin(),sinkClassList[0].listClassProperties.end(),changedPropertyList.begin(),equalClassProperties));
+}
+
+TEST_F(databaseTest,enterSinkClass)
+{
+ std::vector<am_SinkClass_s> sinkClassList;
+ std::vector<am_ClassProperty_s> classPropertyList;
+ am_SinkClass_s sinkClass;
+ am_ClassProperty_s classProperty;
+ am_sinkClass_t sinkClassID;
+ classProperty.classProperty=CP_SINK_TYPE;
+ classProperty.value=1;
+ classPropertyList.push_back(classProperty);
+ classProperty.classProperty=CP_SOURCE_TYPE;
+ classProperty.value=4;
+ classPropertyList.push_back(classProperty);
+ sinkClass.name="test";
+ sinkClass.sinkClassID=0;
+ sinkClass.listClassProperties=classPropertyList;
+
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSinkClassDB(sinkClass,sinkClassID));
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListSinkClasses(sinkClassList));
+ ASSERT_EQ(sinkClassList[0].name,sinkClass.name);
+ ASSERT_EQ(sinkClassList[0].sinkClassID,100);
+ ASSERT_TRUE(std::equal(sinkClassList[0].listClassProperties.begin(),sinkClassList[0].listClassProperties.end(),classPropertyList.begin(),equalClassProperties));
+}
+
+TEST_F(databaseTest,enterSinkClassStatic)
+{
+ std::vector<am_SinkClass_s> sinkClassList;
+ std::vector<am_ClassProperty_s> classPropertyList;
+ am_SinkClass_s sinkClass;
+ am_ClassProperty_s classProperty;
+ am_sinkClass_t sinkClassID;
+ classProperty.classProperty=CP_SINK_TYPE;
+ classProperty.value=1;
+ classPropertyList.push_back(classProperty);
+ classProperty.classProperty=CP_SOURCE_TYPE;
+ classProperty.value=4;
+ classPropertyList.push_back(classProperty);
+ sinkClass.name="test";
+ sinkClass.sinkClassID=4;
+ sinkClass.listClassProperties=classPropertyList;
+
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSinkClassDB(sinkClass,sinkClassID));
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListSinkClasses(sinkClassList));
+ ASSERT_EQ(sinkClassList[0].name,sinkClass.name);
+ ASSERT_EQ(sinkClassList[0].sinkClassID,4);
+ ASSERT_TRUE(std::equal(sinkClassList[0].listClassProperties.begin(),sinkClassList[0].listClassProperties.end(),classPropertyList.begin(),equalClassProperties));
+}
+
+
+TEST_F(databaseTest, changeSystemProperty)
+{
+ std::vector<am_SystemProperty_s> listSystemProperties,listReturn;
+ am_SystemProperty_s systemProperty;
+
+ systemProperty.type=SYP_TEST;
+ systemProperty.value=33;
+ listSystemProperties.push_back(systemProperty);
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSystemProperties(listSystemProperties));
+ systemProperty.value=444;
+ ASSERT_EQ(E_OK,pDatabaseHandler.changeSystemPropertyDB(systemProperty));
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListSystemProperties(listReturn));
+ ASSERT_EQ(listReturn[0].type,systemProperty.type);
+ ASSERT_EQ(listReturn[0].value,systemProperty.value);
+}
+
+TEST_F(databaseTest, systemProperties)
+{
+ std::vector<am_SystemProperty_s> listSystemProperties,listReturn;
+ am_SystemProperty_s systemProperty;
+
+ systemProperty.type=SYP_TEST;
+ systemProperty.value=33;
+ listSystemProperties.push_back(systemProperty);
+
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSystemProperties(listSystemProperties));
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListSystemProperties(listReturn));
+ ASSERT_EQ(listReturn[0].type,systemProperty.type);
+ ASSERT_EQ(listReturn[0].value,systemProperty.value);
+}
+
+
+TEST_F(databaseTest,enterSourcesCorrect)
+{
+ //fill the connection database
+ am_Source_s staticSource,firstDynamicSource,secondDynamicSource;
+ am_sourceID_t staticSourceID,firstDynamicSourceID,secondDynamicSourceID;
+ std::vector<am_Source_s> sourceList;
+
+ createSource(staticSource,4,"Static");
+
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSourceDB(staticSource,staticSourceID))<< "ERROR: database error";
+ ASSERT_EQ(staticSource.sourceID,staticSourceID)<< "ERROR: ID not the one given in staticSource";
+
+ createSource(firstDynamicSource,0,"firstDynamicSource");
+
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSourceDB(firstDynamicSource,firstDynamicSourceID))<< "ERROR: database error";
+ ASSERT_EQ(firstDynamicSourceID,DYNAMIC_ID_BOUNDARY)<< "ERROR: ID not the one given in firstDynamicSink";
+
+ createSource(secondDynamicSource,0,"secondDynamicSource");
+
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSourceDB(secondDynamicSource,secondDynamicSourceID))<< "ERROR: database error";
+ ASSERT_NEAR(secondDynamicSourceID,DYNAMIC_ID_BOUNDARY,10)<< "ERROR: ID not the one given in secondDynamicSink";
+
+ //now read back and check the returns agains the given values
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListSources(sourceList))<< "ERROR: database error";
+ bool equal=true;
+
+ std::vector<am_Source_s>::iterator listIterator=sourceList.begin();
+ for(;listIterator<sourceList.end();++listIterator)
+ {
+ if(listIterator->sourceID==staticSourceID)
+ {
+ equal = equal && compareSource(listIterator,staticSource);
+ }
+
+ if(listIterator->sourceID==firstDynamicSourceID)
+ {
+ equal = equal && compareSource(listIterator,firstDynamicSource);
+ }
+
+ if(listIterator->sourceID==secondDynamicSourceID)
+ {
+ equal = equal && compareSource(listIterator,secondDynamicSource);
+ }
+
+ }
+ ASSERT_EQ(true,equal);
+}
+
+
+TEST_F(databaseTest, changeSourceMainSoundProperty)
+{
+ std::vector<am_Source_s> listSources;
+ am_Source_s source;
+ am_sourceID_t sourceID;
+ createSource(source);
+ am_MainSoundProperty_s property;
+ property.type=MSP_NAVIGATION_OFFSET;
+ property.value=33;
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSourceDB(source,sourceID));
+ ASSERT_EQ(E_OK,pDatabaseHandler.changeMainSourceSoundPropertyDB(property,sourceID));
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListSources(listSources));
+ std::vector<am_MainSoundProperty_s>::iterator listIterator=listSources[0].listMainSoundProperties.begin();
+ for(;listIterator<listSources[0].listMainSoundProperties.end();++listIterator)
+ {
+ if(listIterator->type==property.type)
+ {
+ ASSERT_EQ(listIterator->value,property.value);
+ }
+ }
+}
+
+TEST_F(databaseTest, changeSinkMuteState)
+{
+ std::vector<am_Sink_s> listSinks;
+ am_Sink_s sink;
+ am_sinkID_t sinkID;
+ createSink(sink);
+ am_MuteState_e muteState=MS_MUTED;
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSinkDB(sink,sinkID));
+ ASSERT_EQ(E_OK,pDatabaseHandler.changeSinkMuteStateDB(muteState,sinkID));
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListSinks(listSinks));
+ ASSERT_EQ(muteState,listSinks[0].muteState);
+}
+
+TEST_F(databaseTest, changeSinkMainSoundProperty)
+{
+ std::vector<am_Sink_s> listSinks;
+ am_Sink_s sink;
+ am_sinkID_t sinkID;
+ createSink(sink);
+ am_MainSoundProperty_s property;
+ property.type=MSP_NAVIGATION_OFFSET;
+ property.value=33;
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSinkDB(sink,sinkID));
+ ASSERT_EQ(E_OK,pDatabaseHandler.changeMainSinkSoundPropertyDB(property,sinkID));
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListSinks(listSinks));
+ std::vector<am_MainSoundProperty_s>::iterator listIterator=listSinks[0].listMainSoundProperties.begin();
+ for(;listIterator<listSinks[0].listMainSoundProperties.end();++listIterator)
+ {
+ if(listIterator->type==property.type)
+ {
+ ASSERT_EQ(listIterator->value,property.value);
+ }
+ }
+}
+
+TEST_F(databaseTest, changeDomainState)
+{
+ std::vector<am_Domain_s> listDomains;
+ am_Domain_s domain;
+ am_domainID_t domainID;
+ createDomain(domain);
+ am_DomainState_e newState=DS_INDEPENDENT_STARTUP;
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterDomainDB(domain,domainID));
+ ASSERT_EQ(E_OK,pDatabaseHandler.changDomainStateDB(newState,domainID));
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListDomains(listDomains));
+ ASSERT_EQ(newState,listDomains[0].state);
+}
+
+
+TEST_F(databaseTest, changeMainConnectionState)
+{
+ std::vector<am_MainConnection_s> listMainConnections;
+ createMainConnectionSetup();
+ ASSERT_EQ(E_OK,pDatabaseHandler.changeMainConnectionStateDB(1,CS_DISCONNECTING))<< "ERROR: database error";
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListMainConnections(listMainConnections));
+ ASSERT_EQ(CS_DISCONNECTING,listMainConnections[0].connectionState);
+}
+
+TEST_F(databaseTest, changeSinkAvailability)
+{
+ std::vector<am_Sink_s> listSinks;
+ am_Sink_s sink;
+ am_sinkID_t sinkID;
+ createSink(sink);
+ am_Availability_s availability;
+ availability.availability=A_UNKNOWN;
+ availability.availabilityReason=AR_TEMPERATURE;
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSinkDB(sink,sinkID));
+ ASSERT_EQ(E_OK,pDatabaseHandler.changeSinkAvailabilityDB(availability,sinkID));
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListSinks(listSinks));
+ ASSERT_EQ(availability.availability,listSinks[0].available.availability);
+ ASSERT_EQ(availability.availabilityReason,listSinks[0].available.availabilityReason);
+}
+
+TEST_F(databaseTest, changeSourceAvailability)
+{
+ std::vector<am_Source_s> listSources;
+ am_Source_s source;
+ am_sourceID_t sourceID;
+ createSource(source);
+ am_Availability_s availability;
+ availability.availability=A_UNKNOWN;
+ availability.availabilityReason=AR_TEMPERATURE;
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSourceDB(source,sourceID));
+ ASSERT_EQ(E_OK,pDatabaseHandler.changeSourceAvailabilityDB(availability,sourceID));
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListSources(listSources));
+ ASSERT_EQ(availability.availability,listSources[0].available.availability);
+ ASSERT_EQ(availability.availabilityReason,listSources[0].available.availabilityReason);
+}
+
+
+TEST_F(databaseTest,changeMainConnectionRoute)
+{
+ std::vector<am_MainConnection_s> originalList;
+ std::vector<am_MainConnection_s> newList;
+ createMainConnectionSetup();
+ //fill the connection database
+ am_Connection_s connection;
+ am_Source_s source;
+ am_Sink_s sink;
+ std::vector<am_Connection_s> connectionList;
+
+ for (uint16_t i=1;i<10;i++)
+ {
+ am_sinkID_t forgetSink;
+ am_sourceID_t forgetSource;
+ am_connectionID_t forgetConnection;
+
+ createConnection(connection,0,i+20,i+20,-1,CF_ANALOG);
+ connectionList.push_back(connection);
+
+ createSink(sink,i+20,"sink" + int2string(i+20),4);
+ createSource(source,i+20,"source" + int2string(i+30),4);
+
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSinkDB(sink,forgetSink))<< "ERROR: database error";
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSourceDB(source,forgetSource))<< "ERROR: database error";
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterConnectionDB(connection,forgetConnection))<< "ERROR: database error";
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListMainConnections(originalList))<< "ERROR: database error";
+
+ }
+
+ //fill the route
+ std::vector<am_RoutingElement_s> routingList;
+ connectionList2RoutingList(routingList,connectionList);
+
+ //create the Route
+ am_Route_s route;
+ route.route=routingList;
+ route.sinkID=2;
+ route.sourceID=2;
+
+ ASSERT_EQ(E_OK,pDatabaseHandler.changeMainConnectionRouteDB(1,route));
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListMainConnections(newList))<< "ERROR: database error";
+ ASSERT_TRUE(std::equal(newList[0].route.route.begin(),newList[0].route.route.end(),routingList.begin(),equalRoutingElement));
+ ASSERT_FALSE(std::equal(newList[0].route.route.begin(),newList[0].route.route.end(),originalList[0].route.route.begin(),equalRoutingElement));
+}
+
+TEST_F(databaseTest,changeMainSinkVolume)
+{
+ am_Sink_s sink;
+ am_sinkID_t sinkID;
+ am_mainVolume_t newVol=20;
+ std::vector<am_Sink_s> listSinks;
+ createSink(sink);
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSinkDB(sink,sinkID));
+ ASSERT_EQ(E_OK,pDatabaseHandler.changeSinkMainVolumeDB(newVol,sinkID));
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListSinks(listSinks));
+ ASSERT_EQ(listSinks[0].mainVolume,newVol);
+}
+
+TEST_F(databaseTest,getMainSourceSoundProperties)
+{
+ am_Source_s source;
+ am_sourceID_t sourceID;
+ createSource(source);
+ std::vector<am_MainSoundProperty_s> mainSoundProperties=source.listMainSoundProperties;
+ std::vector<am_MainSoundProperty_s> listMainSoundProperties;
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSourceDB(source,sourceID));
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListMainSourceSoundProperties(sourceID,listMainSoundProperties));
+ ASSERT_TRUE(std::equal(mainSoundProperties.begin(),mainSoundProperties.end(),listMainSoundProperties.begin(),equalMainSoundProperty));
+}
+
+TEST_F(databaseTest,getMainSinkSoundProperties)
+ {
+ am_Sink_s sink;
+ am_sinkID_t sinkID;
+ createSink(sink);
+ std::vector<am_MainSoundProperty_s> mainSoundProperties=sink.listMainSoundProperties;
+ std::vector<am_MainSoundProperty_s> listMainSoundProperties;
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSinkDB(sink,sinkID));
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListMainSinkSoundProperties(sinkID,listMainSoundProperties));
+ ASSERT_TRUE(std::equal(mainSoundProperties.begin(),mainSoundProperties.end(),listMainSoundProperties.begin(),equalMainSoundProperty));
+ }
+
+TEST_F(databaseTest,getMainSources)
+{
+ am_Source_s source, source1,source2;
+ am_sourceID_t sourceID;
+ createSource(source);
+ createSource(source1);
+ createSource(source2);
+ bool equal=true;
+ source1.visible=false;
+ std::vector<am_SourceType_s> listMainSources;
+ std::vector<am_Source_s> listSources;
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSourceDB(source,sourceID));
+ source.sourceID=sourceID;
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSourceDB(source1,sourceID));
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSourceDB(source2,sourceID));
+ source2.sourceID=sourceID;
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListMainSources(listMainSources));
+ listSources.push_back(source);
+ listSources.push_back(source2);
+ std::vector<am_SourceType_s>::iterator listIterator=listMainSources.begin();
+ for(;listIterator<listMainSources.end();++listIterator)
+ {
+ equal = equal && compareSinkMainSource(listIterator,listSources);
+ }
+ ASSERT_TRUE(equal);
+}
+
+TEST_F(databaseTest,getMainSinks)
+{
+ am_Sink_s sink, sink1,sink2;
+ am_sinkID_t sinkID;
+ createSink(sink);
+ createSink(sink1);
+ createSink(sink2);
+ bool equal=true;
+ sink1.visible=false;
+ std::vector<am_SinkType_s> listMainSinks;
+ std::vector<am_Sink_s> listSinks;
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSinkDB(sink,sinkID));
+ sink.sinkID=sinkID;
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSinkDB(sink1,sinkID));
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSinkDB(sink2,sinkID));
+ sink2.sinkID=sinkID;
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListMainSinks(listMainSinks));
+ listSinks.push_back(sink);
+ listSinks.push_back(sink2);
+ std::vector<am_SinkType_s>::iterator listIterator=listMainSinks.begin();
+ for(;listIterator<listMainSinks.end();++listIterator)
+ {
+ equal = equal && compareSinkMainSink(listIterator,listSinks);
+ }
+ ASSERT_TRUE(equal);
+}
+
+TEST_F(databaseTest,getVisibleMainConnections)
+{
+ createMainConnectionSetup();
+ am_MainConnection_s mainConnection;
+ am_Route_s route;
+ createMainConnection(mainConnection,route);
+ std::vector<am_MainConnectionType_s> visibleMainConnection;
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListVisibleMainConnections(visibleMainConnection));
+ ASSERT_TRUE(1==visibleMainConnection[0].mainConnectionID);
+ ASSERT_TRUE(mainConnection.connectionState==visibleMainConnection[0].connectionState);
+ ASSERT_TRUE(mainConnection.delay==visibleMainConnection[0].delay);
+ ASSERT_TRUE(1==visibleMainConnection[0].sinkID);
+ ASSERT_TRUE(1==visibleMainConnection[0].sourceID);
+}
+
+TEST_F(databaseTest,getListSourcesOfDomain)
+{
+ am_Source_s source, source2;
+ am_Domain_s domain;
+ am_domainID_t domainID;
+ am_sourceID_t sourceID;
+ std::vector<am_sourceID_t> sourceList,sourceCheckList;
+ createSource(source,1,"testSink",1);
+ createSource(source2,0,"testSink",5);
+ createDomain(domain);
+ sourceCheckList.push_back(1);//sink.sinkID);
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterDomainDB(domain,domainID));
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSourceDB(source,sourceID))<< "ERROR: database error";
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSourceDB(source2,sourceID))<< "ERROR: database error";
+ ASSERT_EQ(E_NON_EXISTENT,pDatabaseHandler.getListSourcesOfDomain(2,sourceList))<< "ERROR: database error";
+ ASSERT_TRUE(sourceList.empty());
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListSourcesOfDomain(1,sourceList))<< "ERROR: database error";
+ ASSERT_TRUE(std::equal(sourceList.begin(),sourceList.end(),sourceCheckList.begin()) && !sourceList.empty());
+}
+
+TEST_F(databaseTest,getListSinksOfDomain)
+{
+ am_Sink_s sink, sink2;
+ am_Domain_s domain;
+ am_domainID_t domainID;
+ am_sinkID_t sinkID;
+ std::vector<am_sinkID_t> sinkList,sinkCheckList;
+ createSink(sink,1,"testSink",1);
+ createSink(sink2,0,"testSink",5);
+ createDomain(domain);
+ sinkCheckList.push_back(1);//sink.sinkID);
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterDomainDB(domain,domainID));
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSinkDB(sink,sinkID))<< "ERROR: database error";
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSinkDB(sink2,sinkID))<< "ERROR: database error";
+ ASSERT_EQ(E_NON_EXISTENT,pDatabaseHandler.getListSinksOfDomain(2,sinkList))<< "ERROR: database error";
+ ASSERT_TRUE(sinkList.empty());
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListSinksOfDomain(1,sinkList))<< "ERROR: database error";
+ ASSERT_TRUE(std::equal(sinkList.begin(),sinkList.end(),sinkCheckList.begin()) && !sinkList.empty());
+}
+
+TEST_F(databaseTest,getListGatewaysOfDomain)
+{
+ am_Gateway_s gateway, gateway2;
+ am_gatewayID_t gatewayID;
+ am_domainID_t domainID;
+ am_Domain_s domain;
+ std::vector<am_gatewayID_t> gatewayList,gatewayCheckList;
+ createGateway(gateway,1,"testGateway",1,1,1);
+ createGateway(gateway2,0,"testGateway2",1,1,4);
+ createDomain(domain);
+ gatewayCheckList.push_back(gateway.gatewayID);
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterDomainDB(domain,domainID));
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterGatewayDB(gateway,gatewayID))<< "ERROR: database error";
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterGatewayDB(gateway2,gatewayID))<< "ERROR: database error";
+ ASSERT_EQ(E_NON_EXISTENT,pDatabaseHandler.getListGatewaysOfDomain(2,gatewayList))<< "ERROR: database error";
+ ASSERT_TRUE(gatewayList.empty());
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListGatewaysOfDomain(1,gatewayList))<< "ERROR: database error";
+ ASSERT_TRUE(std::equal(gatewayList.begin(),gatewayList.end(),gatewayCheckList.begin()) && !gatewayList.empty());
+}
+
+TEST_F(databaseTest,removeDomain)
+{
+ am_Domain_s domain;
+ am_domainID_t domainID;
+ std::vector<am_Domain_s> listDomains;
+ createDomain(domain);
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterDomainDB(domain,domainID))<< "ERROR: database error";
+ ASSERT_EQ(E_OK,pDatabaseHandler.removeDomainDB(domainID))<< "ERROR: database error";
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListDomains(listDomains))<< "ERROR: database error";
+ ASSERT_TRUE(listDomains.empty());
+}
+
+TEST_F(databaseTest,removeGateway)
+{
+ am_Gateway_s gateway;
+ am_gatewayID_t gatewayID;
+ std::vector<am_Gateway_s> listGateways;
+ createGateway(gateway);
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterGatewayDB(gateway,gatewayID))<< "ERROR: database error";
+ ASSERT_EQ(E_OK,pDatabaseHandler.removeGatewayDB(gatewayID))<< "ERROR: database error";
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListGateways(listGateways))<< "ERROR: database error";
+ ASSERT_TRUE(listGateways.empty());
+}
+
+TEST_F(databaseTest,removeSink)
+{
+ am_Sink_s sink;
+ am_sinkID_t sinkID;
+ std::vector<am_Sink_s> listSinks;
+ createSink(sink);
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSinkDB(sink,sinkID))<< "ERROR: database error";
+ ASSERT_EQ(E_OK,pDatabaseHandler.removeSinkDB(sinkID))<< "ERROR: database error";
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListSinks(listSinks))<< "ERROR: database error";
+ ASSERT_TRUE(listSinks.empty());
+}
+
+TEST_F(databaseTest,removeSource)
+{
+ //fill the connection database
+ am_Source_s source;
+ am_sourceID_t sourceID;
+ std::vector<am_Source_s> listSources;
+ createSource(source);
+
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSourceDB(source,sourceID))<< "ERROR: database error";
+ ASSERT_EQ(E_OK,pDatabaseHandler.removeSourceDB(sourceID))<< "ERROR: database error";
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListSources(listSources))<< "ERROR: database error";
+ ASSERT_TRUE(listSources.empty());
+}
+
+TEST_F(databaseTest, removeMainConnection)
+{
+ createMainConnectionSetup();
+ ASSERT_EQ(E_OK,pDatabaseHandler.removeMainConnectionDB(1))<< "ERROR: database error";
+}
+
+TEST_F(databaseTest,removeNonexistentMainConnectionFail)
+{
+ ASSERT_EQ(E_NON_EXISTENT,pDatabaseHandler.removeMainConnectionDB(34))<< "ERROR: database error";
+}
+
+TEST_F(databaseTest,removeNonexistentSource)
+{
+ ASSERT_EQ(E_NON_EXISTENT,pDatabaseHandler.removeSourceDB(3))<< "ERROR: database error";
+}
+
+TEST_F(databaseTest,removeNonexistentSink)
+{
+ ASSERT_EQ(E_NON_EXISTENT,pDatabaseHandler.removeSinkDB(2))<< "ERROR: database error";
+}
+
+TEST_F(databaseTest,removeNonexistentGateway)
+{
+ ASSERT_EQ(E_NON_EXISTENT,pDatabaseHandler.removeGatewayDB(12))<< "ERROR: database error";
+}
+
+TEST_F(databaseTest,registerGatewayCorrect)
+{
+ //initialize gateway
+ std::vector<am_Gateway_s> returnList;
+ am_Gateway_s gateway, gateway1, gateway2;
+ am_gatewayID_t gatewayID=0,gatewayID1=0,gatewayID2=0;
+
+ createGateway(gateway,0,"Gateway1");
+ createGateway(gateway1,20,"Gateway2");
+ createGateway(gateway2,0,"Gateway3");
+
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterGatewayDB(gateway,gatewayID))<< "ERROR: database error";
+ ASSERT_EQ(100,gatewayID)<< "ERROR: domainID zero";
+
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterGatewayDB(gateway1,gatewayID1))<< "ERROR: database error";
+ ASSERT_EQ(gateway1.gatewayID,gatewayID1)<< "ERROR: domainID zero";
+
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterGatewayDB(gateway2,gatewayID2))<< "ERROR: database error";
+ ASSERT_EQ(101,gatewayID2)<< "ERROR: domainID zero";
+
+ //now check if we read out the correct values
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListGateways(returnList));
+ bool equal=true;
+ std::vector<am_Gateway_s>::iterator listIterator=returnList.begin();
+
+ for(;listIterator<returnList.end();++listIterator)
+ {
+ if(listIterator->gatewayID==gatewayID)
+ {
+ equal= equal && compareGateway(listIterator,gateway);
+ }
+
+ if(listIterator->gatewayID==gatewayID1)
+ {
+ equal= equal && compareGateway(listIterator,gateway1);
+ }
+
+ if(listIterator->gatewayID==gatewayID2)
+ {
+ equal= equal && compareGateway(listIterator,gateway2);
+ }
+ }
+
+ ASSERT_EQ(true,equal);
+}
+
+TEST_F(databaseTest,getGatewayInfo)
+{
+ //initialize gateway
+ std::vector<am_Gateway_s> returnList;
+ am_Gateway_s gateway, gateway1, gateway2;
+ am_gatewayID_t gatewayID=0,gatewayID1=0,gatewayID2=0;
+
+ createGateway(gateway,0,"Gateway1");
+ createGateway(gateway1,20,"Gateway2");
+ createGateway(gateway2,0,"Gateway3");
+
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterGatewayDB(gateway,gatewayID))<< "ERROR: database error";
+ ASSERT_EQ(100,gatewayID)<< "ERROR: domainID zero";
+
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterGatewayDB(gateway1,gatewayID1))<< "ERROR: database error";
+ ASSERT_EQ(gateway1.gatewayID,gatewayID1)<< "ERROR: domainID zero";
+
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterGatewayDB(gateway2,gatewayID2))<< "ERROR: database error";
+ ASSERT_EQ(101,gatewayID2)<< "ERROR: domainID zero";
+
+ //now check if we read out the correct values
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListGateways(returnList));
+ bool equal=true;
+ std::vector<am_Gateway_s>::iterator listIterator=returnList.begin();
+
+ for(;listIterator<returnList.end();++listIterator)
+ {
+ if(listIterator->gatewayID==gatewayID)
+ {
+ equal= equal && compareGateway(listIterator,gateway);
+ }
+
+ if(listIterator->gatewayID==gatewayID1)
+ {
+ equal= equal && compareGateway(listIterator,gateway1);
+ }
+
+ if(listIterator->gatewayID==gatewayID2)
+ {
+ equal= equal && compareGateway(listIterator,gateway2);
+ }
+ }
+
+ ASSERT_EQ(true,equal);
+
+ am_Gateway_s gatewayInfo;
+ ASSERT_EQ(E_OK,pDatabaseHandler.getGatewayInfoDB(20,gatewayInfo));
+ ASSERT_TRUE(compareGateway1(gateway1,gatewayInfo));
+
+}
+
+TEST_F(databaseTest,enterSinkThatAlreadyExistFail)
+{
+ //fill the connection database
+ am_Sink_s staticSink,SecondSink;
+ am_sinkID_t staticSinkID,SecondSinkID;
+
+ createSink(staticSink,43,"Static");
+
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSinkDB(staticSink,staticSinkID))<< "ERROR: database error";
+ ASSERT_EQ(staticSink.sinkID,staticSinkID)<< "ERROR: ID not the one given in staticSink";
+
+ createSink(SecondSink,43,"secondStatic");
+
+ ASSERT_EQ(E_ALREADY_EXISTS,pDatabaseHandler.enterSinkDB(SecondSink,SecondSinkID))<< "ERROR: database error";
+}
+
+TEST_F(databaseTest,enterSourcesThatAlreadyExistFail)
+{
+ //fill the connection database
+ am_Source_s staticSource,SecondSource;
+ am_sourceID_t staticSourceID,SecondSourceID;
+ createSource(staticSource,4,"FirstSource");
+
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSourceDB(staticSource,staticSourceID))<< "ERROR: database error";
+ ASSERT_EQ(staticSource.sourceID,staticSourceID)<< "ERROR: ID not the one given in staticSource";
+
+ createSource(SecondSource,4,"SecondSource");
+
+ ASSERT_EQ(E_ALREADY_EXISTS,pDatabaseHandler.enterSourceDB(SecondSource,SecondSourceID))<< "ERROR: database error";
+}
+
+TEST_F(databaseTest,registerDomainCorrect)
+{
+ //initialize domain
+ std::vector<am_Domain_s> returnList;
+ am_Domain_s domain;
+ am_domainID_t domainID=0;
+ createDomain(domain);
+
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterDomainDB(domain,domainID))<< "ERROR: database error";
+ ASSERT_NE(0,domainID)<< "ERROR: domainID zero";
+
+ //now check if we read out the correct values
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListDomains(returnList));
+ bool equal=true;
+ std::vector<am_Domain_s>::iterator listIterator=returnList.begin();
+ for(;listIterator<returnList.end();++listIterator)
+ {
+ if(listIterator->domainID==domainID) {
+ equal= equal && (listIterator->name.compare(domain.name)==0)
+ && (listIterator->busname.compare(domain.busname)==0)
+ && (listIterator->complete == domain.complete)
+ && (listIterator->early == domain.early)
+ && (listIterator->state == domain.state);
+ }
+ }
+ ASSERT_EQ(true,equal);
+}
+
+TEST_F(databaseTest,registerDomainFailonID0)
+{
+ am_Domain_s domain;
+ am_domainID_t domainID=5;
+ createDomain(domain,1);
+ ASSERT_DEATH(pDatabaseHandler.enterDomainDB(domain,domainID),"Assertion `domainData.domainID==0'");
+}
+
+TEST_F(databaseTest,registerConnectionCorrect)
+{
+ am_Connection_s connection;
+ am_connectionID_t connectionID;
+ std::vector<am_Connection_s> returnList;
+ createConnection(connection);
+
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterConnectionDB(connection,connectionID))<< "ERROR: database error";;
+ ASSERT_NE(0,connectionID)<< "ERROR: connectionID zero";
+
+ //now check if we read out the correct values
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListConnections(returnList));
+ bool equal=false;
+ std::vector<am_Connection_s>::iterator listIterator=returnList.begin();
+ for(;listIterator<returnList.end();++listIterator)
+ {
+ if(listIterator->connectionID==connectionID) {
+ equal= (listIterator->sourceID == connection.sourceID)
+ && (listIterator->sinkID == connection.sinkID)
+ && (listIterator->delay == connection.delay)
+ && (listIterator->connectionFormat = connection.connectionFormat);
+ }
+ }
+ ASSERT_EQ(true,equal);
+}
+
+TEST_F(databaseTest,enterMainConnectionCorrect)
+{
+ createMainConnectionSetup();
+}
+
+TEST_F(databaseTest,enterSinksCorrect)
+{
+ //fill the connection database
+ am_Sink_s staticSink,firstDynamicSink,secondDynamicSink;
+ am_sinkID_t staticSinkID,firstDynamicSinkID,secondDynamicSinkID;
+ std::vector<am_Sink_s> sinkList;
+
+ createSink(staticSink,4,"Static");
+
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSinkDB(staticSink,staticSinkID))<< "ERROR: database error";
+ ASSERT_EQ(staticSink.sinkID,staticSinkID)<< "ERROR: ID not the one given in staticSink";
+
+ createSink(firstDynamicSink,0,"firstDynamicSink");
+
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSinkDB(firstDynamicSink,firstDynamicSinkID))<< "ERROR: database error";
+ ASSERT_EQ(firstDynamicSinkID,DYNAMIC_ID_BOUNDARY)<< "ERROR: ID not the one given in firstDynamicSink";
+
+ createSink(secondDynamicSink,0,"secondDynamicSink");
+
+ ASSERT_EQ(E_OK,pDatabaseHandler.enterSinkDB(secondDynamicSink,secondDynamicSinkID))<< "ERROR: database error";
+ ASSERT_NEAR(secondDynamicSinkID,DYNAMIC_ID_BOUNDARY,10)<< "ERROR: ID not the one given in secondDynamicSink";
+
+ //now read back and check the returns agains the given values
+ ASSERT_EQ(E_OK,pDatabaseHandler.getListSinks(sinkList))<< "ERROR: database error";
+ bool equal=true;
+
+ std::vector<am_Sink_s>::iterator listIterator=sinkList.begin();
+ for(;listIterator<sinkList.end();++listIterator)
+ {
+ if(listIterator->sinkID==staticSinkID)
+ {
+ equal = equal && compareSink(listIterator,staticSink);
+ }
+
+ if(listIterator->sinkID==firstDynamicSinkID)
+ {
+ equal = equal && compareSink(listIterator,firstDynamicSink);
+ }
+
+ if(listIterator->sinkID==secondDynamicSinkID)
+ {
+ equal = equal && compareSink(listIterator,secondDynamicSink);
+ }
+ }
+ ASSERT_EQ(true,equal);
+}
+
+
+int main(int argc, char **argv)
+{
+ ::testing::InitGoogleTest(&argc, argv);
+ return RUN_ALL_TESTS();
+}
+
+
+
+
+
+
+
+
+
--- /dev/null
+/*
+ * databasetest.h
+ *
+ * Created on: Dec 6, 2011
+ * Author: christian
+ */
+
+#ifndef DATABASETEST_H_
+#define DATABASETEST_H_
+
+
+#include <gtest/gtest.h>
+#include <dlt/dlt.h>
+#include <algorithm>
+#include <string>
+#include <vector>
+#include <set>
+#include "DatabaseHandler.h"
+
+DLT_DECLARE_CONTEXT(AudioManager);
+
+using namespace testing;
+
+class databaseTest : public Test {
+public:
+
+ DatabaseHandler pDatabaseHandler;
+ void SetUp();
+ void TearDown();
+
+ static std::vector<am_ConnectionFormat_e> getStandardConnectionFormatList();
+ static std::vector<am_SoundProperty_s> getStandardSoundPropertyList();
+ static std::vector<am_MainSoundProperty_s> getStandardMainSoundPropertyList();
+ static std::vector<bool> getStandardConvertionMatrix();
+ bool compareSource(std::vector<am_Source_s>::iterator listIterator, const am_Source_s& sourceData);
+ bool compareSink(std::vector<am_Sink_s>::iterator listIterator, const am_Sink_s& sinkData);
+ bool compareGateway(std::vector<am_Gateway_s>::iterator listIterator, const am_Gateway_s& gatewayData);
+ bool compareGateway1(const am_Gateway_s gateway1, const am_Gateway_s gatewayData);
+ bool compareSinkMainSink(std::vector<am_SinkType_s>::iterator listIterator, const std::vector<am_Sink_s>& sinkList);
+ bool compareSinkMainSource(std::vector<am_SourceType_s>::iterator listIterator, const std::vector<am_Source_s>& sourceList);
+ std::string int2string(int i);
+
+ void createSink(am_Sink_s& sink,am_sinkID_t sinkID,std::string name,am_domainID_t domainID, am_Availablility_e availability,
+ am_AvailabilityReason_e availabilityReason, am_sinkClass_t sinkClassID,
+ std::vector<am_ConnectionFormat_e> connectionFormatList,
+ std::vector<am_SoundProperty_s> soundPropertyList,
+ std::vector<am_MainSoundProperty_s> mainSoundPropertyList,
+ am_mainVolume_t mainVolume, am_MuteState_e muteState,
+ bool visible, am_volume_t volume);
+
+ void createSource(am_Source_s& source, am_sourceID_t sourceID, std::string name, am_domainID_t domainID,
+ am_Availablility_e availability, am_AvailabilityReason_e availabilityReason, am_sourceClass_t sourceClassID,
+ std::vector<am_ConnectionFormat_e> listConnectionFormats,
+ std::vector<am_SoundProperty_s> listSoundProperties,
+ std::vector<am_MainSoundProperty_s> listMainSoundProperties,
+ am_InterruptState_e interruptState, bool visible, am_volume_t volume, am_SourceState_e sourceState);
+
+ void createDomain(am_Domain_s& domain, am_domainID_t domainID, std::string name, std::string nodename,
+ std::string busname, bool complete, bool early, am_DomainState_e state);
+
+ void createGateway(am_Gateway_s& gateway, am_gatewayID_t gatewayID, std::string name, am_sinkID_t sinkID, am_sourceID_t sourceID, am_domainID_t controlDomainID,
+ am_domainID_t domainSinkID, am_domainID_t domainSourceID,std::vector<bool> convertionMatrix,
+ std::vector<am_ConnectionFormat_e> listSourceFormats,std::vector<am_ConnectionFormat_e> listSinkFormats);
+
+ void createConnection(am_Connection_s& connection, am_connectionID_t connectionID, am_sinkID_t sinkID,
+ am_sourceID_t sourceID, am_timeSync_t delay, am_ConnectionFormat_e connectionFormat);
+
+ void createMainConnection(am_MainConnection_s& mainConnection, am_Route_s route, am_timeSync_t delay,
+ am_mainConnectionID_t connectionID, am_ConnectionState_e state);
+
+
+ void connectionList2RoutingList(std::vector<am_RoutingElement_s>& routingList, const std::vector<am_Connection_s>& connectionList);
+
+ void createMainConnectionSetup();
+
+ struct sortBySinkID
+ {
+ bool operator()(const am_RoutingElement_s & a, const am_RoutingElement_s & b) const
+ {
+ return (a.sinkID < b.sinkID);
+ }
+ };
+
+ struct sortByConnectionFormat
+ {
+ bool operator()(const am_ConnectionFormat_e & a, const am_ConnectionFormat_e & b) const
+ {
+ return (a < b);
+ }
+ };
+
+ struct sortByMainSoundProperty
+ {
+ bool operator()(const am_MainSoundProperty_s & a, const am_MainSoundProperty_s & b) const
+ {
+ return (a.type > b.type);
+ }
+ };
+
+ struct sortBySoundProperty
+ {
+ bool operator()(const am_SoundProperty_s & a, const am_SoundProperty_s & b) const
+ {
+ return (a.type < b.type);
+ }
+ };
+};
+
+#endif /* DATABASETEST_H_ */
+++ /dev/null
-cmake_minimum_required(VERSION 2.6)
-
-PROJECT(PlayerGui)
-
-set(CMAKE_CXX_FLAGS "-g -pipe -g -Wall -W -D_REENTRANT")
-
-set(STD_INCLUDE_DIRS "/usr/include")
-set(EXECUTABLE_OUTPUT_PATH ../../bin/)
-set(DBUS_FOLDER ${CMAKE_SOURCE_DIR}/../dbusInterfaces)
-set(DOC_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/../doc/PlayerGUI)
-set(DOCUMENT $ENV{gendoc})
-
-cmake_policy(SET CMP0015 NEW)
-
-file(MAKE_DIRECTORY ${DOC_OUTPUT_PATH})
-
-FIND_PACKAGE(Qt4 REQUIRED)
-FIND_PACKAGE(PkgConfig)
-pkg_check_modules(GLIB REQUIRED glib-2.0)
-pkg_check_modules(GSTREAMER REQUIRED gstreamer-0.10)
-pkg_check_modules(GSTREAMERPLUGINS REQUIRED gstreamer-plugins-base-0.10)
-pkg_check_modules(PHONON REQUIRED phonon)
-
-
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR} ${STD_INCLUDE_DIRS})
-
-# add Qt modules here, the include will setup QT_LIBRARIES
-SET(QT_USE_QTGUI TRUE)
-SET(QT_USE_QTPHONON TRUE)
-
-INCLUDE(${QT_USE_FILE})
-
-SET( UI_FILES
- playergui.ui
-)
-
-#all source files go here
-SET(PLAYERGUI_SRCS_CXX
- main.cpp
- playerGui.cpp
- player.cpp
- ${DBUS_FOLDER}/DBusTypes.cpp
- ${CMAKE_CURRENT_BINARY_DIR}/DBusSend.cpp
-
-)
-
-INCLUDE_DIRECTORIES(
- include
- ${CMAKE_SOURCE_DIR}
- ${STD_INCLUDE_DIRS}
- ${GLIB_INCLUDE_DIRS}
- ${CMAKE_CURRENT_BINARY_DIR}
- ${GSTREAMER_INLCUDE_DIRS}
- ${GSTREAMERDEV_INLCUDE_DIRS}
- ${GSTREAMERPLUGINS_INCLUDE_DIRS}
- ${PHONON_INCLUDE_DIRS}
- ${DBUS_FOLDER}
-)
-
-#every header that contains QT stuff like Q_OBJECT .... and must be mocced
-SET(PLAYERGUI_MOC_SRCS
- ${DBUS_FOLDER}/DBusTypes.h
- playerGui.h
- player.h
- ${CMAKE_CURRENT_BINARY_DIR}/DBusSend.h
-
-)
-
-LINK_DIRECTORIES(
- ${LINK_DIRECTORIES}
- ${GLIB_LIBRARY_DIRS}
- ${GSTREAMER_LIBRARY_DIRS}
- ${GSTREAMER_PLUGINS_LIBRARY_DIRS}
- ${PHONON_LIBRARY_DIRS}
-)
-
-QT4_WRAP_UI(UI_HDRS ${UI_FILES} )
-
-
-#now take the headers, moc them and append the resulting moc files to the sources
-QT4_WRAP_CPP(PLAYERGUI_SRCS_CXX ${PLAYERGUI_MOC_SRCS})
-
-ADD_EXECUTABLE(PlayerGui ${PLAYERGUI_SRCS_CXX} ${UI_HDRS})
-
-TARGET_LINK_LIBRARIES(PlayerGui
- ${QT_LIBRARIES}
- ${GSTREAMER_LIBRARIES}
- ${PHONON_LIBRARIES}
-)
-
-add_custom_command(
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/DBusSend_.h ${CMAKE_CURRENT_BINARY_DIR}/DBusSend.cpp
- COMMAND qdbusxml2cpp ARGS -v -c DBusSend -p DBusSend.h:DBusSend.cpp ${DBUS_FOLDER}/DBusAudioManager.xml
- MAIN_DEPENDENCY ${DBUS_FOLDER}/DBusAudioManager.xml
-)
-
-add_custom_command(
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/DBusSend.h
- COMMAND sed ARGS -i '1i \#include \"../dbusInterfaces/DBusTypes.h\"' DBusSend.h
- MAIN_DEPENDENCY ${CMAKE_CURRENT_BINARY_DIR}/DBusSend_.h
-)
-
-#add a target to generate API documentation with Doxygen
-find_package(Doxygen)
-if(DOXYGEN_FOUND)
-if(DOCUMENT)
- configure_file(Doxyfile.in ${PROJECT_BINARY_DIR}/Doxyfile @ONLY IMMEDIATE)
- add_custom_target (Docs ALL
- COMMAND ${DOXYGEN_EXECUTABLE} ${PROJECT_BINARY_DIR}/Doxyfile WORKING_DIRECTORY ${DOC_OUTPUT_PATH}
- SOURCES ${PROJECT_BINARY_DIR}/Doxyfile)
-endif(DOCUMENT)
-endif(DOXYGEN_FOUND)
-
-
+++ /dev/null
-# Doxyfile 1.7.1
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
-#
-# All text after a hash (#) is considered a comment and will be ignored
-# The format is:
-# TAG = value [value, ...]
-# For lists items can also be appended using:
-# TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all
-# text before the first occurrence of this tag. Doxygen uses libiconv (or the
-# iconv built into libc) for the transcoding. See
-# http://www.gnu.org/software/libiconv for the list of possible encodings.
-
-DOXYFILE_ENCODING = UTF-8
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
-# by quotes) that should identify the project.
-
-PROJECT_NAME = PlayerGui
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number.
-# This could be handy for archiving the generated documentation or
-# if some version control system is used.
-
-PROJECT_NUMBER = 0.1
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
-# base path where the generated documentation will be put.
-# If a relative path is entered, it will be relative to the location
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY =
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
-# 4096 sub-directories (in 2 levels) under the output directory of each output
-# format and will distribute the generated files over these directories.
-# Enabling this option can be useful when feeding doxygen a huge amount of
-# source files, where putting all generated files in the same directory would
-# otherwise cause performance problems for the file system.
-
-CREATE_SUBDIRS = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# The default language is English, other supported languages are:
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
-# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
-# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
-# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
-# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
-# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
-
-OUTPUT_LANGUAGE = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
-# include brief member descriptions after the members that are listed in
-# the file and class documentation (similar to JavaDoc).
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
-# the brief description of a member or function before the detailed description.
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator
-# that is used to form the text in various listings. Each string
-# in this list, if found as the leading text of the brief description, will be
-# stripped from the text and the result after processing the whole list, is
-# used as the annotated text. Otherwise, the brief description is used as-is.
-# If left blank, the following values are used ("$name" is automatically
-# replaced with the name of the entity): "The $name class" "The $name widget"
-# "The $name file" "is" "provides" "specifies" "contains"
-# "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF = "The $name class" \
- "The $name widget" \
- "The $name file" \
- is \
- provides \
- specifies \
- contains \
- represents \
- a \
- an \
- the
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# Doxygen will generate a detailed section even if there is only a brief
-# description.
-
-ALWAYS_DETAILED_SEC = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
-# operators of the base classes will not be shown.
-
-INLINE_INHERITED_MEMB = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
-# path before files name in the file list and in the header files. If set
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES = YES
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
-# can be used to strip a user-defined part of the path. Stripping is
-# only done if one of the specified strings matches the left-hand part of
-# the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the
-# path to strip.
-
-STRIP_FROM_PATH =
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
-# the path mentioned in the documentation of a class, which tells
-# the reader which header file to include in order to use a class.
-# If left blank only the name of the header file containing the class
-# definition is used. Otherwise one should specify the include paths that
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH =
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-# (but less readable) file names. This can be useful is your file systems
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
-# will interpret the first line (until the first dot) of a JavaDoc-style
-# comment as the brief description. If set to NO, the JavaDoc
-# comments will behave just like regular Qt-style comments
-# (thus requiring an explicit @brief command for a brief description.)
-
-JAVADOC_AUTOBRIEF = YES
-
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
-# interpret the first line (until the first dot) of a Qt-style
-# comment as the brief description. If set to NO, the comments
-# will behave just like regular Qt-style comments (thus requiring
-# an explicit \brief command for a brief description.)
-
-QT_AUTOBRIEF = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
-# treat a multi-line C++ special comment block (i.e. a block of //! or ///
-# comments) as a brief description. This used to be the default behaviour.
-# The new default is to treat a multi-line C++ comment block as a detailed
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it
-# re-implements.
-
-INHERIT_DOCS = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
-# a new page for each member. If set to NO, the documentation of a member will
-# be part of the file/class/namespace that contains it.
-
-SEPARATE_MEMBER_PAGES = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab.
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE = 8
-
-# This tag can be used to specify a number of aliases that acts
-# as commands in the documentation. An alias has the form "name=value".
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to
-# put the command \sideeffect (or @sideeffect) in the documentation, which
-# will result in a user-defined paragraph with heading "Side Effects:".
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
-# sources only. Doxygen will then generate output that is more tailored for C.
-# For instance, some of the names that are used will be different. The list
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C = NO
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
-# sources only. Doxygen will then generate output that is more tailored for
-# Java. For instance, namespaces will be presented as packages, qualified
-# scopes will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA = NO
-
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-# sources only. Doxygen will then generate output that is more tailored for
-# Fortran.
-
-OPTIMIZE_FOR_FORTRAN = NO
-
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-# sources. Doxygen will then generate output that is tailored for
-# VHDL.
-
-OPTIMIZE_OUTPUT_VHDL = NO
-
-# Doxygen selects the parser to use depending on the extension of the files it
-# parses. With this tag you can assign which parser to use for a given extension.
-# Doxygen has a built-in mapping, but you can override or extend it using this
-# tag. The format is ext=language, where ext is a file extension, and language
-# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
-# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
-# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
-# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
-# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
-
-EXTENSION_MAPPING =
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
-# to include (a tag file for) the STL sources as input, then you should
-# set this tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
-# func(std::string) {}). This also make the inheritance and collaboration
-# diagrams that involve STL classes more complete and accurate.
-
-BUILTIN_STL_SUPPORT = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-
-CPP_CLI_SUPPORT = NO
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
-# Doxygen will parse them like normal C++ but will assume all classes use public
-# instead of private inheritance when no explicit protection keyword is present.
-
-SIP_SUPPORT = NO
-
-# For Microsoft's IDL there are propget and propput attributes to indicate getter
-# and setter methods for a property. Setting this option to YES (the default)
-# will make doxygen to replace the get and set methods by a property in the
-# documentation. This will only work if the methods are indeed getting or
-# setting a simple type. If this is not the case, or you want to show the
-# methods anyway, you should set this option to NO.
-
-IDL_PROPERTY_SUPPORT = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
-# the same type (for instance a group of public functions) to be put as a
-# subgroup of that type (e.g. under the Public Functions section). Set it to
-# NO to prevent subgrouping. Alternatively, this can be done per class using
-# the \nosubgrouping command.
-
-SUBGROUPING = YES
-
-# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
-# is documented as struct, union, or enum with the name of the typedef. So
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
-# with name TypeT. When disabled the typedef will appear as a member of a file,
-# namespace, or class. And the struct will be named TypeS. This can typically
-# be useful for C code in case the coding convention dictates that all compound
-# types are typedef'ed and only the typedef is referenced, never the tag name.
-
-TYPEDEF_HIDES_STRUCT = YES
-
-# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
-# determine which symbols to keep in memory and which to flush to disk.
-# When the cache is full, less often used symbols will be written to disk.
-# For small to medium size projects (<1000 input files) the default value is
-# probably good enough. For larger projects a too small cache size can cause
-# doxygen to be busy swapping symbols to and from disk most of the time
-# causing a significant performance penality.
-# If the system has enough physical memory increasing the cache will improve the
-# performance by keeping more symbols in memory. Note that the value works on
-# a logarithmic scale so increasing the size by one will rougly double the
-# memory usage. The cache size is given by this formula:
-# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols
-
-SYMBOL_CACHE_SIZE = 0
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available.
-# Private class members and static file members will be hidden unless
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL = YES
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
-# will be included in the documentation.
-
-EXTRACT_PRIVATE = YES
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file
-# will be included in the documentation.
-
-EXTRACT_STATIC = YES
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
-# defined locally in source files will be included in the documentation.
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES = YES
-
-# This flag is only useful for Objective-C code. When set to YES local
-# methods, which are defined in the implementation section but not in
-# the interface are included in the documentation.
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS = YES
-
-# If this flag is set to YES, the members of anonymous namespaces will be
-# extracted and appear in the documentation as a namespace called
-# 'anonymous_namespace{file}', where file will be replaced with the base
-# name of the file that contains the anonymous namespace. By default
-# anonymous namespace are hidden.
-
-EXTRACT_ANON_NSPACES = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
-# undocumented members of documented classes, files or namespaces.
-# If set to NO (the default) these members will be included in the
-# various overviews, but no documentation section is generated.
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS = NO
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy.
-# If set to NO (the default) these classes will be included in the various
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES = NO
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
-# friend (class|struct|union) declarations.
-# If set to NO (the default) these declarations will be included in the
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
-# documentation blocks found inside the body of a function.
-# If set to NO (the default) these blocks will be appended to the
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS = NO
-
-# The INTERNAL_DOCS tag determines if documentation
-# that is typed after a \internal command is included. If the tag is set
-# to NO (the default) then the documentation will be excluded.
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
-# file names in lower-case letters. If set to YES upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES = NO
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
-# will show members with their full class and namespace scopes in the
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
-# will put a list of the files that are included by a file in the documentation
-# of that file.
-
-SHOW_INCLUDE_FILES = YES
-
-# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
-# will list include files with double quotes in the documentation
-# rather than with sharp brackets.
-
-FORCE_LOCAL_INCLUDES = NO
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
-# is inserted in the documentation for inline members.
-
-INLINE_INFO = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
-# will sort the (detailed) documentation of file and class members
-# alphabetically by member name. If set to NO the members will appear in
-# declaration order.
-
-SORT_MEMBER_DOCS = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
-# brief documentation of file, namespace and class members alphabetically
-# by member name. If set to NO (the default) the members will appear in
-# declaration order.
-
-SORT_BRIEF_DOCS = YES
-
-# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
-# will sort the (brief and detailed) documentation of class members so that
-# constructors and destructors are listed first. If set to NO (the default)
-# the constructors will appear in the respective orders defined by
-# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
-# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
-# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
-
-SORT_MEMBERS_CTORS_1ST = NO
-
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
-# hierarchy of group names into alphabetical order. If set to NO (the default)
-# the group names will appear in their defined order.
-
-SORT_GROUP_NAMES = YES
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
-# sorted by fully-qualified names, including namespaces. If set to
-# NO (the default), the class list will be sorted only by class name,
-# not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or
-# disable (NO) the todo list. This list is created by putting \todo
-# commands in the documentation.
-
-GENERATE_TODOLIST = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or
-# disable (NO) the test list. This list is created by putting \test
-# commands in the documentation.
-
-GENERATE_TESTLIST = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or
-# disable (NO) the bug list. This list is created by putting \bug
-# commands in the documentation.
-
-GENERATE_BUGLIST = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
-# disable (NO) the deprecated list. This list is created by putting
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS =
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-# the initial value of a variable or define consists of for it to appear in
-# the documentation. If the initializer consists of more lines than specified
-# here it will be hidden. Use a value of 0 to hide initializers completely.
-# The appearance of the initializer of individual variables and defines in the
-# documentation can be controlled using \showinitializer or \hideinitializer
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
-# at the bottom of the documentation of classes and structs. If set to YES the
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES = YES
-
-# If the sources in your project are distributed over multiple directories
-# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
-# in the documentation. The default is NO.
-
-SHOW_DIRECTORIES = NO
-
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
-# This will remove the Files entry from the Quick Index and from the
-# Folder Tree View (if specified). The default is YES.
-
-SHOW_FILES = YES
-
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
-# Namespaces page. This will remove the Namespaces entry from the Quick Index
-# and from the Folder Tree View (if specified). The default is YES.
-
-SHOW_NAMESPACES = YES
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from
-# the version control system). Doxygen will invoke the program by executing (via
-# popen()) the command <command> <input-file>, where <command> is the value of
-# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
-# provided by doxygen. Whatever the program writes to standard output
-# is used as the file version. See the manual for examples.
-
-FILE_VERSION_FILTER =
-
-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
-# by doxygen. The layout file controls the global structure of the generated
-# output files in an output format independent way. The create the layout file
-# that represents doxygen's defaults, run doxygen with the -l option.
-# You can optionally specify a file name after the option, if omitted
-# DoxygenLayout.xml will be used as the name of the layout file.
-
-LAYOUT_FILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated by doxygen. Possible values are YES and NO. If left blank
-# NO is used.
-
-WARNINGS = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED = YES
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some
-# parameters in a documented function, or documenting parameters that
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR = YES
-
-# This WARN_NO_PARAMDOC option can be abled to get warnings for
-# functions that are documented, but have no documentation for their parameters
-# or return value. If set to NO (the default) doxygen will only warn about
-# wrong or incomplete parameter documentation, but not about the absence of
-# documentation.
-
-WARN_NO_PARAMDOC = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that
-# doxygen can produce. The string should contain the $file, $line, and $text
-# tags, which will be replaced by the file and line number from which the
-# warning originated and the warning text. Optionally the format may contain
-# $version, which will be replaced by the version of the file (if it could
-# be obtained via FILE_VERSION_FILTER)
-
-WARN_FORMAT = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning
-# and error messages should be written. If left blank the output is written
-# to stderr.
-
-WARN_LOGFILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain
-# documented source files. You may enter file names like "myfile.cpp" or
-# directories like "/usr/src/myproject". Separate the files or directories
-# with spaces.
-
-INPUT = @CMAKE_CURRENT_SOURCE_DIR@
-
-# This tag can be used to specify the character encoding of the source files
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
-# also the default input encoding. Doxygen uses libiconv (or the iconv built
-# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
-# the list of possible encodings.
-
-INPUT_ENCODING = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank the following patterns are tested:
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
-# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
-
-FILE_PATTERNS = *.c \
- *.cc \
- *.cxx \
- *.cpp \
- *.c++ \
- *.d \
- *.java \
- *.ii \
- *.ixx \
- *.ipp \
- *.i++ \
- *.inl \
- *.h \
- *.hh \
- *.hxx \
- *.hpp \
- *.h++ \
- *.idl \
- *.odl \
- *.cs \
- *.php \
- *.php3 \
- *.inc \
- *.m \
- *.mm \
- *.dox \
- *.py \
- *.f90 \
- *.f \
- *.vhd \
- *.vhdl
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories
-# should be searched for input files as well. Possible values are YES and NO.
-# If left blank NO is used.
-
-RECURSIVE = YES
-
-# The EXCLUDE tag can be used to specify files and/or directories that should
-# excluded from the INPUT source files. This way you can easily exclude a
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-
-EXCLUDE =
-
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
-# directories that are symbolic links (a Unix filesystem feature) are excluded
-# from the input.
-
-EXCLUDE_SYMLINKS = NO
-
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories. Note that the wildcards are matched
-# against the file with absolute path, so to exclude all test directories
-# for example use the pattern */test/*
-
-EXCLUDE_PATTERNS =
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-# (namespaces, classes, functions, etc.) that should be excluded from the
-# output. The symbol name can be a fully qualified name, a word, or if the
-# wildcard * is used, a substring. Examples: ANamespace, AClass,
-# AClass::ANamespace, ANamespace::*Test
-
-EXCLUDE_SYMBOLS =
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or
-# directories that contain example code fragments that are included (see
-# the \include command).
-
-EXAMPLE_PATH =
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank all files are included.
-
-EXAMPLE_PATTERNS = *
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude
-# commands irrespective of the value of the RECURSIVE tag.
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or
-# directories that contain image that are included in the documentation (see
-# the \image command).
-
-IMAGE_PATH = ../../AudioManGUI
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command <filter> <input-file>, where <filter>
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
-# input file. Doxygen will then use the output that the filter program writes
-# to standard output. If FILTER_PATTERNS is specified, this tag will be
-# ignored.
-
-INPUT_FILTER =
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis. Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match. The filters are a list of the form:
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
-# is applied to all files.
-
-FILTER_PATTERNS =
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will be used to filter the input files when producing source
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will
-# be generated. Documented entities will be cross-referenced with these sources.
-# Note: To get rid of all source code in the generated output, make sure also
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER = YES
-
-# Setting the INLINE_SOURCES tag to YES will include the body
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
-# doxygen to hide any special comment blocks from generated source code
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES
-# then for each documented function all documented
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = NO
-
-# If the REFERENCES_RELATION tag is set to YES
-# then for each documented function all documented entities
-# called/used by that function will be listed.
-
-REFERENCES_RELATION = NO
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code. Otherwise they will link to the documentation.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code
-# will point to the HTML generated by the htags(1) tool instead of doxygen
-# built-in source browser. The htags tool is part of GNU's global source
-# tagging system (see http://www.gnu.org/software/global/global.html). You
-# will need version 4.8.6 or higher.
-
-USE_HTAGS = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
-# will generate a verbatim copy of the header file for each class for
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
-# of all compounds will be generated. Enable this if the project
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX = YES
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX = 5
-
-# In case all classes in a project start with a common prefix, all
-# classes will be put under the same header in the alphabetical index.
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX =
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
-# generate HTML output.
-
-GENERATE_HTML = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT = html
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard header.
-
-HTML_HEADER =
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard footer.
-
-HTML_FOOTER =
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
-# style sheet that is used by each HTML page. It can be used to
-# fine-tune the look of the HTML output. If the tag is left blank doxygen
-# will generate a default style sheet. Note that doxygen will try to copy
-# the style sheet file to the HTML output directory, so don't put your own
-# stylesheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET =
-
-# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
-# Doxygen will adjust the colors in the stylesheet and background images
-# according to this color. Hue is specified as an angle on a colorwheel,
-# see http://en.wikipedia.org/wiki/Hue for more information.
-# For instance the value 0 represents red, 60 is yellow, 120 is green,
-# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
-# The allowed range is 0 to 359.
-
-HTML_COLORSTYLE_HUE = 220
-
-# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
-# the colors in the HTML output. For a value of 0 the output will use
-# grayscales only. A value of 255 will produce the most vivid colors.
-
-HTML_COLORSTYLE_SAT = 100
-
-# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
-# the luminance component of the colors in the HTML output. Values below
-# 100 gradually make the output lighter, whereas values above 100 make
-# the output darker. The value divided by 100 is the actual gamma applied,
-# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
-# and 100 does not change the gamma.
-
-HTML_COLORSTYLE_GAMMA = 80
-
-# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
-# page will contain the date and time when the page was generated. Setting
-# this to NO can help when comparing the output of multiple runs.
-
-HTML_TIMESTAMP = YES
-
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
-# files or namespaces will be aligned in HTML using tables. If set to
-# NO a bullet list will be used.
-
-HTML_ALIGN_MEMBERS = YES
-
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
-# documentation will contain sections that can be hidden and shown after the
-# page has loaded. For this to work a browser that supports
-# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
-# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
-
-HTML_DYNAMIC_SECTIONS = YES
-
-# If the GENERATE_DOCSET tag is set to YES, additional index files
-# will be generated that can be used as input for Apple's Xcode 3
-# integrated development environment, introduced with OSX 10.5 (Leopard).
-# To create a documentation set, doxygen will generate a Makefile in the
-# HTML output directory. Running make will produce the docset in that
-# directory and running "make install" will install the docset in
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
-# it at startup.
-# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
-# for more information.
-
-GENERATE_DOCSET = NO
-
-# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
-# feed. A documentation feed provides an umbrella under which multiple
-# documentation sets from a single provider (such as a company or product suite)
-# can be grouped.
-
-DOCSET_FEEDNAME = "Doxygen generated docs"
-
-# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
-# should uniquely identify the documentation set bundle. This should be a
-# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
-# will append .docset to the name.
-
-DOCSET_BUNDLE_ID = org.doxygen.Project
-
-# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
-# the documentation publisher. This should be a reverse domain-name style
-# string, e.g. com.mycompany.MyDocSet.documentation.
-
-DOCSET_PUBLISHER_ID = org.doxygen.Publisher
-
-# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
-
-DOCSET_PUBLISHER_NAME = Publisher
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-# will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
-# be used to specify the file name of the resulting .chm file. You
-# can add a path in front of the file if the result should not be
-# written to the html output directory.
-
-CHM_FILE =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
-# be used to specify the location (absolute path including file name) of
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
-# controls if a separate .chi index file is generated (YES) or that
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
-# is used to encode HtmlHelp index (hhk), content (hhc) and project file
-# content.
-
-CHM_INDEX_ENCODING =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
-# controls whether a binary table of contents is generated (YES) or a
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND = NO
-
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
-# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
-# that can be used as input for Qt's qhelpgenerator to generate a
-# Qt Compressed Help (.qch) of the generated HTML documentation.
-
-GENERATE_QHP = NO
-
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
-# be used to specify the file name of the resulting .qch file.
-# The path specified is relative to the HTML output folder.
-
-QCH_FILE =
-
-# The QHP_NAMESPACE tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#namespace
-
-QHP_NAMESPACE = org.doxygen.Project
-
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#virtual-folders
-
-QHP_VIRTUAL_FOLDER = doc
-
-# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
-# add. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#custom-filters
-
-QHP_CUST_FILTER_NAME =
-
-# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
-# custom filter to add. For more information please see
-# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
-# Qt Help Project / Custom Filters</a>.
-
-QHP_CUST_FILTER_ATTRS =
-
-# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
-# project's
-# filter section matches.
-# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
-# Qt Help Project / Filter Attributes</a>.
-
-QHP_SECT_FILTER_ATTRS =
-
-# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
-# be used to specify the location of Qt's qhelpgenerator.
-# If non-empty doxygen will try to run qhelpgenerator on the generated
-# .qhp file.
-
-QHG_LOCATION =
-
-# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
-# will be generated, which together with the HTML files, form an Eclipse help
-# plugin. To install this plugin and make it available under the help contents
-# menu in Eclipse, the contents of the directory containing the HTML and XML
-# files needs to be copied into the plugins directory of eclipse. The name of
-# the directory within the plugins directory should be the same as
-# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
-# the help appears.
-
-GENERATE_ECLIPSEHELP = YES
-
-# A unique identifier for the eclipse help plugin. When installing the plugin
-# the directory name containing the HTML and XML files should also have
-# this name.
-
-ECLIPSE_DOC_ID = org.doxygen.Project
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
-# top of each HTML page. The value NO (the default) enables the index and
-# the value YES disables it.
-
-DISABLE_INDEX = NO
-
-# This tag can be used to set the number of enum values (range [1..20])
-# that doxygen will group on one line in the generated HTML documentation.
-
-ENUM_VALUES_PER_LINE = 4
-
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information.
-# If the tag value is set to YES, a side panel will be generated
-# containing a tree-like index structure (just like the one that
-# is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
-# Windows users are probably better off using the HTML help feature.
-
-GENERATE_TREEVIEW = YES
-
-# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
-# and Class Hierarchy pages using a tree view instead of an ordered list.
-
-USE_INLINE_TREES = YES
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
-# used to set the initial width (in pixels) of the frame in which the tree
-# is shown.
-
-TREEVIEW_WIDTH = 250
-
-# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
-# links to external symbols imported via tag files in a separate window.
-
-EXT_LINKS_IN_WINDOW = NO
-
-# Use this tag to change the font size of Latex formulas included
-# as images in the HTML documentation. The default is 10. Note that
-# when you change the font size after a successful doxygen run you need
-# to manually remove any form_*.png images from the HTML output directory
-# to force them to be regenerated.
-
-FORMULA_FONTSIZE = 10
-
-# Use the FORMULA_TRANPARENT tag to determine whether or not the images
-# generated for formulas are transparent PNGs. Transparent PNGs are
-# not supported properly for IE 6.0, but are supported on all modern browsers.
-# Note that when changing this option you need to delete any form_*.png files
-# in the HTML output before the changes have effect.
-
-FORMULA_TRANSPARENT = YES
-
-# When the SEARCHENGINE tag is enabled doxygen will generate a search box
-# for the HTML output. The underlying search engine uses javascript
-# and DHTML and should work on any modern browser. Note that when using
-# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
-# (GENERATE_DOCSET) there is already a search function so this one should
-# typically be disabled. For large projects the javascript based search engine
-# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
-
-SEARCHENGINE = YES
-
-# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
-# implemented using a PHP enabled web server instead of at the web client
-# using Javascript. Doxygen will generate the search PHP script and index
-# file to put on the web server. The advantage of the server
-# based approach is that it scales better to large projects and allows
-# full text search. The disadvances is that it is more difficult to setup
-# and does not have live searching capabilities.
-
-SERVER_BASED_SEARCH = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
-# generate Latex output.
-
-GENERATE_LATEX = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked. If left blank `latex' will be used as the default command name.
-# Note that when enabling USE_PDFLATEX this option is only used for
-# generating bitmaps for formulas in the HTML output, but not in the
-# Makefile that is written to the output directory.
-
-LATEX_CMD_NAME = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
-# generate index for LaTeX. If left blank `makeindex' will be used as the
-# default command name.
-
-MAKEINDEX_CMD_NAME = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
-# LaTeX documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_LATEX = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used
-# by the printer. Possible values are: a4, a4wide, letter, legal and
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE = a4wide
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES =
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
-# the generated latex document. The header should contain everything until
-# the first chapter. If it is left blank doxygen will generate a
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER =
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will
-# contain links (just like the HTML output) instead of page references
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS = YES
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
-# plain latex in the generated Makefile. Set this option to YES to get a
-# higher quality PDF documentation.
-
-USE_PDFLATEX = YES
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
-# command to the generated LaTeX files. This will instruct LaTeX to keep
-# running if errors occur, instead of asking the user for help.
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not
-# include the index chapters (such as File Index, Compound Index, etc.)
-# in the output.
-
-LATEX_HIDE_INDICES = NO
-
-# If LATEX_SOURCE_CODE is set to YES then doxygen will include
-# source code with syntax highlighting in the LaTeX output.
-# Note that which sources are shown also depends on other settings
-# such as SOURCE_BROWSER.
-
-LATEX_SOURCE_CODE = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
-# The RTF output is optimized for Word 97 and may not look very pretty with
-# other RTF readers or editors.
-
-GENERATE_RTF = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
-# RTF documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_RTF = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
-# will contain hyperlink fields. The RTF file will
-# contain links (just like the HTML output) instead of page references.
-# This makes the output suitable for online browsing using WORD or other
-# programs which support those fields.
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's
-# config file, i.e. a series of assignments. You only have to provide
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE =
-
-# Set optional variables used in the generation of an rtf document.
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
-# generate man pages
-
-GENERATE_MAN = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT = man
-
-# The MAN_EXTENSION tag determines the extension that is added to
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
-# then it will generate one additional man file for each entity
-# documented in the real man page(s). These additional files
-# only source the real man page, but without them the man command
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will
-# generate an XML file that captures the structure of
-# the code including all documentation.
-
-GENERATE_XML = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_SCHEMA =
-
-# The XML_DTD tag can be used to specify an XML DTD,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_DTD =
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
-# dump the program listings (including syntax highlighting
-# and cross-referencing information) to the XML output. Note that
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
-# generate an AutoGen Definitions (see autogen.sf.net) file
-# that captures the structure of the code including all
-# documentation. Note that this feature is still experimental
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will
-# generate a Perl module file that captures the structure of
-# the code including all documentation. Note that this
-# feature is still experimental and incomplete at the
-# moment.
-
-GENERATE_PERLMOD = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
-# nicely formatted so it can be parsed by a human reader. This is useful
-# if you want to understand what is going on. On the other hand, if this
-# tag is set to NO the size of the Perl module output will be much smaller
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY = YES
-
-# The names of the make variables in the generated doxyrules.make file
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
-# This is useful so different doxyrules.make files included by the same
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
-# evaluate all C-preprocessor directives found in the sources and include
-# files.
-
-ENABLE_PREPROCESSING = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
-# names in the source code. If set to NO (the default) only conditional
-# compilation will be performed. Macro expansion can be done in a controlled
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
-# then the macro expansion is limited to the macros specified with the
-# PREDEFINED and EXPAND_AS_DEFINED tags.
-
-EXPAND_ONLY_PREDEF = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
-# in the INCLUDE_PATH (see below) will be search if a #include is found.
-
-SEARCH_INCLUDES = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by
-# the preprocessor.
-
-INCLUDE_PATH =
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will
-# be used.
-
-INCLUDE_FILE_PATTERNS =
-
-# The PREDEFINED tag can be used to specify one or more macro names that
-# are defined before the preprocessor is started (similar to the -D option of
-# gcc). The argument of the tag is a list of macros of the form: name
-# or name=definition (no spaces). If the definition and the = are
-# omitted =1 is assumed. To prevent a macro definition from being
-# undefined via #undef or recursively expanded use the := operator
-# instead of the = operator.
-
-PREDEFINED =
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
-# this tag can be used to specify a list of macro names that should be expanded.
-# The macro definition that is found in the sources will be used.
-# Use the PREDEFINED tag if you want to use a different macro definition.
-
-EXPAND_AS_DEFINED =
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-# doxygen's preprocessor will remove all function-like macros that are alone
-# on a line, have an all uppercase name, and do not end with a semicolon. Such
-# function macros are typically used for boiler-plate code, and will confuse
-# the parser if not removed.
-
-SKIP_FUNCTION_MACROS = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles.
-# Optionally an initial location of the external documentation
-# can be added for each tagfile. The format of a tag file without
-# this location is as follows:
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where "loc1" and "loc2" can be relative or absolute paths or
-# URLs. If a location is present for each tag, the installdox tool
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen
-# is run, you must also specify the path to the tagfile here.
-
-TAGFILES =
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE =
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed
-# in the class index. If set to NO only the inherited external classes
-# will be listed.
-
-ALLEXTERNALS = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will
-# be listed.
-
-EXTERNAL_GROUPS = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
-# or super classes. Setting the tag to NO turns the diagrams off. Note that
-# this option is superseded by the HAVE_DOT option below. This is only a
-# fallback. It is recommended to install and use dot, since it yields more
-# powerful graphs.
-
-CLASS_DIAGRAMS = NO
-
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see
-# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-MSCGEN_PATH =
-
-# If set to YES, the inheritance and collaboration graphs will hide
-# inheritance and usage relations if the target is undocumented
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz, a graph visualization
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT = YES
-
-# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
-# allowed to run in parallel. When set to 0 (the default) doxygen will
-# base this on the number of processors available in the system. You can set it
-# explicitly to a value larger than 0 to get control over the balance
-# between CPU load and processing speed.
-
-DOT_NUM_THREADS = 0
-
-# By default doxygen will write a font called FreeSans.ttf to the output
-# directory and reference it in all dot files that doxygen generates. This
-# font does not include all possible unicode characters however, so when you need
-# these (or just want a differently looking font) you can specify the font name
-# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
-# which can be done by putting it in a standard location or by setting the
-# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
-# containing the font.
-
-DOT_FONTNAME = FreeSans.ttf
-
-# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
-# The default size is 10pt.
-
-DOT_FONTSIZE = 10
-
-# By default doxygen will tell dot to use the output directory to look for the
-# FreeSans.ttf font (which doxygen will put there itself). If you specify a
-# different font using DOT_FONTNAME you can set the path where dot
-# can find it using this tag.
-
-DOT_FONTPATH =
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect inheritance relations. Setting this tag to YES will force the
-# the CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect implementation dependencies (inheritance, containment, and
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH = YES
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for groups, showing the direct groups dependencies
-
-GROUP_GRAPHS = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
-# Language.
-
-UML_LOOK = NO
-
-# If set to YES, the inheritance and collaboration graphs will show the
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS = NO
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
-# tags are set to YES then doxygen will generate a graph for each documented
-# file showing the direct and indirect include dependencies of the file with
-# other documented files.
-
-INCLUDE_GRAPH = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
-# documented header file showing the documented files that directly or
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH = YES
-
-# If the CALL_GRAPH and HAVE_DOT options are set to YES then
-# doxygen will generate a call dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable call graphs
-# for selected functions only using the \callgraph command.
-
-CALL_GRAPH = YES
-
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
-# doxygen will generate a caller dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable caller
-# graphs for selected functions only using the \callergraph command.
-
-CALLER_GRAPH = YES
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
-# will graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY = YES
-
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
-# then doxygen will show the dependencies a directory has on other directories
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
-
-DIRECTORY_GRAPH = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot. Possible values are png, jpg, or gif
-# If left blank png will be used.
-
-DOT_IMAGE_FORMAT = png
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be
-# found. If left blank, it is assumed the dot tool can be found in the path.
-
-DOT_PATH =
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the
-# \dotfile command).
-
-DOTFILE_DIRS =
-
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
-# nodes that will be shown in the graph. If the number of nodes in a graph
-# becomes larger than this value, doxygen will truncate the graph, which is
-# visualized by representing a node as a red box. Note that doxygen if the
-# number of direct children of the root node in a graph is already larger than
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
-# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-
-DOT_GRAPH_MAX_NODES = 50
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
-# graphs generated by dot. A depth value of 3 means that only nodes reachable
-# from the root by following a path via at most 3 edges will be shown. Nodes
-# that lay further from the root node will be omitted. Note that setting this
-# option to 1 or 2 may greatly reduce the computation time needed for large
-# code bases. Also note that the size of a graph can be further restricted by
-# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
-
-MAX_DOT_GRAPH_DEPTH = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, because dot on Windows does not
-# seem to support this out of the box. Warning: Depending on the platform used,
-# enabling this option may lead to badly anti-aliased labels on the edges of
-# a graph (i.e. they become hard to read).
-
-DOT_TRANSPARENT = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10)
-# support this, this feature is disabled by default.
-
-DOT_MULTI_TARGETS = NO
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
-# generate a legend page explaining the meaning of the various boxes and
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
-# remove the intermediate dot files that are used to generate
-# the various graphs.
-
-DOT_CLEANUP = YES
+++ /dev/null
-/**
- * Copyright (C) 2011, BMW AG
- *
- * PlayerGui
- *
- * \file main.cpp
- *
- * \date 20.05.2011
- * \author Christian Müller (christian.ei.mueller@bmw.de)
- *
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
- *
- * This Tool serves as test HMI interface in order to test the Genivi AudioManager. It is not intended to be production SW.
- *
- */
-
-#include <QtGui>
-#include <QApplication>
-#include <QStringList>
-#include "playerGui.h"
-#include "player.h"
-
-#include <iostream>
-using namespace std;
-
-int main(int argc, char *argv[])
-{
- if (!g_thread_supported ())
- g_thread_init (NULL);
-
- gst_init (&argc, &argv);
-
- QApplication a(argc, argv);
- QStringList args = a.arguments();
-
- playerGui w;
-
- if (args.count()<2) {
- cout<<"You need to enter one of the following arguments:"<<endl;
- cout<<"player file.mp3"<<endl;
- cout<<"navigation"<<endl;
- cout<<"radio"<<endl;
- cout<<"ta"<<endl;
- }
-
- player* play;
- Ui::playerguiClass ui=w.returnUi();
- bool run=true;
-
- if (args.at(1).compare("player")==0) {
- QFile file(args.at(2));
- if (QFile::exists(args.at(2))) {
- a.setApplicationName("player");
- play = new player(args.at(2),ui,player::simple,"player");
- } else {
- cout<<"File Name :"<<args.at(2).toStdString()<<" not found"<<endl;
- run=false;
- }
- } else if (args.at(1).compare("navigation")==0){
- a.setApplicationName("navigation");
- QString file=QDir::currentPath().remove("bin").append("music/navi.mp3");
- play = new player(file,ui,player::navigation,"navigation");
- } else if (args.at(1).compare("radio")==0) {
- a.setApplicationName("radio");
- QString file=QDir::currentPath().remove("bin").append("music/radio.mp3");
- play = new player(file,ui,player::simple,"radio");
- } else if (args.at(1).compare("ta")==0) {
- a.setApplicationName("ta");
- QString file=QDir::currentPath().remove("bin").append("music/ta.mp3");
- play = new player(file,ui,player::ta,"ta");
- }
-
- if (run) {
- w.registerPlayer(*play);
- w.setWindowTitle(a.applicationName());
- w.show();
- return a.exec();
- }
-}
+++ /dev/null
-/**
- * \mainpage
- * \image html "Bild1.png"
- * Copyright Copyright (C) 2011, BMW AG
- *
- * \date 22.06.2011
- * \author Christian Müller (christian.ei.mueller@bmw.de)
- *
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
- *
- * \section About About PlayerGUI
- * This program serves as test Player App for the AudioManager. It is designed to be a test & demonstration tool. It is not meant to be used in series production.
- *
- * \section Info More information
- * can be found at <https://collab.genivi.org/wiki/display/genivi/GENIVI+Home>
- *
- * \todo Improve the interface further
- * \todo Volume changes are only set, not read out before setting. This results into a none nice way of changing the volume
- * \todo nicer layouts.
- */
-
-#ifndef MAINPAGE_H_
-#define MAINPAGE_H_
-
-
-#endif /* MAINPAGE_H_ */
+++ /dev/null
-/**
- * Copyright (C) 2011, BMW AG
- *
- * PlayerGUI
- *
- * \file player.cpp
- *
- * \date 20.05.2011
- * \author Christian Müller (christian.ei.mueller@bmw.de)
- *
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
- *
- * This Tool serves as test HMI interface in order to test the Genivi AudioManager. It is not intended to be production SW.
- *
- */
-
-#include "player.h"
-#include "DBusSend.h"
-#include "DBusTypes.h"
-#include <string.h>
-#include <iostream>
-
-using namespace std;
-
-player::player(const QString& file, Ui::playerguiClass ui, playerType type, QString appName) {
-
- m_play_file = "file://";
- m_play_file.append(file);
- m_ui=ui;
- music =createPlayer(MusicCategory,MediaSource(m_play_file));
- SeekSlider *slider = new SeekSlider;
- slider->setMediaObject(music);
- ui.sliderplace->addWidget(slider);
- slider->show();
- ui.label->setText(file);
- REGISTER_METATYPES
- sender=new DBusSend("org.Genivi.ControllerInterface", "/Control", QDBusConnection::sessionBus(), 0);
- QObject::connect((const QObject*)sender,SIGNAL(signal_numberOfSinksChanged()),(const QObject*)this, SLOT(slot_numberOfSinksChanged()));
- m_type=type;
- m_appName=appName;
- if (m_type !=simple) {
- m_sinks=sender->getListSinks();
- ui.sinklabel->show();
- ui.sinklist->show();
- foreach (SinkType type, m_sinks) {
- ui.sinklist->addItem(type.name);
- }
- } else {
- ui.sinklabel->hide();
- ui.sinklist->hide();
- }
-
-}
-
-player::~player() {
- // TODO Auto-generated destructor stub
-}
-
-void player::play() {
- if (m_type !=simple) {
- m_interruptID=sender->interruptRequest(m_appName,m_ui.sinklist->currentText());
- cout<<"interrupt ID app name"<<m_interruptID<<" "<<m_appName.toStdString()<<endl;
- }
- music->play();
-}
-
-void player::stop() {
- music->stop();
- if (m_type !=simple) {
- sender->interruptResume(m_interruptID);
- }
-}
-
-void player::slot_numberOfSinksChanged() {
- m_sinks=sender->getListSinks();
- m_ui.sinklist->clear();
- m_ui.sinklabel->show();
- m_ui.sinklist->show();
- foreach (SinkType type, m_sinks) {
- m_ui.sinklist->addItem(type.name);
- }
- m_sinks=sender->getListSinks();
-}
+++ /dev/null
-/**
- * Copyright (C) 2011, BMW AG
- *
- * PlayerGUI
- *
- * \file player.h
- *
- * \date 20.05.2011
- * \author Christian Müller (christian.ei.mueller@bmw.de)
- *
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
- *
- * This Tool serves as test HMI interface in order to test the Genivi AudioManager. It is not intended to be production SW.
- *
- */
-
-#ifndef PLAYER_H_
-#define PLAYER_H_
-
-#include <gst/gst.h>
-#include <glib.h>
-#include <QString>
-#include <QObject>
-#include <phonon/phonon>
-#include <QtGui/QWidget>
-#include "qstandarditemmodel.h"
-#include "ui_playergui.h"
-#include "DBusSend.h"
-#include "DBusTypes.h"
-
-using namespace Phonon;
-
-class player : public QObject {
-
-Q_OBJECT
-
-public:
- typedef enum e_playerType {
- simple,
- navigation,
- ta
- } playerType;
-
- player(const QString& file,Ui::playerguiClass ui,playerType type,QString appName);
- virtual ~player();
-
- void play(void);
- void stop(void);
-
-public slots:
- void slot_numberOfSinksChanged();
-
-private:
- MediaObject *music;
- QString m_play_file;
- DBusSend* sender;
- playerType m_type;
- QString m_appName;
- int m_interruptID;
- QList<SinkType> m_sinks;
- Ui_playerguiClass m_ui;
-};
-
-#endif /* PLAYER_H_ */
+++ /dev/null
-/**
- * Copyright (C) 2011, BMW AG
- *
- * PlayerGUI
- *
- * \file playerGui.cpp
- *
- * \date 20.05.2011
- * \author Christian Müller (christian.ei.mueller@bmw.de)
- *
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
- *
- * This Tool serves as test HMI interface in order to test the Genivi AudioManager. It is not intended to be production SW.
- *
- */
-
-#include "playerGui.h"
-#include <iostream>
-
-using namespace std;
-
-
-playerGui::playerGui(QWidget *parent) : QWidget(parent) {
- ui.setupUi(this);
- QObject::connect((const QObject*)ui.play,SIGNAL (clicked()),(const QObject*)this,SLOT (play()));
- QObject::connect((const QObject*)ui.stop,SIGNAL (clicked()),(const QObject*)this,SLOT (stop()));
-}
-
-playerGui::~playerGui() {
-}
-
-void playerGui::registerPlayer(player& play) {
- m_play=&play;
-}
-
-void playerGui::play() {
- m_play->play();
-}
-
-void playerGui::stop() {
- m_play->stop();
-}
-
-Ui::playerguiClass playerGui::returnUi() {
- return ui;
-}
+++ /dev/null
-/**
- * Copyright (C) 2011, BMW AG
- *
- * PlayerGUI
- *
- * \file playerGui.h
- *
- * \date 20.05.2011
- * \author Christian Müller (christian.ei.mueller@bmw.de)
- *
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
- *
- * This Tool serves as test HMI interface in order to test the Genivi AudioManager. It is not intended to be production SW.
- *
- */
-#include <QtGui/QWidget>
-#include "qstandarditemmodel.h"
-#include "ui_playergui.h"
-#include "player.h"
-
-#ifndef PLAYERGUI_H_
-#define PLAYERGUI_H_
-
-class playerGui :public QWidget {
- Q_OBJECT
-public:
- playerGui(QWidget *parent = 0);
- virtual ~playerGui();
-
- void registerPlayer(player& play_);
- Ui::playerguiClass returnUi();
-
-public slots:
- void play(void);
- void stop(void);
-
-private:
- Ui::playerguiClass ui;
- player* m_play;
-};
-
-#endif /* PLAYERGUI_H_ */
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>playerguiClass</class>
- <widget class="QWidget" name="playerguiClass">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>591</width>
- <height>140</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Form</string>
- </property>
- <widget class="QPushButton" name="play">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>100</y>
- <width>98</width>
- <height>27</height>
- </rect>
- </property>
- <property name="text">
- <string>Play</string>
- </property>
- </widget>
- <widget class="QPushButton" name="stop">
- <property name="geometry">
- <rect>
- <x>480</x>
- <y>100</y>
- <width>98</width>
- <height>27</height>
- </rect>
- </property>
- <property name="text">
- <string>Stop</string>
- </property>
- </widget>
- <widget class="QLabel" name="label">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>50</y>
- <width>371</width>
- <height>16</height>
- </rect>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- <widget class="QWidget" name="horizontalLayoutWidget">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>70</y>
- <width>561</width>
- <height>21</height>
- </rect>
- </property>
- <layout class="QHBoxLayout" name="sliderplace"/>
- </widget>
- <widget class="QSplitter" name="splitter">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>10</y>
- <width>561</width>
- <height>27</height>
- </rect>
- </property>
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <widget class="QLabel" name="sinklabel">
- <property name="text">
- <string>Sink:</string>
- </property>
- </widget>
- <widget class="QComboBox" name="sinklist"/>
- </widget>
- </widget>
- <resources/>
- <connections/>
-</ui>
set(EXECUTABLE_OUTPUT_PATH ../../bin/)
set(LIBRARY_OUTPUT_PATH ../plugins/command)
set(DOC_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/../doc/CommandDBusPlugin)
+set(AUDIO_INCLUDES_FOLDER ${CMAKE_SOURCE_DIR}/../includes)
+set(DBUS_INCLUDES_FOLDER ${CMAKE_SOURCE_DIR}/../dbusIncludes)
+set(INCLUDES_FOLDER ${CMAKE_SOURCE_DIR}/include)
find_package (Threads)
FIND_PACKAGE(DBUS REQUIRED)
${CMAKE_CURRENT_BINARY_DIR}
${DBUS_INCLUDE_DIR}
${DBUS_ARCH_INCLUDE_DIR}
- ../AudioManagerDaemon
+ ${AUDIO_INCLUDES_FOLDER}
+ ${INCLUDES_FOLDER}
+ ${DBUS_INCLUDES_FOLDER}
)
# all source files go here
-SET(PLUGINDBUS_SRCS_CXX
- CommandDbusReceive.cpp
- DbusInterface.cpp
- DBUSMessageHandler.cpp
- DbusSend.cpp
-)
+file(GLOB PLUGINDBUS_SRCS_CXX "src/*.cpp")
add_library(PluginCommandInterfaceDbus SHARED ${PLUGINDBUS_SRCS_CXX})
+++ /dev/null
-/**
- *
- * Copyright (C) 2011, BMW AG
- *
- * PluginDBus
- *
- * \file DBusInterface.cpp
- *
- * \date 20.05.2011
- * \author Christian Müller (christian.ei.mueller@bmw.de)
- *
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
- */
-
-#include "headers.h"
-#include <iostream>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <errno.h>
-
-DLT_IMPORT_CONTEXT(DBusCommandPlugin);
-
-class CommandDbusReceive;
-
-
-CommandDbusReceive* CommandDbusReceive::m_reference = NULL;
-
-static DBUSMessageHandler* g_pDbusMessage;
-
-static MethodTable manager_methods[] =
-{
- { "connect", "uu", "u", &CommandDbusReceive::connect },
- { "disconnect", "uu", "u", &CommandDbusReceive::disconnect },
- { "getListConnections", "", "a(ii)", &CommandDbusReceive::getListConnections },
- { "getListSinks", "", "a(si)", &CommandDbusReceive::getListSinks },
- { "getListSources", "", "a(si)", &CommandDbusReceive::getListSources },
- { "interruptRequest", "ss", "u", &CommandDbusReceive::interruptRequest },
- { "interruptResume", "s", "u", &CommandDbusReceive::interruptResume },
- { "setVolume", "ss", "u", &CommandDbusReceive::setVolume },
- { "", "", "", NULL }
-};
-
-static SignalTable manager_signals[] = {
- { "signal_connectionChanged", ""},
- { "signal_numberOfSinksChanged", ""},
- { "signal_numberOfSourcesChanged", ""},
- { "", ""}
-};
-
-static DBusObjectPathVTable vtable =
-{
- NULL,CommandDbusReceive::receive_callback,NULL, NULL, NULL, NULL
-};
-
-
-
-CommandDbusReceive::CommandDbusReceive(CommandReceiveInterface* r_interface, dbusRoothandler* roothandler): m_audioman(r_interface),m_Introspection(new DBUSIntrospection(manager_methods, manager_signals,std::string(MY_NODE))),m_roothandler(roothandler) {
-}
-
-bool CommandDbusReceive::startup_interface() {
- DLT_LOG(DBusCommandPlugin, DLT_LOG_INFO, DLT_STRING("Starting up dbus connector"));
- g_pDbusMessage = new DBUSMessageHandler(&vtable,m_roothandler->returnConnection(),this);
- return true;
-}
-
-void CommandDbusReceive::stop() {
- DLT_LOG(DBusCommandPlugin, DLT_LOG_INFO, DLT_STRING("Stopped dbus communication"));
- delete g_pDbusMessage;
-}
-
-void CommandDbusReceive::connect(DBusConnection* conn, DBusMessage* msg) {
- (void)conn; // TODO: remove, only prevents warning
- g_pDbusMessage->initReceive(msg);
- source_t source = g_pDbusMessage->getUInt();
- sink_t sink = g_pDbusMessage->getUInt();
- connection_t connect=m_audioman->connect(source, sink);
- g_pDbusMessage->initReply(msg);
- g_pDbusMessage->append((unsigned int)connect);
- g_pDbusMessage->closeReply();
-
-}
-void CommandDbusReceive::disconnect(DBusConnection* conn, DBusMessage* msg) {
- (void)conn; // TODO: remove, only prevents warning
- g_pDbusMessage->initReceive(msg);
- source_t source = g_pDbusMessage->getUInt();
- sink_t sink = g_pDbusMessage->getUInt();
- connection_t connect=m_audioman->disconnect(source, sink);
- g_pDbusMessage->initReply(msg);
- g_pDbusMessage->append((unsigned int)connect);
- g_pDbusMessage->closeReply();
-}
-
-void CommandDbusReceive::getListConnections(DBusConnection* conn, DBusMessage* msg) {
- (void)conn; // TODO: remove, only prevents warning
- std::list<ConnectionType> list=m_audioman->getListConnections();
- g_pDbusMessage->initReply(msg);
- g_pDbusMessage->append(list);
- g_pDbusMessage->closeReply();
-
-}
-
-void CommandDbusReceive::getListSinks(DBusConnection* conn, DBusMessage* msg) {
- (void)conn; // TODO: remove, only prevents warning
- std::list<SinkType> list=m_audioman->getListSinks();
- g_pDbusMessage->initReply(msg);
- g_pDbusMessage->append(list);
- g_pDbusMessage->closeReply();
-
-}
-
-void CommandDbusReceive::getListSources(DBusConnection* conn, DBusMessage* msg) {
- (void)conn; // TODO: remove, only prevents warning
- std::list<SourceType> list=m_audioman->getListSources();
- g_pDbusMessage->initReply(msg);
- g_pDbusMessage->append(list);
- g_pDbusMessage->closeReply();
-
-}
-
-void CommandDbusReceive::interruptRequest(DBusConnection* conn, DBusMessage* msg) {
- (void)conn; // TODO: remove, only prevents warning
- g_pDbusMessage->initReceive(msg);
- char* source = g_pDbusMessage->getString();
- char* sink = g_pDbusMessage->getString();
- genInt_t interrupt=m_audioman->interruptRequest(source, sink);
- g_pDbusMessage->initReply(msg);
- g_pDbusMessage->append((unsigned int)interrupt);
- g_pDbusMessage->closeReply();
-}
-
-void CommandDbusReceive::interruptResume(DBusConnection* conn, DBusMessage* msg) {
- (void)conn; // TODO: remove, only prevents warning
- g_pDbusMessage->initReceive(msg);
- interrupt_t interrupt = g_pDbusMessage->getUInt();
- interrupt_t returnVal=m_audioman->interruptResume(interrupt);
- g_pDbusMessage->initReply(msg);
- g_pDbusMessage->append((unsigned int)returnVal);
- g_pDbusMessage->closeReply();
-}
-
-void CommandDbusReceive::setVolume(DBusConnection* conn, DBusMessage* msg) {
- (void)conn; // TODO: remove, only prevents warning
- g_pDbusMessage->initReceive(msg);
- sink_t sink = g_pDbusMessage->getUInt();
- volume_t volume = g_pDbusMessage->getUInt();
- volume_t returnVolume=m_audioman->setVolume(sink,volume);
- g_pDbusMessage->initReply(msg);
- g_pDbusMessage->append((unsigned int)returnVolume);
- g_pDbusMessage->closeReply();
-}
-
-void CommandDbusReceive::emitSignalConnectionsChanged() {
- g_pDbusMessage->sendSignal(SIG_CONNECTION_CHANGED);
-}
-
-void CommandDbusReceive::emitSignalNumberofSinksChanged() {
- g_pDbusMessage->sendSignal(SIG_NUM_SINKS_CHANGED);
-}
-
-void CommandDbusReceive::emitSignalNumberofSourcesChanged() {
- g_pDbusMessage->sendSignal(SIG_NUM_SOURCES_CHANGED);
-}
-
-DBusHandlerResult CommandDbusReceive::receive_callback (DBusConnection *conn,DBusMessage *msg,void *user_data) {
- m_reference=(CommandDbusReceive*) user_data;
- DLT_LOG(DBusCommandPlugin, DLT_LOG_INFO, DLT_STRING("message received"));
-
- string nodeString =std::string(DBUS_SERVICE_ROOT)+"/"+std::string(MY_NODE);
-
- if (dbus_message_is_method_call(msg, DBUS_INTERFACE_INTROSPECTABLE, "Introspect")) {
- m_reference->m_Introspection->process(conn,msg);
- return DBUS_HANDLER_RESULT_HANDLED;
- }
-
- bool found=false;
- int i = 0;
-
- const char *n = dbus_message_get_member(msg);
- DLT_LOG(DBusCommandPlugin, DLT_LOG_INFO, DLT_STRING("got call for method:"),DLT_STRING(n));
- while (!found && strcmp(manager_methods[i].name, "") != 0) {
- if (dbus_message_is_method_call(msg,DBUS_SERVICE_SERVICE,manager_methods[i].name)) {
- MethodTable entry = manager_methods[i];
- DLT_LOG(DBusCommandPlugin, DLT_LOG_INFO, DLT_STRING("got call for method:"),DLT_STRING(entry.name));
- CallBackMethod m = entry.function;
- (m_reference->*m)(conn, msg);
- found=true;
- return DBUS_HANDLER_RESULT_HANDLED;
- }
- i++;
- }
-
- return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
-}
-
-
+++ /dev/null
-/**
- *
- * Copyright (C) 2011, BMW AG
- *
- * PluginDBus
- *
- * \file DBusInterface.h
- *
- * \date 20.05.2011
- * \author Christian Müller (christian.ei.mueller@bmw.de)
- *
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
- */
-
-#ifndef DBUSINTERFACE_H_
-#define DBUSINTERFACE_H_
-
-#include "headers.h"
-
-class DBUSIntrospection;
-
-class CommandDbusReceive {
-
-public:
- CommandDbusReceive(CommandReceiveInterface* r_interface, dbusRoothandler* roothandler);
-
- bool startup_interface();
- void stop();
- static DBusHandlerResult receive_callback (DBusConnection *,DBusMessage *,void *);
-
- void connect(DBusConnection* conn, DBusMessage* msg);
- void disconnect(DBusConnection* conn, DBusMessage* msg);
- void getListConnections(DBusConnection* conn, DBusMessage* msg);
- void getListSinks(DBusConnection* conn, DBusMessage* msg);
- void getListSources(DBusConnection* conn, DBusMessage* msg);
- void interruptRequest(DBusConnection* conn, DBusMessage* msg);
- void interruptResume(DBusConnection* conn, DBusMessage* msg);
- void setVolume(DBusConnection* conn, DBusMessage* msg);
-
- void emitSignalConnectionsChanged();
- void emitSignalNumberofSinksChanged();
- void emitSignalNumberofSourcesChanged();
-
-private:
- static CommandDbusReceive* m_reference;
- CommandReceiveInterface* m_audioman;
- DBUSIntrospection* m_Introspection;
- dbusRoothandler* m_roothandler;
-};
-
-#endif /* DBUSINTERFACE_H_ */
+++ /dev/null
-
-
-#include "headers.h"
-#include <stdlib.h>
-
-DBUSMessageHandler::DBUSMessageHandler(DBusObjectPathVTable* vtable, DBusConnection* conn, void* reference)
-: m_MessageIter()
-, m_pReply(0)
-, m_serial(0)
-, m_pConnection(conn)
-{
- dbus_error_init(&m_err);
-
- string nodeString =std::string(DBUS_SERVICE_ROOT)+"/"+std::string(MY_NODE);
- dbus_bool_t b=dbus_connection_register_object_path(m_pConnection, nodeString.c_str(), vtable, reference);
- if(!b) {
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("Registering of node"), DLT_STRING(MY_NODE),DLT_STRING("failed"));
- }
-}
-
-DBUSMessageHandler::~DBUSMessageHandler()
-{
- DBusError err;
- dbus_error_init(&err);
- bool errorset = dbus_error_is_set(&err);
- if (errorset)
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("there was an dbus error"));
- }
- dbus_bus_name_has_owner(m_pConnection, DBUS_SERVICE_SERVICE, &err);
- errorset = dbus_error_is_set(&err);
- if (errorset)
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("there was an dbus error"));
- }
- dbus_error_init(&err);
- dbus_bus_release_name(m_pConnection, DBUS_SERVICE_SERVICE, &err);
-}
-
-void DBUSMessageHandler::initReceive(DBusMessage* msg)
-{
- if (!dbus_message_iter_init(msg, &m_MessageIter))
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS Message has no arguments!"));
- }
-}
-
-void DBUSMessageHandler::initReply(DBusMessage* msg)
-{
- // create a reply from the message
- m_pReply = dbus_message_new_method_return(msg);
- dbus_message_iter_init_append(m_pReply, &m_MessageIter);
-}
-
-void DBUSMessageHandler::closeReply()
-{
- // send the reply && flush the connection
- if (!dbus_connection_send(m_pConnection, m_pReply, &m_serial))
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler Out Of Memory!"));
- exit(1);
- }
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler sending reply!"));
- dbus_connection_flush(m_pConnection);
-
- // free the reply
- dbus_message_unref(m_pReply);
- m_pReply = NULL;
-}
-
-void DBUSMessageHandler::ReplyError(DBusMessage* msg, const char* errorname, const char* errorMsg)
-{
- m_pReply = dbus_message_new_error(msg, errorname, errorMsg);
- // send the reply && flush the connection
- if (!dbus_connection_send(m_pConnection, m_pReply, &m_serial))
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler Out Of Memory!"));
- exit(1);
- }
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler sending reply with error!"));
- dbus_connection_flush(m_pConnection);
-
- // free the reply
- dbus_message_unref(m_pReply);
-}
-
-char* DBUSMessageHandler::getString()
-{
- char* param;
-
- if (DBUS_TYPE_STRING != dbus_message_iter_get_arg_type(&m_MessageIter))
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler argument is no string!"));
- }
- else
- {
- dbus_message_iter_get_basic(&m_MessageIter, ¶m);
- dbus_message_iter_next(&m_MessageIter);
- }
- return param;
-}
-
-dbus_bool_t DBUSMessageHandler::getBool()
-{
- dbus_bool_t boolparam;
-
- if (DBUS_TYPE_BOOLEAN != dbus_message_iter_get_arg_type(&m_MessageIter))
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler argument is no bool!"));
- }
- else
- {
- dbus_message_iter_get_basic(&m_MessageIter, &boolparam);
- dbus_message_iter_next(&m_MessageIter);
- }
- return boolparam;
-}
-
-char DBUSMessageHandler::getByte()
-{
- char param;
-
- if (DBUS_TYPE_BYTE != dbus_message_iter_get_arg_type(&m_MessageIter))
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler argument is no byte!"));
- }
- else
- {
- dbus_message_iter_get_basic(&m_MessageIter, ¶m);
- dbus_message_iter_next(&m_MessageIter);
- }
- return param;
-}
-
-dbus_uint32_t DBUSMessageHandler::getUInt()
-{
- dbus_uint32_t param;
-
- if (DBUS_TYPE_UINT32 != dbus_message_iter_get_arg_type(&m_MessageIter))
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler argument is no uint32_t!"));
- }
- else
- {
- dbus_message_iter_get_basic(&m_MessageIter, ¶m);
- dbus_message_iter_next(&m_MessageIter);
- }
- return param;
-}
-
-double DBUSMessageHandler::getDouble()
-{
- double param;
-
- if (DBUS_TYPE_DOUBLE != dbus_message_iter_get_arg_type(&m_MessageIter))
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler argument is no double!"));
- }
- else
- {
- dbus_message_iter_get_basic(&m_MessageIter, ¶m);
- dbus_message_iter_next(&m_MessageIter);
- }
- return param;
-}
-
-void DBUSMessageHandler::getArrayOfUInt(int* pLength, unsigned int** ppArray)
-{
- if (DBUS_TYPE_ARRAY != dbus_message_iter_get_arg_type(&m_MessageIter))
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler argument is no array!"));
- return;
- }
-
- DBusMessageIter arrayIter;
- dbus_message_iter_recurse(&m_MessageIter, &arrayIter);
-
- uint* localArray;
- dbus_message_iter_get_fixed_array(&arrayIter, &localArray, pLength);
-
- *ppArray = new uint[*pLength];
- for (int i = 0; i < *pLength; i++)
- {
- (*ppArray)[i] = localArray[i];
- }
-}
-
-void DBUSMessageHandler::getArrayOfString(std::vector<std::string>* stringVector)
-{
- if (DBUS_TYPE_ARRAY != dbus_message_iter_get_arg_type(&m_MessageIter))
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler argument is no array!"));
- return;
- }
-
- DBusMessageIter arrayIter;
- dbus_message_iter_recurse(&m_MessageIter, &arrayIter);
- bool hasNext = true;
- while (hasNext)
- {
- if (DBUS_TYPE_STRING != dbus_message_iter_get_arg_type(&arrayIter))
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler argument is no string!"));
- }
- char* param;
- dbus_message_iter_get_basic(&arrayIter, ¶m);
-
- stringVector->push_back(std::string(param));
-
- if (dbus_message_iter_has_next(&arrayIter))
- {
- dbus_message_iter_next(&arrayIter);
- }
- else
- {
- hasNext = false;
- }
- }
-}
-
-void DBUSMessageHandler::append(bool toAppend)
-{
- dbus_bool_t mybool=toAppend;
- if (!dbus_message_iter_append_basic(&m_MessageIter, DBUS_TYPE_BOOLEAN, &mybool))
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler Out Of Memory!"));
- exit(1);
- }
-}
-
-void DBUSMessageHandler::append(dbus_uint32_t toAppend)
-{
- if (!dbus_message_iter_append_basic(&m_MessageIter, DBUS_TYPE_UINT32, &toAppend))
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler Out Of Memory!"));
- exit(1);
- }
-}
-
-void DBUSMessageHandler::append(double toAppend)
-{
- if (!dbus_message_iter_append_basic(&m_MessageIter, DBUS_TYPE_DOUBLE, &toAppend))
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler Out Of Memory!"));
- exit(1);
- }
-}
-
-void DBUSMessageHandler::append(char toAppend)
-{
- if (!dbus_message_iter_append_basic(&m_MessageIter, DBUS_TYPE_BYTE, &toAppend))
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler Out Of Memory!"));
- exit(1);
- }
-}
-
-void DBUSMessageHandler::append(unsigned int length, unsigned int *IDs)
-{
- DBusMessageIter arrayIter;
- dbus_message_iter_open_container(&m_MessageIter, DBUS_TYPE_ARRAY, "u", &arrayIter);
- for(unsigned int i = 0; i < length; i++)
- {
- dbus_message_iter_append_basic(&arrayIter, DBUS_TYPE_UINT32, &IDs[i]);
- }
- dbus_message_iter_close_container(&m_MessageIter, &arrayIter);
-}
-
-void DBUSMessageHandler::sendSignal(const char* signalname) {
- dbus_uint32_t serial = 0;
- DBusMessage* msg;
-
- string nodeString =std::string(DBUS_SERVICE_ROOT)+"/"+std::string(MY_NODE);
- msg =dbus_message_new_signal(nodeString.c_str(),DBUS_SERVICE_SERVICE,signalname);
-
- if (NULL == msg)
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("Message null!"));
- this->~DBUSMessageHandler();
- }
-
- if (!dbus_connection_send(m_pConnection, msg, &serial)) {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler Out Of Memory!"));
- this->~DBUSMessageHandler();
- }
-
- dbus_connection_flush(m_pConnection);
-
- // free the message
- dbus_message_unref(msg);
-}
-
-void DBUSMessageHandler::append(std::list<ConnectionType> list){
- DBusMessageIter arrayIter;
- dbus_message_iter_open_container(&m_MessageIter, DBUS_TYPE_ARRAY, "uu", &arrayIter);
-
- std::list<ConnectionType>::iterator Ilist;
- std::list<ConnectionType>::iterator Ibegin=list.begin();
- std::list<ConnectionType>::iterator Iend=list.end();
- for(Ilist=Ibegin;Ilist!=Iend; Ilist++)
- {
- dbus_message_iter_append_basic(&arrayIter, DBUS_TYPE_UINT32, &Ilist->Sink_ID);
- dbus_message_iter_append_basic(&arrayIter, DBUS_TYPE_UINT32, &Ilist->Source_ID);
- }
- dbus_message_iter_close_container(&m_MessageIter, &arrayIter);
-}
-
-void DBUSMessageHandler::append(std::list<SinkType> list){
- DBusMessageIter arrayIter;
- dbus_message_iter_open_container(&m_MessageIter, DBUS_TYPE_ARRAY, "su", &arrayIter);
-
- std::list<SinkType>::iterator Ilist;
- std::list<SinkType>::iterator Ibegin=list.begin();
- std::list<SinkType>::iterator Iend=list.end();
- for(Ilist=Ibegin;Ilist!=Iend; Ilist++)
- {
- dbus_message_iter_append_basic(&arrayIter, DBUS_TYPE_STRING, &Ilist->name);
- dbus_message_iter_append_basic(&arrayIter, DBUS_TYPE_UINT32, &Ilist->ID);
- }
- dbus_message_iter_close_container(&m_MessageIter, &arrayIter);
-
-}
-
-void DBUSMessageHandler::append(std::list<SourceType> list){
- DBusMessageIter arrayIter;
- dbus_message_iter_open_container(&m_MessageIter, DBUS_TYPE_ARRAY, "su", &arrayIter);
-
- std::list<SourceType>::iterator Ilist;
- std::list<SourceType>::iterator Ibegin=list.begin();
- std::list<SourceType>::iterator Iend=list.end();
- for(Ilist=Ibegin;Ilist!=Iend; Ilist++)
- {
- dbus_message_iter_append_basic(&arrayIter, DBUS_TYPE_STRING, &Ilist->name);
- dbus_message_iter_append_basic(&arrayIter, DBUS_TYPE_UINT32, &Ilist->ID);
- }
- dbus_message_iter_close_container(&m_MessageIter, &arrayIter);
-}
-
-
-
-DBUSIntrospection::DBUSIntrospection(MethodTable* methodTable, SignalTable* signalTable,std::string nodename)
-: m_methodTable(methodTable), m_signalTable(signalTable), m_nodename(nodename)
-{
- generateString();
-}
-
-void DBUSIntrospection::generateString()
-{
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("Generating instrospection data!"));
-
- addHeader();
- openNode(m_nodename);
- openInterface("org.freedesktop.DBus.Introspectable");
- openMethod("Introspect");
- addArgument("data", "out", "s");
- closeMethod();
- closeInterface();
- openInterface(DBUS_SERVICE_SERVICE);
-
- int index = 0;
-
- while (strcmp(m_methodTable[index].name, "") != 0)
- {
- MethodTable entry = m_methodTable[index];
- addEntry(entry);
- ++index;
- }
-
- index=0;
- if (m_signalTable) {
- while (strcmp(m_signalTable[index].name, "") != 0)
- {
- SignalTable entry = m_signalTable[index];
- addEntry(entry);
- ++index;
- }
- }
- closeInterface();
- closeNode();
-
-}
-
-void DBUSIntrospection::addHeader(void)
-{
- m_introspectionString << "<!DOCTYPE node PUBLIC \"-//freedesktop//DTD D-BUS"
- << "Object Introspection 1.0//EN\"\n \"http://www.freedesktop.org/standards/"
- << "dbus/1.0/introspect.dtd\"> \n";
-}
-
-void DBUSIntrospection::openNode(string nodename)
-{
- m_introspectionString << "<node name=\"" << nodename << "\"> \n";
-}
-
-void DBUSIntrospection::openInterface(string interfacename)
-{
- m_introspectionString << "<interface name=\"" << interfacename << "\"> \n";
-}
-
-void DBUSIntrospection::openMethod(string methodname)
-{
- m_introspectionString << "<method name=\"" << methodname << "\"> \n";
-}
-
-void DBUSIntrospection::openSignal(string signalname) {
- m_introspectionString<<"<signal name=\"" << signalname << "\"> \n";
-}
-
-void DBUSIntrospection::addArgument(string argname, string direction, string type)
-{
- m_introspectionString << "<arg name=\"" << argname << "\" direction=\""
- << direction << "\" type=\"" << type << "\"/> \n";
-}
-
-
-void DBUSIntrospection::addSignalArgument(string argname, string type){
- m_introspectionString << "<arg name=\"" << argname << "\" type=\"" << type << "\"/> \n";
-}
-
-void DBUSIntrospection::closeMethod(void)
-{
- m_introspectionString << "</method> \n";
-}
-
-void DBUSIntrospection::closeInterface(void)
-{
- m_introspectionString << "</interface> \n";
-}
-
-void DBUSIntrospection::closeNode(void)
-{
- m_introspectionString << "</node> \n";
-}
-
-void DBUSIntrospection::closeSignal(void){
- m_introspectionString<<"</signal> \n";
-}
-
-void DBUSIntrospection::addEntry(MethodTable entry)
-{
- string methodName = entry.name;
- string parameterArray = entry.signature;
- string returnValueArray = string(entry.reply);
-
- openMethod(methodName);
-
- for(uint parameterIndex = 0; parameterIndex < parameterArray.length(); ++parameterIndex)
- {
- switch (parameterArray.at(parameterIndex))
- {
- case 'a':
- if (parameterArray.at(parameterIndex+1)=='(') {
- int size=parameterArray.find((')'),parameterIndex);
- addArgument("","in",parameterArray.substr(parameterIndex,size+1));
- parameterIndex+=size;
- } else {
- addArgument("","in", parameterArray.substr(parameterIndex,2));
- parameterIndex+=2;
- }
- break;
- default:
- addArgument("","in", parameterArray.substr(parameterIndex,1));
- break;
- }
- }
-
-
- for(uint returnValueIndex = 0; returnValueIndex < returnValueArray.length(); ++returnValueIndex)
- {
- switch (returnValueArray.at(returnValueIndex))
- {
- case 'a':
- if (returnValueArray.at(returnValueIndex+1)=='(') {
- int size=returnValueArray.find((')'),returnValueIndex);
- addArgument("","out",returnValueArray.substr(returnValueIndex,size+1));
- returnValueIndex+=size;
- } else {
- addArgument("","out", returnValueArray.substr(returnValueIndex,2));
- returnValueIndex+=2;
- }
- break;
- default:
- addArgument("","out", returnValueArray.substr(returnValueIndex,1));
- break;
- }
- }
-
- closeMethod();
-}
-
-void DBUSIntrospection::addEntry(SignalTable entry)
-{
- string methodName = entry.name;
- string parameterArray = entry.signature;
-
- openSignal(methodName);
-
- for(uint parameterIndex = 0; parameterIndex < parameterArray.length(); ++parameterIndex)
- {
- switch (parameterArray.at(parameterIndex))
- {
- case 'a':
- if (parameterArray.at(parameterIndex+1)=='{') {
- int size=parameterArray.find(('}'),parameterIndex);
- addSignalArgument("",parameterArray.substr(parameterIndex,size+1));
- parameterIndex+=size;
- } else {
- parameterIndex++;
- addSignalArgument("", "a" + parameterArray.at(parameterIndex));
- }
- break;
- default:
- addSignalArgument("", parameterArray.substr(parameterIndex,1));
- break;
- }
- }
-
- closeSignal();
-}
-
-void DBUSIntrospection::process(DBusConnection* conn, DBusMessage* msg)
-{
- DBusMessage * reply;
- DBusMessageIter args;
- dbus_uint32_t serial = 0;
-
- // create a reply from the message
- reply = dbus_message_new_method_return(msg);
-
- string introspect = m_introspectionString.str();
- const char* string = introspect.c_str();
-
- // add the arguments to the reply
- dbus_message_iter_init_append(reply, &args);
- if (!dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING, &string))
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler Out Of Memory!"));
- }
-
- // send the reply && flush the connection
- if (!dbus_connection_send(conn, reply, &serial))
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler Out Of Memory!"));
- }
- dbus_connection_flush(conn);
-
- // free the reply
- dbus_message_unref(reply);
-}
-
-
-
-
-
-
+++ /dev/null
-/***************************************************************************
- *
- * Copyright 2010,2011 BMW Car IT GmbH
- *
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- ****************************************************************************/
-
-#ifndef _DBUSMESSAGEHANDLER_H_
-#define _DBUSMESSAGEHANDLER_H_
-
-#include <vector>
-#include <sstream>
-using std::stringstream;
-
-#include <string>
-using std::string;
-
-#include "headers.h"
-#include <dbus/dbus.h>
-
-#define DLT_CONTEXT DBusCommandPlugin
-
-typedef void (CommandDbusReceive::*CallBackMethod)(DBusConnection *connection, DBusMessage *message);
-
-struct MethodTable
-{
- const char *name;
- const char *signature;
- const char *reply;
- CallBackMethod function;
-};
-
-struct SignalTable {
- const char* name;
- const char* signature;
-};
-
-
-class DBUSMessageHandler
-{
-public:
- DBUSMessageHandler(DBusObjectPathVTable* vtable, DBusConnection* conn, void* reference);
- ~DBUSMessageHandler();
-
- void initReceive(DBusMessage* msg);
- void initReply(DBusMessage* msg);
- void closeReply();
- void ReplyError(DBusMessage* msg, const char* errorname, const char* errorMsg);
-
- dbus_uint32_t getUInt();
- char getByte();
- dbus_bool_t getBool();
- double getDouble();
- char* getString();
- void getArrayOfUInt(int* length, unsigned int** array);
- void getArrayOfString(std::vector<std::string>* uniforms);
-
- void append(dbus_uint32_t toAppend);
- void append(char toAppend);
- void append(bool toAppend);
- void append(double toAppend);
- void append(unsigned int length, unsigned int *IDs);
- void append(std::list<SourceType> list);
- void append(std::list<ConnectionType> list);
- void append(std::list<SinkType> list);
-
- void sendSignal(const char* signalname);
-
-private:
- DBusMessageIter m_MessageIter;
- DBusMessage* m_pReply;
- dbus_uint32_t m_serial;
- DBusConnection* m_pConnection;
- DBusError m_err;
-};
-
-class DBUSIntrospection
-{
-public:
- DBUSIntrospection(MethodTable* table, SignalTable* stable,std::string nodename);
- void process(DBusConnection* conn, DBusMessage* msg);
-
-private:
- void generateString(void);
-
- void addHeader(void);
- void addArgument(string argname, string direction, string type);
- void addSignalArgument(string argname, string type);
- void addEntry(MethodTable entry);
- void addEntry(SignalTable entry);
-
- void openNode(string nodename);
- void closeNode(void);
-
- void openInterface(string interfacename);
- void closeInterface(void);
-
- void openMethod(string methodname);
- void closeMethod(void);
-
- void openSignal(string signalname);
- void closeSignal(void);
-
-private:
- stringstream m_introspectionString;
- MethodTable* m_methodTable;
- SignalTable* m_signalTable;
- std::string m_nodename;
-};
-
-#endif // _DBUSMESSAGEWRAPPER_H_
+++ /dev/null
-/**
- *
- * Copyright (C) 2011, BMW AG
- *
- * PluginDBus
- *
- * \file RoutingSend.cpp
- *
- * \date 20.05.2011
- * \author Christian Müller (christian.ei.mueller@bmw.de)
- *
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
- */
-
-
-#include "headers.h"
-#include "routinginterface.h"
-#include <stdbool.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <string>
-#include <sstream>
-
-DLT_DECLARE_CONTEXT(DBusCommandPlugin)
-
-DbusCommandInterface::DbusCommandInterface() {
-
- DLT_REGISTER_APP("DBusCommandPlugin", "DBusCommandPlugin");
- DLT_REGISTER_CONTEXT(DBusCommandPlugin, "PluginCommand", "DBusCommandPlugin");
- DLT_LOG(DBusCommandPlugin, DLT_LOG_INFO, DLT_STRING("The DBusCommandPluginis started"));
-}
-
-DbusCommandInterface::~DbusCommandInterface() {
- delete m_DbusInterface;
-}
-
-void DbusCommandInterface::startupInterface(CommandReceiveInterface* iface, dbusRoothandler* dbushandler) {
- m_audioman = iface;
- m_rootHandler = dbushandler;
- m_DbusInterface = new CommandDbusReceive(iface,dbushandler);
- m_DbusInterface->startup_interface();
- m_rootHandler->registerNode(MY_NODE);
-
- DBusError err;
- dbus_error_init(&err);
-
- m_conn = dbus_bus_get(DBUS_BUS_SESSION, &err);
- if (dbus_error_is_set(&err)) {
- DLT_LOG(DBusCommandPlugin, DLT_LOG_INFO, DLT_STRING("Could not connect to DBUS for sending, Error: "), DLT_STRING(err.message));
- dbus_error_free(&err);
- }
-
- DLT_LOG(DBusCommandPlugin, DLT_LOG_INFO, DLT_STRING("DBus Interface started "));
-}
-
-
-
-void DbusCommandInterface::stop(){
-}
-
-
-
-void DbusCommandInterface::cbConnectionChanged(){
- m_DbusInterface->emitSignalConnectionsChanged();
-}
-
-
-
-void DbusCommandInterface::cbNumberOfSinksChanged(){
- m_DbusInterface->emitSignalNumberofSinksChanged();
-}
-
-
-
-void DbusCommandInterface::cbNumberOfSourcesChanged(){
- m_DbusInterface->emitSignalNumberofSourcesChanged();
-}
-
-
-//That is the actual implementation of the Factory Class returning the real sendInterface
-
-extern "C" CommandSendInterface* PluginCommandInterfaceDbusFactory() {
- return new DbusCommandInterface();
-}
-
-extern "C" void destroyRoutingPluginInterfaceDbus(DbusCommandInterface* iface) {
- delete iface;
-}
-
-
-
-
+++ /dev/null
-/**
- *
- * Copyright (C) 2011, BMW AG
- *
- * PluginDBus
- *
- * \file RoutingSend.h
- *
- * \date 20.05.2011
- * \author Christian Müller (christian.ei.mueller@bmw.de)
- *
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
- */
-
-#ifndef BUS_INTERFACE_H_
-#define BUS_INTERFACE_H_
-
-#include "headers.h"
-#include "commandInterface.h"
-
-#define SIG_CONNECTION_CHANGED "signal_connectionChanged"
-#define SIG_NUM_SINKS_CHANGED "signal_numberOfSinksChanged"
-#define SIG_NUM_SOURCES_CHANGED "signal_numberOfSourcesChanged"
-
-
-/**Implementation of the interface
- *
- */
-class DbusCommandInterface: public CommandSendInterface {
-
-public:
- DbusCommandInterface();
- virtual ~DbusCommandInterface();
- void cbConnectionChanged();
- void cbNumberOfSinksChanged();
- void cbNumberOfSourcesChanged();
- void startupInterface(CommandReceiveInterface* iface,dbusRoothandler* dbushandler);
- void stop();
-
-private:
- CommandReceiveInterface *m_audioman;
- CommandDbusReceive* m_DbusInterface;
- DBusConnection* m_conn;
- dbusRoothandler* m_rootHandler;
-
-};
-
-
-#endif /* BUS_INTERFACE_H_ */
+++ /dev/null
-/*
- * DbusSend.cpp
- *
- * Created on: Jul 20, 2011
- * Author: christian
- */
-
-#include "DbusSend.h"
-
-DbusSend::DbusSend (DBusConnection* conn, const char* bus_name,const char* path, const char* interface, const char* method) : m_conn(conn) {
- m_msg=dbus_message_new_method_call(bus_name,path,interface,method);
- if (NULL == m_msg) {
- DLT_LOG(DBusCommandPlugin, DLT_LOG_INFO, DLT_STRING("Error while creating DBus message"));
- this->~DbusSend();
- }
-}
-
-DbusSend::~DbusSend() {
- // TODO Auto-generated destructor stub
-}
-
-void DbusSend::appendString(char* string) {
- dbus_message_iter_init_append(m_msg, &m_args);
- if (!dbus_message_iter_append_basic(&m_args, DBUS_TYPE_STRING, string)) {
- DLT_LOG(DBusCommandPlugin, DLT_LOG_INFO, DLT_STRING("Out of memory"));
- this->~DbusSend();
- }
-}
-
-void DbusSend::appendInteger(int integer) {
- dbus_message_iter_init_append(m_msg, &m_args);
- if (!dbus_message_iter_append_basic(&m_args, DBUS_TYPE_INT32, &integer)) {
- DLT_LOG(DBusCommandPlugin, DLT_LOG_INFO, DLT_STRING("Out of memory"));
- this->~DbusSend();
- }
-
-}
-
-void DbusSend::sendReply(bool* reply) {
-
- DBusPendingCall* pending;
- DBusMessageIter args;
- if (!dbus_connection_send_with_reply (m_conn, m_msg, &pending, -1)) { // -1 is default timeout
- DLT_LOG(DBusCommandPlugin, DLT_LOG_INFO, DLT_STRING("Out of memory"));
- this->~DbusSend();
- }
-
- if (NULL == pending) {
- DLT_LOG(DBusCommandPlugin, DLT_LOG_INFO, DLT_STRING("Pending Call Null"));
- this->~DbusSend();
- }
- dbus_connection_flush(m_conn);
- dbus_message_unref(m_msg);
- dbus_pending_call_block(pending);
-
- DBusMessage* msg=dbus_pending_call_steal_reply(pending);
-
- if (NULL == msg) {
- DLT_LOG(DBusCommandPlugin, DLT_LOG_INFO, DLT_STRING("DBUS reply NULL"));
- this->~DbusSend();
- }
-
- dbus_pending_call_unref(pending);
-
- if (!dbus_message_iter_init(msg, &args)) {
- DLT_LOG(DBusCommandPlugin, DLT_LOG_INFO, DLT_STRING("DBUS Message without arguments"));
- } else if (DBUS_TYPE_BOOLEAN != dbus_message_iter_get_arg_type(&args)) {
- DLT_LOG(DBusCommandPlugin, DLT_LOG_INFO, DLT_STRING("Argument not boolean"));
- } else {
- dbus_message_iter_get_basic(&args, reply);
- }
-
- dbus_message_unref(msg);
-}
-
-void DbusSend::sendReply(int* reply) {
-
- DBusPendingCall* pending;
- DBusMessageIter args;
- if (!dbus_connection_send_with_reply (m_conn, m_msg, &pending, -1)) { // -1 is default timeout
- DLT_LOG(DBusCommandPlugin, DLT_LOG_INFO, DLT_STRING("Out of memory"));
- this->~DbusSend();
- }
-
- if (NULL == pending) {
- DLT_LOG(DBusCommandPlugin, DLT_LOG_INFO, DLT_STRING("Pending Call Null"));
- this->~DbusSend();
- }
- dbus_connection_flush(m_conn);
- dbus_message_unref(m_msg);
- dbus_pending_call_block(pending);
-
- DBusMessage* msg=dbus_pending_call_steal_reply(pending);
-
- if (NULL == msg) {
- DLT_LOG(DBusCommandPlugin, DLT_LOG_INFO, DLT_STRING("DBUS reply NULL"));
- this->~DbusSend();
- }
-
- dbus_pending_call_unref(pending);
-
- if (!dbus_message_iter_init(msg, &args)) {
- DLT_LOG(DBusCommandPlugin, DLT_LOG_INFO, DLT_STRING("DBUS Message without arguments"));
- } else if (DBUS_TYPE_INT32 != dbus_message_iter_get_arg_type(&args)) {
- DLT_LOG(DBusCommandPlugin, DLT_LOG_INFO, DLT_STRING("Argument not integer"));
- } else {
- dbus_message_iter_get_basic(&args, reply);
- }
-
- dbus_message_unref(msg);
-}
-
+++ /dev/null
-/*
- * DbusSend.h
- *
- * Created on: Jul 20, 2011
- * Author: christian
- */
-
-#ifndef DBUSSEND_H_
-#define DBUSSEND_H_
-
-#include "headers.h"
-
-class DbusSend {
-public:
- DbusSend(DBusConnection* conn, const char* bus_name,const char* path, const char* interface, const char* method);
- virtual ~DbusSend();
- void appendString(char* string);
- void appendInteger(int integer);
- void sendReply(bool* reply);
- void sendReply(int* reply);
-
-private:
- DBusMessage* m_msg;
- DBusMessageIter m_args;
- DBusConnection* m_conn;
-};
-
-#endif /* DBUSSEND_H_ */
+++ /dev/null
-# Doxyfile 1.7.1
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
-#
-# All text after a hash (#) is considered a comment and will be ignored
-# The format is:
-# TAG = value [value, ...]
-# For lists items can also be appended using:
-# TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all
-# text before the first occurrence of this tag. Doxygen uses libiconv (or the
-# iconv built into libc) for the transcoding. See
-# http://www.gnu.org/software/libiconv for the list of possible encodings.
-
-DOXYFILE_ENCODING = UTF-8
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
-# by quotes) that should identify the project.
-
-PROJECT_NAME = DBusPlugin
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number.
-# This could be handy for archiving the generated documentation or
-# if some version control system is used.
-
-PROJECT_NUMBER = 0.1
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
-# base path where the generated documentation will be put.
-# If a relative path is entered, it will be relative to the location
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY =
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
-# 4096 sub-directories (in 2 levels) under the output directory of each output
-# format and will distribute the generated files over these directories.
-# Enabling this option can be useful when feeding doxygen a huge amount of
-# source files, where putting all generated files in the same directory would
-# otherwise cause performance problems for the file system.
-
-CREATE_SUBDIRS = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# The default language is English, other supported languages are:
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
-# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
-# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
-# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
-# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
-# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
-
-OUTPUT_LANGUAGE = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
-# include brief member descriptions after the members that are listed in
-# the file and class documentation (similar to JavaDoc).
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
-# the brief description of a member or function before the detailed description.
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator
-# that is used to form the text in various listings. Each string
-# in this list, if found as the leading text of the brief description, will be
-# stripped from the text and the result after processing the whole list, is
-# used as the annotated text. Otherwise, the brief description is used as-is.
-# If left blank, the following values are used ("$name" is automatically
-# replaced with the name of the entity): "The $name class" "The $name widget"
-# "The $name file" "is" "provides" "specifies" "contains"
-# "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF = "The $name class" \
- "The $name widget" \
- "The $name file" \
- is \
- provides \
- specifies \
- contains \
- represents \
- a \
- an \
- the
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# Doxygen will generate a detailed section even if there is only a brief
-# description.
-
-ALWAYS_DETAILED_SEC = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
-# operators of the base classes will not be shown.
-
-INLINE_INHERITED_MEMB = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
-# path before files name in the file list and in the header files. If set
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES = YES
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
-# can be used to strip a user-defined part of the path. Stripping is
-# only done if one of the specified strings matches the left-hand part of
-# the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the
-# path to strip.
-
-STRIP_FROM_PATH =
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
-# the path mentioned in the documentation of a class, which tells
-# the reader which header file to include in order to use a class.
-# If left blank only the name of the header file containing the class
-# definition is used. Otherwise one should specify the include paths that
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH =
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-# (but less readable) file names. This can be useful is your file systems
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
-# will interpret the first line (until the first dot) of a JavaDoc-style
-# comment as the brief description. If set to NO, the JavaDoc
-# comments will behave just like regular Qt-style comments
-# (thus requiring an explicit @brief command for a brief description.)
-
-JAVADOC_AUTOBRIEF = YES
-
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
-# interpret the first line (until the first dot) of a Qt-style
-# comment as the brief description. If set to NO, the comments
-# will behave just like regular Qt-style comments (thus requiring
-# an explicit \brief command for a brief description.)
-
-QT_AUTOBRIEF = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
-# treat a multi-line C++ special comment block (i.e. a block of //! or ///
-# comments) as a brief description. This used to be the default behaviour.
-# The new default is to treat a multi-line C++ comment block as a detailed
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it
-# re-implements.
-
-INHERIT_DOCS = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
-# a new page for each member. If set to NO, the documentation of a member will
-# be part of the file/class/namespace that contains it.
-
-SEPARATE_MEMBER_PAGES = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab.
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE = 8
-
-# This tag can be used to specify a number of aliases that acts
-# as commands in the documentation. An alias has the form "name=value".
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to
-# put the command \sideeffect (or @sideeffect) in the documentation, which
-# will result in a user-defined paragraph with heading "Side Effects:".
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
-# sources only. Doxygen will then generate output that is more tailored for C.
-# For instance, some of the names that are used will be different. The list
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C = NO
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
-# sources only. Doxygen will then generate output that is more tailored for
-# Java. For instance, namespaces will be presented as packages, qualified
-# scopes will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA = NO
-
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-# sources only. Doxygen will then generate output that is more tailored for
-# Fortran.
-
-OPTIMIZE_FOR_FORTRAN = NO
-
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-# sources. Doxygen will then generate output that is tailored for
-# VHDL.
-
-OPTIMIZE_OUTPUT_VHDL = NO
-
-# Doxygen selects the parser to use depending on the extension of the files it
-# parses. With this tag you can assign which parser to use for a given extension.
-# Doxygen has a built-in mapping, but you can override or extend it using this
-# tag. The format is ext=language, where ext is a file extension, and language
-# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
-# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
-# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
-# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
-# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
-
-EXTENSION_MAPPING =
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
-# to include (a tag file for) the STL sources as input, then you should
-# set this tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
-# func(std::string) {}). This also make the inheritance and collaboration
-# diagrams that involve STL classes more complete and accurate.
-
-BUILTIN_STL_SUPPORT = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-
-CPP_CLI_SUPPORT = NO
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
-# Doxygen will parse them like normal C++ but will assume all classes use public
-# instead of private inheritance when no explicit protection keyword is present.
-
-SIP_SUPPORT = NO
-
-# For Microsoft's IDL there are propget and propput attributes to indicate getter
-# and setter methods for a property. Setting this option to YES (the default)
-# will make doxygen to replace the get and set methods by a property in the
-# documentation. This will only work if the methods are indeed getting or
-# setting a simple type. If this is not the case, or you want to show the
-# methods anyway, you should set this option to NO.
-
-IDL_PROPERTY_SUPPORT = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
-# the same type (for instance a group of public functions) to be put as a
-# subgroup of that type (e.g. under the Public Functions section). Set it to
-# NO to prevent subgrouping. Alternatively, this can be done per class using
-# the \nosubgrouping command.
-
-SUBGROUPING = YES
-
-# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
-# is documented as struct, union, or enum with the name of the typedef. So
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
-# with name TypeT. When disabled the typedef will appear as a member of a file,
-# namespace, or class. And the struct will be named TypeS. This can typically
-# be useful for C code in case the coding convention dictates that all compound
-# types are typedef'ed and only the typedef is referenced, never the tag name.
-
-TYPEDEF_HIDES_STRUCT = YES
-
-# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
-# determine which symbols to keep in memory and which to flush to disk.
-# When the cache is full, less often used symbols will be written to disk.
-# For small to medium size projects (<1000 input files) the default value is
-# probably good enough. For larger projects a too small cache size can cause
-# doxygen to be busy swapping symbols to and from disk most of the time
-# causing a significant performance penality.
-# If the system has enough physical memory increasing the cache will improve the
-# performance by keeping more symbols in memory. Note that the value works on
-# a logarithmic scale so increasing the size by one will rougly double the
-# memory usage. The cache size is given by this formula:
-# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols
-
-SYMBOL_CACHE_SIZE = 0
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available.
-# Private class members and static file members will be hidden unless
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL = YES
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
-# will be included in the documentation.
-
-EXTRACT_PRIVATE = YES
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file
-# will be included in the documentation.
-
-EXTRACT_STATIC = YES
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
-# defined locally in source files will be included in the documentation.
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES = YES
-
-# This flag is only useful for Objective-C code. When set to YES local
-# methods, which are defined in the implementation section but not in
-# the interface are included in the documentation.
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS = YES
-
-# If this flag is set to YES, the members of anonymous namespaces will be
-# extracted and appear in the documentation as a namespace called
-# 'anonymous_namespace{file}', where file will be replaced with the base
-# name of the file that contains the anonymous namespace. By default
-# anonymous namespace are hidden.
-
-EXTRACT_ANON_NSPACES = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
-# undocumented members of documented classes, files or namespaces.
-# If set to NO (the default) these members will be included in the
-# various overviews, but no documentation section is generated.
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS = NO
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy.
-# If set to NO (the default) these classes will be included in the various
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES = NO
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
-# friend (class|struct|union) declarations.
-# If set to NO (the default) these declarations will be included in the
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
-# documentation blocks found inside the body of a function.
-# If set to NO (the default) these blocks will be appended to the
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS = NO
-
-# The INTERNAL_DOCS tag determines if documentation
-# that is typed after a \internal command is included. If the tag is set
-# to NO (the default) then the documentation will be excluded.
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
-# file names in lower-case letters. If set to YES upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES = NO
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
-# will show members with their full class and namespace scopes in the
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
-# will put a list of the files that are included by a file in the documentation
-# of that file.
-
-SHOW_INCLUDE_FILES = YES
-
-# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
-# will list include files with double quotes in the documentation
-# rather than with sharp brackets.
-
-FORCE_LOCAL_INCLUDES = NO
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
-# is inserted in the documentation for inline members.
-
-INLINE_INFO = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
-# will sort the (detailed) documentation of file and class members
-# alphabetically by member name. If set to NO the members will appear in
-# declaration order.
-
-SORT_MEMBER_DOCS = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
-# brief documentation of file, namespace and class members alphabetically
-# by member name. If set to NO (the default) the members will appear in
-# declaration order.
-
-SORT_BRIEF_DOCS = YES
-
-# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
-# will sort the (brief and detailed) documentation of class members so that
-# constructors and destructors are listed first. If set to NO (the default)
-# the constructors will appear in the respective orders defined by
-# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
-# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
-# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
-
-SORT_MEMBERS_CTORS_1ST = NO
-
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
-# hierarchy of group names into alphabetical order. If set to NO (the default)
-# the group names will appear in their defined order.
-
-SORT_GROUP_NAMES = YES
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
-# sorted by fully-qualified names, including namespaces. If set to
-# NO (the default), the class list will be sorted only by class name,
-# not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or
-# disable (NO) the todo list. This list is created by putting \todo
-# commands in the documentation.
-
-GENERATE_TODOLIST = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or
-# disable (NO) the test list. This list is created by putting \test
-# commands in the documentation.
-
-GENERATE_TESTLIST = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or
-# disable (NO) the bug list. This list is created by putting \bug
-# commands in the documentation.
-
-GENERATE_BUGLIST = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
-# disable (NO) the deprecated list. This list is created by putting
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS =
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-# the initial value of a variable or define consists of for it to appear in
-# the documentation. If the initializer consists of more lines than specified
-# here it will be hidden. Use a value of 0 to hide initializers completely.
-# The appearance of the initializer of individual variables and defines in the
-# documentation can be controlled using \showinitializer or \hideinitializer
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
-# at the bottom of the documentation of classes and structs. If set to YES the
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES = YES
-
-# If the sources in your project are distributed over multiple directories
-# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
-# in the documentation. The default is NO.
-
-SHOW_DIRECTORIES = NO
-
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
-# This will remove the Files entry from the Quick Index and from the
-# Folder Tree View (if specified). The default is YES.
-
-SHOW_FILES = YES
-
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
-# Namespaces page. This will remove the Namespaces entry from the Quick Index
-# and from the Folder Tree View (if specified). The default is YES.
-
-SHOW_NAMESPACES = YES
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from
-# the version control system). Doxygen will invoke the program by executing (via
-# popen()) the command <command> <input-file>, where <command> is the value of
-# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
-# provided by doxygen. Whatever the program writes to standard output
-# is used as the file version. See the manual for examples.
-
-FILE_VERSION_FILTER =
-
-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
-# by doxygen. The layout file controls the global structure of the generated
-# output files in an output format independent way. The create the layout file
-# that represents doxygen's defaults, run doxygen with the -l option.
-# You can optionally specify a file name after the option, if omitted
-# DoxygenLayout.xml will be used as the name of the layout file.
-
-LAYOUT_FILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated by doxygen. Possible values are YES and NO. If left blank
-# NO is used.
-
-WARNINGS = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED = YES
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some
-# parameters in a documented function, or documenting parameters that
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR = YES
-
-# This WARN_NO_PARAMDOC option can be abled to get warnings for
-# functions that are documented, but have no documentation for their parameters
-# or return value. If set to NO (the default) doxygen will only warn about
-# wrong or incomplete parameter documentation, but not about the absence of
-# documentation.
-
-WARN_NO_PARAMDOC = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that
-# doxygen can produce. The string should contain the $file, $line, and $text
-# tags, which will be replaced by the file and line number from which the
-# warning originated and the warning text. Optionally the format may contain
-# $version, which will be replaced by the version of the file (if it could
-# be obtained via FILE_VERSION_FILTER)
-
-WARN_FORMAT = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning
-# and error messages should be written. If left blank the output is written
-# to stderr.
-
-WARN_LOGFILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain
-# documented source files. You may enter file names like "myfile.cpp" or
-# directories like "/usr/src/myproject". Separate the files or directories
-# with spaces.
-
-INPUT = @CMAKE_CURRENT_SOURCE_DIR@
-
-# This tag can be used to specify the character encoding of the source files
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
-# also the default input encoding. Doxygen uses libiconv (or the iconv built
-# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
-# the list of possible encodings.
-
-INPUT_ENCODING = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank the following patterns are tested:
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
-# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
-
-FILE_PATTERNS = *.c \
- *.cc \
- *.cxx \
- *.cpp \
- *.c++ \
- *.d \
- *.java \
- *.ii \
- *.ixx \
- *.ipp \
- *.i++ \
- *.inl \
- *.h \
- *.hh \
- *.hxx \
- *.hpp \
- *.h++ \
- *.idl \
- *.odl \
- *.cs \
- *.php \
- *.php3 \
- *.inc \
- *.m \
- *.mm \
- *.dox \
- *.py \
- *.f90 \
- *.f \
- *.vhd \
- *.vhdl
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories
-# should be searched for input files as well. Possible values are YES and NO.
-# If left blank NO is used.
-
-RECURSIVE = YES
-
-# The EXCLUDE tag can be used to specify files and/or directories that should
-# excluded from the INPUT source files. This way you can easily exclude a
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-
-EXCLUDE =
-
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
-# directories that are symbolic links (a Unix filesystem feature) are excluded
-# from the input.
-
-EXCLUDE_SYMLINKS = NO
-
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories. Note that the wildcards are matched
-# against the file with absolute path, so to exclude all test directories
-# for example use the pattern */test/*
-
-EXCLUDE_PATTERNS =
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-# (namespaces, classes, functions, etc.) that should be excluded from the
-# output. The symbol name can be a fully qualified name, a word, or if the
-# wildcard * is used, a substring. Examples: ANamespace, AClass,
-# AClass::ANamespace, ANamespace::*Test
-
-EXCLUDE_SYMBOLS =
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or
-# directories that contain example code fragments that are included (see
-# the \include command).
-
-EXAMPLE_PATH =
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank all files are included.
-
-EXAMPLE_PATTERNS = *
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude
-# commands irrespective of the value of the RECURSIVE tag.
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or
-# directories that contain image that are included in the documentation (see
-# the \image command).
-
-IMAGE_PATH = ../../AudioManGUI
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command <filter> <input-file>, where <filter>
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
-# input file. Doxygen will then use the output that the filter program writes
-# to standard output. If FILTER_PATTERNS is specified, this tag will be
-# ignored.
-
-INPUT_FILTER =
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis. Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match. The filters are a list of the form:
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
-# is applied to all files.
-
-FILTER_PATTERNS =
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will be used to filter the input files when producing source
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will
-# be generated. Documented entities will be cross-referenced with these sources.
-# Note: To get rid of all source code in the generated output, make sure also
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER = YES
-
-# Setting the INLINE_SOURCES tag to YES will include the body
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
-# doxygen to hide any special comment blocks from generated source code
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES
-# then for each documented function all documented
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = NO
-
-# If the REFERENCES_RELATION tag is set to YES
-# then for each documented function all documented entities
-# called/used by that function will be listed.
-
-REFERENCES_RELATION = NO
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code. Otherwise they will link to the documentation.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code
-# will point to the HTML generated by the htags(1) tool instead of doxygen
-# built-in source browser. The htags tool is part of GNU's global source
-# tagging system (see http://www.gnu.org/software/global/global.html). You
-# will need version 4.8.6 or higher.
-
-USE_HTAGS = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
-# will generate a verbatim copy of the header file for each class for
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
-# of all compounds will be generated. Enable this if the project
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX = YES
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX = 5
-
-# In case all classes in a project start with a common prefix, all
-# classes will be put under the same header in the alphabetical index.
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX =
-dbus
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
-# generate HTML output.
-
-GENERATE_HTML = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT = html
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard header.
-
-HTML_HEADER =
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard footer.
-
-HTML_FOOTER =
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
-# style sheet that is used by each HTML page. It can be used to
-# fine-tune the look of the HTML output. If the tag is left blank doxygen
-# will generate a default style sheet. Note that doxygen will try to copy
-# the style sheet file to the HTML output directory, so don't put your own
-# stylesheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET =
-
-# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
-# Doxygen will adjust the colors in the stylesheet and background images
-# according to this color. Hue is specified as an angle on a colorwheel,
-# see http://en.wikipedia.org/wiki/Hue for more information.
-# For instance the value 0 represents red, 60 is yellow, 120 is green,
-# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
-# The allowed range is 0 to 359.
-
-HTML_COLORSTYLE_HUE = 220
-
-# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
-# the colors in the HTML output. For a value of 0 the output will use
-# grayscales only. A value of 255 will produce the most vivid colors.
-
-HTML_COLORSTYLE_SAT = 100
-
-# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
-# the luminance component of the colors in the HTML output. Values below
-# 100 gradually make the output lighter, whereas values above 100 make
-# the output darker. The value divided by 100 is the actual gamma applied,
-# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
-# and 100 does not change the gamma.
-
-HTML_COLORSTYLE_GAMMA = 80
-
-# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
-# page will contain the date and time when the page was generated. Setting
-# this to NO can help when comparing the output of multiple runs.
-
-HTML_TIMESTAMP = YES
-
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
-# files or namespaces will be aligned in HTML using tables. If set to
-# NO a bullet list will be used.
-
-HTML_ALIGN_MEMBERS = YES
-
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
-# documentation will contain sections that can be hidden and shown after the
-# page has loaded. For this to work a browser that supports
-# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
-# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
-
-HTML_DYNAMIC_SECTIONS = YES
-
-# If the GENERATE_DOCSET tag is set to YES, additional index files
-# will be generated that can be used as input for Apple's Xcode 3
-# integrated development environment, introduced with OSX 10.5 (Leopard).
-# To create a documentation set, doxygen will generate a Makefile in the
-# HTML output directory. Running make will produce the docset in that
-# directory and running "make install" will install the docset in
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
-# it at startup.
-# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
-# for more information.
-
-GENERATE_DOCSET = NO
-
-# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
-# feed. A documentation feed provides an umbrella under which multiple
-# documentation sets from a single provider (such as a company or product suite)
-# can be grouped.
-
-DOCSET_FEEDNAME = "Doxygen generated docs"
-
-# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
-# should uniquely identify the documentation set bundle. This should be a
-# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
-# will append .docset to the name.
-
-DOCSET_BUNDLE_ID = org.doxygen.Project
-
-# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
-# the documentation publisher. This should be a reverse domain-name style
-# string, e.g. com.mycompany.MyDocSet.documentation.
-
-DOCSET_PUBLISHER_ID = org.doxygen.Publisher
-
-# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
-
-DOCSET_PUBLISHER_NAME = Publisher
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-# will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
-# be used to specify the file name of the resulting .chm file. You
-# can add a path in front of the file if the result should not be
-# written to the html output directory.
-
-CHM_FILE =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
-# be used to specify the location (absolute path including file name) of
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
-# controls if a separate .chi index file is generated (YES) or that
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
-# is used to encode HtmlHelp index (hhk), content (hhc) and project file
-# content.
-
-CHM_INDEX_ENCODING =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
-# controls whether a binary table of contents is generated (YES) or a
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND = NO
-
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
-# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
-# that can be used as input for Qt's qhelpgenerator to generate a
-# Qt Compressed Help (.qch) of the generated HTML documentation.
-
-GENERATE_QHP = NO
-
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
-# be used to specify the file name of the resulting .qch file.
-# The path specified is relative to the HTML output folder.
-
-QCH_FILE =
-
-# The QHP_NAMESPACE tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#namespace
-
-QHP_NAMESPACE = org.doxygen.Project
-
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#virtual-folders
-
-QHP_VIRTUAL_FOLDER = doc
-
-# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
-# add. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#custom-filters
-
-QHP_CUST_FILTER_NAME =
-
-# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
-# custom filter to add. For more information please see
-# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
-# Qt Help Project / Custom Filters</a>.
-
-QHP_CUST_FILTER_ATTRS =
-
-# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
-# project's
-# filter section matches.
-# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
-# Qt Help Project / Filter Attributes</a>.
-
-QHP_SECT_FILTER_ATTRS =
-
-# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
-# be used to specify the location of Qt's qhelpgenerator.
-# If non-empty doxygen will try to run qhelpgenerator on the generated
-# .qhp file.
-
-QHG_LOCATION =
-
-# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
-# will be generated, which together with the HTML files, form an Eclipse help
-# plugin. To install this plugin and make it available under the help contents
-# menu in Eclipse, the contents of the directory containing the HTML and XML
-# files needs to be copied into the plugins directory of eclipse. The name of
-# the directory within the plugins directory should be the same as
-# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
-# the help appears.
-
-GENERATE_ECLIPSEHELP = YES
-
-# A unique identifier for the eclipse help plugin. When installing the plugin
-# the directory name containing the HTML and XML files should also have
-# this name.
-
-ECLIPSE_DOC_ID = org.doxygen.Project
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
-# top of each HTML page. The value NO (the default) enables the index and
-# the value YES disables it.
-
-DISABLE_INDEX = NO
-
-# This tag can be used to set the number of enum values (range [1..20])
-# that doxygen will group on one line in the generated HTML documentation.
-
-ENUM_VALUES_PER_LINE = 4
-
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information.
-# If the tag value is set to YES, a side panel will be generated
-# containing a tree-like index structure (just like the one that
-# is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
-# Windows users are probably better off using the HTML help feature.
-
-GENERATE_TREEVIEW = YES
-
-# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
-# and Class Hierarchy pages using a tree view instead of an ordered list.
-
-USE_INLINE_TREES = YES
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
-# used to set the initial width (in pixels) of the frame in which the tree
-# is shown.
-
-TREEVIEW_WIDTH = 250
-
-# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
-# links to external symbols imported via tag files in a separate window.
-
-EXT_LINKS_IN_WINDOW = NO
-
-# Use this tag to change the font size of Latex formulas included
-# as images in the HTML documentation. The default is 10. Note that
-# when you change the font size after a successful doxygen run you need
-# to manually remove any form_*.png images from the HTML output directory
-# to force them to be regenerated.
-
-FORMULA_FONTSIZE = 10
-
-# Use the FORMULA_TRANPARENT tag to determine whether or not the images
-# generated for formulas are transparent PNGs. Transparent PNGs are
-# not supported properly for IE 6.0, but are supported on all modern browsers.
-# Note that when changing this option you need to delete any form_*.png files
-# in the HTML output before the changes have effect.
-
-FORMULA_TRANSPARENT = YES
-
-# When the SEARCHENGINE tag is enabled doxygen will generate a search box
-# for the HTML output. The underlying search engine uses javascript
-# and DHTML and should work on any modern browser. Note that when using
-# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
-# (GENERATE_DOCSET) there is already a search function so this one should
-# typically be disabled. For large projects the javascript based search engine
-# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
-
-SEARCHENGINE = YES
-
-# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
-# implemented using a PHP enabled web server instead of at the web client
-# using Javascript. Doxygen will generate the search PHP script and index
-# file to put on the web server. The advantage of the server
-# based approach is that it scales better to large projects and allows
-# full text search. The disadvances is that it is more difficult to setup
-# and does not have live searching capabilities.
-
-SERVER_BASED_SEARCH = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
-# generate Latex output.
-
-GENERATE_LATEX = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked. If left blank `latex' will be used as the default command name.
-# Note that when enabling USE_PDFLATEX this option is only used for
-# generating bitmaps for formulas in the HTML output, but not in the
-# Makefile that is written to the output directory.
-
-LATEX_CMD_NAME = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
-# generate index for LaTeX. If left blank `makeindex' will be used as the
-# default command name.
-
-MAKEINDEX_CMD_NAME = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
-# LaTeX documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_LATEX = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used
-# by the printer. Possible values are: a4, a4wide, letter, legal and
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE = a4wide
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES =
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
-# the generated latex document. The header should contain everything until
-# the first chapter. If it is left blank doxygen will generate a
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER =
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will
-# contain links (just like the HTML output) instead of page references
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS = YES
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
-# plain latex in the generated Makefile. Set this option to YES to get a
-# higher quality PDF documentation.
-
-USE_PDFLATEX = YES
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
-# command to the generated LaTeX files. This will instruct LaTeX to keep
-# running if errors occur, instead of asking the user for help.
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not
-# include the index chapters (such as File Index, Compound Index, etc.)
-# in the output.
-
-LATEX_HIDE_INDICES = NO
-
-# If LATEX_SOURCE_CODE is set to YES then doxygen will include
-# source code with syntax highlighting in the LaTeX output.
-# Note that which sources are shown also depends on other settings
-# such as SOURCE_BROWSER.
-
-LATEX_SOURCE_CODE = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
-# The RTF output is optimized for Word 97 and may not look very pretty with
-# other RTF readers or editors.
-
-GENERATE_RTF = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
-# RTF documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_RTF = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
-# will contain hyperlink fields. The RTF file will
-# contain links (just like the HTML output) instead of page references.
-# This makes the output suitable for online browsing using WORD or other
-# programs which support those fields.
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's
-# config file, i.e. a series of assignments. You only have to provide
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE =
-
-# Set optional variables used in the generation of an rtf document.
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
-# generate man pages
-
-GENERATE_MAN = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT = man
-
-# The MAN_EXTENSION tag determines the extension that is added to
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
-# then it will generate one additional man file for each entity
-# documented in the real man page(s). These additional files
-# only source the real man page, but without them the man command
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will
-# generate an XML file that captures the structure of
-# the code including all documentation.
-
-GENERATE_XML = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_SCHEMA =
-
-# The XML_DTD tag can be used to specify an XML DTD,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_DTD =
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
-# dump the program listings (including syntax highlighting
-# and cross-referencing information) to the XML output. Note that
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
-# generate an AutoGen Definitions (see autogen.sf.net) file
-# that captures the structure of the code including all
-# documentation. Note that this feature is still experimental
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will
-# generate a Perl module file that captures the structure of
-# the code including all documentation. Note that this
-# feature is still experimental and incomplete at the
-# moment.
-
-GENERATE_PERLMOD = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
-# nicely formatted so it can be parsed by a human reader. This is useful
-# if you want to understand what is going on. On the other hand, if this
-# tag is set to NO the size of the Perl module output will be much smaller
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY = YES
-
-# The names of the make variables in the generated doxyrules.make file
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
-# This is useful so different doxyrules.make files included by the same
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
-# evaluate all C-preprocessor directives found in the sources and include
-# files.
-
-ENABLE_PREPROCESSING = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
-# names in the source code. If set to NO (the default) only conditional
-# compilation will be performed. Macro expansion can be done in a controlled
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
-# then the macro expansion is limited to the macros specified with the
-# PREDEFINED and EXPAND_AS_DEFINED tags.
-
-EXPAND_ONLY_PREDEF = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
-# in the INCLUDE_PATH (see below) will be search if a #include is found.
-
-SEARCH_INCLUDES = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by
-# the preprocessor.
-
-INCLUDE_PATH =
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will
-# be used.
-
-INCLUDE_FILE_PATTERNS =
-
-# The PREDEFINED tag can be used to specify one or more macro names that
-# are defined before the preprocessor is started (similar to the -D option of
-# gcc). The argument of the tag is a list of macros of the form: name
-# or name=definition (no spaces). If the definition and the = are
-# omitted =1 is assumed. To prevent a macro definition from being
-# undefined via #undef or recursively expanded use the := operator
-# instead of the = operator.
-
-PREDEFINED =
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
-# this tag can be used to specify a list of macro names that should be expanded.
-# The macro definition that is found in the sources will be used.
-# Use the PREDEFINED tag if you want to use a different macro definition.
-
-EXPAND_AS_DEFINED =
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-# doxygen's preprocessor will remove all function-like macros that are alone
-# on a line, have an all uppercase name, and do not end with a semicolon. Such
-# function macros are typically used for boiler-plate code, and will confuse
-# the parser if not removed.
-
-SKIP_FUNCTION_MACROS = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles.
-# Optionally an initial location of the external documentation
-# can be added for each tagfile. The format of a tag file without
-# this location is as follows:
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where "loc1" and "loc2" can be relative or absolute paths or
-# URLs. If a location is present for each tag, the installdox tool
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen
-# is run, you must also specify the path to the tagfile here.
-
-TAGFILES =
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE =
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed
-# in the class index. If set to NO only the inherited external classes
-# will be listed.
-
-ALLEXTERNALS = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will
-# be listed.
-
-EXTERNAL_GROUPS = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
-# or super classes. Setting the tag to NO turns the diagrams off. Note that
-# this option is superseded by the HAVE_DOT option below. This is only a
-# fallback. It is recommended to install and use dot, since it yields more
-# powerful graphs.
-
-CLASS_DIAGRAMS = NO
-
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see
-# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-MSCGEN_PATH =
-
-# If set to YES, the inheritance and collaboration graphs will hide
-# inheritance and usage relations if the target is undocumented
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz, a graph visualization
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT = YES
-
-# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
-# allowed to run in parallel. When set to 0 (the default) doxygen will
-# base this on the number of processors available in the system. You can set it
-# explicitly to a value larger than 0 to get control over the balance
-# between CPU load and processing speed.
-
-DOT_NUM_THREADS = 0
-
-# By default doxygen will write a font called FreeSans.ttf to the output
-# directory and reference it in all dot files that doxygen generates. This
-# font does not include all possible unicode characters however, so when you need
-# these (or just want a differently looking font) you can specify the font name
-# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
-# which can be done by putting it in a standard location or by setting the
-# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
-# containing the font.
-
-DOT_FONTNAME = FreeSans.ttf
-
-# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
-# The default size is 10pt.
-
-DOT_FONTSIZE = 10
-
-# By default doxygen will tell dot to use the output directory to look for the
-# FreeSans.ttf font (which doxygen will put there itself). If you specify a
-# different font using DOT_FONTNAME you can set the path where dot
-# can find it using this tag.
-
-DOT_FONTPATH =
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect inheritance relations. Setting this tag to YES will force the
-# the CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect implementation dependencies (inheritance, containment, and
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH = YES
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for groups, showing the direct groups dependencies
-
-GROUP_GRAPHS = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
-# Language.
-
-UML_LOOK = NO
-
-# If set to YES, the inheritance and collaboration graphs will show the
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS = NO
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
-# tags are set to YES then doxygen will generate a graph for each documented
-# file showing the direct and indirect include dependencies of the file with
-# other documented files.
-
-INCLUDE_GRAPH = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
-# documented header file showing the documented files that directly or
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH = YES
-
-# If the CALL_GRAPH and HAVE_DOT options are set to YES then
-# doxygen will generate a call dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable call graphs
-# for selected functions only using the \callgraph command.
-
-CALL_GRAPH = YES
-
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
-# doxygen will generate a caller dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable caller
-# graphs for selected functions only using the \callergraph command.
-
-CALLER_GRAPH = YES
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
-# will graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY = YES
-
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
-# then doxygen will show the dependencies a directory has on other directories
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
-
-DIRECTORY_GRAPH = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot. Possible values are png, jpg, or gif
-# If left blank png will be used.
-
-DOT_IMAGE_FORMAT = png
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be
-# found. If left blank, it is assumed the dot tool can be found in the path.
-
-DOT_PATH =
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the
-# \dotfile command).
-
-DOTFILE_DIRS =
-
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
-# nodes that will be shown in the graph. If the number of nodes in a graph
-# becomes larger than this value, doxygen will truncate the graph, which is
-# visualized by representing a node as a red box. Note that doxygen if the
-# number of direct children of the root node in a graph is already larger than
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
-# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-
-DOT_GRAPH_MAX_NODES = 50
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
-# graphs generated by dot. A depth value of 3 means that only nodes reachable
-# from the root by following a path via at most 3 edges will be shown. Nodes
-# that lay further from the root node will be omitted. Note that setting this
-# option to 1 or 2 may greatly reduce the computation time needed for large
-# code bases. Also note that the size of a graph can be further restricted by
-# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
-
-MAX_DOT_GRAPH_DEPTH = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, because dot on Windows does not
-# seem to support this out of the box. Warning: Depending on the platform used,
-# enabling this option may lead to badly anti-aliased labels on the edges of
-# a graph (i.e. they become hard to read).
-
-DOT_TRANSPARENT = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10)
-# support this, this feature is disabled by default.
-
-DOT_MULTI_TARGETS = NO
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
-# generate a legend page explaining the meaning of the various boxes and
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
-# remove the intermediate dot files that are used to generate
-# the various graphs.
-
-DOT_CLEANUP = YES
+++ /dev/null
-/*
- * headers.h
- *
- * Created on: Jul 21, 2011
- * Author: christian
- */
-
-#ifndef HEADERS_H_
-#define HEADERS_H_
-
-#include <dbus/dbus.h>
-#include <dlt/dlt.h>
-#include "CommandReceive.h"
-#include "CommandDbusReceive.h"
-#include "commandInterface.h"
-#include "DbusSend.h"
-#include "DBUSMessageHandler.h"
-#include "dbusRoothandler.h"
-#include "DbusInterface.h"
-
-
-const char MY_NODE[]="commandinterface\0";
-
-DLT_IMPORT_CONTEXT(DBusCommandPlugin);
-
-#endif /* HEADERS_H_ */
--- /dev/null
+/**
+* Copyright (C) 2011, BMW AG
+*
+* GeniviAudioMananger DbusPlugin
+*
+* \file CommandReceiverShadow.h
+*
+* \date 20-Oct-2011 3:42:04 PM
+* \author Christian Mueller (christian.ei.mueller@bmw.de)
+*
+* \section License
+* GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
+* Copyright (C) 2011, BMW AG Christian Mueller Christian.ei.mueller@bmw.de
+*
+* This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
+* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
+* You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
+* Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
+* Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
+* As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
+* Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
+*
+* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
+*/
+
+#ifndef COMMANDRECEIVERSHADOW_H_
+#define COMMANDRECEIVERSHADOW_H_
+
+#include "DBusMessageHandler.h"
+
+#include <command/CommandReceiveInterface.h>
+#include <dbus/dbus.h>
+#include <dlt/dlt.h>
+#include <map>
+
+DLT_IMPORT_CONTEXT(DBusCommandPlugin);
+
+#define INTROSPECTION_XML_FILE "/home/christian/workspace/gitserver/dbusIncludes/CommandInterface.xml"
+
+class CommandReceiverShadow;
+using namespace am;
+
+typedef void (CommandReceiverShadow::*CallBackMethod)(DBusConnection *connection, DBusMessage *message);
+
+/**
+ * receives the DBus Callbacks, marhsalls and demarshalls the parameters and calls CommandReceive
+ */
+class CommandReceiverShadow {
+public:
+ CommandReceiverShadow();
+ virtual ~CommandReceiverShadow();
+ void connect(DBusConnection *conn, DBusMessage *msg) ;
+ void disconnect(DBusConnection *conn, DBusMessage *msg) ;
+ void setVolume(DBusConnection *conn, DBusMessage *msg) ;
+ void volumeStep(DBusConnection *conn, DBusMessage *msg) ;
+ void setSinkMuteState(DBusConnection *conn, DBusMessage *msg) ;
+ void setMainSinkSoundProperty(DBusConnection *conn, DBusMessage *msg) ;
+ void setMainSourceSoundProperty(DBusConnection *conn, DBusMessage *msg) ;
+ void setSystemProperty(DBusConnection *conn, DBusMessage *msg) ;
+ void getListMainConnections(DBusConnection *conn, DBusMessage *msg) ;
+ void getListMainSinks(DBusConnection *conn, DBusMessage *msg) ;
+ void getListMainSources(DBusConnection *conn, DBusMessage *msg) ;
+ void getListMainSinkSoundProperties(DBusConnection *conn, DBusMessage *msg) ;
+ void getListMainSourceSoundProperties(DBusConnection *conn, DBusMessage *msg) ;
+ void getListSourceClasses(DBusConnection *conn, DBusMessage *msg) ;
+ void getListSinkClasses(DBusConnection *conn, DBusMessage *msg) ;
+ void getListSystemProperties(DBusConnection *conn, DBusMessage *msg) ;
+ void getTimingInformation(DBusConnection *conn, DBusMessage *msg) ;
+
+ /**
+ * sets the pointer to the CommandReceiveInterface and registers Callback
+ * @param receiver
+ */
+ void setCommandReceiver(CommandReceiveInterface*& receiver);
+private:
+ CommandReceiveInterface* mCommandReceiveInterface;
+ DBusWrapper* mDBusWrapper;
+ typedef std::map<std::string,CallBackMethod> functionMap_t;
+ functionMap_t mFunctionMap;
+ DBusMessageHandler mDBUSMessageHandler;
+
+ /**
+ * receives a callback whenever the path of the plugin is called
+ */
+ static DBusHandlerResult receiveCallback(DBusConnection *conn, DBusMessage *msg, void *user_data);
+
+ /**
+ * dynamic delegate that handles the Callback of the static receiveCallback
+ * @param conn DBus connection
+ * @param msg DBus message
+ * @param user_data pointer to instance of CommandReceiverShadow
+ * @return
+ */
+ DBusHandlerResult receiveCallbackDelegate(DBusConnection *conn, DBusMessage *msg);
+
+ /**
+ * sends out introspectiondata read from an xml file.
+ * @param conn
+ * @param msg
+ */
+ void sendIntrospection(DBusConnection* conn, DBusMessage* msg) ;
+
+ /**
+ * creates the function map needed to combine DBus messages and function adresses
+ * @return the map
+ */
+ functionMap_t createMap();
+};
+
+#endif /* COMMANDRECEIVERSHADOW_H_ */
--- /dev/null
+/**
+* Copyright (C) 2011, BMW AG
+*
+* GeniviAudioMananger DbusPlugin
+*
+* \file CommandSender.h
+*
+* \date 20-Oct-2011 3:42:04 PM
+* \author Christian Mueller (christian.ei.mueller@bmw.de)
+*
+* \section License
+* GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
+* Copyright (C) 2011, BMW AG Christian Mueller Christian.ei.mueller@bmw.de
+*
+* This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
+* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
+* You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
+* Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
+* Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
+* As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
+* Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
+*
+* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
+*/
+
+
+#ifndef COMMANDSENDER_H_
+#define COMMANDSENDER_H_
+
+#include "DBusMessageHandler.h"
+#include "CommandReceiverShadow.h"
+#include "DBusWrapper.h"
+
+#include <command/CommandSendInterface.h>
+#include <dbus/dbus.h>
+#include <map>
+
+using namespace am;
+
+#define DLT_CONTEXT DBusCommandPlugin
+const char MY_NODE[]="CommandInterface";
+
+/**
+ * Dbus Implementation of CommandSendInterface
+ */
+class DbusCommandSender: public CommandSendInterface {
+public:
+ DbusCommandSender();
+ virtual ~DbusCommandSender();
+ am_Error_e startupInterface(CommandReceiveInterface* commandreceiveinterface) ;
+ am_Error_e stopInterface() ;
+ am_Error_e cbCommunicationReady() ;
+ am_Error_e cbCommunicationRundown() ;
+ void cbNumberOfMainConnectionsChanged() ;
+ void cbNumberOfSinksChanged() ;
+ void cbNumberOfSourcesChanged() ;
+ void cbNumberOfSinkClassesChanged() ;
+ void cbNumberOfSourceClassesChanged() ;
+ void cbMainConnectionStateChanged(const am_mainConnectionID_t connectionID, const am_ConnectionState_e connectionState) ;
+ void cbMainSinkSoundPropertyChanged(const am_sinkID_t sinkID, const am_MainSoundProperty_s SoundProperty) ;
+ void cbMainSourceSoundPropertyChanged(const am_sourceID_t sourceID, const am_MainSoundProperty_s& SoundProperty) ;
+ void cbSinkAvailabilityChanged(const am_sinkID_t sinkID, const am_Availability_s& availability) ;
+ void cbSourceAvailabilityChanged(const am_sourceID_t sourceID, const am_Availability_s& availability) ;
+ void cbVolumeChanged(const am_sinkID_t sinkID, const am_mainVolume_t volume) ;
+ void cbSinkMuteStateChanged(const am_sinkID_t sinkID, const am_MuteState_e muteState) ;
+ void cbSystemPropertyChanged(const am_SystemProperty_s& SystemProperty) ;
+ void cbTimingInformationChanged(const am_mainConnectionID_t mainConnection, const am_timeSync_t time) ;
+private:
+ DBusMessageHandler mDBUSMessageHandler;
+ CommandReceiverShadow mCommandReceiverShadow;
+ DBusWrapper* mDBusWrapper;
+ CommandReceiveInterface* mCommandReceiveInterface;
+
+ /**
+ * list of sinks, needed to send out only deltas
+ */
+ std::vector<am_SinkType_s> mlistSinks;
+
+ /**
+ * list of sources, needed to send out only deltas
+ */
+ std::vector<am_SourceType_s> mlistSources;
+
+ /**
+ * used as comparison function for am_SinkType_s
+ */
+ struct sortBySinkID
+ {
+ bool operator()(const am_SinkType_s & a, const am_SinkType_s & b)
+ {
+ return (a.sinkID < b.sinkID);
+ }
+ };
+
+ /**
+ * used as comparison function for am_SourceType_s
+ */
+ struct sortBySourceID
+ {
+ bool operator()(const am_SourceType_s & a, const am_SourceType_s & b)
+ {
+ return (a.sourceID < b.sourceID);
+ }
+ };
+
+};
+
+#endif /* COMMANDSENDER_H_ */
--- /dev/null
+/**
+* Copyright (C) 2011, BMW AG
+*
+* GeniviAudioMananger DbusPlugin
+*
+* \file DBusMessageHandler
+*
+* \date 20-Oct-2011 3:42:04 PM
+* \author Christian Mueller (christian.ei.mueller@bmw.de)
+*
+* \section License
+* GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
+* Copyright (C) 2011, BMW AG Christian Mueller Christian.ei.mueller@bmw.de
+*
+* This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
+* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
+* You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
+* Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
+* Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
+* As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
+* Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
+*
+* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
+*/
+
+#ifndef _DBUSMESSAGEHANDLER_H_
+#define _DBUSMESSAGEHANDLER_H_
+
+
+#include <audiomanagertypes.h>
+#include <vector>
+#include <sstream>
+using std::stringstream;
+
+#include <string>
+using std::string;
+
+#include <dbus/dbus.h>
+#include <list>
+#include <dlt/dlt.h>
+
+DLT_IMPORT_CONTEXT(DBusCommandPlugin);
+
+/**
+ * handles DBus Messages, is used to extract & append parameters and send messages
+ */
+class DBusMessageHandler
+{
+public:
+ DBusMessageHandler();
+ ~DBusMessageHandler();
+
+ /**
+ * sets the DBus Connection
+ * @param connection pointer to the DBus Connection
+ */
+ void setDBusConnection(DBusConnection*& connection);
+
+ /**
+ * is called to initiate the receiving of a message
+ * @param msg pointer to the message to be received
+ */
+ void initReceive(DBusMessage* msg);
+
+ /**
+ * is called to initiate the reply to a message
+ * @param msg pointer to the message the reply is for
+ */
+ void initReply(DBusMessage* msg);
+
+ /**
+ * inits a signal to be sent via dbus
+ * parameters can be added before sending the signal
+ * @param path the path
+ * @param signalName the signal name
+ */
+ void initSignal(std::string path, std::string signalName);
+
+ /**
+ * sends out the message
+ */
+ void sendMessage();
+
+ /**
+ * the get functions return a value from the received dbus message
+ * @return
+ */
+ dbus_uint16_t getUInt();
+ dbus_int16_t getInt();
+ dbus_bool_t getBool();
+ char getByte();
+ double getDouble();
+ char* getString();
+ void getProperty(dbus_int16_t& type, dbus_int16_t& value);
+
+ /**
+ * the overloaded append function appends different datatypes to the dbusmessage
+ */
+ void append(dbus_int16_t toAppend);
+ void append(dbus_uint16_t toAppend);
+ void append(char toAppend);
+ void append(bool toAppend);
+ void append(double toAppend);
+ void append(const am::am_SinkType_s& sinkType);
+ void append(const am::am_SourceType_s& sourceType);
+ void append(const am::am_MainSoundProperty_s mainSoundProperty);
+ void append(const am::am_Availability_s & availability);
+ void append(const am::am_SystemProperty_s & SystemProperty);
+ void append(const std::vector<am::am_MainConnectionType_s>& listMainConnections);
+ void append(const std::vector<am::am_SinkType_s>& listMainSinks);
+ void append(const std::vector<am::am_SourceType_s>& listMainSources);
+ void append(const std::vector<am::am_MainSoundProperty_s>& listMainSoundProperties);
+ void append(const std::vector<am::am_SourceClass_s>& listSourceClasses);
+ void append(const std::vector<am::am_SinkClass_s>& listSinkClasses);
+ void append(const std::vector<am::am_SystemProperty_s>& listSystemProperties);
+
+
+private:
+
+ DBusMessageIter mDBusMessageIter;
+ DBusError mDBusError;
+ dbus_uint32_t mSerial;
+ std::string mErrorName;
+ std::string mErrorMsg;
+ DBusMessage* mDbusMessage;
+ DBusMessage* mReveiveMessage;
+ DBusConnection* mDBusConnection;
+};
+
+#endif // _DBUSMESSAGEWRAPPER_H_
* \section Info More information
* can be found at <https://collab.genivi.org/wiki/display/genivi/GENIVI+Home>
*
- * \todo enhance Interface
*/
#ifndef MAINPAGE_H_
--- /dev/null
+/**
+* Copyright (C) 2011, BMW AG
+*
+* GeniviAudioMananger DbusPlugin
+*
+* \file CommandReceiverShadow.cpp
+*
+* \date 20-Oct-2011 3:42:04 PM
+* \author Christian Mueller (christian.ei.mueller@bmw.de)
+*
+* \section License
+* GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
+* Copyright (C) 2011, BMW AG Christian Mueller Christian.ei.mueller@bmw.de
+*
+* This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
+* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
+* You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
+* Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
+* Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
+* As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
+* Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
+*
+* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
+*/
+
+
+#include "CommandReceiverShadow.h"
+#include "CommandSender.h"
+#include "DBusWrapper.h"
+#include <audiomanagertypes.h>
+
+#include <string>
+#include <fstream>
+#include <assert.h>
+
+/**
+ * static ObjectPathTable is needed for DBus Callback handling
+ */
+static DBusObjectPathVTable gObjectPathVTable;
+
+CommandReceiverShadow::CommandReceiverShadow()
+: mCommandReceiveInterface(NULL),
+ mDBusWrapper(NULL),
+ mFunctionMap(createMap()),
+ mDBUSMessageHandler()
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("CommandReceiverShadow constructed"));
+}
+
+CommandReceiverShadow::~CommandReceiverShadow()
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("CommandReceiverShadow destructed"));
+}
+
+void CommandReceiverShadow::connect(DBusConnection *conn, DBusMessage *msg)
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("CommandReceiverShadow::connect called"));
+
+ (void) conn;
+ assert(mCommandReceiveInterface!=NULL);
+
+ mDBUSMessageHandler.initReceive(msg);
+ am_sourceID_t sourceID=(am_sourceID_t)mDBUSMessageHandler.getUInt();
+ am_sinkID_t sinkID=(am_sinkID_t)mDBUSMessageHandler.getUInt();
+ am_mainConnectionID_t mainConnectionID=0;
+ am_Error_e returnCode=mCommandReceiveInterface->connect(sourceID,sinkID,mainConnectionID);
+ mDBUSMessageHandler.initReply(msg);
+ mDBUSMessageHandler.append((dbus_int16_t)returnCode);
+ mDBUSMessageHandler.append((dbus_uint16_t)mainConnectionID);
+ mDBUSMessageHandler.sendMessage();
+}
+
+
+
+void CommandReceiverShadow::disconnect(DBusConnection *conn, DBusMessage *msg)
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("CommandReceiverShadow::disconnect called"));
+
+ (void) conn;
+ assert(mCommandReceiveInterface!=NULL);
+
+ mDBUSMessageHandler.initReceive(msg);
+ am_mainConnectionID_t mainConnnectionID=(am_mainConnectionID_t)mDBUSMessageHandler.getUInt();
+ am_Error_e returnCode=mCommandReceiveInterface->disconnect(mainConnnectionID);
+ mDBUSMessageHandler.initReply(msg);
+ mDBUSMessageHandler.append((dbus_int16_t)returnCode);
+ mDBUSMessageHandler.sendMessage();
+}
+
+
+
+void CommandReceiverShadow::setVolume(DBusConnection *conn, DBusMessage *msg)
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("CommandReceiverShadow::setVolume called"));
+
+ (void) conn;
+ assert(mCommandReceiveInterface!=NULL);
+
+ mDBUSMessageHandler.initReceive(msg);
+ am_sinkID_t sinkID=(am_sinkID_t)mDBUSMessageHandler.getUInt();
+ am_volume_t volume=(am_volume_t)mDBUSMessageHandler.getInt();
+ am_Error_e returnCode=mCommandReceiveInterface->setVolume(sinkID,volume);
+ mDBUSMessageHandler.initReply(msg);
+ mDBUSMessageHandler.append((dbus_int16_t)returnCode);
+ mDBUSMessageHandler.sendMessage();
+}
+
+
+
+void CommandReceiverShadow::volumeStep(DBusConnection *conn, DBusMessage *msg)
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("CommandReceiverShadow::volumeStep called"));
+
+ (void) conn;
+ assert(mCommandReceiveInterface!=NULL);
+
+ mDBUSMessageHandler.initReceive(msg);
+ am_sinkID_t sinkID=(am_sinkID_t)mDBUSMessageHandler.getUInt();
+ int16_t volumeStep=(int16_t)mDBUSMessageHandler.getInt();
+ am_Error_e returnCode=mCommandReceiveInterface->volumeStep(sinkID,volumeStep);
+ mDBUSMessageHandler.initReply(msg);
+ mDBUSMessageHandler.append((dbus_int16_t)returnCode);
+ mDBUSMessageHandler.sendMessage();
+}
+
+
+
+void CommandReceiverShadow::setSinkMuteState(DBusConnection *conn, DBusMessage *msg)
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("CommandReceiverShadow::setSinkMuteState called"));
+
+ (void) conn;
+ assert(mCommandReceiveInterface!=NULL);
+
+ mDBUSMessageHandler.initReceive(msg);
+ am_sinkID_t sinkID=(am_sinkID_t)mDBUSMessageHandler.getUInt();
+ am_MuteState_e muteState=(am_MuteState_e)mDBUSMessageHandler.getInt();
+ am_Error_e returnCode=mCommandReceiveInterface->setSinkMuteState(sinkID,muteState);
+ mDBUSMessageHandler.initReply(msg);
+ mDBUSMessageHandler.append((dbus_int16_t)returnCode);
+ mDBUSMessageHandler.sendMessage();
+}
+
+
+
+void CommandReceiverShadow::setMainSinkSoundProperty(DBusConnection *conn, DBusMessage *msg)
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("CommandReceiverShadow::setMainSinkSoundProperty called"));
+
+ (void) conn;
+ assert(mCommandReceiveInterface!=NULL);
+
+ mDBUSMessageHandler.initReceive(msg);
+ am_sinkID_t sinkID=(am_sinkID_t)mDBUSMessageHandler.getUInt();
+ dbus_int16_t type=0;
+ dbus_int16_t value=0;
+ mDBUSMessageHandler.getProperty(type,value);
+ am_MainSoundProperty_s mainSoundProperty;
+ mainSoundProperty.type=(am_MainSoundPropertyType_e)type;
+ mainSoundProperty.value=(int32_t)value;
+ am_Error_e returnCode=mCommandReceiveInterface->setMainSinkSoundProperty(mainSoundProperty,sinkID);
+ mDBUSMessageHandler.initReply(msg);
+ mDBUSMessageHandler.append((dbus_int16_t)returnCode);
+ mDBUSMessageHandler.sendMessage();
+}
+
+
+
+void CommandReceiverShadow::setMainSourceSoundProperty(DBusConnection *conn, DBusMessage *msg)
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("CommandReceiverShadow::setMainSourceSoundProperty called"));
+
+ (void) conn;
+ assert(mCommandReceiveInterface!=NULL);
+
+ mDBUSMessageHandler.initReceive(msg);
+ am_sourceID_t sourceID=(am_sinkID_t)mDBUSMessageHandler.getUInt();
+ dbus_int16_t type=0;
+ dbus_int16_t value=0;
+ mDBUSMessageHandler.getProperty(type,value);
+ am_MainSoundProperty_s mainSoundProperty;
+ mainSoundProperty.type=(am_MainSoundPropertyType_e)type;
+ mainSoundProperty.value=(int32_t)value;
+ am_Error_e returnCode=mCommandReceiveInterface->setMainSourceSoundProperty(mainSoundProperty,sourceID);
+ mDBUSMessageHandler.initReply(msg);
+ mDBUSMessageHandler.append((dbus_int16_t)returnCode);
+ mDBUSMessageHandler.sendMessage();
+}
+
+
+
+void CommandReceiverShadow::setSystemProperty(DBusConnection *conn, DBusMessage *msg)
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("CommandReceiverShadow::setSystemProperty called"));
+
+ (void) conn;
+ assert(mCommandReceiveInterface!=NULL);
+
+ mDBUSMessageHandler.initReceive(msg);
+ dbus_int16_t type=0;
+ dbus_int16_t value=0;
+ mDBUSMessageHandler.getProperty(type,value);
+ am_SystemProperty_s systemProperty;
+ systemProperty.type=(am_SystemPropertyType_e)type;
+ systemProperty.value=(int32_t)value;
+ am_Error_e returnCode=mCommandReceiveInterface->setSystemProperty(systemProperty);
+ mDBUSMessageHandler.initReply(msg);
+ mDBUSMessageHandler.append((dbus_int16_t)returnCode);
+ mDBUSMessageHandler.sendMessage();
+}
+
+
+
+void CommandReceiverShadow::getListMainConnections(DBusConnection *conn, DBusMessage *msg)
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("CommandReceiverShadow::getListMainConnections called"));
+
+ (void) conn;
+ assert(mCommandReceiveInterface!=NULL);
+ std::vector<am_MainConnectionType_s> listMainConnections;
+ am_Error_e returnCode=mCommandReceiveInterface->getListMainConnections(listMainConnections);
+ mDBUSMessageHandler.initReply(msg);
+ mDBUSMessageHandler.append((dbus_int16_t)returnCode);
+ mDBUSMessageHandler.append(listMainConnections);
+ mDBUSMessageHandler.sendMessage();
+}
+
+
+
+void CommandReceiverShadow::getListMainSinks(DBusConnection *conn, DBusMessage *msg)
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("CommandReceiverShadow::getListMainSinks called"));
+
+ (void) conn;
+ assert(mCommandReceiveInterface!=NULL);
+ std::vector<am_SinkType_s> listSinks;
+ am_Error_e returnCode=mCommandReceiveInterface->getListMainSinks(listSinks);
+ mDBUSMessageHandler.initReply(msg);
+ mDBUSMessageHandler.append((dbus_int16_t)returnCode);
+ mDBUSMessageHandler.append(listSinks);
+ mDBUSMessageHandler.sendMessage();
+}
+
+
+
+void CommandReceiverShadow::getListMainSources(DBusConnection *conn, DBusMessage *msg)
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("CommandReceiverShadow::getListMainSources called"));
+
+ (void) conn;
+ assert(mCommandReceiveInterface!=NULL);
+ std::vector<am_SourceType_s> listSources;
+ am_Error_e returnCode=mCommandReceiveInterface->getListMainSources(listSources);
+ mDBUSMessageHandler.initReply(msg);
+ mDBUSMessageHandler.append((dbus_int16_t)returnCode);
+ mDBUSMessageHandler.append(listSources);
+ mDBUSMessageHandler.sendMessage();
+}
+
+
+
+void CommandReceiverShadow::getListMainSinkSoundProperties(DBusConnection *conn, DBusMessage *msg)
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("CommandReceiverShadow::getListMainSinkSoundProperties called"));
+
+ (void) conn;
+ assert(mCommandReceiveInterface!=NULL);
+
+ mDBUSMessageHandler.initReceive(msg);
+ am_sinkID_t sinkID=(am_sinkID_t)mDBUSMessageHandler.getUInt();
+ std::vector<am_MainSoundProperty_s> listSinkSoundProperties;
+ am_Error_e returnCode=mCommandReceiveInterface->getListMainSinkSoundProperties(sinkID,listSinkSoundProperties);
+ mDBUSMessageHandler.initReply(msg);
+ mDBUSMessageHandler.append((dbus_int16_t)returnCode);
+ mDBUSMessageHandler.append(listSinkSoundProperties);
+ mDBUSMessageHandler.sendMessage();
+}
+
+
+
+void CommandReceiverShadow::getListMainSourceSoundProperties(DBusConnection *conn, DBusMessage *msg)
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("CommandReceiverShadow::getListMainSourceSoundProperties called"));
+
+ (void) conn;
+ assert(mCommandReceiveInterface!=NULL);
+
+ mDBUSMessageHandler.initReceive(msg);
+ am_sourceID_t sourceID=(am_sourceID_t)mDBUSMessageHandler.getUInt();
+ std::vector<am_MainSoundProperty_s> listSinkSoundProperties;
+ am_Error_e returnCode=mCommandReceiveInterface->getListMainSourceSoundProperties(sourceID,listSinkSoundProperties);
+ mDBUSMessageHandler.initReply(msg);
+ mDBUSMessageHandler.append((dbus_int16_t)returnCode);
+ mDBUSMessageHandler.append(listSinkSoundProperties);
+ mDBUSMessageHandler.sendMessage();
+}
+
+
+
+void CommandReceiverShadow::getListSourceClasses(DBusConnection *conn, DBusMessage *msg)
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("CommandReceiverShadow::getListSourceClasses called"));
+
+ (void) conn;
+ assert(mCommandReceiveInterface!=NULL);
+ std::vector<am_SourceClass_s> listSourceClasses;
+ am_Error_e returnCode=mCommandReceiveInterface->getListSourceClasses(listSourceClasses);
+ mDBUSMessageHandler.initReply(msg);
+ mDBUSMessageHandler.append((dbus_int16_t)returnCode);
+ mDBUSMessageHandler.append(listSourceClasses);
+ mDBUSMessageHandler.sendMessage();
+}
+
+
+
+void CommandReceiverShadow::getListSinkClasses(DBusConnection *conn, DBusMessage *msg)
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("CommandReceiverShadow::getListSinkClasses called"));
+
+ (void) conn;
+ assert(mCommandReceiveInterface!=NULL);
+ std::vector<am_SinkClass_s> listSinkClasses;
+ am_Error_e returnCode=mCommandReceiveInterface->getListSinkClasses(listSinkClasses);
+ mDBUSMessageHandler.initReply(msg);
+ mDBUSMessageHandler.append((dbus_int16_t)returnCode);
+ mDBUSMessageHandler.append(listSinkClasses);
+ mDBUSMessageHandler.sendMessage();
+}
+
+
+
+void CommandReceiverShadow::getListSystemProperties(DBusConnection *conn, DBusMessage *msg)
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("CommandReceiverShadow::getListSystemProperties called"));
+
+ (void) conn;
+ assert(mCommandReceiveInterface!=NULL);
+ std::vector<am_SystemProperty_s> listSystemProperties;
+ am_Error_e returnCode=mCommandReceiveInterface->getListSystemProperties(listSystemProperties);
+ mDBUSMessageHandler.initReply(msg);
+ mDBUSMessageHandler.append((dbus_int16_t)returnCode);
+ mDBUSMessageHandler.append(listSystemProperties);
+ mDBUSMessageHandler.sendMessage();
+}
+
+
+
+void CommandReceiverShadow::getTimingInformation(DBusConnection *conn, DBusMessage *msg)
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("CommandReceiverShadow::getTimingInformation called"));
+
+ (void) conn;
+ assert(mCommandReceiveInterface!=NULL);
+
+ mDBUSMessageHandler.initReceive(msg);
+ am_mainConnectionID_t mainConnectionID=(am_mainConnectionID_t)mDBUSMessageHandler.getUInt();
+ am_timeSync_t delay=0;
+ am_Error_e returnCode=mCommandReceiveInterface->getTimingInformation(mainConnectionID,delay);
+ mDBUSMessageHandler.initReply(msg);
+ mDBUSMessageHandler.append((dbus_int16_t)returnCode);
+ mDBUSMessageHandler.append((dbus_int16_t)delay);
+ mDBUSMessageHandler.sendMessage();
+}
+
+
+
+DBusHandlerResult CommandReceiverShadow::receiveCallback(DBusConnection *conn, DBusMessage *msg, void *user_data)
+{
+ assert(conn!=NULL);
+ assert(msg!=NULL);
+ assert(user_data!=NULL);
+ CommandReceiverShadow* reference=(CommandReceiverShadow*) user_data;
+ return reference->receiveCallbackDelegate(conn,msg);
+}
+
+void CommandReceiverShadow::sendIntrospection(DBusConnection *conn, DBusMessage *msg)
+{
+ assert(conn!=NULL);
+ assert(msg!=NULL);
+ DBusMessage* reply;
+ DBusMessageIter args;
+ dbus_uint32_t serial = 0;
+
+ // create a reply from the message
+ reply = dbus_message_new_method_return(msg);
+ std::ifstream in(INTROSPECTION_XML_FILE);
+ assert(in!=NULL);
+ std::string introspect((std::istreambuf_iterator<char>(in)), std::istreambuf_iterator<char>());
+ const char* string = introspect.c_str();
+
+ // add the arguments to the reply
+ dbus_message_iter_init_append(reply, &args);
+ if (!dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING, &string))
+ {
+ // DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler Out Of Memory!"));
+ }
+
+ // send the reply && flush the connection
+ if (!dbus_connection_send(conn, reply, &serial))
+ {
+ // DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler Out Of Memory!"));
+ }
+ dbus_connection_flush(conn);
+
+ // free the reply
+ dbus_message_unref(reply);
+}
+
+DBusHandlerResult CommandReceiverShadow::receiveCallbackDelegate(DBusConnection *conn, DBusMessage *msg)
+{
+ //DLT_LOG(dMain, DLT_LOG_INFO, DLT_STRING("message received"));
+
+ if (dbus_message_is_method_call(msg, DBUS_INTERFACE_INTROSPECTABLE, "Introspect")) {
+ sendIntrospection(conn,msg);
+ return DBUS_HANDLER_RESULT_HANDLED;
+ }
+
+ functionMap_t::iterator iter = mFunctionMap.begin();
+ std::string k(dbus_message_get_member(msg));
+ iter=mFunctionMap.find(k);
+ if (iter != mFunctionMap.end())
+ {
+ std::string p(iter->first);
+ CallBackMethod cb=iter->second;
+ (this->*cb)(conn,msg);
+ return DBUS_HANDLER_RESULT_HANDLED;
+ }
+
+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
+
+void CommandReceiverShadow::setCommandReceiver(CommandReceiveInterface*& receiver)
+{
+ assert(receiver!=NULL);
+ mCommandReceiveInterface=receiver;
+
+ gObjectPathVTable.message_function=CommandReceiverShadow::receiveCallback;
+
+ DBusConnection* connection;
+ mCommandReceiveInterface->getDBusConnectionWrapper(mDBusWrapper);
+ assert(mDBusWrapper!=NULL);
+
+ mDBusWrapper->getDBusConnection(connection);
+ assert(connection!=NULL);
+ mDBUSMessageHandler.setDBusConnection(connection);
+
+ std::string path(MY_NODE);
+ mDBusWrapper->registerCallback(&gObjectPathVTable,path,this);
+}
+
+CommandReceiverShadow::functionMap_t CommandReceiverShadow::createMap()
+{
+ functionMap_t m;
+ m["Connect"]=&CommandReceiverShadow::connect ;
+ m["Disconnect"]=&CommandReceiverShadow::disconnect ;
+ m["SetVolume"]=&CommandReceiverShadow::setVolume ;
+ m["VolumeStep"]=&CommandReceiverShadow::volumeStep ;
+ m["SetSinkMuteState"]=&CommandReceiverShadow::setSinkMuteState ;
+ m["SetMainSinkSoundProperty"]=&CommandReceiverShadow::setMainSinkSoundProperty ;
+ m["SetMainSourceSoundProperty"]=&CommandReceiverShadow::setMainSourceSoundProperty ;
+ m["GetListMainConnections"]=&CommandReceiverShadow::getListMainConnections ;
+ m["GetListMainSinks"]=&CommandReceiverShadow::getListMainSinks ;
+ m["GetListMainSources"]=&CommandReceiverShadow::getListMainSources ;
+ m["GetListMainSinkSoundProperties"]=&CommandReceiverShadow::getListMainSinkSoundProperties ;
+ m["GetListMainSourceSoundProperties"]=&CommandReceiverShadow::getListMainSourceSoundProperties ;
+ m["GetListSourceClasses"]=&CommandReceiverShadow::getListSourceClasses ;
+ m["GetListSinkClasses"]=&CommandReceiverShadow::getListSinkClasses ;
+ m["GetListSystemProperties"]=&CommandReceiverShadow::getListSystemProperties ;
+ m["GetTimingInformation"]=&CommandReceiverShadow::getTimingInformation ;
+ m["SetSystemProperty"]=&CommandReceiverShadow::setSystemProperty ;
+ return m;
+}
+
+
+
--- /dev/null
+/**
+* Copyright (C) 2011, BMW AG
+*
+* GeniviAudioMananger DbusPlugin
+*
+* \file CommandSender.cpp
+*
+* \date 20-Oct-2011 3:42:04 PM
+* \author Christian Mueller (christian.ei.mueller@bmw.de)
+*
+* \section License
+* GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
+* Copyright (C) 2011, BMW AG Christian Mueller Christian.ei.mueller@bmw.de
+*
+* This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
+* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
+* You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
+* Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
+* Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
+* As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
+* Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
+*
+* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
+*/
+
+#include "CommandSender.h"
+#include "DBusMessageHandler.h"
+#include "DBusWrapper.h"
+
+#include <dlt/dlt.h>
+#include <algorithm>
+#include <string>
+#include <vector>
+#include <assert.h>
+#include <set>
+
+DLT_DECLARE_CONTEXT(DBusCommandPlugin);
+
+/**
+ * factory for plugin loading
+ */
+extern "C" CommandSendInterface* PluginCommandInterfaceDbusFactory()
+{
+ return (new DbusCommandSender());
+}
+
+/**
+ * destroy instance of commandSendInterface
+ */
+extern "C" void destroyRoutingPluginInterfaceDbus(CommandSendInterface* commandSendInterface)
+{
+ delete commandSendInterface;
+}
+
+
+DbusCommandSender::DbusCommandSender()
+: mDBUSMessageHandler(),
+ mCommandReceiverShadow(),
+ mDBusWrapper(NULL),
+ mCommandReceiveInterface(NULL)
+{
+ DLT_REGISTER_CONTEXT(DBusCommandPlugin,"DBP","DBus Plugin");
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("DbusCommandSender constructed"));
+}
+
+DbusCommandSender::~DbusCommandSender()
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("DbusCommandSender destructed"));
+}
+
+am_Error_e DbusCommandSender::startupInterface(CommandReceiveInterface* commandreceiveinterface)
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("startupInterface called"));
+
+ mCommandReceiveInterface=commandreceiveinterface;
+ mCommandReceiverShadow.setCommandReceiver(mCommandReceiveInterface);
+ mCommandReceiveInterface->getDBusConnectionWrapper(mDBusWrapper);
+ assert(mDBusWrapper!=NULL);
+ return E_OK;
+}
+
+
+
+am_Error_e DbusCommandSender::stopInterface()
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("stopInterface called"));
+ /**
+ * todo: finish DbusCommandSender::stopInterface(), what needs to be done?
+ */
+ return E_OK;
+}
+
+
+
+am_Error_e DbusCommandSender::cbCommunicationReady()
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("cbCommunicationReady called"));
+ /**
+ * todo: implement DbusCommandSender::cbCommunicationReady()
+ */
+}
+
+
+
+am_Error_e DbusCommandSender::cbCommunicationRundown()
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("cbCommunicationRundown called"));
+ /**
+ * todo: implement DbusCommandSender::cbCommunicationRundown()
+ */
+}
+
+
+
+void DbusCommandSender::cbNumberOfMainConnectionsChanged()
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("cbNumberOfMainConnectionsChanged called"));
+
+ mDBUSMessageHandler.initSignal(std::string(MY_NODE),std::string("NumberOfMainConnectionsChanged"));
+ mDBUSMessageHandler.sendMessage();
+}
+
+
+
+void DbusCommandSender::cbNumberOfSinksChanged()
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("cbNumberOfSinksChanged called"));
+
+ std::vector<am_SinkType_s> newListSinks;
+ std::vector<am_SinkType_s> diffList;
+ mCommandReceiveInterface->getListMainSinks(newListSinks);
+ std::sort(newListSinks.begin(),newListSinks.end(),sortBySinkID());
+ std::set_difference(newListSinks.begin(),newListSinks.end(),mlistSinks.begin(),mlistSinks.end(),std::back_inserter(diffList), sortBySinkID());
+ assert(diffList.size()==1);
+ if (newListSinks.size()>mlistSinks.size())
+ {
+ mDBUSMessageHandler.initSignal(std::string(MY_NODE),"SinkAdded");
+ mDBUSMessageHandler.append(&diffList.at(0));
+
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("send signal SinkAdded"));
+ }
+ else
+ {
+ mDBUSMessageHandler.initSignal(std::string(MY_NODE),"SinkRemoved");
+ mDBUSMessageHandler.append(diffList.begin()->sinkID);
+
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("send signal SinkRemoved"));
+ }
+
+ mDBUSMessageHandler.sendMessage();
+ mlistSinks=newListSinks;
+}
+
+
+
+void DbusCommandSender::cbNumberOfSourcesChanged()
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("cbNumberOfSourcesChanged called"));
+
+ std::vector<am_SourceType_s> newlistSources;
+ std::vector<am_SourceType_s> diffList;
+ mCommandReceiveInterface->getListMainSources(newlistSources);
+ std::sort(newlistSources.begin(),newlistSources.end(),sortBySourceID());
+ std::set_difference(newlistSources.begin(),newlistSources.end(),mlistSources.begin(),mlistSources.end(),std::back_inserter(diffList), sortBySourceID());
+ assert(diffList.size()==1);
+ if (newlistSources.size()>mlistSources.size())
+ {
+ mDBUSMessageHandler.initSignal(std::string(MY_NODE),"SourceAdded");
+ mDBUSMessageHandler.append(&diffList.at(0));
+
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("send signal SourceAdded"));
+ }
+ else
+ {
+ mDBUSMessageHandler.initSignal(std::string(MY_NODE),"SourceRemoved");
+ mDBUSMessageHandler.append((dbus_uint16_t)diffList.begin()->sourceID);
+
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("send signal SourceRemoved"));
+ }
+
+ mDBUSMessageHandler.sendMessage();
+ mlistSources=newlistSources;
+}
+
+
+void DbusCommandSender::cbNumberOfSinkClassesChanged()
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("cbNumberOfSinkClassesChanged called"));
+
+ mDBUSMessageHandler.initSignal(std::string(MY_NODE),std::string("NumberOfSinkClassesChanged"));
+ mDBUSMessageHandler.sendMessage();
+}
+
+
+
+void DbusCommandSender::cbNumberOfSourceClassesChanged()
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("cbNumberOfSourceClassesChanged called"));
+
+ mDBUSMessageHandler.initSignal(std::string(MY_NODE),std::string("NumberOfSourceClassesChanged"));
+ mDBUSMessageHandler.sendMessage();
+}
+
+
+
+void DbusCommandSender::cbMainConnectionStateChanged(const am_mainConnectionID_t connectionID, const am_ConnectionState_e connectionState)
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("cbMainConnectionStateChanged called, connectionID"),DLT_INT16(connectionID),DLT_STRING("connectionState"),DLT_INT16(connectionState));
+
+ mDBUSMessageHandler.initSignal(std::string(MY_NODE),std::string("MainConnectionStateChanged"));
+ mDBUSMessageHandler.append((dbus_uint16_t)connectionID);
+ mDBUSMessageHandler.append((dbus_int16_t)connectionState);
+ mDBUSMessageHandler.sendMessage();
+}
+
+
+
+void DbusCommandSender::cbMainSinkSoundPropertyChanged(const am_sinkID_t sinkID, const am_MainSoundProperty_s SoundProperty)
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("cbMainSinkSoundPropertyChanged called, sinkID"),DLT_INT16(sinkID),DLT_STRING("SoundProperty.type"),DLT_INT16(SoundProperty.type),DLT_STRING("SoundProperty.value"),DLT_INT16(SoundProperty.value));
+
+ mDBUSMessageHandler.initSignal(std::string(MY_NODE),std::string("MainSinkSoundPropertyChanged"));
+ mDBUSMessageHandler.append((dbus_uint16_t)sinkID);
+ mDBUSMessageHandler.append(SoundProperty);
+ mDBUSMessageHandler.sendMessage();
+}
+
+
+
+void DbusCommandSender::cbMainSourceSoundPropertyChanged(const am_sourceID_t sourceID, const am_MainSoundProperty_s & SoundProperty)
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("cbMainSourceSoundPropertyChanged called, sourceID"),DLT_INT16(sourceID),DLT_STRING("SoundProperty.type"),DLT_INT16(SoundProperty.type),DLT_STRING("SoundProperty.value"),DLT_INT16(SoundProperty.value));
+
+ mDBUSMessageHandler.initSignal(std::string(MY_NODE),std::string("MainSourceSoundPropertyChanged"));
+ mDBUSMessageHandler.append((dbus_uint16_t)sourceID);
+ mDBUSMessageHandler.append(SoundProperty);
+ mDBUSMessageHandler.sendMessage();
+}
+
+
+
+void DbusCommandSender::cbSinkAvailabilityChanged(const am_sinkID_t sinkID, const am_Availability_s & availability)
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("cbSinkAvailabilityChanged called, sinkID"),DLT_INT16(sinkID),DLT_STRING("availability.availability"),DLT_INT16(availability.availability),DLT_STRING("SoundProperty.reason"),DLT_INT16(availability.availabilityReason));
+
+ mDBUSMessageHandler.initSignal(std::string(MY_NODE),std::string("SinkAvailabilityChanged"));
+ mDBUSMessageHandler.append((dbus_uint16_t)sinkID);
+ mDBUSMessageHandler.append(availability);
+ mDBUSMessageHandler.sendMessage();
+}
+
+
+
+void DbusCommandSender::cbSourceAvailabilityChanged(const am_sourceID_t sourceID, const am_Availability_s & availability)
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("cbSourceAvailabilityChanged called, sourceID"),DLT_INT16(sourceID),DLT_STRING("availability.availability"),DLT_INT16(availability.availability),DLT_STRING("SoundProperty.reason"),DLT_INT16(availability.availabilityReason));
+
+ mDBUSMessageHandler.initSignal(std::string(MY_NODE),std::string("SourceAvailabilityChanged"));
+ mDBUSMessageHandler.append((dbus_uint16_t)sourceID);
+ mDBUSMessageHandler.append(availability);
+ mDBUSMessageHandler.sendMessage();
+}
+
+
+
+void DbusCommandSender::cbVolumeChanged(const am_sinkID_t sinkID, const am_mainVolume_t volume)
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("cbVolumeChanged called, sinkID"),DLT_INT16(sinkID),DLT_STRING("volume"),DLT_INT16(volume));
+
+ mDBUSMessageHandler.initSignal(std::string(MY_NODE),std::string("VolumeChanged"));
+ mDBUSMessageHandler.append((dbus_uint16_t)sinkID);
+ mDBUSMessageHandler.append((dbus_int16_t)volume);
+ mDBUSMessageHandler.sendMessage();
+}
+
+
+
+void DbusCommandSender::cbSinkMuteStateChanged(const am_sinkID_t sinkID, const am_MuteState_e muteState)
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("cbSinkMuteStateChanged called, sinkID"),DLT_INT16(sinkID),DLT_STRING("muteState"),DLT_INT16(muteState));
+
+ mDBUSMessageHandler.initSignal(std::string(MY_NODE),std::string("SinkMuteStateChanged"));
+ mDBUSMessageHandler.append((dbus_uint16_t)sinkID);
+ mDBUSMessageHandler.append((dbus_int16_t)muteState);
+ mDBUSMessageHandler.sendMessage();
+}
+
+
+
+void DbusCommandSender::cbSystemPropertyChanged(const am_SystemProperty_s & SystemProperty)
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("cbSystemPropertyChanged called, SystemProperty.type"),DLT_INT16(SystemProperty.type),DLT_STRING("SystemProperty.value"),DLT_INT16(SystemProperty.value));
+
+ mDBUSMessageHandler.initSignal(std::string(MY_NODE),std::string("SystemPropertyChanged"));
+ mDBUSMessageHandler.append(SystemProperty);
+ mDBUSMessageHandler.sendMessage();
+}
+
+
+
+void DbusCommandSender::cbTimingInformationChanged(const am_mainConnectionID_t mainConnection, const am_timeSync_t time)
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("cbTimingInformationChanged called, mainConnectionID"),DLT_INT16(mainConnection),DLT_STRING("time"),DLT_INT16(time));
+
+ mDBUSMessageHandler.initSignal(std::string(MY_NODE),std::string("TimingInformationChanged"));
+ mDBUSMessageHandler.append((dbus_uint16_t)mainConnection);
+ mDBUSMessageHandler.append((dbus_int16_t)time);
+ mDBUSMessageHandler.sendMessage();
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+
+#include "DBusMessageHandler.h"
+#include "CommandSender.h"
+#include "DBusConfiguration.h"
+
+#include <stdlib.h>
+#include <assert.h>
+#include <vector>
+
+
+DBusMessageHandler::DBusMessageHandler()
+: mDBusMessageIter(),
+ mDBusError(),
+ mSerial(0),
+ mErrorName(""),
+ mErrorMsg(""),
+ mDbusMessage(NULL),
+ mReveiveMessage(NULL),
+ mDBusConnection(NULL)
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("DBUSMessageHandler constructed"));
+}
+
+DBusMessageHandler::~DBusMessageHandler()
+{
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("DBUSMessageHandler destructed"));
+}
+
+void DBusMessageHandler::initReceive(DBusMessage* msg)
+{
+ assert(msg!=NULL);
+ mReveiveMessage=msg;
+ if (!dbus_message_iter_init(msg, &mDBusMessageIter))
+ {
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::initReceive DBus Message has no arguments!"));
+ mErrorName=std::string(DBUS_ERROR_INVALID_ARGS);
+ mErrorMsg="DBUS Message has no arguments!";
+ }
+}
+
+void DBusMessageHandler::initReply(DBusMessage* msg)
+{
+ assert(msg!=NULL);
+ mDbusMessage = dbus_message_new_method_return(msg);
+ if (mDbusMessage==NULL) {
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::initReply Cannot allocate DBus message!"));
+ mErrorName=std::string(DBUS_ERROR_NO_MEMORY);
+ mErrorMsg="Cannot create reply!";
+ }
+ dbus_message_iter_init_append(mDbusMessage, &mDBusMessageIter);
+}
+
+void DBusMessageHandler::initSignal(std::string path, std::string signalName)
+{
+ assert(!path.empty());
+ assert(!signalName.empty());
+ std::string completePath=std::string(DBUS_SERVICE_OBJECT_PATH)+"/"+path;
+ mDbusMessage=dbus_message_new_signal(completePath.c_str(),DBUS_SERVICE_PREFIX,signalName.c_str());
+
+ if (mDbusMessage == NULL)
+ {
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::initSignal Cannot allocate DBus message!"));
+ }
+}
+
+void DBusMessageHandler::sendMessage()
+{
+ assert(mDBusConnection!=NULL);
+ mSerial=dbus_message_get_serial(mReveiveMessage);
+ if (!mErrorName.empty()) {
+ mDbusMessage = dbus_message_new_error(mReveiveMessage, mErrorName.c_str(), mErrorMsg.c_str());
+ }
+ if (!dbus_connection_send(mDBusConnection, mDbusMessage, &mSerial))
+ {
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::sendMessage cannot send message!"));
+ }
+ dbus_connection_flush(mDBusConnection);
+ dbus_message_unref(mDbusMessage);
+ mDbusMessage = NULL;
+}
+
+char* DBusMessageHandler::getString()
+{
+ char* param=NULL;
+
+ if (DBUS_TYPE_STRING != dbus_message_iter_get_arg_type(&mDBusMessageIter))
+ {
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::getString DBUS handler argument is no String!"));
+ mErrorName=std::string(DBUS_ERROR_INVALID_ARGS);
+ mErrorMsg="DBus argument is no string";
+ }
+ else
+ {
+ dbus_message_iter_get_basic(&mDBusMessageIter, ¶m);
+ dbus_message_iter_next(&mDBusMessageIter);
+ }
+ return (param);
+}
+
+dbus_bool_t DBusMessageHandler::getBool()
+{
+ dbus_bool_t boolparam=false;
+
+ if (DBUS_TYPE_BOOLEAN != dbus_message_iter_get_arg_type(&mDBusMessageIter))
+ {
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::getBool DBUS handler argument is no bool!"));
+ mErrorName=std::string(DBUS_ERROR_INVALID_ARGS);
+ mErrorMsg="DBus argument is no bool";
+ }
+ else
+ {
+ dbus_message_iter_get_basic(&mDBusMessageIter, &boolparam);
+ dbus_message_iter_next(&mDBusMessageIter);
+ }
+ return (boolparam);
+}
+
+char DBusMessageHandler::getByte()
+{
+ char param;
+
+ if (DBUS_TYPE_BYTE != dbus_message_iter_get_arg_type(&mDBusMessageIter))
+ {
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::getByte DBUS handler argument is no byte!"));
+ mErrorName=std::string(DBUS_ERROR_INVALID_ARGS);
+ mErrorMsg="DBus argument is no byte";
+ }
+ else
+ {
+ dbus_message_iter_get_basic(&mDBusMessageIter, ¶m);
+ dbus_message_iter_next(&mDBusMessageIter);
+ }
+ return (param);
+}
+
+dbus_uint16_t DBusMessageHandler::getUInt()
+{
+ dbus_uint16_t param;
+
+ if (DBUS_TYPE_UINT16 != dbus_message_iter_get_arg_type(&mDBusMessageIter))
+ {
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::getUInt DBUS handler argument is no uint32_t!"));
+ mErrorName=std::string(DBUS_ERROR_INVALID_ARGS);
+ mErrorMsg="DBus argument is no uint32_t";
+ }
+ else
+ {
+ dbus_message_iter_get_basic(&mDBusMessageIter, ¶m);
+ dbus_message_iter_next(&mDBusMessageIter);
+ }
+ return (param);
+}
+
+dbus_int16_t DBusMessageHandler::getInt()
+{
+ dbus_int16_t param;
+
+ if (DBUS_TYPE_INT16 != dbus_message_iter_get_arg_type(&mDBusMessageIter))
+ {
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::getInt DBUS handler argument is no int32_t!"));
+ mErrorName=std::string(DBUS_ERROR_INVALID_ARGS);
+ mErrorMsg="DBus argument is no int32_t";;
+ }
+ else
+ {
+ dbus_message_iter_get_basic(&mDBusMessageIter, ¶m);
+ dbus_message_iter_next(&mDBusMessageIter);
+ }
+ return (param);
+}
+
+double DBusMessageHandler::getDouble()
+{
+ double param;
+ if (DBUS_TYPE_DOUBLE != dbus_message_iter_get_arg_type(&mDBusMessageIter))
+ {
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::getDouble DBUS handler argument is no double!"));
+ mErrorName=std::string(DBUS_ERROR_INVALID_ARGS);
+ mErrorMsg="DBus argument is no double";
+ }
+ else
+ {
+ dbus_message_iter_get_basic(&mDBusMessageIter, ¶m);
+ dbus_message_iter_next(&mDBusMessageIter);
+ }
+ return (param);
+}
+
+void DBusMessageHandler::getProperty(dbus_int16_t & type, dbus_int16_t & value)
+{
+ DBusMessageIter arrayIter;
+ if (DBUS_TYPE_STRUCT != dbus_message_iter_get_arg_type(&mDBusMessageIter))
+ {
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::getProperty DBUS handler argument is no array!"));
+ mErrorName=std::string(DBUS_ERROR_INVALID_ARGS);
+ mErrorMsg="DBus argument is no array";
+ }
+ else
+ {
+ dbus_message_iter_recurse(&mDBusMessageIter, &arrayIter);
+ dbus_message_iter_get_basic(&arrayIter, &type);
+ dbus_message_iter_next(&arrayIter);
+ dbus_message_iter_get_basic(&arrayIter, &value);
+ dbus_message_iter_next(&mDBusMessageIter);
+ }
+}
+
+void DBusMessageHandler::append(bool toAppend)
+{
+ dbus_bool_t mybool=toAppend;
+ if (!dbus_message_iter_append_basic(&mDBusMessageIter, DBUS_TYPE_BOOLEAN, &mybool))
+ {
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::append Cannot allocate DBus message!"));
+ mErrorName=std::string(DBUS_ERROR_NO_MEMORY);
+ mErrorMsg="Cannot create reply!";
+ }
+}
+
+
+void DBusMessageHandler::append(double toAppend)
+{
+ if (!dbus_message_iter_append_basic(&mDBusMessageIter, DBUS_TYPE_DOUBLE, &toAppend))
+ {
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::append Cannot allocate DBus message!"));
+ mErrorName=std::string(DBUS_ERROR_NO_MEMORY);
+ mErrorMsg="Cannot create reply!";
+ }
+}
+
+void DBusMessageHandler::append(char toAppend)
+{
+ if (!dbus_message_iter_append_basic(&mDBusMessageIter, DBUS_TYPE_BYTE, &toAppend))
+ {
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::append Cannot allocate DBus message!"));
+ mErrorName=std::string(DBUS_ERROR_NO_MEMORY);
+ mErrorMsg="Cannot create reply!";
+ }
+}
+
+
+void DBusMessageHandler::append(dbus_int16_t toAppend)
+{
+ if (!dbus_message_iter_append_basic(&mDBusMessageIter, DBUS_TYPE_INT16, &toAppend))
+ {
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::append Cannot allocate DBus message!"));
+ mErrorName=std::string(DBUS_ERROR_NO_MEMORY);
+ mErrorMsg="Cannot create reply!";
+ }
+}
+
+void DBusMessageHandler::append(dbus_uint16_t toAppend)
+{
+ if (!dbus_message_iter_append_basic(&mDBusMessageIter, DBUS_TYPE_UINT16, &toAppend))
+ {
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::append Cannot allocate DBus message!"));
+ mErrorName=std::string(DBUS_ERROR_NO_MEMORY);
+ mErrorMsg="Cannot create reply!";
+ }
+}
+
+void DBusMessageHandler::setDBusConnection(DBusConnection *& connection)
+{
+ assert(connection!=NULL);
+ mDBusConnection=connection;
+}
+
+void DBusMessageHandler::append(const am::am_SinkType_s& sinkType)
+{
+ DBusMessageIter structIter;
+ DBusMessageIter structAvailIter;
+ dbus_bool_t success=true;
+ success=success && dbus_message_iter_open_container(&mDBusMessageIter, DBUS_TYPE_STRUCT, "us(ii)iiu", &structIter);
+ success=success && dbus_message_iter_append_basic(&structIter, DBUS_TYPE_UINT16, &sinkType.sinkID);
+ success=success && dbus_message_iter_append_basic(&structIter, DBUS_TYPE_STRING, &sinkType.name);
+
+ success=success && dbus_message_iter_open_container(&mDBusMessageIter, DBUS_TYPE_STRUCT, "(ii)", &structAvailIter);
+ success=success && dbus_message_iter_append_basic(&structAvailIter, DBUS_TYPE_INT16, &sinkType.availability.availability);
+ success=success && dbus_message_iter_append_basic(&structAvailIter, DBUS_TYPE_INT16, &sinkType.availability.availabilityReason);
+ success=success && dbus_message_iter_close_container(&mDBusMessageIter, &structAvailIter);
+
+ success=success && dbus_message_iter_append_basic(&structIter, DBUS_TYPE_INT16, &sinkType.volume);
+ success=success && dbus_message_iter_append_basic(&structIter, DBUS_TYPE_INT16, &sinkType.muteState);
+ success=success && dbus_message_iter_append_basic(&structIter, DBUS_TYPE_UINT16, &sinkType.sinkClassID);
+ success=success && dbus_message_iter_close_container(&mDBusMessageIter, &structIter);
+
+ if (!success)
+ {
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::append Cannot allocate DBus message!"));
+ mErrorName=std::string(DBUS_ERROR_NO_MEMORY);
+ mErrorMsg="Cannot create reply!";
+ }
+}
+
+void DBusMessageHandler::append(const am::am_SourceType_s & sourceType)
+{
+ DBusMessageIter structIter;
+ DBusMessageIter structAvailIter;
+ dbus_bool_t success=true;
+ success=success && dbus_message_iter_open_container(&mDBusMessageIter, DBUS_TYPE_STRUCT, "us(ii)u", &structIter);
+ success=success && dbus_message_iter_append_basic(&structIter, DBUS_TYPE_UINT16, &sourceType.sourceID);
+ success=success && dbus_message_iter_append_basic(&structIter, DBUS_TYPE_STRING, &sourceType.name);
+
+ success=success && dbus_message_iter_open_container(&mDBusMessageIter, DBUS_TYPE_STRUCT, "(ii)", &structAvailIter);
+ success=success && dbus_message_iter_append_basic(&structAvailIter, DBUS_TYPE_INT16, &sourceType.availability.availability);
+ success=success && dbus_message_iter_append_basic(&structAvailIter, DBUS_TYPE_INT16, &sourceType.availability.availabilityReason);
+ success=success && dbus_message_iter_close_container(&mDBusMessageIter, &structAvailIter);
+
+ success=success && dbus_message_iter_append_basic(&structIter, DBUS_TYPE_UINT16, &sourceType.sourceClassID);
+ success=success && dbus_message_iter_close_container(&mDBusMessageIter, &structIter);
+
+ if (!success)
+ {
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::append Cannot allocate DBus message!"));
+ mErrorName=std::string(DBUS_ERROR_NO_MEMORY);
+ mErrorMsg="Cannot create reply!";
+ }
+}
+
+void DBusMessageHandler::append(const am::am_MainSoundProperty_s mainSoundProperty)
+{
+ DBusMessageIter structIter;
+ dbus_bool_t success=true;
+ success=success && dbus_message_iter_open_container(&mDBusMessageIter, DBUS_TYPE_STRUCT, "(ii)", &structIter);
+ success=success && dbus_message_iter_append_basic(&structIter, DBUS_TYPE_INT16, &mainSoundProperty.type);
+ success=success && dbus_message_iter_append_basic(&structIter, DBUS_TYPE_INT16, &mainSoundProperty.value);
+ success=success && dbus_message_iter_close_container(&mDBusMessageIter, &structIter);
+
+ if (!success)
+ {
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::append Cannot allocate DBus message!"));
+ mErrorName=std::string(DBUS_ERROR_NO_MEMORY);
+ mErrorMsg="Cannot create reply!";
+ }
+}
+
+void DBusMessageHandler::append(const am::am_Availability_s & availability)
+{
+ DBusMessageIter structAvailIter;
+ dbus_bool_t success=true;
+ success=success && dbus_message_iter_open_container(&mDBusMessageIter, DBUS_TYPE_STRUCT, "(ii)", &structAvailIter);
+ success=success && dbus_message_iter_append_basic(&structAvailIter, DBUS_TYPE_INT16, &availability.availability);
+ success=success && dbus_message_iter_append_basic(&structAvailIter, DBUS_TYPE_INT16, &availability.availabilityReason);
+ success=success && dbus_message_iter_close_container(&mDBusMessageIter, &structAvailIter);
+
+ if (!success)
+ {
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::append Cannot allocate DBus message!"));
+ mErrorName=std::string(DBUS_ERROR_NO_MEMORY);
+ mErrorMsg="Cannot create reply!";
+ }
+}
+
+void DBusMessageHandler::append(const am::am_SystemProperty_s & SystemProperty)
+{
+ DBusMessageIter structIter;
+ dbus_bool_t success=true;
+ success=success && dbus_message_iter_open_container(&mDBusMessageIter, DBUS_TYPE_STRUCT, "(ii)", &structIter);
+ success=success && dbus_message_iter_append_basic(&structIter, DBUS_TYPE_INT16, &SystemProperty.type);
+ success=success && dbus_message_iter_append_basic(&structIter, DBUS_TYPE_INT16, &SystemProperty.value);
+ success=success && dbus_message_iter_close_container(&mDBusMessageIter, &structIter);
+
+ if (!success)
+ {
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::append Cannot allocate DBus message!"));
+ mErrorName=std::string(DBUS_ERROR_NO_MEMORY);
+ mErrorMsg="Cannot create reply!";
+ }
+}
+
+void DBusMessageHandler::append(const std::vector<am::am_MainConnectionType_s>& listMainConnections)
+{
+ DBusMessageIter arrayIter;
+ DBusMessageIter structIter;
+ std::vector<am::am_MainConnectionType_s>::const_iterator listIterator=listMainConnections.begin();
+ dbus_bool_t success=true;
+
+ success=success && dbus_message_iter_open_container(&mDBusMessageIter, DBUS_TYPE_ARRAY, "(qqqnn)", &arrayIter);
+ for(;listIterator<listMainConnections.end();++listIterator)
+ {
+ success=success && dbus_message_iter_open_container(&arrayIter, DBUS_TYPE_STRUCT, NULL, &structIter);
+ success=success && dbus_message_iter_append_basic(&structIter, DBUS_TYPE_UINT16, &listIterator->mainConnectionID);
+ success=success && dbus_message_iter_append_basic(&structIter, DBUS_TYPE_UINT16, &listIterator->sourceID);
+ success=success && dbus_message_iter_append_basic(&structIter, DBUS_TYPE_UINT16, &listIterator->sinkID);
+ success=success && dbus_message_iter_append_basic(&structIter, DBUS_TYPE_INT16, &listIterator->delay);
+ success=success && dbus_message_iter_append_basic(&structIter, DBUS_TYPE_INT16, &listIterator->connectionState);
+ success=success && dbus_message_iter_close_container(&arrayIter, &structIter);
+ }
+ success=success && dbus_message_iter_close_container(&mDBusMessageIter, &arrayIter);
+
+ if (!success)
+ {
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::append Cannot allocate DBus message!"));
+ mErrorName=std::string(DBUS_ERROR_NO_MEMORY);
+ mErrorMsg="Cannot create reply!";
+ }
+}
+
+void DBusMessageHandler::append(const std::vector<am::am_SinkType_s> & listMainSinks)
+{
+ DBusMessageIter arrayIter;
+ DBusMessageIter structIter;
+ DBusMessageIter availIter;
+ std::vector<am::am_SinkType_s>::const_iterator listIterator=listMainSinks.begin();
+ dbus_bool_t success=true;
+
+ success=success && dbus_message_iter_open_container(&mDBusMessageIter, DBUS_TYPE_ARRAY, "(qs(nn)nnq)", &arrayIter);
+ for(;listIterator<listMainSinks.end();++listIterator)
+ {
+ success=success && dbus_message_iter_open_container(&arrayIter, DBUS_TYPE_STRUCT, NULL, &structIter);
+ success=success && dbus_message_iter_append_basic(&structIter, DBUS_TYPE_UINT16, &listIterator->sinkID);
+ success=success && dbus_message_iter_append_basic(&structIter, DBUS_TYPE_STRING, &listIterator->name);
+ success=success && dbus_message_iter_open_container(&structIter, DBUS_TYPE_STRUCT, NULL, &availIter);
+ success=success && dbus_message_iter_append_basic(&availIter, DBUS_TYPE_INT16, &listIterator->availability.availability);
+ success=success && dbus_message_iter_append_basic(&availIter, DBUS_TYPE_INT16, &listIterator->availability.availabilityReason);
+ success=success && dbus_message_iter_close_container(&structIter, &availIter);
+ success=success && dbus_message_iter_append_basic(&structIter, DBUS_TYPE_INT16, &listIterator->volume);
+ success=success && dbus_message_iter_append_basic(&structIter, DBUS_TYPE_INT16, &listIterator->muteState);
+ success=success && dbus_message_iter_append_basic(&structIter, DBUS_TYPE_UINT16, &listIterator->sinkClassID);
+ success=success && dbus_message_iter_close_container(&arrayIter, &structIter);
+ }
+ success=success && dbus_message_iter_close_container(&mDBusMessageIter, &arrayIter);
+
+ if (!success)
+ {
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::append Cannot allocate DBus message!"));
+ mErrorName=std::string(DBUS_ERROR_NO_MEMORY);
+ mErrorMsg="Cannot create reply!";
+ }
+}
+
+
+
+void DBusMessageHandler::append(const std::vector<am::am_SourceType_s> & listMainSources)
+{
+ DBusMessageIter arrayIter;
+ DBusMessageIter structIter;
+ DBusMessageIter availIter;
+ std::vector<am::am_SourceType_s>::const_iterator listIterator=listMainSources.begin();
+ dbus_bool_t success=true;
+
+ success=success && dbus_message_iter_open_container(&mDBusMessageIter, DBUS_TYPE_ARRAY, "(qs(nn)q)", &arrayIter);
+ for(;listIterator<listMainSources.end();++listIterator)
+ {
+ success=success && dbus_message_iter_open_container(&arrayIter, DBUS_TYPE_STRUCT, NULL, &structIter);
+ success=success && dbus_message_iter_append_basic(&structIter, DBUS_TYPE_UINT16, &listIterator->sourceID);
+ success=success && dbus_message_iter_append_basic(&structIter, DBUS_TYPE_STRING, &listIterator->name);
+ success=success && dbus_message_iter_open_container(&structIter, DBUS_TYPE_STRUCT, NULL, &availIter);
+ success=success && dbus_message_iter_append_basic(&availIter, DBUS_TYPE_INT16, &listIterator->availability.availability);
+ success=success && dbus_message_iter_append_basic(&availIter, DBUS_TYPE_INT16, &listIterator->availability.availabilityReason);
+ success=success && dbus_message_iter_close_container(&structIter, &availIter);
+ success=success && dbus_message_iter_append_basic(&structIter, DBUS_TYPE_UINT16, &listIterator->sourceClassID);
+ success=success && dbus_message_iter_close_container(&arrayIter, &structIter);
+ }
+ success=success && dbus_message_iter_close_container(&mDBusMessageIter, &arrayIter);
+
+ if (!success)
+ {
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::append Cannot allocate DBus message!"));
+ mErrorName=std::string(DBUS_ERROR_NO_MEMORY);
+ mErrorMsg="Cannot create reply!";
+ }
+}
+
+void DBusMessageHandler::append(const std::vector<am::am_MainSoundProperty_s> & listMainSoundProperties)
+{
+ DBusMessageIter arrayIter;
+ DBusMessageIter structIter;
+ std::vector<am::am_MainSoundProperty_s>::const_iterator listIterator=listMainSoundProperties.begin();
+ dbus_bool_t success=true;
+
+ success=success && dbus_message_iter_open_container(&mDBusMessageIter, DBUS_TYPE_ARRAY, "(nn)", &arrayIter);
+ for(;listIterator<listMainSoundProperties.end();++listIterator)
+ {
+ success=success && dbus_message_iter_open_container(&arrayIter, DBUS_TYPE_STRUCT, NULL, &structIter);
+ success=success && dbus_message_iter_append_basic(&structIter, DBUS_TYPE_INT16, &listIterator->type);
+ success=success && dbus_message_iter_append_basic(&structIter, DBUS_TYPE_INT16, &listIterator->value);
+ success=success && dbus_message_iter_close_container(&arrayIter, &structIter);
+ }
+ success=success && dbus_message_iter_close_container(&mDBusMessageIter, &arrayIter);
+
+ if (!success)
+ {
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::append Cannot allocate DBus message!"));
+ mErrorName=std::string(DBUS_ERROR_NO_MEMORY);
+ mErrorMsg="Cannot create reply!";
+ }
+}
+
+void DBusMessageHandler::append(const std::vector<am::am_SourceClass_s> & listSourceClasses)
+{
+ DBusMessageIter arrayIter;
+ DBusMessageIter structIter;
+ DBusMessageIter propIter;
+ DBusMessageIter innerIter;
+ std::vector<am::am_SourceClass_s>::const_iterator listIterator=listSourceClasses.begin();
+ dbus_bool_t success=true;
+
+ success=success && dbus_message_iter_open_container(&mDBusMessageIter, DBUS_TYPE_ARRAY, "(qsa(nn))", &arrayIter);
+ for(;listIterator<listSourceClasses.end();++listIterator)
+ {
+ success=success && dbus_message_iter_open_container(&arrayIter, DBUS_TYPE_STRUCT, NULL, &structIter);
+ success=success && dbus_message_iter_append_basic(&structIter, DBUS_TYPE_UINT16, &listIterator->sourceClassID);
+ success=success && dbus_message_iter_append_basic(&structIter, DBUS_TYPE_STRING, &listIterator->name);
+ success=success && dbus_message_iter_open_container(&structIter, DBUS_TYPE_ARRAY, "(nn)", &innerIter);
+
+ std::vector<am::am_ClassProperty_s>::const_iterator listInnerIterator=listIterator->listClassProperties.begin();
+ for(;listInnerIterator<listIterator->listClassProperties.end();++listInnerIterator)
+ {
+ success=success && dbus_message_iter_open_container(&innerIter, DBUS_TYPE_STRUCT, NULL, &propIter);
+ success=success && dbus_message_iter_append_basic(&propIter, DBUS_TYPE_INT16, &listInnerIterator->classProperty);
+ success=success && dbus_message_iter_append_basic(&propIter, DBUS_TYPE_INT16, &listInnerIterator->value);
+ success=success && dbus_message_iter_close_container(&innerIter, &propIter);
+ }
+ success=success && dbus_message_iter_close_container(&structIter, &innerIter);
+ success=success && dbus_message_iter_close_container(&arrayIter, &structIter);
+ }
+ success=success && dbus_message_iter_close_container(&mDBusMessageIter, &arrayIter);
+
+ if (!success)
+ {
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::append Cannot allocate DBus message!"));
+ mErrorName=std::string(DBUS_ERROR_NO_MEMORY);
+ mErrorMsg="Cannot create reply!";
+ }
+}
+
+void DBusMessageHandler::append(const std::vector<am::am_SinkClass_s> & listSinkClasses)
+{
+ DBusMessageIter arrayIter;
+ DBusMessageIter structIter;
+ DBusMessageIter propIter;
+ DBusMessageIter innerIter;
+ std::vector<am::am_SinkClass_s>::const_iterator listIterator=listSinkClasses.begin();
+ dbus_bool_t success=true;
+
+ success=success && dbus_message_iter_open_container(&mDBusMessageIter, DBUS_TYPE_ARRAY, "(qsa(nn))", &arrayIter);
+ for(;listIterator<listSinkClasses.end();++listIterator)
+ {
+ success=success && dbus_message_iter_open_container(&arrayIter, DBUS_TYPE_STRUCT, NULL, &structIter);
+ success=success && dbus_message_iter_append_basic(&structIter, DBUS_TYPE_UINT16, &listIterator->sinkClassID);
+ success=success && dbus_message_iter_append_basic(&structIter, DBUS_TYPE_STRING, &listIterator->name);
+ success=success && dbus_message_iter_open_container(&structIter, DBUS_TYPE_ARRAY, "(nn)", &innerIter);
+
+ std::vector<am::am_ClassProperty_s>::const_iterator listInnerIterator=listIterator->listClassProperties.begin();
+ for(;listInnerIterator<listIterator->listClassProperties.end();++listInnerIterator)
+ {
+ success=success && dbus_message_iter_open_container(&innerIter, DBUS_TYPE_STRUCT, NULL, &propIter);
+ success=success && dbus_message_iter_append_basic(&propIter, DBUS_TYPE_INT16, &listInnerIterator->classProperty);
+ success=success && dbus_message_iter_append_basic(&propIter, DBUS_TYPE_INT16, &listInnerIterator->value);
+ success=success && dbus_message_iter_close_container(&innerIter, &propIter);
+ }
+ success=success && dbus_message_iter_close_container(&structIter, &innerIter);
+ success=success && dbus_message_iter_close_container(&arrayIter, &structIter);
+ }
+ success=success && dbus_message_iter_close_container(&mDBusMessageIter, &arrayIter);
+
+ if (!success)
+ {
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::append Cannot allocate DBus message!"));
+ mErrorName=std::string(DBUS_ERROR_NO_MEMORY);
+ mErrorMsg="Cannot create reply!";
+ }
+}
+
+void DBusMessageHandler::append(const std::vector<am::am_SystemProperty_s> & listSystemProperties)
+{
+ DBusMessageIter arrayIter;
+ DBusMessageIter structIter;
+ std::vector<am::am_SystemProperty_s>::const_iterator listIterator=listSystemProperties.begin();
+ dbus_bool_t success=true;
+
+ success=success && dbus_message_iter_open_container(&mDBusMessageIter, DBUS_TYPE_ARRAY, "(nn)", &arrayIter);
+ for(;listIterator<listSystemProperties.end();++listIterator)
+ {
+ success=success && dbus_message_iter_open_container(&arrayIter, DBUS_TYPE_STRUCT, NULL, &structIter);
+ success=success && dbus_message_iter_append_basic(&structIter, DBUS_TYPE_INT16, &listIterator->type);
+ success=success && dbus_message_iter_append_basic(&structIter, DBUS_TYPE_INT16, &listIterator->value);
+ success=success && dbus_message_iter_close_container(&arrayIter, &structIter);
+ }
+ success=success && dbus_message_iter_close_container(&mDBusMessageIter, &arrayIter);
+
+ if (!success)
+ {
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::append Cannot allocate DBus message!"));
+ mErrorName=std::string(DBUS_ERROR_NO_MEMORY);
+ mErrorMsg="Cannot create reply!";
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
cmake_minimum_required(VERSION 2.6)
-PROJECT(PluginHookStandard)
+PROJECT(PluginControlInterface)
+
+set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Xlinker -export-dynamic")
+set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic")
+set(CMAKE_CXX_FLAGS "-g -pipe -g -Wall -W -D_REENTRANT")
set(STD_INCLUDE_DIRS "/usr/include")
set(EXECUTABLE_OUTPUT_PATH ../../bin/)
-set(LIBRARY_OUTPUT_PATH ../plugins/hook)
-set(DOC_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/../doc/PluginHookStandard)
+set(LIBRARY_OUTPUT_PATH ../plugins/control)
+set(DOC_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/../doc/PluginControl)
+set(AUDIO_INCLUDES_FOLDER ${CMAKE_SOURCE_DIR}/../includes)
set(DOCUMENT $ENV{gendoc})
FIND_PACKAGE(PkgConfig)
pkg_check_modules(DLT REQUIRED automotive-dlt)
${CMAKE_SOURCE_DIR}
${STD_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}
- ../AudioManagerDaemon
+ ${AUDIO_INCLUDES_FOLDER}
)
# all source files go here
SET(PLUGIN_STANDARD_HOOKS_SRCS_CXX
- StandardHook.cpp
+ ControlSender.cpp
)
-add_library(PluginHookStandard SHARED ${PLUGIN_STANDARD_HOOKS_SRCS_CXX})
-
-TARGET_LINK_LIBRARIES(PluginHookStandard
- ${DLT_LIBRARIES}
-)
+add_library(PluginControlInterface SHARED ${PLUGIN_STANDARD_HOOKS_SRCS_CXX})
+TARGET_LINK_LIBRARIES(PluginControlInterface ${DLT_LIBRARIES} )
#add a target to generate API documentation with Doxygen
find_package(Doxygen)
--- /dev/null
+/*
+ * ControlSender.cpp
+ *
+ * Created on: Oct 25, 2011
+ * Author: christian
+ */
+
+#include "ControlSender.h"
+
+extern "C" ControlSendInterface* PluginControlInterfaceFactory() {
+ return new ControlSender();
+}
+
+extern "C" void destroyControlPluginInterface(ControlSendInterface* controlSendInterface) {
+ delete controlSendInterface;
+}
+
+ControlSender::ControlSender() {
+ // TODO Auto-generated constructor stub
+
+}
+
+ControlSender::~ControlSender() {
+ // TODO Auto-generated destructor stub
+}
+
+am_Error_e ControlSendInterface::startupController(ControlReceiveInterface* controlreceiveinterface)
+{
+}
+
+
+
+am_Error_e ControlSender::stopController()
+{
+}
+
+
+
+void ControlSender::hookAllPluginsLoaded()
+{
+}
+
+
+
+am_Error_e ControlSender::hookUserConnectionRequest(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t & mainConnectionID)
+{
+}
+
+
+
+am_Error_e ControlSender::hookUserDisconnectionRequest(const am_mainConnectionID_t connectionID)
+{
+}
+
+
+
+am_Error_e ControlSender::hookUserSetMainSinkSoundProperty(const am_sinkID_t sinkID, const am_MainSoundProperty_s & soundProperty)
+{
+}
+
+
+
+am_Error_e ControlSender::hookUserSetMainSourceSoundProperty(const am_sourceID_t sourceID, const am_MainSoundProperty_s & soundProperty)
+{
+}
+
+
+
+am_Error_e ControlSender::hookUserSetSystemProperty(const am_SystemProperty_s & property)
+{
+}
+
+
+
+am_Error_e ControlSender::hookUserVolumeChange(const am_sinkID_t SinkID, const am_mainVolume_t newVolume)
+{
+}
+
+
+
+am_Error_e ControlSender::hookUserVolumeStep(const am_sinkID_t SinkID, const int16_t increment)
+{
+}
+
+
+
+am_Error_e ControlSender::hookUserSetSinkMuteState(const am_sinkID_t sinkID, const am_MuteState_e muteState)
+{
+}
+
+
+
+am_Error_e ControlSender::hookSystemRegisterDomain(const am_Domain_s & domainData, am_domainID_t & domainID)
+{
+}
+
+
+
+am_Error_e ControlSender::hookSystemDeregisterDomain(const am_domainID_t domainID)
+{
+}
+
+
+
+void ControlSender::hookSystemDomainRegistrationComplete(const am_domainID_t domainID)
+{
+}
+
+
+
+am_Error_e ControlSender::hookSystemRegisterSink(const am_Sink_s & sinkData, am_sinkID_t & sinkID)
+{
+}
+
+
+
+am_Error_e ControlSender::hookSystemDeregisterSink(const am_sinkID_t sinkID)
+{
+}
+
+
+
+am_Error_e ControlSender::hookSystemRegisterSource(const am_Source_s & sourceData, am_sourceID_t & sourceID)
+{
+}
+
+
+
+am_Error_e ControlSender::hookSystemDeregisterSource(const am_sourceID_t sourceID)
+{
+}
+
+
+
+am_Error_e ControlSender::hookSystemRegisterGateway(const am_Gateway_s & gatewayData, am_gatewayID_t & gatewayID)
+{
+}
+
+
+
+am_Error_e ControlSender::hookSystemDeregisterGateway(const am_gatewayID_t gatewayID)
+{
+}
+
+
+
+am_Error_e ControlSender::hookSystemRegisterCrossfader(const am_Crossfader_s & crossfaderData, am_crossfaderID_t & crossfaderID)
+{
+}
+
+
+
+am_Error_e ControlSender::hookSystemDeregisterCrossfader(const am_crossfaderID_t crossfaderID)
+{
+}
+
+
+
+void ControlSender::hookSystemSinkVolumeTick(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume)
+{
+}
+
+
+
+void ControlSender::hookSystemSourceVolumeTick(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume)
+{
+}
+
+
+
+void ControlSender::hookSystemInterruptStateChange(const am_sourceID_t sourceID, const am_InterruptState_e interruptState)
+{
+}
+
+
+
+void ControlSender::hookSystemSinkAvailablityStateChange(const am_sinkID_t sinkID, const am_Availability_s & availability)
+{
+}
+
+
+
+void ControlSender::hookSystemSourceAvailablityStateChange(const am_sourceID_t sourceID, const am_Availability_s & availability)
+{
+}
+
+
+
+void ControlSender::hookSystemDomainStateChange(const am_domainID_t domainID, const am_DomainState_e state)
+{
+}
+
+
+
+void ControlSender::hookSystemReceiveEarlyData(const std::vector<am_EarlyData_s> & data)
+{
+}
+
+
+
+void ControlSender::hookSystemSpeedChange(const am_speed_t speed)
+{
+}
+
+
+
+void ControlSender::hookSystemTimingInformationChanged(const am_mainConnectionID_t mainConnectionID, const am_timeSync_t time)
+{
+}
+
+
+
+void ControlSender::cbAckConnect(const am_Handle_s handle, const am_Error_e errorID)
+{
+}
+
+
+
+void ControlSender::cbAckDisconnect(const am_Handle_s handle, const am_Error_e errorID)
+{
+}
+
+
+
+void ControlSender::cbAckCrossFade(const am_Handle_s handle, const am_HotSink_e hostsink, const am_Error_e error)
+{
+}
+
+
+
+void ControlSender::cbAckSetSinkVolumeChange(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error)
+{
+}
+
+
+
+void ControlSender::cbAckSetSourceVolumeChange(const am_Handle_s handle, const am_volume_t voulme, const am_Error_e error)
+{
+}
+
+
+
+void ControlSender::cbAckSetSourceState(const am_Handle_s handle, const am_Error_e error)
+{
+}
+
+
+
+void ControlSender::cbAckSetSourceSoundProperty(const am_Handle_s handle, const am_Error_e error)
+{
+}
+
+
+
+void ControlSender::cbAckSetSinkSoundProperty(const am_Handle_s handle, const am_Error_e error)
+{
+}
+
+
+
--- /dev/null
+/*
+ * ControlSender.h
+ *
+ * Created on: Oct 25, 2011
+ * Author: christian
+ */
+
+#ifndef CONTROLSENDER_H_
+#define CONTROLSENDER_H_
+
+#include <control/ControlSendInterface.h>
+
+using namespace am;
+
+class ControlSender: public ControlSendInterface {
+public:
+ ControlSender();
+ virtual ~ControlSender();
+ am_Error_e startupController(ControlReceiveInterface* controlreceiveinterface) ;
+ am_Error_e stopController() ;
+ void hookAllPluginsLoaded() ;
+ am_Error_e hookUserConnectionRequest(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t& mainConnectionID) ;
+ am_Error_e hookUserDisconnectionRequest(const am_mainConnectionID_t connectionID) ;
+ am_Error_e hookUserSetMainSinkSoundProperty(const am_sinkID_t sinkID, const am_MainSoundProperty_s& soundProperty) ;
+ am_Error_e hookUserSetMainSourceSoundProperty(const am_sourceID_t sourceID, const am_MainSoundProperty_s& soundProperty) ;
+ am_Error_e hookUserSetSystemProperty(const am_SystemProperty_s& property) ;
+ am_Error_e hookUserVolumeChange(const am_sinkID_t SinkID, const am_mainVolume_t newVolume) ;
+ am_Error_e hookUserVolumeStep(const am_sinkID_t SinkID, const int16_t increment) ;
+ am_Error_e hookUserSetSinkMuteState(const am_sinkID_t sinkID, const am_MuteState_e muteState) ;
+ am_Error_e hookSystemRegisterDomain(const am_Domain_s& domainData, am_domainID_t& domainID) ;
+ am_Error_e hookSystemDeregisterDomain(const am_domainID_t domainID) ;
+ void hookSystemDomainRegistrationComplete(const am_domainID_t domainID) ;
+ am_Error_e hookSystemRegisterSink(const am_Sink_s& sinkData, am_sinkID_t& sinkID) ;
+ am_Error_e hookSystemDeregisterSink(const am_sinkID_t sinkID) ;
+ am_Error_e hookSystemRegisterSource(const am_Source_s& sourceData, am_sourceID_t& sourceID) ;
+ am_Error_e hookSystemDeregisterSource(const am_sourceID_t sourceID) ;
+ am_Error_e hookSystemRegisterGateway(const am_Gateway_s& gatewayData, am_gatewayID_t& gatewayID) ;
+ am_Error_e hookSystemDeregisterGateway(const am_gatewayID_t gatewayID) ;
+ am_Error_e hookSystemRegisterCrossfader(const am_Crossfader_s& crossfaderData, am_crossfaderID_t& crossfaderID) ;
+ am_Error_e hookSystemDeregisterCrossfader(const am_crossfaderID_t crossfaderID) ;
+ void hookSystemSinkVolumeTick(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume) ;
+ void hookSystemSourceVolumeTick(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume) ;
+ void hookSystemInterruptStateChange(const am_sourceID_t sourceID, const am_InterruptState_e interruptState) ;
+ void hookSystemSinkAvailablityStateChange(const am_sinkID_t sinkID, const am_Availability_s& availability) ;
+ void hookSystemSourceAvailablityStateChange(const am_sourceID_t sourceID, const am_Availability_s& availability) ;
+ void hookSystemDomainStateChange(const am_domainID_t domainID, const am_DomainState_e state) ;
+ void hookSystemReceiveEarlyData(const std::vector<am_EarlyData_s>& data) ;
+ void hookSystemSpeedChange(const am_speed_t speed) ;
+ void hookSystemTimingInformationChanged(const am_mainConnectionID_t mainConnectionID, const am_timeSync_t time) ;
+ void cbAckConnect(const am_Handle_s handle, const am_Error_e errorID) ;
+ void cbAckDisconnect(const am_Handle_s handle, const am_Error_e errorID) ;
+ void cbAckCrossFade(const am_Handle_s handle, const am_HotSink_e hostsink, const am_Error_e error) ;
+ void cbAckSetSinkVolumeChange(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error) ;
+ void cbAckSetSourceVolumeChange(const am_Handle_s handle, const am_volume_t voulme, const am_Error_e error) ;
+ void cbAckSetSourceState(const am_Handle_s handle, const am_Error_e error) ;
+ void cbAckSetSourceSoundProperty(const am_Handle_s handle, const am_Error_e error) ;
+ void cbAckSetSinkSoundProperty(const am_Handle_s handle, const am_Error_e error) ;
+};
+
+#endif /* CONTROLSENDER_H_ */
+++ /dev/null
-# Doxyfile 1.7.1
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
-#
-# All text after a hash (#) is considered a comment and will be ignored
-# The format is:
-# TAG = value [value, ...]
-# For lists items can also be appended using:
-# TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all
-# text before the first occurrence of this tag. Doxygen uses libiconv (or the
-# iconv built into libc) for the transcoding. See
-# http://www.gnu.org/software/libiconv for the list of possible encodings.
-
-DOXYFILE_ENCODING = UTF-8
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
-# by quotes) that should identify the project.
-
-PROJECT_NAME = TestPlugin
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number.
-# This could be handy for archiving the generated documentation or
-# if some version control system is used.
-
-PROJECT_NUMBER = 0.1
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
-# base path where the generated documentation will be put.
-# If a relative path is entered, it will be relative to the location
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY =
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
-# 4096 sub-directories (in 2 levels) under the output directory of each output
-# format and will distribute the generated files over these directories.
-# Enabling this option can be useful when feeding doxygen a huge amount of
-# source files, where putting all generated files in the same directory would
-# otherwise cause performance problems for the file system.
-
-CREATE_SUBDIRS = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# The default language is English, other supported languages are:
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
-# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
-# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
-# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
-# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
-# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
-
-OUTPUT_LANGUAGE = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
-# include brief member descriptions after the members that are listed in
-# the file and class documentation (similar to JavaDoc).
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
-# the brief description of a member or function before the detailed description.
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator
-# that is used to form the text in various listings. Each string
-# in this list, if found as the leading text of the brief description, will be
-# stripped from the text and the result after processing the whole list, is
-# used as the annotated text. Otherwise, the brief description is used as-is.
-# If left blank, the following values are used ("$name" is automatically
-# replaced with the name of the entity): "The $name class" "The $name widget"
-# "The $name file" "is" "provides" "specifies" "contains"
-# "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF = "The $name class" \
- "The $name widget" \
- "The $name file" \
- is \
- provides \
- specifies \
- contains \
- represents \
- a \
- an \
- the
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# Doxygen will generate a detailed section even if there is only a brief
-# description.
-
-ALWAYS_DETAILED_SEC = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
-# operators of the base classes will not be shown.
-
-INLINE_INHERITED_MEMB = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
-# path before files name in the file list and in the header files. If set
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES = YES
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
-# can be used to strip a user-defined part of the path. Stripping is
-# only done if one of the specified strings matches the left-hand part of
-# the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the
-# path to strip.
-
-STRIP_FROM_PATH =
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
-# the path mentioned in the documentation of a class, which tells
-# the reader which header file to include in order to use a class.
-# If left blank only the name of the header file containing the class
-# definition is used. Otherwise one should specify the include paths that
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH =
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-# (but less readable) file names. This can be useful is your file systems
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
-# will interpret the first line (until the first dot) of a JavaDoc-style
-# comment as the brief description. If set to NO, the JavaDoc
-# comments will behave just like regular Qt-style comments
-# (thus requiring an explicit @brief command for a brief description.)
-
-JAVADOC_AUTOBRIEF = YES
-
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
-# interpret the first line (until the first dot) of a Qt-style
-# comment as the brief description. If set to NO, the comments
-# will behave just like regular Qt-style comments (thus requiring
-# an explicit \brief command for a brief description.)
-
-QT_AUTOBRIEF = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
-# treat a multi-line C++ special comment block (i.e. a block of //! or ///
-# comments) as a brief description. This used to be the default behaviour.
-# The new default is to treat a multi-line C++ comment block as a detailed
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it
-# re-implements.
-
-INHERIT_DOCS = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
-# a new page for each member. If set to NO, the documentation of a member will
-# be part of the file/class/namespace that contains it.
-
-SEPARATE_MEMBER_PAGES = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab.
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE = 8
-
-# This tag can be used to specify a number of aliases that acts
-# as commands in the documentation. An alias has the form "name=value".
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to
-# put the command \sideeffect (or @sideeffect) in the documentation, which
-# will result in a user-defined paragraph with heading "Side Effects:".
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
-# sources only. Doxygen will then generate output that is more tailored for C.
-# For instance, some of the names that are used will be different. The list
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C = NO
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
-# sources only. Doxygen will then generate output that is more tailored for
-# Java. For instance, namespaces will be presented as packages, qualified
-# scopes will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA = NO
-
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-# sources only. Doxygen will then generate output that is more tailored for
-# Fortran.
-
-OPTIMIZE_FOR_FORTRAN = NO
-
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-# sources. Doxygen will then generate output that is tailored for
-# VHDL.
-
-OPTIMIZE_OUTPUT_VHDL = NO
-
-# Doxygen selects the parser to use depending on the extension of the files it
-# parses. With this tag you can assign which parser to use for a given extension.
-# Doxygen has a built-in mapping, but you can override or extend it using this
-# tag. The format is ext=language, where ext is a file extension, and language
-# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
-# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
-# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
-# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
-# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
-
-EXTENSION_MAPPING =
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
-# to include (a tag file for) the STL sources as input, then you should
-# set this tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
-# func(std::string) {}). This also make the inheritance and collaboration
-# diagrams that involve STL classes more complete and accurate.
-
-BUILTIN_STL_SUPPORT = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-
-CPP_CLI_SUPPORT = NO
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
-# Doxygen will parse them like normal C++ but will assume all classes use public
-# instead of private inheritance when no explicit protection keyword is present.
-
-SIP_SUPPORT = NO
-
-# For Microsoft's IDL there are propget and propput attributes to indicate getter
-# and setter methods for a property. Setting this option to YES (the default)
-# will make doxygen to replace the get and set methods by a property in the
-# documentation. This will only work if the methods are indeed getting or
-# setting a simple type. If this is not the case, or you want to show the
-# methods anyway, you should set this option to NO.
-
-IDL_PROPERTY_SUPPORT = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
-# the same type (for instance a group of public functions) to be put as a
-# subgroup of that type (e.g. under the Public Functions section). Set it to
-# NO to prevent subgrouping. Alternatively, this can be done per class using
-# the \nosubgrouping command.
-
-SUBGROUPING = YES
-
-# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
-# is documented as struct, union, or enum with the name of the typedef. So
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
-# with name TypeT. When disabled the typedef will appear as a member of a file,
-# namespace, or class. And the struct will be named TypeS. This can typically
-# be useful for C code in case the coding convention dictates that all compound
-# types are typedef'ed and only the typedef is referenced, never the tag name.
-
-TYPEDEF_HIDES_STRUCT = YES
-
-# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
-# determine which symbols to keep in memory and which to flush to disk.
-# When the cache is full, less often used symbols will be written to disk.
-# For small to medium size projects (<1000 input files) the default value is
-# probably good enough. For larger projects a too small cache size can cause
-# doxygen to be busy swapping symbols to and from disk most of the time
-# causing a significant performance penality.
-# If the system has enough physical memory increasing the cache will improve the
-# performance by keeping more symbols in memory. Note that the value works on
-# a logarithmic scale so increasing the size by one will rougly double the
-# memory usage. The cache size is given by this formula:
-# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols
-
-SYMBOL_CACHE_SIZE = 0
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available.
-# Private class members and static file members will be hidden unless
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL = YES
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
-# will be included in the documentation.
-
-EXTRACT_PRIVATE = YES
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file
-# will be included in the documentation.
-
-EXTRACT_STATIC = YES
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
-# defined locally in source files will be included in the documentation.
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES = YES
-
-# This flag is only useful for Objective-C code. When set to YES local
-# methods, which are defined in the implementation section but not in
-# the interface are included in the documentation.
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS = YES
-
-# If this flag is set to YES, the members of anonymous namespaces will be
-# extracted and appear in the documentation as a namespace called
-# 'anonymous_namespace{file}', where file will be replaced with the base
-# name of the file that contains the anonymous namespace. By default
-# anonymous namespace are hidden.
-
-EXTRACT_ANON_NSPACES = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
-# undocumented members of documented classes, files or namespaces.
-# If set to NO (the default) these members will be included in the
-# various overviews, but no documentation section is generated.
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS = NO
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy.
-# If set to NO (the default) these classes will be included in the various
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES = NO
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
-# friend (class|struct|union) declarations.
-# If set to NO (the default) these declarations will be included in the
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
-# documentation blocks found inside the body of a function.
-# If set to NO (the default) these blocks will be appended to the
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS = NO
-
-# The INTERNAL_DOCS tag determines if documentation
-# that is typed after a \internal command is included. If the tag is set
-# to NO (the default) then the documentation will be excluded.
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
-# file names in lower-case letters. If set to YES upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES = NO
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
-# will show members with their full class and namespace scopes in the
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
-# will put a list of the files that are included by a file in the documentation
-# of that file.
-
-SHOW_INCLUDE_FILES = YES
-
-# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
-# will list include files with double quotes in the documentation
-# rather than with sharp brackets.
-
-FORCE_LOCAL_INCLUDES = NO
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
-# is inserted in the documentation for inline members.
-
-INLINE_INFO = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
-# will sort the (detailed) documentation of file and class members
-# alphabetically by member name. If set to NO the members will appear in
-# declaration order.
-
-SORT_MEMBER_DOCS = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
-# brief documentation of file, namespace and class members alphabetically
-# by member name. If set to NO (the default) the members will appear in
-# declaration order.
-
-SORT_BRIEF_DOCS = YES
-
-# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
-# will sort the (brief and detailed) documentation of class members so that
-# constructors and destructors are listed first. If set to NO (the default)
-# the constructors will appear in the respective orders defined by
-# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
-# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
-# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
-
-SORT_MEMBERS_CTORS_1ST = NO
-
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
-# hierarchy of group names into alphabetical order. If set to NO (the default)
-# the group names will appear in their defined order.
-
-SORT_GROUP_NAMES = YES
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
-# sorted by fully-qualified names, including namespaces. If set to
-# NO (the default), the class list will be sorted only by class name,
-# not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or
-# disable (NO) the todo list. This list is created by putting \todo
-# commands in the documentation.
-
-GENERATE_TODOLIST = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or
-# disable (NO) the test list. This list is created by putting \test
-# commands in the documentation.
-
-GENERATE_TESTLIST = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or
-# disable (NO) the bug list. This list is created by putting \bug
-# commands in the documentation.
-
-GENERATE_BUGLIST = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
-# disable (NO) the deprecated list. This list is created by putting
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS =
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-# the initial value of a variable or define consists of for it to appear in
-# the documentation. If the initializer consists of more lines than specified
-# here it will be hidden. Use a value of 0 to hide initializers completely.
-# The appearance of the initializer of individual variables and defines in the
-# documentation can be controlled using \showinitializer or \hideinitializer
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
-# at the bottom of the documentation of classes and structs. If set to YES the
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES = YES
-
-# If the sources in your project are distributed over multiple directories
-# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
-# in the documentation. The default is NO.
-
-SHOW_DIRECTORIES = NO
-
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
-# This will remove the Files entry from the Quick Index and from the
-# Folder Tree View (if specified). The default is YES.
-
-SHOW_FILES = YES
-
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
-# Namespaces page. This will remove the Namespaces entry from the Quick Index
-# and from the Folder Tree View (if specified). The default is YES.
-
-SHOW_NAMESPACES = YES
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from
-# the version control system). Doxygen will invoke the program by executing (via
-# popen()) the command <command> <input-file>, where <command> is the value of
-# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
-# provided by doxygen. Whatever the program writes to standard output
-# is used as the file version. See the manual for examples.
-
-FILE_VERSION_FILTER =
-
-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
-# by doxygen. The layout file controls the global structure of the generated
-# output files in an output format independent way. The create the layout file
-# that represents doxygen's defaults, run doxygen with the -l option.
-# You can optionally specify a file name after the option, if omitted
-# DoxygenLayout.xml will be used as the name of the layout file.
-
-LAYOUT_FILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated by doxygen. Possible values are YES and NO. If left blank
-# NO is used.
-
-WARNINGS = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED = YES
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some
-# parameters in a documented function, or documenting parameters that
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR = YES
-
-# This WARN_NO_PARAMDOC option can be abled to get warnings for
-# functions that are documented, but have no documentation for their parameters
-# or return value. If set to NO (the default) doxygen will only warn about
-# wrong or incomplete parameter documentation, but not about the absence of
-# documentation.
-
-WARN_NO_PARAMDOC = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that
-# doxygen can produce. The string should contain the $file, $line, and $text
-# tags, which will be replaced by the file and line number from which the
-# warning originated and the warning text. Optionally the format may contain
-# $version, which will be replaced by the version of the file (if it could
-# be obtained via FILE_VERSION_FILTER)
-
-WARN_FORMAT = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning
-# and error messages should be written. If left blank the output is written
-# to stderr.
-
-WARN_LOGFILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain
-# documented source files. You may enter file names like "myfile.cpp" or
-# directories like "/usr/src/myproject". Separate the files or directories
-# with spaces.
-
-INPUT = @CMAKE_CURRENT_SOURCE_DIR@
-
-# This tag can be used to specify the character encoding of the source files
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
-# also the default input encoding. Doxygen uses libiconv (or the iconv built
-# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
-# the list of possible encodings.
-
-INPUT_ENCODING = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank the following patterns are tested:
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
-# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
-
-FILE_PATTERNS = *.c \
- *.cc \
- *.cxx \
- *.cpp \
- *.c++ \
- *.d \
- *.java \
- *.ii \
- *.ixx \
- *.ipp \
- *.i++ \
- *.inl \
- *.h \
- *.hh \
- *.hxx \
- *.hpp \
- *.h++ \
- *.idl \
- *.odl \
- *.cs \
- *.php \
- *.php3 \
- *.inc \
- *.m \
- *.mm \
- *.dox \
- *.py \
- *.f90 \
- *.f \
- *.vhd \
- *.vhdl
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories
-# should be searched for input files as well. Possible values are YES and NO.
-# If left blank NO is used.
-
-RECURSIVE = YES
-
-# The EXCLUDE tag can be used to specify files and/or directories that should
-# excluded from the INPUT source files. This way you can easily exclude a
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-
-EXCLUDE =
-
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
-# directories that are symbolic links (a Unix filesystem feature) are excluded
-# from the input.
-
-EXCLUDE_SYMLINKS = NO
-
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories. Note that the wildcards are matched
-# against the file with absolute path, so to exclude all test directories
-# for example use the pattern */test/*
-
-EXCLUDE_PATTERNS =
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-# (namespaces, classes, functions, etc.) that should be excluded from the
-# output. The symbol name can be a fully qualified name, a word, or if the
-# wildcard * is used, a substring. Examples: ANamespace, AClass,
-# AClass::ANamespace, ANamespace::*Test
-
-EXCLUDE_SYMBOLS =
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or
-# directories that contain example code fragments that are included (see
-# the \include command).
-
-EXAMPLE_PATH =
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank all files are included.
-
-EXAMPLE_PATTERNS = *
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude
-# commands irrespective of the value of the RECURSIVE tag.
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or
-# directories that contain image that are included in the documentation (see
-# the \image command).
-
-IMAGE_PATH = ../../AudioManGUI
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command <filter> <input-file>, where <filter>
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
-# input file. Doxygen will then use the output that the filter program writes
-# to standard output. If FILTER_PATTERNS is specified, this tag will be
-# ignored.
-
-INPUT_FILTER =
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis. Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match. The filters are a list of the form:
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
-# is applied to all files.
-
-FILTER_PATTERNS =
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will be used to filter the input files when producing source
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will
-# be generated. Documented entities will be cross-referenced with these sources.
-# Note: To get rid of all source code in the generated output, make sure also
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER = YES
-
-# Setting the INLINE_SOURCES tag to YES will include the body
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
-# doxygen to hide any special comment blocks from generated source code
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES
-# then for each documented function all documented
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = NO
-
-# If the REFERENCES_RELATION tag is set to YES
-# then for each documented function all documented entities
-# called/used by that function will be listed.
-
-REFERENCES_RELATION = NO
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code. Otherwise they will link to the documentation.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code
-# will point to the HTML generated by the htags(1) tool instead of doxygen
-# built-in source browser. The htags tool is part of GNU's global source
-# tagging system (see http://www.gnu.org/software/global/global.html). You
-# will need version 4.8.6 or higher.
-
-USE_HTAGS = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
-# will generate a verbatim copy of the header file for each class for
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
-# of all compounds will be generated. Enable this if the project
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX = YES
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX = 5
-
-# In case all classes in a project start with a common prefix, all
-# classes will be put under the same header in the alphabetical index.
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX =
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
-# generate HTML output.
-
-GENERATE_HTML = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT = html
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard header.
-
-HTML_HEADER =
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard footer.
-
-HTML_FOOTER =
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
-# style sheet that is used by each HTML page. It can be used to
-# fine-tune the look of the HTML output. If the tag is left blank doxygen
-# will generate a default style sheet. Note that doxygen will try to copy
-# the style sheet file to the HTML output directory, so don't put your own
-# stylesheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET =
-
-# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
-# Doxygen will adjust the colors in the stylesheet and background images
-# according to this color. Hue is specified as an angle on a colorwheel,
-# see http://en.wikipedia.org/wiki/Hue for more information.
-# For instance the value 0 represents red, 60 is yellow, 120 is green,
-# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
-# The allowed range is 0 to 359.
-
-HTML_COLORSTYLE_HUE = 220
-
-# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
-# the colors in the HTML output. For a value of 0 the output will use
-# grayscales only. A value of 255 will produce the most vivid colors.
-
-HTML_COLORSTYLE_SAT = 100
-
-# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
-# the luminance component of the colors in the HTML output. Values below
-# 100 gradually make the output lighter, whereas values above 100 make
-# the output darker. The value divided by 100 is the actual gamma applied,
-# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
-# and 100 does not change the gamma.
-
-HTML_COLORSTYLE_GAMMA = 80
-
-# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
-# page will contain the date and time when the page was generated. Setting
-# this to NO can help when comparing the output of multiple runs.
-
-HTML_TIMESTAMP = YES
-
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
-# files or namespaces will be aligned in HTML using tables. If set to
-# NO a bullet list will be used.
-
-HTML_ALIGN_MEMBERS = YES
-
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
-# documentation will contain sections that can be hidden and shown after the
-# page has loaded. For this to work a browser that supports
-# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
-# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
-
-HTML_DYNAMIC_SECTIONS = YES
-
-# If the GENERATE_DOCSET tag is set to YES, additional index files
-# will be generated that can be used as input for Apple's Xcode 3
-# integrated development environment, introduced with OSX 10.5 (Leopard).
-# To create a documentation set, doxygen will generate a Makefile in the
-# HTML output directory. Running make will produce the docset in that
-# directory and running "make install" will install the docset in
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
-# it at startup.
-# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
-# for more information.
-
-GENERATE_DOCSET = NO
-
-# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
-# feed. A documentation feed provides an umbrella under which multiple
-# documentation sets from a single provider (such as a company or product suite)
-# can be grouped.
-
-DOCSET_FEEDNAME = "Doxygen generated docs"
-
-# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
-# should uniquely identify the documentation set bundle. This should be a
-# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
-# will append .docset to the name.
-
-DOCSET_BUNDLE_ID = org.doxygen.Project
-
-# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
-# the documentation publisher. This should be a reverse domain-name style
-# string, e.g. com.mycompany.MyDocSet.documentation.
-
-DOCSET_PUBLISHER_ID = org.doxygen.Publisher
-
-# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
-
-DOCSET_PUBLISHER_NAME = Publisher
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-# will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
-# be used to specify the file name of the resulting .chm file. You
-# can add a path in front of the file if the result should not be
-# written to the html output directory.
-
-CHM_FILE =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
-# be used to specify the location (absolute path including file name) of
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
-# controls if a separate .chi index file is generated (YES) or that
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
-# is used to encode HtmlHelp index (hhk), content (hhc) and project file
-# content.
-
-CHM_INDEX_ENCODING =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
-# controls whether a binary table of contents is generated (YES) or a
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND = NO
-
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
-# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
-# that can be used as input for Qt's qhelpgenerator to generate a
-# Qt Compressed Help (.qch) of the generated HTML documentation.
-
-GENERATE_QHP = NO
-
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
-# be used to specify the file name of the resulting .qch file.
-# The path specified is relative to the HTML output folder.
-
-QCH_FILE =
-
-# The QHP_NAMESPACE tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#namespace
-
-QHP_NAMESPACE = org.doxygen.Project
-
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#virtual-folders
-
-QHP_VIRTUAL_FOLDER = doc
-
-# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
-# add. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#custom-filters
-
-QHP_CUST_FILTER_NAME =
-
-# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
-# custom filter to add. For more information please see
-# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
-# Qt Help Project / Custom Filters</a>.
-
-QHP_CUST_FILTER_ATTRS =
-
-# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
-# project's
-# filter section matches.
-# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
-# Qt Help Project / Filter Attributes</a>.
-
-QHP_SECT_FILTER_ATTRS =
-
-# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
-# be used to specify the location of Qt's qhelpgenerator.
-# If non-empty doxygen will try to run qhelpgenerator on the generated
-# .qhp file.
-
-QHG_LOCATION =
-
-# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
-# will be generated, which together with the HTML files, form an Eclipse help
-# plugin. To install this plugin and make it available under the help contents
-# menu in Eclipse, the contents of the directory containing the HTML and XML
-# files needs to be copied into the plugins directory of eclipse. The name of
-# the directory within the plugins directory should be the same as
-# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
-# the help appears.
-
-GENERATE_ECLIPSEHELP = YES
-
-# A unique identifier for the eclipse help plugin. When installing the plugin
-# the directory name containing the HTML and XML files should also have
-# this name.
-
-ECLIPSE_DOC_ID = org.doxygen.Project
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
-# top of each HTML page. The value NO (the default) enables the index and
-# the value YES disables it.
-
-DISABLE_INDEX = NO
-
-# This tag can be used to set the number of enum values (range [1..20])
-# that doxygen will group on one line in the generated HTML documentation.
-
-ENUM_VALUES_PER_LINE = 4
-
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information.
-# If the tag value is set to YES, a side panel will be generated
-# containing a tree-like index structure (just like the one that
-# is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
-# Windows users are probably better off using the HTML help feature.
-
-GENERATE_TREEVIEW = YES
-
-# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
-# and Class Hierarchy pages using a tree view instead of an ordered list.
-
-USE_INLINE_TREES = YES
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
-# used to set the initial width (in pixels) of the frame in which the tree
-# is shown.
-
-TREEVIEW_WIDTH = 250
-
-# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
-# links to external symbols imported via tag files in a separate window.
-
-EXT_LINKS_IN_WINDOW = NO
-
-# Use this tag to change the font size of Latex formulas included
-# as images in the HTML documentation. The default is 10. Note that
-# when you change the font size after a successful doxygen run you need
-# to manually remove any form_*.png images from the HTML output directory
-# to force them to be regenerated.
-
-FORMULA_FONTSIZE = 10
-
-# Use the FORMULA_TRANPARENT tag to determine whether or not the images
-# generated for formulas are transparent PNGs. Transparent PNGs are
-# not supported properly for IE 6.0, but are supported on all modern browsers.
-# Note that when changing this option you need to delete any form_*.png files
-# in the HTML output before the changes have effect.
-
-FORMULA_TRANSPARENT = YES
-
-# When the SEARCHENGINE tag is enabled doxygen will generate a search box
-# for the HTML output. The underlying search engine uses javascript
-# and DHTML and should work on any modern browser. Note that when using
-# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
-# (GENERATE_DOCSET) there is already a search function so this one should
-# typically be disabled. For large projects the javascript based search engine
-# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
-
-SEARCHENGINE = YES
-
-# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
-# implemented using a PHP enabled web server instead of at the web client
-# using Javascript. Doxygen will generate the search PHP script and index
-# file to put on the web server. The advantage of the server
-# based approach is that it scales better to large projects and allows
-# full text search. The disadvances is that it is more difficult to setup
-# and does not have live searching capabilities.
-
-SERVER_BASED_SEARCH = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
-# generate Latex output.
-
-GENERATE_LATEX = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked. If left blank `latex' will be used as the default command name.
-# Note that when enabling USE_PDFLATEX this option is only used for
-# generating bitmaps for formulas in the HTML output, but not in the
-# Makefile that is written to the output directory.
-
-LATEX_CMD_NAME = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
-# generate index for LaTeX. If left blank `makeindex' will be used as the
-# default command name.
-
-MAKEINDEX_CMD_NAME = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
-# LaTeX documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_LATEX = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used
-# by the printer. Possible values are: a4, a4wide, letter, legal and
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE = a4wide
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES =
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
-# the generated latex document. The header should contain everything until
-# the first chapter. If it is left blank doxygen will generate a
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER =
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will
-# contain links (just like the HTML output) instead of page references
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS = YES
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
-# plain latex in the generated Makefile. Set this option to YES to get a
-# higher quality PDF documentation.
-
-USE_PDFLATEX = YES
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
-# command to the generated LaTeX files. This will instruct LaTeX to keep
-# running if errors occur, instead of asking the user for help.
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not
-# include the index chapters (such as File Index, Compound Index, etc.)
-# in the output.
-
-LATEX_HIDE_INDICES = NO
-
-# If LATEX_SOURCE_CODE is set to YES then doxygen will include
-# source code with syntax highlighting in the LaTeX output.
-# Note that which sources are shown also depends on other settings
-# such as SOURCE_BROWSER.
-
-LATEX_SOURCE_CODE = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
-# The RTF output is optimized for Word 97 and may not look very pretty with
-# other RTF readers or editors.
-
-GENERATE_RTF = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
-# RTF documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_RTF = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
-# will contain hyperlink fields. The RTF file will
-# contain links (just like the HTML output) instead of page references.
-# This makes the output suitable for online browsing using WORD or other
-# programs which support those fields.
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's
-# config file, i.e. a series of assignments. You only have to provide
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE =
-
-# Set optional variables used in the generation of an rtf document.
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
-# generate man pages
-
-GENERATE_MAN = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT = man
-
-# The MAN_EXTENSION tag determines the extension that is added to
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
-# then it will generate one additional man file for each entity
-# documented in the real man page(s). These additional files
-# only source the real man page, but without them the man command
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will
-# generate an XML file that captures the structure of
-# the code including all documentation.
-
-GENERATE_XML = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_SCHEMA =
-
-# The XML_DTD tag can be used to specify an XML DTD,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_DTD =
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
-# dump the program listings (including syntax highlighting
-# and cross-referencing information) to the XML output. Note that
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
-# generate an AutoGen Definitions (see autogen.sf.net) file
-# that captures the structure of the code including all
-# documentation. Note that this feature is still experimental
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will
-# generate a Perl module file that captures the structure of
-# the code including all documentation. Note that this
-# feature is still experimental and incomplete at the
-# moment.
-
-GENERATE_PERLMOD = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
-# nicely formatted so it can be parsed by a human reader. This is useful
-# if you want to understand what is going on. On the other hand, if this
-# tag is set to NO the size of the Perl module output will be much smaller
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY = YES
-
-# The names of the make variables in the generated doxyrules.make file
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
-# This is useful so different doxyrules.make files included by the same
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
-# evaluate all C-preprocessor directives found in the sources and include
-# files.
-
-ENABLE_PREPROCESSING = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
-# names in the source code. If set to NO (the default) only conditional
-# compilation will be performed. Macro expansion can be done in a controlled
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
-# then the macro expansion is limited to the macros specified with the
-# PREDEFINED and EXPAND_AS_DEFINED tags.
-
-EXPAND_ONLY_PREDEF = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
-# in the INCLUDE_PATH (see below) will be search if a #include is found.
-
-SEARCH_INCLUDES = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by
-# the preprocessor.
-
-INCLUDE_PATH =
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will
-# be used.
-
-INCLUDE_FILE_PATTERNS =
-
-# The PREDEFINED tag can be used to specify one or more macro names that
-# are defined before the preprocessor is started (similar to the -D option of
-# gcc). The argument of the tag is a list of macros of the form: name
-# or name=definition (no spaces). If the definition and the = are
-# omitted =1 is assumed. To prevent a macro definition from being
-# undefined via #undef or recursively expanded use the := operator
-# instead of the = operator.
-
-PREDEFINED =
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
-# this tag can be used to specify a list of macro names that should be expanded.
-# The macro definition that is found in the sources will be used.
-# Use the PREDEFINED tag if you want to use a different macro definition.
-
-EXPAND_AS_DEFINED =
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-# doxygen's preprocessor will remove all function-like macros that are alone
-# on a line, have an all uppercase name, and do not end with a semicolon. Such
-# function macros are typically used for boiler-plate code, and will confuse
-# the parser if not removed.
-
-SKIP_FUNCTION_MACROS = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles.
-# Optionally an initial location of the external documentation
-# can be added for each tagfile. The format of a tag file without
-# this location is as follows:
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where "loc1" and "loc2" can be relative or absolute paths or
-# URLs. If a location is present for each tag, the installdox tool
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen
-# is run, you must also specify the path to the tagfile here.
-
-TAGFILES =
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE =
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed
-# in the class index. If set to NO only the inherited external classes
-# will be listed.
-
-ALLEXTERNALS = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will
-# be listed.
-
-EXTERNAL_GROUPS = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
-# or super classes. Setting the tag to NO turns the diagrams off. Note that
-# this option is superseded by the HAVE_DOT option below. This is only a
-# fallback. It is recommended to install and use dot, since it yields more
-# powerful graphs.
-
-CLASS_DIAGRAMS = NO
-
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see
-# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-MSCGEN_PATH =
-
-# If set to YES, the inheritance and collaboration graphs will hide
-# inheritance and usage relations if the target is undocumented
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz, a graph visualization
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT = YES
-
-# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
-# allowed to run in parallel. When set to 0 (the default) doxygen will
-# base this on the number of processors available in the system. You can set it
-# explicitly to a value larger than 0 to get control over the balance
-# between CPU load and processing speed.
-
-DOT_NUM_THREADS = 0
-
-# By default doxygen will write a font called FreeSans.ttf to the output
-# directory and reference it in all dot files that doxygen generates. This
-# font does not include all possible unicode characters however, so when you need
-# these (or just want a differently looking font) you can specify the font name
-# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
-# which can be done by putting it in a standard location or by setting the
-# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
-# containing the font.
-
-DOT_FONTNAME = FreeSans.ttf
-
-# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
-# The default size is 10pt.
-
-DOT_FONTSIZE = 10
-
-# By default doxygen will tell dot to use the output directory to look for the
-# FreeSans.ttf font (which doxygen will put there itself). If you specify a
-# different font using DOT_FONTNAME you can set the path where dot
-# can find it using this tag.
-
-DOT_FONTPATH =
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect inheritance relations. Setting this tag to YES will force the
-# the CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect implementation dependencies (inheritance, containment, and
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH = YES
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for groups, showing the direct groups dependencies
-
-GROUP_GRAPHS = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
-# Language.
-
-UML_LOOK = NO
-
-# If set to YES, the inheritance and collaboration graphs will show the
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS = NO
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
-# tags are set to YES then doxygen will generate a graph for each documented
-# file showing the direct and indirect include dependencies of the file with
-# other documented files.
-
-INCLUDE_GRAPH = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
-# documented header file showing the documented files that directly or
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH = YES
-
-# If the CALL_GRAPH and HAVE_DOT options are set to YES then
-# doxygen will generate a call dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable call graphs
-# for selected functions only using the \callgraph command.
-
-CALL_GRAPH = YES
-
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
-# doxygen will generate a caller dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable caller
-# graphs for selected functions only using the \callergraph command.
-
-CALLER_GRAPH = YES
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
-# will graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY = YES
-
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
-# then doxygen will show the dependencies a directory has on other directories
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
-
-DIRECTORY_GRAPH = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot. Possible values are png, jpg, or gif
-# If left blank png will be used.
-
-DOT_IMAGE_FORMAT = png
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be
-# found. If left blank, it is assumed the dot tool can be found in the path.
-
-DOT_PATH =
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the
-# \dotfile command).
-
-DOTFILE_DIRS =
-
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
-# nodes that will be shown in the graph. If the number of nodes in a graph
-# becomes larger than this value, doxygen will truncate the graph, which is
-# visualized by representing a node as a red box. Note that doxygen if the
-# number of direct children of the root node in a graph is already larger than
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
-# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-
-DOT_GRAPH_MAX_NODES = 50
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
-# graphs generated by dot. A depth value of 3 means that only nodes reachable
-# from the root by following a path via at most 3 edges will be shown. Nodes
-# that lay further from the root node will be omitted. Note that setting this
-# option to 1 or 2 may greatly reduce the computation time needed for large
-# code bases. Also note that the size of a graph can be further restricted by
-# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
-
-MAX_DOT_GRAPH_DEPTH = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, because dot on Windows does not
-# seem to support this out of the box. Warning: Depending on the platform used,
-# enabling this option may lead to badly anti-aliased labels on the edges of
-# a graph (i.e. they become hard to read).
-
-DOT_TRANSPARENT = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10)
-# support this, this feature is disabled by default.
-
-DOT_MULTI_TARGETS = NO
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
-# generate a legend page explaining the meaning of the various boxes and
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
-# remove the intermediate dot files that are used to generate
-# the various graphs.
-
-DOT_CLEANUP = YES
+++ /dev/null
-/**
- *
- * Copyright (C) 2011, BMW AG
- *
- * PluginHookStandard
- *
- * \file StandardHook.cpp
- *
- * \date 20.05.2011
- * \author Christian Müller (christian.ei.mueller@bmw.de)
- *
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
- */
-
-#include "StandardHook.h"
-#include <list>
-#include <stdio.h>
-#include <string.h>
-
-StandardHookPlugin::StandardHookPlugin() {}
-
-StandardHookPlugin::~StandardHookPlugin() {}
-
-genError_t StandardHookPlugin::InitHook(void) {
- /**
- * This is the right place for init stuff that needs to be done. Make sure that all the Hooks are registered here !
- */
- m_hookhandler->registerHook(10,HOOK_DOMAIN_REGISTER,this);
- m_hookhandler->registerHook(1,HOOK_SINK_REGISTER,this);
- m_hookhandler->registerHook(1,HOOK_USER_CONNECTION_REQUEST,this);
- m_hookhandler->registerHook(1,HOOK_USER_DISCONNECTION_REQUEST,this);
- m_hookhandler->registerHook(1,HOOK_ROUTING_REQUEST,this);
- m_hookhandler->registerHook(1,HOOK_INTERRUPT_REQUEST,this);
- m_hookhandler->registerHook(1,HOOK_VOLUME_CHANGE,this);
-
- return GEN_OK;
-}
-
-genError_t StandardHookPlugin::returnPluginName(char* name) {
- strcpy(name,"Standard Plugin");
- return GEN_OK;
-}
-
-genError_t StandardHookPlugin::DeinitHook(void) {
- return GEN_OK;
-
-}
-
-genHookResult_t StandardHookPlugin::hookDomainRegister (char* Name, domain_t ID) {
- (void)Name;
- (void)ID;
- return HOOK_OK;
-}
-
-genHookResult_t StandardHookPlugin::hookSinkRegister(char* Name, sink_t ID) {
- (void)Name;
- (void)ID;
- return HOOK_OK;
-}
-
-genHookResult_t StandardHookPlugin::hookUserConnectionRequest (Queue* queue, source_t SourceID, sink_t SinkID) {
- DataBaseHandler* handler=m_core->returnDatabaseHandler();
- genRoute_t route;
- std::list<genRoutingElement_t> list;
-
- source_t domainSourceID = handler->get_Domain_ID_from_Source_ID(SourceID);
- sink_t domainSinkID = handler->get_Domain_ID_from_Sink_ID(SinkID);
- connection_t connID=handler->reserveMainConnection(SourceID,SinkID);
-
- //first go for the obvious:
- if (domainSinkID == domainSourceID) {
- genRoutingElement_t r;
- r.sink = SinkID;
- r.source = SourceID;
- r.Domain_ID = handler->get_Domain_ID_from_Source_ID(SourceID);
- list.push_back(r);
- route.Sink_ID = SinkID;
- route.Source_ID = SourceID;
- route.route = list;
- } else {
- std::list<genRoute_t> listofRoutes;
- m_core->getRoute(false,SourceID,SinkID,&listofRoutes);
-
- if (listofRoutes.size() > 0) {
- list = listofRoutes.begin()->route; //TODO these are all routes. Currently we take only the first
- route= listofRoutes.front();
- }
- }
-
- for (std::list<genRoutingElement_t>::iterator listIterator = list.begin(); listIterator != list.end(); listIterator++) {
- TaskConnect* connect=new TaskConnect(m_core, listIterator->sink, listIterator->source);
- queue->addTask(connect);
- }
-
- TaskEnterUserConnect* enterConnect=new TaskEnterUserConnect(m_core, route, connID);
- queue->addTask(enterConnect);
-
- TaskEmitSignalConnect* emitConnect=new TaskEmitSignalConnect(m_core);
- queue->addTask(emitConnect);
-
- return HOOK_OK;
-}
-
-genHookResult_t StandardHookPlugin::hookUserDisconnectionRequest (Queue* queue, connection_t connID) {
-
- genRoute_t* route;
- sink_t sink;
- source_t source;
- m_core->returnDatabaseHandler()->getMainConnectionDatafromID(connID,&sink,&source,&route);
- for(std::list<genRoutingElement_t>::iterator routeIteration=route->route.begin();routeIteration !=route->route.end();routeIteration++) {
- connection_t connectionID = m_core->returnConnectionIDforSinkSource (routeIteration->sink, routeIteration->source);
- TaskDisconnect* disconnect=new TaskDisconnect(m_core,connectionID);
- queue->addTask(disconnect);
- }
- TaskRemoveUserConnect* userDisconnect=new TaskRemoveUserConnect(m_core,connID);
- queue->addTask(userDisconnect);
-
- TaskEmitSignalConnect* emitConnect=new TaskEmitSignalConnect(m_core);
- queue->addTask(emitConnect);
-
- return HOOK_OK;
-}
-
-genHookResult_t StandardHookPlugin::hookVolumeChange (volume_t newVolume, sink_t SinkID) {
- Queue* volumeChange = new Queue(m_core,"Volume Change");
- TaskSetVolume* volumeTask = new TaskSetVolume(m_core,newVolume,SinkID);
- volumeChange->addTask(volumeTask);
- volumeChange->run();
- return HOOK_OK;
-}
-
-genHookResult_t StandardHookPlugin::hookRoutingRequest (bool onlyfree,source_t source, sink_t sink,std::list<genRoute_t>* ReturnList) {
- //Here could be a place to modify, the request, take care of restrictions etc...
- Router* router=m_core->returnRouter();
- router->get_Route_from_Source_ID_to_Sink_ID(onlyfree,source,sink,ReturnList);
- return HOOK_OK;
-}
-
-genHookResult_t StandardHookPlugin::hookInterruptRequest (Queue* queue, source_t interruptSource, sink_t sink, genInt_t* interruptID) {
- interruptType_t interrupt;
- interrupt.sourceID=interruptSource;
- interrupt.SinkID=sink;
- interrupt.ID=m_core->returnDatabaseHandler()->reserveInterrupt(sink,interruptSource);
- *interruptID=interrupt.ID;
- interrupt.listInterruptedSources=m_core->returnDatabaseHandler()->getSourceIDsForSinkID(sink);
- interrupt.connID=m_core->returnDatabaseHandler()->reserveMainConnection(interruptSource,sink);
- interrupt.mixed=m_core->returnDatabaseHandler()->is_source_Mixed(interruptSource);
-
- if (interrupt.mixed) {
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Add task to change the volume on interrupt"));
- for(std::list<source_t>::iterator sourceL=interrupt.listInterruptedSources.begin(); sourceL !=interrupt.listInterruptedSources.end();sourceL++) {
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Set volume change for source"),DLT_INT(*sourceL));
- TaskSetSourceVolume* volumetask=new TaskSetSourceVolume(m_core,INTERRUPT_VOLUME_LEVEL,*sourceL);
- queue->addTask(volumetask);
- }
- } else {
- DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("Add task to switch off sources on interrupt"));
- for(std::list<source_t>::iterator sourceL=interrupt.listInterruptedSources.begin();sourceL !=interrupt.listInterruptedSources.end();sourceL++) {
- TaskSetSourceMute* mutetask=new TaskSetSourceMute(m_core,*sourceL);
- queue->addTask(mutetask);
- }
- }
- genRoute_t route;
- std::list<genRoutingElement_t> list;
-
- source_t domainSourceID = m_core->returnDatabaseHandler()->get_Domain_ID_from_Source_ID(interruptSource);
- sink_t domainSinkID = m_core->returnDatabaseHandler()->get_Domain_ID_from_Sink_ID(sink);
-
- //first go for the obvious:
- if (domainSinkID == domainSourceID) {
- genRoutingElement_t r;
- r.sink = sink;
- r.source = interruptSource;
- r.Domain_ID = domainSourceID;
- list.push_back(r);
- route.Sink_ID = sink;
- route.Source_ID = interruptSource;
- route.len = 1;
- route.route = list;
- } else {
- std::list<genRoute_t> listofRoutes;
- m_core->getRoute(false,interruptSource,sink,&listofRoutes);
-
- if (listofRoutes.size() > 0) {
- list = listofRoutes.front().route; //TODO these are all routes. Currently we take only the first
- route= listofRoutes.front();
- }
- }
-
- for(std::list<genRoutingElement_t>::iterator element=list.begin();element!=list.end();element++) {
- TaskConnect* connect=new TaskConnect(m_core, element->sink, element->source);
- queue->addTask(connect);
- }
-
- TaskEnterUserConnect* enterConnect=new TaskEnterUserConnect(m_core,route,interrupt.connID);
- queue->addTask(enterConnect);
-
- TaskEnterInterrupt* enterInteruppt=new TaskEnterInterrupt(m_core,interrupt.ID,m_core->returnDatabaseHandler()->is_source_Mixed(interruptSource),interrupt.connID,interrupt.listInterruptedSources);
- queue->addTask(enterInteruppt);
-
- TaskInterruptWait* interruptWait=new TaskInterruptWait(m_core,interrupt.ID);
- queue->addTask(interruptWait);
-
- TaskEmitSignalConnect* emitConnect2=new TaskEmitSignalConnect(m_core);
- queue->addTask(emitConnect2);
-
- for (std::list<genRoutingElement_t>::iterator element=list.begin();element!=list.end();element++) {
- TaskDisconnect* disconnect=new TaskDisconnect(m_core,m_core->returnDatabaseHandler()->getConnectionID(element->source,element->sink));
- queue->addTask(disconnect);
- }
- if (interrupt.mixed) {
- for(std::list<source_t>::iterator sourceL=interrupt.listInterruptedSources.begin(); sourceL!=interrupt.listInterruptedSources.end();sourceL++) {
- TaskSetSourceVolume* volumetask=new TaskSetSourceVolume(m_core,NORMAL_VOLUME_LEVEL,*sourceL);
- queue->addTask(volumetask);
- }
- } else {
- for(std::list<source_t>::iterator sourceL=interrupt.listInterruptedSources.begin();sourceL!=interrupt.listInterruptedSources.end();sourceL++) {
- TaskSetSourceUnmute* unmutetask=new TaskSetSourceUnmute(m_core,*sourceL);
- queue->addTask(unmutetask);
- }
- }
-
- TaskRemoveUserConnect* removeConnect=new TaskRemoveUserConnect(m_core,interrupt.connID);
- queue->addTask(removeConnect);
-
- TaskRemoveInterrupt* removeInterrupt=new TaskRemoveInterrupt(m_core,interrupt.ID);
- queue->addTask(removeInterrupt);
-
- TaskEmitSignalConnect* emitConnect=new TaskEmitSignalConnect(m_core);
- queue->addTask(emitConnect);
-
- return HOOK_OK;
-}
-
-extern "C" BaseHook* PluginHookStandardFactory() {
- return new StandardHookPlugin();
-}
-
-extern "C" void destroyPluginHookStandard(StandardHookPlugin* hook) {
- delete hook;
-}
-
-
+++ /dev/null
-/**
- *
- * Copyright (C) 2011, BMW AG
- *
- * PluginHookStandard
- *
- * \file StandardHook.h
- * \date 20.05.2011
- * \author Christian Müller (christian.ei.mueller@bmw.de)
- *
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
- */
-
-#ifndef TEST_H_
-#define TEST_H_
-
-#include "AudioManagerCore.h"
-#include "HookEngine.h"
-
-#include <list>
-
-#define INTERRUPT_VOLUME_LEVEL 20000
-#define NORMAL_VOLUME_LEVEL 60000
-
-class Basehook;
-
-/**implementation of the Basehooks
- *
- */
-class StandardHookPlugin : public BaseHook {
-public:
- StandardHookPlugin();
- virtual ~StandardHookPlugin();
- genError_t InitHook(void);
- genError_t DeinitHook(void);
- genError_t returnPluginName(char* name);
- genHookResult_t hookDomainRegister (char* Name, domain_t ID);
- genHookResult_t hookSinkRegister (char* Name, sink_t ID);
- genHookResult_t hookUserConnectionRequest (Queue* queue,source_t SourceID, sink_t SinkID);
- genHookResult_t hookUserDisconnectionRequest (Queue* queue, connection_t connID);
- genHookResult_t hookVolumeChange (volume_t newVolume, sink_t SinkID);
- genHookResult_t hookRoutingRequest (bool onlyfree, source_t source, sink_t sink,std::list<genRoute_t>* ReturnList);
- genHookResult_t hookInterruptRequest (Queue* queue, source_t interruptSource, sink_t sink, genInt_t* interruptID);
-
-};
-
-#endif /* TEST_H_ */
+++ /dev/null
-/**
- * \mainpage
- * \image html "Bild1.png"
- * Copyright Copyright (C) 2011, BMW AG
- *
- * \date 22.06.2011
- * \author Christian Müller (christian.ei.mueller@bmw.de)
- *
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
- *
- * \section About About PluginHookStandard
- * This plugin for the Genivi AudioManager serves as StandardPlugin to let the AudioManager perform basic operations
- *
- * \section Info More information
- * can be found at <https://collab.genivi.org/wiki/display/genivi/GENIVI+Home>
- *
- * \todo enhance Features
- */
-
-#ifndef MAINPAGE_H_
-#define MAINPAGE_H_
-
-
-#endif /* MAINPAGE_H_ */
+++ /dev/null
-/**
- *
- * Copyright (C) 2011, BMW AG
- *
- * PluginDBus
- *
- * \file DBusInterface.cpp
- *
- * \date 20.05.2011
- * \author Christian Müller (christian.ei.mueller@bmw.de)
- *
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
- */
-
-#include "headers.h"
-#include <iostream>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <errno.h>
-
-class AudioManagerInterface;
-
-
-AudioManagerInterface* AudioManagerInterface::m_reference = NULL;
-
-static DBUSMessageHandler* g_pDbusMessage;
-
-static MethodTable manager_methods[] =
-{
- { "peekDomain", "s", "u", &AudioManagerInterface::peekDomain },
- { "registerSource", "sss", "u", &AudioManagerInterface::registerSource },
- { "registerSink", "sss", "u", &AudioManagerInterface::registerSink },
- { "registerDomain", "sssb", "u", &AudioManagerInterface::registerDomain },
- { "registerGateway", "sssss", "u", &AudioManagerInterface::registerGateway },
- { "", "", "", NULL }
-};
-
-static SignalTable manager_signals[] = {
- { "signal_systemReady", ""},
- { "", ""}
-};
-
-static DBusObjectPathVTable vtable =
-{
- NULL,AudioManagerInterface::receive_callback,NULL, NULL, NULL, NULL
-};
-
-
-
-AudioManagerInterface::AudioManagerInterface(RoutingReceiveInterface* r_interface, dbusRoothandler* roothandler) : m_audioman(r_interface),m_Introspection(new DBUSIntrospection(manager_methods, manager_signals,std::string(MY_NODE))),m_roothandler(roothandler) {
-}
-
-bool AudioManagerInterface::startup_interface()
-{
- DLT_LOG(DBusPlugin, DLT_LOG_INFO, DLT_STRING("Starting up dbus connector"));
- g_pDbusMessage = new DBUSMessageHandler(&vtable,m_roothandler->returnConnection(),this);
- return true;
-}
-
-void AudioManagerInterface::stop()
-{
- DLT_LOG(DBusPlugin, DLT_LOG_INFO, DLT_STRING("Stopped dbus connector"));
- delete g_pDbusMessage;
-}
-
-void AudioManagerInterface::peekDomain(DBusConnection* conn, DBusMessage* msg) {
- (void)conn; // TODO: remove, only prevents warning
- g_pDbusMessage->initReceive(msg);
- char* name = g_pDbusMessage->getString();
- domain_t domain = m_audioman->peekDomain(name);
- g_pDbusMessage->initReply(msg);
- g_pDbusMessage->append((dbus_uint32_t)domain);
- g_pDbusMessage->closeReply();
-}
-
-void AudioManagerInterface::registerSource(DBusConnection* conn, DBusMessage* msg) {
- (void)conn; // TODO: remove, only prevents warning
- g_pDbusMessage->initReceive(msg);
- char* name = g_pDbusMessage->getString();
- char* audioclass = g_pDbusMessage->getString();
- char* domain = g_pDbusMessage->getString();
- source_t source=m_audioman->registerSource(name, audioclass, domain);
- g_pDbusMessage->initReply(msg);
- g_pDbusMessage->append((dbus_uint32_t)source);
- g_pDbusMessage->closeReply();
-}
-void AudioManagerInterface::registerSink(DBusConnection* conn, DBusMessage* msg) {
- (void)conn; // TODO: remove, only prevents warning
- g_pDbusMessage->initReceive(msg);
- char* name = g_pDbusMessage->getString();
- char* audioclass = g_pDbusMessage->getString();
- char* domain = g_pDbusMessage->getString();
- sink_t sink=m_audioman->registerSink(name, audioclass, domain);
- g_pDbusMessage->initReply(msg);
- g_pDbusMessage->append((dbus_uint32_t)sink);
- g_pDbusMessage->closeReply();
-}
-
-void AudioManagerInterface::registerDomain(DBusConnection* conn, DBusMessage* msg) {
- char busname[40];
- strcpy(busname, BUS_NAME);
- (void)conn; // TODO: remove, only prevents warning
- g_pDbusMessage->initReceive(msg);
- char* name = g_pDbusMessage->getString();
- char* node = g_pDbusMessage->getString();
- bool earlymode = g_pDbusMessage->getString();
- domain_t domain=m_reference->m_audioman->registerDomain(name, busname, node, earlymode);
- g_pDbusMessage->initReply(msg);
- g_pDbusMessage->append((dbus_uint32_t)domain);
- g_pDbusMessage->closeReply();
-
-}
-void AudioManagerInterface::registerGateway(DBusConnection* conn, DBusMessage* msg) {
- (void)conn; // TODO: remove, only prevents warning
- g_pDbusMessage->initReceive(msg);
- char* name = g_pDbusMessage->getString();
- char* sink = g_pDbusMessage->getString();
- char* source = g_pDbusMessage->getString();
- char* domainSource = g_pDbusMessage->getString();
- char* domainSink = g_pDbusMessage->getString();
- char* controlDomain = g_pDbusMessage->getString();
- domain_t domain=m_audioman->registerGateway(name, sink, source, domainSource, domainSink, controlDomain);
- g_pDbusMessage->initReply(msg);
- g_pDbusMessage->append((dbus_uint32_t)domain);
- g_pDbusMessage->closeReply();
- emit_systemReady();
-}
-void AudioManagerInterface::emit_systemReady() {
- g_pDbusMessage->sendSignal("signal_systemReady");
-}
-
-DBusHandlerResult AudioManagerInterface::receive_callback(DBusConnection *conn, DBusMessage *msg, void *user_data){
- m_reference=(AudioManagerInterface*) user_data;
- DLT_LOG(DBusPlugin, DLT_LOG_INFO, DLT_STRING("message received"));
-
- string nodeString =std::string(DBUS_SERVICE_ROOT)+"/"+std::string(MY_NODE);
-
- if (dbus_message_is_method_call(msg, DBUS_INTERFACE_INTROSPECTABLE, "Introspect")) {
- m_reference->m_Introspection->process(conn,msg);
- return DBUS_HANDLER_RESULT_HANDLED;
- }
-
- bool found=false;
- int i = 0;
-
- while (!found && strcmp(manager_methods[i].name, "") != 0) {
- if (dbus_message_is_method_call(msg,DBUS_SERVICE_SERVICE,manager_methods[i].name)) {
- MethodTable entry = manager_methods[i];
- DLT_LOG(DBusPlugin, DLT_LOG_INFO, DLT_STRING("got call for method:"),DLT_STRING(entry.name));
- CallBackMethod m = entry.function;
- (m_reference->*m)(conn, msg);
- found=true;
- return DBUS_HANDLER_RESULT_HANDLED;
- }
- i++;
- }
-
- return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
-}
-
-
-
+++ /dev/null
-/**
- *
- * Copyright (C) 2011, BMW AG
- *
- * PluginDBus
- *
- * \file DBusInterface.h
- *
- * \date 20.05.2011
- * \author Christian Müller (christian.ei.mueller@bmw.de)
- *
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
- */
-
-#ifndef DBUSINTERFACE_H_
-#define DBUSINTERFACE_H_
-
-#include "headers.h"
-
-class DBUSIntrospection;
-
-class AudioManagerInterface {
-
-public:
- AudioManagerInterface(RoutingReceiveInterface* r_interface,dbusRoothandler* roothandler);
-
- bool startup_interface();
- void stop();
- static DBusHandlerResult receive_callback (DBusConnection *,DBusMessage *,void *);
-
- void peekDomain(DBusConnection* conn, DBusMessage* msg);
- void registerDomain(DBusConnection* conn, DBusMessage* msg);
- void registerGateway(DBusConnection* conn, DBusMessage* msg);
- void registerSink(DBusConnection* conn, DBusMessage* msg);
- void registerSource(DBusConnection* conn, DBusMessage* msg);
- void emit_systemReady();
-
-private:
- static AudioManagerInterface* m_reference;
- RoutingReceiveInterface* m_audioman;
- DBUSIntrospection* m_Introspection;
- dbusRoothandler* m_roothandler;
-};
-
-#endif /* DBUSINTERFACE_H_ */
set(EXECUTABLE_OUTPUT_PATH ../../bin/)
set(LIBRARY_OUTPUT_PATH ../plugins/routing)
set(DOC_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/../doc/RoutingDBusPlugin)
+set(AUDIO_INCLUDES_FOLDER ${CMAKE_SOURCE_DIR}/../includes)
find_package (Threads)
FIND_PACKAGE(DBUS REQUIRED)
${CMAKE_CURRENT_BINARY_DIR}
${DBUS_INCLUDE_DIR}
${DBUS_ARCH_INCLUDE_DIR}
- ../AudioManagerDaemon
+ ${AUDIO_INCLUDES_FOLDER}
)
# all source files go here
SET(PLUGINDBUS_SRCS_CXX
- AudiomanagerInterface.cpp
- DbusInterface.cpp
- DBUSMessageHandler.cpp
- DbusSend.cpp
+ RoutingSender.cpp
)
add_library(PluginRoutingInterfaceDbus SHARED ${PLUGINDBUS_SRCS_CXX})
+++ /dev/null
-
-
-#include "headers.h"
-#include <stdlib.h>
-
-DBUSMessageHandler::DBUSMessageHandler(DBusObjectPathVTable* vtable, DBusConnection* conn, void* reference)
-: m_MessageIter()
-, m_pReply(0)
-, m_serial(0)
-, m_pConnection(conn)
-{
- dbus_error_init(&m_err);
-
- string nodeString =std::string(DBUS_SERVICE_ROOT)+"/"+std::string(MY_NODE);
- dbus_bool_t b=dbus_connection_register_object_path(m_pConnection, nodeString.c_str(), vtable, reference);
- if(!b) {
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("Registering of node"), DLT_STRING(MY_NODE),DLT_STRING("failed"));
- }
-}
-
-DBUSMessageHandler::~DBUSMessageHandler()
-{
- DBusError err;
- dbus_error_init(&err);
- bool errorset = dbus_error_is_set(&err);
- if (errorset)
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("there was an dbus error"));
- }
- dbus_bus_name_has_owner(m_pConnection, DBUS_SERVICE_SERVICE, &err);
- errorset = dbus_error_is_set(&err);
- if (errorset)
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("there was an dbus error"));
- }
- dbus_error_init(&err);
- dbus_bus_release_name(m_pConnection, DBUS_SERVICE_SERVICE, &err);
-}
-
-void DBUSMessageHandler::initReceive(DBusMessage* msg)
-{
- if (!dbus_message_iter_init(msg, &m_MessageIter))
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS Message has no arguments!"));
- }
-}
-
-void DBUSMessageHandler::initReply(DBusMessage* msg)
-{
- // create a reply from the message
- m_pReply = dbus_message_new_method_return(msg);
- dbus_message_iter_init_append(m_pReply, &m_MessageIter);
-}
-
-void DBUSMessageHandler::closeReply()
-{
- // send the reply && flush the connection
- if (!dbus_connection_send(m_pConnection, m_pReply, &m_serial))
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler Out Of Memory!"));
- exit(1);
- }
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler sending reply!"));
- dbus_connection_flush(m_pConnection);
-
- // free the reply
- dbus_message_unref(m_pReply);
- m_pReply = NULL;
-}
-
-void DBUSMessageHandler::ReplyError(DBusMessage* msg, const char* errorname, const char* errorMsg)
-{
- m_pReply = dbus_message_new_error(msg, errorname, errorMsg);
- // send the reply && flush the connection
- if (!dbus_connection_send(m_pConnection, m_pReply, &m_serial))
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler Out Of Memory!"));
- exit(1);
- }
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler sending reply with error!"));
- dbus_connection_flush(m_pConnection);
-
- // free the reply
- dbus_message_unref(m_pReply);
-}
-
-char* DBUSMessageHandler::getString()
-{
- char* param;
-
- if (DBUS_TYPE_STRING != dbus_message_iter_get_arg_type(&m_MessageIter))
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler argument is no string!"));
- }
- else
- {
- dbus_message_iter_get_basic(&m_MessageIter, ¶m);
- dbus_message_iter_next(&m_MessageIter);
- }
- return param;
-}
-
-dbus_bool_t DBUSMessageHandler::getBool()
-{
- dbus_bool_t boolparam;
-
- if (DBUS_TYPE_BOOLEAN != dbus_message_iter_get_arg_type(&m_MessageIter))
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler argument is no bool!"));
- }
- else
- {
- dbus_message_iter_get_basic(&m_MessageIter, &boolparam);
- dbus_message_iter_next(&m_MessageIter);
- }
- return boolparam;
-}
-
-char DBUSMessageHandler::getByte()
-{
- char param;
-
- if (DBUS_TYPE_BYTE != dbus_message_iter_get_arg_type(&m_MessageIter))
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler argument is no byte!"));
- }
- else
- {
- dbus_message_iter_get_basic(&m_MessageIter, ¶m);
- dbus_message_iter_next(&m_MessageIter);
- }
- return param;
-}
-
-dbus_uint32_t DBUSMessageHandler::getUInt()
-{
- dbus_uint32_t param;
-
- if (DBUS_TYPE_UINT32 != dbus_message_iter_get_arg_type(&m_MessageIter))
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler argument is no uint32_t!"));
- }
- else
- {
- dbus_message_iter_get_basic(&m_MessageIter, ¶m);
- dbus_message_iter_next(&m_MessageIter);
- }
- return param;
-}
-
-double DBUSMessageHandler::getDouble()
-{
- double param;
-
- if (DBUS_TYPE_DOUBLE != dbus_message_iter_get_arg_type(&m_MessageIter))
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler argument is no double!"));
- }
- else
- {
- dbus_message_iter_get_basic(&m_MessageIter, ¶m);
- dbus_message_iter_next(&m_MessageIter);
- }
- return param;
-}
-
-void DBUSMessageHandler::getArrayOfUInt(int* pLength, unsigned int** ppArray)
-{
- if (DBUS_TYPE_ARRAY != dbus_message_iter_get_arg_type(&m_MessageIter))
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler argument is no array!"));
- return;
- }
-
- DBusMessageIter arrayIter;
- dbus_message_iter_recurse(&m_MessageIter, &arrayIter);
-
- uint* localArray;
- dbus_message_iter_get_fixed_array(&arrayIter, &localArray, pLength);
-
- *ppArray = new uint[*pLength];
- for (int i = 0; i < *pLength; i++)
- {
- (*ppArray)[i] = localArray[i];
- }
-}
-
-void DBUSMessageHandler::getArrayOfString(std::vector<std::string>* stringVector)
-{
- if (DBUS_TYPE_ARRAY != dbus_message_iter_get_arg_type(&m_MessageIter))
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler argument is no array!"));
- return;
- }
-
- DBusMessageIter arrayIter;
- dbus_message_iter_recurse(&m_MessageIter, &arrayIter);
- bool hasNext = true;
- while (hasNext)
- {
- if (DBUS_TYPE_STRING != dbus_message_iter_get_arg_type(&arrayIter))
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler argument is no string!"));
- }
- char* param;
- dbus_message_iter_get_basic(&arrayIter, ¶m);
-
- stringVector->push_back(std::string(param));
-
- if (dbus_message_iter_has_next(&arrayIter))
- {
- dbus_message_iter_next(&arrayIter);
- }
- else
- {
- hasNext = false;
- }
- }
-}
-
-void DBUSMessageHandler::append(bool toAppend)
-{
- dbus_bool_t mybool=toAppend;
- if (!dbus_message_iter_append_basic(&m_MessageIter, DBUS_TYPE_BOOLEAN, &mybool))
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler Out Of Memory!"));
- exit(1);
- }
-}
-
-void DBUSMessageHandler::append(dbus_uint32_t toAppend)
-{
- if (!dbus_message_iter_append_basic(&m_MessageIter, DBUS_TYPE_UINT32, &toAppend))
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler Out Of Memory!"));
- exit(1);
- }
-}
-
-void DBUSMessageHandler::append(double toAppend)
-{
- if (!dbus_message_iter_append_basic(&m_MessageIter, DBUS_TYPE_DOUBLE, &toAppend))
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler Out Of Memory!"));
- exit(1);
- }
-}
-
-void DBUSMessageHandler::append(char toAppend)
-{
- if (!dbus_message_iter_append_basic(&m_MessageIter, DBUS_TYPE_BYTE, &toAppend))
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler Out Of Memory!"));
- exit(1);
- }
-}
-
-void DBUSMessageHandler::append(unsigned int length, unsigned int *IDs)
-{
- DBusMessageIter arrayIter;
- dbus_message_iter_open_container(&m_MessageIter, DBUS_TYPE_ARRAY, "u", &arrayIter);
- for(unsigned int i = 0; i < length; i++)
- {
- dbus_message_iter_append_basic(&arrayIter, DBUS_TYPE_UINT32, &IDs[i]);
- }
- dbus_message_iter_close_container(&m_MessageIter, &arrayIter);
-}
-
-void DBUSMessageHandler::sendSignal(const char* signalname) {
- dbus_uint32_t serial = 0;
- DBusMessage* msg;
-
- string nodeString =std::string(DBUS_SERVICE_ROOT)+"/"+std::string(MY_NODE);
- msg =dbus_message_new_signal(nodeString.c_str(),DBUS_SERVICE_SERVICE,signalname);
-
- if (NULL == msg)
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("Message null!"));
- this->~DBUSMessageHandler();
- }
-
- if (!dbus_connection_send(m_pConnection, msg, &serial)) {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler Out Of Memory!"));
- this->~DBUSMessageHandler();
- }
-
- dbus_connection_flush(m_pConnection);
-
- // free the message
- dbus_message_unref(msg);
-}
-
-void DBUSMessageHandler::append(std::list<ConnectionType> list){
- DBusMessageIter arrayIter;
- dbus_message_iter_open_container(&m_MessageIter, DBUS_TYPE_ARRAY, "uu", &arrayIter);
-
- std::list<ConnectionType>::iterator Ilist;
- std::list<ConnectionType>::iterator Ibegin=list.begin();
- std::list<ConnectionType>::iterator Iend=list.end();
- for(Ilist=Ibegin;Ilist!=Iend; Ilist++)
- {
- dbus_message_iter_append_basic(&arrayIter, DBUS_TYPE_UINT32, &Ilist->Sink_ID);
- dbus_message_iter_append_basic(&arrayIter, DBUS_TYPE_UINT32, &Ilist->Source_ID);
- }
- dbus_message_iter_close_container(&m_MessageIter, &arrayIter);
-}
-
-void DBUSMessageHandler::append(std::list<SinkType> list){
- DBusMessageIter arrayIter;
- dbus_message_iter_open_container(&m_MessageIter, DBUS_TYPE_ARRAY, "su", &arrayIter);
-
- std::list<SinkType>::iterator Ilist;
- std::list<SinkType>::iterator Ibegin=list.begin();
- std::list<SinkType>::iterator Iend=list.end();
- for(Ilist=Ibegin;Ilist!=Iend; Ilist++)
- {
- dbus_message_iter_append_basic(&arrayIter, DBUS_TYPE_STRING, &Ilist->name);
- dbus_message_iter_append_basic(&arrayIter, DBUS_TYPE_UINT32, &Ilist->ID);
- }
- dbus_message_iter_close_container(&m_MessageIter, &arrayIter);
-
-}
-
-void DBUSMessageHandler::append(std::list<SourceType> list){
- DBusMessageIter arrayIter;
- dbus_message_iter_open_container(&m_MessageIter, DBUS_TYPE_ARRAY, "su", &arrayIter);
-
- std::list<SourceType>::iterator Ilist;
- std::list<SourceType>::iterator Ibegin=list.begin();
- std::list<SourceType>::iterator Iend=list.end();
- for(Ilist=Ibegin;Ilist!=Iend; Ilist++)
- {
- dbus_message_iter_append_basic(&arrayIter, DBUS_TYPE_STRING, &Ilist->name);
- dbus_message_iter_append_basic(&arrayIter, DBUS_TYPE_UINT32, &Ilist->ID);
- }
- dbus_message_iter_close_container(&m_MessageIter, &arrayIter);
-}
-
-
-
-DBUSIntrospection::DBUSIntrospection(MethodTable* methodTable, SignalTable* signalTable,std::string nodename)
-: m_methodTable(methodTable), m_signalTable(signalTable), m_nodename(nodename)
-{
- generateString();
-}
-
-void DBUSIntrospection::generateString()
-{
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("Generating instrospection data!"));
-
- addHeader();
- openNode(m_nodename);
- openInterface("org.freedesktop.DBus.Introspectable");
- openMethod("Introspect");
- addArgument("data", "out", "s");
- closeMethod();
- closeInterface();
- openInterface(DBUS_SERVICE_SERVICE);
-
- int index = 0;
-
- while (strcmp(m_methodTable[index].name, "") != 0)
- {
- MethodTable entry = m_methodTable[index];
- addEntry(entry);
- ++index;
- }
-
- index=0;
- if (m_signalTable) {
- while (strcmp(m_signalTable[index].name, "") != 0)
- {
- SignalTable entry = m_signalTable[index];
- addEntry(entry);
- ++index;
- }
- }
- closeInterface();
- closeNode();
-
-}
-
-void DBUSIntrospection::addHeader(void)
-{
- m_introspectionString << "<!DOCTYPE node PUBLIC \"-//freedesktop//DTD D-BUS"
- << "Object Introspection 1.0//EN\"\n \"http://www.freedesktop.org/standards/"
- << "dbus/1.0/introspect.dtd\"> \n";
-}
-
-void DBUSIntrospection::openNode(string nodename)
-{
- m_introspectionString << "<node name=\"" << nodename << "\"> \n";
-}
-
-void DBUSIntrospection::openInterface(string interfacename)
-{
- m_introspectionString << "<interface name=\"" << interfacename << "\"> \n";
-}
-
-void DBUSIntrospection::openMethod(string methodname)
-{
- m_introspectionString << "<method name=\"" << methodname << "\"> \n";
-}
-
-void DBUSIntrospection::openSignal(string signalname) {
- m_introspectionString<<"<signal name=\"" << signalname << "\"> \n";
-}
-
-void DBUSIntrospection::addArgument(string argname, string direction, string type)
-{
- m_introspectionString << "<arg name=\"" << argname << "\" direction=\""
- << direction << "\" type=\"" << type << "\"/> \n";
-}
-
-
-void DBUSIntrospection::addSignalArgument(string argname, string type){
- m_introspectionString << "<arg name=\"" << argname << "\" type=\"" << type << "\"/> \n";
-}
-
-void DBUSIntrospection::closeMethod(void)
-{
- m_introspectionString << "</method> \n";
-}
-
-void DBUSIntrospection::closeInterface(void)
-{
- m_introspectionString << "</interface> \n";
-}
-
-void DBUSIntrospection::closeNode(void)
-{
- m_introspectionString << "</node> \n";
-}
-
-void DBUSIntrospection::closeSignal(void){
- m_introspectionString<<"</signal> \n";
-}
-
-void DBUSIntrospection::addEntry(MethodTable entry)
-{
- string methodName = entry.name;
- string parameterArray = entry.signature;
- string returnValueArray = string(entry.reply);
-
- openMethod(methodName);
-
- for(uint parameterIndex = 0; parameterIndex < parameterArray.length(); ++parameterIndex)
- {
- switch (parameterArray.at(parameterIndex))
- {
- case 'a':
- if (parameterArray.at(parameterIndex+1)=='(') {
- int size=parameterArray.find((')'),parameterIndex);
- addArgument("","in",parameterArray.substr(parameterIndex,size+1));
- parameterIndex+=size;
- } else {
- addArgument("","in", parameterArray.substr(parameterIndex,2));
- parameterIndex+=2;
- }
- break;
- default:
- addArgument("","in", parameterArray.substr(parameterIndex,1));
- break;
- }
- }
-
-
- for(uint returnValueIndex = 0; returnValueIndex < returnValueArray.length(); ++returnValueIndex)
- {
- switch (returnValueArray.at(returnValueIndex))
- {
- case 'a':
- if (returnValueArray.at(returnValueIndex+1)=='(') {
- int size=returnValueArray.find((')'),returnValueIndex);
- addArgument("","out",returnValueArray.substr(returnValueIndex,size+1));
- returnValueIndex+=size;
- } else {
- addArgument("","out", returnValueArray.substr(returnValueIndex,2));
- returnValueIndex+=2;
- }
- break;
- default:
- addArgument("","out", returnValueArray.substr(returnValueIndex,1));
- break;
- }
- }
-
- closeMethod();
-}
-
-void DBUSIntrospection::addEntry(SignalTable entry)
-{
- string methodName = entry.name;
- string parameterArray = entry.signature;
-
- openSignal(methodName);
-
- for(uint parameterIndex = 0; parameterIndex < parameterArray.length(); ++parameterIndex)
- {
- switch (parameterArray.at(parameterIndex))
- {
- case 'a':
- if (parameterArray.at(parameterIndex+1)=='{') {
- int size=parameterArray.find(('}'),parameterIndex);
- addSignalArgument("",parameterArray.substr(parameterIndex,size+1));
- parameterIndex+=size;
- } else {
- parameterIndex++;
- addSignalArgument("", "a" + parameterArray.at(parameterIndex));
- }
- break;
- default:
- addSignalArgument("", parameterArray.substr(parameterIndex,1));
- break;
- }
- }
-
- closeSignal();
-}
-
-void DBUSIntrospection::process(DBusConnection* conn, DBusMessage* msg)
-{
- DBusMessage * reply;
- DBusMessageIter args;
- dbus_uint32_t serial = 0;
-
- // create a reply from the message
- reply = dbus_message_new_method_return(msg);
-
- string introspect = m_introspectionString.str();
- const char* string = introspect.c_str();
-
- // add the arguments to the reply
- dbus_message_iter_init_append(reply, &args);
- if (!dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING, &string))
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler Out Of Memory!"));
- }
-
- // send the reply && flush the connection
- if (!dbus_connection_send(conn, reply, &serial))
- {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBUS handler Out Of Memory!"));
- }
- dbus_connection_flush(conn);
-
- // free the reply
- dbus_message_unref(reply);
-}
-
-
-
-
-
-
+++ /dev/null
-/***************************************************************************
- *
- * Copyright 2010,2011 BMW Car IT GmbH
- *
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- ****************************************************************************/
-
-#ifndef _DBUSMESSAGEHANDLER_H_
-#define _DBUSMESSAGEHANDLER_H_
-
-#include <vector>
-#include <sstream>
-using std::stringstream;
-
-#include <string>
-using std::string;
-
-#include "headers.h"
-#include <dbus/dbus.h>
-
-#define DLT_CONTEXT DBusPlugin
-
-typedef void (AudioManagerInterface::*CallBackMethod)(DBusConnection *connection, DBusMessage *message);
-
-struct MethodTable
-{
- const char *name;
- const char *signature;
- const char *reply;
- CallBackMethod function;
-};
-
-struct SignalTable {
- const char* name;
- const char* signature;
-};
-
-
-class DBUSMessageHandler
-{
-public:
- DBUSMessageHandler(DBusObjectPathVTable* vtable, DBusConnection* conn, void* reference);
- ~DBUSMessageHandler();
-
- void initReceive(DBusMessage* msg);
- void initReply(DBusMessage* msg);
- void closeReply();
- void ReplyError(DBusMessage* msg, const char* errorname, const char* errorMsg);
-
- dbus_uint32_t getUInt();
- char getByte();
- dbus_bool_t getBool();
- double getDouble();
- char* getString();
- void getArrayOfUInt(int* length, unsigned int** array);
- void getArrayOfString(std::vector<std::string>* uniforms);
-
- void append(dbus_uint32_t toAppend);
- void append(char toAppend);
- void append(bool toAppend);
- void append(double toAppend);
- void append(unsigned int length, unsigned int *IDs);
- void append(std::list<SourceType> list);
- void append(std::list<ConnectionType> list);
- void append(std::list<SinkType> list);
-
- void sendSignal(const char* signalname);
-
-private:
- DBusMessageIter m_MessageIter;
- DBusMessage* m_pReply;
- dbus_uint32_t m_serial;
- DBusConnection* m_pConnection;
- DBusError m_err;
-};
-
-class DBUSIntrospection
-{
-public:
- DBUSIntrospection(MethodTable* table, SignalTable* stable,std::string nodename);
- void process(DBusConnection* conn, DBusMessage* msg);
-
-private:
- void generateString(void);
-
- void addHeader(void);
- void addArgument(string argname, string direction, string type);
- void addSignalArgument(string argname, string type);
- void addEntry(MethodTable entry);
- void addEntry(SignalTable entry);
-
- void openNode(string nodename);
- void closeNode(void);
-
- void openInterface(string interfacename);
- void closeInterface(void);
-
- void openMethod(string methodname);
- void closeMethod(void);
-
- void openSignal(string signalname);
- void closeSignal(void);
-
-private:
- stringstream m_introspectionString;
- MethodTable* m_methodTable;
- SignalTable* m_signalTable;
- std::string m_nodename;
-};
-
-#endif // _DBUSMESSAGEWRAPPER_H_
+++ /dev/null
-/**
- *
- * Copyright (C) 2011, BMW AG
- *
- * PluginDBus
- *
- * \file RoutingSend.cpp
- *
- * \date 20.05.2011
- * \author Christian Müller (christian.ei.mueller@bmw.de)
- *
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
- */
-
-
-#include "headers.h"
-#include "routinginterface.h"
-#include <stdbool.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <string>
-#include <sstream>
-
-DLT_DECLARE_CONTEXT(DBusPlugin)
-
-DbusInterface::DbusInterface(): m_busname(DBUS_BUSNAME), m_path(DBUS_PATH) {
-
- DLT_REGISTER_APP("DBusPlugin", "DBusPlugin");
- DLT_REGISTER_CONTEXT(DBusPlugin, "DPlugin", "Dbus Plugin");
- DLT_LOG(DBusPlugin, DLT_LOG_INFO, DLT_STRING("The DBus Plugin is started"));
-}
-
-DbusInterface::~DbusInterface() {
- delete m_DbusInterface;
-}
-
-void DbusInterface::startup_interface(RoutingReceiveInterface* audioman,dbusRoothandler* dbushandler) {
- m_audioman = audioman;
- m_rootHandler = dbushandler;
- m_DbusInterface = new AudioManagerInterface(audioman,dbushandler);
- m_DbusInterface->startup_interface();
- m_rootHandler->registerNode(MY_NODE);
- DBusError err;
- dbus_error_init(&err);
-
- m_conn = dbus_bus_get(DBUS_BUS_SESSION, &err);
- if (dbus_error_is_set(&err)) {
- DLT_LOG(DBusPlugin, DLT_LOG_INFO, DLT_STRING("Could not connect to DBUS for sending, Error: "), DLT_STRING(err.message));
- dbus_error_free(&err);
- }
-
- DLT_LOG(DBusPlugin, DLT_LOG_INFO, DLT_STRING("DBus Interface started "));
-}
-
-void DbusInterface::return_BusName(char* BusName) {
- strcpy(BusName, BUS_NAME);
-}
-
-genError_t DbusInterface::connect(source_t source, sink_t sink, connection_t connID) {
- int reply;
- DbusSend send = DbusSend(m_conn,"PULSE",(const char*)m_busname,(const char*)m_path, "connect");
- send.appendInteger(source);
- send.appendInteger(sink);
- send.appendInteger(connID);
- send.sendReply(&reply);
- return GEN_OK;
- /**
- * \todo always OK...
- */
-}
-
-void DbusInterface::system_ready() {
- DLT_LOG(DBusPlugin, DLT_LOG_INFO, DLT_STRING("DBus Plugin got ready"));
- m_DbusInterface->emit_systemReady();
-}
-
-genError_t DbusInterface::disconnect(connection_t connectionID) {
- bool reply;
- DbusSend send = DbusSend(m_conn,"PULSE",(const char*)m_busname,(const char*)m_path,"disconnect");
- send.appendInteger(connectionID);
- send.sendReply(&reply);
- return GEN_OK;
- /**
- * \todo always OK...
- */
-}
-
-genError_t DbusInterface::setSinkVolume(volume_t volume, sink_t sink) {
- int reply;
- DbusSend send = DbusSend(m_conn,"PULSE",(const char*)m_busname,(const char*)m_path,"setSinkVolume");
- send.appendInteger(volume);
- send.appendInteger(sink);
- send.sendReply(&reply);
- return GEN_OK;
- /**
- * \todo always OK...
- */
-}
-
-genError_t DbusInterface::setSourceVolume(volume_t volume, source_t source) {
- int reply;
- DbusSend send = DbusSend(m_conn,"PULSE",(const char*)m_busname,(const char*)m_path,"setSourceVolume");
- send.appendInteger(volume);
- send.appendInteger(source);
- send.sendReply(&reply);
- return GEN_OK;
- /**
- * \todo always OK...
- */
-}
-
-genError_t DbusInterface::muteSource(source_t sourceID) {
- bool reply;
- DbusSend send = DbusSend(m_conn,"PULSE",(const char*)m_busname,(const char*)m_path,"muteSource");
- send.appendInteger(sourceID);
- send.sendReply(&reply);
- return GEN_OK;
- /**
- * \todo always OK...
- */
-}
-
-genError_t DbusInterface::muteSink(sink_t sinkID) {
- bool reply;
- DbusSend send = DbusSend(m_conn,"PULSE",(const char*)m_busname,(const char*)m_path,"muteSink");
- send.appendInteger(sinkID);
- send.sendReply(&reply);
- return GEN_OK;
- /**
- * \todo always OK...
- */
-}
-
-genError_t DbusInterface::unmuteSource(source_t sourceID) {
- bool reply;
- DbusSend send = DbusSend(m_conn,"PULSE",(const char*)m_busname,(const char*)m_path,"unmuteSource");
- send.appendInteger(sourceID);
- send.sendReply(&reply);
- return GEN_OK;
- /**
- * \todo always OK...
- */
-}
-
-genError_t DbusInterface::unmuteSink(sink_t sinkID) {
- bool reply;
- DbusSend send = DbusSend(m_conn,"PULSE",(const char*)m_busname,(const char*)m_path,"unmuteSink");
- send.appendInteger(sinkID);
- send.sendReply(&reply);
- return GEN_OK;
- /**
- * \todo always OK...
- */
-}
-
-//genError_t DbusInterface::asyncConnect(source_t source, sink_t sink, connection_t con_ID) {
-// /**
-// * \todo implement
-// */
-// return GEN_OK;
-//}
-//
-//genError_t DbusInterface::asyncDisconnect(connection_t connection_ID){
-// /**
-// * \todo implement
-// */
-// return GEN_OK;
-//}
-
-//That is the actual implementation of the Factory Class returning the real sendInterface
-
-extern "C" RoutingSendInterface* PluginRoutingInterfaceDbusFactory() {
- return new DbusInterface();
-}
-
-extern "C" void destroyRoutingPluginInterfaceDbus(RoutingSendInterface* iface) {
- delete iface;
-}
-
-
+++ /dev/null
-/**
- *
- * Copyright (C) 2011, BMW AG
- *
- * PluginDBus
- *
- * \file RoutingSend.h
- *
- * \date 20.05.2011
- * \author Christian Müller (christian.ei.mueller@bmw.de)
- *
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
- */
-
-#ifndef BUS_INTERFACE_H_
-#define BUS_INTERFACE_H_
-
-#include "headers.h"
-#include "routinginterface.h"
-
-class RoutingSendInterface;
-
-/**Implementation of the interface
- *
- */
-class DbusInterface: public RoutingSendInterface {
-
-public:
- DbusInterface();
- virtual ~DbusInterface();
-
- void startup_interface(RoutingReceiveInterface * audioman, dbusRoothandler* dbushandler);
- void return_BusName(char * BusName);
- genError_t connect(source_t source, sink_t sink, connection_t connID);
- genError_t disconnect(connection_t connectionID);
- genError_t setSinkVolume(volume_t volume, sink_t sink);
- genError_t setSourceVolume(volume_t volume, source_t source);
- genError_t muteSource(source_t sourceID);
- genError_t muteSink(sink_t sinkID);
- genError_t unmuteSource(source_t sourceID);
- genError_t unmuteSink(sink_t sinkID);
-// genError_t asyncConnect(source_t source, sink_t sink, connection_t con_ID);
-// genError_t asyncDisconnect(connection_t connection_ID);
- void system_ready();
-
-private:
- RoutingReceiveInterface *m_audioman;
- AudioManagerInterface* m_DbusInterface;
- DBusConnection* m_conn;
- dbusRoothandler* m_rootHandler;
- char* m_busname;
- char* m_path;
-
-};
-
-
-#endif /* BUS_INTERFACE_H_ */
+++ /dev/null
-/*
- * DbusSend.cpp
- *
- * Created on: Jul 20, 2011
- * Author: christian
- */
-
-#include "DbusSend.h"
-
-DbusSend::DbusSend (DBusConnection* conn, const char* bus_name,const char* path, const char* interface, const char* method) : m_conn(conn) {
- m_msg=dbus_message_new_method_call(bus_name,path,interface,method);
- if (NULL == m_msg) {
- DLT_LOG(DBusPlugin, DLT_LOG_INFO, DLT_STRING("Error while creating DBus message"));
- this->~DbusSend();
- }
-}
-
-DbusSend::~DbusSend() {
- // TODO Auto-generated destructor stub
-}
-
-void DbusSend::appendString(char* string) {
- dbus_message_iter_init_append(m_msg, &m_args);
- if (!dbus_message_iter_append_basic(&m_args, DBUS_TYPE_STRING, string)) {
- DLT_LOG(DBusPlugin, DLT_LOG_INFO, DLT_STRING("Out of memory"));
- this->~DbusSend();
- }
-}
-
-void DbusSend::appendInteger(int integer) {
- dbus_message_iter_init_append(m_msg, &m_args);
- if (!dbus_message_iter_append_basic(&m_args, DBUS_TYPE_INT32, &integer)) {
- DLT_LOG(DBusPlugin, DLT_LOG_INFO, DLT_STRING("Out of memory"));
- this->~DbusSend();
- }
-
-}
-
-void DbusSend::sendReply(bool* reply) {
-
- DBusPendingCall* pending;
- DBusMessageIter args;
- if (!dbus_connection_send_with_reply (m_conn, m_msg, &pending, -1)) { // -1 is default timeout
- DLT_LOG(DBusPlugin, DLT_LOG_INFO, DLT_STRING("Out of memory"));
- this->~DbusSend();
- }
-
- if (NULL == pending) {
- DLT_LOG(DBusPlugin, DLT_LOG_INFO, DLT_STRING("Pending Call Null"));
- this->~DbusSend();
- }
- dbus_connection_flush(m_conn);
- dbus_message_unref(m_msg);
- dbus_pending_call_block(pending);
-
- DBusMessage* msg=dbus_pending_call_steal_reply(pending);
-
- if (NULL == msg) {
- DLT_LOG(DBusPlugin, DLT_LOG_INFO, DLT_STRING("DBUS reply NULL"));
- this->~DbusSend();
- }
-
- dbus_pending_call_unref(pending);
-
- if (!dbus_message_iter_init(msg, &args)) {
- DLT_LOG(DBusPlugin, DLT_LOG_INFO, DLT_STRING("DBUS Message without arguments"));
- } else if (DBUS_TYPE_BOOLEAN != dbus_message_iter_get_arg_type(&args)) {
- DLT_LOG(DBusPlugin, DLT_LOG_INFO, DLT_STRING("Argument not boolean"));
- } else {
- dbus_message_iter_get_basic(&args, reply);
- }
-
- dbus_message_unref(msg);
-}
-
-void DbusSend::sendReply(int* reply) {
-
- DBusPendingCall* pending;
- DBusMessageIter args;
- if (!dbus_connection_send_with_reply (m_conn, m_msg, &pending, -1)) { // -1 is default timeout
- DLT_LOG(DBusPlugin, DLT_LOG_INFO, DLT_STRING("Out of memory"));
- this->~DbusSend();
- }
-
- if (NULL == pending) {
- DLT_LOG(DBusPlugin, DLT_LOG_INFO, DLT_STRING("Pending Call Null"));
- this->~DbusSend();
- }
- dbus_connection_flush(m_conn);
- dbus_message_unref(m_msg);
- dbus_pending_call_block(pending);
-
- DBusMessage* msg=dbus_pending_call_steal_reply(pending);
-
- if (NULL == msg) {
- DLT_LOG(DBusPlugin, DLT_LOG_INFO, DLT_STRING("DBUS reply NULL"));
- this->~DbusSend();
- }
-
- dbus_pending_call_unref(pending);
-
- if (!dbus_message_iter_init(msg, &args)) {
- DLT_LOG(DBusPlugin, DLT_LOG_INFO, DLT_STRING("DBUS Message without arguments"));
- } else if (DBUS_TYPE_INT32 != dbus_message_iter_get_arg_type(&args)) {
- DLT_LOG(DBusPlugin, DLT_LOG_INFO, DLT_STRING("Argument not integer"));
- } else {
- dbus_message_iter_get_basic(&args, reply);
- }
-
- dbus_message_unref(msg);
-}
-
+++ /dev/null
-/*
- * DbusSend.h
- *
- * Created on: Jul 20, 2011
- * Author: christian
- */
-
-#ifndef DBUSSEND_H_
-#define DBUSSEND_H_
-
-#include "headers.h"
-
-class DbusSend {
-public:
- DbusSend(DBusConnection* conn, const char* bus_name,const char* path, const char* interface, const char* method);
- virtual ~DbusSend();
- void appendString(char* string);
- void appendInteger(int integer);
- void sendReply(bool* reply);
- void sendReply(int* reply);
-
-private:
- DBusMessage* m_msg;
- DBusMessageIter m_args;
- DBusConnection* m_conn;
-};
-
-#endif /* DBUSSEND_H_ */
+++ /dev/null
-# Doxyfile 1.7.1
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
-#
-# All text after a hash (#) is considered a comment and will be ignored
-# The format is:
-# TAG = value [value, ...]
-# For lists items can also be appended using:
-# TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all
-# text before the first occurrence of this tag. Doxygen uses libiconv (or the
-# iconv built into libc) for the transcoding. See
-# http://www.gnu.org/software/libiconv for the list of possible encodings.
-
-DOXYFILE_ENCODING = UTF-8
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
-# by quotes) that should identify the project.
-
-PROJECT_NAME = DBusPlugin
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number.
-# This could be handy for archiving the generated documentation or
-# if some version control system is used.
-
-PROJECT_NUMBER = 0.1
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
-# base path where the generated documentation will be put.
-# If a relative path is entered, it will be relative to the location
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY =
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
-# 4096 sub-directories (in 2 levels) under the output directory of each output
-# format and will distribute the generated files over these directories.
-# Enabling this option can be useful when feeding doxygen a huge amount of
-# source files, where putting all generated files in the same directory would
-# otherwise cause performance problems for the file system.
-
-CREATE_SUBDIRS = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# The default language is English, other supported languages are:
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
-# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
-# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
-# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
-# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
-# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
-
-OUTPUT_LANGUAGE = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
-# include brief member descriptions after the members that are listed in
-# the file and class documentation (similar to JavaDoc).
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
-# the brief description of a member or function before the detailed description.
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator
-# that is used to form the text in various listings. Each string
-# in this list, if found as the leading text of the brief description, will be
-# stripped from the text and the result after processing the whole list, is
-# used as the annotated text. Otherwise, the brief description is used as-is.
-# If left blank, the following values are used ("$name" is automatically
-# replaced with the name of the entity): "The $name class" "The $name widget"
-# "The $name file" "is" "provides" "specifies" "contains"
-# "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF = "The $name class" \
- "The $name widget" \
- "The $name file" \
- is \
- provides \
- specifies \
- contains \
- represents \
- a \
- an \
- the
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# Doxygen will generate a detailed section even if there is only a brief
-# description.
-
-ALWAYS_DETAILED_SEC = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
-# operators of the base classes will not be shown.
-
-INLINE_INHERITED_MEMB = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
-# path before files name in the file list and in the header files. If set
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES = YES
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
-# can be used to strip a user-defined part of the path. Stripping is
-# only done if one of the specified strings matches the left-hand part of
-# the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the
-# path to strip.
-
-STRIP_FROM_PATH =
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
-# the path mentioned in the documentation of a class, which tells
-# the reader which header file to include in order to use a class.
-# If left blank only the name of the header file containing the class
-# definition is used. Otherwise one should specify the include paths that
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH =
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-# (but less readable) file names. This can be useful is your file systems
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
-# will interpret the first line (until the first dot) of a JavaDoc-style
-# comment as the brief description. If set to NO, the JavaDoc
-# comments will behave just like regular Qt-style comments
-# (thus requiring an explicit @brief command for a brief description.)
-
-JAVADOC_AUTOBRIEF = YES
-
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
-# interpret the first line (until the first dot) of a Qt-style
-# comment as the brief description. If set to NO, the comments
-# will behave just like regular Qt-style comments (thus requiring
-# an explicit \brief command for a brief description.)
-
-QT_AUTOBRIEF = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
-# treat a multi-line C++ special comment block (i.e. a block of //! or ///
-# comments) as a brief description. This used to be the default behaviour.
-# The new default is to treat a multi-line C++ comment block as a detailed
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it
-# re-implements.
-
-INHERIT_DOCS = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
-# a new page for each member. If set to NO, the documentation of a member will
-# be part of the file/class/namespace that contains it.
-
-SEPARATE_MEMBER_PAGES = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab.
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE = 8
-
-# This tag can be used to specify a number of aliases that acts
-# as commands in the documentation. An alias has the form "name=value".
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to
-# put the command \sideeffect (or @sideeffect) in the documentation, which
-# will result in a user-defined paragraph with heading "Side Effects:".
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
-# sources only. Doxygen will then generate output that is more tailored for C.
-# For instance, some of the names that are used will be different. The list
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C = NO
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
-# sources only. Doxygen will then generate output that is more tailored for
-# Java. For instance, namespaces will be presented as packages, qualified
-# scopes will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA = NO
-
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-# sources only. Doxygen will then generate output that is more tailored for
-# Fortran.
-
-OPTIMIZE_FOR_FORTRAN = NO
-
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-# sources. Doxygen will then generate output that is tailored for
-# VHDL.
-
-OPTIMIZE_OUTPUT_VHDL = NO
-
-# Doxygen selects the parser to use depending on the extension of the files it
-# parses. With this tag you can assign which parser to use for a given extension.
-# Doxygen has a built-in mapping, but you can override or extend it using this
-# tag. The format is ext=language, where ext is a file extension, and language
-# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
-# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
-# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
-# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
-# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
-
-EXTENSION_MAPPING =
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
-# to include (a tag file for) the STL sources as input, then you should
-# set this tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
-# func(std::string) {}). This also make the inheritance and collaboration
-# diagrams that involve STL classes more complete and accurate.
-
-BUILTIN_STL_SUPPORT = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-
-CPP_CLI_SUPPORT = NO
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
-# Doxygen will parse them like normal C++ but will assume all classes use public
-# instead of private inheritance when no explicit protection keyword is present.
-
-SIP_SUPPORT = NO
-
-# For Microsoft's IDL there are propget and propput attributes to indicate getter
-# and setter methods for a property. Setting this option to YES (the default)
-# will make doxygen to replace the get and set methods by a property in the
-# documentation. This will only work if the methods are indeed getting or
-# setting a simple type. If this is not the case, or you want to show the
-# methods anyway, you should set this option to NO.
-
-IDL_PROPERTY_SUPPORT = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
-# the same type (for instance a group of public functions) to be put as a
-# subgroup of that type (e.g. under the Public Functions section). Set it to
-# NO to prevent subgrouping. Alternatively, this can be done per class using
-# the \nosubgrouping command.
-
-SUBGROUPING = YES
-
-# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
-# is documented as struct, union, or enum with the name of the typedef. So
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
-# with name TypeT. When disabled the typedef will appear as a member of a file,
-# namespace, or class. And the struct will be named TypeS. This can typically
-# be useful for C code in case the coding convention dictates that all compound
-# types are typedef'ed and only the typedef is referenced, never the tag name.
-
-TYPEDEF_HIDES_STRUCT = YES
-
-# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
-# determine which symbols to keep in memory and which to flush to disk.
-# When the cache is full, less often used symbols will be written to disk.
-# For small to medium size projects (<1000 input files) the default value is
-# probably good enough. For larger projects a too small cache size can cause
-# doxygen to be busy swapping symbols to and from disk most of the time
-# causing a significant performance penality.
-# If the system has enough physical memory increasing the cache will improve the
-# performance by keeping more symbols in memory. Note that the value works on
-# a logarithmic scale so increasing the size by one will rougly double the
-# memory usage. The cache size is given by this formula:
-# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols
-
-SYMBOL_CACHE_SIZE = 0
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available.
-# Private class members and static file members will be hidden unless
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL = YES
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
-# will be included in the documentation.
-
-EXTRACT_PRIVATE = YES
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file
-# will be included in the documentation.
-
-EXTRACT_STATIC = YES
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
-# defined locally in source files will be included in the documentation.
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES = YES
-
-# This flag is only useful for Objective-C code. When set to YES local
-# methods, which are defined in the implementation section but not in
-# the interface are included in the documentation.
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS = YES
-
-# If this flag is set to YES, the members of anonymous namespaces will be
-# extracted and appear in the documentation as a namespace called
-# 'anonymous_namespace{file}', where file will be replaced with the base
-# name of the file that contains the anonymous namespace. By default
-# anonymous namespace are hidden.
-
-EXTRACT_ANON_NSPACES = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
-# undocumented members of documented classes, files or namespaces.
-# If set to NO (the default) these members will be included in the
-# various overviews, but no documentation section is generated.
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS = NO
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy.
-# If set to NO (the default) these classes will be included in the various
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES = NO
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
-# friend (class|struct|union) declarations.
-# If set to NO (the default) these declarations will be included in the
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
-# documentation blocks found inside the body of a function.
-# If set to NO (the default) these blocks will be appended to the
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS = NO
-
-# The INTERNAL_DOCS tag determines if documentation
-# that is typed after a \internal command is included. If the tag is set
-# to NO (the default) then the documentation will be excluded.
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
-# file names in lower-case letters. If set to YES upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES = NO
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
-# will show members with their full class and namespace scopes in the
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
-# will put a list of the files that are included by a file in the documentation
-# of that file.
-
-SHOW_INCLUDE_FILES = YES
-
-# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
-# will list include files with double quotes in the documentation
-# rather than with sharp brackets.
-
-FORCE_LOCAL_INCLUDES = NO
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
-# is inserted in the documentation for inline members.
-
-INLINE_INFO = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
-# will sort the (detailed) documentation of file and class members
-# alphabetically by member name. If set to NO the members will appear in
-# declaration order.
-
-SORT_MEMBER_DOCS = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
-# brief documentation of file, namespace and class members alphabetically
-# by member name. If set to NO (the default) the members will appear in
-# declaration order.
-
-SORT_BRIEF_DOCS = YES
-
-# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
-# will sort the (brief and detailed) documentation of class members so that
-# constructors and destructors are listed first. If set to NO (the default)
-# the constructors will appear in the respective orders defined by
-# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
-# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
-# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
-
-SORT_MEMBERS_CTORS_1ST = NO
-
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
-# hierarchy of group names into alphabetical order. If set to NO (the default)
-# the group names will appear in their defined order.
-
-SORT_GROUP_NAMES = YES
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
-# sorted by fully-qualified names, including namespaces. If set to
-# NO (the default), the class list will be sorted only by class name,
-# not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or
-# disable (NO) the todo list. This list is created by putting \todo
-# commands in the documentation.
-
-GENERATE_TODOLIST = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or
-# disable (NO) the test list. This list is created by putting \test
-# commands in the documentation.
-
-GENERATE_TESTLIST = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or
-# disable (NO) the bug list. This list is created by putting \bug
-# commands in the documentation.
-
-GENERATE_BUGLIST = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
-# disable (NO) the deprecated list. This list is created by putting
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS =
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-# the initial value of a variable or define consists of for it to appear in
-# the documentation. If the initializer consists of more lines than specified
-# here it will be hidden. Use a value of 0 to hide initializers completely.
-# The appearance of the initializer of individual variables and defines in the
-# documentation can be controlled using \showinitializer or \hideinitializer
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
-# at the bottom of the documentation of classes and structs. If set to YES the
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES = YES
-
-# If the sources in your project are distributed over multiple directories
-# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
-# in the documentation. The default is NO.
-
-SHOW_DIRECTORIES = NO
-
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
-# This will remove the Files entry from the Quick Index and from the
-# Folder Tree View (if specified). The default is YES.
-
-SHOW_FILES = YES
-
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
-# Namespaces page. This will remove the Namespaces entry from the Quick Index
-# and from the Folder Tree View (if specified). The default is YES.
-
-SHOW_NAMESPACES = YES
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from
-# the version control system). Doxygen will invoke the program by executing (via
-# popen()) the command <command> <input-file>, where <command> is the value of
-# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
-# provided by doxygen. Whatever the program writes to standard output
-# is used as the file version. See the manual for examples.
-
-FILE_VERSION_FILTER =
-
-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
-# by doxygen. The layout file controls the global structure of the generated
-# output files in an output format independent way. The create the layout file
-# that represents doxygen's defaults, run doxygen with the -l option.
-# You can optionally specify a file name after the option, if omitted
-# DoxygenLayout.xml will be used as the name of the layout file.
-
-LAYOUT_FILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated by doxygen. Possible values are YES and NO. If left blank
-# NO is used.
-
-WARNINGS = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED = YES
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some
-# parameters in a documented function, or documenting parameters that
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR = YES
-
-# This WARN_NO_PARAMDOC option can be abled to get warnings for
-# functions that are documented, but have no documentation for their parameters
-# or return value. If set to NO (the default) doxygen will only warn about
-# wrong or incomplete parameter documentation, but not about the absence of
-# documentation.
-
-WARN_NO_PARAMDOC = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that
-# doxygen can produce. The string should contain the $file, $line, and $text
-# tags, which will be replaced by the file and line number from which the
-# warning originated and the warning text. Optionally the format may contain
-# $version, which will be replaced by the version of the file (if it could
-# be obtained via FILE_VERSION_FILTER)
-
-WARN_FORMAT = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning
-# and error messages should be written. If left blank the output is written
-# to stderr.
-
-WARN_LOGFILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain
-# documented source files. You may enter file names like "myfile.cpp" or
-# directories like "/usr/src/myproject". Separate the files or directories
-# with spaces.
-
-INPUT = @CMAKE_CURRENT_SOURCE_DIR@
-
-# This tag can be used to specify the character encoding of the source files
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
-# also the default input encoding. Doxygen uses libiconv (or the iconv built
-# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
-# the list of possible encodings.
-
-INPUT_ENCODING = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank the following patterns are tested:
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
-# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
-
-FILE_PATTERNS = *.c \
- *.cc \
- *.cxx \
- *.cpp \
- *.c++ \
- *.d \
- *.java \
- *.ii \
- *.ixx \
- *.ipp \
- *.i++ \
- *.inl \
- *.h \
- *.hh \
- *.hxx \
- *.hpp \
- *.h++ \
- *.idl \
- *.odl \
- *.cs \
- *.php \
- *.php3 \
- *.inc \
- *.m \
- *.mm \
- *.dox \
- *.py \
- *.f90 \
- *.f \
- *.vhd \
- *.vhdl
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories
-# should be searched for input files as well. Possible values are YES and NO.
-# If left blank NO is used.
-
-RECURSIVE = YES
-
-# The EXCLUDE tag can be used to specify files and/or directories that should
-# excluded from the INPUT source files. This way you can easily exclude a
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-
-EXCLUDE =
-
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
-# directories that are symbolic links (a Unix filesystem feature) are excluded
-# from the input.
-
-EXCLUDE_SYMLINKS = NO
-
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories. Note that the wildcards are matched
-# against the file with absolute path, so to exclude all test directories
-# for example use the pattern */test/*
-
-EXCLUDE_PATTERNS =
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-# (namespaces, classes, functions, etc.) that should be excluded from the
-# output. The symbol name can be a fully qualified name, a word, or if the
-# wildcard * is used, a substring. Examples: ANamespace, AClass,
-# AClass::ANamespace, ANamespace::*Test
-
-EXCLUDE_SYMBOLS =
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or
-# directories that contain example code fragments that are included (see
-# the \include command).
-
-EXAMPLE_PATH =
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank all files are included.
-
-EXAMPLE_PATTERNS = *
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude
-# commands irrespective of the value of the RECURSIVE tag.
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or
-# directories that contain image that are included in the documentation (see
-# the \image command).
-
-IMAGE_PATH = ../../AudioManGUI
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command <filter> <input-file>, where <filter>
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
-# input file. Doxygen will then use the output that the filter program writes
-# to standard output. If FILTER_PATTERNS is specified, this tag will be
-# ignored.
-
-INPUT_FILTER =
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis. Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match. The filters are a list of the form:
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
-# is applied to all files.
-
-FILTER_PATTERNS =
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will be used to filter the input files when producing source
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will
-# be generated. Documented entities will be cross-referenced with these sources.
-# Note: To get rid of all source code in the generated output, make sure also
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER = YES
-
-# Setting the INLINE_SOURCES tag to YES will include the body
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
-# doxygen to hide any special comment blocks from generated source code
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES
-# then for each documented function all documented
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = NO
-
-# If the REFERENCES_RELATION tag is set to YES
-# then for each documented function all documented entities
-# called/used by that function will be listed.
-
-REFERENCES_RELATION = NO
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code. Otherwise they will link to the documentation.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code
-# will point to the HTML generated by the htags(1) tool instead of doxygen
-# built-in source browser. The htags tool is part of GNU's global source
-# tagging system (see http://www.gnu.org/software/global/global.html). You
-# will need version 4.8.6 or higher.
-
-USE_HTAGS = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
-# will generate a verbatim copy of the header file for each class for
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
-# of all compounds will be generated. Enable this if the project
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX = YES
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX = 5
-
-# In case all classes in a project start with a common prefix, all
-# classes will be put under the same header in the alphabetical index.
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX =
-dbus
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
-# generate HTML output.
-
-GENERATE_HTML = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT = html
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard header.
-
-HTML_HEADER =
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard footer.
-
-HTML_FOOTER =
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
-# style sheet that is used by each HTML page. It can be used to
-# fine-tune the look of the HTML output. If the tag is left blank doxygen
-# will generate a default style sheet. Note that doxygen will try to copy
-# the style sheet file to the HTML output directory, so don't put your own
-# stylesheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET =
-
-# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
-# Doxygen will adjust the colors in the stylesheet and background images
-# according to this color. Hue is specified as an angle on a colorwheel,
-# see http://en.wikipedia.org/wiki/Hue for more information.
-# For instance the value 0 represents red, 60 is yellow, 120 is green,
-# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
-# The allowed range is 0 to 359.
-
-HTML_COLORSTYLE_HUE = 220
-
-# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
-# the colors in the HTML output. For a value of 0 the output will use
-# grayscales only. A value of 255 will produce the most vivid colors.
-
-HTML_COLORSTYLE_SAT = 100
-
-# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
-# the luminance component of the colors in the HTML output. Values below
-# 100 gradually make the output lighter, whereas values above 100 make
-# the output darker. The value divided by 100 is the actual gamma applied,
-# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
-# and 100 does not change the gamma.
-
-HTML_COLORSTYLE_GAMMA = 80
-
-# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
-# page will contain the date and time when the page was generated. Setting
-# this to NO can help when comparing the output of multiple runs.
-
-HTML_TIMESTAMP = YES
-
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
-# files or namespaces will be aligned in HTML using tables. If set to
-# NO a bullet list will be used.
-
-HTML_ALIGN_MEMBERS = YES
-
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
-# documentation will contain sections that can be hidden and shown after the
-# page has loaded. For this to work a browser that supports
-# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
-# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
-
-HTML_DYNAMIC_SECTIONS = YES
-
-# If the GENERATE_DOCSET tag is set to YES, additional index files
-# will be generated that can be used as input for Apple's Xcode 3
-# integrated development environment, introduced with OSX 10.5 (Leopard).
-# To create a documentation set, doxygen will generate a Makefile in the
-# HTML output directory. Running make will produce the docset in that
-# directory and running "make install" will install the docset in
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
-# it at startup.
-# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
-# for more information.
-
-GENERATE_DOCSET = NO
-
-# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
-# feed. A documentation feed provides an umbrella under which multiple
-# documentation sets from a single provider (such as a company or product suite)
-# can be grouped.
-
-DOCSET_FEEDNAME = "Doxygen generated docs"
-
-# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
-# should uniquely identify the documentation set bundle. This should be a
-# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
-# will append .docset to the name.
-
-DOCSET_BUNDLE_ID = org.doxygen.Project
-
-# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
-# the documentation publisher. This should be a reverse domain-name style
-# string, e.g. com.mycompany.MyDocSet.documentation.
-
-DOCSET_PUBLISHER_ID = org.doxygen.Publisher
-
-# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
-
-DOCSET_PUBLISHER_NAME = Publisher
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-# will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
-# be used to specify the file name of the resulting .chm file. You
-# can add a path in front of the file if the result should not be
-# written to the html output directory.
-
-CHM_FILE =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
-# be used to specify the location (absolute path including file name) of
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
-# controls if a separate .chi index file is generated (YES) or that
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
-# is used to encode HtmlHelp index (hhk), content (hhc) and project file
-# content.
-
-CHM_INDEX_ENCODING =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
-# controls whether a binary table of contents is generated (YES) or a
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND = NO
-
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
-# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
-# that can be used as input for Qt's qhelpgenerator to generate a
-# Qt Compressed Help (.qch) of the generated HTML documentation.
-
-GENERATE_QHP = NO
-
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
-# be used to specify the file name of the resulting .qch file.
-# The path specified is relative to the HTML output folder.
-
-QCH_FILE =
-
-# The QHP_NAMESPACE tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#namespace
-
-QHP_NAMESPACE = org.doxygen.Project
-
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#virtual-folders
-
-QHP_VIRTUAL_FOLDER = doc
-
-# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
-# add. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#custom-filters
-
-QHP_CUST_FILTER_NAME =
-
-# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
-# custom filter to add. For more information please see
-# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
-# Qt Help Project / Custom Filters</a>.
-
-QHP_CUST_FILTER_ATTRS =
-
-# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
-# project's
-# filter section matches.
-# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
-# Qt Help Project / Filter Attributes</a>.
-
-QHP_SECT_FILTER_ATTRS =
-
-# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
-# be used to specify the location of Qt's qhelpgenerator.
-# If non-empty doxygen will try to run qhelpgenerator on the generated
-# .qhp file.
-
-QHG_LOCATION =
-
-# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
-# will be generated, which together with the HTML files, form an Eclipse help
-# plugin. To install this plugin and make it available under the help contents
-# menu in Eclipse, the contents of the directory containing the HTML and XML
-# files needs to be copied into the plugins directory of eclipse. The name of
-# the directory within the plugins directory should be the same as
-# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
-# the help appears.
-
-GENERATE_ECLIPSEHELP = YES
-
-# A unique identifier for the eclipse help plugin. When installing the plugin
-# the directory name containing the HTML and XML files should also have
-# this name.
-
-ECLIPSE_DOC_ID = org.doxygen.Project
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
-# top of each HTML page. The value NO (the default) enables the index and
-# the value YES disables it.
-
-DISABLE_INDEX = NO
-
-# This tag can be used to set the number of enum values (range [1..20])
-# that doxygen will group on one line in the generated HTML documentation.
-
-ENUM_VALUES_PER_LINE = 4
-
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information.
-# If the tag value is set to YES, a side panel will be generated
-# containing a tree-like index structure (just like the one that
-# is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
-# Windows users are probably better off using the HTML help feature.
-
-GENERATE_TREEVIEW = YES
-
-# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
-# and Class Hierarchy pages using a tree view instead of an ordered list.
-
-USE_INLINE_TREES = YES
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
-# used to set the initial width (in pixels) of the frame in which the tree
-# is shown.
-
-TREEVIEW_WIDTH = 250
-
-# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
-# links to external symbols imported via tag files in a separate window.
-
-EXT_LINKS_IN_WINDOW = NO
-
-# Use this tag to change the font size of Latex formulas included
-# as images in the HTML documentation. The default is 10. Note that
-# when you change the font size after a successful doxygen run you need
-# to manually remove any form_*.png images from the HTML output directory
-# to force them to be regenerated.
-
-FORMULA_FONTSIZE = 10
-
-# Use the FORMULA_TRANPARENT tag to determine whether or not the images
-# generated for formulas are transparent PNGs. Transparent PNGs are
-# not supported properly for IE 6.0, but are supported on all modern browsers.
-# Note that when changing this option you need to delete any form_*.png files
-# in the HTML output before the changes have effect.
-
-FORMULA_TRANSPARENT = YES
-
-# When the SEARCHENGINE tag is enabled doxygen will generate a search box
-# for the HTML output. The underlying search engine uses javascript
-# and DHTML and should work on any modern browser. Note that when using
-# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
-# (GENERATE_DOCSET) there is already a search function so this one should
-# typically be disabled. For large projects the javascript based search engine
-# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
-
-SEARCHENGINE = YES
-
-# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
-# implemented using a PHP enabled web server instead of at the web client
-# using Javascript. Doxygen will generate the search PHP script and index
-# file to put on the web server. The advantage of the server
-# based approach is that it scales better to large projects and allows
-# full text search. The disadvances is that it is more difficult to setup
-# and does not have live searching capabilities.
-
-SERVER_BASED_SEARCH = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
-# generate Latex output.
-
-GENERATE_LATEX = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked. If left blank `latex' will be used as the default command name.
-# Note that when enabling USE_PDFLATEX this option is only used for
-# generating bitmaps for formulas in the HTML output, but not in the
-# Makefile that is written to the output directory.
-
-LATEX_CMD_NAME = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
-# generate index for LaTeX. If left blank `makeindex' will be used as the
-# default command name.
-
-MAKEINDEX_CMD_NAME = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
-# LaTeX documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_LATEX = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used
-# by the printer. Possible values are: a4, a4wide, letter, legal and
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE = a4wide
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES =
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
-# the generated latex document. The header should contain everything until
-# the first chapter. If it is left blank doxygen will generate a
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER =
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will
-# contain links (just like the HTML output) instead of page references
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS = YES
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
-# plain latex in the generated Makefile. Set this option to YES to get a
-# higher quality PDF documentation.
-
-USE_PDFLATEX = YES
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
-# command to the generated LaTeX files. This will instruct LaTeX to keep
-# running if errors occur, instead of asking the user for help.
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not
-# include the index chapters (such as File Index, Compound Index, etc.)
-# in the output.
-
-LATEX_HIDE_INDICES = NO
-
-# If LATEX_SOURCE_CODE is set to YES then doxygen will include
-# source code with syntax highlighting in the LaTeX output.
-# Note that which sources are shown also depends on other settings
-# such as SOURCE_BROWSER.
-
-LATEX_SOURCE_CODE = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
-# The RTF output is optimized for Word 97 and may not look very pretty with
-# other RTF readers or editors.
-
-GENERATE_RTF = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
-# RTF documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_RTF = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
-# will contain hyperlink fields. The RTF file will
-# contain links (just like the HTML output) instead of page references.
-# This makes the output suitable for online browsing using WORD or other
-# programs which support those fields.
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's
-# config file, i.e. a series of assignments. You only have to provide
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE =
-
-# Set optional variables used in the generation of an rtf document.
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
-# generate man pages
-
-GENERATE_MAN = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT = man
-
-# The MAN_EXTENSION tag determines the extension that is added to
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
-# then it will generate one additional man file for each entity
-# documented in the real man page(s). These additional files
-# only source the real man page, but without them the man command
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will
-# generate an XML file that captures the structure of
-# the code including all documentation.
-
-GENERATE_XML = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_SCHEMA =
-
-# The XML_DTD tag can be used to specify an XML DTD,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_DTD =
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
-# dump the program listings (including syntax highlighting
-# and cross-referencing information) to the XML output. Note that
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
-# generate an AutoGen Definitions (see autogen.sf.net) file
-# that captures the structure of the code including all
-# documentation. Note that this feature is still experimental
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will
-# generate a Perl module file that captures the structure of
-# the code including all documentation. Note that this
-# feature is still experimental and incomplete at the
-# moment.
-
-GENERATE_PERLMOD = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
-# nicely formatted so it can be parsed by a human reader. This is useful
-# if you want to understand what is going on. On the other hand, if this
-# tag is set to NO the size of the Perl module output will be much smaller
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY = YES
-
-# The names of the make variables in the generated doxyrules.make file
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
-# This is useful so different doxyrules.make files included by the same
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
-# evaluate all C-preprocessor directives found in the sources and include
-# files.
-
-ENABLE_PREPROCESSING = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
-# names in the source code. If set to NO (the default) only conditional
-# compilation will be performed. Macro expansion can be done in a controlled
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
-# then the macro expansion is limited to the macros specified with the
-# PREDEFINED and EXPAND_AS_DEFINED tags.
-
-EXPAND_ONLY_PREDEF = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
-# in the INCLUDE_PATH (see below) will be search if a #include is found.
-
-SEARCH_INCLUDES = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by
-# the preprocessor.
-
-INCLUDE_PATH =
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will
-# be used.
-
-INCLUDE_FILE_PATTERNS =
-
-# The PREDEFINED tag can be used to specify one or more macro names that
-# are defined before the preprocessor is started (similar to the -D option of
-# gcc). The argument of the tag is a list of macros of the form: name
-# or name=definition (no spaces). If the definition and the = are
-# omitted =1 is assumed. To prevent a macro definition from being
-# undefined via #undef or recursively expanded use the := operator
-# instead of the = operator.
-
-PREDEFINED =
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
-# this tag can be used to specify a list of macro names that should be expanded.
-# The macro definition that is found in the sources will be used.
-# Use the PREDEFINED tag if you want to use a different macro definition.
-
-EXPAND_AS_DEFINED =
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-# doxygen's preprocessor will remove all function-like macros that are alone
-# on a line, have an all uppercase name, and do not end with a semicolon. Such
-# function macros are typically used for boiler-plate code, and will confuse
-# the parser if not removed.
-
-SKIP_FUNCTION_MACROS = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles.
-# Optionally an initial location of the external documentation
-# can be added for each tagfile. The format of a tag file without
-# this location is as follows:
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where "loc1" and "loc2" can be relative or absolute paths or
-# URLs. If a location is present for each tag, the installdox tool
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen
-# is run, you must also specify the path to the tagfile here.
-
-TAGFILES =
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE =
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed
-# in the class index. If set to NO only the inherited external classes
-# will be listed.
-
-ALLEXTERNALS = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will
-# be listed.
-
-EXTERNAL_GROUPS = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
-# or super classes. Setting the tag to NO turns the diagrams off. Note that
-# this option is superseded by the HAVE_DOT option below. This is only a
-# fallback. It is recommended to install and use dot, since it yields more
-# powerful graphs.
-
-CLASS_DIAGRAMS = NO
-
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see
-# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-MSCGEN_PATH =
-
-# If set to YES, the inheritance and collaboration graphs will hide
-# inheritance and usage relations if the target is undocumented
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz, a graph visualization
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT = YES
-
-# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
-# allowed to run in parallel. When set to 0 (the default) doxygen will
-# base this on the number of processors available in the system. You can set it
-# explicitly to a value larger than 0 to get control over the balance
-# between CPU load and processing speed.
-
-DOT_NUM_THREADS = 0
-
-# By default doxygen will write a font called FreeSans.ttf to the output
-# directory and reference it in all dot files that doxygen generates. This
-# font does not include all possible unicode characters however, so when you need
-# these (or just want a differently looking font) you can specify the font name
-# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
-# which can be done by putting it in a standard location or by setting the
-# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
-# containing the font.
-
-DOT_FONTNAME = FreeSans.ttf
-
-# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
-# The default size is 10pt.
-
-DOT_FONTSIZE = 10
-
-# By default doxygen will tell dot to use the output directory to look for the
-# FreeSans.ttf font (which doxygen will put there itself). If you specify a
-# different font using DOT_FONTNAME you can set the path where dot
-# can find it using this tag.
-
-DOT_FONTPATH =
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect inheritance relations. Setting this tag to YES will force the
-# the CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect implementation dependencies (inheritance, containment, and
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH = YES
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for groups, showing the direct groups dependencies
-
-GROUP_GRAPHS = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
-# Language.
-
-UML_LOOK = NO
-
-# If set to YES, the inheritance and collaboration graphs will show the
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS = NO
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
-# tags are set to YES then doxygen will generate a graph for each documented
-# file showing the direct and indirect include dependencies of the file with
-# other documented files.
-
-INCLUDE_GRAPH = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
-# documented header file showing the documented files that directly or
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH = YES
-
-# If the CALL_GRAPH and HAVE_DOT options are set to YES then
-# doxygen will generate a call dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable call graphs
-# for selected functions only using the \callgraph command.
-
-CALL_GRAPH = YES
-
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
-# doxygen will generate a caller dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable caller
-# graphs for selected functions only using the \callergraph command.
-
-CALLER_GRAPH = YES
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
-# will graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY = YES
-
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
-# then doxygen will show the dependencies a directory has on other directories
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
-
-DIRECTORY_GRAPH = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot. Possible values are png, jpg, or gif
-# If left blank png will be used.
-
-DOT_IMAGE_FORMAT = png
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be
-# found. If left blank, it is assumed the dot tool can be found in the path.
-
-DOT_PATH =
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the
-# \dotfile command).
-
-DOTFILE_DIRS =
-
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
-# nodes that will be shown in the graph. If the number of nodes in a graph
-# becomes larger than this value, doxygen will truncate the graph, which is
-# visualized by representing a node as a red box. Note that doxygen if the
-# number of direct children of the root node in a graph is already larger than
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
-# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-
-DOT_GRAPH_MAX_NODES = 50
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
-# graphs generated by dot. A depth value of 3 means that only nodes reachable
-# from the root by following a path via at most 3 edges will be shown. Nodes
-# that lay further from the root node will be omitted. Note that setting this
-# option to 1 or 2 may greatly reduce the computation time needed for large
-# code bases. Also note that the size of a graph can be further restricted by
-# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
-
-MAX_DOT_GRAPH_DEPTH = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, because dot on Windows does not
-# seem to support this out of the box. Warning: Depending on the platform used,
-# enabling this option may lead to badly anti-aliased labels on the edges of
-# a graph (i.e. they become hard to read).
-
-DOT_TRANSPARENT = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10)
-# support this, this feature is disabled by default.
-
-DOT_MULTI_TARGETS = NO
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
-# generate a legend page explaining the meaning of the various boxes and
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
-# remove the intermediate dot files that are used to generate
-# the various graphs.
-
-DOT_CLEANUP = YES
--- /dev/null
+/*
+ * RoutingSender.cpp
+ *
+ * Created on: Oct 25, 2011
+ * Author: christian
+ */
+
+#include "RoutingSender.h"
+
+
+extern "C" RoutingSendInterface* PluginRoutingInterfaceDbusFactory() {
+ return new DbusRoutingSender();
+}
+
+extern "C" void destroyRoutingPluginInterfaceDbus(RoutingSendInterface* routingSendInterface) {
+ delete routingSendInterface;
+}
+
+DbusRoutingSender::DbusRoutingSender()
+{
+}
+
+
+
+DbusRoutingSender::~DbusRoutingSender()
+{
+}
+
+
+
+void DbusRoutingSender::startupRoutingInterface(RoutingReceiveInterface *routingreceiveinterface)
+{
+}
+
+
+
+void DbusRoutingSender::routingInterfacesReady()
+{
+}
+
+
+
+void DbusRoutingSender::routingInterfacesRundown()
+{
+}
+
+
+
+am_Error_e DbusRoutingSender::asyncAbort(const am_Handle_s handle)
+{
+}
+
+
+
+am_Error_e DbusRoutingSender::asyncConnect(const am_Handle_s handle, const am_connectionID_t connectionID, const am_sourceID_t sourceID, const am_sinkID_t sinkID, const am_ConnectionFormat_e connectionFormat)
+{
+}
+
+
+
+am_Error_e DbusRoutingSender::asyncDisconnect(const am_Handle_s handle, const am_connectionID_t connectionID)
+{
+}
+
+
+
+am_Error_e DbusRoutingSender::asyncSetSinkVolume(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume, const am_RampType_e ramp, const am_time_t time)
+{
+}
+
+
+
+am_Error_e DbusRoutingSender::asyncSetSourceVolume(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume, const am_RampType_e ramp, const am_time_t time)
+{
+}
+
+
+
+am_Error_e DbusRoutingSender::asyncSetSourceState(const am_Handle_s handle, const am_sourceID_t sourceID, const am_SourceState_e state)
+{
+}
+
+
+
+am_Error_e DbusRoutingSender::asyncSetSinkSoundProperty(const am_Handle_s handle, const am_SoundProperty_s& soundProperty, const am_sinkID_t sinkID)
+{
+}
+
+
+am_Error_e DbusRoutingSender::asyncCrossFade(const am_Handle_s handle, const am_crossfaderID_t crossfaderID, const am_HotSink_e hotSink, const am_RampType_e rampType, const am_time_t time)
+{
+}
+
+
+
+am_Error_e DbusRoutingSender::setDomainState(const am_domainID_t domainID, const am_DomainState_e domainState)
+{
+}
+
+
+
+am_Error_e DbusRoutingSender::asyncSetSourceSoundProperty(const am_Handle_s handle, const am_SoundProperty_s & soundProperty, const am_sourceID_t sourceID)
+{
+}
+
+am_Error_e DbusRoutingSender::returnBusName(std::string & BusName) const
+{
+}
+
+
+
+
+
+
--- /dev/null
+/*
+ * RoutingSender.h
+ *
+ * Created on: Oct 25, 2011
+ * Author: christian
+ */
+
+#ifndef ROUTINGSENDER_H_
+#define ROUTINGSENDER_H_
+
+#include <routing/RoutingSendInterface.h>
+
+using namespace am;
+
+class DbusRoutingSender: public RoutingSendInterface {
+public:
+ DbusRoutingSender();
+ virtual ~DbusRoutingSender();
+ void startupRoutingInterface(RoutingReceiveInterface* routingreceiveinterface) ;
+ void routingInterfacesReady() ;
+ void routingInterfacesRundown() ;
+ am_Error_e asyncAbort(const am_Handle_s handle) ;
+ am_Error_e asyncConnect(const am_Handle_s handle, const am_connectionID_t connectionID, const am_sourceID_t sourceID, const am_sinkID_t sinkID, const am_ConnectionFormat_e connectionFormat) ;
+ am_Error_e asyncDisconnect(const am_Handle_s handle, const am_connectionID_t connectionID) ;
+ am_Error_e asyncSetSinkVolume(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume, const am_RampType_e ramp, const am_time_t time) ;
+ am_Error_e asyncSetSourceVolume(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume, const am_RampType_e ramp, const am_time_t time) ;
+ am_Error_e asyncSetSourceState(const am_Handle_s handle, const am_sourceID_t sourceID, const am_SourceState_e state) ;
+ am_Error_e asyncSetSinkSoundProperty(const am_Handle_s handle, const am_SoundProperty_s& soundProperty, const am_sinkID_t sinkID) ;
+ am_Error_e asyncSetSourceSoundProperty(const am_Handle_s handle, const am_SoundProperty_s& soundProperty, const am_sourceID_t sourceID) ;
+ am_Error_e asyncCrossFade(const am_Handle_s handle, const am_crossfaderID_t crossfaderID, const am_HotSink_e hotSink, const am_RampType_e rampType, const am_time_t time) ;
+ am_Error_e setDomainState(const am_domainID_t domainID, const am_DomainState_e domainState) ;
+ am_Error_e returnBusName(std::string& BusName) const ;
+};
+
+#endif /* ROUTINGSENDER_H_ */
+++ /dev/null
-/*
- * headers.h
- *
- * Created on: Jul 21, 2011
- * Author: christian
- */
-
-#ifndef HEADERS_H_
-#define HEADERS_H_
-
-#include <dbus/dbus.h>
-#include <dlt/dlt.h>
-#include "routinginterface.h"
-#include "dbusRoothandler.h"
-#include "AudiomanagerInterface.h"
-#include "DbusSend.h"
-#include "DBUSMessageHandler.h"
-#include "DbusInterface.h"
-
-#define BUS_NAME "DBUS"
-#define DBUS_BUSNAME "org.genivi.command"
-#define DBUS_PATH "/pulse"
-
-
-const char MY_NODE[]="routinginterface\0";
-
-DLT_IMPORT_CONTEXT(DBusPlugin);
-
-#endif /* HEADERS_H_ */
+++ /dev/null
-/**
- * \mainpage
- * \image html "Bild1.png"
- * Copyright Copyright (C) 2011, BMW AG
- *
- * \date 22.06.2011
- * \author Christian Müller (christian.ei.mueller@bmw.de)
- *
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
- *
- * \section About About PluginInterfaceDBus
- * This plugin for the Genivi AudioManager serves as interface for DBus.
- *
- * \section Info More information
- * can be found at <https://collab.genivi.org/wiki/display/genivi/GENIVI+Home>
- *
- * \todo enhance Interface
- */
-
-#ifndef MAINPAGE_H_
-#define MAINPAGE_H_
-
-
-#endif /* MAINPAGE_H_ */
+++ /dev/null
-cmake_minimum_required(VERSION 2.6)
-
-PROJECT(PluginRoutingInterfaceJack)
-
-set(CMAKE_CXX_FLAGS "-g -pipe -fPIC -Wall -W -D_REENTRANT")
-
-set(STD_INCLUDE_DIRS "/usr/include")
-set(EXECUTABLE_OUTPUT_PATH ../../bin/)
-set(LIBRARY_OUTPUT_PATH ../plugins)
-set(DOC_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/../doc/JackPlugin)
-set(DOCUMENT $ENV{gendoc})
-
-cmake_policy(SET CMP0015 NEW)
-
-file(MAKE_DIRECTORY ${DOC_OUTPUT_PATH})
-
-FIND_PACKAGE(Qt4 REQUIRED)
-FIND_PACKAGE(PkgConfig)
-pkg_check_modules(GLIB REQUIRED glib-2.0)
-pkg_check_modules(JACK REQUIRED jack)
-
-INCLUDE_DIRECTORIES(
- include
- ${CMAKE_SOURCE_DIR}
- ${STD_INCLUDE_DIRS}
- ${GLIB_INCLUDE_DIRS}
- ${JACK_INCLUDE_DIRS}
- ../AudioManagerDaemon
-)
-
-LINK_DIRECTORIES(
- ${LINK_DIRECTORIES}
- ${GLIB_LIBRARY_DIRS}
- ${JACK_LIBRARY_DIRS}
-)
-
-# add Qt modules here, the include will setup QT_LIBRARIES
-
-# defines for QL Plugins
-ADD_DEFINITIONS(${QT_DEFINITIONS})
-ADD_DEFINITIONS(-DQT_STATICPLUGIN)
-ADD_DEFINITIONS(-DQT_PLUGIN)
-ADD_DEFINITIONS(-DQT_SHARED)
-
-
-
-INCLUDE(${QT_USE_FILE})
-
-# all source files go here
-SET(PLUGINJACK_SRCS_CXX
- RoutingSend.cpp
- JackAudioController.cpp
-)
-
-# every header that contains QT stuff like Q_OBJECT .... and must be mocced
-SET(PLUGINJACK_MOC_SRCS
- RoutingSend.h
-)
-
-#now take the headers, moc them and append the resulting moc files to the sources
-QT4_WRAP_CPP(PLUGINJACK_SRCS_CXX ${PLUGINJACK_MOC_SRCS})
-
-add_library(RoutingJackPlugin ${PLUGINJACK_SRCS_CXX})
-
-TARGET_LINK_LIBRARIES(RoutingJackPlugin
- ${QT_LIBRARIES}
- ${JACK_LIBRARIES}
-)
-
-#add a target to generate API documentation with Doxygen
-find_package(Doxygen)
-if(DOXYGEN_FOUND)
-if(DOCUMENT)
- configure_file(Doxyfile.in ${PROJECT_BINARY_DIR}/Doxyfile @ONLY IMMEDIATE)
- add_custom_target (Docs ALL
- COMMAND ${DOXYGEN_EXECUTABLE} ${PROJECT_BINARY_DIR}/Doxyfile WORKING_DIRECTORY ${DOC_OUTPUT_PATH}
- SOURCES ${PROJECT_BINARY_DIR}/Doxyfile)
-endif(DOCUMENT)
-endif(DOXYGEN_FOUND)
-
-
-
+++ /dev/null
-# Doxyfile 1.7.1
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
-#
-# All text after a hash (#) is considered a comment and will be ignored
-# The format is:
-# TAG = value [value, ...]
-# For lists items can also be appended using:
-# TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all
-# text before the first occurrence of this tag. Doxygen uses libiconv (or the
-# iconv built into libc) for the transcoding. See
-# http://www.gnu.org/software/libiconv for the list of possible encodings.
-
-DOXYFILE_ENCODING = UTF-8
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
-# by quotes) that should identify the project.
-
-PROJECT_NAME = JackPlugin
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number.
-# This could be handy for archiving the generated documentation or
-# if some version control system is used.
-
-PROJECT_NUMBER = 0.1
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
-# base path where the generated documentation will be put.
-# If a relative path is entered, it will be relative to the location
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY =
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
-# 4096 sub-directories (in 2 levels) under the output directory of each output
-# format and will distribute the generated files over these directories.
-# Enabling this option can be useful when feeding doxygen a huge amount of
-# source files, where putting all generated files in the same directory would
-# otherwise cause performance problems for the file system.
-
-CREATE_SUBDIRS = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# The default language is English, other supported languages are:
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
-# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
-# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
-# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
-# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
-# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
-
-OUTPUT_LANGUAGE = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
-# include brief member descriptions after the members that are listed in
-# the file and class documentation (similar to JavaDoc).
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
-# the brief description of a member or function before the detailed description.
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator
-# that is used to form the text in various listings. Each string
-# in this list, if found as the leading text of the brief description, will be
-# stripped from the text and the result after processing the whole list, is
-# used as the annotated text. Otherwise, the brief description is used as-is.
-# If left blank, the following values are used ("$name" is automatically
-# replaced with the name of the entity): "The $name class" "The $name widget"
-# "The $name file" "is" "provides" "specifies" "contains"
-# "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF = "The $name class" \
- "The $name widget" \
- "The $name file" \
- is \
- provides \
- specifies \
- contains \
- represents \
- a \
- an \
- the
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# Doxygen will generate a detailed section even if there is only a brief
-# description.
-
-ALWAYS_DETAILED_SEC = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
-# operators of the base classes will not be shown.
-
-INLINE_INHERITED_MEMB = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
-# path before files name in the file list and in the header files. If set
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
-# can be used to strip a user-defined part of the path. Stripping is
-# only done if one of the specified strings matches the left-hand part of
-# the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the
-# path to strip.
-
-STRIP_FROM_PATH =
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
-# the path mentioned in the documentation of a class, which tells
-# the reader which header file to include in order to use a class.
-# If left blank only the name of the header file containing the class
-# definition is used. Otherwise one should specify the include paths that
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH =
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-# (but less readable) file names. This can be useful is your file systems
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
-# will interpret the first line (until the first dot) of a JavaDoc-style
-# comment as the brief description. If set to NO, the JavaDoc
-# comments will behave just like regular Qt-style comments
-# (thus requiring an explicit @brief command for a brief description.)
-
-JAVADOC_AUTOBRIEF = YES
-
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
-# interpret the first line (until the first dot) of a Qt-style
-# comment as the brief description. If set to NO, the comments
-# will behave just like regular Qt-style comments (thus requiring
-# an explicit \brief command for a brief description.)
-
-QT_AUTOBRIEF = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
-# treat a multi-line C++ special comment block (i.e. a block of //! or ///
-# comments) as a brief description. This used to be the default behaviour.
-# The new default is to treat a multi-line C++ comment block as a detailed
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it
-# re-implements.
-
-INHERIT_DOCS = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
-# a new page for each member. If set to NO, the documentation of a member will
-# be part of the file/class/namespace that contains it.
-
-SEPARATE_MEMBER_PAGES = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab.
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE = 8
-
-# This tag can be used to specify a number of aliases that acts
-# as commands in the documentation. An alias has the form "name=value".
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to
-# put the command \sideeffect (or @sideeffect) in the documentation, which
-# will result in a user-defined paragraph with heading "Side Effects:".
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
-# sources only. Doxygen will then generate output that is more tailored for C.
-# For instance, some of the names that are used will be different. The list
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C = NO
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
-# sources only. Doxygen will then generate output that is more tailored for
-# Java. For instance, namespaces will be presented as packages, qualified
-# scopes will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA = NO
-
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-# sources only. Doxygen will then generate output that is more tailored for
-# Fortran.
-
-OPTIMIZE_FOR_FORTRAN = NO
-
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-# sources. Doxygen will then generate output that is tailored for
-# VHDL.
-
-OPTIMIZE_OUTPUT_VHDL = NO
-
-# Doxygen selects the parser to use depending on the extension of the files it
-# parses. With this tag you can assign which parser to use for a given extension.
-# Doxygen has a built-in mapping, but you can override or extend it using this
-# tag. The format is ext=language, where ext is a file extension, and language
-# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
-# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
-# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
-# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
-# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
-
-EXTENSION_MAPPING =
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
-# to include (a tag file for) the STL sources as input, then you should
-# set this tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
-# func(std::string) {}). This also make the inheritance and collaboration
-# diagrams that involve STL classes more complete and accurate.
-
-BUILTIN_STL_SUPPORT = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-
-CPP_CLI_SUPPORT = NO
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
-# Doxygen will parse them like normal C++ but will assume all classes use public
-# instead of private inheritance when no explicit protection keyword is present.
-
-SIP_SUPPORT = NO
-
-# For Microsoft's IDL there are propget and propput attributes to indicate getter
-# and setter methods for a property. Setting this option to YES (the default)
-# will make doxygen to replace the get and set methods by a property in the
-# documentation. This will only work if the methods are indeed getting or
-# setting a simple type. If this is not the case, or you want to show the
-# methods anyway, you should set this option to NO.
-
-IDL_PROPERTY_SUPPORT = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
-# the same type (for instance a group of public functions) to be put as a
-# subgroup of that type (e.g. under the Public Functions section). Set it to
-# NO to prevent subgrouping. Alternatively, this can be done per class using
-# the \nosubgrouping command.
-
-SUBGROUPING = YES
-
-# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
-# is documented as struct, union, or enum with the name of the typedef. So
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
-# with name TypeT. When disabled the typedef will appear as a member of a file,
-# namespace, or class. And the struct will be named TypeS. This can typically
-# be useful for C code in case the coding convention dictates that all compound
-# types are typedef'ed and only the typedef is referenced, never the tag name.
-
-TYPEDEF_HIDES_STRUCT = YES
-
-# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
-# determine which symbols to keep in memory and which to flush to disk.
-# When the cache is full, less often used symbols will be written to disk.
-# For small to medium size projects (<1000 input files) the default value is
-# probably good enough. For larger projects a too small cache size can cause
-# doxygen to be busy swapping symbols to and from disk most of the time
-# causing a significant performance penality.
-# If the system has enough physical memory increasing the cache will improve the
-# performance by keeping more symbols in memory. Note that the value works on
-# a logarithmic scale so increasing the size by one will rougly double the
-# memory usage. The cache size is given by this formula:
-# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols
-
-SYMBOL_CACHE_SIZE = 0
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available.
-# Private class members and static file members will be hidden unless
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL = YES
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
-# will be included in the documentation.
-
-EXTRACT_PRIVATE = YES
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file
-# will be included in the documentation.
-
-EXTRACT_STATIC = YES
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
-# defined locally in source files will be included in the documentation.
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES = YES
-
-# This flag is only useful for Objective-C code. When set to YES local
-# methods, which are defined in the implementation section but not in
-# the interface are included in the documentation.
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS = YES
-
-# If this flag is set to YES, the members of anonymous namespaces will be
-# extracted and appear in the documentation as a namespace called
-# 'anonymous_namespace{file}', where file will be replaced with the base
-# name of the file that contains the anonymous namespace. By default
-# anonymous namespace are hidden.
-
-EXTRACT_ANON_NSPACES = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
-# undocumented members of documented classes, files or namespaces.
-# If set to NO (the default) these members will be included in the
-# various overviews, but no documentation section is generated.
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS = NO
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy.
-# If set to NO (the default) these classes will be included in the various
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES = NO
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
-# friend (class|struct|union) declarations.
-# If set to NO (the default) these declarations will be included in the
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
-# documentation blocks found inside the body of a function.
-# If set to NO (the default) these blocks will be appended to the
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS = NO
-
-# The INTERNAL_DOCS tag determines if documentation
-# that is typed after a \internal command is included. If the tag is set
-# to NO (the default) then the documentation will be excluded.
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
-# file names in lower-case letters. If set to YES upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES = NO
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
-# will show members with their full class and namespace scopes in the
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
-# will put a list of the files that are included by a file in the documentation
-# of that file.
-
-SHOW_INCLUDE_FILES = YES
-
-# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
-# will list include files with double quotes in the documentation
-# rather than with sharp brackets.
-
-FORCE_LOCAL_INCLUDES = NO
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
-# is inserted in the documentation for inline members.
-
-INLINE_INFO = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
-# will sort the (detailed) documentation of file and class members
-# alphabetically by member name. If set to NO the members will appear in
-# declaration order.
-
-SORT_MEMBER_DOCS = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
-# brief documentation of file, namespace and class members alphabetically
-# by member name. If set to NO (the default) the members will appear in
-# declaration order.
-
-SORT_BRIEF_DOCS = YES
-
-# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
-# will sort the (brief and detailed) documentation of class members so that
-# constructors and destructors are listed first. If set to NO (the default)
-# the constructors will appear in the respective orders defined by
-# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
-# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
-# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
-
-SORT_MEMBERS_CTORS_1ST = NO
-
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
-# hierarchy of group names into alphabetical order. If set to NO (the default)
-# the group names will appear in their defined order.
-
-SORT_GROUP_NAMES = YES
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
-# sorted by fully-qualified names, including namespaces. If set to
-# NO (the default), the class list will be sorted only by class name,
-# not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or
-# disable (NO) the todo list. This list is created by putting \todo
-# commands in the documentation.
-
-GENERATE_TODOLIST = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or
-# disable (NO) the test list. This list is created by putting \test
-# commands in the documentation.
-
-GENERATE_TESTLIST = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or
-# disable (NO) the bug list. This list is created by putting \bug
-# commands in the documentation.
-
-GENERATE_BUGLIST = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
-# disable (NO) the deprecated list. This list is created by putting
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS =
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-# the initial value of a variable or define consists of for it to appear in
-# the documentation. If the initializer consists of more lines than specified
-# here it will be hidden. Use a value of 0 to hide initializers completely.
-# The appearance of the initializer of individual variables and defines in the
-# documentation can be controlled using \showinitializer or \hideinitializer
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
-# at the bottom of the documentation of classes and structs. If set to YES the
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES = YES
-
-# If the sources in your project are distributed over multiple directories
-# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
-# in the documentation. The default is NO.
-
-SHOW_DIRECTORIES = NO
-
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
-# This will remove the Files entry from the Quick Index and from the
-# Folder Tree View (if specified). The default is YES.
-
-SHOW_FILES = YES
-
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
-# Namespaces page. This will remove the Namespaces entry from the Quick Index
-# and from the Folder Tree View (if specified). The default is YES.
-
-SHOW_NAMESPACES = YES
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from
-# the version control system). Doxygen will invoke the program by executing (via
-# popen()) the command <command> <input-file>, where <command> is the value of
-# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
-# provided by doxygen. Whatever the program writes to standard output
-# is used as the file version. See the manual for examples.
-
-FILE_VERSION_FILTER =
-
-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
-# by doxygen. The layout file controls the global structure of the generated
-# output files in an output format independent way. The create the layout file
-# that represents doxygen's defaults, run doxygen with the -l option.
-# You can optionally specify a file name after the option, if omitted
-# DoxygenLayout.xml will be used as the name of the layout file.
-
-LAYOUT_FILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated by doxygen. Possible values are YES and NO. If left blank
-# NO is used.
-
-WARNINGS = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED = YES
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some
-# parameters in a documented function, or documenting parameters that
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR = YES
-
-# This WARN_NO_PARAMDOC option can be abled to get warnings for
-# functions that are documented, but have no documentation for their parameters
-# or return value. If set to NO (the default) doxygen will only warn about
-# wrong or incomplete parameter documentation, but not about the absence of
-# documentation.
-
-WARN_NO_PARAMDOC = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that
-# doxygen can produce. The string should contain the $file, $line, and $text
-# tags, which will be replaced by the file and line number from which the
-# warning originated and the warning text. Optionally the format may contain
-# $version, which will be replaced by the version of the file (if it could
-# be obtained via FILE_VERSION_FILTER)
-
-WARN_FORMAT = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning
-# and error messages should be written. If left blank the output is written
-# to stderr.
-
-WARN_LOGFILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain
-# documented source files. You may enter file names like "myfile.cpp" or
-# directories like "/usr/src/myproject". Separate the files or directories
-# with spaces.
-
-INPUT = @CMAKE_CURRENT_SOURCE_DIR@
-
-# This tag can be used to specify the character encoding of the source files
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
-# also the default input encoding. Doxygen uses libiconv (or the iconv built
-# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
-# the list of possible encodings.
-
-INPUT_ENCODING = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank the following patterns are tested:
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
-# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
-
-FILE_PATTERNS = *.c \
- *.cc \
- *.cxx \
- *.cpp \
- *.c++ \
- *.d \
- *.java \
- *.ii \
- *.ixx \
- *.ipp \
- *.i++ \
- *.inl \
- *.h \
- *.hh \
- *.hxx \
- *.hpp \
- *.h++ \
- *.idl \
- *.odl \
- *.cs \
- *.php \
- *.php3 \
- *.inc \
- *.m \
- *.mm \
- *.dox \
- *.py \
- *.f90 \
- *.f \
- *.vhd \
- *.vhdl
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories
-# should be searched for input files as well. Possible values are YES and NO.
-# If left blank NO is used.
-
-RECURSIVE = YES
-
-# The EXCLUDE tag can be used to specify files and/or directories that should
-# excluded from the INPUT source files. This way you can easily exclude a
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-
-EXCLUDE =
-
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
-# directories that are symbolic links (a Unix filesystem feature) are excluded
-# from the input.
-
-EXCLUDE_SYMLINKS = NO
-
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories. Note that the wildcards are matched
-# against the file with absolute path, so to exclude all test directories
-# for example use the pattern */test/*
-
-EXCLUDE_PATTERNS =
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-# (namespaces, classes, functions, etc.) that should be excluded from the
-# output. The symbol name can be a fully qualified name, a word, or if the
-# wildcard * is used, a substring. Examples: ANamespace, AClass,
-# AClass::ANamespace, ANamespace::*Test
-
-EXCLUDE_SYMBOLS =
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or
-# directories that contain example code fragments that are included (see
-# the \include command).
-
-EXAMPLE_PATH =
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank all files are included.
-
-EXAMPLE_PATTERNS = *
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude
-# commands irrespective of the value of the RECURSIVE tag.
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or
-# directories that contain image that are included in the documentation (see
-# the \image command).
-
-IMAGE_PATH = ../../AudioManGUI
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command <filter> <input-file>, where <filter>
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
-# input file. Doxygen will then use the output that the filter program writes
-# to standard output. If FILTER_PATTERNS is specified, this tag will be
-# ignored.
-
-INPUT_FILTER =
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis. Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match. The filters are a list of the form:
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
-# is applied to all files.
-
-FILTER_PATTERNS =
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will be used to filter the input files when producing source
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will
-# be generated. Documented entities will be cross-referenced with these sources.
-# Note: To get rid of all source code in the generated output, make sure also
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER = YES
-
-# Setting the INLINE_SOURCES tag to YES will include the body
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
-# doxygen to hide any special comment blocks from generated source code
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES
-# then for each documented function all documented
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = NO
-
-# If the REFERENCES_RELATION tag is set to YES
-# then for each documented function all documented entities
-# called/used by that function will be listed.
-
-REFERENCES_RELATION = NO
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code. Otherwise they will link to the documentation.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code
-# will point to the HTML generated by the htags(1) tool instead of doxygen
-# built-in source browser. The htags tool is part of GNU's global source
-# tagging system (see http://www.gnu.org/software/global/global.html). You
-# will need version 4.8.6 or higher.
-
-USE_HTAGS = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
-# will generate a verbatim copy of the header file for each class for
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
-# of all compounds will be generated. Enable this if the project
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX = YES
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX = 5
-
-# In case all classes in a project start with a common prefix, all
-# classes will be put under the same header in the alphabetical index.
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX =
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
-# generate HTML output.
-
-GENERATE_HTML = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT = html
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard header.
-
-HTML_HEADER =
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard footer.
-
-HTML_FOOTER =
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
-# style sheet that is used by each HTML page. It can be used to
-# fine-tune the look of the HTML output. If the tag is left blank doxygen
-# will generate a default style sheet. Note that doxygen will try to copy
-# the style sheet file to the HTML output directory, so don't put your own
-# stylesheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET =
-
-# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
-# Doxygen will adjust the colors in the stylesheet and background images
-# according to this color. Hue is specified as an angle on a colorwheel,
-# see http://en.wikipedia.org/wiki/Hue for more information.
-# For instance the value 0 represents red, 60 is yellow, 120 is green,
-# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
-# The allowed range is 0 to 359.
-
-HTML_COLORSTYLE_HUE = 220
-
-# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
-# the colors in the HTML output. For a value of 0 the output will use
-# grayscales only. A value of 255 will produce the most vivid colors.
-
-HTML_COLORSTYLE_SAT = 100
-
-# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
-# the luminance component of the colors in the HTML output. Values below
-# 100 gradually make the output lighter, whereas values above 100 make
-# the output darker. The value divided by 100 is the actual gamma applied,
-# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
-# and 100 does not change the gamma.
-
-HTML_COLORSTYLE_GAMMA = 80
-
-# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
-# page will contain the date and time when the page was generated. Setting
-# this to NO can help when comparing the output of multiple runs.
-
-HTML_TIMESTAMP = YES
-
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
-# files or namespaces will be aligned in HTML using tables. If set to
-# NO a bullet list will be used.
-
-HTML_ALIGN_MEMBERS = YES
-
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
-# documentation will contain sections that can be hidden and shown after the
-# page has loaded. For this to work a browser that supports
-# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
-# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
-
-HTML_DYNAMIC_SECTIONS = YES
-
-# If the GENERATE_DOCSET tag is set to YES, additional index files
-# will be generated that can be used as input for Apple's Xcode 3
-# integrated development environment, introduced with OSX 10.5 (Leopard).
-# To create a documentation set, doxygen will generate a Makefile in the
-# HTML output directory. Running make will produce the docset in that
-# directory and running "make install" will install the docset in
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
-# it at startup.
-# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
-# for more information.
-
-GENERATE_DOCSET = NO
-
-# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
-# feed. A documentation feed provides an umbrella under which multiple
-# documentation sets from a single provider (such as a company or product suite)
-# can be grouped.
-
-DOCSET_FEEDNAME = "Doxygen generated docs"
-
-# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
-# should uniquely identify the documentation set bundle. This should be a
-# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
-# will append .docset to the name.
-
-DOCSET_BUNDLE_ID = org.doxygen.Project
-
-# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
-# the documentation publisher. This should be a reverse domain-name style
-# string, e.g. com.mycompany.MyDocSet.documentation.
-
-DOCSET_PUBLISHER_ID = org.doxygen.Publisher
-
-# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
-
-DOCSET_PUBLISHER_NAME = Publisher
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-# will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
-# be used to specify the file name of the resulting .chm file. You
-# can add a path in front of the file if the result should not be
-# written to the html output directory.
-
-CHM_FILE =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
-# be used to specify the location (absolute path including file name) of
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
-# controls if a separate .chi index file is generated (YES) or that
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
-# is used to encode HtmlHelp index (hhk), content (hhc) and project file
-# content.
-
-CHM_INDEX_ENCODING =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
-# controls whether a binary table of contents is generated (YES) or a
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND = NO
-
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
-# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
-# that can be used as input for Qt's qhelpgenerator to generate a
-# Qt Compressed Help (.qch) of the generated HTML documentation.
-
-GENERATE_QHP = NO
-
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
-# be used to specify the file name of the resulting .qch file.
-# The path specified is relative to the HTML output folder.
-
-QCH_FILE =
-
-# The QHP_NAMESPACE tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#namespace
-
-QHP_NAMESPACE = org.doxygen.Project
-
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#virtual-folders
-
-QHP_VIRTUAL_FOLDER = doc
-
-# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
-# add. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#custom-filters
-
-QHP_CUST_FILTER_NAME =
-
-# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
-# custom filter to add. For more information please see
-# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
-# Qt Help Project / Custom Filters</a>.
-
-QHP_CUST_FILTER_ATTRS =
-
-# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
-# project's
-# filter section matches.
-# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
-# Qt Help Project / Filter Attributes</a>.
-
-QHP_SECT_FILTER_ATTRS =
-
-# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
-# be used to specify the location of Qt's qhelpgenerator.
-# If non-empty doxygen will try to run qhelpgenerator on the generated
-# .qhp file.
-
-QHG_LOCATION =
-
-# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
-# will be generated, which together with the HTML files, form an Eclipse help
-# plugin. To install this plugin and make it available under the help contents
-# menu in Eclipse, the contents of the directory containing the HTML and XML
-# files needs to be copied into the plugins directory of eclipse. The name of
-# the directory within the plugins directory should be the same as
-# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
-# the help appears.
-
-GENERATE_ECLIPSEHELP = YES
-
-# A unique identifier for the eclipse help plugin. When installing the plugin
-# the directory name containing the HTML and XML files should also have
-# this name.
-
-ECLIPSE_DOC_ID = org.doxygen.Project
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
-# top of each HTML page. The value NO (the default) enables the index and
-# the value YES disables it.
-
-DISABLE_INDEX = NO
-
-# This tag can be used to set the number of enum values (range [1..20])
-# that doxygen will group on one line in the generated HTML documentation.
-
-ENUM_VALUES_PER_LINE = 4
-
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information.
-# If the tag value is set to YES, a side panel will be generated
-# containing a tree-like index structure (just like the one that
-# is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
-# Windows users are probably better off using the HTML help feature.
-
-GENERATE_TREEVIEW = YES
-
-# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
-# and Class Hierarchy pages using a tree view instead of an ordered list.
-
-USE_INLINE_TREES = YES
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
-# used to set the initial width (in pixels) of the frame in which the tree
-# is shown.
-
-TREEVIEW_WIDTH = 250
-
-# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
-# links to external symbols imported via tag files in a separate window.
-
-EXT_LINKS_IN_WINDOW = NO
-
-# Use this tag to change the font size of Latex formulas included
-# as images in the HTML documentation. The default is 10. Note that
-# when you change the font size after a successful doxygen run you need
-# to manually remove any form_*.png images from the HTML output directory
-# to force them to be regenerated.
-
-FORMULA_FONTSIZE = 10
-
-# Use the FORMULA_TRANPARENT tag to determine whether or not the images
-# generated for formulas are transparent PNGs. Transparent PNGs are
-# not supported properly for IE 6.0, but are supported on all modern browsers.
-# Note that when changing this option you need to delete any form_*.png files
-# in the HTML output before the changes have effect.
-
-FORMULA_TRANSPARENT = YES
-
-# When the SEARCHENGINE tag is enabled doxygen will generate a search box
-# for the HTML output. The underlying search engine uses javascript
-# and DHTML and should work on any modern browser. Note that when using
-# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
-# (GENERATE_DOCSET) there is already a search function so this one should
-# typically be disabled. For large projects the javascript based search engine
-# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
-
-SEARCHENGINE = YES
-
-# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
-# implemented using a PHP enabled web server instead of at the web client
-# using Javascript. Doxygen will generate the search PHP script and index
-# file to put on the web server. The advantage of the server
-# based approach is that it scales better to large projects and allows
-# full text search. The disadvances is that it is more difficult to setup
-# and does not have live searching capabilities.
-
-SERVER_BASED_SEARCH = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
-# generate Latex output.
-
-GENERATE_LATEX = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked. If left blank `latex' will be used as the default command name.
-# Note that when enabling USE_PDFLATEX this option is only used for
-# generating bitmaps for formulas in the HTML output, but not in the
-# Makefile that is written to the output directory.
-
-LATEX_CMD_NAME = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
-# generate index for LaTeX. If left blank `makeindex' will be used as the
-# default command name.
-
-MAKEINDEX_CMD_NAME = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
-# LaTeX documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_LATEX = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used
-# by the printer. Possible values are: a4, a4wide, letter, legal and
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE = a4wide
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES =
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
-# the generated latex document. The header should contain everything until
-# the first chapter. If it is left blank doxygen will generate a
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER =
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will
-# contain links (just like the HTML output) instead of page references
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS = YES
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
-# plain latex in the generated Makefile. Set this option to YES to get a
-# higher quality PDF documentation.
-
-USE_PDFLATEX = YES
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
-# command to the generated LaTeX files. This will instruct LaTeX to keep
-# running if errors occur, instead of asking the user for help.
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not
-# include the index chapters (such as File Index, Compound Index, etc.)
-# in the output.
-
-LATEX_HIDE_INDICES = NO
-
-# If LATEX_SOURCE_CODE is set to YES then doxygen will include
-# source code with syntax highlighting in the LaTeX output.
-# Note that which sources are shown also depends on other settings
-# such as SOURCE_BROWSER.
-
-LATEX_SOURCE_CODE = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
-# The RTF output is optimized for Word 97 and may not look very pretty with
-# other RTF readers or editors.
-
-GENERATE_RTF = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
-# RTF documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_RTF = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
-# will contain hyperlink fields. The RTF file will
-# contain links (just like the HTML output) instead of page references.
-# This makes the output suitable for online browsing using WORD or other
-# programs which support those fields.
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's
-# config file, i.e. a series of assignments. You only have to provide
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE =
-
-# Set optional variables used in the generation of an rtf document.
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
-# generate man pages
-
-GENERATE_MAN = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT = man
-
-# The MAN_EXTENSION tag determines the extension that is added to
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
-# then it will generate one additional man file for each entity
-# documented in the real man page(s). These additional files
-# only source the real man page, but without them the man command
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will
-# generate an XML file that captures the structure of
-# the code including all documentation.
-
-GENERATE_XML = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_SCHEMA =
-
-# The XML_DTD tag can be used to specify an XML DTD,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_DTD =
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
-# dump the program listings (including syntax highlighting
-# and cross-referencing information) to the XML output. Note that
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
-# generate an AutoGen Definitions (see autogen.sf.net) file
-# that captures the structure of the code including all
-# documentation. Note that this feature is still experimental
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will
-# generate a Perl module file that captures the structure of
-# the code including all documentation. Note that this
-# feature is still experimental and incomplete at the
-# moment.
-
-GENERATE_PERLMOD = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
-# nicely formatted so it can be parsed by a human reader. This is useful
-# if you want to understand what is going on. On the other hand, if this
-# tag is set to NO the size of the Perl module output will be much smaller
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY = YES
-
-# The names of the make variables in the generated doxyrules.make file
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
-# This is useful so different doxyrules.make files included by the same
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
-# evaluate all C-preprocessor directives found in the sources and include
-# files.
-
-ENABLE_PREPROCESSING = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
-# names in the source code. If set to NO (the default) only conditional
-# compilation will be performed. Macro expansion can be done in a controlled
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
-# then the macro expansion is limited to the macros specified with the
-# PREDEFINED and EXPAND_AS_DEFINED tags.
-
-EXPAND_ONLY_PREDEF = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
-# in the INCLUDE_PATH (see below) will be search if a #include is found.
-
-SEARCH_INCLUDES = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by
-# the preprocessor.
-
-INCLUDE_PATH =
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will
-# be used.
-
-INCLUDE_FILE_PATTERNS =
-
-# The PREDEFINED tag can be used to specify one or more macro names that
-# are defined before the preprocessor is started (similar to the -D option of
-# gcc). The argument of the tag is a list of macros of the form: name
-# or name=definition (no spaces). If the definition and the = are
-# omitted =1 is assumed. To prevent a macro definition from being
-# undefined via #undef or recursively expanded use the := operator
-# instead of the = operator.
-
-PREDEFINED =
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
-# this tag can be used to specify a list of macro names that should be expanded.
-# The macro definition that is found in the sources will be used.
-# Use the PREDEFINED tag if you want to use a different macro definition.
-
-EXPAND_AS_DEFINED =
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-# doxygen's preprocessor will remove all function-like macros that are alone
-# on a line, have an all uppercase name, and do not end with a semicolon. Such
-# function macros are typically used for boiler-plate code, and will confuse
-# the parser if not removed.
-
-SKIP_FUNCTION_MACROS = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles.
-# Optionally an initial location of the external documentation
-# can be added for each tagfile. The format of a tag file without
-# this location is as follows:
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where "loc1" and "loc2" can be relative or absolute paths or
-# URLs. If a location is present for each tag, the installdox tool
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen
-# is run, you must also specify the path to the tagfile here.
-
-TAGFILES =
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE =
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed
-# in the class index. If set to NO only the inherited external classes
-# will be listed.
-
-ALLEXTERNALS = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will
-# be listed.
-
-EXTERNAL_GROUPS = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
-# or super classes. Setting the tag to NO turns the diagrams off. Note that
-# this option is superseded by the HAVE_DOT option below. This is only a
-# fallback. It is recommended to install and use dot, since it yields more
-# powerful graphs.
-
-CLASS_DIAGRAMS = NO
-
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see
-# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-MSCGEN_PATH =
-
-# If set to YES, the inheritance and collaboration graphs will hide
-# inheritance and usage relations if the target is undocumented
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz, a graph visualization
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT = YES
-
-# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
-# allowed to run in parallel. When set to 0 (the default) doxygen will
-# base this on the number of processors available in the system. You can set it
-# explicitly to a value larger than 0 to get control over the balance
-# between CPU load and processing speed.
-
-DOT_NUM_THREADS = 0
-
-# By default doxygen will write a font called FreeSans.ttf to the output
-# directory and reference it in all dot files that doxygen generates. This
-# font does not include all possible unicode characters however, so when you need
-# these (or just want a differently looking font) you can specify the font name
-# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
-# which can be done by putting it in a standard location or by setting the
-# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
-# containing the font.
-
-DOT_FONTNAME = FreeSans.ttf
-
-# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
-# The default size is 10pt.
-
-DOT_FONTSIZE = 10
-
-# By default doxygen will tell dot to use the output directory to look for the
-# FreeSans.ttf font (which doxygen will put there itself). If you specify a
-# different font using DOT_FONTNAME you can set the path where dot
-# can find it using this tag.
-
-DOT_FONTPATH =
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect inheritance relations. Setting this tag to YES will force the
-# the CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect implementation dependencies (inheritance, containment, and
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH = YES
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for groups, showing the direct groups dependencies
-
-GROUP_GRAPHS = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
-# Language.
-
-UML_LOOK = NO
-
-# If set to YES, the inheritance and collaboration graphs will show the
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS = NO
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
-# tags are set to YES then doxygen will generate a graph for each documented
-# file showing the direct and indirect include dependencies of the file with
-# other documented files.
-
-INCLUDE_GRAPH = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
-# documented header file showing the documented files that directly or
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH = YES
-
-# If the CALL_GRAPH and HAVE_DOT options are set to YES then
-# doxygen will generate a call dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable call graphs
-# for selected functions only using the \callgraph command.
-
-CALL_GRAPH = YES
-
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
-# doxygen will generate a caller dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable caller
-# graphs for selected functions only using the \callergraph command.
-
-CALLER_GRAPH = YES
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
-# will graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY = YES
-
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
-# then doxygen will show the dependencies a directory has on other directories
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
-
-DIRECTORY_GRAPH = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot. Possible values are png, jpg, or gif
-# If left blank png will be used.
-
-DOT_IMAGE_FORMAT = png
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be
-# found. If left blank, it is assumed the dot tool can be found in the path.
-
-DOT_PATH =
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the
-# \dotfile command).
-
-DOTFILE_DIRS =
-
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
-# nodes that will be shown in the graph. If the number of nodes in a graph
-# becomes larger than this value, doxygen will truncate the graph, which is
-# visualized by representing a node as a red box. Note that doxygen if the
-# number of direct children of the root node in a graph is already larger than
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
-# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-
-DOT_GRAPH_MAX_NODES = 50
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
-# graphs generated by dot. A depth value of 3 means that only nodes reachable
-# from the root by following a path via at most 3 edges will be shown. Nodes
-# that lay further from the root node will be omitted. Note that setting this
-# option to 1 or 2 may greatly reduce the computation time needed for large
-# code bases. Also note that the size of a graph can be further restricted by
-# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
-
-MAX_DOT_GRAPH_DEPTH = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, because dot on Windows does not
-# seem to support this out of the box. Warning: Depending on the platform used,
-# enabling this option may lead to badly anti-aliased labels on the edges of
-# a graph (i.e. they become hard to read).
-
-DOT_TRANSPARENT = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10)
-# support this, this feature is disabled by default.
-
-DOT_MULTI_TARGETS = NO
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
-# generate a legend page explaining the meaning of the various boxes and
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
-# remove the intermediate dot files that are used to generate
-# the various graphs.
-
-DOT_CLEANUP = YES
+++ /dev/null
-/**\r
- *\r
- * Copyright (C) 2011, BMW AG\r
- *\r
- * AudioManGui\r
- *\r
- * \file JackAudioController.cpp\r
- *\r
- * \date 20.05.2011\r
- * \author Christian Müller (christian.ei.mueller@bmw.de)\r
- *\r
- * \section License\r
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)\r
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de\r
- *\r
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.\r
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.\r
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.\r
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.\r
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.\r
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.\r
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.\r
- */\r
-\r
-#include "JackAudioController.h"\r
-\r
-#include <stdio.h>\r
-#include <stdint.h>\r
-#include <jack/jack.h>\r
-#include <jack/transport.h>\r
-\r
-#include <qstring.h>\r
-\r
-\r
-JackCtrl::JackCtrl() {\r
- connecToServer();\r
-}\r
-\r
-JackCtrl::~JackCtrl() {\r
-}\r
-\r
-void JackCtrl::connecToServer() {\r
-\r
- //open the server - no special options here\r
- jack_options_t jack_open_options = JackNullOption;\r
- if ((Jack = jack_client_open(JACK_NAME, jack_open_options, NULL)) == 0) {\r
- }\r
- //activate the client\r
- if (jack_activate(Jack)) {\r
- }\r
- //start the transport\r
- jack_transport_start(Jack);\r
-\r
- //first I want to get the gateway to pulseaudio\r
- const char **ingateways, **outgateways;\r
- ingateways = jack_get_ports(Jack, NULL, NULL, JackPortIsInput);\r
- outgateways = jack_get_ports(Jack, NULL, NULL, JackPortIsOutput);\r
-\r
- QString buffer;\r
- QList<QString> sinkList;\r
- QList<QString> sourceList;\r
- int pointer = 0;\r
-\r
- //go throught the results and write them to the GatewayList\r
- while (ingateways && ingateways[pointer]) {\r
- buffer = QString(ingateways[pointer]);\r
- sinkList.append(buffer);\r
- pointer++;\r
- }\r
- pointer = 0;\r
-\r
- //now we care about the output gateways\r
- while (outgateways && outgateways[pointer]) {\r
- buffer = QString(outgateways[pointer]);\r
- sourceList.append(buffer);\r
- pointer++;\r
- }\r
-\r
- JSink Sink;\r
- foreach(QString item, sinkList) {\r
- if (!item.contains("PulseAudio", Qt::CaseSensitive)) {\r
- if (item.contains("L")) {\r
- Sink.left = item;\r
- Sink.right = item.left(item.indexOf("L")) + "R";\r
- m_sinks.append(Sink);\r
- }\r
- } else {\r
- if (item.contains("PulseAudio", Qt::CaseSensitive)) {\r
- if (item.contains("left", Qt::CaseSensitive)) {\r
- Sink.left = item;\r
- Sink.right = item.left(item.indexOf("left")) + "right";\r
- m_inGateway.append(Sink);\r
- }\r
- }\r
- }\r
- }\r
-\r
- JSource Source;\r
- foreach(QString item, sourceList) {\r
- if (!item.contains("PulseAudio", Qt::CaseSensitive)) {\r
- if (item.contains("L")) {\r
- Source.left = item;\r
- Source.right = item.left(item.indexOf("L")) + "R";\r
- m_sources.append(Source);\r
- }\r
- } else {\r
- if (item.contains("PulseAudio", Qt::CaseSensitive)) {\r
- if (item.contains("left", Qt::CaseSensitive)) {\r
- Source.left = item;\r
- Source.right = item.left(item.indexOf("left")) + "right";\r
- m_outGateway.append(Source);\r
- }\r
- }\r
- }\r
- }\r
-}\r
-\r
-QList<JSink> JackCtrl::returnSinks() {\r
- return m_sinks;\r
-}\r
-\r
-QList<JSource> JackCtrl::returnSources() {\r
- return m_sources;\r
-}\r
-\r
-QList<JSink> JackCtrl::returnInGateways() {\r
- return m_inGateway;\r
-}\r
-QList<JSource> JackCtrl::returnOutGateways() {\r
- return m_outGateway;\r
-}\r
-\r
-void JackCtrl::setSinkID(JSink Sink, int ID) {\r
- int idx = 0;\r
- foreach (JSink item,m_sinks) {\r
- if (item.left == Sink.left) {\r
- m_sinks[idx].id = ID;\r
- }\r
- idx++;\r
- }\r
-}\r
-\r
-void JackCtrl::setSourceID(JSource Source, int ID) {\r
- int idx = 0;\r
- foreach (JSource item,m_sources) {\r
- if (item.left == Source.left) {\r
- m_sources[idx].id = ID;\r
- }\r
- idx++;\r
- }\r
-}\r
-\r
-void JackCtrl::setInGatewayID(JSink Sink, int ID) {\r
- int idx = 0;\r
- foreach (JSink item,m_inGateway) {\r
- if (item.left == Sink.left) {\r
- m_inGateway[idx].id = ID;\r
- }\r
- idx++;\r
- }\r
-}\r
-\r
-void JackCtrl::setOutGatewayID(JSource Source, int ID) {\r
- int idx = 0;\r
- foreach (JSource item,m_outGateway) {\r
- if (item.left == Source.left) {\r
- m_outGateway[idx].id = ID;\r
- }\r
- idx++;\r
- }\r
-}\r
-\r
-JSource JackCtrl::getSourcefromID(int ID) {\r
- JSource J;\r
- foreach (JSource item,m_sources) {\r
- if (item.id == ID) {\r
- J = item;\r
- }\r
- }\r
- foreach (JSource item,m_outGateway) {\r
- if (item.id == ID) {\r
- J = item;\r
- }\r
- }\r
- return J;\r
-}\r
-\r
-JSink JackCtrl::getSinkfromID(int ID) {\r
- JSink J;\r
- foreach (JSink item,m_sinks) {\r
- if (item.id == ID) {\r
- J = item;\r
- }\r
- }\r
- foreach (JSink item,m_inGateway) {\r
- if (item.id == ID) {\r
- J = item;\r
- }\r
- }\r
- return J;\r
-}\r
-\r
-int JackCtrl::connect(int Source, int Sink, int connectionID) {\r
- //first get the source\r
- JSource So = getSourcefromID(Source);\r
- JSink Si = getSinkfromID(Sink);\r
- QByteArray b_sourceL = So.left.toAscii();\r
- QByteArray b_sinkL = Si.left.toAscii();\r
- char* c_sourceL = b_sourceL.data();\r
- char* c_sinkL = b_sinkL.data();\r
- QByteArray b_sourceR = So.right.toAscii();\r
- QByteArray b_sinkR = Si.right.toAscii();\r
-\r
- char* c_sourceR = b_sourceR.data();\r
- char* c_sinkR = b_sinkR.data();\r
- jack_connect(Jack, c_sourceR, c_sinkR);\r
- jack_connect(Jack, c_sourceL, c_sinkL);\r
-\r
- JConnections con;\r
- con.id = connectionID;\r
- con.sink = Si;\r
- con.source = So;\r
- m_connList.append(con);\r
- return connectionID;\r
-}\r
-\r
-bool JackCtrl::disconnect(int connectionID) {\r
- int index = 0, rem = -1;\r
- JSource So;\r
- JSink Si;\r
- foreach (JConnections con, m_connList) {\r
- if (con.id == connectionID) {\r
- So = con.source;\r
- Si = con.sink;\r
- rem = index;\r
- }\r
- index++;\r
- }\r
- m_connList.removeAt(rem);\r
- QByteArray b_sourceL = So.left.toAscii();\r
- QByteArray b_sinkL = Si.left.toAscii();\r
- char* c_sourceL = b_sourceL.data();\r
- char* c_sinkL = b_sinkL.data();\r
- QByteArray b_sourceR = So.right.toAscii();\r
- QByteArray b_sinkR = Si.right.toAscii();\r
-\r
- char* c_sourceR = b_sourceR.data();\r
- char* c_sinkR = b_sinkR.data();\r
- jack_disconnect(Jack, c_sourceR, c_sinkR);\r
- jack_disconnect(Jack, c_sourceL, c_sinkL);\r
-}\r
-\r
+++ /dev/null
-/**\r
- *\r
- * Copyright (C) 2011, BMW AG\r
- *\r
- * AudioManGui\r
- *\r
- * \file JackAudioController.h\r
- *\r
- * \date 20.05.2011\r
- * \author Christian Müller (christian.ei.mueller@bmw.de)\r
- *\r
- * \section License\r
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)\r
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de\r
- *\r
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.\r
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.\r
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.\r
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.\r
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.\r
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.\r
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.\r
- */\r
-\r
-#ifndef JACKAUDIOCONTROLLER_H_\r
-#define JACKAUDIOCONTROLLER_H_\r
-\r
-#pragma once\r
-\r
-#include <jack/jack.h>\r
-#include <jack/transport.h>\r
-#include <qstring.h>\r
-#include <qlist.h>\r
-\r
-#define JACK_NAME "JACK"\r
-#define DOMAIN_NAME "JACK"\r
-\r
-class JSource {\r
-public:\r
- QString left;\r
- QString right;\r
- int id;\r
-};\r
-\r
-class JSink {\r
-public:\r
- QString left;\r
- QString right;\r
- int id;\r
-};\r
-\r
-class JConnections {\r
-public:\r
- JSink sink;\r
- JSource source;\r
- int id;\r
-};\r
-\r
-class JackCtrl {\r
-public:\r
- JackCtrl();\r
- virtual ~JackCtrl();\r
- void connecToServer(void);\r
- QList<JSink> returnSinks(void);\r
- QList<JSource> returnSources(void);\r
- QList<JSink> returnInGateways(void);\r
- QList<JSource> returnOutGateways(void);\r
- void setSinkID(JSink Sink, int ID);\r
- void setSourceID(JSource Source, int ID);\r
- void setInGatewayID(JSink Sink, int ID);\r
- void setOutGatewayID(JSource Source, int ID);\r
- int connect(int Source, int Sink, int connectionID);\r
- bool disconnect(int connectionID);\r
-\r
- JSink getSinkfromID(int ID);\r
- JSource getSourcefromID(int ID);\r
-private:\r
- jack_client_t* Jack;\r
- QList<JSink> m_sinks;\r
- QList<JSource> m_sources;\r
- QList<JSink> m_inGateway;\r
- QList<JSource> m_outGateway;\r
- QList<JConnections> m_connList;\r
-};\r
-\r
-#endif /* JACKAUDIOCONTROLLER_H_ */\r
+++ /dev/null
-/**
- *
- * Copyright (C) 2011, BMW AG
- *
- * AudioManGui
- *
- * \file RoutingSend.cpp
- *
- * \date 20.05.2011
- * \author Christian Müller (christian.ei.mueller@bmw.de)
- *
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
- */
-
-#include "RoutingSend.h"
-#include "routinginterface.h"
-
-void RoutingSendJack::startup_interface(RoutingReceiveInterface* audioman) {
- Jack =new JackCtrl;
- audiomanager=audioman;
-}
-
-void RoutingSendJack::return_BusName(char* BusName) {
- strcpy(BusName,BUS_NAME);
-}
-
-connection_t RoutingSendJack::connect(source_t source, sink_t sink, connection_t connID) {
- Jack->connect(source,sink,connID);
- audiomanager->ackConnect(connID,GEN_OK);
- return connID;
-}
-
-void RoutingSendJack::slot_system_ready() {
- audiomanager->registerDomain((char *)DOMAIN_NAME, (char *)BUS_NAME, (char *)"Server1", false);
- foreach (JSink Sink, Jack->returnSinks()) {
- QString name=Sink.left.left(Sink.left.indexOf("L"));
- QByteArray b_name = name.toAscii();
- char* c_name = b_name.data();
- int id=audiomanager->registerSink(c_name,NULL, (char *)DOMAIN_NAME);
- Jack->setSinkID(Sink,id);
- }
- foreach (JSource Source, Jack->returnSources()) {
- QString name=Source.left.left(Source.left.indexOf("L"));
- QByteArray b_name = name.toAscii();
- char* c_name = b_name.data();
- int id=audiomanager->registerSource((char *)c_name, (char *)"default",(char *)DOMAIN_NAME);
- Jack->setSourceID(Source,id);
- }
- foreach (JSource Source, Jack->returnOutGateways()) {
- QString name=Source.left.left(Source.left.indexOf(":"));
- QByteArray b_name = name.toAscii();
- char* c_name = b_name.data();
- int id=audiomanager->registerSource((char *)c_name, (char *)"default",(char *)DOMAIN_NAME);
- Jack->setOutGatewayID(Source,id);
- }
- foreach (JSink Sink, Jack->returnInGateways()) {
- QString name=Sink.left.left(Sink.left.indexOf(":"));
- QByteArray b_name = name.toAscii();
- char* c_name = b_name.data();
- int id=audiomanager->registerSink((char *)c_name,NULL, (char *)DOMAIN_NAME);
- Jack->setInGatewayID(Sink,id);
- }
-}
-
-bool RoutingSendJack::disconnect(connection_t connectionID) {
- return Jack->disconnect(connectionID);
-}
-
-volume_t RoutingSendJack::setSinkVolume(volume_t volume, sink_t sink) {
- (void)sink;
- //TODO fill with life
- return volume;
-}
-
-volume_t RoutingSendJack::setSourceVolume(volume_t volume, source_t source) {
- (void)source;
- //TODO fill with life
- return volume;
-}
-
-bool RoutingSendJack::muteSource(source_t sourceID) {
- (void)sourceID;
- //TODO fill with life
- return true;
-}
-bool RoutingSendJack::muteSink(sink_t sinkID) {
- (void)sinkID;
- //TODO fill with life
- return true;
-}
-bool RoutingSendJack::unmuteSource(source_t sourceID) {
- (void)sourceID;
- //TODO fill with life
- return true;
-}
-bool RoutingSendJack::unmuteSink(sink_t sinkID){
- (void)sinkID;
- //TODO fill with life
- return true;
-}
-
-RoutingSendInterface* SampleRoutingInterfaceJackFactory::returnInstance(){
- return new RoutingSendJack();
-}
-
-Q_EXPORT_PLUGIN2(RoutingJackPlugin, SampleRoutingInterfaceJackFactory);
+++ /dev/null
-/**
- *
- * Copyright (C) 2011, BMW AG
- *
- * PluginJack
- *
- * \file RoutingSend.h
- *
- * \date 20.05.2011
- * \author Christian Müller (christian.ei.mueller@bmw.de)
- *
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
- */
-
-#ifndef BUS_INTERFACE_H_
-#define BUS_INTERFACE_H_
-
-#include <qplugin.h>
-#include "routinginterface.h"
-#include "JackAudioController.h"
-
-
-#define BUS_NAME "JACK"
-
-/**Implementation of the interface
- *
- */
-class RoutingSendJack: public RoutingSendInterface
-{
-Q_OBJECT
-public:
- void startup_interface(RoutingReceiveInterface * audioman);
- void return_BusName(char * BusName);
- connection_t connect(source_t source, sink_t sink, connection_t connID);
- bool disconnect(connection_t connectionID);
- volume_t setSinkVolume(volume_t volume, sink_t sink);
- volume_t setSourceVolume(volume_t volume, source_t source);
- bool muteSource(source_t sourceID);
- bool muteSink(sink_t sinkID);
- bool unmuteSource(source_t sourceID);
- bool unmuteSink(sink_t sinkID);
-
-public slots:
- void slot_system_ready();
-
-private:
- RoutingReceiveInterface *audiomanager;
- JackCtrl* Jack;
-};
-
-//That is the actual implementation of the Factory Class returning the real sendInterface
-
-class SampleRoutingInterfaceJackFactory: public QObject, public RoutingInterfaceFactory
-{
-Q_OBJECT
-Q_INTERFACES(RoutingInterfaceFactory)
-public:
- RoutingSendInterface* returnInstance();
-};
-
-#endif /* BUS_INTERFACE_H_ */
+++ /dev/null
-/**
- * \mainpage
- * \image html "Bild1.png"
- * Copyright Copyright (C) 2011, BMW AG
- *
- * \date 22.06.2011
- * \author Christian Müller (christian.ei.mueller@bmw.de)
- *
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
- *
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
- * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
- * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
- * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
- * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
- *
- * \section About About PluginInterfaceJack
- * This plugin for the Genivi AudioManager serves as interface to Jack.
- *
- * \section Info More information
- * can be found at <https://collab.genivi.org/wiki/display/genivi/GENIVI+Home>
- *
- * \todo enhance Interface
- */
-
-#ifndef MAINPAGE_H_
-#define MAINPAGE_H_
-
-
-#endif /* MAINPAGE_H_ */
+++ /dev/null
-GENIVI AUDIOMANAGER
-
-Copyright (C) 2011, BMW AG
-
-Datum 20.05.2011
-author Christian Müller (christian.ei.mueller@bmw.de)
-
-***********************************************************************************************************
-LICENSE
-***********************************************************************************************************
-
-GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
-Copyright (C) 2011, BMW AG – Christian Müller Christian.ei.mueller@bmw.de
-
-This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
-This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
-You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
-Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
-Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
-As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
-Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
-
-Version 0.2
-
-***********************************************************************************************************
-COMPILE PROGRAMS
-*********************************************************************************************************
-
-You will need some packages in order to comile the GENIVI AudioManager Proof of Concept, these are:
--QT4
--automotive-dlt
--jack
--jackeq
--jack control
--dbus
--sqlite
--glib >=2.0
--gstreamer-base-0.10
--gstreamer-plugins-base-0.10
--gstreamer-plugins
--gstreamer0.10-pulseaudio
--gstreamer0.10-plugins-good
--phonon
--phonon-backend-gstreamer
--doxygen
-
-More details in the CMake Files CmakeList.txt in the projects
-
-on the top level of the folder you just received, there is a shall script "cmaker.sh" which can be invoked with a lot of different parameters. Invoking it with:
-
-sh cmaker.sh all all
-
-will create all neccessary folders and compile all plugins and applications except the PulseAudio Plugin.
-
-after the script finished, you should have:
-
-a /bin folder which contains:
- AudioGui
- AudioManager
- Bild1.png
- PlayerGui
-
-a /build folder which has all build objects (erase that if you need a clean build)
-
-a /doc folder which contains subfolders with the doxygen documentation:
- AudioGui
- AudioManager
- DBusPlugin
- JackPlugin
- PlayerGUI
- PluginTest
-
-***********************************************************************************************************
-COMPILE PULSEAUDIO
-***********************************************************************************************************
-
-For the pulseaudio plugin, you will need to do the following steps:
-
-- if you have pulseaudio installed (e.g. you have vanilla ubuntu), remove it with the package manager
-
- apt-get purge pulseaudio
-
-- remove all packages of modules as well (there can be only one server of course)
-- download the source code from pulseaudio
-
- wget http://freedesktop.org/software/pulseaudio/releases/pulseaudio-0.9.22.tar.gz
-
-- patch was developed and tested with verisopn 0.9.22 but newer versions could do as well and unpack it
-
- tar xvf pulseaudio-0.9.22.tar.gz
-
-- cd into the unpacked pulseaudio directory:
-
- cd pulseaudio-0.9.22
-
-- copy the patchfile into the pulseaudio directory
-
- cp ../genivipulseaudio.patch .
-
--apply the patchfile genivipulseaudio.patch with
-
- patch -p1 -i genivipulseaudio.patch
-
-- what follows is the normal compiling process of pulseaudio, first bootstrap:
-
- ./bootstrap.sh
-
-- then configure
-
- ./configure.sh
-
-- check the output, the summary file should look similar to this:
-
- Have X11: no
- Enable OSS Output: yes
- Enable OSS Wrapper: yes
- Enable Alsa: yes
- Enable Solaris: no
- Enable GLib 2.0: yes
- Enable Gtk+ 2.0: yes
- Enable GConf: no
- Enable Avahi: yes
- Enable Jack: yes
- Enable Async DNS: no
- Enable LIRC: no
- Enable HAL: no
- Enable udev: yes
- Enable HAL->udev compat: yes
- Enable BlueZ: no
- Enable TCP Wrappers: no
- Enable libsamplerate: yes
- Enable IPv6: yes
- Enable OpenSSL (for Airtunes): no
- Enable tdb: no
- Enable gdbm: no
- Enable simple database: yes
- Enable Genivi support yes
- System User: pulse
- System Group: pulse
- Access Group: pulse-access
- Enable per-user EsounD socket: yes
- Force preopen: no
- Preopened modules: all
-
- at least we should have alsa, Jack, udev, libsamplerate, Genivi, Glib 2.0 .... if not install missing packages and start again
-
-- ok, lets go with
-
- make -j4 all
-
-To adjust to your system, you can modify the file "Genivi.conf" witch can be found in pulseaudio-0.9.22/src. Here you can define the sources and sinks
-that are presented to the audiomanager by the routingadaptor in the pulseaudio genivi module.
-
-
-***********************************************************************************************************
-START
-***********************************************************************************************************
-
-First we need to start Jack. This can be done via very easy via
-
- qjackctl
-
-if you cannot install it via packagemanager, you can dowload it here: http://qjackctl.sourceforge.net/
-
-Since we deinstalled pulse, jack will grab the hardwarecontrols if it is started, that is contra productive, so we make sure that the server runs virtual. Within
-qjackctl, you can select the settings tab and take as driver "dummy", or you start jackd with the following command:
-
- /usr/bin/jackd -T -P62 -t1000 -m -ddummy -r44100 -p256
-
-or write this command in your home into the .jackdrc file
-
-If you want to have the same as the demo in Dublin, start now the jack equalizer (if you don't have: http://jackeq.sourceforge.net/ or packagemanager)
-
- /usr/bin/jackeq
-
-Now it's time to start pulseaudio, since we need to start it with a special configuration, get into the pulseaudio directory and run
-
- src/pulseaudio -n -F src/test.pa -p $(pwd)/src/.libs/ -vvvv
-
-The next step is to start the DLT server
-
- dlt-daemon
-
-And a dlt client if you want to see something.
-Then get into the /bin directory of the workspace where the binaries where created and run in the following order:
-
- ./AudioManager
-
-This starts the audiomanager, you should already get some output on the DLT
-
- ./AudioGui
-
-starts the Test GUI, you can now connect and disconnect already, changing volumes works via double click on the sinks
-
- ./PLayerGui player youraudiofile.mp3
-
-starts the player application, please choose cool music.
-To test Traffic announcements, you need to create a folder on the workspace, same level as bin, called "music" and put an mp3 in there. please rename it to "ta.mp3", this file
-is taken to play the traffic announcement.
-
- ./PlayerGui ta
-
-Same for navigation, the file needs to have the name "music/navi.mp3"
-
- ./PLayerGui navigation
-
-
-***********************************************************************************************************
-Tips
-***********************************************************************************************************
-If you want to use the codebase with eclipse, define the main level of the git as workspace and import the projects as c++ makefile projects.
-Git is setup in a way that the settings are ignored when committing.
-To use make out of eclipse them, replace the default make command "make" with something like
-"make -j4 -C ../build/AudioManagerDeamon VERBOSE=1" (exchanging the name of the Project in respect to the plugin whatever.
-
-***********************************************************************************************************
-
- _..-------++._
- _.-'/ | _|| \"--._
- __.--'`._/_\j_____/_||___\ `----.
- _.--'_____ | \ _____ /
- _j /,---.\ | =o | /,---.\ |_
- [__]==// .-. \\==`===========/==// .-. \\=[__]
- `-._|\ `-' /|___\_________/___|\ `-' /|_.'
- `---' `---'
-
-
PLUGINS_DIRECTORY="plugins"
DOC_DIRECTORY="doc"
BIN_DIRECTORY="bin"
+TEST_DIRECTORY="test"
ACTION=$1
ABS=`exec pwd`
APPLICATION_LIST=$(find . -maxdepth 1 -type d \( -name "[A-Z]*" -a -not \( -name "Plugin*" \) \) )
cd ..
fi
+ TEST=$ABS"/"$TEST_DIRECTORY
+ if [ ! -d "${TEST}" ];
+ then
+ echo "create Bin Dir: $TEST_DIRECTORY"
+ mkdir $TEST_DIRECTORY
+ cd $TEST_DIRECTORY
+ cd ..
+ fi
+
ABSOLUTE=$ABS"/"$BUILD_DIRECTORY
if [ ! -d "${ABSOLUTE}" ];
then
echo "create Build Dir: $PLUGINS_DIRECTORY"
mkdir $PLUGINS_DIRECTORY
fi
-
}
# does cmake for list in $1
do_cmake_plugin ()
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>\r
+<!DOCTYPE node PUBLIC\r
+ "-//freedesktop//DTD D-Bus Object Introspection 1.0//EN"\r
+ "http://standards.freedesktop.org/dbus/1.0/introspect.dtd">\r
+\r
+<node>\r
+ <interface name="org.genivi.audiomanager.CommandInterface">\r
+\r
+ <method name="Connect">\r
+ <arg type="q" name="sourceID" direction="in"/>\r
+ <arg type="q" name="sinkID" direction="in"/>\r
+ <arg type="n" name="result" direction="out"/> <!-- method return code (am_Error_e) -->\r
+ <arg type="q" name="mainConnectionID" direction="out"/>\r
+ </method>\r
+\r
+ <method name="Disconnect">\r
+ <arg type="q" name="mainConnectionID" direction="in"/>\r
+ <arg type="n" name="result" direction="out"/> <!-- method return code (am_Error_e) -->\r
+ </method>\r
+\r
+ <method name="SetVolume">\r
+ <arg type="q" name="sinkID" direction="in"/>\r
+ <arg type="n" name="volume" direction="in"/>\r
+ <arg type="n" name="result" direction="out"/> <!-- method return code (am_Error_e) -->\r
+ </method>\r
+\r
+ <method name="VolumeStep">\r
+ <arg type="q" name="sinkID" direction="in"/>\r
+ <arg type="n" name="volumeStep" direction="in"/>\r
+ <arg type="n" name="result" direction="out"/> <!-- method return code (am_Error_e) -->\r
+ </method>\r
+\r
+ <method name="SetSinkMuteState">\r
+ <arg type="q" name="sinkID" direction="in"/>\r
+ <arg type="n" name="muteState" direction="in"/>\r
+ <arg type="n" name="result" direction="out"/> <!-- method return code (am_Error_e) -->\r
+ </method>\r
+\r
+ <method name="SetMainSinkSoundProperty">\r
+ <arg type="q" name="sinkID" direction="in"/>\r
+ <arg type="(nn)" name="soundProperty" direction="in"/>\r
+ <arg type="n" name="result" direction="out"/> <!-- method return code (am_Error_e) -->\r
+ </method>\r
+\r
+ <method name="SetMainSourceSoundProperty">\r
+ <arg type="q" name="sourceID" direction="in"/>\r
+ <arg type="(nn)" name="soundProperty" direction="in"/>\r
+ <arg type="n" name="result" direction="out"/> <!-- method return code (am_Error_e) -->\r
+ </method>\r
+\r
+ <method name="SetSystemProperty">\r
+ <arg type="(nn)" name="property" direction="in"/>\r
+ <arg type="n" name="result" direction="out"/> <!-- method return code (am_Error_e) -->\r
+ </method>\r
+\r
+ <method name="GetListMainConnections">\r
+ <arg type="n" name="result" direction="out"/> <!-- method return code (am_Error_e) -->\r
+ <arg type="a(nnnqq)" name="listConnections" direction="out"/> <!-- am_mainConnectionID_t mainConnectionID; am_sourceID_t sourceID; am_sinkID_t sinkID; am_timeSync_t delay; am_ConnectionState_e connectionState; -->\r
+ </method>\r
+\r
+ <method name="GetListMainSinks">\r
+ <arg type="n" name="result" direction="out"/> <!-- method return code (am_Error_e) -->\r
+ <arg type="a(qs(nn)nnq)" name="listMainSinks" direction="out"/> <!-- am_sinkID_t sinkID; std::string name; am_Availability_s availability; am_mainVolume_t volume; am_MuteState_e muteState; am_sinkClass_t sinkClassID; -->\r
+ </method>\r
+\r
+ <method name="GetListMainSources">\r
+ <arg type="n" name="result" direction="out"/> <!-- method return code (am_Error_e) -->\r
+ <arg type="a(qs(nn)q)" name="listMainSources" direction="out"/> <!-- am_sourceID_t sourceID; std::string name; am_Availability_s availability; am_sourceClass_t sourceClassID; -->\r
+ </method>\r
+\r
+ <method name="GetListMainSinkSoundProperties">\r
+ <arg type="q" name="sinkID" direction="in"/> \r
+ <arg type="n" name="result" direction="out"/> <!-- method return code (am_Error_e) -->\r
+ <arg type="a(nn)" name="listSoundProperties" direction="out"/> <!-- am_MainSoundPropertyType_e type; int16_t value; -->\r
+ </method>\r
+\r
+ <method name="GetListMainSourceSoundProperties">\r
+ <arg type="q" name="sourceID" direction="in"/>\r
+ <arg type="n" name="result" direction="out"/> <!-- method return code (am_Error_e) -->\r
+ <arg type="a(nn)" name="listSourceProperties" direction="out"/> <!-- am_MainSoundPropertyType_e type; int16_t value; -->\r
+ </method>\r
+\r
+ <method name="GetListSourceClasses">\r
+ <arg type="n" name="result" direction="out"/> <!-- method return code (am_Error_e) -->\r
+ <arg type="a(qsa(nn))" name="listSourceClasses" direction="out"/> <!-- am_sourceClass_t SourceClassID; std::string name; std::vector<am_ClassProperty_s> listClassProperties; -->\r
+ </method>\r
+\r
+ <method name="GetListSinkClasses">\r
+ <arg type="n" name="result" direction="out"/> <!-- method return code (am_Error_e) -->\r
+ <arg type="a(qsa(nn))" name="listSinkClasses" direction="out"/> <!-- am_sourceClass_t SinkClassID; std::string name; std::vector<am_ClassProperty_s> listClassProperties; -->\r
+ </method>\r
+\r
+ <method name="GetListSystemProperties">\r
+ <arg type="n" name="result" direction="out"/> <!-- method return code (am_Error_e) -->\r
+ <arg type="a(nn)" name="listSystemProperties" direction="in"/> <!-- am_SystemProperty_e type; int16_t value; -->\r
+ </method>\r
+\r
+ <method name="GetTimingInformation">\r
+ <arg type="q" name="mainConnectionID" direction="in"/>\r
+ <arg type="n" name="result" direction="out"/> <!-- method return code (am_Error_e) -->\r
+ <arg type="n" name="delay" direction="out"/>\r
+ </method>\r
+\r
+ <signal name="NumberOfMainConnectionsChanged">\r
+ </signal>\r
+\r
+ <signal name="SinkAdded">\r
+ <arg type="(qs(nn)nnq)" name="newSink" direction="out"/>\r
+ </signal>\r
+ \r
+ <signal name="SinkRemoved">\r
+ <arg type="q" name="removedSinkID" direction="out"/>\r
+ </signal>\r
+\r
+ <signal name="SourceAdded">\r
+ <arg type="(qs(nn)q)" name="newSource" direction="out"/>\r
+ </signal>\r
+ \r
+ <signal name="SourceRemoved">\r
+ <arg type="q" name="removedSourceID" direction="out"/>\r
+ </signal>\r
+\r
+ <signal name="NumberOfSinkClassesChanged">\r
+ </signal>\r
+\r
+ <signal name="NumberOfSourceClassesChanged">\r
+ </signal>\r
+\r
+ <signal name="MainConnectionStateChanged">\r
+ <arg type="q" name="connectionID" direction="out"/>\r
+ <arg type="n" name="connectionState" direction="out"/>\r
+ </signal>\r
+\r
+ <signal name="MainSinkSoundPropertyChanged">\r
+ <arg type="q" name="sinkID" direction="out"/>\r
+ <arg type="(nn)" name="SoundProperty" direction="out"/>\r
+ </signal>\r
+\r
+ <signal name="MainSourceSoundPropertyChanged">\r
+ <arg type="q" name="sourceID" direction="out"/>\r
+ <arg type="(nn)" name="SoundProperty" direction="out"/>\r
+ </signal>\r
+\r
+ <signal name="SinkAvailabilityChanged">\r
+ <arg type="q" name="sinkID" direction="out"/>\r
+ <arg type="(nn)" name="availability" direction="out"/>\r
+ </signal>\r
+\r
+ <signal name="SourceAvailabilityChanged">\r
+ <arg type="q" name="sourceID" direction="out"/>\r
+ <arg type="(nn)" name="availability" direction="out"/>\r
+ </signal>\r
+\r
+ <signal name="VolumeChanged">\r
+ <arg type="q" name="sinkID" direction="out"/>\r
+ <arg type="n" name="volume" direction="out"/>\r
+ </signal>\r
+\r
+ <signal name="SinkMuteStateChanged">\r
+ <arg type="q" name="sinkID" direction="out"/>\r
+ <arg type="n" name="muteState" direction="out"/>\r
+ </signal>\r
+\r
+ <signal name="SystemPropertyChanged">\r
+ <arg type="(nn)" name="SystemProperty" direction="out"/>\r
+ </signal>\r
+\r
+ <signal name="TimingInformationChanged">\r
+ <arg type="q" name="mainConnection" direction="out"/>\r
+ <arg type="n" name="time" direction="out"/>\r
+ </signal>\r
+\r
+ </interface>\r
+</node>\r
--- /dev/null
+/**
+* Copyright (C) 2011, BMW AG
+*
+* GeniviAudioMananger AudioManagerDaemon
+*
+* \file DBusConfiguration.h
+*
+* \date 20-Oct-2011 3:42:04 PM
+* \author Christian Mueller (christian.ei.mueller@bmw.de)
+*
+* \section License
+* GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
+* Copyright (C) 2011, BMW AG Christian Mueller Christian.ei.mueller@bmw.de
+*
+* This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
+* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
+* You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
+* Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
+* Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
+* As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
+* Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
+*
+* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
+*/
+
+#ifndef DBUSCONFIGURATION_H_
+#define DBUSCONFIGURATION_H_
+
+#define DBUS_SERVICE_PREFIX "org.genivi.audiomanager\0"
+#define DBUS_SERVICE_OBJECT_PATH "/org/genivi/audiomanager\0"
+
+
+
+#endif /* DBUSCONFIGURATION_H_ */
--- /dev/null
+/**
+* Copyright (C) 2011, BMW AG
+*
+* GeniviAudioMananger AudioManagerDaemon
+*
+* \file DBusWrapper.h
+*
+* \date 20-Oct-2011 3:42:04 PM
+* \author Christian Mueller (christian.ei.mueller@bmw.de)
+*
+* \section License
+* GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
+* Copyright (C) 2011, BMW AG Christian Mueller Christian.ei.mueller@bmw.de
+*
+* This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
+* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
+* You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
+* Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
+* Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
+* As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
+* Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
+*
+* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
+*/
+
+#ifndef DBUSWRAPPER_H_
+#define DBUSWRAPPER_H_
+
+#include "audiomanagertypes.h"
+#include "DBusConfiguration.h"
+#include <dbus/dbus.h>
+#include <string>
+#include <list>
+
+/**
+ * This wraps dbus and provides everything needed to anyone who wants to use dbus (including plugins)
+ */
+class DBusWrapper {
+public:
+ DBusWrapper();
+ virtual ~DBusWrapper();
+
+ /**
+ * registers a callback that is entered as path below the main path.
+ * The configuration of the mainpath is done via DBusConfiguration.h
+ * @param vtable the vtable that holds a pointer to the callback that is called when the path is called from the dbus
+ * @param path the name of the path
+ * @param userdata pointer to the class that will handle the callback
+ */
+ void registerCallback(const DBusObjectPathVTable* vtable, const std::string& path, void* userdata);
+
+ /**
+ * returns the dbus connection
+ * @param connection pointer to the connection
+ */
+ void getDBusConnection(DBusConnection*& connection) const;
+
+ /**
+ * If Dbus is used, this MainLoop must be called as mainloop, otherwise the messages are not dispatched.
+ */
+ void dbusMainLoop();
+
+private:
+ static DBusWrapper* mReference;
+ static DBusHandlerResult cbRootIntrospection(DBusConnection *conn, DBusMessage *msg, void *reference);
+ DBusObjectPathVTable mObjectPathVTable;
+ DBusConnection* mDbusConnection;
+ DBusError mDBusError;
+ std::list<std::string> mNodesList;
+};
+
+#endif /* DBUSWRAPPER_H_ */
+++ /dev/null
-<node>
- <interface name="org.Genivi.ControllerInterface">
- <method name="getListSources">
- <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QList < SourceType > "/>
- <arg type="a(si)" name="SourceList" direction="out"></arg>
- </method>
- <method name="getListSinks">
- <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QList < SinkType >"/>
- <arg type="a(si)" name="SinkList" direction="out"></arg>
- </method>
- <method name="getListConnections">
- <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QList < ConnectionType >"/>
- <arg type="a(ii)" name="ConnectionList" direction="out"></arg>
- </method>
- <method name="connect">
- <arg name="Source_ID" type="i" direction="in" />
- <arg name="Sink_ID" type="i" direction="in" />
- <arg name="returnValue" type="i" direction="out" />
- </method>
- <method name="disconnect">
- <arg name="Source_ID" type="i" direction="in" />
- <arg name="Sink_ID" type="i" direction="in" />
- <arg name="returnValue" type="i" direction="out" />
- </method>
- <method name="interruptRequest">
- <arg name="SourceName" type="s" direction="in" />
- <arg name="SinkName" type="s" direction="in" />
- <arg name="InterruptID" type="i" direction="out" />
- </method>
- <method name="interruptResume">
- <arg name="InterruptID" type="i" direction="in" />
- <arg name="returnValue" type="i" direction="out" />
- </method>
- <method name="setVolume">
- <arg name="SinkID" type="i" direction="in" />
- <arg name="Volume" type="i" direction="in" />
- <arg name="returnValue" type="i" direction="out" />
- </method>
- <signal name="signal_connectionChanged"/>
- <signal name="signal_numberOfSinksChanged"/>
- <signal name="signal_numberOfSourcesChanged"/>
-</node>
+++ /dev/null
-<node>
- <interface name="com.genivi.routing">
- <method name="registerSource">
- <arg name="name" type="s" direction="in" />
- <arg name="audioclass" type="s" direction="in" />
- <arg name="domain" type="s" direction="in"/>
- <arg name="assigned_adress" type="i" direction="out"/>
- </method>
- <method name="registerDomain">
- <arg name="name" type="s" direction="in" />
- <arg name="node" type="s" direction="in" />
- <arg name="earlymode" type="b" direction="in"/>
- <arg name="assigned_adress" type="i" direction="out"/>
- </method>
- <method name="registerSink">
- <arg name="name" type="s" direction="in" />
- <arg name="sinkclass" type="s" direction="in" />
- <arg name="domain" type="s" direction="in"/>
- <arg name="assigned_adress" type="i" direction="out"/>
- </method>
- <method name="registerGateway">
- <arg name="name" type="s" direction="in" />
- <arg name="sink" type="s" direction="in" />
- <arg name="source" type="s" direction="in" />
- <arg name="domainSource" type="s" direction="in"/>
- <arg name="domainSink" type="s" direction="in"/>
- <arg name="controlDomain" type="s" direction="in"/>
- <arg name="assigned_adress" type="i" direction="out"/>
- </method>
- <method name="peekDomain">
- <arg name="name" type="s" direction="in" />
- <arg name="assigned_adress" type="i" direction="out"/>
- </method>
- <method name="ackConnect">
- <arg name="handle" type="i" direction="in" />
- <arg name="error" type="i" direction="in"/>
- </method>
-
- <signal name="signal_systemReady"/>
-</node>
+++ /dev/null
-<node>
- <interface name="org.genivi.pulse">
- <method name="connect">
- <arg name="sourceID" type="i" direction="in" />
- <arg name="sinkID" type="i" direction="in" />
- <arg name="connectionID" type="i" direction="in" />
- <arg name="answer" type="i" direction="out"/>
- </method>
- <method name="disconnect">
- <arg name="connectionID" type="i" direction="in" />
- <arg name="answer" type="i" direction="out"/>
- </method>
- <method name="setSinkVolume">
- <arg name="volume" type="i" direction="in" />
- <arg name="sinkID" type="i" direction="in" />
- <arg name="answer" type="i" direction="out"/>
- </method>
- <method name="setSourceVolume">
- <arg name="volume" type="i" direction="in" />
- <arg name="sourceID" type="i" direction="in" />
- <arg name="answer" type="i" direction="out"/>
- </method>
- <method name="muteSink">
- <arg name="sinkID" type="i" direction="in" />
- <arg name="answer" type="i" direction="out"/>
- </method>
- <method name="muteSource">
- <arg name="sourceID" type="i" direction="in" />
- <arg name="answer" type="i" direction="out"/>
- </method>
- <method name="unmuteSink">
- <arg name="sinkID" type="i" direction="in" />
- <arg name="answer" type="i" direction="out"/>
- </method>
- <method name="unmuteSource">
- <arg name="sourceID" type="i" direction="in" />
- <arg name="answer" type="i" direction="out"/>
- </method>
-</node>
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
# by quotes) that should identify the project.
-PROJECT_NAME = AudioGui
+PROJECT_NAME = AudioManagerInterfaces
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
# This could be handy for archiving the generated documentation or
# If a relative path is entered, it will be relative to the location
# where doxygen was started. If left blank the current directory will be used.
-OUTPUT_DIRECTORY =
+OUTPUT_DIRECTORY = doc
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
# 4096 sub-directories (in 2 levels) under the output directory of each output
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
-INPUT = @CMAKE_CURRENT_SOURCE_DIR@
+INPUT = "."
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
--- /dev/null
+/**\r
+* Copyright (C) 2011, BMW AG\r
+*\r
+* GeniviAudioMananger\r
+*\r
+* \file \r
+*\r
+* \date 20-Oct-2011 3:42:04 PM\r
+* \author Christian Mueller (christian.ei.mueller@bmw.de)\r
+*\r
+* \section License\r
+* GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)\r
+* Copyright (C) 2011, BMW AG Christian M?ller Christian.ei.mueller@bmw.de\r
+*\r
+* This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.\r
+* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.\r
+* You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.\r
+* Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.\r
+* Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.\r
+* As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.\r
+* Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.\r
+*\r
+* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN\r
+*/\r
+#if !defined(EA_230AE76E_21DF_4db5_8CCF_28FE84E8215D__INCLUDED_)\r
+#define EA_230AE76E_21DF_4db5_8CCF_28FE84E8215D__INCLUDED_\r
+\r
+#include <stdint.h>\r
+#include "projecttypes.h"\r
+#include <string>\r
+#include <vector>\r
+\r
+#define AM_MUTE -3000
+
+namespace am {
+ /**
+ * This is the domain type. Each domain has a unique identifier.\r
+ * \r
+ * \mainpage\r
+ * \image html "Bild1.png"\r
+ * Copyright Copyright (C) 2011, BMW AG\r
+ * \r
+ * \date 22.06.2011\r
+ * \r
+ * \author Christian Mueller (christian.ei.mueller@bmw.de)\r
+ * \r
+ * \par About AudioManagerInterfaces\r
+ * The AudioManager is a Deamon that manages all Audio Connections in a GENIVI headunit.\r
+ * It is a managing instance that uses so called RoutingAdaptors to control AudioDomains that then do the "real" connections.\r
+ * \r
+ * \par More information\r
+ * can be found at https://collab.genivi.org/wiki/display/genivi/GENIVI+Home \n \n \n \n\r
+ * \r
+ * \section architecture Architecture Overview\r
+ * \r
+ * The architecture concept bases on the partition of management (logic) and routing (action). Sinks and sources are clustered into independent parts which are capable of exchanging audio with each other (AudioDomains). Between these AudioDomains, Audio can be interchanged via Gateways. \n\r
+ * Since the routing and the management shall be independent from the actual used system, it is realized as an OwnedComponent, the AudioManager. Each AudioDomain has a Routing Adapter which implements some necessary logic and is the interface between the AudioManager and the AudioDomains.\r
+ * \r
+ * \section domains Audio Domains\r
+ * \r
+ * An Audio Domain consists of sinks and sources that can exchange audio with each other. To make the most out of the concept, AudioDomains shall be chosen in such a way that they are implemented by already existing audio routing engines.\r
+ * \r
+ * The AudioManager assumes that there are no restrictions in interconnection of sinks and sources. One or more sources can be connected to one sink and one or more sinks can be connected to one source. Since real hardware or software might end up in having restrictions, the knowledge of this must exist in the AudioManager and handled by him accordingly. This shall be accomplished via a plug-in mechanism. An AudioDomain is not tied to a hardware or software implementation. It can be software or hardware or even a combination of both. \n\r
+ * \r
+ * Examples for possible audio domains:\n\r
+ * PulseAudio, Alsa, Jack, DSP, FPGA, MOST, In-chip switching matrix\n\r
+ * \r
+ * The clustering and usage of the AudioDomains will vary from each product. Care must be taken while choosing the right AudioDomains in regards to system load (due to resampling), latency and of course flexibility.\n\r
+ * In special implementations of the AudioDomain, it is capable of operation a certain time without interaction to the AudioManager. This is needed to fulfill the requirements for Early & Late Audio, more information can be found below.\r
+ * \r
+ * \section routing_adaptor Routing Adapter\r
+ * \r
+ * Via this adapter, the interconnection from the AudioManager to the AudioDomains is accomplished. An AudioDomain shall have exactly one RoutingAdapter. In the terms of GENIVI, a RoutingAdapter is an AbstractComponent, this means that we define an API and a certain behavior in UML models but do not maintain components itself. Existing implementations from Proof of Concepts are shipped as example Adapters "as is" but cannot be seen as maintained components.\n\r
+ * The implementation of a routing adapter can and will vary from each project to another since the combination of sinks and sources, the used hardware etc has influence on the adapters. Besides interchanging and abstracting information between the AudioManager and the sinks and sources, the Adapters also need to implement some business logic in order to interact with the AudioManager. This includes for example the registering of components, managing the current state, error handling etc.\n\r
+ * In the special case of an EarlyDomain, the routing adapter also has to manage start-up and rundown including persistence for his domain while the AudioManager is not started or already stopped. During this periods of time, these special adapters have to be able to fulfill basic tasks like changing volumes, for example (this implies that the Adapter is implemented on a different piece of hardware, e.g. vehicle processor).\r
+ * \r
+ * \section Gateway\r
+ * \r
+ * Gateways are used to let audio flow between two domains. They always have a direction and can only transport one stream at a time. Several gateways connecting the same domains together can exist in parallel so that more than one source can be connected to more than one sink from the same domains at the same time.\n\r
+ * The representation of a Gateway in the domain which originates the audio is a sink. In the receiving domain, the gateway appears as a source. The AudioManager knows about the Gateways, in terms of connection, it handles it as simple sources and sinks.\r
+ * \r
+ * \section AudioManagerDaemon\r
+ * \r
+ * The AudioManager is the central managing instance of the Audio architecture. It is designed as an OwnedComponent, this means that the software is maintained within GENIVI as open source component. The AudioManager consists of 4 central components.\n\r
+ * \r
+ * GOwnedComponent: AudioManager Daemon\n\r
+ * \r
+ * This component is owned and maintained by Genivi. It is the central audio framework component. There can be only one daemon in a system (singleton).\r
+ * \r
+ * \subsection controlinterface Control Interface Plugin\r
+ * \r
+ * This describes the interface towards the Controlling Instances of the AudioManagerDaemon. This is the HMI and interrupt sources that use this interface to start their interrupt and stop it again. The interface shall be asynchronous. Via this interface all user interactions are handled.\r
+ * \r
+ * \subsection routinginterface Routing Interface Plugin\r
+ * \r
+ * This interface is used by the AudioManager to control the RoutingAdapters and communicate with them. The communication is based on two interfaces, one is provided by the AudioManager for communication from the adapters towards the AudioManager and one for the opposite direction. The design of the AudioManager shall be done in such a way that several Interfaces are supported at the same time via a plug-in mechanism. The plug-ins are (either statically - due to performance reasons or dynamically) loaded at start-up. Due to this architecture, the number of buses and routing adapters that are supported are as low as possible for each system and as high as needed without the need of changing the AudioManager itself. The AudioManager expects a bus-like structure behind each plug-in, so that a plug-in can implement a bus interface and proxy the messages to the routing adapters - the AudioManager will be capable of addressing more than one adapter one each plug-in. The interface shall is asynchronous for all timely critical commands.\r
+ * \r
+ * \section sources_sinks Sources & Sinks\r
+ * \subsection Visibility\r
+ * Sources and sinks can either be visible or not. If they are visible, the HMI is informed about their existence and can use them. \n\r
+ * Invisible Sources and Sinks either are system only relevant (e.g. an audio processing that has a source and a sink) or belong to a gateway.\r
+ * \r
+ * \subsection Availability\r
+ * It can be the case, that sources and sinks are present in the system but cannot be used at the moment. This is indicated via the availability. A sample use-case for this feature is CD drive that shall only be available if a CD is inserted.\r
+ * \r
+ * \section Interrupts\r
+ * \subsection llinterrupts Low level interrupts\r
+ * \todo write low level Interrupts description\r
+ * \r
+ * \subsection Interrupts\r
+ * \todo write Interrupts description\r
+ * \r
+ * \section Persistency\r
+ * It is the job of the AudioManagerController to handle the persistency. It is planned to expose an interface via the ControlInterface to accomplish this but the GENIVI persistance is not ready yet. \n\r
+ * \r
+ * \r
+ * \section speed Speed dependent volume\r
+ * The adjustments for the speed are done product specific in the controller. The speed information itself is retrieved by the AudioManagerDaemon, sampled and quantified and forwarded to the controller.\n\r
+ * Turning speed controlled volume on/off and possible settings are achieved via SinkSoundProperty settings.\r
+ * \r
+ * \section Lipsync\r
+ * It is the job of the AudioManager to retrieve all latency timing information from each connection, to aggregate this information and provide a latency information on a per MainConnection Basis. It is not the task of the AudioManager to actually delay or speed up video or audio signals to achieve a lipsync. The actual correction shall be done in the videoplayer with the information provided by the AudioManager.\r
+ * The time information is always reported by the routingadaptors for each connection. Delays that are introduced in a sink or a gateway are counting for the connection that connects to this sink or gateway.\n\r
+ * After the buildup of a connection the first timing information needs to be sent within 5 seconds, the timing information from the routing adaptors need to be sent via 4 seconds. If the latency for a connection is variable and changes over lifetime of the connection, the routing adaptors shall resend the value and the audiomanger will correct the over all latency.\n
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:09 PM
+ */
+ typedef uint16_t am_domainID_t;
+
+ /**
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:09 PM
+ */
+ typedef uint16_t am_sourceID_t;
+
+ /**
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:09 PM
+ */
+ typedef uint16_t am_sinkID_t;
+
+ /**
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:09 PM
+ */
+ typedef uint16_t am_gatewayID_t;
+
+ /**
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:09 PM
+ */
+ typedef uint16_t am_crossfaderID_t;
+
+ /**
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:09 PM
+ */
+ typedef uint16_t am_connectionID_t;
+
+ /**
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:09 PM
+ */
+ typedef uint16_t am_mainConnectionID_t;
+
+ /**
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:09 PM
+ */
+ typedef uint16_t am_speed_t;
+
+ /**
+ * The unit is 0.1 db steps,The smallest value -3000 (=AM_MUTE). The minimum and maximum can be limited by actual project.
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:09 PM
+ */
+ typedef int16_t am_volume_t;
+
+ /**
+ * This is the volume presented on the command interface. It is in the duty of the Controller to change the volumes given here into meaningful values on the routing interface.\r
+ * The range of this type is customer specific.
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:09 PM
+ */
+ typedef int16_t am_mainVolume_t;
+
+ /**
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:09 PM
+ */
+ typedef uint16_t am_sourceClass_t;
+
+ /**
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:09 PM
+ */
+ typedef uint16_t am_sinkClass_t;
+
+ /**
+ * time in ms!
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:09 PM
+ */
+ typedef uint16_t am_time_t;
+
+ /**
+ * offset time that is introduced in milli seconds.
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:09 PM
+ */
+ typedef int16_t am_timeSync_t;
+
+ /**
+ * with the help of this enum, sinks and sources can report their availability state
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:09 PM
+ */
+ enum am_Availablility_e
+ {
+ A_AVAILABLE = 0,
+ A_UNAVAILABLE,
+ A_UNKNOWN,
+ A_MAX,
+ A_MIN = A_AVAILABLE
+ };
+
+ /**
+ * represents the connection state
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:09 PM
+ */
+ enum am_ConnectionState_e
+ {
+ /**
+ * This means the connection is just building up
+ */
+ CS_CONNECTING = 0,
+ /**
+ * the connection is ready to be used
+ */
+ CS_CONNECTED,
+ /**
+ * the connection is in the course to be knocked down
+ */
+ CS_DISCONNECTING,
+ /**
+ * only relevant for connectionStatechanged. Is send after the connection was removed
+ */
+ CS_DISCONNECTED,
+ /**
+ * this means the connection is still build up but unused at the moment
+ */
+ CS_SUSPENDED,
+ CS_MAX,
+ CS_MIN = CS_CONNECTING
+ };
+
+ /**
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:09 PM
+ */
+ enum am_DomainState_e
+ {
+ DS_CONTROLLED = 0,
+ DS_INDEPENDENT_STARTUP,
+ DS_INDEPENDENT_RUNDOWN,
+ DS_MAX,
+ DS_MIN = DS_CONTROLLED
+ };
+
+ /**
+ * This enum characterizes the data of the EarlyData_t
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:09 PM
+ */
+ enum am_EarlyDataType_e
+ {
+ ED_SOURCE_VOLUME = 0,
+ ED_SINK_VOLUME,
+ ED_SOURCE_PROPERTY,
+ ED_SINK_PROPERTY,
+ ED_MAX,
+ ES_MIN = ED_SOURCE_VOLUME
+ };
+
+ /**
+ * the errors of the audiomanager. All possible errors are in here. This enum is used widely as return parameter.
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:09 PM
+ */
+ enum am_Error_e
+ {
+ E_OK = 0,
+ E_UNKNOWN,
+ E_OUT_OF_RANGE,
+ E_NOT_USED,
+ E_DATABASE_ERROR,
+ E_ALREADY_EXISTS,
+ E_NO_CHANGE,
+ E_NOT_POSSIBLE,
+ E_NON_EXISTENT,
+ E_ABORTED,
+ /**
+ * This error is returned in case a connect is issued with a connectionFormat that cannot be selected for the connection. This could be either due to the capabilities of a source or a sink or gateway compatibilities for example
+ */
+ E_WRONG_FORMAT,
+ E_MAX,
+ E_MIN = E_OK
+ };
+
+ /**
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:09 PM
+ */
+ enum am_MuteState_e
+ {
+ MS_MUTED = 0,
+ MS_UNMUTED,
+ MS_MAX,
+ MS_MIN = MS_MUTED
+ };
+
+ /**
+ * The source state reflects the state of the source
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:09 PM
+ */
+ enum am_SourceState_e
+ {
+ /**
+ * The source can be activly heared
+ */
+ SS_ON = 0,
+ /**
+ * The source cannot be heared
+ */
+ SS_OFF,
+ /**
+ * The source is paused. Meaning it cannot be heared but should be prepared to play again soon.
+ */
+ SS_PAUSED,
+ SS_MAX,
+ SS_MIN = SS_ON
+ };
+
+ /**
+ * This enumeration is used to define the type of the action that is correlated to a handle.
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:09 PM
+ */
+ enum am_Handle_e
+ {
+ H_CONNECT = 0,
+ H_DISCONNECT,
+ H_SETSOURCESTATE,
+ H_SETSINKVOLUME,
+ H_SETSOURCEVOLUME,
+ H_SETSINKSOUNDPROPERTY,
+ H_SETSOURCESOUNDPROPERTY,
+ H_CROSSFADE,
+ H_MAX,
+ H_MIN = H_CONNECT
+ };
+
+ /**
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:09 PM
+ */
+ enum am_InterruptState_e
+ {
+ IS_OFF = 0,
+ IS_INTERRUPTED,
+ IS_MAX,
+ IS_MIN = IS_OFF
+ };
+
+ /**
+ * describes the active sink of a crossfader.
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:09 PM
+ */
+ enum am_HotSink_e
+ {
+ HS_SINKA = 0,
+ HS_SINKB,
+ HS_INTERMEDIATE,
+ HS_MAX,
+ HS_MIN = HS_SINKA
+ };
+
+ /**
+ * this describes the availability of a sink or a source together with the latest change
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:09 PM
+ */
+ struct am_Availability_s
+ {
+
+ public:
+ /**
+ * the current availability state
+ */
+ am_Availablility_e availability;
+ /**
+ * the reason for the last change. This can be used to trigger events that deal with state changes.
+ */
+ am_AvailabilityReason_e availabilityReason;
+
+ };
+
+ /**
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:09 PM
+ */
+ struct am_ClassProperty_s
+ {
+
+ public:
+ am_ClassProperty_e classProperty;
+ int16_t value;
+
+ };
+
+ /**
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:10 PM
+ */
+ struct am_Crossfader_s
+ {
+
+ public:
+ am_crossfaderID_t crossfaderID;
+ std::string name;
+ am_sinkID_t sinkID_A;
+ am_sinkID_t sinkID_B;
+ am_sourceID_t sourceID;
+ am_HotSink_e hotSink;
+
+ };
+
+ /**
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:10 PM
+ */
+ struct am_Gateway_s
+ {
+
+ public:
+ am_gatewayID_t gatewayID;
+ std::string name;
+ am_sinkID_t sinkID;
+ am_sourceID_t sourceID;
+ am_domainID_t domainSinkID;
+ am_domainID_t domainSourceID;
+ am_domainID_t controlDomainID;
+ std::vector<am_ConnectionFormat_e> listSourceFormats;
+ std::vector<am_ConnectionFormat_e> listSinkFormats;
+ /**
+ * This is matrix holding information about the conversion capability of the gateway, it's length is defined by the length(listSinkFormats) x length(listSourceFormats).\r
+ * If a SinkFormat can be converted into a SourceFormat, the vector will hold a 1, if no conversion is possible, a 0.\r
+ * The data is stored row orientated, where the rows are related to the sinksFormats and the columns to the sourceFormats. The first value will hold the conversion information from the first sourceFormat to the first sinkFormat for example and the seventh value the information about the 3rd sinkFormat to the 1st sourceFormat in case we would have 3 sourceFormats.\r
+ * \r
+ * This matrix \r
+ * 110 011 000 111 001\r
+ * \r
+ * reads as this:\r
+ * Source\r
+ * ** 1 2 3 \r
+ * *********************\r
+ * S 1* 1 1 0 \r
+ * i 2* 0 1 1\r
+ * n 3* 0 0 0\r
+ * k 4* 1 1 1\r
+ * 5* 0 0 1
+ */
+ std::vector<bool> convertionMatrix;
+
+ };
+
+ /**
+ * This represents one "hopp" in a route
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:10 PM
+ */
+ struct am_RoutingElement_s
+ {
+
+ public:
+ am_sourceID_t sourceID;
+ am_sinkID_t sinkID;
+ am_domainID_t domainID;
+ am_ConnectionFormat_e connectionFormat;
+
+ };
+
+ /**
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:10 PM
+ */
+ struct am_Route_s
+ {
+
+ public:
+ am_sourceID_t sourceID;
+ am_sinkID_t sinkID;
+ std::vector<am_RoutingElement_s> route;
+
+ };
+
+ /**
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:10 PM
+ */
+ struct am_SoundProperty_s
+ {
+
+ public:
+ am_SoundPropertyType_e type;
+ int16_t value;
+
+ };
+
+ /**
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:10 PM
+ */
+ struct am_SystemProperty_s
+ {
+
+ public:
+ /**
+ * the type that is set
+ */
+ am_SystemPropertyType_e type;
+ /**
+ * the value
+ */
+ int16_t value;
+
+ };
+
+ /**
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:10 PM
+ */
+ struct am_SinkClass_s
+ {
+
+ public:
+ am_sinkClass_t sinkClassID;
+ std::string name;
+ std::vector<am_ClassProperty_s> listClassProperties;
+
+ };
+
+ /**
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:10 PM
+ */
+ struct am_SourceClass_s
+ {
+
+ public:
+ /**
+ * the source ID
+ */
+ am_sourceClass_t sourceClassID;
+ std::string name;
+ std::vector<am_ClassProperty_s> listClassProperties;
+
+ };
+
+ /**
+ * this type holds all information of sources relevant to the HMI
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:10 PM
+ */
+ struct am_SourceType_s
+ {
+
+ public:
+ am_sourceID_t sourceID;
+ std::string name;
+ am_Availability_s availability;
+ am_sourceClass_t sourceClassID;
+
+ };
+
+ /**
+ * this type holds all information of sinks relevant to the HMI
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:11 PM
+ */
+ struct am_SinkType_s
+ {
+
+ public:
+ am_sinkID_t sinkID;
+ std::string name;
+ am_Availability_s availability;
+ am_mainVolume_t volume;
+ am_MuteState_e muteState;
+ am_sinkClass_t sinkClassID;
+
+ };
+
+ /**
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:11 PM
+ */
+ struct am_Handle_s
+ {
+
+ public:
+ am_Handle_e handleType:4;
+ uint16_t handle:12;
+
+ };
+
+ /**
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:11 PM
+ */
+ struct am_MainSoundProperty_s
+ {
+
+ public:
+ am_MainSoundPropertyType_e type;
+ int16_t value;
+
+ };
+
+ /**
+ * this type holds all information of connections relevant to the HMI
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:11 PM
+ */
+ struct am_MainConnectionType_s
+ {
+
+ public:
+ am_mainConnectionID_t mainConnectionID;
+ am_sourceID_t sourceID;
+ am_sinkID_t sinkID;
+ am_timeSync_t delay;
+ am_ConnectionState_e connectionState;
+
+ };
+
+ /**
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:11 PM
+ */
+ struct am_MainConnection_s
+ {
+
+ public:
+ am_mainConnectionID_t connectionID;
+ am_ConnectionState_e connectionState;
+ am_Route_s route;
+ am_timeSync_t delay;
+
+ };
+
+ /**
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:11 PM
+ */
+ struct am_Sink_s
+ {
+
+ public:
+ am_sinkID_t sinkID;
+ std::string name;
+ am_domainID_t domainID;
+ am_sinkClass_t sinkClassID;
+ am_volume_t volume;
+ bool visible;
+ am_Availability_s available;
+ am_MuteState_e muteState;
+ am_mainVolume_t mainVolume;
+ std::vector<am_SoundProperty_s> listSoundProperties;
+ std::vector<am_ConnectionFormat_e> listConnectionFormats;
+ std::vector<am_MainSoundProperty_s> listMainSoundProperties;
+
+ };
+
+ /**
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:11 PM
+ */
+ struct am_Source_s
+ {
+
+ public:
+ am_sourceID_t sourceID;
+ am_domainID_t domainID;
+ std::string name;
+ am_sourceClass_t sourceClassID;
+ am_SourceState_e sourceState;
+ am_volume_t volume;
+ bool visible;
+ am_Availability_s available;
+ am_InterruptState_e interruptState;
+ /**
+ * This list holds all soundProperties of the source
+ */
+ std::vector<am_SoundProperty_s> listSoundProperties;
+ /**
+ * list of the supported ConnectionFormats
+ */
+ std::vector<am_ConnectionFormat_e> listConnectionFormats;
+ /**
+ * This list holds all MainSoundProperties of the source (all the ones that can be set via the HMI)
+ */
+ std::vector<am_MainSoundProperty_s> listMainSoundProperties;
+
+ };
+
+ /**
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:12 PM
+ */
+ struct am_Domain_s
+ {
+
+ public:
+ am_domainID_t domainID;
+ std::string name;
+ std::string busname;
+ std::string nodename;
+ bool early;
+ bool complete;
+ am_DomainState_e state;
+
+ };
+
+ /**
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:12 PM
+ */
+ struct am_Connection_s
+ {
+
+ public:
+ am_connectionID_t connectionID;
+ am_sourceID_t sourceID;
+ am_sinkID_t sinkID;
+ am_timeSync_t delay;
+ am_ConnectionFormat_e connectionFormat;
+
+ };
+
+ /**
+ * data type depends of am_EarlyDataType_e:\r
+ * volume_t in case of ED_SOURCE_VOLUME, ED_SINK_VOLUME \r
+ * soundProperty_t in case of ED_SOURCE_PROPERTY, ED_SINK_PROPERTY
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:12 PM
+ */
+ union am_EarlyData_u
+ {
+
+ public:
+ am_volume_t volume;
+ am_SoundProperty_s soundProperty;
+
+ };
+
+ /**
+ * data type depends of am_EarlyDataType_e:\r
+ * sourceID in case of ED_SOURCE_VOLUME, ED_SOURCE_PROPERTY\r
+ * sinkID in case of ED_SINK_VOLUME, ED_SINK_PROPERTY
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:12 PM
+ */
+ union am_DataType_u
+ {
+
+ public:
+ am_sinkID_t sink;
+ am_sourceID_t source;
+
+ };
+
+ /**
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:12 PM
+ */
+ struct am_EarlyData_s
+ {
+
+ public:
+ am_EarlyDataType_e type;
+ am_DataType_u sinksource;
+ am_EarlyData_u data;
+
+ };
+}
+#endif // !defined(EA_230AE76E_21DF_4db5_8CCF_28FE84E8215D__INCLUDED_)
--- /dev/null
+/**\r
+* Copyright (C) 2011, BMW AG\r
+*\r
+* GeniviAudioMananger\r
+*\r
+* \file \r
+*\r
+* \date 20-Oct-2011 3:42:04 PM\r
+* \author Christian Mueller (christian.ei.mueller@bmw.de)\r
+*\r
+* \section License\r
+* GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)\r
+* Copyright (C) 2011, BMW AG Christian M?ller Christian.ei.mueller@bmw.de\r
+*\r
+* This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.\r
+* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.\r
+* You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.\r
+* Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.\r
+* Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.\r
+* As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.\r
+* Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.\r
+*\r
+* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN\r
+*/\r
+#if !defined(EA_319110B3_2FDC_4a9a_8267_033D5DB6D48E__INCLUDED_)\r
+#define EA_319110B3_2FDC_4a9a_8267_033D5DB6D48E__INCLUDED_\r
+\r
+#include <vector>\r
+#include <string>\r
+#include "../audiomanagertypes.h"\r
+class DBusWrapper;\r
+
+
+namespace am {
+ /**
+ * The interface towards the Controlling Instance (e.g HMI). It handles the communication towards the HMI and other system components who need to interact with the audiomanagement.
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:13 PM
+ */
+ class CommandReceiveInterface
+ {
+
+ public:
+ /**
+ * connects a source to sink\r
+ * @return E_OK on success, E_NOT_POSSIBLE on failure, E_ALREADY_EXISTS if the connection does already exists
+ *
+ * @param sourceID
+ * @param sinkID
+ * @param mainConnectionID
+ */
+ virtual am_Error_e connect(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t& mainConnectionID) =0;
+ /**
+ * disconnects a mainConnection\r
+ * @return E_OK on successes, E_NON_EXISTENT if the connection does not exist, E_NOT_POSSIBLE on error.
+ *
+ * @param mainConnectionID
+ */
+ virtual am_Error_e disconnect(const am_mainConnectionID_t mainConnectionID) =0;
+ /**
+ * sets the volume for a sink\r
+ * @return E_OK on success, E_UNKOWN on error, E_OUT_OF_RANGE in case the value is out of range
+ *
+ * @param sinkID the sink
+ * @param volume the volume
+ */
+ virtual am_Error_e setVolume(const am_sinkID_t sinkID, const am_mainVolume_t volume) =0;
+ /**
+ * This function is used to increment or decrement the current volume for a sink.\r
+ * @return E_OK on success, E_UNKNOWN on error and E_OUT_OF_RANGE if the value is not in the given volume range.
+ *
+ * @param sinkID
+ * @param volumeStep indicated the number of steps that should be incremented or decremented. Positive values here inkrement, negative values decrement
+ */
+ virtual am_Error_e volumeStep(const am_sinkID_t sinkID, const int16_t volumeStep) =0;
+ /**
+ * sets the mute state of a sink\r
+ * @return E_OK on success, E_UNKNOWN on error. If the mute state is already the desired one, the Daemon will return E_OK.
+ *
+ * @param sinkID
+ * @param muteState
+ */
+ virtual am_Error_e setSinkMuteState(const am_sinkID_t sinkID, const am_MuteState_e muteState) =0;
+ /**
+ * This method is used to set sound properties, e.g. Equalizer Values. Since the capabilities of the system can differ, the exact key value pairs can be extended in each product\r
+ * @return E_OK on success, E_OUT_OF_RANGE if value exceeds range, E_UNKNOWN in case of an error
+ *
+ * @param soundProperty
+ * @param sinkID
+ */
+ virtual am_Error_e setMainSinkSoundProperty(const am_MainSoundProperty_s& soundProperty, const am_sinkID_t sinkID) =0;
+ /**
+ * This method is used to set sound properties, e.g. Equalizer Values. Since the capabilities of the system can differ, the exact key value pairs can be extended in each product\r
+ * @return E_OK on success, E_OUT_OF_RANGE if value exceeds range, E_UNKNOWN in case of an error
+ *
+ * @param soundProperty
+ * @param sourceID
+ */
+ virtual am_Error_e setMainSourceSoundProperty(const am_MainSoundProperty_s& soundProperty, const am_sourceID_t sourceID) =0;
+ /**
+ * is used to set a specific system property.\r
+ * @return E_OK on success, E_OUT_OF_RANGE if value exceeds range, E_UNKNOWN in case of an error
+ *
+ * @param property the property that shall be set
+ */
+ virtual am_Error_e setSystemProperty(const am_SystemProperty_s& property) =0;
+ /**
+ * returns the actual list of MainConnections\r
+ * @return E_OK on success, E_DATABASE_ERROR on error
+ *
+ * @param listConnections returns a list of all connections
+ */
+ virtual am_Error_e getListMainConnections(std::vector<am_MainConnectionType_s>& listConnections) const =0;
+ /**
+ * returns the actual list of Sinks\r
+ * @return E_OK on success, E_DATABASE_ERROR on error
+ *
+ * @param listMainSinks the list of the sinks
+ */
+ virtual am_Error_e getListMainSinks(std::vector<am_SinkType_s>& listMainSinks) const =0;
+ /**
+ * returns the actual list of Sources\r
+ * @return E_OK on success, E_DATABASE_ERROR on error
+ *
+ * @param listMainSources the list of sources
+ */
+ virtual am_Error_e getListMainSources(std::vector<am_SourceType_s>& listMainSources) const =0;
+ /**
+ * This is used to retrieve all source sound properties related to a source. Returns a vector of the sound properties and values as pair\r
+ * @return E_OK on success, E_DATABASE_ERROR on error
+ *
+ * @param sinkID
+ * @param listSoundProperties
+ */
+ virtual am_Error_e getListMainSinkSoundProperties(const am_sinkID_t sinkID, std::vector<am_MainSoundProperty_s>& listSoundProperties) const =0;
+ /**
+ * This is used to retrieve all source sound properties related to a source.\r
+ * @return E_OK on success, E_DATABASE_ERROR on error
+ *
+ * @param sourceID
+ * @param listSourceProperties
+ */
+ virtual am_Error_e getListMainSourceSoundProperties(const am_sourceID_t sourceID, std::vector<am_MainSoundProperty_s>& listSourceProperties) const =0;
+ /**
+ * This is used to retrieve SourceClass Information of all source classes \r
+ * @return E_OK on success, E_DATABASE_ERROR on error
+ *
+ * @param listSourceClasses
+ */
+ virtual am_Error_e getListSourceClasses(std::vector<am_SourceClass_s>& listSourceClasses) const =0;
+ /**
+ * This is used to retrieve SinkClass Information of all sink classes \r
+ * @return E_OK on success, E_DATABASE_ERROR on error
+ *
+ * @param listSinkClasses
+ */
+ virtual am_Error_e getListSinkClasses(std::vector<am_SinkClass_s>& listSinkClasses) const =0;
+ /**
+ * Retrieves a complete list of all systemProperties.\r
+ * @return E_OK on success, E_DATABASE_ERROR on error
+ *
+ * @param listSystemProperties
+ */
+ virtual am_Error_e getListSystemProperties(std::vector<am_SystemProperty_s>& listSystemProperties) const =0;
+ /**
+ * returns the delay in ms that the audiopath for the given mainConnection has\r
+ * @return E_OK on success, E_NOT_POSSIBLE if timing information is not yet retrieved, E_DATABASE_ERROR on read error on the database
+ *
+ * @param mainConnectionID
+ * @param delay
+ */
+ virtual am_Error_e getTimingInformation(const am_mainConnectionID_t mainConnectionID, am_timeSync_t& delay) const =0;
+ /**
+ * this function is used to retrieve a pointer to the dBusConnectionWrapper\r
+ * @return E_OK if pointer is valid, E_UKNOWN on error
+ *
+ * @param dbusConnectionWrapper This is a wrapper class that is needed to keep dbus inclusions away from the interface. The DBusWrapperClass will return the pointer to the DbusConnection call (getDBusConnection)
+ */
+ virtual am_Error_e getDBusConnectionWrapper(DBusWrapper*& dbusConnectionWrapper) const =0;
+
+ };
+}
+#endif // !defined(EA_319110B3_2FDC_4a9a_8267_033D5DB6D48E__INCLUDED_)
--- /dev/null
+/**\r
+* Copyright (C) 2011, BMW AG\r
+*\r
+* GeniviAudioMananger\r
+*\r
+* \file \r
+*\r
+* \date 20-Oct-2011 3:42:04 PM\r
+* \author Christian Mueller (christian.ei.mueller@bmw.de)\r
+*\r
+* \section License\r
+* GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)\r
+* Copyright (C) 2011, BMW AG Christian M?ller Christian.ei.mueller@bmw.de\r
+*\r
+* This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.\r
+* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.\r
+* You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.\r
+* Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.\r
+* Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.\r
+* As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.\r
+* Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.\r
+*\r
+* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN\r
+*/\r
+#if !defined(EA_6CB1E10C_DCF5_48af_9B00_98330CA044BB__INCLUDED_)\r
+#define EA_6CB1E10C_DCF5_48af_9B00_98330CA044BB__INCLUDED_\r
+\r
+#include <vector>\r
+#include <string>\r
+#include "../audiomanagertypes.h"\r
+#include "CommandReceiveInterface.h"
+
+#include "CommandReceiveInterface.h"
+
+namespace am {
+ /**
+ * This interface handles all communication from the AudioManagerDaemon towards the system. It is designed in such a way that only callbacks with no return types are implemented. So when the CommandInterfacePlugins are designed in such a way that they broadcast signals to any node who is interested in the particular information (like signals on Dbus for example), more information can be retrieved via the CommandReceiveInterface.
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:13 PM
+ */
+ class CommandSendInterface
+ {
+
+ public:
+ /**
+ * This command starts the interface, the plugin itself. This is not meant to start communication with the HMI itself. It is a good idea to implement here everything that sets up the basic communication like DbusCommunication etc...\r
+ * @return E_OK on success, E_UNKNOWN on error
+ *
+ * @param commandreceiveinterface pointer to the receive interface. Is used to call the audiomanagerdaemon
+ */
+ virtual am_Error_e startupInterface(CommandReceiveInterface* commandreceiveinterface) =0;
+ /**
+ * This command stops the interface before the plugin is unloaded.\r
+ * @return E_OK on success, E_UNKNOWN on error
+ */
+ virtual am_Error_e stopInterface() =0;
+ /**
+ * This callback is fired when the Interface is ready to be used. Before this command, all communication will be ignored by the Audiomanager
+ */
+ virtual am_Error_e cbCommunicationReady() =0;
+ /**
+ * This callback is fired when the AudioManager is about to rundown. After this command no more action will be carried out by the AudioManager.
+ */
+ virtual am_Error_e cbCommunicationRundown() =0;
+ /**
+ * Callback that is called when the number of connections change
+ */
+ virtual void cbNumberOfMainConnectionsChanged() =0;
+ /**
+ * Callback that is called when the number of sinks change
+ */
+ virtual void cbNumberOfSinksChanged() =0;
+ /**
+ * Callback that is called when the number of sources change
+ */
+ virtual void cbNumberOfSourcesChanged() =0;
+ /**
+ * this callback is fired if the number of sink classes changed
+ */
+ virtual void cbNumberOfSinkClassesChanged() =0;
+ /**
+ * this callback is fired if the number of source classes changed
+ */
+ virtual void cbNumberOfSourceClassesChanged() =0;
+ /**
+ * This callback is called when the ConnectionState of a connection changed.
+ *
+ * @param connectionID
+ * @param connectionState
+ */
+ virtual void cbMainConnectionStateChanged(const am_mainConnectionID_t connectionID, const am_ConnectionState_e connectionState) =0;
+ /**
+ * this callback indicates that a sinkSoundProperty has changed.
+ *
+ * @param sinkID
+ * @param soundProperty
+ */
+ virtual void cbMainSinkSoundPropertyChanged(const am_sinkID_t sinkID, const am_MainSoundProperty_s soundProperty) =0;
+ /**
+ * this callback indicates that a sourceSoundProperty has changed.
+ *
+ * @param sourceID
+ * @param soundProperty
+ */
+ virtual void cbMainSourceSoundPropertyChanged(const am_sourceID_t sourceID, const am_MainSoundProperty_s& soundProperty) =0;
+ /**
+ * this callback is called when the availability of a sink has changed
+ *
+ * @param sinkID
+ * @param availability
+ */
+ virtual void cbSinkAvailabilityChanged(const am_sinkID_t sinkID, const am_Availability_s& availability) =0;
+ /**
+ * this callback is called when the availability of source has changed.
+ *
+ * @param sourceID
+ * @param availability
+ */
+ virtual void cbSourceAvailabilityChanged(const am_sourceID_t sourceID, const am_Availability_s& availability) =0;
+ /**
+ * this callback indicates a volume change on the indicated sink
+ *
+ * @param sinkID
+ * @param volume
+ */
+ virtual void cbVolumeChanged(const am_sinkID_t sinkID, const am_mainVolume_t volume) =0;
+ /**
+ * this callback indicates a mute state change on a sink.
+ *
+ * @param sinkID
+ * @param muteState
+ */
+ virtual void cbSinkMuteStateChanged(const am_sinkID_t sinkID, const am_MuteState_e muteState) =0;
+ /**
+ * is fired if a systemProperty changed
+ *
+ * @param systemProperty
+ */
+ virtual void cbSystemPropertyChanged(const am_SystemProperty_s& systemProperty) =0;
+ /**
+ * this callback is called when the timinginformation for a mainconnection has changed.
+ *
+ * @param mainConnection
+ * @param time
+ */
+ virtual void cbTimingInformationChanged(const am_mainConnectionID_t mainConnection, const am_timeSync_t time) =0;
+
+ };
+}
+#endif // !defined(EA_6CB1E10C_DCF5_48af_9B00_98330CA044BB__INCLUDED_)
--- /dev/null
+/**\r
+* Copyright (C) 2011, BMW AG\r
+*\r
+* GeniviAudioMananger\r
+*\r
+* \file \r
+*\r
+* \date 20-Oct-2011 3:42:04 PM\r
+* \author Christian Mueller (christian.ei.mueller@bmw.de)\r
+*\r
+* \section License\r
+* GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)\r
+* Copyright (C) 2011, BMW AG Christian M?ller Christian.ei.mueller@bmw.de\r
+*\r
+* This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.\r
+* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.\r
+* You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.\r
+* Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.\r
+* Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.\r
+* As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.\r
+* Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.\r
+*\r
+* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN\r
+*/\r
+#if !defined(EA_6440518C_5204_4a7c_A4B6_21BF187D8876__INCLUDED_)\r
+#define EA_6440518C_5204_4a7c_A4B6_21BF187D8876__INCLUDED_\r
+\r
+#include <vector>\r
+#include <string>\r
+#include "../audiomanagertypes.h"
+
+namespace am {
+ /**
+ * This interface gives access to all important functions of the audiomanager that are used by the AudioManagerController to control the system.
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:13 PM
+ */
+ class ControlReceiveInterface
+ {
+
+ public:
+ /**
+ * calculates a route from source to sink.\r
+ * @return E_OK on success, E_UNKNOWN on error
+ *
+ * @param onlyfree if true return only routes which use gateways that are not in use at the moment
+ * @param sourceID
+ * @param sinkID
+ * @param returnList this is a list of routes that are possible to take. unsorted! The longest could be first.\r
+ * In case not route can be found, the list will return empty.
+ */
+ virtual am_Error_e getRoute(const bool onlyfree, const am_sourceID_t sourceID, const am_sinkID_t sinkID, std::vector<am_Route_s>& returnList) =0;
+ /**
+ * With this function, elementary connects can be triggered by the controller.\r
+ * @return E_OK on success, E_UNKNOWN on error, E_WRONG_FORMAT of connectionFormats do not match, E_NO_CHANGE if the desired connection is already build up
+ *
+ * @param handle
+ * @param connectionID
+ * @param format
+ * @param sourceID
+ * @param sinkID
+ */
+ virtual am_Error_e connect(am_Handle_s& handle, am_connectionID_t& connectionID, const am_ConnectionFormat_e format, const am_sourceID_t sourceID, const am_sinkID_t sinkID) =0;
+ /**
+ * is used to disconnect a connection\r
+ * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if connection was not found, E_NO_CHANGE if no change is neccessary
+ *
+ * @param handle
+ * @param connectionID
+ */
+ virtual am_Error_e disconnect(am_Handle_s& handle, const am_connectionID_t connectionID) =0;
+ /**
+ * triggers a cross fade.\r
+ * @return E_OK on success, E_UNKNOWN on error E_NO_CHANGE if no change is neccessary
+ *
+ * @param handle
+ * @param hotSource this is the source that is going to be the active one after the fading
+ * @param crossfaderID
+ * @param rampType
+ * @param rampTime rampTime 0 means default value
+ */
+ virtual am_Error_e crossfade(am_Handle_s& handle, const am_HotSink_e hotSource, const am_crossfaderID_t crossfaderID, const am_RampType_e rampType, const am_time_t rampTime) =0;
+ /**
+ * with this method, all actions that have a handle assigned can be stopped.\r
+ * @return E_OK on success, E_UNKNOWN on error
+ *
+ * @param handle the handle of the action to be stopped
+ */
+ virtual am_Error_e abortAction(const am_Handle_s handle) =0;
+ /**
+ * this method sets a source state for a source. This function will trigger the callback cbAckSetSourceState\r
+ * @return E_OK on success, E_NO_CHANGE if the desired value is already correct, E_UNKNOWN on error, E_NO_CHANGE if no change is neccessary
+ *
+ * @param handle
+ * @param sourceID
+ * @param state
+ */
+ virtual am_Error_e setSourceState(am_Handle_s& handle, const am_sourceID_t sourceID, const am_SourceState_e state) =0;
+ /**
+ * with this function, setting of sinks volumes is done. The behavior of the volume set is depended on the given ramp and time information.\r
+ * This function is not only used to ramp volume, but also to mute and direct set the level. Exact behavior is depended on the selected mute ramps.\r
+ * @return E_OK on success, E_NO_CHANGE if the volume is already on the desired value, E_OUT_OF_RANGE is the volume is out of range, E_UNKNOWN on every other error.
+ *
+ * @param handle
+ * @param sinkID
+ * @param volume
+ * @param ramp
+ * @param time
+ */
+ virtual am_Error_e setSinkVolume(am_Handle_s& handle, const am_sinkID_t sinkID, const am_volume_t volume, const am_RampType_e ramp, const am_time_t time) =0;
+ /**
+ * with this function, setting of source volumes is done. The behavior of the volume set is depended on the given ramp and time information.\r
+ * This function is not only used to ramp volume, but also to mute and direct set the level. Exact behavior is depended on the selected mute ramps.\r
+ * @return E_OK on success, E_NO_CHANGE if the volume is already on the desired value, E_OUT_OF_RANGE is the volume is out of range, E_UNKNOWN on every other error.
+ *
+ * @param handle
+ * @param sourceID
+ * @param volume
+ * @param rampType
+ * @param time
+ */
+ virtual am_Error_e setSourceVolume(am_Handle_s& handle, const am_sourceID_t sourceID, const am_volume_t volume, const am_RampType_e rampType, const am_time_t time) =0;
+ /**
+ * is used to set sinkSoundProperties\r
+ * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE if property is out of range, E_NO_CHANGE if no change is neccessary
+ *
+ * @param handle
+ * @param sinkID
+ * @param soundProperty
+ */
+ virtual am_Error_e setSinkSoundProperty(am_Handle_s& handle, const am_sinkID_t sinkID, const am_SoundProperty_s& soundProperty) =0;
+ /**
+ * is used to set sourceSoundProperties\r
+ * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE if property is out of range. E_NO_CHANGE if no change is neccessary
+ *
+ * @param handle
+ * @param sourceID
+ * @param soundProperty
+ */
+ virtual am_Error_e setSourceSoundProperty(am_Handle_s& handle, const am_sourceID_t sourceID, const am_SoundProperty_s& soundProperty) =0;
+ /**
+ * sets the domain state of a domain\r
+ * @return E_OK on success, E_UNKNOWN on error, E_NO_CHANGE if no change is neccessary
+ *
+ * @param domainID
+ * @param domainState
+ */
+ virtual am_Error_e setDomainState(const am_domainID_t domainID, const am_DomainState_e domainState) =0;
+ /**
+ * enters a domain in the database, creates and ID\r
+ * @return E_OK on success, E_ALREADY_EXISTENT if the ID or name is already in the database, E_DATABASE_ERROR if the database had an error
+ *
+ * @param domainData domainID in am_Domain_s must be 0 here
+ * @param domainID
+ */
+ virtual am_Error_e enterDomainDB(const am_Domain_s& domainData, am_domainID_t& domainID) =0;
+ /**
+ * enters a mainconnection in the database, creates and ID\r
+ * @return E_OK on success, E_DATABASE_ERROR if the database had an error
+ *
+ * @param mainConnectionData the MainConnectionID is omitted since it is created during the registration
+ * @param connectionID
+ */
+ virtual am_Error_e enterMainConnectionDB(const am_MainConnection_s& mainConnectionData, am_mainConnectionID_t& connectionID) =0;
+ /**
+ * enters a sink in the database.\r
+ * The sinkID in am_Sink_s shall be 0 in case of a dynamic added source A sinkID greater than 100 will be assigned. If a specific sinkID with a value <100 is given, the given value will be used. This is for a static setup where the ID's are predefined.\r
+ * @return E_OK on success, E_ALREADY_EXISTENT if the ID or name is already in the database, E_DATABASE_ERROR if the database had an error
+ *
+ * @param sinkData the sinkID will be omitted since it is created during the registration
+ * @param sinkID
+ */
+ virtual am_Error_e enterSinkDB(const am_Sink_s& sinkData, am_sinkID_t& sinkID) =0;
+ /**
+ * enters a crossfader in the database.\r
+ * The crossfaderID in am_Crossfader_s shall be 0 in case of a dynamic added source A crossfaderID greater than 100 will be assigned. If a specific crossfaderID with a value <100 is given, the given value will be used. This is for a static setup where the ID's are predefined.\r
+ * @return E_OK on success, E_ALREADY_EXISTENT if the ID or name is already in the database, E_DATABASE_ERROR if the database had an error
+ *
+ * @param crossfaderData the ID in the data will be ignored since it is created during the registration
+ * @param crossfaderID
+ */
+ virtual am_Error_e enterCrossfaderDB(const am_Crossfader_s& crossfaderData, am_crossfaderID_t& crossfaderID) =0;
+ /**
+ * enters a gateway in the database.\r
+ * The gatewayID in am_Gateway_s shall be 0 in case of a dynamic added source A gatewayID greater than 100 will be assigned. If a specific gatewayID with a value <100 is given, the given value will be used. This is for a static setup where the ID's are predefined.\r
+ * @return E_OK on success, E_ALREADY_EXISTENT if the ID or name is already in the database, E_DATABASE_ERROR if the database had an error
+ *
+ * @param gatewayData In a fixed setup, the gatewayID must be below 100. In a dynamic setup, the gatewayID shall be 0! listSourceFormats and listSinkFormats are empty at registration time. Values are taken over when sources and sinks are registered.
+ * @param gatewayID
+ */
+ virtual am_Error_e enterGatewayDB(const am_Gateway_s& gatewayData, am_gatewayID_t& gatewayID) =0;
+ /**
+ * enters a source in the database.\r
+ * The sourceID in am_Source_s shall be 0 in case of a dynamic added source A sourceID greater than 100 will be assigned. If a specific sourceID with a value <100 is given, the given value will be used. This is for a static setup where the ID's are predefined.\r
+ * @return E_OK on success, E_ALREADY_EXISTENT if the ID or name is already in the database, E_DATABASE_ERROR if the database had an error
+ *
+ * @param sourceData sourceID is omitted here since it is created during registration
+ * @param sourceID
+ */
+ virtual am_Error_e enterSourceDB(const am_Source_s& sourceData, am_sourceID_t& sourceID) =0;
+ /**
+ * Enters a sourceClass into the database.\r
+ * @return E_OK on success, E_ALREADY_EXISTENT if the ID or name is already in the database, E_DATABASE_ERROR if the database had an error
+ *
+ * @param sinkClass IDs given with the SinkCLassID are valid below 100 (static). If given as 0, sinkClass will be enterd dynamic and ID above 100 will be created.
+ * @param sinkClassID
+ */
+ virtual am_Error_e enterSinkClassDB(const am_SinkClass_s& sinkClass, am_sinkClass_t& sinkClassID) =0;
+ /**
+ * Enters a sourceClass into the database.\r
+ * The sourceClassID in am_sourceClass_s shall be 0 in case of a dynamic added source A sourceClassID greater than 100 will be assigned. If a specific sourceClassID with a value <100 is given, the given value will be used. This is for a static setup where the ID's are predefined.\r
+ * @return E_OK on success, E_ALREADY_EXISTENT if the ID or name is already in the database, E_DATABASE_ERROR if the database had an error
+ *
+ * @param sourceClassID
+ * @param sourceClass IDs given with the SourceCLassID are valid below 100 (static). If given as 0, sourceClass will be enterd dynamic and ID above 100 will be created.
+ */
+ virtual am_Error_e enterSourceClassDB(am_sourceClass_t& sourceClassID, const am_SourceClass_s& sourceClass) =0;
+ /**
+ * changes class information of a sinkclass.\r
+ * The properties will overwrite the values of the sinkClassID given in the sinkClass.\r
+ * It is the duty of the controller to check if the property is valid. If it does not exist, the daemon will not return an error.\r
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if sinkClassID was not found.
+ *
+ * @param sinkClass if a SourceClass ID other than 0 is given, the classInformation replaces the existing one. In case of ClassID 0, a new classID is created and returned
+ */
+ virtual am_Error_e changeSinkClassInfoDB(const am_SinkClass_s& sinkClass) =0;
+ /**
+ * changes class information of a sourceClass. \r
+ * The properties will overwrite the values of the sourceClassID given in the sourceClass.\r
+ * It is the duty of the controller to check if the property is valid. If it does not exist, the daemon will not return an error.\r
+ * @return E_OK on success, E_DATABASE_ERROR on error and E_NON_EXISTENT if the ClassID does not exist.
+ *
+ * @param sourceClass if a SourceClass ID other than 0 is given, the classInformation replaces the existing one. In case of ClassID 0, a new classID is created and returned
+ */
+ virtual am_Error_e changeSourceClassInfoDB(const am_SourceClass_s& sourceClass) =0;
+ /**
+ * This function is used to enter the system Properties into the database.\r
+ * All entries in the database will be erased before entering the new List. It should only be called once at system startup.\r
+ * @return E_OK on success, E_DATABASE_ERROR if the database had an error
+ *
+ * @param listSystemProperties
+ */
+ virtual am_Error_e enterSystemPropertiesListDB(const std::vector<am_SystemProperty_s>& listSystemProperties) =0;
+ /**
+ * changes the mainConnectionState of MainConnection\r
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if mainconnection
+ *
+ * @param mainconnectionID
+ * @param route
+ */
+ virtual am_Error_e changeMainConnectionRouteDB(const am_mainConnectionID_t mainconnectionID, const am_Route_s& route) =0;
+ /**
+ * changes the mainConnectionState of MainConnection\r
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if mainconnection
+ *
+ * @param mainconnectionID
+ * @param connectionState
+ */
+ virtual am_Error_e changeMainConnectionStateDB(const am_mainConnectionID_t mainconnectionID, const am_ConnectionState_e connectionState) =0;
+ /**
+ * changes the sink volume of a sink\r
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if sink was not found
+ *
+ * @param mainVolume
+ * @param sinkID
+ */
+ virtual am_Error_e changeSinkMainVolumeDB(const am_mainVolume_t mainVolume, const am_sinkID_t sinkID) =0;
+ /**
+ * changes the availablility of a sink\r
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if sink was not found
+ *
+ * @param availability
+ * @param sinkID
+ */
+ virtual am_Error_e changeSinkAvailabilityDB(const am_Availability_s& availability, const am_sinkID_t sinkID) =0;
+ /**
+ * changes the domainstate of a domain \r
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if domain was not found
+ *
+ * @param domainState
+ * @param domainID
+ */
+ virtual am_Error_e changDomainStateDB(const am_DomainState_e domainState, const am_domainID_t domainID) =0;
+ /**
+ * changes the mute state of a sink\r
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if sink was not found
+ *
+ * @param muteState
+ * @param sinkID
+ */
+ virtual am_Error_e changeSinkMuteStateDB(const am_MuteState_e muteState, const am_sinkID_t sinkID) =0;
+ /**
+ * changes the mainsinksoundproperty of a sink\r
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if sink was not found
+ *
+ * @param soundProperty
+ * @param sinkID
+ */
+ virtual am_Error_e changeMainSinkSoundPropertyDB(const am_MainSoundProperty_s& soundProperty, const am_sinkID_t sinkID) =0;
+ /**
+ * changes the mainsourcesoundproperty of a sink\r
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if source was not found
+ *
+ * @param soundProperty
+ * @param sourceID
+ */
+ virtual am_Error_e changeMainSourceSoundPropertyDB(const am_MainSoundProperty_s& soundProperty, const am_sourceID_t sourceID) =0;
+ /**
+ * changes the availablility of a source\r
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if source was not found
+ *
+ * @param availability
+ * @param sourceID
+ */
+ virtual am_Error_e changeSourceAvailabilityDB(const am_Availability_s& availability, const am_sourceID_t sourceID) =0;
+ /**
+ * changes a systemProperty\r
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if property was not found
+ *
+ * @param property
+ */
+ virtual am_Error_e changeSystemPropertyDB(const am_SystemProperty_s& property) =0;
+ /**
+ * removes a mainconnection from the DB\r
+ * @return E_OK on success, E_NON_EXISTENT if main connection was not found, E_DATABASE_ERROR if the database had an error
+ *
+ * @param mainConnectionID
+ */
+ virtual am_Error_e removeMainConnectionDB(const am_mainConnectionID_t mainConnectionID) =0;
+ /**
+ * removes a sink from the DB\r
+ * @return E_OK on success, E_NON_EXISTENT if sink was not found, E_DATABASE_ERROR if the database had an error
+ *
+ * @param sinkID
+ */
+ virtual am_Error_e removeSinkDB(const am_sinkID_t sinkID) =0;
+ /**
+ * removes a source from the DB\r
+ * @return E_OK on success, E_NON_EXISTENT if source was not found, E_DATABASE_ERROR if the database had an error
+ *
+ * @param sourceID
+ */
+ virtual am_Error_e removeSourceDB(const am_sourceID_t sourceID) =0;
+ /**
+ * removes a gateway from the DB\r
+ * @return E_OK on success, E_NON_EXISTENT if gateway was not found, E_DATABASE_ERROR if the database had an error
+ *
+ * @param gatewayID
+ */
+ virtual am_Error_e removeGatewayDB(const am_gatewayID_t gatewayID) =0;
+ /**
+ * removes a crossfader from the DB\r
+ * @return E_OK on success, E_NON_EXISTENT if crossfader was not found, E_DATABASE_ERROR if the database had an error
+ *
+ * @param crossfaderID
+ */
+ virtual am_Error_e removeCrossfaderDB(const am_crossfaderID_t crossfaderID) =0;
+ /**
+ * removes a domain from the DB\r
+ * @return E_OK on success, E_NON_EXISTENT if domain was not found, E_DATABASE_ERROR if the database had an error
+ *
+ * @param domainID
+ */
+ virtual am_Error_e removeDomainDB(const am_domainID_t domainID) =0;
+ /**
+ * removes a domain from the DB\r
+ * @return E_OK on success, E_NON_EXISTENT if domain was not found, E_DATABASE_ERROR if the database had an error
+ *
+ * @param sinkClassID
+ */
+ virtual am_Error_e removeSinkClassDB(const am_sinkClass_t sinkClassID) =0;
+ /**
+ * removes a domain from the DB\r
+ * @return E_OK on success, E_NON_EXISTENT if domain was not found, E_DATABASE_ERROR if the database had an error
+ *
+ * @param sourceClassID
+ */
+ virtual am_Error_e removeSourceClassDB(const am_sourceClass_t sourceClassID) =0;
+ /**
+ * returns the ClassInformation of a source\r
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if source was not found
+ *
+ * @param sourceID
+ * @param classInfo
+ */
+ virtual am_Error_e getSourceClassInfoDB(const am_sourceID_t sourceID, am_SourceClass_s& classInfo) const =0;
+ /**
+ * returns the ClassInformation of a sink\r
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if sink was not found
+ *
+ * @param sinkID
+ * @param sinkClass
+ */
+ virtual am_Error_e getSinkClassInfoDB(const am_sinkID_t sinkID, am_SinkClass_s& sinkClass) const =0;
+ /**
+ * return source and sink of a gateway\r
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if gateway was not found
+ *
+ * @param gatewayID
+ * @param gatewayData
+ */
+ virtual am_Error_e getGatewayInfoDB(const am_gatewayID_t gatewayID, am_Gateway_s& gatewayData) const =0;
+ /**
+ * returns sources and the sink of a crossfader\r
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if crossfader was not found
+ *
+ * @param crossfaderID
+ * @param crossfaderData
+ */
+ virtual am_Error_e getCrossfaderInfoDB(const am_crossfaderID_t crossfaderID, am_Crossfader_s& crossfaderData) const =0;
+ /**
+ * returns all sinks of a domain\r
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if domain was not found
+ *
+ * @param domainID
+ * @param listSinkID
+ */
+ virtual am_Error_e getListSinksOfDomain(const am_domainID_t domainID, std::vector<am_sinkID_t>& listSinkID) const =0;
+ /**
+ * returns all source of a domain\r
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if domain was not found
+ *
+ * @param domainID
+ * @param listSourceID
+ */
+ virtual am_Error_e getListSourcesOfDomain(const am_domainID_t domainID, std::vector<am_sourceID_t>& listSourceID) const =0;
+ /**
+ * returns all crossfaders of a domain\r
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if domain was not found
+ *
+ * @param domainID
+ * @param listCrossfadersID
+ */
+ virtual am_Error_e getListCrossfadersOfDomain(const am_domainID_t domainID, std::vector<am_crossfaderID_t>& listCrossfadersID) const =0;
+ /**
+ * returns all gateways of a domain\r
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if domain was not found
+ *
+ * @param domainID
+ * @param listGatewaysID
+ */
+ virtual am_Error_e getListGatewaysOfDomain(const am_domainID_t domainID, std::vector<am_gatewayID_t>& listGatewaysID) const =0;
+ /**
+ * returns a complete list of all MainConnections\r
+ * @return E_OK on success, E_DATABASE_ERROR on error
+ *
+ * @param listMainConnections
+ */
+ virtual am_Error_e getListMainConnections(std::vector<am_MainConnection_s>& listMainConnections) const =0;
+ /**
+ * returns a complete list of all domains\r
+ * @return E_OK on success, E_DATABASE_ERROR on error
+ *
+ * @param listDomains
+ */
+ virtual am_Error_e getListDomains(std::vector<am_Domain_s>& listDomains) const =0;
+ /**
+ * returns a complete list of all Connections\r
+ * @return E_OK on success, E_DATABASE_ERROR on error
+ *
+ * @param listConnections
+ */
+ virtual am_Error_e getListConnections(std::vector<am_Connection_s>& listConnections) const =0;
+ /**
+ * returns a list of all sinks\r
+ * @return E_OK on success, E_DATABASE_ERROR on error
+ *
+ * @param listSinks
+ */
+ virtual am_Error_e getListSinks(std::vector<am_Sink_s>& listSinks) const =0;
+ /**
+ * returns a list of all sources\r
+ * @return E_OK on success, E_DATABASE_ERROR on error
+ *
+ * @param listSources
+ */
+ virtual am_Error_e getListSources(std::vector<am_Source_s>& listSources) const =0;
+ /**
+ * returns a list of all source classes\r
+ * @return E_OK on success, E_DATABASE_ERROR on error
+ *
+ * @param listSourceClasses
+ */
+ virtual am_Error_e getListSourceClasses(std::vector<am_SourceClass_s>& listSourceClasses) const =0;
+ /**
+ * returns a list of all handles\r
+ * @return E_OK on success, E_DATABASE_ERROR on error
+ *
+ * @param listHandles
+ */
+ virtual am_Error_e getListHandles(std::vector<am_Handle_s>& listHandles) const =0;
+ /**
+ * returns a list of all crossfaders\r
+ * @return E_OK on success, E_DATABASE_ERROR on error
+ *
+ * @param listCrossfaders
+ */
+ virtual am_Error_e getListCrossfaders(std::vector<am_Crossfader_s>& listCrossfaders) const =0;
+ /**
+ * returns a list of gateways\r
+ * @return E_OK on success, E_DATABASE_ERROR on error
+ *
+ * @param listGateways
+ */
+ virtual am_Error_e getListGateways(std::vector<am_Gateway_s>& listGateways) const =0;
+ /**
+ * returns a list of all sink classes\r
+ * @return E_OK on success, E_DATABASE_ERROR on error
+ *
+ * @param listSinkClasses
+ */
+ virtual am_Error_e getListSinkClasses(std::vector<am_SinkClass_s>& listSinkClasses) const =0;
+ /**
+ * returns the list of SystemProperties
+ *
+ * @param listSystemProperties
+ */
+ virtual am_Error_e getListSystemProperties(std::vector<am_SystemProperty_s>& listSystemProperties) const =0;
+ /**
+ * sets the command interface to ready
+ */
+ virtual void setCommandReady() =0;
+ /**
+ * sets the routinginterface to ready.
+ */
+ virtual void setRoutingReady() =0;
+
+ };
+}
+#endif // !defined(EA_6440518C_5204_4a7c_A4B6_21BF187D8876__INCLUDED_)
--- /dev/null
+/**\r
+* Copyright (C) 2011, BMW AG\r
+*\r
+* GeniviAudioMananger\r
+*\r
+* \file \r
+*\r
+* \date 20-Oct-2011 3:42:04 PM\r
+* \author Christian Mueller (christian.ei.mueller@bmw.de)\r
+*\r
+* \section License\r
+* GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)\r
+* Copyright (C) 2011, BMW AG Christian M?ller Christian.ei.mueller@bmw.de\r
+*\r
+* This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.\r
+* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.\r
+* You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.\r
+* Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.\r
+* Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.\r
+* As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.\r
+* Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.\r
+*\r
+* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN\r
+*/\r
+#if !defined(EA_8234D3A3_5F5A_46e0_874E_380BD260B451__INCLUDED_)\r
+#define EA_8234D3A3_5F5A_46e0_874E_380BD260B451__INCLUDED_\r
+\r
+#include <vector>\r
+#include <string>\r
+#include "../audiomanagertypes.h"\r
+#include "ControlReceiveInterface.h"
+
+namespace am {
+ /**
+ * This interface is presented by the AudioManager controller.\r
+ * All the hooks represent system events that need to be handled. The callback functions are used to handle for example answers to function calls on the AudioManagerCoreInterface.
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:14 PM
+ */
+ class ControlSendInterface
+ {
+
+ public:
+ /**
+ * Starts up the controller.
+ *
+ * @param controlreceiveinterface This is a pointer to the ControlReceiveInterface so that the controller knows to whom to communicate.
+ */
+ virtual am_Error_e startupController(ControlReceiveInterface* controlreceiveinterface) =0;
+ /**
+ * stops the controller
+ */
+ virtual am_Error_e stopController() =0;
+ /**
+ * This hook is fired when all plugins have been loaded.
+ */
+ virtual void hookAllPluginsLoaded() =0;
+ /**
+ * is called when a connection request comes in via the command interface\r
+ * @return E_OK on success, E_NOT_POSSIBLE on error, E_ALREADY_EXISTENT if already exists
+ *
+ * @param sourceID
+ * @param sinkID
+ * @param mainConnectionID
+ */
+ virtual am_Error_e hookUserConnectionRequest(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t& mainConnectionID) =0;
+ /**
+ * is called when a disconnection request comes in via the command interface\r
+ * @return E_OK on success, E_NOT_POSSIBLE on error, E_NON_EXISTENT if connection does not exists
+ *
+ * @param connectionID
+ */
+ virtual am_Error_e hookUserDisconnectionRequest(const am_mainConnectionID_t connectionID) =0;
+ /**
+ * sets a user MainSinkSoundProperty\r
+ * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
+ *
+ * @param sinkID
+ * @param soundProperty
+ */
+ virtual am_Error_e hookUserSetMainSinkSoundProperty(const am_sinkID_t sinkID, const am_MainSoundProperty_s& soundProperty) =0;
+ /**
+ * sets a user MainSourceSoundProperty\r
+ * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
+ *
+ * @param sourceID
+ * @param soundProperty
+ */
+ virtual am_Error_e hookUserSetMainSourceSoundProperty(const am_sourceID_t sourceID, const am_MainSoundProperty_s& soundProperty) =0;
+ /**
+ * sets a user SystemProperty\r
+ * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
+ *
+ * @param property
+ */
+ virtual am_Error_e hookUserSetSystemProperty(const am_SystemProperty_s& property) =0;
+ /**
+ * sets a user volume\r
+ * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
+ *
+ * @param SinkID
+ * @param newVolume
+ */
+ virtual am_Error_e hookUserVolumeChange(const am_sinkID_t SinkID, const am_mainVolume_t newVolume) =0;
+ /**
+ * sets a user volume as increment \r
+ * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
+ *
+ * @param SinkID
+ * @param increment the steps
+ */
+ virtual am_Error_e hookUserVolumeStep(const am_sinkID_t SinkID, const int16_t increment) =0;
+ /**
+ * sets the mute state of a sink\r
+ * @return E_OK on success, E_UNKNOWN on error
+ *
+ * @param sinkID
+ * @param muteState true=muted
+ */
+ virtual am_Error_e hookUserSetSinkMuteState(const am_sinkID_t sinkID, const am_MuteState_e muteState) =0;
+ /**
+ * is called when a routing adaptor registers its domain\r
+ * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXISTENT if already exists
+ *
+ * @param domainData ID is omitted here since it has not been created yet
+ * @param domainID
+ */
+ virtual am_Error_e hookSystemRegisterDomain(const am_Domain_s& domainData, am_domainID_t& domainID) =0;
+ /**
+ * is called when a routing adaptor wants to derigister a domain\r
+ * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if not found
+ *
+ * @param domainID
+ */
+ virtual am_Error_e hookSystemDeregisterDomain(const am_domainID_t domainID) =0;
+ /**
+ * is called when a domain registered all the elements
+ *
+ * @param domainID
+ */
+ virtual void hookSystemDomainRegistrationComplete(const am_domainID_t domainID) =0;
+ /**
+ * is called when a routing adaptor registers a sink\r
+ * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXISTENT if already exists
+ *
+ * @param sinkData Id is omitted here, since it has not been created yet
+ * @param sinkID
+ */
+ virtual am_Error_e hookSystemRegisterSink(const am_Sink_s& sinkData, am_sinkID_t& sinkID) =0;
+ /**
+ * is called when a routing adaptor deregisters a sink\r
+ * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if not found
+ *
+ * @param sinkID
+ */
+ virtual am_Error_e hookSystemDeregisterSink(const am_sinkID_t sinkID) =0;
+ /**
+ * is called when a routing adaptor registers a source\r
+ * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXISTENT if already exists
+ *
+ * @param sourceData ID is omitted here since it is not yet created
+ * @param sourceID
+ */
+ virtual am_Error_e hookSystemRegisterSource(const am_Source_s& sourceData, am_sourceID_t& sourceID) =0;
+ /**
+ * is called when a routing adaptor deregisters a source\r
+ * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if not found
+ *
+ * @param sourceID
+ */
+ virtual am_Error_e hookSystemDeregisterSource(const am_sourceID_t sourceID) =0;
+ /**
+ * is called when a routing adaptor registers a gateway\r
+ * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXISTENT if already exists
+ *
+ * @param gatewayData gatewayID is not set here since it is not created at this point of time
+ * @param gatewayID
+ */
+ virtual am_Error_e hookSystemRegisterGateway(const am_Gateway_s& gatewayData, am_gatewayID_t& gatewayID) =0;
+ /**
+ * is called when a routing adaptor deregisters a gateway\r
+ * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if not found
+ *
+ * @param gatewayID
+ */
+ virtual am_Error_e hookSystemDeregisterGateway(const am_gatewayID_t gatewayID) =0;
+ /**
+ * is called when a routing adaptor registers a crossfader\r
+ * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXISTENT if already exists
+ *
+ * @param crossfaderData gatewayID is not set here since it is not created at this point of time
+ * @param crossfaderID
+ */
+ virtual am_Error_e hookSystemRegisterCrossfader(const am_Crossfader_s& crossfaderData, am_crossfaderID_t& crossfaderID) =0;
+ /**
+ * is called when a routing adaptor deregisters a crossfader\r
+ * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if not found
+ *
+ * @param crossfaderID
+ */
+ virtual am_Error_e hookSystemDeregisterCrossfader(const am_crossfaderID_t crossfaderID) =0;
+ /**
+ * volumeticks. therse are used to indicate volumechanges during a ramp
+ *
+ * @param handle
+ * @param sinkID
+ * @param volume
+ */
+ virtual void hookSystemSinkVolumeTick(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume) =0;
+ /**
+ * volumeticks. therse are used to indicate volumechanges during a ramp
+ *
+ * @param handle
+ * @param sourceID
+ * @param volume
+ */
+ virtual void hookSystemSourceVolumeTick(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume) =0;
+ /**
+ * is called when an low level interrupt changed its state
+ *
+ * @param sourceID
+ * @param interruptState
+ */
+ virtual void hookSystemInterruptStateChange(const am_sourceID_t sourceID, const am_InterruptState_e interruptState) =0;
+ /**
+ * id called when a sink changed its availability
+ *
+ * @param sinkID
+ * @param availability
+ */
+ virtual void hookSystemSinkAvailablityStateChange(const am_sinkID_t sinkID, const am_Availability_s& availability) =0;
+ /**
+ * id called when a source changed its availability
+ *
+ * @param sourceID
+ * @param availability
+ */
+ virtual void hookSystemSourceAvailablityStateChange(const am_sourceID_t sourceID, const am_Availability_s& availability) =0;
+ /**
+ * id called when domainstate was changed
+ *
+ * @param domainID
+ * @param state
+ */
+ virtual void hookSystemDomainStateChange(const am_domainID_t domainID, const am_DomainState_e state) =0;
+ /**
+ * when early data was received
+ *
+ * @param data
+ */
+ virtual void hookSystemReceiveEarlyData(const std::vector<am_EarlyData_s>& data) =0;
+ /**
+ * this hook provides information about speed changes.\r
+ * The quantization and sampling rate of the speed can be adjusted at compile time of the AudioManagerDaemon.
+ *
+ * @param speed
+ */
+ virtual void hookSystemSpeedChange(const am_speed_t speed) =0;
+ /**
+ * this hook is fired whenever the timing information of a mainconnection has changed.
+ *
+ * @param mainConnectionID
+ * @param time
+ */
+ virtual void hookSystemTimingInformationChanged(const am_mainConnectionID_t mainConnectionID, const am_timeSync_t time) =0;
+ /**
+ * ack for connect
+ *
+ * @param handle
+ * @param errorID
+ */
+ virtual void cbAckConnect(const am_Handle_s handle, const am_Error_e errorID) =0;
+ /**
+ * ack for disconnect
+ *
+ * @param handle
+ * @param errorID
+ */
+ virtual void cbAckDisconnect(const am_Handle_s handle, const am_Error_e errorID) =0;
+ /**
+ * ack for crossfading
+ *
+ * @param handle
+ * @param hostsink
+ * @param error
+ */
+ virtual void cbAckCrossFade(const am_Handle_s handle, const am_HotSink_e hostsink, const am_Error_e error) =0;
+ /**
+ * ack for sink volume changes
+ *
+ * @param handle
+ * @param volume
+ * @param error
+ */
+ virtual void cbAckSetSinkVolumeChange(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error) =0;
+ /**
+ * ack for source volume changes
+ *
+ * @param handle the handle that is connected to the volume change
+ * @param voulme the volume after the action ended (the desired volume if everything went right, the actual one in case of abortion)
+ * @param error
+ */
+ virtual void cbAckSetSourceVolumeChange(const am_Handle_s handle, const am_volume_t voulme, const am_Error_e error) =0;
+ /**
+ * ack for setting of source states
+ *
+ * @param handle
+ * @param error
+ */
+ virtual void cbAckSetSourceState(const am_Handle_s handle, const am_Error_e error) =0;
+ /**
+ * ack for setting of sourcesoundproperties
+ *
+ * @param handle
+ * @param error
+ */
+ virtual void cbAckSetSourceSoundProperty(const am_Handle_s handle, const am_Error_e error) =0;
+ /**
+ * ack for setting of sinksoundproperties
+ *
+ * @param handle
+ * @param error
+ */
+ virtual void cbAckSetSinkSoundProperty(const am_Handle_s handle, const am_Error_e error) =0;
+
+ };
+}
+#endif // !defined(EA_8234D3A3_5F5A_46e0_874E_380BD260B451__INCLUDED_)
--- /dev/null
+/**\r
+* Copyright (C) 2011, BMW AG\r
+*\r
+* GeniviAudioMananger\r
+*\r
+* \file \r
+*\r
+* \date 20-Oct-2011 3:42:04 PM\r
+* \author Christian Mueller (christian.ei.mueller@bmw.de)\r
+*\r
+* \section License\r
+* GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)\r
+* Copyright (C) 2011, BMW AG Christian M?ller Christian.ei.mueller@bmw.de\r
+*\r
+* This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.\r
+* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.\r
+* You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.\r
+* Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.\r
+* Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.\r
+* As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.\r
+* Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.\r
+*\r
+* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN\r
+*/\r
+#if !defined(EA_DE721E5B_F385_42e5_9347_0A683B877C1D__INCLUDED_)\r
+#define EA_DE721E5B_F385_42e5_9347_0A683B877C1D__INCLUDED_\r
+\r
+namespace am {\r
+ /**\r
+ * This enum classifies the format in which data is exchanged within a connection. The enum itself is project specific although there are some Genivi standard formats defined.\r
+ * @author christian\r
+ * @version 1.0\r
+ * @created 08-Dec-2011 1:05:12 PM\r
+ */\r
+ enum am_ConnectionFormat_e\r
+ {\r
+ CF_STEREO = 0,\r
+ CF_MONO,\r
+ CF_ANALOG,\r
+ CF_MAX,\r
+ CF_MIN = CF_STEREO\r
+ };\r
+\r
+ /**\r
+ * This enum gives the information about reason for reason for Source/Sink change\r
+ * @author christian\r
+ * @version 1.0\r
+ * @created 08-Dec-2011 1:05:12 PM\r
+ */\r
+ enum am_AvailabilityReason_e\r
+ {\r
+ AR_NEWMEDIA = 0,\r
+ AR_SAMEMEDIA,\r
+ AR_NOMEDIA,\r
+ AR_UNKNOWN,\r
+ AR_TEMPERATURE,\r
+ AR_VOLTAGE,\r
+ AR_MAX,\r
+ AR_MIN = AR_NEWMEDIA\r
+ };\r
+\r
+ /**\r
+ * product specific identifier of property\r
+ * @author christian\r
+ * @version 1.0\r
+ * @created 08-Dec-2011 1:05:12 PM\r
+ */\r
+ enum am_ClassProperty_e\r
+ {\r
+ /**\r
+ * defines the source type of a source. Project specific, could be for example differentiation between interrupt source and main source.\r
+ */\r
+ CP_SOURCE_TYPE = 0,\r
+ /**\r
+ * defines the SINK_TYPE. Project specific\r
+ */\r
+ CP_SINK_TYPE,\r
+ CP_MAX,\r
+ CP_MIN = CP_SOURCE_TYPE\r
+ };\r
+\r
+ /**\r
+ * The given ramp types here are just a possiblity. for products, different ramp types can be defined here.\r
+ * It is in the responsibility of the product to make sure that the routing plugins are aware of the ramp types used.
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:12 PM
+ */
+ enum am_RampType_e
+ {
+ /**
+ * this ramp type triggers a direct setting of the value without a ramp
+ */
+ RAMP_DIRECT = 0,
+ /**
+ * This ramp type will set the volume as fast as possible.
+ */
+ RAMP_NO_BLOB,
+ RAMP_LOG,
+ RAMP_STRAIGHT,
+ RAMP_MAX,
+ RAMP_MIN = RAMP_DIRECT
+ };
+
+ /**
+ * sound properties. Within genivi only the standard properties are defined, for products these need to be extended.
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:12 PM
+ */
+ enum am_SoundPropertyType_e
+ {
+ SP_TREBLE = 0,
+ SP_MID,
+ SP_BASS,
+ SP_MAX,
+ SP_MIN = SP_TREBLE
+ };
+
+ /**
+ * Here are all SoundProperties that can be set via the CommandInterface. Product specific
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:12 PM
+ */
+ enum am_MainSoundPropertyType_e
+ {
+ /**
+ * gives the navigation offset in percent
+ */
+ MSP_NAVIGATION_OFFSET = 0,
+ MSP_TEST,
+ MSP_MAX,
+ MSP_MIN = MSP_NAVIGATION_OFFSET
+ };
+
+ /**
+ * describes the different system properties. Project specific
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:12 PM
+ */
+ enum am_SystemPropertyType_e
+ {
+ SYP_TEST = 0,
+ SYP_MAX,
+ SYP_MIN = SYP_TEST
+ };
+}
+#endif // !defined(EA_DE721E5B_F385_42e5_9347_0A683B877C1D__INCLUDED_)
--- /dev/null
+/**\r
+* Copyright (C) 2011, BMW AG\r
+*\r
+* GeniviAudioMananger\r
+*\r
+* \file \r
+*\r
+* \date 20-Oct-2011 3:42:04 PM\r
+* \author Christian Mueller (christian.ei.mueller@bmw.de)\r
+*\r
+* \section License\r
+* GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)\r
+* Copyright (C) 2011, BMW AG Christian M?ller Christian.ei.mueller@bmw.de\r
+*\r
+* This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.\r
+* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.\r
+* You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.\r
+* Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.\r
+* Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.\r
+* As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.\r
+* Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.\r
+*\r
+* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN\r
+*/\r
+#if !defined(EA_15945485_9FE2_405e_BFCC_96F24D2487F5__INCLUDED_)\r
+#define EA_15945485_9FE2_405e_BFCC_96F24D2487F5__INCLUDED_\r
+\r
+#include <vector>\r
+#include <string>\r
+#include "../audiomanagertypes.h"\r
+class DBusWrapper;
+
+namespace am {
+ /**
+ * Routing Receive sendInterface description. This class implements everything from RoutingAdapter -> Audiomanager
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:58:24 PM
+ */
+ class RoutingReceiveInterface
+ {
+
+ public:
+ /**
+ * acknowledges a asyncConnect
+ *
+ * @param handle
+ * @param connectionID
+ * @param error E_OK on success, E_ABORTED if action was aborted, E_UNKNOWN on error
+ */
+ virtual void ackConnect(const am_Handle_s handle, const am_connectionID_t connectionID, const am_Error_e error) =0;
+ /**
+ * acknowledges a asyncDisconnect
+ *
+ * @param handle
+ * @param connectionID
+ * @param error E_OK on success, E_ABORTED if action was aborted, E_UNKNOWN on error
+ */
+ virtual void ackDisconnect(const am_Handle_s handle, const am_connectionID_t connectionID, const am_Error_e error) =0;
+ /**
+ * acknowledges a asyncsetSinkVolume
+ *
+ * @param handle
+ * @param volume The current actual value that is set
+ * @param error E_OK on success, E_ABORTED if action was aborted, E_UNKNOWN on error
+ */
+ virtual void ackSetSinkVolumeChange(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error) =0;
+ /**
+ * acknowledges a asyncsetSourceVolume
+ *
+ * @param handle handle that belongs to the change
+ * @param volume the current volume
+ * @param error E_OK on success, E_ABORTED if action was aborted, E_UNKNOWN on error
+ */
+ virtual void ackSetSourceVolumeChange(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error) =0;
+ /**
+ * acknowlegde for asyncSetSourceState
+ *
+ * @param handle
+ * @param error E_OK on success, E_ABORTED if action was aborted, E_UNKNOWN on error
+ */
+ virtual void ackSetSourceState(const am_Handle_s handle, const am_Error_e error) =0;
+ /**
+ * acknowledges asyncSetSinkSoundProperty
+ *
+ * @param handle
+ * @param error E_OK on success, E_ABORTED if action was aborted, E_UNKNOWN on error
+ */
+ virtual void ackSetSinkSoundProperty(const am_Handle_s handle, const am_Error_e error) =0;
+ /**
+ * acknowledges asyncSetSourceSoundProperty
+ *
+ * @param handle
+ * @param error E_OK on success, E_ABORTED if action was aborted, E_UNKNOWN on error
+ */
+ virtual void ackSetSourceSoundProperty(const am_Handle_s handle, const am_Error_e error) =0;
+ /**
+ * acknowledges asyncCrossFade
+ *
+ * @param handle
+ * @param hotSink this is the current hot sink, HS_INTERMEDIATE is here when a crossfading action did not reach the end
+ * @param error E_OK on success, E_ABORTED if action was aborted, E_UNKNOWN on error
+ */
+ virtual void ackCrossFading(const am_Handle_s handle, const am_HotSink_e hotSink, const am_Error_e error) =0;
+ /**
+ * acknowledges a volume tick. This can be used to display volumechanges during ramps
+ *
+ * @param handle
+ * @param sourceID
+ * @param volume
+ */
+ virtual void ackSourceVolumeTick(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume) =0;
+ /**
+ * acknowledges a volume tick. This can be used to display volumechanges during ramps
+ *
+ * @param handle
+ * @param sinkID
+ * @param volume
+ */
+ virtual void ackSinkVolumeTick(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume) =0;
+ /**
+ * This function returns the ID to the given domainName. If already a domain is registered with this name, it will return the corresponding ID, if not it will reserve an ID but not register the domain. The other parameters of the domain will be overwritten when the domain is registered.\r
+ * @return E_OK on success, E_UNKNOWN on error
+ *
+ * @param name
+ * @param domainID
+ */
+ virtual am_Error_e peekDomain(const std::string& name, am_domainID_t& domainID) =0;
+ /**
+ * registers a domain\r
+ * @return E_OK on succes, E_ALREADY_EXISTENT if already registered E_UNKOWN on error
+ *
+ * @param domainData domainID in am_Domain_s must be 0!
+ * @param domainID
+ */
+ virtual am_Error_e registerDomain(const am_Domain_s& domainData, am_domainID_t& domainID) =0;
+ /**
+ * deregisters a domain. All sources, sinks, gateways and crossfaders from that domain will be removed as well.\r
+ * @return E_OK on succes, E_NON_EXISTENT if not found E_UNKOWN on error
+ *
+ * @param domainID < the nonde of the bus
+ */
+ virtual am_Error_e deregisterDomain(const am_domainID_t domainID) =0;
+ /**
+ * registers a gateway. @return E_OK on succes, E_ALREADY_EXISTENT if already registered E_UNKOWN on error
+ *
+ * @param gatewayData In a fixed setup, the gatewayID must be below 100. In a dynamic setup, the gatewayID shall be 0. listSourceFormats and listSinkFormats are empty at registration time. Values are taken over when sources and sinks are registered.\r
+ * \r
+ *
+ * @param gatewayID
+ */
+ virtual am_Error_e registerGateway(const am_Gateway_s& gatewayData, am_gatewayID_t& gatewayID) =0;
+ /**
+ * deregisters a gateway. Also removes all sinks and sources of the controlling domain.\r
+ * @return E_OK on succes, E_NON_EXISTENT if not found E_UNKOWN on error
+ *
+ * @param gatewayID domainID of the control domain
+ */
+ virtual am_Error_e deregisterGateway(const am_gatewayID_t gatewayID) =0;
+ /**
+ * This function returns the ID to the given sinkName. If already a sink is registered with this name, it will return the corresponding ID, if not it will reserve an ID but not register the sink. The other parameters of the sink will be overwritten when the sink is registered.\r
+ * @return E_OK on success, E_UNKNOWN on error
+ *
+ * @param name ID is not valid since not created yet
+ * @param sinkID
+ */
+ virtual am_Error_e peekSink(const std::string& name, am_sinkID_t& sinkID) =0;
+ /**
+ * Registers a sink. If the sink is part of a gateway, the listconnectionFormats is copied to the gatewayInformation\r
+ * @return E_OK on succes, E_ALREADY_EXISTENT if already registered E_UNKOWN on error
+ *
+ * @param sinkData In a fixed setup, the sinkID within am_Sink_s must be below 100. In a dynamic setup the sinkID must be 0 in am_Sink_s.
+ * @param sinkID
+ */
+ virtual am_Error_e registerSink(const am_Sink_s& sinkData, am_sinkID_t& sinkID) =0;
+ /**
+ * deregisters a sink.\r
+ * @return E_OK on succes, E_NON_EXISTENT if not found E_UNKOWN on error
+ *
+ * @param sinkID
+ */
+ virtual am_Error_e deregisterSink(const am_sinkID_t sinkID) =0;
+ /**
+ * This function returns the ID to the given sourceName. If already a source is registered with this name, it will return the corresponding ID, if not it will reserve an ID but not register the source. The other parameters of the source will be overwritten when the source is registered.\r
+ * @return E_OK on success, E_UNKNOWN on error
+ *
+ * @param name
+ * @param sourceID
+ */
+ virtual am_Error_e peekSource(const std::string& name, am_sourceID_t& sourceID) =0;
+ /**
+ * registers a source. If the source is part of a gateway, the listconnectionFormats is copied to the gatewayInformation\r
+ * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXIST if either name or sourceID already exists
+ *
+ * @param sourceData In a fixed setup, the sourceID within am_Source_s must be below 100. In a dynamic setup the sourceID must be 0 in am_Source_s
+ * @param sourceID
+ */
+ virtual am_Error_e registerSource(const am_Source_s& sourceData, am_sourceID_t& sourceID) =0;
+ /**
+ * deregisters a source\r
+ * @return E_OK on succes, E_NON_EXISTENT if not found E_UNKOWN on error
+ *
+ * @param sourceID
+ */
+ virtual am_Error_e deregisterSource(const am_sourceID_t sourceID) =0;
+ /**
+ * this function registers a crossfader.\r
+ * @return E_OK on succes, E_ALREADY_EXISTENT if already registered E_UNKOWN on error
+ *
+ * @param crossfaderData in a fixed setup, the crossfaderID must be below 100. In a dynamic setup the crossfasderID shall be 0
+ * @param crossfaderID
+ */
+ virtual am_Error_e registerCrossfader(const am_Crossfader_s& crossfaderData, am_crossfaderID_t& crossfaderID) =0;
+ /**
+ * this function deregisters a crossfader. removes all sources and sinks assiated as well.\r
+ * @return E_OK on succes, E_NON_EXISTENT if not found E_UNKOWN on error
+ *
+ * @param crossfaderID
+ */
+ virtual am_Error_e deregisterCrossfader(const am_crossfaderID_t crossfaderID) =0;
+ /**
+ * is called when a low level interrupt changes it status.
+ *
+ * @param sourceID
+ * @param interruptState
+ */
+ virtual void hookInterruptStatusChange(const am_sourceID_t sourceID, const am_InterruptState_e interruptState) =0;
+ /**
+ * This hook is called when all elements from a domain are registered.\r
+ * Is used by the Controller to know when all expected domains are finally registered
+ *
+ * @param domainID
+ */
+ virtual void hookDomainRegistrationComplete(const am_domainID_t domainID) =0;
+ /**
+ * is called when a sink changes its availability
+ *
+ * @param sinkID
+ * @param availability
+ */
+ virtual void hookSinkAvailablityStatusChange(const am_sinkID_t sinkID, const am_Availability_s& availability) =0;
+ /**
+ * is called when a source changes its availability
+ *
+ * @param sourceID
+ * @param availability
+ */
+ virtual void hookSourceAvailablityStatusChange(const am_sourceID_t sourceID, const am_Availability_s& availability) =0;
+ /**
+ * is called when a domain changes its status. This used for early domains only
+ *
+ * @param domainID
+ * @param domainState
+ */
+ virtual void hookDomainStateChange(const am_domainID_t domainID, const am_DomainState_e domainState) =0;
+ /**
+ * is called when the timinginformation (delay) changed for a connection.
+ *
+ * @param connectionID
+ * @param delay
+ */
+ virtual void hookTimingInformationChanged(const am_connectionID_t connectionID, const am_timeSync_t delay) =0;
+ /**
+ * this function is used to send out all data that has been changed in an early state.\r
+ * @return E_OK on success, E_UNKNOWN on error
+ *
+ * @param earlyData
+ */
+ virtual am_Error_e sendChangedData(const std::vector<am_EarlyData_s>& earlyData) =0;
+ /**
+ * this function is used to retrieve the pointer to the dBusConnectionWrapper\r
+ * @return E_OK on success, E_UNKNOWN on error
+ *
+ * @param dbusConnectionWrapper This is a wrapper class that is needed to keep dbus inclusions away from the interface. The DBusWrapperClass will return the pointer to the DbusConnection call (getDBusConnection)
+ */
+ virtual am_Error_e getDBusConnectionWrapper(DBusWrapper* dbusConnectionWrapper) const =0;
+
+ };
+}
+#endif // !defined(EA_15945485_9FE2_405e_BFCC_96F24D2487F5__INCLUDED_)
--- /dev/null
+/**\r
+* Copyright (C) 2011, BMW AG\r
+*\r
+* GeniviAudioMananger\r
+*\r
+* \file \r
+*\r
+* \date 20-Oct-2011 3:42:04 PM\r
+* \author Christian Mueller (christian.ei.mueller@bmw.de)\r
+*\r
+* \section License\r
+* GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)\r
+* Copyright (C) 2011, BMW AG Christian M?ller Christian.ei.mueller@bmw.de\r
+*\r
+* This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.\r
+* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.\r
+* You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.\r
+* Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.\r
+* Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.\r
+* As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.\r
+* Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.\r
+*\r
+* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN\r
+*/\r
+#if !defined(EA_BEE41204_65B8_46cf_BB6A_9953BE0EC53A__INCLUDED_)\r
+#define EA_BEE41204_65B8_46cf_BB6A_9953BE0EC53A__INCLUDED_\r
+\r
+#include <vector>\r
+#include <string>\r
+#include "../audiomanagertypes.h"\r
+
+
+#include "RoutingReceiveInterface.h"
+
+namespace am {
+ /**
+ * This class implements everything from Audiomanager -> RoutingAdapter
+ * @author christian
+ * @version 1.0
+ * @created 08-Dec-2011 1:05:14 PM
+ */
+ class RoutingSendInterface
+ {
+
+ public:
+ /**
+ * starts up the interface. In the implementations, here is the best place for init routines.
+ *
+ * @param routingreceiveinterface pointer to the receive interface
+ */
+ virtual void startupRoutingInterface(RoutingReceiveInterface* routingreceiveinterface) =0;
+ /**
+ * indicates that the interface is now ready to be used. Should be used as trigger to register all sinks, sources, etc...
+ */
+ virtual void routingInterfacesReady() =0;
+ /**
+ * is used to indicate the rundown of the system
+ */
+ virtual void routingInterfacesRundown() =0;
+ /**
+ * aborts an asynchronous action.\r
+ * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if handle was not found
+ *
+ * @param handle
+ */
+ virtual am_Error_e asyncAbort(const am_Handle_s handle) =0;
+ /**
+ * connects a source to a sink\r
+ * @return E_OK on success, E_UNKNOWN on error, E_WRONG_FORMAT in case am_ConnectionFormat_e does not match
+ *
+ * @param handle
+ * @param connectionID
+ * @param sourceID
+ * @param sinkID
+ * @param connectionFormat
+ */
+ virtual am_Error_e asyncConnect(const am_Handle_s handle, const am_connectionID_t connectionID, const am_sourceID_t sourceID, const am_sinkID_t sinkID, const am_ConnectionFormat_e connectionFormat) =0;
+ /**
+ * disconnect a connection with given connectionID\r
+ * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if connection was not found
+ *
+ * @param handle
+ * @param connectionID
+ */
+ virtual am_Error_e asyncDisconnect(const am_Handle_s handle, const am_connectionID_t connectionID) =0;
+ /**
+ * this method is used to set the volume of a sink. This function is used to drive ramps, to mute or unmute or directly set the value. The difference is made through the ramptype.\r
+ * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE if new volume is out of range
+ *
+ * @param handle
+ * @param sinkID
+ * @param volume
+ * @param ramp
+ * @param time
+ */
+ virtual am_Error_e asyncSetSinkVolume(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume, const am_RampType_e ramp, const am_time_t time) =0;
+ /**
+ * sets the volume of a source. This method is used to set the volume of a sink. This function is used to drive ramps, to mute or unmute or directly set the value. The difference is made through the ramptype.\r
+ * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE if volume is out of range.\r
+ * triggers the acknowledge ackSourceVolumeChange
+ *
+ * @param handle
+ * @param sourceID
+ * @param volume
+ * @param ramp
+ * @param time
+ */
+ virtual am_Error_e asyncSetSourceVolume(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume, const am_RampType_e ramp, const am_time_t time) =0;
+ /**
+ * This function is used to set the source state of a particular source.\r
+ * @return E_OK on success, E_UNKNOWN on error
+ *
+ * @param handle
+ * @param sourceID
+ * @param state
+ */
+ virtual am_Error_e asyncSetSourceState(const am_Handle_s handle, const am_sourceID_t sourceID, const am_SourceState_e state) =0;
+ /**
+ * this function sets the sinksoundproperty.\r
+ * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range
+ *
+ * @param handle
+ * @param soundProperty
+ * @param sinkID
+ */
+ virtual am_Error_e asyncSetSinkSoundProperty(const am_Handle_s handle, const am_SoundProperty_s& soundProperty, const am_sinkID_t sinkID) =0;
+ /**
+ * this function sets the sourcesoundproperty.\r
+ * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range
+ *
+ * @param handle
+ * @param soundProperty
+ * @param sourceID
+ */
+ virtual am_Error_e asyncSetSourceSoundProperty(const am_Handle_s handle, const am_SoundProperty_s& soundProperty, const am_sourceID_t sourceID) =0;
+ /**
+ * this function triggers crossfading.\r
+ * @return E_OK on success, E_UNKNOWN on error
+ *
+ * @param handle
+ * @param crossfaderID
+ * @param hotSink
+ * @param rampType
+ * @param time
+ */
+ virtual am_Error_e asyncCrossFade(const am_Handle_s handle, const am_crossfaderID_t crossfaderID, const am_HotSink_e hotSink, const am_RampType_e rampType, const am_time_t time) =0;
+ /**
+ * this function is used for early and late audio functions to set the domain state\r
+ * @return E_OK on success, E_UNKNOWN on error
+ *
+ * @param domainID
+ * @param domainState
+ */
+ virtual am_Error_e setDomainState(const am_domainID_t domainID, const am_DomainState_e domainState) =0;
+ /**
+ * this method is used to retrieve the busname during startup of the plugin. Needs to be implemented\r
+ * @return E_OK on success, E_UNKNOWN on error
+ *
+ * @param BusName
+ */
+ virtual am_Error_e returnBusName(std::string& BusName) const =0;
+
+ };
+}
+#endif // !defined(EA_BEE41204_65B8_46cf_BB6A_9953BE0EC53A__INCLUDED_)
+++ /dev/null
-cmake_minimum_required(VERSION 2.6)
-
-PROJECT(PluginRoutingInterfaceTCP)
-
-set(CMAKE_CXX_FLAGS "-g -pipe -fPIC -Wall -W -D_REENTRANT")
-
-set(STD_INCLUDE_DIRS "/usr/include")
-set(EXECUTABLE_OUTPUT_PATH ../../bin/)
-set(LIBRARY_OUTPUT_PATH ../plugins)
-set(DBUS_FOLDER ${CMAKE_SOURCE_DIR}/../dbusInterfaces)
-
-cmake_policy(SET CMP0015 NEW)
-
-FIND_PACKAGE(Qt4 REQUIRED)
-FIND_PACKAGE(PkgConfig)
-pkg_check_modules(GLIB REQUIRED glib-2.0)
-
-INCLUDE_DIRECTORIES(
- include
- ${CMAKE_SOURCE_DIR}
- ${STD_INCLUDE_DIRS}
- ${GLIB_INCLUDE_DIRS}
- ${DBUS_FOLDER}
- ../AudioManagerDaemon
-)
-
-LINK_DIRECTORIES(
- ${LINK_DIRECTORIES}
- ${GLIB_LIBRARY_DIRS}
-)
-
-# add Qt modules here, the include will setup QT_LIBRARIES
-SET(QT_USE_QTNETWORK TRUE)
-
-# defines for QL Plugins
-ADD_DEFINITIONS(${QT_DEFINITIONS})
-ADD_DEFINITIONS(-DQT_STATICPLUGIN)
-ADD_DEFINITIONS(-DQT_PLUGIN)
-ADD_DEFINITIONS(-DQT_SHARED)
-
-
-
-INCLUDE(${QT_USE_FILE})
-
-# all source files go here
-SET(PLUGINJACK_SRCS_CXX
- RoutingSend.cpp
- tcpClient.cpp
- TcpServer.cpp
-)
-
-# every header that contains QT stuff like Q_OBJECT .... and must be mocced
-SET(PLUGINJACK_MOC_SRCS
- RoutingSend.h
- tcpClient.h
- TcpServer.h
-)
-
-#now take the headers, moc them and append the resulting moc files to the sources
-QT4_WRAP_CPP(PLUGINJACK_SRCS_CXX ${PLUGINJACK_MOC_SRCS})
-
-add_library(RoutingTcpPlugin ${PLUGINJACK_SRCS_CXX})
-
-TARGET_LINK_LIBRARIES(RoutingTcpPlugin
- ${QT_LIBRARIES}
-)
-
-
-
-
+++ /dev/null
-/*
- * Bus_Interface.cpp
- *
- * Created on: Jan 19, 2011
- * Author: demo
- */
-#include <iostream>
-
-
-#include "RoutingSend.h"
-#include "routinginterface.h"
-#include "tcpMessages.h"
-
-
-using namespace std;
-
-
-void RoutingSendTcp::startup_interface(RoutingReceiveInterface* audioman){
- audiomanager=audioman;
- m_server=new TcpServer(AUDIOMAN_PORT);
- m_client=new tcpClient(BEAGLE_IP,BEAGLE_PORT);
- m_server->registerAudioManager(audiomanager);
- cout<<"server started"<<endl;
-}
-
-void RoutingSendTcp::return_BusName(char* BusName) {
- strcpy(BusName,BUS_NAME);
-}
-
-int RoutingSendTcp::Connect(int source, int sink){
- return m_client->connect(source,sink);
-}
-
-void RoutingSendTcp::system_ready() {
-
- m_client->system_ready();
- cout<<"Tcp ready"<<endl;
-
-}
-
-
-RoutingSendInterface* SampleRoutingInterfaceTcpFactory::returnInstance(){
- return new RoutingSendTcp();
-}
-
-Q_EXPORT_PLUGIN2(RoutingTcpPlugin, SampleRoutingInterfaceTcpFactory);
+++ /dev/null
-/*
- * Bus_Interface.h
- *
- * Created on: Feb 24, 2011
- * Author: demo
- */
-
-#ifndef BUS_INTERFACE_H_
-#define BUS_INTERFACE_H_
-
-#include <qplugin.h>
-#include "routinginterface.h"
-#include "TcpServer.h"
-#include "tcpClient.h"
-
-#define BUS_NAME "TCP"
-
-class RoutingSendTcp: public RoutingSendInterface
-{
-Q_OBJECT
-public:
- void startup_interface(RoutingReceiveInterface * audioman);
- void return_BusName(char * BusName);
- int Connect(int source, int sink);
-public slots:
- void system_ready();
-
-private:
- RoutingReceiveInterface *audiomanager;
- TcpServer* m_server;
- tcpClient* m_client;
-};
-
-//That is the actual implementation of the Factory Class returning the real Interface
-
-class SampleRoutingInterfaceTcpFactory: public QObject, public RoutingInterfaceFactory
-{
-Q_OBJECT
-Q_INTERFACES(RoutingInterfaceFactory)
-public:
- RoutingSendInterface* returnInstance();
-};
-
-#endif /* BUS_INTERFACE_H_ */
+++ /dev/null
-/*
- * TcpServer.cpp
- *
- * Created on: Apr 6, 2011
- * Author: blacky
- */
-
-#include "TcpServer.h"
-
-#include <iostream>
-#include <QList>
-#include <QByteArray>
-
-using namespace std;
-
-TcpServer::TcpServer(int ListenPort) {
- connect(this, SIGNAL(newConnection()), this, SLOT(receivedCommand()));
- if (! this->listen(QHostAddress::Any,ListenPort)) {
- cout<<" Problem: "<<this->errorString().toStdString()<<endl;
- }
-}
-
-TcpServer::~TcpServer() {
- // TODO Auto-generated destructor stub
-}
-
-void TcpServer::registerAudioManager(RoutingReceiveInterface *audiomanager_) {
- audiomanager=audiomanager_;
-}
-
-void TcpServer::receivedCommand() {
- socket=this->nextPendingConnection ();
- connect(socket, SIGNAL(readyRead()), this, SLOT(startRead()));
- cout<<"got new command"<<endl;
-}
-
-void TcpServer::startRead() {
- QByteArray buffer;
- int answer;
- bool earlyMode=false;
- buffer=socket->readAll();
- QList<QByteArray> bList=buffer.split('#');
- switch (bList.at(0).toInt()) {
- case MSG_registerDomain:
- if (QString(bList.at(4))=="true") {
- earlyMode=true;
- }
- answer=audiomanager->registerDomain((char*)bList.at(1).data(),(char*)bList.at(2).data(),(char*)bList.at(3).data(),earlyMode);
- socket->write(QByteArray::number(answer));
- break;
- case MSG_registerGateway:
- answer=audiomanager->registerGateway((char*)bList.at(1).data(),(char*)bList.at(2).data(),(char*)bList.at(3).data(),(char*)bList.at(4).data(),(char*)bList.at(5).data(),(char*)bList.at(6).data());
- socket->write(QByteArray::number(answer));
- break;
- case MSG_registerSink:
- answer=audiomanager->registerSink((char*)bList.at(1).data(),(char*)bList.at(2).data(),(char*)bList.at(3).data());
- socket->write(QByteArray::number(answer));
- break;
- case MSG_registerSource:
- answer=audiomanager->registerSource((char*)bList.at(1).data(),(char*)bList.at(2).data(),(char*)bList.at(3).data());
- socket->write(QByteArray::number(answer));
- break;
- case MSG_peekDomain:
- answer=audiomanager->peekDomain((char*)bList.at(1).data());
- socket->write(QByteArray::number(answer));
- break;
- }
-}
+++ /dev/null
-/*
- * TcpServer.h
- *
- * Created on: Apr 6, 2011
- * Author: blacky
- */
-
-#ifndef I2CSERVER_H_
-#define I2CSERVER_H_
-
-#include <QtNetwork>
-#include <QObject>
-
-#include "routinginterface.h"
-#include "tcpMessages.h"
-
-class TcpServer : public QTcpServer{
-Q_OBJECT
-public:
- TcpServer(int ListenPort);
- virtual ~TcpServer();
-
- void registerAudioManager(RoutingReceiveInterface *audiomanager_);
-
-public slots:
- void receivedCommand();
- void startRead();
-
-private:
- QTcpSocket* socket;
- RoutingReceiveInterface *audiomanager;
-};
-
-#endif /* I2CSERVER_H_ */
+++ /dev/null
-/*
- * udpClient.cpp
- *
- * Created on: Apr 6, 2011
- * Author: blacky
- */
-
-#include "tcpClient.h"
-#include <iostream>
-
-using namespace std;
-
-tcpClient::tcpClient(QString serverIP_, int serverPort_) {
- serverIP=serverIP_;
- serverPort=serverPort_;
- QObject::connect(this, SIGNAL(connected()), this, SLOT(sendOut()));
-}
-
-tcpClient::~tcpClient() {
- // TODO Auto-generated destructor stub
-}
-
-int tcpClient::connect(int source, int sink) {
-
- sendBuffer.clear();
- sendBuffer.append(QByteArray::number(MSG_CONNECT));
- sendBuffer.append('#');
- sendBuffer.append(QByteArray::number(source));
- sendBuffer.append('#');
- sendBuffer.append(QByteArray::number(sink));
- if (send()) {
- this->waitForReadyRead(CONNECT_TIMEOUT);
- return this->readAll().toInt();
- } else {
- return -1;
- }
-
-}
-
-void tcpClient::system_ready() {
-
- sendBuffer.clear();
- sendBuffer.append(QByteArray::number(SIG_system_ready));
- send();
-}
-
-bool tcpClient::send() {
- QHostAddress adr;
- adr.setAddress(serverIP);
- this->connectToHost(adr,serverPort);
- if (!this->waitForConnected(CONNECT_TIMEOUT)) {
- cout<<"No connection"<<endl;
- return false;
- } else {
- cout<<"got connection"<<endl;
- return true;
- }
-}
-
-void tcpClient::sendOut() {
- this->write(sendBuffer);
-}
+++ /dev/null
-/*
- * udpClient.h
- *
- * Created on: Apr 6, 2011
- * Author: blacky
- */
-#ifndef UDPCLIENT_H_
-#define UDPCLIENT_H_
-
-#include <QtNetwork>
-#include "tcpMessages.h"
-
-class tcpClient : public QTcpSocket
-{
-Q_OBJECT
-public:
- tcpClient(QString serverIP, int serverPort);
- virtual ~tcpClient();
-
- int connect(int source, int sink);
- void system_ready();
-
- bool send();
-
-public slots:
- void sendOut();
-
-
-private:
- QString serverIP;
- int serverPort;
- QByteArray sendBuffer;
-
-};
-
-#endif /* UDPCLIENT_H_ */
+++ /dev/null
-diff -crBN pulseaudio-0.9.22/configure.ac pulseaudio-0.9.22-patched/configure.ac
-*** pulseaudio-0.9.22/configure.ac 2010-11-26 01:45:43.000000000 +0100
---- pulseaudio-0.9.22-patched/configure.ac 2011-06-30 15:16:20.224520001 +0200
-***************
-*** 1273,1279 ****
- AC_SUBST(HAVE_OPENSSL)
- AM_CONDITIONAL([HAVE_OPENSSL], [test "x$HAVE_OPENSSL" = x1])
-
-! ### Build and Install man pages ###
- AC_ARG_ENABLE(manpages,
- AS_HELP_STRING([--disable-manpages],[Disable building and installation of man pages]),
- [case "${enableval}" in
---- 1273,1300 ----
- AC_SUBST(HAVE_OPENSSL)
- AM_CONDITIONAL([HAVE_OPENSSL], [test "x$HAVE_OPENSSL" = x1])
-
-! #### GENIVI support ####
-! AC_ARG_ENABLE([genivi],
-! AC_HELP_STRING([--disable-genivi],[Disable optional genivi module support]),
-! [
-! case "${enableval}" in
-! yes) genivi=yes ;;
-! no) genivi=no ;;
-! *) AC_MSG_ERROR(bad value ${enableval} for --disable-genivi) ;;
-! esac
-! ],
-! [genivi=yes])
-!
-! if test "x${genivi}" != xno && test "x$HAVE_DBUS" = x1; then
-! AC_DEFINE([GENIVI], 1, [Have GENIVI module.])
-! GENIVI=1
-! else
-! GENIVI=0
-! fi
-!
-! AM_CONDITIONAL([GENIVI], [test "x$GENIVI" = x1])
-!
-! ## Build and Install man pages ###
- AC_ARG_ENABLE(manpages,
- AS_HELP_STRING([--disable-manpages],[Disable building and installation of man pages]),
- [case "${enableval}" in
-***************
-*** 1525,1530 ****
---- 1546,1556 ----
- ENABLE_PER_USER_ESOUND_SOCKET=yes
- fi
-
-+ ENABLE_GENIVI_SUPPORT=no
-+ if test "x$GENIVI" = "x1" ; then
-+ ENABLE_GENIVI_SUPPORT=yes
-+ fi
-+
- echo "
- ---{ $PACKAGE_NAME $VERSION }---
-
-***************
-*** 1560,1566 ****
- Enable tdb: ${ENABLE_TDB}
- Enable gdbm: ${ENABLE_GDBM}
- Enable simple database: ${ENABLE_SIMPLEDB}
-!
- System User: ${PA_SYSTEM_USER}
- System Group: ${PA_SYSTEM_GROUP}
- Access Group: ${PA_ACCESS_GROUP}
---- 1586,1592 ----
- Enable tdb: ${ENABLE_TDB}
- Enable gdbm: ${ENABLE_GDBM}
- Enable simple database: ${ENABLE_SIMPLEDB}
-! Enable Genivi support ${ENABLE_GENIVI_SUPPORT}
- System User: ${PA_SYSTEM_USER}
- System Group: ${PA_SYSTEM_GROUP}
- Access Group: ${PA_ACCESS_GROUP}
-diff -crBN pulseaudio-0.9.22/HOWTO testing pulseaudio-0.9.22-patched/HOWTO testing
-*** pulseaudio-0.9.22/HOWTO testing 1970-01-01 01:00:00.000000000 +0100
---- pulseaudio-0.9.22-patched/HOWTO testing 2011-06-30 15:16:20.224520001 +0200
-***************
-*** 0 ****
---- 1,24 ----
-+ HOWTO testing
-+
-+ Created on: Mar 24, 2011
-+ Author: blacky
-+
-+ In order to test the pulseaudio server, this figured the best way to do that:
-+
-+ first, deinstall pulse audio with apt-get for example
-+
-+ unpack pulseaudio,
-+ add modified modules,
-+ patch configure.ac,
-+ patch src/Makefile.am
-+
-+ change src/default.pa
-+
-+ run /bootstrap
-+ run /configure
-+
-+ to start from commandline with log output, do
-+
-+ src/pulseaudio -n -F src/default.pa -p $(pwd)/src/.libs/ -vvvv
-+
-+ in the directory of pulse
-diff -crBN pulseaudio-0.9.22/src/Genivi.conf pulseaudio-0.9.22-patched/src/Genivi.conf
-*** pulseaudio-0.9.22/src/Genivi.conf 1970-01-01 01:00:00.000000000 +0100
---- pulseaudio-0.9.22-patched/src/Genivi.conf 2011-06-30 15:16:20.224520001 +0200
-***************
-*** 0 ****
---- 1,12 ----
-+ Source:Rhythmbox,default
-+ Source:Totem Movie Player,default
-+ Source:navigation,nav
-+ Source:player,default
-+ Source:radio,rad
-+ Source:ta,ta
-+ Source:rtp,default
-+ Sink:tunnel,default
-+ Sink:alsa_usb,default
-+ Sink:alsa_intern,default
-+ Gateway:gw_Pulse_Jack,jack_out,PulseAudio JACK Sink,JACK,gw_out
-+ Gateway:gw_Jack_Pulse,PulseAudio JACK Source,jack_in,JACK,gw_in
-diff -crBN pulseaudio-0.9.22/src/Makefile.am pulseaudio-0.9.22-patched/src/Makefile.am
-*** pulseaudio-0.9.22/src/Makefile.am 2010-11-26 01:45:43.000000000 +0100
---- pulseaudio-0.9.22-patched/src/Makefile.am 2011-06-30 15:16:20.228520001 +0200
-***************
-*** 1576,1581 ****
---- 1576,1590 ----
- module_always_sink_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINORMICRO@.la libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la
- module_always_sink_la_CFLAGS = $(AM_CFLAGS)
-
-+ # Genivi module
-+ if GENIVI
-+ modlibexec_LTLIBRARIES += module-genivi.la
-+ module_genivi_la_SOURCES = modules/module-genivi.c
-+ module_genivi_la_LDFLAGS = $(MODULE_LDFLAGS)
-+ module_genivi_la_LIBADD = $(AM_LIBADD) $(DBUS_LIBS) libpulsecore-@PA_MAJORMINORMICRO@.la libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la
-+ module_genivi_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
-+ endif
-+
- # Rescue streams module
- module_rescue_streams_la_SOURCES = modules/module-rescue-streams.c
- module_rescue_streams_la_LDFLAGS = $(MODULE_LDFLAGS)
-diff -crBN pulseaudio-0.9.22/src/modules/module-genivi.c pulseaudio-0.9.22-patched/src/modules/module-genivi.c
-*** pulseaudio-0.9.22/src/modules/module-genivi.c 1970-01-01 01:00:00.000000000 +0100
---- pulseaudio-0.9.22-patched/src/modules/module-genivi.c 2011-06-30 15:16:20.232519999 +0200
-***************
-*** 0 ****
---- 1,1503 ----
-+ /***
-+ To be done
-+ ***/
-+
-+
-+ #ifdef HAVE_CONFIG_H
-+ #include <config.h>
-+ #endif
-+
-+ #include <stdio.h>
-+ #include <stdlib.h>
-+ #include <string.h>
-+ #include <unistd.h>
-+
-+ #include <pulse/xmalloc.h>
-+ #include <pulse/util.h>
-+ #include <pulse/i18n.h>
-+ #include <pulse/utf8.h>
-+
-+ #include <pulsecore/sink.h>
-+ #include <pulsecore/llist.h>
-+ #include <pulsecore/source.h>
-+ #include <pulsecore/core-util.h>
-+ #include <pulsecore/log.h>
-+ #include <pulsecore/modargs.h>
-+ #include <pulsecore/dbus-shared.h>
-+ #include <pulsecore/endianmacros.h>
-+ #include <pulsecore/namereg.h>
-+ #include <pulsecore/mime-type.h>
-+ #include <pulsecore/strbuf.h>
-+ #include <pulsecore/protocol-http.h>
-+ #include <pulsecore/parseaddr.h>
-+
-+ //#include "module-genivi-symdef.h"
-+
-+ #define ROUTING_INTERFACE_TARGET "com.Genivi.routinginterface"
-+ #define ROUTING_REGISTER_PATH "/Hello"
-+ #define ROUTING_INTERFACE_NAME "com.genivi.routing"
-+ #define R_REGISTER_SOURCE "registerSource"
-+ #define R_REGISTER_DOMAIN "registerDomain"
-+ #define R_REGISTER_SINK "registerSink"
-+ #define R_REGISTER_GATEWAY "registerGateway"
-+ #define R_PEEK_DOMAIN "peekDomain"
-+
-+ PA_MODULE_AUTHOR("Christian Mueller");
-+ PA_MODULE_DESCRIPTION(_("Routing the Genivi way"));
-+ PA_MODULE_VERSION(PACKAGE_VERSION);
-+ PA_MODULE_LOAD_ONCE(TRUE);
-+ PA_MODULE_USAGE("Hello");
-+
-+ #define SERVICE_NAME "org.genivi.pulse"
-+ #define OBJECT_ROOT "/org/genivi/pulse"
-+ #define OBJECT_PATH "/pulse"
-+ #define OBJECT_PULSE "/org/genivi/pulse/pulse"
-+
-+ #define THIS_DOMAIN "PULSE"
-+
-+ #define ROOT_INTROSPECT_XML \
-+ DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE \
-+ "<node>" \
-+ "<interface name='org.freedesktop.DBus.Introspectable'>" \
-+ "<method name='Introspect'>" \
-+ " <arg name='xml_data' type='s' direction='out'/>" \
-+ "</method>" \
-+ "</interface>" \
-+ "<node name='pulse'>" \
-+ "</node>" \
-+
-+ #define PULSE_INTROSPECT_XML \
-+ DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE \
-+ "<node name='pulse'>" \
-+ " <interface name='"SERVICE_NAME"'>" \
-+ " <method name='connect'>" \
-+ " <arg name='sourceID' type='i' direction='in' />" \
-+ " <arg name='sinkID' type='i' direction='in' />" \
-+ " <arg name='connectionID' type='i' direction='in' />" \
-+ " <arg name='answer' type='i' direction='out'/>" \
-+ " </method>" \
-+ " <method name='disconnect'>" \
-+ " <arg name='connectionID' type='i' direction='in' />" \
-+ " <arg name='answer' type='i' direction='out'/>" \
-+ " </method>" \
-+ " <method name='setSinkVolume'>" \
-+ " <arg name='volume' type='i' direction='in' />" \
-+ " <arg name='sinkID' type='i' direction='in' />" \
-+ " <arg name='answer' type='i' direction='out'/>" \
-+ " </method>" \
-+ " <method name='setSourceVolume'>" \
-+ " <arg name='volume' type='i' direction='in' />" \
-+ " <arg name='sourceID' type='i' direction='in' />" \
-+ " <arg name='answer' type='i' direction='out'/>" \
-+ " </method>" \
-+ " <method name='muteSink'>" \
-+ " <arg name='sinkID' type='i' direction='in' />" \
-+ " <arg name='answer' type='i' direction='out'/>" \
-+ " </method>" \
-+ " <method name='muteSource'>" \
-+ " <arg name='sourceID' type='i' direction='in' />" \
-+ " <arg name='answer' type='i' direction='out'/>" \
-+ " </method>" \
-+ " <method name='unmuteSink'>" \
-+ " <arg name='sinkID' type='i' direction='in' />" \
-+ " <arg name='answer' type='i' direction='out'/>" \
-+ " </method>" \
-+ " <method name='unmuteSource'>" \
-+ " <arg name='sourceID' type='i' direction='in' />" \
-+ " <arg name='answer' type='i' direction='out'/>" \
-+ " </method>" \
-+ "</interface>" \
-+ "<interface name='org.freedesktop.DBus.Introspectable'>" \
-+ "<method name='Introspect'>" \
-+ " <arg name='xml_data' type='s' direction='out'/>" \
-+ "</method>" \
-+ "</interface>" \
-+ "</node>"
-+
-+ static const char* const valid_modargs[] = {
-+ "file_name",
-+ NULL
-+ };
-+
-+ struct genSink {
-+ PA_LLIST_FIELDS(struct genSink);
-+ char* name;
-+ pa_sink* sink;
-+ int ID;
-+ };
-+
-+ struct genSource {
-+ PA_LLIST_FIELDS(struct genSource);
-+ char* name;
-+ pa_source* source;
-+ pa_sink* linked_sink;
-+ int ID;
-+ };
-+
-+ struct genModule {
-+ PA_LLIST_FIELDS(struct genModule);
-+ struct genSource* source;
-+ struct genSink* sinks;
-+ };
-+
-+ struct genGateways {
-+ PA_LLIST_FIELDS(struct genGateways);
-+ char* source;
-+ char* sinks;
-+ int sinkID;
-+ int sourceID;
-+ int ID;
-+ };
-+
-+ struct genConnections {
-+ PA_LLIST_FIELDS(struct genConnections);
-+ int ID;
-+ struct genSink* Sink;
-+ struct genSource* Source;
-+ };
-+
-+ typedef enum {
-+ gw_in=0,
-+ gw_out
-+ }gwDirection_t;
-+
-+ struct clientGateWays {
-+ PA_LLIST_FIELDS(struct clientGateWays);
-+ char name[30];
-+ char sink_name[30];
-+ char source_name[30];
-+ char domain_name[30];
-+ gwDirection_t direction;
-+ };
-+
-+ struct clientSource {
-+ PA_LLIST_FIELDS(struct clientSource);
-+ char name[30];
-+ char Audioclass[30];
-+ };
-+
-+ struct clientSink {
-+ PA_LLIST_FIELDS(struct clientSink);
-+ char name[30];
-+ char Audioclass[30];
-+ };
-+
-+ struct userdata {
-+ char* name;
-+ pa_dbus_connection *bus;
-+ pa_core *core;
-+ PA_LLIST_HEAD(struct genSink, listSinks);
-+ PA_LLIST_HEAD(struct genSource, listSources);
-+ PA_LLIST_HEAD(struct genModule, listModules);
-+ PA_LLIST_HEAD(struct genGateways, listGateways);
-+ PA_LLIST_HEAD(struct genConnections, listConnections);
-+ PA_LLIST_HEAD(struct clientSink, listClientSinks);
-+ PA_LLIST_HEAD(struct clientSource, listClientSources);
-+ PA_LLIST_HEAD(struct clientGateWays, listCLientGateways);
-+ };
-+
-+ //<node>
-+ // <interface name="com.genivi.routing">
-+ // <method name="registerSource">
-+ // <arg name="name" type="s" direction="in" />
-+ // <arg name="audioclass" type="s" direction="in" />
-+ // <arg name="domain" type="s" direction="in"/>
-+ // <arg name="assigned_adress" type="i" direction="out"/>
-+ // </method>
-+ // <method name="registerDomain">
-+ // <arg name="name" type="s" direction="in" />
-+ // <arg name="node" type="s" direction="in" />
-+ // <arg name="earlymode" type="b" direction="in"/>
-+ // <arg name="assigned_adress" type="i" direction="out"/>
-+ // </method>
-+ // <method name="registerSink">
-+ // <arg name="name" type="s" direction="in" />
-+ // <arg name="sinkclass" type="s" direction="in" />
-+ // <arg name="domain" type="s" direction="in"/>
-+ // <arg name="assigned_adress" type="i" direction="out"/>
-+ // </method>
-+ // <method name="registerGateway">
-+ // <arg name="name" type=s->name;"s" direction="in" />
-+ // <arg name="sink" type="s" direction="in" />
-+ // <arg name="source" type="s" direction="in" />
-+ // <arg name="domainSource" type="s" direction="in"/>
-+ // <arg name="domainSink" type="s" direction="in"/>
-+ // <arg name="controlDomain" type="s" direction="in"/>loadConfigFile
-+ // <arg name="assigned_adress" type="i" direction="out"/>int RegisterSource(const char* name,const char* audioclass, const char* Domain, void* userdata);
-+ // </method>
-+ // <signal name="SystemReady"/>
-+ //</node>
-+
-+ //all these functions can be called @ the routinginterface
-+ int registerSource(const char* name,const char* audioclass, const char* domain, void* userdata);
-+ int registerDomain(const char* name,const char* node, pa_bool_t earlymode, void* userdata);
-+ int registerSink(const char* name, const char* sinkclass, const char* domain, void* userdata);
-+ int registerGateway(const char* name, const char* sink, const char* source, const char* domainSource, const char* domainSink, const char* controlDomain, void* userdata);
-+ int peekDomain(const char* name, void* userdata);
-+
-+ //all these functions can be called from the routinginterface
-+ void DbusHandleConnect(pa_core* c,DBusMessage *m, void* userdata);
-+ void DbusHandleDisconnect(pa_core* c,DBusMessage *m, void* userdata);
-+ void DbusHandleSetSourceVolume(pa_core* c,DBusMessage *m, void* userdata);
-+ void DbusHandleSetSinkVolume(pa_core* c,DBusMessage *m, void* userdata);
-+ void DbusHandleMuteSource(pa_core* c,DBusMessage *m, void* userdata);
-+ void DbusHandleMuteSink(pa_core* c,DBusMessage *m, void* userdata);
-+ void DbusHandleUmuteSource(pa_core* c,DBusMessage *m, void* userdata);
-+ void DbusHandleUmuteSink(pa_core* c,DBusMessage *m, void* userdata);
-+
-+ void intialRegistration(pa_core* c,void* userdata);
-+
-+ /** This function loads a configuration file with sources and sinks into
-+ * the structures.
-+ * @param filename the filename. Must be given absolute.
-+ */
-+ void loadConfigFile(const char* filename,void* userdata);
-+
-+ int registerSource(const char* name,const char* audioclass, const char* domain, void* userdata) {
-+ struct userdata *u = userdata;
-+
-+ DBusConnection* conn=pa_dbus_connection_get(u->bus);
-+ DBusMessage* msg;
-+ DBusMessageIter args;
-+ DBusPendingCall* pending;
-+ int retval;
-+
-+ pa_assert_se(msg = dbus_message_new_method_call(
-+ ROUTING_INTERFACE_TARGET, // target for the method call
-+ ROUTING_REGISTER_PATH, // path to call on
-+ ROUTING_INTERFACE_NAME, // interface to call on
-+ R_REGISTER_SOURCE)); // method name
-+
-+ if (NULL == msg) {
-+ pa_log("Message Null");
-+ exit(1);
-+ }
-+
-+ // append arguments
-+ pa_assert_se(dbus_message_append_args ( msg,
-+ DBUS_TYPE_STRING, &name,
-+ DBUS_TYPE_STRING, &audioclass,
-+ DBUS_TYPE_STRING, &domain,
-+ DBUS_TYPE_INVALID));
-+ // send message and get a handle for a reply
-+ if (!dbus_connection_send_with_reply (conn, msg, &pending, -1)) { // -1 is default timeout
-+ pa_log( "Out Of Memory!\n");
-+ exit(1);
-+ }
-+ if (NULL == pending) {
-+ pa_log("Pending Call Null\n");
-+ exit(1);
-+ }
-+ //force message out, if queue did not react
-+ dbus_connection_flush(conn);
-+
-+ pa_log("Send out RegisterSource");
-+
-+ // free message
-+ dbus_message_unref(msg);
-+
-+ // block until we recieve a reply
-+ dbus_pending_call_block(pending);
-+
-+ // get the reply message
-+ msg = dbus_pending_call_steal_reply(pending);
-+ if (NULL == msg) {
-+ pa_log("Reply Null\n");
-+ exit(1);
-+ }
-+ // free the pending message handle
-+ dbus_pending_call_unref(pending);
-+
-+ // read the parameters
-+ if (!dbus_message_iter_init(msg, &args))
-+ pa_log("Message has no arguments!\n");
-+ else
-+ dbus_message_iter_get_basic(&args, &retval);
-+
-+ pa_log("Got Reply: %i\n", retval);
-+
-+ // free reply and close connection
-+ dbus_message_unref(msg);
-+ return retval;
-+ }
-+
-+ int registerDomain(const char* name,const char* node, pa_bool_t earlymode, void* userdata) {
-+ struct userdata *u = userdata;
-+
-+ DBusConnection* conn=pa_dbus_connection_get(u->bus);
-+ DBusMessage* msg;
-+ DBusMessageIter args;
-+ DBusPendingCall* pending;
-+ int retval, ibool=0;
-+
-+ if (earlymode==TRUE) {
-+ ibool=1;
-+ }
-+
-+ pa_assert_se(msg = dbus_message_new_method_call(
-+ ROUTING_INTERFACE_TARGET, // target for the method call
-+ ROUTING_REGISTER_PATH, // path to call on
-+ ROUTING_INTERFACE_NAME, // interface to call on
-+ R_REGISTER_DOMAIN)); // method name
-+
-+ if (NULL == msg) {
-+ pa_log("Message Null");
-+ exit(1);
-+ }
-+
-+ // append arguments
-+ pa_assert_se(dbus_message_append_args ( msg,
-+ DBUS_TYPE_STRING, &name,
-+ DBUS_TYPE_STRING, &node,
-+ DBUS_TYPE_BOOLEAN, &ibool,
-+ DBUS_TYPE_INVALID));
-+
-+ pa_log("send message\n");
-+ // send message and get a handle for a reply
-+ if (!dbus_connection_send_with_reply (conn, msg, &pending, -1)) { // -1 is default timeout
-+ pa_log( "Out Of Memory!\n");
-+ exit(1);
-+ }
-+ if (NULL == pending) {
-+ pa_log("Pending Call Null\n");
-+ exit(1);
-+ }
-+ //force message out, if queue did not react
-+ dbus_connection_flush(conn);
-+
-+ pa_log("Send out %s",R_REGISTER_DOMAIN);
-+
-+ // free message
-+ dbus_message_unref(msg);
-+
-+ // block until we recieve a reply
-+ dbus_pending_call_block(pending);
-+
-+ // get the reply message
-+ msg = dbus_pending_call_steal_reply(pending);
-+ if (NULL == msg) {
-+ pa_log("Reply Null\n");
-+ exit(1);
-+ }
-+ // free the pending message handle
-+ dbus_pending_call_unref(pending);
-+
-+ // read the parameters
-+ if (!dbus_message_iter_init(msg, &args))
-+ pa_log("Message has no arguments!\n");
-+ else
-+ dbus_message_iter_get_basic(&args, &retval);
-+ pa_log("Got Reply: %i\n", retval);
-+
-+ // free reply and close connection
-+ dbus_message_unref(msg);
-+ return retval;
-+ }
-+ int registerSink(const char* name, const char* sinkclass, const char* domain, void* userdata) {
-+ struct userdata *u = userdata;
-+
-+ DBusConnection* conn=pa_dbus_connection_get(u->bus);
-+ DBusMessage* msg;
-+ DBusMessageIter args;
-+ DBusPendingCall* pending;
-+ int retval=0;
-+
-+ pa_assert_se(msg = dbus_message_new_method_call(
-+ ROUTING_INTERFACE_TARGET, // target for the method call
-+ ROUTING_REGISTER_PATH, // path to call on
-+ ROUTING_INTERFACE_NAME, // interface to call on
-+ R_REGISTER_SINK)); // method name
-+
-+ if (NULL == msg) {
-+ pa_log("Message Null");
-+ exit(1);
-+ }
-+ pa_log("Sink %s",name);
-+ // append arguments
-+ pa_assert_se(dbus_message_append_args ( msg,
-+ DBUS_TYPE_STRING, &name,
-+ DBUS_TYPE_STRING, &sinkclass,
-+ DBUS_TYPE_STRING, &domain,
-+ DBUS_TYPE_INVALID));
-+
-+ pa_log("send message\n");
-+ // send message and get a handle for a reply
-+ if (!dbus_connection_send_with_reply (conn, msg, &pending, -1)) { // -1 is default timeout
-+ pa_log( "Out Of Memory!\n");
-+ exit(1);
-+ }
-+ if (NULL == pending) {
-+ pa_log("Pending Call Null\n");
-+ exit(1);
-+ }
-+ //force message out, if queue did not react
-+ dbus_connection_flush(conn);
-+
-+ pa_log("Send out %s",R_REGISTER_SINK);
-+
-+ // free message
-+ dbus_message_unref(msg);
-+
-+ // block until we recieve a reply
-+ dbus_pending_call_block(pending);
-+
-+ // get the reply message
-+ msg = dbus_pending_call_steal_reply(pending);
-+ if (NULL == msg) {
-+ pa_log("Reply Null\n");
-+ exit(1);
-+ }
-+ // free the pending message handle
-+ dbus_pending_call_unref(pending);
-+
-+ // read the parameters
-+ if (!dbus_message_iter_init(msg, &args))
-+ pa_log("Message has no arguments!\n");
-+ else
-+ dbus_message_iter_get_basic(&args, &retval);
-+
-+ pa_log("Got Reply: %i\n", retval);
-+
-+ // free reply and close connection
-+ dbus_message_unref(msg);
-+ return retval;
-+ }
-+ int registerGateway(const char* name, const char* sink, const char* source, const char* domainSource, const char* domainSink, const char* controlDomain, void* userdata) {
-+ struct userdata *u = userdata;
-+
-+ DBusConnection* conn=pa_dbus_connection_get(u->bus);
-+ DBusMessage* msg;
-+ DBusMessageIter args;
-+ DBusPendingCall* pending;
-+ int retval=0;
-+
-+ pa_assert_se(msg = dbus_message_new_method_call(
-+ ROUTING_INTERFACE_TARGET, // target for the method call
-+ ROUTING_REGISTER_PATH, // path to call on
-+ ROUTING_INTERFACE_NAME, // interface to call on
-+ R_REGISTER_GATEWAY)); // method name
-+
-+ if (NULL == msg) {
-+ pa_log("Message Null");
-+ exit(1);
-+ }
-+
-+ // append arguments
-+ pa_assert_se(dbus_message_append_args ( msg,
-+ DBUS_TYPE_STRING, &name,
-+ DBUS_TYPE_STRING, &sink,
-+ DBUS_TYPE_STRING, &source,
-+ DBUS_TYPE_STRING, &domainSource,
-+ DBUS_TYPE_STRING, &domainSink,
-+ DBUS_TYPE_STRING, &controlDomain,
-+ DBUS_TYPE_INVALID));
-+
-+ // send message and get a handle for a reply
-+ if (!dbus_connection_send_with_reply (conn, msg, &pending, -1)) { // -1 is default timeout
-+ pa_log( "Out Of Memory!\n");
-+ exit(1);
-+ }
-+ if (NULL == pending) {
-+ pa_log("Pending Call Null\n");
-+ exit(1);
-+ }
-+ //force message out, if queue did not react
-+ dbus_connection_flush(conn);
-+
-+ pa_log("Send out %s",R_REGISTER_GATEWAY);
-+
-+ // free message
-+ dbus_message_unref(msg);
-+
-+ // block until we recieve a reply
-+ dbus_pending_call_block(pending);
-+
-+ // get the reply message
-+ msg = dbus_pending_call_steal_reply(pending);
-+ if (NULL == msg) {
-+ pa_log("Reply Null\n");
-+ exit(1);
-+ }
-+ // free the pending message handle
-+ dbus_pending_call_unref(pending);
-+
-+ // read the parameters
-+ if (!dbus_message_iter_init(msg, &args))
-+ pa_log("Message has no arguments!\n");
-+ else
-+ dbus_message_iter_get_basic(&args, &retval);
-+
-+ pa_log("Got Reply: %i\n", retval);
-+
-+ // free reply and close connection
-+ dbus_message_unref(msg);
-+ return retval;
-+ }
-+ int peekDomain(const char* name, void* userdata) {
-+ struct userdata *u = userdata;
-+
-+ DBusConnection* conn=pa_dbus_connection_get(u->bus);
-+ DBusMessage* msg;
-+ DBusMessageIter args;
-+ DBusPendingCall* pending;
-+ int retval=0;
-+
-+ pa_assert_se(msg = dbus_message_new_method_call(
-+ ROUTING_INTERFACE_TARGET, // target for the method call
-+ ROUTING_REGISTER_PATH, // path to call on
-+ ROUTING_INTERFACE_NAME, // interface to call on
-+ R_PEEK_DOMAIN)); // method name
-+
-+ if (NULL == msg) {
-+ pa_log("Message Null");
-+ exit(1);
-+ }
-+
-+ // append arguments
-+ pa_assert_se(dbus_message_append_args ( msg,
-+ DBUS_TYPE_STRING, &name,
-+ DBUS_TYPE_INVALID));
-+
-+ // send message and get a handle for a reply
-+ if (!dbus_connection_send_with_reply (conn, msg, &pending, -1)) { // -1 is default timeout
-+ pa_log( "Out Of Memory!\n");
-+ exit(1);
-+ }
-+ if (NULL == pending) {
-+ pa_log("Pending Call Null\n");
-+ exit(1);
-+ }
-+ //force message out, if queue did not react
-+ dbus_connection_flush(conn);
-+
-+ pa_log("Send out %s",R_PEEK_DOMAIN);
-+
-+ // free message
-+ dbus_message_unref(msg);
-+
-+ // block until we recieve a reply
-+ dbus_pending_call_block(pending);
-+
-+ // get the reply message
-+ msg = dbus_pending_call_steal_reply(pending);
-+ if (NULL == msg) {
-+ pa_log("Reply Null\n");
-+ exit(1);
-+ }
-+ // free the pending message handle
-+ dbus_pending_call_unref(pending);
-+
-+ // read the parameters
-+ if (!dbus_message_iter_init(msg, &args))
-+ pa_log("Message has no arguments!\n");
-+ else
-+ dbus_message_iter_get_basic(&args, &retval);
-+
-+ pa_log("Got Reply: %i\n", retval);
-+
-+ // free reply and close connection
-+ dbus_message_unref(msg);
-+ return retval;
-+ }
-+
-+ void DbusHandleConnect(pa_core* c,DBusMessage *m, void* userdata) {
-+ struct userdata *u = userdata;
-+ DBusMessage *r = NULL;
-+ DBusMessageIter args;
-+ int connect_source = 0;
-+ int connect_sink = 0;
-+ int32_t connect_ID;
-+
-+ if (!dbus_message_iter_init(m, &args)) {
-+ pa_log("connect message had no args");
-+ }
-+ dbus_message_iter_get_basic(&args, &connect_source);
-+ dbus_message_iter_next(&args);
-+ dbus_message_iter_get_basic(&args, &connect_sink);
-+ dbus_message_iter_next(&args);
-+ dbus_message_iter_get_basic(&args, &connect_ID);
-+ pa_log("Connect was called. Shall connect %d to %d, conn ID %d",connect_source,connect_sink,connect_ID);
-+
-+ struct genSink* Sink=NULL;
-+ PA_LLIST_FOREACH(Sink,u->listSinks) {
-+ pa_log("Sink name %s, sink ID %d",Sink->name,Sink->ID);
-+ if (Sink->ID==connect_sink) {
-+ pa_log("found matching sink : %s!",Sink->name);
-+ break;
-+ }
-+ }
-+
-+ //for this Sink, there shall be a new Source Linked
-+ struct genSource* Source=NULL;
-+ PA_LLIST_FOREACH(Source,u->listSources) {
-+ if (Source->ID==connect_source) {
-+ pa_log("found matching source : %s!",Source->name);
-+ Source->linked_sink=Sink->sink;
-+ break;
-+ }
-+ }
-+ //ok Sink input for this client exists -> move it !!!!
-+ pa_sink_input* s;
-+ uint32_t idx, idx2, idx3;
-+ PA_IDXSET_FOREACH(s, u->core->sink_inputs, idx) {
-+ char* app_name=pa_proplist_gets(s->proplist,PA_PROP_APPLICATION_NAME);
-+ if (app_name) {
-+ if (strcmp(app_name,Source->name)==0) {
-+ pa_log("move it!!!!!!");
-+ pa_sink_input_move_to(s,Sink->sink,TRUE);
-+ }
-+ }
-+ }
-+
-+ pa_source* so;
-+ pa_source_output* so_out;
-+ PA_IDXSET_FOREACH(so, u->core->sources, idx) {
-+ char* name=so->name;
-+ if (strcmp(name,Source->name)==0) {
-+ pa_log("found to be a real source, taking module-loop %s",Sink->sink->name);
-+ PA_IDXSET_FOREACH(s, u->core->sink_inputs, idx2) {
-+ char* client=s->module->name;
-+ if (strcmp(client,"module-loopback")==0) {
-+ pa_log("want to move to %s",Sink->sink->name);
-+ pa_sink_input_move_to(s,Sink->sink,TRUE);
-+ }
-+ }
-+ PA_IDXSET_FOREACH(so_out, u->core->source_outputs, idx3) {
-+ char* client=so_out->module->name;
-+ if (strcmp(client,"module-loopback")==0) {
-+ pa_source_output_move_to(so_out,so,TRUE);
-+ }
-+ }
-+ }
-+ }
-+
-+ struct genConnections* gConnect=NULL;
-+ gConnect= pa_xnew0(struct genConnections, 1);
-+ gConnect->ID=connect_ID;
-+ gConnect->Sink=Sink;
-+ gConnect->Source=Source;
-+ PA_LLIST_PREPEND(struct genConnections,u->listConnections,gConnect);
-+ pa_assert_se(r = dbus_message_new_method_return(m));
-+ dbus_message_append_args( r,
-+ DBUS_TYPE_INT32, &connect_ID,
-+ DBUS_TYPE_INVALID);
-+ pa_assert_se(dbus_connection_send(pa_dbus_connection_get(u->bus), r, NULL));
-+ dbus_message_unref(r);
-+
-+ }
-+
-+ void DBusHandleDisconnect(pa_core* c,DBusMessage *m, void* userdata) {
-+ struct userdata *u = userdata;
-+ DBusMessage *r = NULL;
-+ DBusMessageIter args;
-+ int32_t connectID = 0;
-+
-+ if (!dbus_message_iter_init(m, &args)) {
-+ pa_log("disconnect message had no args");
-+ }
-+ dbus_message_iter_get_basic(&args, &connectID);
-+ pa_log("Disconnect was called. Shall disconnect ID %d ",connectID);
-+
-+ struct genConnections* Connect=NULL;
-+ PA_LLIST_FOREACH(Connect,u->listConnections) {
-+ if (Connect->ID==connectID) {
-+ pa_log("found connection!");
-+ break;
-+ }
-+ }
-+
-+ Connect->Source->linked_sink=NULL;
-+ //pa_sink_detach(Connect->Sink->sink);
-+ pa_sink_input* s;
-+ uint32_t idx=0,idx2=0;
-+ PA_IDXSET_FOREACH(s, Connect->Sink->sink->inputs, idx) {
-+ char* app_name=s->sink->name;
-+ pa_log("name %s %s",app_name,Connect->Sink->name);
-+ if (strcmp(app_name,Connect->Sink->name)==0) {
-+ char* module_name=s->module->name;
-+ pa_log("module name %s",module_name);
-+ if(module_name && strcmp(module_name,"module-loopback")==0) {
-+ pa_sink* nu;
-+ PA_IDXSET_FOREACH(nu, u->core->sinks, idx2) {
-+ char* name=nu->name;
-+ if (strcmp(name,"null")==0) {
-+ pa_sink_input_move_to(s,nu,TRUE);
-+ break;
-+ }
-+ }
-+ } else {
-+
-+ char* app_name=pa_proplist_gets(s->proplist,PA_PROP_APPLICATION_NAME);
-+ if (strcmp(app_name,Connect->Source->name)==0) {
-+ pa_sink_input_kill(s);
-+ }
-+ }
-+ }
-+ }
-+ PA_LLIST_REMOVE(struct genConnections, u->listConnections,Connect);
-+
-+ pa_assert_se(r = dbus_message_new_method_return(m));
-+ dbus_message_append_args( r,
-+ DBUS_TYPE_INT32, &connectID,
-+ DBUS_TYPE_INVALID);
-+ pa_assert_se(dbus_connection_send(pa_dbus_connection_get(u->bus), r, NULL));
-+ dbus_message_unref(r);
-+
-+ //TODO handle errors
-+
-+ }
-+
-+ void DbusHandleSetSourceVolume(pa_core* c,DBusMessage *m, void* userdata) {
-+ struct userdata *u = userdata;
-+ DBusMessage *r = NULL;
-+ DBusMessageIter args;
-+ int volume = 0, sourceID=0;
-+ int32_t vol32;
-+
-+ if (!dbus_message_iter_init(m, &args)) {
-+ pa_log("SourceVolume message had no args");
-+ }
-+ dbus_message_iter_get_basic(&args, &volume);
-+ dbus_message_iter_next(&args);
-+ dbus_message_iter_get_basic(&args, &sourceID);
-+ pa_log("SourceVolume was called shall set %d to %d ",sourceID, volume);
-+
-+ struct genSource* Source=NULL;
-+ PA_LLIST_FOREACH(Source,u->listSources) {
-+ if (Source->ID==sourceID) {
-+ pa_log("found matching source : %s!",Source->name);
-+ break;
-+ }
-+ }
-+ pa_cvolume cvol;
-+ pa_cvolume_set(&cvol, 1, volume);
-+ pa_sink_input* si;
-+ int idx=0;
-+ PA_IDXSET_FOREACH(si, Source->linked_sink->inputs, idx) {
-+ char* app_name=pa_proplist_gets(si->proplist,PA_PROP_APPLICATION_NAME);
-+ if (strcmp(app_name,Source->name)==0) {
-+ pa_sink_input_set_volume(si, &cvol, TRUE, TRUE);
-+ }
-+ }
-+
-+
-+ vol32=(int32_t)volume;
-+ pa_assert_se(r = dbus_message_new_method_return(m));
-+ dbus_message_append_args( r,
-+ DBUS_TYPE_INT32, &vol32,
-+ DBUS_TYPE_INVALID);
-+ pa_assert_se(dbus_connection_send(pa_dbus_connection_get(u->bus), r, NULL));
-+ dbus_message_unref(r);
-+ }
-+
-+ void DbusHandleSetSinkVolume(pa_core* c,DBusMessage *m, void* userdata) {
-+ struct userdata *u = userdata;
-+ DBusMessage *r = NULL;
-+ DBusMessageIter args;
-+ int volume = 0, sinkID=0;
-+ int32_t vol32;
-+
-+ if (!dbus_message_iter_init(m, &args)) {
-+ pa_log("SinkVolume message had no args");
-+ }
-+ dbus_message_iter_get_basic(&args, &volume);
-+ dbus_message_iter_next(&args);
-+ dbus_message_iter_get_basic(&args, &sinkID);
-+ pa_log("SinkVolume was called shall set %d to %d ",sinkID, volume);
-+
-+ struct genSink* Sink=NULL;
-+ PA_LLIST_FOREACH(Sink,u->listSinks) {
-+ if (Sink->ID==sinkID) {
-+ pa_log("found matching source : %s!",Sink->name);
-+ break;
-+ }
-+ }
-+ pa_cvolume cvol=Sink->sink->real_volume;
-+
-+
-+ for (int i=0;i<=cvol.channels;i++) {
-+ cvol.values[i]=(pa_volume_t)volume;
-+ }
-+
-+ pa_sink_set_volume(Sink->sink,&cvol,TRUE,TRUE);
-+
-+ vol32=(int32_t) volume;
-+ pa_assert_se(r = dbus_message_new_method_return(m));
-+ dbus_message_append_args( r,
-+ DBUS_TYPE_INT32, &vol32,
-+ DBUS_TYPE_INVALID);
-+ pa_assert_se(dbus_connection_send(pa_dbus_connection_get(u->bus), r, NULL));
-+ dbus_message_unref(r);
-+ }
-+
-+ void DbusHandleMuteSource(pa_core* c,DBusMessage *m, void* userdata) {
-+ struct userdata *u = userdata;
-+ DBusMessage *r = NULL;
-+ DBusMessageIter args;
-+ int SourceID=0;
-+ int32_t vol32;
-+
-+ if (!dbus_message_iter_init(m, &args)) {
-+ pa_log("MuteSource message had no args");
-+ }
-+ dbus_message_iter_get_basic(&args, &SourceID);
-+ pa_log("MuteSource was called shall mute %d ",SourceID);
-+
-+ struct genSource* Source=NULL;
-+ PA_LLIST_FOREACH(Source,u->listSources) {
-+ if (Source->ID==SourceID) {
-+ pa_log("found matching source : %s!",Source->name);
-+ break;
-+ }
-+ }
-+
-+ pa_sink_input* si;
-+ int idx=0;
-+ PA_IDXSET_FOREACH(si, Source->linked_sink->inputs, idx) {
-+ char* app_name=pa_proplist_gets(si->proplist,PA_PROP_APPLICATION_NAME);
-+ if (strcmp(app_name,Source->name)==0) {
-+ pa_sink_input_set_mute(si,TRUE,TRUE);
-+ }
-+ }
-+
-+ vol32=(int32_t) 1;
-+ pa_assert_se(r = dbus_message_new_method_return(m));
-+ dbus_message_append_args( r,
-+ DBUS_TYPE_INT32, &vol32,
-+ DBUS_TYPE_INVALID);
-+ pa_assert_se(dbus_connection_send(pa_dbus_connection_get(u->bus), r, NULL));
-+ dbus_message_unref(r);
-+ }
-+
-+ void DbusHandleMuteSink(pa_core* c,DBusMessage *m, void* userdata) {
-+ struct userdata *u = userdata;
-+ DBusMessage *r = NULL;
-+ DBusMessageIter args;
-+ int SinkID=0;
-+ int32_t vol32;
-+
-+ if (!dbus_message_iter_init(m, &args)) {
-+ pa_log("MuteSource message had no args");
-+ }
-+ dbus_message_iter_get_basic(&args, &SinkID);
-+ pa_log("MuteSink was called shall mute %d ",SinkID);
-+
-+ struct genSink* Sink=NULL;
-+ PA_LLIST_FOREACH(Sink,u->listSinks) {
-+ if (Sink->ID==SinkID) {
-+ pa_log("found matching source : %s!",Sink->name);
-+ break;
-+ }
-+ }
-+
-+ pa_sink_set_mute(Sink->sink,TRUE,TRUE);
-+
-+ vol32=(int32_t) 1;
-+ pa_assert_se(r = dbus_message_new_method_return(m));
-+ dbus_message_append_args( r,
-+ DBUS_TYPE_INT32, &vol32,
-+ DBUS_TYPE_INVALID);
-+ pa_assert_se(dbus_connection_send(pa_dbus_connection_get(u->bus), r, NULL));
-+ dbus_message_unref(r);
-+ }
-+
-+ void DbusHandleUmuteSource(pa_core* c,DBusMessage *m, void* userdata) {
-+ struct userdata *u = userdata;
-+ DBusMessage *r = NULL;
-+ DBusMessageIter args;
-+ int SourceID=0;
-+ int32_t vol32;
-+
-+ if (!dbus_message_iter_init(m, &args)) {
-+ pa_log("MuteSource message had no args");
-+ }
-+ dbus_message_iter_get_basic(&args, &SourceID);
-+ pa_log("MuteSource was called shall mute %d ",SourceID);
-+
-+ struct genSource* Source=NULL;
-+ PA_LLIST_FOREACH(Source,u->listSources) {
-+ if (Source->ID==SourceID) {
-+ pa_log("found matching source : %s!",Source->name);
-+ break;
-+ }
-+ }
-+
-+ pa_sink_input* si;
-+ int idx=0;
-+ PA_IDXSET_FOREACH(si, Source->linked_sink->inputs, idx) {
-+ char* app_name=pa_proplist_gets(si->proplist,PA_PROP_APPLICATION_NAME);
-+ if (strcmp(app_name,Source->name)==0) {
-+ pa_sink_input_set_mute(si,FALSE,TRUE);
-+ }
-+ }
-+
-+ vol32=(int32_t) 1;
-+ pa_assert_se(r = dbus_message_new_method_return(m));
-+ dbus_message_append_args( r,
-+ DBUS_TYPE_INT32, &vol32,
-+ DBUS_TYPE_INVALID);
-+ pa_assert_se(dbus_connection_send(pa_dbus_connection_get(u->bus), r, NULL));
-+ dbus_message_unref(r);
-+ }
-+
-+ void DbusHandleUmuteSink(pa_core* c,DBusMessage *m, void* userdata) {
-+ struct userdata *u = userdata;
-+ DBusMessage *r = NULL;
-+ DBusMessageIter args;
-+ int SinkID=0;
-+ int32_t vol32;
-+
-+ if (!dbus_message_iter_init(m, &args)) {
-+ pa_log("MuteSource message had no args");
-+ }
-+ dbus_message_iter_get_basic(&args, &SinkID);
-+ pa_log("MuteSink was called shall mute %d ",SinkID);
-+
-+ struct genSink* Sink=NULL;
-+ PA_LLIST_FOREACH(Sink,u->listSinks) {
-+ if (Sink->ID==SinkID) {
-+ pa_log("found matching source : %s!",Sink->name);
-+ break;
-+ }
-+ }
-+
-+ pa_sink_set_mute(Sink->sink,FALSE,TRUE);
-+
-+ vol32=(int32_t) 1;
-+ pa_assert_se(r = dbus_message_new_method_return(m));
-+ dbus_message_append_args( r,
-+ DBUS_TYPE_INT32, &vol32,
-+ DBUS_TYPE_INVALID);
-+ pa_assert_se(dbus_connection_send(pa_dbus_connection_get(u->bus), r, NULL));
-+ dbus_message_unref(r);
-+
-+ }
-+
-+ void intialRegistration(pa_core* c,void* userdata) {
-+ struct userdata *u = userdata;
-+ //first we register the Domain
-+ const char * name=THIS_DOMAIN;
-+ const char * node="pulsePlugin";
-+ pa_bool_t earlymode=FALSE;
-+ int k=registerDomain(name,node,earlymode,u);
-+
-+ pa_sink* s;
-+ uint32_t idx_=0;
-+ //this is not neccessary -> just nicer names...
-+ PA_IDXSET_FOREACH(s, u->core->sinks, idx_) {
-+ if (strcmp(s->name,"alsa_output.usb-0ccd_USB_Audio-00-Aureon51MkII.analog-stereo")==0) {
-+ strcpy(s->name,"alsa_usb");
-+ }
-+ if (strcmp(s->name,"alsa_output.default")==0) {
-+ strcpy(s->name,"alsa_intern");
-+ }
-+ }
-+
-+ //get all current sinks and register them
-+ // pa_sink* s;
-+ // uint32_t idx;
-+ // int handle=0;
-+ // pa_bool_t is_gw=FALSE;
-+ // PA_IDXSET_FOREACH(s, u->core->sinks, idx) {
-+ // is_gw=FALSE;
-+ // for (int i=0;i <= sizeof(gatewayList)/sizeof(gateWays_t)-1;i++) {
-+ // if (strcmp(s->name,gatewayList[i].sink_name)==0) {
-+ // handle=registerGateway(gatewayList[i].name,gatewayList[i].sink_name,gatewayList[i].source_name,gatewayList[i].domain_name,THIS_DOMAIN,THIS_DOMAIN,u);
-+ // if (handle>0) {
-+ // is_gw=TRUE;
-+ //
-+ // struct genGateways* gWay=NULL;
-+ // gWay= pa_xnew0(struct genGateways, 1);
-+ //
-+ // struct genSink* Sink=NULL;
-+ // Sink = pa_xnew0(struct genSink, 1);
-+ //
-+ // Sink->sink=NULL;
-+ // gWay->ID=handle;
-+ //
-+ // handle=0;
-+ // handle=registerSink(gatewayList[i].sink_name,"default",THIS_DOMAIN,u);
-+ // if (handle>0){
-+ // Sink->sink=s;
-+ // Sink->ID=handle;
-+ // Sink->name=s->name;
-+ //
-+ // gWay->sinks=s->name;
-+ // gWay->sinkID=handle;
-+ // gWay->source=gatewayList[i].source_name;
-+ // gWay->sourceIis_gw=FALSE;D=registerSource(gatewayList[i].source_name,"default",gatewayList[i].domain_name,u);
-+ //
-+ //
-+ // PA_LLIST_PREPEND(struct genGateways,u->listGateways,gWay);
-+ // PA_LLIST_PREPEND(struct genSink,u->listSinks,Sink);
-+ // } else {
-+ // pa_log("Sink register failed");
-+ // break;
-+ // }
-+ // } else {
-+ // pa_log("GW register failed");
-+ // }
-+ // }
-+ // }
-+ // if ((strcmp(s->name,"null") ==0) && !is_gw) {
-+ // pa_log ("found null sink"); //do nothing, no worth it
-+ // } else if (!is_gw){
-+ // handle=0;
-+ // handle=registerSink(s->name,"default",THIS_DOMAIN,u);
-+ // if (handle>0) {
-+ //
-+ // struct genSink* Sit[i].name) {nk=NULL;
-+ //
-+ // Sink = pa_xnew0(struct genSink, 1);
-+ // Sink->sink=NULL;
-+ // Sink->sink=s;
-+ // Sink->ID=handle;
-+ // Sink->name= pa_sink* s;
-+ // PA_LLIST_PREPEND(struct genSink,u->listSinks,Sink);
-+ // } else {
-+ // pa_log("Sink register failed");
-+ // }
-+ // }
-+ // }
-+ //
-+ // pa_source* so;
-+ // handle=0;
-+ // //get all current sources and register them
-+ // PA_IDXSET_FOREACH(so, u->core->sources, idx) {
-+ // pa_log("Source %s",so->name);
-+ // is_gw=FALSE;
-+ // for (int i=0;i <= sizeof(gatewayList)/sizeof(gateWays_t)-1;i++) {
-+ // if (strcmp(so->name,gatewayList[i].source_name)==0) {
-+ // handle=registerGateway(gatewayList[i].name,gatewayList[i].sink_name,gatewayList[i].source_name,THIS_DOMAIN,gatewayList[i].domain_name,THIS_DOMAIN,u);
-+ // if (handle>0) {
-+ // is_gw=TRUE;
-+ //
-+ // struct genGateways* gWay=NULL;
-+ // gWay= pa_xnew0(struct genGateways, 1);
-+ //
-+ // struct genSource* Source=NULL;
-+ // Source= pa_xnew(struct genSource, 1);
-+ //
-+ // Source->linked_sink=NULL;
-+ // Source->source=NULL;
-+ //
-+ // gWay->ID=handle;
-+ //
-+ // handle=0;
-+ // handle = registerSource(gatewayintialRegistrationList[i].source_name,"default",THIS_DOMAIN,u);
-+ // if (handle>0) {
-+ // Source->source=so;
-+ // Source->ID=handle;
-+ // Source->name=so->name;
-+ //
-+ // gWay->source=so->name;
-+ // gWay->sinkID=registerSink(gatewayList[i].sink_name,"default",gatewayList[i].domain_name,u);
-+ // gWay->sinks=gatewayList[i].sink_name;
-+ // gWay->sourceID=handle;
-+ //
-+ //
-+ // PA_LLIST_PREPEND(struct genGateways,u->listGateways,gWay);
-+ // PA_LLIST_PREPEND(struct genSink,u->listSources,Source);
-+ // } else {
-+ // pa_log("GW Sink register failed");
-+ // break;
-+ // }
-+ // } else {
-+ // pa_log("GW register failed");
-+ // }
-+ // }
-+ // }
-+ // if ((strcmp(so->name,"null.monitor") ==0) && !is_gw) {
-+ // pa_log ("found null source"); //do nothing, no worth it
-+ // } else if (!is_gw){
-+ // handle=0;
-+ // handle=registerSource(so->name,"default",THIS_DOMAIN,u);
-+ // if (handle>0) {
-+ // struct genSource* Source=NULL;
-+ // Source = pa_xnew0(struct genSource, 1);
-+ // Source->linked_sink=NULL;
-+ // Source->source=NULL;
-+ //
-+ // Source->source=so;
-+ // Source->ID=handle;
-+ // Source->name=so->name;
-+ // PA_LLIST_PREPEND(struct genSource,u->listSources,Source);
-+ // } else {
-+ // pa_log("Source register failed");
-+ // }
-+ // }
-+ // }
-+
-+ //Real stuff is over, now we start faking Sources
-+ struct clientSource* clSource=NULL;
-+ PA_LLIST_FOREACH(clSource,u->listClientSources) {
-+ int handle=0;
-+ handle=registerSource(clSource->name,clSource->Audioclass,THIS_DOMAIN,u);
-+ if (handle>0) {
-+ struct genSource* Source=NULL;
-+ Source = pa_xnew0(struct genSource, 1);
-+ Source->linked_sink=NULL;
-+ Source->source=NULL;
-+
-+ Source->name=clSource->name;
-+ Source->ID=handle;
-+ struct genSink* Sink=NULL;
-+ PA_LLIST_FOREACH(Sink,u->listSinks) {
-+ if (Sink->sink->index==0) {
-+ pa_log("Attaching sink");
-+ Source->linked_sink=Sink->sink;
-+ }
-+ }
-+
-+ PA_LLIST_PREPEND(struct genSource,u->listSources,Source);
-+ } else {
-+ pa_log("Source register failed");
-+ }
-+ }
-+
-+ struct clientSink* clSink=NULL;
-+ pa_sink* cs;
-+ uint32_t idx_s=0;
-+ PA_LLIST_FOREACH(clSink,u->listClientSinks) {
-+ int handle=0;
-+ handle=registerSink(clSink->name,clSink->Audioclass,THIS_DOMAIN,u);
-+ if (handle>0) {
-+ struct genSink* Sink=NULL;
-+ Sink = pa_xnew0(struct genSink, 1);
-+ Sink->name=clSink->name;
-+ Sink->ID=handle;
-+ idx_s=0;
-+ PA_IDXSET_FOREACH(cs, u->core->sinks, idx_s) {
-+ if (strcmp(cs->name,Sink->name)==0) {
-+ Sink->sink=cs;
-+ }
-+ }
-+ PA_LLIST_PREPEND(struct genSink,u->listSinks,Sink);
-+ } else {
-+ pa_log("Source register failed");
-+ }
-+ }
-+
-+ struct clientGateWays* clGateway=NULL;
-+ pa_source* so;
-+ pa_sink* si;
-+ uint32_t idx;
-+ int handle=0;
-+ PA_LLIST_FOREACH(clGateway,u->listCLientGateways) {
-+ //make a difference according to the type of gateway:
-+ if (clGateway->direction==gw_out) {
-+ handle=registerGateway(clGateway->name,clGateway->sink_name,clGateway->source_name,clGateway->domain_name,THIS_DOMAIN,THIS_DOMAIN,u);
-+ if (handle>0) {
-+
-+ struct genGateways* gWay=NULL;
-+ gWay= pa_xnew0(struct genGateways, 1);
-+ struct genSink* Sink=NULL;
-+ Sink= pa_xnew(struct genSink, 1);
-+ Sink->sink=NULL;
-+ gWay->ID=handle;
-+
-+ handle=0;
-+ handle = registerSink(clGateway->sink_name,"default",THIS_DOMAIN,u);
-+ if (handle>0) {
-+ PA_IDXSET_FOREACH(si, u->core->sinks, idx) {
-+ if (strcmp(si->name,clGateway->sink_name)==0) {
-+ pa_log("match sink! %s",clGateway->sink_name);
-+ Sink->sink=si;
-+ Sink->ID=handle;
-+ Sink->name=si->name;
-+ gWay->sinks=si->name;
-+ }
-+ }
-+ gWay->sourceID=registerSource(clGateway->source_name,"default",clGateway->domain_name,u);
-+ gWay->source=clGateway->source_name;
-+ gWay->sinkID=handle;
-+
-+ PA_LLIST_PREPEND(struct genGateways,u->listGateways,gWay);
-+ PA_LLIST_PREPEND(struct genSink,u->listSinks,Sink);
-+
-+ } else {
-+ pa_log("GW Sink register failed");
-+ break;
-+ }
-+ } else {
-+ pa_log("GW register failed");
-+ }
-+ } else {
-+ handle=registerGateway(clGateway->name,clGateway->sink_name,clGateway->source_name,THIS_DOMAIN,clGateway->domain_name,THIS_DOMAIN,u);
-+ if (handle>0) {
-+
-+ struct genGateways* gWay=NULL;
-+ gWay= pa_xnew0(struct genGateways, 1);
-+
-+ struct genSource* Source=NULL;
-+ Source= pa_xnew(struct genSource, 1);
-+ Source->linked_sink=NULL;
-+ Source->source=NULL;
-+ gWay->ID=handle;
-+
-+ handle=0;
-+ handle = registerSource(clGateway->source_name,"default",THIS_DOMAIN,u);
-+ if (handle>0) {
-+ PA_IDXSET_FOREACH(so, u->core->sources, idx) {
-+ if (strcmp(so->name,clGateway->source_name)==0) {
-+ Source->source=so;
-+ Source->ID=handle;
-+ Source->name=so->name;
-+ gWay->source=so->name;
-+ }
-+ }
-+ gWay->sinkID=registerSink(clGateway->sink_name,"default",clGateway->domain_name,u);
-+ gWay->sinks=clGateway->sink_name;
-+ gWay->sourceID=handle;
-+
-+ PA_LLIST_PREPEND(struct genGateways,u->listGateways,gWay);
-+ PA_LLIST_PREPEND(struct genSource,u->listSources,Source);
-+
-+ } else {
-+ pa_log("GW Sink register failed");
-+ break;
-+ }
-+ } else {
-+ pa_log("GW register failed");
-+ }
-+ }
-+ }
-+ }
-+
-+ static pa_hook_result_t newSinkInput_cb(pa_core *c, pa_sink_input_new_data *s, void* userdata) {
-+ struct userdata *u = userdata;
-+
-+ //TODO: ok, one day the pure matching of application names should be changed to grap Process IDs.
-+ //But for now, we hook on the name
-+
-+ pa_assert(c);
-+ pa_assert(s);
-+ pa_assert(u);
-+
-+ // There's no point in doing anything if the core is shut down anyway
-+ if (c->state == PA_CORE_SHUTDOWN)
-+ return PA_HOOK_OK;
-+
-+ //Do we know the client?
-+ char* client=pa_proplist_gets(s->proplist,PA_PROP_APPLICATION_NAME);
-+ struct genSource* Source=NULL;
-+ pa_log("Callback called %s",client);
-+
-+ PA_LLIST_FOREACH(Source,u->listSources) {
-+ if (strcmp(Source->name,client)==0) {
-+ if (Source->linked_sink) {
-+ pa_log("Client %s %s",Source->name,Source->linked_sink->name);
-+ s->sink=Source->linked_sink;
-+ }
-+ }
-+ }
-+ return PA_HOOK_OK;
-+ }
-+
-+ static DBusHandlerResult signal_handler (DBusConnection *c, DBusMessage *m, void *userdata) {
-+ struct userdata *u = userdata;
-+ const char *path;
-+
-+ pa_log("message handler called\n");
-+ pa_assert(u);
-+ path = dbus_message_get_path(m);
-+ if (pa_streq(path, OBJECT_PATH)) {
-+ if (dbus_message_is_method_call(m, SERVICE_NAME, "connect")) {
-+ pa_log("Connect called");
-+ DbusHandleConnect(c, m, u);
-+ } else if (dbus_message_is_method_call(m, SERVICE_NAME, "disconnect")) {
-+ pa_log("Disconnect called");
-+ DBusHandleDisconnect(c, m, u);
-+ } else if (dbus_message_is_method_call(m, SERVICE_NAME, "setSourceVolume")) {
-+ pa_log("setSourceVolume called");
-+ DbusHandleSetSourceVolume(c, m, u);
-+ } else if (dbus_message_is_method_call(m, SERVICE_NAME, "setSinkVolume")) {
-+ pa_log("setSinkVolume called");
-+ DbusHandleSetSinkVolume(c, m, u);
-+ } else if (dbus_message_is_method_call(m, SERVICE_NAME, "muteSource")) {
-+ pa_log("muteSource called");
-+ DbusHandleMuteSource(c, m, u);
-+ } else if (dbus_message_is_method_call(m, SERVICE_NAME, "muteSink")) {
-+ pa_log("muteSink called");
-+ DbusHandleMuteSink(c, m, u);
-+ } else if (dbus_message_is_method_call(m, SERVICE_NAME, "unmuteSink")) {
-+ pa_log("unmuteSink called");
-+ DbusHandleUmuteSink(c, m, u);
-+ } else if (dbus_message_is_method_call(m, SERVICE_NAME, "unmuteSource")) {
-+ pa_log("unmuteSource called");
-+ DbusHandleUmuteSource(c, m, u);
-+ } else if (dbus_message_is_method_call(m, "org.freedesktop.DBus.Introspectable", "Introspect")) {
-+ const char *xml = PULSE_INTROSPECT_XML;
-+ pa_log(xml);
-+ DBusMessage *r = NULL;
-+ pa_assert_se(r = dbus_message_new_method_return(m));
-+ pa_assert_se(dbus_message_append_args(
-+ r,
-+ DBUS_TYPE_STRING, &xml,
-+ DBUS_TYPE_INVALID));
-+ pa_assert_se(dbus_connection_send(pa_dbus_connection_get(u->bus), r, NULL));
-+ dbus_message_unref(r);
-+ }
-+ } else if (dbus_message_is_method_call(m, "org.freedesktop.DBus.Introspectable", "Introspect")) {
-+ const char *xml = ROOT_INTROSPECT_XML;
-+ pa_log(xml);
-+ DBusMessage *r = NULL;
-+ pa_assert_se(r = dbus_message_new_method_return(m));
-+ pa_assert_se(dbus_message_append_args(
-+ r,
-+ DBUS_TYPE_STRING, &xml,
-+ DBUS_TYPE_INVALID));
-+ pa_assert_se(dbus_connection_send(pa_dbus_connection_get(u->bus), r, NULL));
-+ dbus_message_unref(r);
-+ }
-+
-+ if (dbus_message_is_signal(m, ROUTING_INTERFACE_NAME, "signal_systemReady")) {
-+ pa_log("Received Signal signal_systemReady");
-+ intialRegistration(c,u);
-+ }
-+ return DBUS_HANDLER_RESULT_HANDLED;
-+ }
-+
-+ void loadConfigFile(const char* filename, void* userdata) {
-+ struct userdata *u = userdata;
-+ FILE* f=NULL;
-+ char* ret;
-+ if (filename) {
-+
-+ if (!(f = fopen(filename, "r"))) {
-+ pa_log(_("Failed to open file '%s'"), filename);
-+ goto finish;
-+ }
-+
-+ while (!feof(f)) {
-+ char l[4096];
-+
-+ if (!fgets(l, sizeof(l), f)) {
-+ if (feof(f))
-+ break;
-+ goto finish;
-+ }
-+
-+ char* pointer=(char*)l;
-+ int len = strlen(pointer);
-+ if( pointer[len-1] == '\n' )
-+ pointer[len-1] = 0;
-+ char* type=strsep(&pointer,":");
-+ if (strcmp(type,"Source")==0) {
-+ ret=strsep(&pointer,",");
-+ struct clientSource* clSource=NULL;
-+ clSource= pa_xnew0(struct clientSource, 1);
-+ strcpy(clSource->name,ret);
-+ strcpy(clSource->Audioclass,pointer);
-+ PA_LLIST_PREPEND(struct clientSource,u->listClientSources,clSource);
-+ } else if (strcmp(type,"Sink")==0) {
-+ ret=strsep(&pointer,",");
-+ struct clientSink* clSink=NULL;
-+ clSink= pa_xnew0(struct clientSink, 1);
-+ strcpy(clSink->name,ret);
-+ strcpy(clSink->Audioclass,pointer);
-+ PA_LLIST_PREPEND(struct clientSink,u->listClientSinks,clSink);
-+ } else if (strcmp(type,"Gateway")==0) {
-+ struct clientGateWays* clGateway=NULL;
-+ clGateway= pa_xnew0(struct clientGateWays, 1);
-+ ret=strsep(&pointer,",");
-+ strcpy(clGateway->name,ret);
-+ ret=strsep(&pointer,",");
-+ strcpy(clGateway->sink_name,ret);
-+ ret=strsep(&pointer,",");
-+ strcpy(clGateway->source_name,ret);
-+ ret=strsep(&pointer,",");
-+ strcpy(clGateway->domain_name,ret);
-+ ret=strsep(&pointer,",");
-+ if (strcmp(ret,"gw_out")==0) {
-+ clGateway->direction=gw_out;
-+ } else if (strcmp(ret,"gw_in")==0) {
-+ clGateway->direction=gw_in;
-+ }
-+ PA_LLIST_PREPEND(struct clientGateWays,u->listCLientGateways,clGateway);
-+ }
-+ }
-+ }
-+ finish:
-+ if (f) fclose(f);
-+ }
-+
-+ int pa__init(pa_module*m) {
-+ pa_modargs *ma = NULL;
-+ const char* file_name;
-+ pa_log("Started module Genivi !!!!!!*********************************");
-+ pa_assert(m);
-+ DBusError error;
-+ static const DBusObjectPathVTable vtable_root = {
-+ .message_function = signal_handler,
-+ };
-+
-+ if (!(ma = pa_modargs_new(m->argument, valid_modargs))) {
-+ pa_log("Failed to parse module arguments.");
-+ goto fail;
-+ }
-+
-+ file_name= pa_modargs_get_value(ma, "file_name", NULL);
-+ pa_log("filename %s",file_name);
-+
-+ //userdata is used to pass data around in the different callbacks
-+ struct userdata *u;
-+
-+ dbus_error_init(&error);
-+
-+ m->userdata = u = pa_xnew(struct userdata, 1);
-+ u->core=m->core;
-+ pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_INPUT_NEW], PA_HOOK_EARLY, (pa_hook_cb_t) newSinkInput_cb, u);
-+
-+ if (!(u->bus = pa_dbus_bus_get(m->core, DBUS_BUS_SESSION, &error))) {
-+ pa_log("Failed to get session bus connection: %s", error.message);
-+ goto fail;
-+ }
-+
-+ //initialize the Linked Lists which hold our data
-+ PA_LLIST_HEAD_INIT(struct genSink,u->listSinks);
-+ PA_LLIST_HEAD_INIT(struct genSource,u->listSources);
-+ PA_LLIST_HEAD_INIT(struct genModule,u->listModules);
-+ PA_LLIST_HEAD_INIT(struct genGateways,u->listGateways);
-+ PA_LLIST_HEAD_INIT(struct genConnections,u->listConnections);
-+ PA_LLIST_HEAD_INIT(struct clientSink,u->listClientSinks);
-+ PA_LLIST_HEAD_INIT(struct clientSource,u->listClientSources);
-+ PA_LLIST_HEAD_INIT(struct clientGateWays,u->listCLientGateways);
-+
-+ loadConfigFile(file_name,u);
-+
-+ //Register signalhandler for signals coming from Routing interface
-+ dbus_bus_add_match(pa_dbus_connection_get(u->bus), "type=\'signal\',interface=\'com.genivi.routing\'",NULL);
-+ dbus_connection_add_filter (pa_dbus_connection_get(u->bus), signal_handler, u, NULL);
-+ dbus_connection_flush(pa_dbus_connection_get(u->bus));
-+
-+ pa_assert_se(dbus_connection_register_object_path(pa_dbus_connection_get(u->bus), OBJECT_ROOT, &vtable_root, u));
-+
-+ if (dbus_bus_request_name(pa_dbus_connection_get(u->bus), SERVICE_NAME, DBUS_NAME_FLAG_DO_NOT_QUEUE, &error) != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) {
-+ pa_log("Failed to request service name " SERVICE_NAME ": %s", error.message);
-+ goto fail;
-+ }
-+
-+
-+ //intialRegistration(u->core,u);
-+
-+ //int d=registerSource(name, node, name,u);
-+
-+ //TODO:
-+ //the loopback module is loaded via the default file because loading it here fails with segfault.
-+
-+
-+
-+
-+
-+ return 0;
-+ fail:
-+ pa__done(m);
-+
-+ dbus_error_free(&error);
-+
-+ return -1;
-+ }
-+
-+ void pa__done(pa_module*m) {
-+ }
-diff -crBN pulseaudio-0.9.22/src/modules/module-genivi-symdef.h pulseaudio-0.9.22-patched/src/modules/module-genivi-symdef.h
-*** pulseaudio-0.9.22/src/modules/module-genivi-symdef.h 1970-01-01 01:00:00.000000000 +0100
---- pulseaudio-0.9.22-patched/src/modules/module-genivi-symdef.h 2011-06-30 15:16:20.232519999 +0200
-***************
-*** 0 ****
---- 1,21 ----
-+ #ifndef foomodulegenivifoo
-+ #define foomodulegenivifoo
-+
-+ #include <pulsecore/core.h>
-+ #include <pulsecore/module.h>
-+ #include <pulsecore/macro.h>
-+
-+ #define pa__init module_always_sink_LTX_pa__init
-+ #define pa__done module_always_sink_LTX_pa__done
-+ #define pa__get_author module_always_sink_LTX_pa__get_author
-+ #define pa__get_description module_always_sink_LTX_pa__get_description
-+ #define pa__get_usage module_always_sink_LTX_pa__get_usage
-+ #define pa__get_version module_always_sink_LTX_pa__get_version
-+ #define pa__get_deprecated module_always_sink_LTX_pa__get_deprecated
-+ #define pa__load_once module_always_sink_LTX_pa__load_once
-+ #define pa__get_n_used module_always_sink_LTX_pa__get_n_used
-+
-+ int pa__init(pa_module*m);
-+ void pa__done(pa_module*m);
-+
-+ #endif
-diff -crBN pulseaudio-0.9.22/src/SourceList.conf pulseaudio-0.9.22-patched/src/SourceList.conf
-*** pulseaudio-0.9.22/src/SourceList.conf 1970-01-01 01:00:00.000000000 +0100
---- pulseaudio-0.9.22-patched/src/SourceList.conf 2011-06-30 15:16:20.232519999 +0200
-***************
-*** 0 ****
---- 1,6 ----
-+ Rhythmbox,default
-+ Totem Movie Player,default
-+ navigation,nav
-+ player,default
-+ radio,rad
-+ ta,ta
-diff -crBN pulseaudio-0.9.22/src/test.pa pulseaudio-0.9.22-patched/src/test.pa
-*** pulseaudio-0.9.22/src/test.pa 1970-01-01 01:00:00.000000000 +0100
---- pulseaudio-0.9.22-patched/src/test.pa 2011-06-30 15:16:20.232519999 +0200
-***************
-*** 0 ****
---- 1,54 ----
-+ #!/usr/local/bin/pulseaudio -nF
-+ #
-+ # This file is part of PulseAudio.
-+ #
-+ # PulseAudio is free software; you can redistribute it and/or modify it
-+ # under the terms of the GNU Lesser General Public License as published by
-+ # the Free Software Foundation; either version 2 of the License, or
-+ # (at your option) any later version.
-+ #
-+ # PulseAudio is distributed in the hope that it will be useful, but
-+ # WITHOUT ANY WARRANTY; without even the implied warranty of
-+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ # General Public License for more details.
-+ #
-+ # You should have received a copy of the GNU Lesser General Public License
-+ # along with PulseAudio; if not, write to the Free Software Foundation,
-+ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-+
-+ # This startup script is used only if PulseAudio is started per-user
-+ # (i.e. not in system mode)
-+
-+ .nofail
-+
-+ ### Load something into the sample cache
-+ #load-sample-lazy x11-bell /usr/share/sounds/gtk-events/activate.wav
-+ #load-sample-lazy pulse-hotplug /usr/share/sounds/startup3.wav
-+ #load-sample-lazy pulse-coldplug /usr/share/sounds/startup3.wav
-+ #load-sample-lazy pulse-access /usr/share/sounds/generic.wav
-+
-+ .fail
-+
-+
-+ ### Load audio drivers statically (it's probably better to not load
-+ ### these drivers manually, but instead use module-hal-detect --
-+ ### see below -- for doing this automatically)
-+ load-module module-alsa-sink
-+ load-module module-alsa-source
-+ load-module module-null-sink
-+ load-module module-pipe-sink
-+ load-module module-native-protocol-tcp
-+ load-module module-loopback
-+ load-module module-jack-source
-+ load-module module-jack-sink
-+ load-module module-tunnel-sink sink_name=tunnel server=10.253.201.82
-+ load-module module-genivi file_name=/home/blacky/workspace/pulseaudio-0.9.22/src/Genivi.conf
-+ #load-module module-null-sink sink_name="rtp"
-+ #load-module module-rtp-send source="rtp.monitor" destination="224.0.0.56" port="5004"
-+
-+
-+ load-module module-udev-detect
-+
-+ ### Make some devices default
-+ set-default-sink null
-+ set-default-source null-monitor