root/branches/streaming-rework/src/devicemanager.h

Revision 407, 2.1 kB (checked in by pieterpalmers, 15 years ago)

- Changed the way the device class configure options are handled. Now they are handled in the makefiles instead of the source files. The only source file that still contains the #ifdef's is devicemanager.cpp, to conditionally include the device class include files and to conditionally probe the classes that might be supported.
- added a configure option to disable the compilation of the test programs in tests/
- cleaned up the ADMTP transmit streamprocessor. Now it sends silenced packets when in the disabled state, instead of no-data packets
- added a getNodeID() to ieee1394service
- made comments in ieee1394service.h doxygen compliant

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 /* devicemanager.h
2  * Copyright (C) 2005 by Daniel Wagner
3  *
4  * This file is part of FreeBoB.
5  *
6  * FreeBoB is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  * FreeBoB is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with FreeBoB; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
18  * MA 02111-1307 USA.
19  */
20
21 #ifndef FREEBOBDEVICEMANAGER_H
22 #define FREEBOBDEVICEMANAGER_H
23
24 #include "debugmodule/debugmodule.h"
25
26 #include "libfreebob/xmlparser.h"
27
28 #include <glibmm/ustring.h>
29
30 #include <vector>
31
32 class Ieee1394Service;
33 class IAvDevice;
34 namespace FreebobStreaming {
35     class StreamProcessor;
36 }
37
38 typedef std::vector< IAvDevice* > IAvDeviceVector;
39 typedef std::vector< IAvDevice* >::iterator IAvDeviceVectorIterator;
40
41 class ConfigRom;
42
43
44 class DeviceManager{
45  public:
46     DeviceManager();
47     ~DeviceManager();
48
49     bool initialize( int port );
50     bool deinitialize();
51
52     bool discover( int verboseLevel );
53
54     bool isValidNode( int node );
55     int getNbDevices();
56     int getDeviceNodeId( int deviceNr );
57
58     IAvDevice* getAvDevice( int nodeId );
59     IAvDevice* getAvDeviceByIndex( int idx );
60     unsigned int getAvDeviceCount();
61
62     xmlDocPtr getXmlDescription();
63
64     bool saveCache( Glib::ustring fileName );
65     bool loadCache( Glib::ustring fileName );
66
67     FreebobStreaming::StreamProcessor *getSyncSource();
68
69 protected:
70     IAvDevice* getDriverForDevice( std::auto_ptr<ConfigRom>( configRom ),
71                                    int id,
72                                    int level );
73
74 protected:
75     Ieee1394Service* m_1394Service;
76     IAvDeviceVector  m_avDevices;
77
78     DECLARE_DEBUG_MODULE;
79 };
80
81 #endif
Note: See TracBrowser for help on using the browser.