/*
 * SmartHome server: Base of the system
 *
 * 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 shpin.h
 * @brief Stores plug-ins' pin details
 * @author Daniel Pisi
 */

#ifndef SHPIN_H
#define SHPIN_H

#include <QObject>
#include <QString>

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

/**
 * \class ShPin
 * \brief Stores pin details
 */
class ShPin
{
public:
    enum PinType
    {
        ptUnknown = 0, ptBool, ptInt, ptReal, ptString, ptVariant
    };

    ShPin();

    void setObjectId(int id);
    void setSignal(QString signal);
    void setDirection(QString direction);
    void setType(QString type);

    int     objectId() { return mObjectId; };
    QString signal()   { return mSignal; };
    bool    isInput()  { return mInput; }
    bool    isOutput() { return mOutput; }
    PinType type()     { return mType; }

private:
    int     mObjectId;
    QString mSignal;
    bool    mInput, mOutput;
    PinType mType;
};
// -----------------------------------------------------------------------------

#endif // SHPIN_H
