root/branches/echoaudio/src/bebob/bebob_avplug.h

Revision 548, 2.4 kB (checked in by ppalmers, 15 years ago)

- make the BeBoB AvDevice? a child class of the GenericAVC AvDevice?. This
avoids a lot of code duplication.
- fix inconsistency in position/location numbering between ext pluginfo
cmd and descriptor.

Line 
1 /*
2  * Copyright (C) 2005-2007 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 library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License version 2.1, as published by the Free Software Foundation;
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21  * MA 02110-1301 USA
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 #include <glibmm/ustring.h>
40
41 class Ieee1394Service;
42 class ConfigRom;
43
44 namespace BeBoB {
45
46 class AvDevice;
47
48 class Plug : public AVC::Plug {
49 public:
50
51     // \todo This constructors sucks. too many parameters. fix it.
52     Plug( AVC::Unit* unit,
53           AVC::Subunit* subunit,
54           AVC::function_block_type_t functionBlockType,
55           AVC::function_block_type_t functionBlockId,
56           AVC::Plug::EPlugAddressType plugAddressType,
57           AVC::Plug::EPlugDirection plugDirection,
58           AVC::plug_id_t plugId );
59     Plug( const Plug& rhs );
60     virtual ~Plug();
61
62     bool discover();
63     bool discoverConnections();
64
65  public:
66
67 protected:
68     Plug();
69
70     bool discoverPlugType();
71     bool discoverName();
72     bool discoverNoOfChannels();
73     bool discoverChannelPosition();
74     bool discoverChannelName();
75     bool discoverClusterInfo();
76     bool discoverConnectionsInput();
77     bool discoverConnectionsOutput();
78
79 private:
80     bool copyClusterInfo(AVC::ExtendedPlugInfoPlugChannelPositionSpecificData&
81                          channelPositionData );
82     AVC::ExtendedPlugInfoCmd setPlugAddrToPlugInfoCmd();
83
84
85 };
86
87 }
88
89 #endif // BEBOB_AVPLUG_H
Note: See TracBrowser for help on using the browser.