root/branches/libfreebob-1.0/src/devicemanager.h

Revision 241, 1.9 kB (checked in by pieterpalmers, 16 years ago)

* configure.ac: Version bump to 1.0.0

* Changed all FreeBob? to FreeBoB
* Removed all .cvsignore
* Added Pieter to AUTHORS
* Updated NEWS and README (release canditate date added)

by Daniel Wagner

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 /* template.cpp
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 <vector>
29
30 class Ieee1394Service;
31 class IAvDevice;
32
33 typedef std::vector< IAvDevice* > IAvDeviceVector;
34 typedef std::vector< IAvDevice* >::iterator IAvDeviceVectorIterator;
35
36 typedef IAvDevice* (*ProbeFunction)(Ieee1394Service&, int, int);
37 typedef std::vector<ProbeFunction> ProbeFunctionVector;
38 typedef std::vector<ProbeFunction>::iterator ProbeFunctionVectorIterator;
39
40 class DeviceManager{
41  public:
42     DeviceManager();
43     ~DeviceManager();
44
45     bool initialize( int port );
46     bool deinitialize();
47
48     bool discover( int verboseLevel );
49
50     bool isValidNode( int node );
51     int getNbDevices();
52     int getDeviceNodeId( int deviceNr );
53
54     IAvDevice* getAvDevice( int nodeId );
55
56     xmlDocPtr getXmlDescription();
57
58 protected:
59     static IAvDevice* probeBeBoB(Ieee1394Service& service, int id, int level);
60     static IAvDevice* probeBounce(Ieee1394Service& service, int id, int level);
61
62 protected:
63     Ieee1394Service* m_1394Service;
64     IAvDeviceVector  m_avDevices;
65     ProbeFunctionVector m_probeList;
66
67     DECLARE_DEBUG_MODULE;
68 };
69
70 #endif
Note: See TracBrowser for help on using the browser.