root/trunk/libfreebob/src/libfreebobavc/avc_subunit_info.h

Revision 125, 1.7 kB (checked in by wagi, 18 years ago)

Initial revision

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