#ifndef ETHERNETNETWORKCOMMIF_H
#define ETHERNETNETWORKCOMMIF_H

#include <QObject>
#include "NetworkProtocol.h"
#include <QTcpServer>
#include <QTcpSocket>
#include <QList>
#include <NetworkDevice.h>
#include "AbstractNetworkInterface.h"


class CEthernetNetworkCommIF : public QObject, CNetworkProtocol, CAbstractNetworkCommIF
{
    Q_OBJECT
public:

    CEthernetNetworkCommIF(QTcpSocket *Socket);
    virtual ~CEthernetNetworkCommIF();

    QTcpSocket* mTCPSocket;

    //CNetworkCommIF implementation
    virtual int SendNetworkMessage(int DeviceID, int DeviceAddress, int MessageID, int DataSize, QByteArray *Data);

    //CNetworkProtocol implementation
    virtual int NewFrameReceived(int DeviceID, int DeviceAddress, int MessageID, int DataSize, QByteArray Data);

public slots:
    void SocketDataAvailable();
    void SocketDisconnected();

signals:
    void EthernetInterfaceSocketDisconnected(CNetworkDevice *);
};

#endif // ETHERNETNETWORKCOMMIF_H
