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 
16 // Qt headers
17 #include <QMap>
18 
19 // MythTV headers
20 #include "avcinfo.h"
21 
22 class LinuxAVCInfo : public AVCInfo
23 {
24  public:
25  LinuxAVCInfo() = default;
26 
27  bool Update(uint64_t _guid, raw1394handle_t handle,
28  uint _port, uint _node);
29 
30  bool OpenPort(void);
31  bool ClosePort(void);
32 
33  bool SendAVCCommand(
34  const std::vector<uint8_t> &cmd,
35  std::vector<uint8_t> &result,
36  int retry_cnt) override; // AVCInfo
37 
38  bool IsPortOpen(void) const { return m_fwHandle; }
39 
41  int GetNode(void) const { return m_node; }
42 
43  public:
44  raw1394handle_t m_fwHandle {nullptr};
45 };
46 using avcinfo_list_t = QMap<uint64_t,LinuxAVCInfo*>;
47 
48 #endif // USING_LINUX_FIREWIRE
49 
50 #endif // LINUX_AVC_INFO_H
LinuxAVCInfo::OpenPort
bool OpenPort(void)
Definition: linuxavcinfo.cpp:37
LinuxAVCInfo
Definition: linuxavcinfo.h:22
AVCInfo
Definition: avcinfo.h:22
LinuxAVCInfo::m_fwHandle
raw1394handle_t m_fwHandle
Definition: linuxavcinfo.h:44
avcinfo.h
avcinfo_list_t
QMap< uint64_t, DarwinAVCInfo * > avcinfo_list_t
Definition: darwinavcinfo.h:64
AVCInfo::m_node
int m_node
Definition: avcinfo.h:46
LinuxAVCInfo::IsPortOpen
bool IsPortOpen(void) const
Definition: linuxavcinfo.h:38
uint
unsigned int uint
Definition: compat.h:140
LinuxAVCInfo::GetNode
int GetNode(void) const
Returns remote node.
Definition: linuxavcinfo.h:41
LinuxAVCInfo::Update
bool Update(uint64_t _guid, raw1394handle_t handle, uint _port, uint _node)
Definition: linuxavcinfo.cpp:8
LinuxAVCInfo::SendAVCCommand
bool SendAVCCommand(const std::vector< uint8_t > &cmd, std::vector< uint8_t > &result, int retry_cnt) override
Definition: linuxavcinfo.cpp:66
LinuxAVCInfo::ClosePort
bool ClosePort(void)
Definition: linuxavcinfo.cpp:54
LinuxAVCInfo::LinuxAVCInfo
LinuxAVCInfo()=default