/*
 * SmartHome server: Plug-in xbee
 *
 * Copyright (C) 2010 Daniel Pisi <dan.pisi@gmail.com>
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of version 2 of the GNU General Public License
 * as published by the Free Software Foundation.
 *
 */

/**
 * @file xbmessage.h
 * @brief Defines relationship between ShMessages and XbPackets
 * @author Daniel Pisi
 */

#ifndef XBMESSAGE_H
#define XBMESSAGE_H

#include <QObject>
#include <QTimer>
#include <QScopedPointer>
#include "shmessage.h"
#include "xbpacket.h"

// -----------------------------------------------------------------------------

class XbMessage;

typedef QSharedPointer<XbMessage> XbMessagePtr;

// -----------------------------------------------------------------------------

/**
 * \class XbMessage
 * \brief Defines relationship between ShMessages and XbPackets
 */
class XbMessage : public QObject
{
    Q_OBJECT

public:
    XbMessage(QObject *parent = 0);
    ~XbMessage();

    QSharedPointer<ShMessage>  message;
    QSharedPointer<XbPacket>   packet;
    QTimer                    *timer;

signals:
    void timeout();
};
// -----------------------------------------------------------------------------

#endif // XBMESSAGE_H
