MythTV  master
linuxavcinfo.h
Go to the documentation of this file.
1 #ifndef _LINUX_AVC_INFO_H_
2 #define _LINUX_AVC_INFO_H_
3 
4 #ifdef USING_LINUX_FIREWIRE
5 
6 // Linux headers
7 #include <libraw1394/raw1394.h>
8 #include <libraw1394/csr.h>
9 #include <libiec61883/iec61883.h>
10 #include <libavc1394/avc1394.h>
11 #include <libavc1394/rom1394.h>
12 
13 // C++ headers
14 #include <vector>
15 using namespace std;
16 
17 // Qt headers
18 #include <QMap>
19 
20 // MythTV headers
21 #include "avcinfo.h"
22 
23 class LinuxAVCInfo : public AVCInfo
24 {
25  public:
26  LinuxAVCInfo() = default;
27 
28  bool Update(uint64_t _guid, raw1394handle_t handle,
29  uint _port, uint _node);
30 
31  bool OpenPort(void);
32  bool ClosePort(void);
33 
34  bool SendAVCCommand(
35  const vector<uint8_t> &cmd,
36  vector<uint8_t> &result,
37  int retry_cnt) override; // AVCInfo
38 
39  bool IsPortOpen(void) const { return m_fwHandle; }
40 
42  int GetNode(void) const { return m_node; }
43 
44  public:
45  raw1394handle_t m_fwHandle {nullptr};
46 };
47 using avcinfo_list_t = QMap<uint64_t,LinuxAVCInfo*>;
48 
49 #endif // USING_LINUX_FIREWIRE
50 
51 #endif // _LINUX_AVC_INFO_H_
bool IsPortOpen(void) const
Definition: linuxavcinfo.h:39
unsigned int uint
Definition: compat.h:140
QMap< uint64_t, DarwinAVCInfo * > avcinfo_list_t
Definition: darwinavcinfo.h:65
int GetNode(void) const
Returns remote node.
Definition: linuxavcinfo.h:42