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#include "libmythbase/mythconfig.h"
5
6#if CONFIG_FIREWIRE_LINUX
7
8// Linux headers
9#include <libraw1394/raw1394.h>
10#include <libraw1394/csr.h>
11#include <libiec61883/iec61883.h>
12#include <libavc1394/avc1394.h>
13#include <libavc1394/rom1394.h>
14
15// C++ headers
16#include <vector>
17
18// Qt headers
19#include <QMap>
20
21// MythTV headers
22#include "avcinfo.h"
23
24class LinuxAVCInfo : public AVCInfo
25{
26 public:
27 LinuxAVCInfo() = default;
28
29 bool Update(uint64_t _guid, raw1394handle_t handle,
30 uint _port, uint _node);
31
32 bool OpenPort(void);
33 bool ClosePort(void);
34
35 bool SendAVCCommand(
36 const std::vector<uint8_t> &cmd,
37 std::vector<uint8_t> &result,
38 int retry_cnt) override; // AVCInfo
39
40 bool IsPortOpen(void) const { return m_fwHandle; }
41
43 int GetNode(void) const { return m_node; }
44
45 public:
46 raw1394handle_t m_fwHandle {nullptr};
47};
48using avcinfo_list_t = QMap<uint64_t,LinuxAVCInfo*>;
49
50#endif // CONFIG_FIREWIRE_LINUX
51
52#endif // LINUX_AVC_INFO_H
virtual bool SendAVCCommand(const std::vector< uint8_t > &, std::vector< uint8_t > &, int)
Definition: avcinfo.h:30
int m_node
Definition: avcinfo.h:46
unsigned int uint
Definition: compat.h:68