Merge pull request #7015 from lioncash/pcap
PcapFile: Namespace code under the Common namespace
This commit is contained in:
4 files changed
+16
-6
No files matched your search
@@ -40,15 +40,16 @@ struct DMAPacket
|
||||
#pragma pack(pop)
|
||||
|
||||
PCAPDSPCaptureLogger::PCAPDSPCaptureLogger(const std::string& pcap_filename)
|
||||
: m_pcap(new PCAP(new File::IOFile(pcap_filename, "wb")))
|
||||
: m_pcap(new Common::PCAP(new File::IOFile(pcap_filename, "wb")))
|
||||
{
|
||||
}
|
||||
|
||||
PCAPDSPCaptureLogger::PCAPDSPCaptureLogger(PCAP* pcap) : m_pcap(pcap)
|
||||
PCAPDSPCaptureLogger::PCAPDSPCaptureLogger(Common::PCAP* pcap) : m_pcap(pcap)
|
||||
{
|
||||
}
|
||||
|
||||
PCAPDSPCaptureLogger::PCAPDSPCaptureLogger(std::unique_ptr<PCAP>&& pcap) : m_pcap(std::move(pcap))
|
||||
PCAPDSPCaptureLogger::PCAPDSPCaptureLogger(std::unique_ptr<Common::PCAP>&& pcap)
|
||||
: m_pcap(std::move(pcap))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,10 @@
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
|
||||
namespace Common
|
||||
{
|
||||
class PCAP;
|
||||
}
|
||||
|
||||
namespace DSP
|
||||
{
|
||||
@@ -56,8 +59,8 @@ public:
|
||||
// Automatically creates a writeable file (truncate existing file).
|
||||
PCAPDSPCaptureLogger(const std::string& pcap_filename);
|
||||
// Takes ownership of pcap.
|
||||
PCAPDSPCaptureLogger(PCAP* pcap);
|
||||
PCAPDSPCaptureLogger(std::unique_ptr<PCAP>&& pcap);
|
||||
PCAPDSPCaptureLogger(Common::PCAP* pcap);
|
||||
PCAPDSPCaptureLogger(std::unique_ptr<Common::PCAP>&& pcap);
|
||||
|
||||
void LogIFXRead(u16 address, u16 read_value) override { LogIFXAccess(true, address, read_value); }
|
||||
void LogIFXWrite(u16 address, u16 written_value) override
|
||||
@@ -69,6 +72,6 @@ public:
|
||||
private:
|
||||
void LogIFXAccess(bool read, u16 address, u16 value);
|
||||
|
||||
std::unique_ptr<PCAP> m_pcap;
|
||||
std::unique_ptr<Common::PCAP> m_pcap;
|
||||
};
|
||||
} // namespace DSP
|
||||
Reference in new issue
Block a user