root/trunk/libfreebob/src/avdevicesubunit.h

Revision 125, 2.1 kB (checked in by wagi, 17 years ago)

Initial revision

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 /* avdevicesubunit.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 AVDEVICESUBUNIT_H
22 #define AVDEVICESUBUNIT_H
23
24 #include "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 class AvDevice;
33
34 class AvDeviceSubunit {
35  public:
36     AvDeviceSubunit( AvDevice* avDevice, subunit_type_t type, subunit_t id );
37     virtual ~AvDeviceSubunit();
38
39     virtual bool discover() = 0;
40     virtual const char* getName() = 0;
41
42     bool addPlug( AvPlug& plug );
43
44     subunit_t getSubunitId()
45         { return m_sbId; }
46     subunit_type_t getSubunitType()
47         { return m_sbType; }
48
49  protected:
50     AvDevice*      m_avDevice;
51     subunit_type_t m_sbType;
52     subunit_t      m_sbId;
53
54     AvPlugVector   m_plugs;
55
56     DECLARE_DEBUG_MODULE;
57 };
58
59 typedef std::vector<AvDeviceSubunit*> AvDeviceSubunitVector;
60
61 /////////////////////////////
62
63 class AvDeviceSubunitAudio: public AvDeviceSubunit {
64  public:
65     AvDeviceSubunitAudio( AvDevice* avDevice, subunit_t id );
66     virtual ~AvDeviceSubunitAudio();
67
68     virtual bool discover();
69     virtual const char* getName();
70 };
71
72 /////////////////////////////
73
74 class AvDeviceSubunitMusic: public AvDeviceSubunit {
75  public:
76     AvDeviceSubunitMusic( AvDevice* avDevice, subunit_t id );
77     virtual ~AvDeviceSubunitMusic();
78
79     virtual bool discover();
80     virtual const char* getName();
81 };
82
83 #endif
Note: See TracBrowser for help on using the browser.