root/trunk/libfreebob/src/bebob_light/bebob_light_avdevicesubunit.h

Revision 241, 2.2 kB (checked in by pieterpalmers, 17 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

Line 
1 /* bebob_light_avdevicesubunit.h
2  * Copyright (C) 2006 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 BEBOB_LIGHT_AVDEVICESUBUNIT_H
22 #define BEBOB_LIGHT_AVDEVICESUBUNIT_H
23
24 #include "bebob_light/bebob_light_avplug.h"
25
26 #include "debugmodule/debugmodule.h"
27 #include "libfreebobavc/avc_definitions.h"
28 #include "libfreebobavc/avc_generic.h"
29
30 #include <vector>
31
32 namespace BeBoB_Light {
33
34 class AvDevice;
35
36 class AvDeviceSubunit {
37  public:
38     AvDeviceSubunit( AvDevice* avDevice, subunit_type_t type, subunit_t id );
39     virtual ~AvDeviceSubunit();
40
41     virtual bool discover() = 0;
42     virtual const char* getName() = 0;
43
44     bool addPlug( AvPlug& plug );
45
46     subunit_t getSubunitId()
47         { return m_sbId; }
48     subunit_type_t getSubunitType()
49         { return m_sbType; }
50
51  protected:
52     AvDevice*      m_avDevice;
53     subunit_type_t m_sbType;
54     subunit_t      m_sbId;
55
56     AvPlugVector   m_plugs;
57
58     DECLARE_DEBUG_MODULE;
59 };
60
61 typedef std::vector<AvDeviceSubunit*> AvDeviceSubunitVector;
62
63 /////////////////////////////
64
65 class AvDeviceSubunitAudio: public AvDeviceSubunit {
66  public:
67     AvDeviceSubunitAudio( AvDevice* avDevice, subunit_t id );
68     virtual ~AvDeviceSubunitAudio();
69
70     virtual bool discover();
71     virtual const char* getName();
72 };
73
74 /////////////////////////////
75
76 class AvDeviceSubunitMusic: public AvDeviceSubunit {
77  public:
78     AvDeviceSubunitMusic( AvDevice* avDevice, subunit_t id );
79     virtual ~AvDeviceSubunitMusic();
80
81     virtual bool discover();
82     virtual const char* getName();
83 };
84
85 }
86
87 #endif
Note: See TracBrowser for help on using the browser.