root/branches/libfreebob-2.0/src/bebob_light/bebob_light_avdevicesubunit.cpp

Revision 188, 2.3 kB (checked in by wagi, 18 years ago)

2006-05-04 Daniel Wagner <wagi@monom.org>

  • configure.ac: Version bumped to 0.8.0
  • Discovering code ported stable 0.2.0 version
    to head and activated for default discovering.
Line 
1 /* bebob_light_avdevicesubunit.cpp
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 #include "bebob_light/bebob_light_avdevicesubunit.h"
22 #include "bebob_light/bebob_light_avdevice.h"
23 #include "bebob_light/bebob_light_avplug.h"
24
25 namespace BeBoB_Light {
26
27 IMPL_DEBUG_MODULE( AvDeviceSubunit, AvDeviceSubunit, DEBUG_LEVEL_VERBOSE );
28
29 ////////////////////////////////////////////
30
31 AvDeviceSubunit::AvDeviceSubunit( AvDevice* avDevice, subunit_type_t type, subunit_t id )
32     : m_avDevice( avDevice )
33     , m_sbType( type )
34     , m_sbId( id )
35 {
36 }
37
38 AvDeviceSubunit::~AvDeviceSubunit()
39 {
40     for ( AvPlugVector::iterator it = m_plugs.begin();
41           it != m_plugs.end();
42           ++it )
43     {
44         delete *it;
45     }
46 }
47
48 bool
49 AvDeviceSubunit::addPlug( AvPlug& plug )
50 {
51     m_plugs.push_back( &plug );
52     return true;
53 }
54
55 ////////////////////////////////////////////
56
57 AvDeviceSubunitAudio::AvDeviceSubunitAudio( AvDevice* avDevice, subunit_t id )
58     : AvDeviceSubunit( avDevice, AVCCommand::eST_Audio, id )
59 {
60 }
61
62 AvDeviceSubunitAudio::~AvDeviceSubunitAudio()
63 {
64 }
65
66 bool
67 AvDeviceSubunitAudio::discover()
68 {
69     return true;
70 }
71
72 const char*
73 AvDeviceSubunitAudio::getName()
74 {
75     return "AudioSubunit";
76 }
77
78 ////////////////////////////////////////////
79
80 AvDeviceSubunitMusic::AvDeviceSubunitMusic( AvDevice* avDevice, subunit_t id )
81     : AvDeviceSubunit( avDevice, AVCCommand::eST_Music, id )
82 {
83 }
84
85 AvDeviceSubunitMusic::~AvDeviceSubunitMusic()
86 {
87 }
88
89 bool
90 AvDeviceSubunitMusic::discover()
91 {
92     return true;
93 }
94
95 const char*
96 AvDeviceSubunitMusic::getName()
97 {
98     return "MusicSubunit";
99 }
100
101 }
Note: See TracBrowser for help on using the browser.