root/branches/echoaudio/src/libavc/general/avc_subunit_info.h

Revision 503, 1.9 kB (checked in by ppalmers, 17 years ago)

- put all libavc stuff into it's own name namespace (AVC)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
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 AVCSUBUNITINFO_H
25 #define AVCSUBUNITINFO_H
26
27 #include "avc_generic.h"
28
29 #include <libavc1394/avc1394.h>
30
31
32 namespace AVC {
33
34 // No extended subunit queries supported
35
36 class SubUnitInfoCmd: public AVCCommand
37 {
38 public:
39     SubUnitInfoCmd( Ieee1394Service& ieee1349service );
40     virtual ~SubUnitInfoCmd();
41
42     virtual bool serialize( IOSSerialize& se );
43     virtual bool deserialize( IISDeserialize& de );
44
45     virtual const char* getCmdName() const
46     { return "SubUnitInfoCmd"; }
47
48     bool clear();
49
50     page_t           m_page;
51     extension_code_t m_extension_code;
52
53
54
55     enum {
56     eMaxSubunitsPerPage = 4,
57     eMaxSubunitsPerUnit = 32,
58     };
59
60     struct TableEntry {
61     subunit_type_t   m_subunit_type;
62     max_subunit_id_t m_max_subunit_id;
63     };
64
65     struct TableEntry m_table[eMaxSubunitsPerPage];
66
67     short getMaxNoOfPages()
68     { return eMaxSubunitsPerUnit / eMaxSubunitsPerPage; }
69
70
71     short            m_nrOfValidEntries;
72     short getNrOfValidEntries()
73     { return m_nrOfValidEntries; }
74
75 };
76
77 }
78
79 #endif // AVCSUBUNITINFO_H
Note: See TracBrowser for help on using the browser.