root/trunk/freebob/src/avinfoblock.h

Revision 21, 1.6 kB (checked in by pieterpalmers, 19 years ago)

- Fixed some bugs in AvDescriptor? and AvDevice?
- Added more tests of the new classes to ieee1394service
- Modified the debuglevel to hide low level AVC transactions by AvDevice?
- Added AvMusicIdentifierDescriptor? and AvMusicStatusDescriptor? as a first

attempt at parsing device info.

- Added AvInfoBlock? to handle infoblocks (still very embryonal)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 /* avinfoblock.h
2  * Copyright (C) 2004 by Pieter Palmers
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  #include "avdevice.h"
22 #include "avdescriptor.h"
23 #include <string.h>
24 #include <errno.h>
25 #include <libavc1394/avc1394.h>
26 #include <libavc1394/avc1394_vcr.h>
27 #include "debugmodule.h"
28
29 #ifndef AVINFOBLOCK_H
30 #define AVINFOBLOCK_H
31
32 class AvInfoBlock {
33 public:
34         AvInfoBlock(AvDescriptor *parent, int address); // read an infoblock from a parent starting from a specific position
35         ~AvInfoBlock();
36
37         bool isValid();
38         unsigned int getLength();
39         unsigned int getType();
40
41         unsigned char readByte(unsigned int address);
42         unsigned int readWord(unsigned int address);
43         unsigned int readBuffer(unsigned int address, unsigned int length, unsigned char *buffer);
44                
45 protected:
46         AvDescriptor *cParent;
47         unsigned int iLength;
48         unsigned int iBaseAddress;
49         unsigned int iType;
50         bool bValid;
51 private:       
52        
53 };
54
55 #endif
Note: See TracBrowser for help on using the browser.