Strip wxWidget out of DPlusProtocolHandler

master
Geoffrey Merck 4 years ago
parent 0a8cc0987b
commit 102c7d6667

@ -26,7 +26,7 @@
const unsigned int BUFFER_LENGTH = 1000U; const unsigned int BUFFER_LENGTH = 1000U;
CDPlusProtocolHandler::CDPlusProtocolHandler(unsigned int port, const wxString& addr) : CDPlusProtocolHandler::CDPlusProtocolHandler(unsigned int port, const std::string& addr) :
m_socket(addr, port), m_socket(addr, port),
m_type(DP_NONE), m_type(DP_NONE),
m_buffer(NULL), m_buffer(NULL),
@ -89,7 +89,7 @@ bool CDPlusProtocolHandler::writePoll(const CPollData& poll)
unsigned int length = poll.getDPlusData(buffer, 10U); unsigned int length = poll.getDPlusData(buffer, 10U);
#if defined(DUMP_TX) #if defined(DUMP_TX)
CUtils::dump(wxT("Sending Poll"), buffer, length); CUtils::dump("Sending Poll", buffer, length);
#endif #endif
return m_socket.write(buffer, length, poll.getYourAddress(), poll.getYourPort()); return m_socket.write(buffer, length, poll.getYourAddress(), poll.getYourPort());
@ -101,7 +101,7 @@ bool CDPlusProtocolHandler::writeConnect(const CConnectData& connect)
unsigned int length = connect.getDPlusData(buffer, 40U); unsigned int length = connect.getDPlusData(buffer, 40U);
#if defined(DUMP_TX) #if defined(DUMP_TX)
CUtils::dump(wxT("Sending Connect"), buffer, length); CUtils::dump("Sending Connect", buffer, length);
#endif #endif
return m_socket.write(buffer, length, connect.getYourAddress(), connect.getYourPort()); return m_socket.write(buffer, length, connect.getYourAddress(), connect.getYourPort());
@ -141,7 +141,7 @@ bool CDPlusProtocolHandler::readPackets()
return false; return false;
default: default:
// An unknown type // An unknown type
// CUtils::dump(wxT("Unknown packet type from D-Plus"), m_buffer, m_length); // CUtils::dump("Unknown packet type from D-Plus", m_buffer, m_length);
return true; return true;
} }
} else { } else {
@ -157,7 +157,7 @@ bool CDPlusProtocolHandler::readPackets()
return false; return false;
} else { } else {
// An unknown type // An unknown type
CUtils::dump(wxT("Unknown packet type from D-Plus"), m_buffer, m_length); CUtils::dump("Unknown packet type from D-Plus", m_buffer, m_length);
return true; return true;
} }
} }

@ -26,13 +26,7 @@
#include "AMBEData.h" #include "AMBEData.h"
#include "PollData.h" #include "PollData.h"
#if defined(__WINDOWS__)
#include "Inaddr.h"
#else
#include <netinet/in.h> #include <netinet/in.h>
#endif
#include <wx/wx.h>
enum DPLUS_TYPE { enum DPLUS_TYPE {
DP_NONE, DP_NONE,
@ -44,7 +38,7 @@ enum DPLUS_TYPE {
class CDPlusProtocolHandler { class CDPlusProtocolHandler {
public: public:
CDPlusProtocolHandler(unsigned int port, const wxString& addr = wxEmptyString); CDPlusProtocolHandler(unsigned int port, const std::string& addr = "");
~CDPlusProtocolHandler(); ~CDPlusProtocolHandler();
bool open(); bool open();

Loading…
Cancel
Save

Powered by TurnKey Linux.