#ifndef CSMSDEVICE_H
#define CSMSDEVICE_H

#include "GlobalDefine.h"
#include "NetworkDevice.h"
#include "VoipMsSMSClient.h"
#include "ContactRepository.h"
#include <QObject>


class CSMSDevice: public QObject, CNetworkDevice
{
    Q_OBJECT
public:
    CSMSDevice(int Address, CAbstractNetworkCommIF *NetworkInterface, CVoipMsSMSClient *VoipMsIFPtr);
    virtual ~CSMSDevice();

    //CAbstractNetworkDevice implementation
    virtual int NewDeviceFrameReceived(int DeviceID, int DeviceAddress, int MessageID, int DataSize, QByteArray Data);

    CVoipMsSMSClient *mVoipMsInterfaceHandle;
    CContactRepository *mContactRepositoryHandle;
    QTimer *mStatusRequestTimer;
    int mStatusRequestsCount;

    void SendNewSMSReceived(QList<CSMSMessage> NewMessages);
    void DeviceStatusReceived();

private:
    void RequestStatus();
    void SendSMSSentAck(bool Ack);
public slots:
    void StatusReqTimerExpired();

};

#endif // CSMSDEVICE_H
