#ifndef MYTHINPUTLIRC_H_
#define MYTHINPUTLIRC_H_

#include "../mythinputinterface.h"
#include <QObject>
#include <QKeyEvent>
#include <QMutex>
#include <QThread>
#include <qlocalsocket.h>


class MythInputLirc : public QObject, public MythInputInterface  
{
    Q_OBJECT
    Q_INTERFACES(MythInputInterface)
  public:
    MythInputLirc();

    /* MythInputInterface */
    void start();
    void stop();
    const QString name() const;
    const QString description() const;

    void setInputManager(MythInputManagerInterface * inputManager);
    /* MythInputInterface end */
  private slots:
    void slotRead();
    void socketError(QLocalSocket::LocalSocketError socketError);
    void socketConnected();
  private:
    virtual ~MythInputLirc();
    QMap<QString,QMap<QString,QString> > m_mapping;
    bool loadConfig();
    QLocalSocket m_lircSocket;
    MythInputManagerInterface * m_inputManager;
    QString m_configFile;
};
#endif
