root/trunk/freebob/src/avdescriptor.h

Revision 31, 1.6 kB (checked in by wagi, 19 years ago)

emacs has complained about the whitespaces, so there we go: whitespace-cleanup.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 /* avdescriptor.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 #ifndef AVDESCRIPTOR_H
22 #define AVDESCRIPTOR_H
23
24 #include "avdevice.h"
25
26 class AvDescriptor {
27  public:
28     AvDescriptor(AvDevice *parent, quadlet_t target, unsigned int type);
29     virtual ~AvDescriptor();
30
31     void Load();
32     bool isLoaded();
33     bool isPresent();
34     unsigned int getLength();
35     unsigned char readByte(unsigned int address);
36     unsigned int readWord(unsigned int address);
37     unsigned int readBuffer(unsigned int address, unsigned int length, unsigned char *buffer);
38     void OpenReadWrite();
39     void OpenReadOnly();
40     void Close();
41     bool isOpen();
42     bool canWrite();
43     bool isValid();
44
45  protected:
46     AvDevice *cParent;
47     unsigned int iType;
48     unsigned char *aContents;
49     bool bLoaded;
50     bool bOpen;
51     bool bValid;
52     unsigned int iAccessType;
53     unsigned int iLength;
54     quadlet_t qTarget;
55 };
56
57 #endif
Note: See TracBrowser for help on using the browser.