root/branches/libfreebob-2.0/src/libfreebobavc/avc_subunit_info.h

Revision 183, 1.8 kB (checked in by wagi, 18 years ago)

2006-03-30 Daniel Wagner <wagi@monom.org>

  • configure.ac: Version bump to 0.6.0
  • src/*: Verbose bool turned int verbose level.
  • src/libfreebobavc/*: Moved fire implementation to
    base class (AVCCommand).
  • libfreebob/freebob.h: freebob_sleep_after_avc_command
    workaround added.
  • tests/test-freebob.c: Verbose bool turned into verbose level.
    Workaround: sleep after avc command added.
  • tests/streaming/Makefile.am (*_SOURCES): Added libavc1394 to LDADD.
  • tests/Makefile.am (*_SOURCES): Likewise.
  • tests/streaming/teststreaming2.c (fid_in): compiler warning fixed.
  • 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 const char* getCmdName() const
41         { return "SubUnitInfoCmd"; }
42
43     bool clear();
44
45     page_t           m_page;
46     extension_code_t m_extension_code;
47
48
49
50     enum {
51         eMaxSubunitsPerPage = 4,
52         eMaxSubunitsPerUnit = 32,
53     };
54
55     struct TableEntry {
56         subunit_type_t   m_subunit_type;
57         max_subunit_id_t m_max_subunit_id;
58     };
59
60     struct TableEntry m_table[eMaxSubunitsPerPage];
61
62     short getMaxNoOfPages()
63         { return eMaxSubunitsPerUnit / eMaxSubunitsPerPage; }
64
65
66     short            m_nrOfValidEntries;
67     short getNrOfValidEntries()
68         { return m_nrOfValidEntries; }
69
70 };
71
72
73 #endif // AVCSubUnitInfo_h
Note: See TracBrowser for help on using the browser.