root/trunk/libffado/src/devicemanager.h

Revision 581, 2.6 kB (checked in by ppalmers, 17 years ago)

- First attempt at mixer control (still disfunctional)
- moved vendor specific code in bebob/*

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 /*
2  * Copyright (C) 2005-2007 by Daniel Wagner
3  * Copyright (C) 2005-2007 by Pieter Palmers
4  *
5  * This file is part of FFADO
6  * FFADO = Free Firewire (pro-)audio drivers for linux
7  *
8  * FFADO is based upon FreeBoB.
9  *
10  * This library is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public
12  * License version 2.1, as published by the Free Software Foundation;
13  *
14  * This library 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 GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
22  * MA 02110-1301 USA
23  */
24
25 #ifndef FFADODEVICEMANAGER_H
26 #define FFADODEVICEMANAGER_H
27
28 #include "debugmodule/debugmodule.h"
29
30 #include "libieee1394/configrom.h"
31 #include "libieee1394/ieee1394service.h"
32
33 #include "libutil/OptionContainer.h"
34 // #include "libosc/OscServer.h"
35 // #include "libosc/OscNode.h"
36 #include "libcontrol/BasicElements.h"
37
38 #include <glibmm/ustring.h>
39
40 #include <vector>
41
42 class Ieee1394Service;
43 class FFADODevice;
44 namespace Streaming {
45     class StreamProcessor;
46 }
47
48 typedef std::vector< FFADODevice* > FFADODeviceVector;
49 typedef std::vector< FFADODevice* >::iterator FFADODeviceVectorIterator;
50
51 class DeviceManager
52     : public Util::OptionContainer,
53       public Control::Container
54 {
55 public:
56     DeviceManager();
57     ~DeviceManager();
58
59     bool initialize( int port );
60     bool deinitialize();
61
62     bool discover( );
63
64     bool isValidNode( int node );
65     int getNbDevices();
66     int getDeviceNodeId( int deviceNr );
67
68     FFADODevice* getAvDevice( int nodeId );
69     FFADODevice* getAvDeviceByIndex( int idx );
70     unsigned int getAvDeviceCount();
71
72     Streaming::StreamProcessor *getSyncSource();
73
74     void show();
75
76     // the Control::Container functions
77     virtual std::string getName()
78         {return "DeviceManager";};
79     virtual bool setName( std::string n )
80         { return false;};
81
82 protected:
83     FFADODevice* getDriverForDevice( std::auto_ptr<ConfigRom>( configRom ),
84                                    int id );
85     FFADODevice* getSlaveDriver( std::auto_ptr<ConfigRom>( configRom ) );
86
87 protected:
88     Ieee1394Service* m_1394Service;
89     FFADODeviceVector  m_avDevices;
90
91 //     OSC::OscServer*  m_oscServer;
92
93 // debug stuff
94 public:
95     void setVerboseLevel(int l);
96 private:
97     DECLARE_DEBUG_MODULE;
98 };
99
100 #endif
Note: See TracBrowser for help on using the browser.