root/branches/libffado-2.0/src/bebob/bebob_avplug.h

Revision 1241, 2.7 kB (checked in by ppalmers, 13 years ago)

update BeBoB constructors (thx slack) (closes #129, #127)

Line 
1 /*
2  * Copyright (C) 2005-2008 by Daniel Wagner
3  *
4  * This file is part of FFADO
5  * FFADO = Free Firewire (pro-)audio drivers for linux
6  *
7  * FFADO is based upon FreeBoB
8  *
9  * This program is free software: you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation, either version 2 of the License, or
12  * (at your option) version 3 of the License.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
21  *
22  */
23
24 #ifndef BEBOB_AVPLUG_H
25 #define BEBOB_AVPLUG_H
26
27 #include "libavc/ccm/avc_signal_source.h"
28 #include "libavc/streamformat/avc_extended_stream_format.h"
29 #include "libavc/general/avc_extended_plug_info.h"
30 #include "libavc/general/avc_extended_cmd_generic.h"
31 #include "libavc/avc_definitions.h"
32 #include "libavc/general/avc_generic.h"
33 #include "libavc/general/avc_plug.h"
34
35 #include "libutil/serialize.h"
36
37 #include "debugmodule/debugmodule.h"
38
39 class Ieee1394Service;
40 class ConfigRom;
41
42 namespace BeBoB {
43
44 class AvDevice;
45
46 class Plug : public AVC::Plug {
47 public:
48
49     // \todo This constructors sucks. too many parameters. fix it.
50     Plug( AVC::Unit* unit,
51           AVC::Subunit* subunit,
52           AVC::function_block_type_t functionBlockType,
53           AVC::function_block_type_t functionBlockId,
54           AVC::Plug::EPlugAddressType plugAddressType,
55           AVC::Plug::EPlugDirection plugDirection,
56           AVC::plug_id_t plugId );
57     Plug( AVC::Unit* unit,
58           AVC::Subunit* subunit,
59           AVC::function_block_type_t functionBlockType,
60           AVC::function_block_type_t functionBlockId,
61           AVC::Plug::EPlugAddressType plugAddressType,
62           AVC::Plug::EPlugDirection plugDirection,
63           AVC::plug_id_t plugId,
64           int globalId );
65     Plug( const Plug& rhs );
66     virtual ~Plug();
67
68     bool discover();
69     bool discoverConnections();
70
71  public:
72
73 protected:
74     Plug();
75
76     bool discoverPlugType();
77     bool discoverName();
78     bool discoverNoOfChannels();
79     bool discoverChannelPosition();
80     bool discoverChannelName();
81     bool discoverClusterInfo();
82     bool discoverConnectionsInput();
83     bool discoverConnectionsOutput();
84
85 private:
86     bool copyClusterInfo(AVC::ExtendedPlugInfoPlugChannelPositionSpecificData&
87                          channelPositionData );
88     AVC::ExtendedPlugInfoCmd setPlugAddrToPlugInfoCmd();
89
90
91 };
92
93 }
94
95 #endif // BEBOB_AVPLUG_H
Note: See TracBrowser for help on using the browser.