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

Revision 365, 1.9 kB (checked in by wagi, 16 years ago)

src/libfreebobavc/serialize* moved to src/libfreebob/avc_serialize*, all includes adapted
src/bebob/bebob_serialize* moved to src/libutil/serialize*
src/libutil/serialize: use Glib::ustring instead of std::string.
src/configrom: serialize and deserialize added (not finished)
src/devicemanager: load and save cached functionality added (not finished)

various small whitespace updates (emacs lässt grüssen :))

  • 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
35 typedef std::vector< IAvDevice* > IAvDeviceVector;
36 typedef std::vector< IAvDevice* >::iterator IAvDeviceVectorIterator;
37
38 class ConfigRom;
39
40
41 class DeviceManager{
42  public:
43     DeviceManager();
44     ~DeviceManager();
45
46     bool initialize( int port );
47     bool deinitialize();
48
49     bool discover( int verboseLevel );
50
51     bool isValidNode( int node );
52     int getNbDevices();
53     int getDeviceNodeId( int deviceNr );
54
55     IAvDevice* getAvDevice( int nodeId );
56     IAvDevice* getAvDeviceByIndex( int idx );
57     unsigned int getAvDeviceCount();
58
59     xmlDocPtr getXmlDescription();
60
61     bool saveCache( Glib::ustring fileName );
62     bool loadCache( Glib::ustring fileName );
63
64 protected:
65     IAvDevice* getDriverForDevice( std::auto_ptr<ConfigRom>( configRom ),
66                                    int id,
67                                    int level );
68
69 protected:
70     Ieee1394Service* m_1394Service;
71     IAvDeviceVector  m_avDevices;
72
73     DECLARE_DEBUG_MODULE;
74 };
75
76 #endif
Note: See TracBrowser for help on using the browser.