# shx10.h

Go to the documentation of this file.

    00001 /*
    00002  * SmartHome server: Plug-in x10
    00003  *
    00004  * Copyright (C) 2010 Daniel Pisi <dan.pisi@gmail.com>
    00005  *
    00006  * This program is free software; you can redistribute it and/or modify it
    00007  * under the terms of version 2 of the GNU General Public License
    00008  * as published by the Free Software Foundation.
    00009  *
    00010  */
    00011
    00018 #ifndef SHX10_H
    00019 #define SHX10_H
    00020
    00021 #include <QtCore/QCoreApplication>
    00022 #include <QtPlugin>
    00023 #include <QObject>
    00024 #include <QQueue>
    00025 #include <QRegExp>
    00026 #include "shobjecthelper.h"
    00027 #include "x10interface.h"
    00028
    00029 // -----------------------------------------------------------------------------
    00030
    00035 class ShX10 : public ShObjectHelper
    00036 {
    00037     Q_OBJECT
    00038     Q_INTERFACES(ShObject)
    00039
    00040 public:
    00041     ShX10(QObject *parent = 0);
    00042     virtual ~ShX10() {};
    00043     virtual bool init(QString param);
    00044     virtual void updatePins(const QList<ShPin> &pins) { Q_UNUSED(pins); };
    00045     virtual void processMessage(ShMessagePtr message);
    00046
    00047 private slots:
    00048     void emitAck();
    00049     void emitErr(QString reason);
    00050
    00051 private:
    00052     void processNextMessage();
    00053
    00054     X10Interface *mInterface;
    00055     QQueue<ShMessagePtr> mMessageQueue;
    00056 };
    00057 // -----------------------------------------------------------------------------
    00058
    00059 #endif // SHX10_H

All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends