root/trunk/libffado/src/libcontrol/CrossbarRouter.h

Revision 1776, 2.2 kB (checked in by arnonym, 14 years ago)

Reduce the LOC:

  • Use only strings as identifiers for the Dice::EAP::Router. Updating the router doesn't happen that often, using strings only is acceptable. And it eases handling so much.
  • Adapt the control interface.
  • Adapt the dbus interface.
  • Adapt the routers gui.
  • The peak-space is not yet working (I didn't actually test it), the peak-functions of EAP::Router return nothing.
  • And the test for the dice has to be adopted when the peaks are working again.

TODO:

  • Re-activate the peaks.
  • Adopt the mixer interface.
Line 
1 /*
2  * Copyright (C) 2005-2009 by Pieter Palmers
3  *
4  * This file is part of FFADO
5  * FFADO = Free Firewire (pro-)audio drivers for linux
6  *
7  * FFADO is based upon FreeBoB
8  *
9  * This program is free software: you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation, either version 2 of the License, or
12  * (at your option) version 3 of the License.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
21  *
22  */
23
24 #ifndef CONTROL_CROSSBAR_ROUTER_H
25 #define CONTROL_CROSSBAR_ROUTER_H
26
27 #include "debugmodule/debugmodule.h"
28 #include "ffadotypes.h"
29
30 #include "Element.h"
31
32 #include <vector>
33 #include <string>
34 #include <map>
35
36 namespace Control {
37
38 /*!
39 @brief Abstract Base class for Crossbar router elements
40
41 */
42 class CrossbarRouter : public Element
43 {
44 public:
45     CrossbarRouter(Element *p) : Element(p) {};
46     CrossbarRouter(Element *p, std::string n) : Element(p, n) {};
47     virtual ~CrossbarRouter() {};
48
49     virtual void show() = 0;
50
51     virtual stringlist getSourceNames() = 0;
52     virtual stringlist getDestinationNames() = 0;
53
54     virtual std::string getSourceForDestination(const std::string& dstname) = 0;
55     virtual stringlist getDestinationsForSource(const std::string& srcname) = 0;
56
57     virtual bool canConnect(const std::string& srcname, const std::string& dstname) = 0;
58     virtual bool setConnectionState(const std::string& srcname, const std::string& dstname, const bool enable) = 0;
59     virtual bool getConnectionState(const std::string& srcname, const std::string& dstname) = 0;
60
61     virtual bool clearAllConnections() = 0;
62
63     // peak metering
64     virtual bool hasPeakMetering() = 0;
65     virtual double getPeakValue(const std::string& dest) = 0;
66     virtual std::map<std::string, double> getPeakValues() = 0;
67
68 protected:
69
70 };
71
72
73 }; // namespace Control
74
75 #endif // CONTROL_CROSSBAR_ROUTER_H
Note: See TracBrowser for help on using the browser.