diff options
author | Christian Linke <christian.linke@bmw.de> | 2013-09-12 10:59:47 +0200 |
---|---|---|
committer | Christian Linke <christian.linke@bmw.de> | 2013-09-12 10:59:47 +0200 |
commit | 958a34ae8c5c6f25ba73640b9e7f9998b23fd62a (patch) | |
tree | 602bbf9f376a206ff28815d027c4540e939d788f /exampleCode/player/audiomanagerinteractor.cpp | |
parent | bd532738184040b4367e79dcb8a804248e62f0fc (diff) | |
download | audiomanager-958a34ae8c5c6f25ba73640b9e7f9998b23fd62a.tar.gz |
* added some documentation, removed sample project since it seems to addle users. Now the fidls are the matching final the EA version.
Signed-off-by: Christian Linke <christian.linke@bmw.de>
Diffstat (limited to 'exampleCode/player/audiomanagerinteractor.cpp')
-rw-r--r-- | exampleCode/player/audiomanagerinteractor.cpp | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/exampleCode/player/audiomanagerinteractor.cpp b/exampleCode/player/audiomanagerinteractor.cpp deleted file mode 100644 index 528006b..0000000 --- a/exampleCode/player/audiomanagerinteractor.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Copyright (C) 2012, BMW AG - * - * - * \copyright - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation, version 2 - * of the License. - - * 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 General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * - * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012 - * - * - */ - -#include "audiomanagerinteractor.h" -#include <iostream> - -using namespace am; - -AudioManagerInteractor::AudioManagerInteractor(DbusHandler* DbusHandler, am_sourceID_t sourceID, am_sinkID_t sinkID) : - mDbusHandler(DbusHandler), - mSourceID(sourceID), - mSinkID(sinkID), - mConnectionID(0), - mState(Phonon::StoppedState), - mConnectedState(DISCONNECTED) -{ -} - -void AudioManagerInteractor::playPause() -{ - if (mState==Phonon::StoppedState || mState==Phonon::PausedState) - { - mDbusHandler->connect(mSourceID,mSinkID,mConnectionID); - mConnectedState=CONNECTING; - } - else - { - mDbusHandler->disconnect(mConnectionID); - mConnectedState=DISCONNECTED; - } -} - -void AudioManagerInteractor::SourceActivity(am_sourceID_t source,am_SourceState_e state) -{ - std::cout<<"got source activity ID "<<source<<" "<<state<<std::endl; - if (source==mSourceID && state==SS_ON) - emit this->play(); - else if (source==mSourceID && (state==SS_OFF || state==SS_PAUSED)) - emit this->stop(); -} - -void AudioManagerInteractor::getPlayerState(Phonon::State newstate) -{ - mState=newstate; - if (newstate==Phonon::StoppedState && mConnectedState==CONNECTED) - mDbusHandler->disconnect(mConnectionID); - else if (mConnectedState==CONNECTING) - mConnectedState=CONNECTED; -} - - -AudioManagerInteractor::~AudioManagerInteractor() -{ - -} |