1 |
/* configrom.h |
---|
2 |
* Copyright (C) 2005,06 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 CONFIGROM_H |
---|
22 |
#define CONFIGROM_H |
---|
23 |
|
---|
24 |
#include "fbtypes.h" |
---|
25 |
#include "csr1212.h" |
---|
26 |
|
---|
27 |
#include "debugmodule/debugmodule.h" |
---|
28 |
|
---|
29 |
#include <string> |
---|
30 |
|
---|
31 |
class Ieee1394Service; |
---|
32 |
|
---|
33 |
class ConfigRom { |
---|
34 |
public: |
---|
35 |
ConfigRom( Ieee1394Service* ieee1394service, fb_nodeid_t nodeId ); |
---|
36 |
virtual ~ConfigRom(); |
---|
37 |
|
---|
38 |
bool initialize(); |
---|
39 |
|
---|
40 |
const bool isAvcDevice() const; |
---|
41 |
const bool isBootloader() const; |
---|
42 |
const fb_nodeid_t getNodeId() const; |
---|
43 |
const fb_octlet_t getGuid() const; |
---|
44 |
const std::string getModelName() const; |
---|
45 |
const std::string getVendorName() const; |
---|
46 |
const unsigned int getModelId() const; |
---|
47 |
const unsigned int getVendorId() const; |
---|
48 |
|
---|
49 |
protected: |
---|
50 |
void processUnitDirectory( struct csr1212_csr* csr, |
---|
51 |
struct csr1212_keyval* ud_kv, |
---|
52 |
unsigned int* id ); |
---|
53 |
|
---|
54 |
void processRootDirectory( struct csr1212_csr* csr ); |
---|
55 |
|
---|
56 |
Ieee1394Service* m_1394Service; |
---|
57 |
fb_nodeid_t m_nodeId; |
---|
58 |
bool m_avcDevice; |
---|
59 |
fb_octlet_t m_guid; |
---|
60 |
std::string m_vendorName; |
---|
61 |
std::string m_modelName; |
---|
62 |
unsigned int m_vendorId; |
---|
63 |
unsigned int m_modelId; |
---|
64 |
|
---|
65 |
/* only used during parsing */ |
---|
66 |
struct csr1212_keyval* m_vendorNameKv; |
---|
67 |
struct csr1212_keyval* m_modelNameKv; |
---|
68 |
struct csr1212_csr* m_csr; |
---|
69 |
|
---|
70 |
private: |
---|
71 |
ConfigRom( const ConfigRom& ); |
---|
72 |
|
---|
73 |
DECLARE_DEBUG_MODULE; |
---|
74 |
}; |
---|
75 |
|
---|
76 |
#endif /* CONFIGROM_H */ |
---|