12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- // netinterfaces.h :
- //
- #if !defined(AGD_NETINTERFACES_H__54DE87BE_1F3C_4914_A062_9CCFCB496122__INCLUDED_)
- #define AGD_NETINTERFACES_H__54DE87BE_1F3C_4914_A062_9CCFCB496122__INCLUDED_
- #include <vector>
- #include <QObject>
- #include <QList>
- #include <QQmlListProperty>
- #include <qqmlparserstatus.h>
- #include <gfa/gfanet.h>
- /////////////////////////////////////////////////////////////////////////////
- // netinterfaces.h - Declarations:
- class Interface : public QObject
- {
- Q_OBJECT
- Q_PROPERTY(QString name READ name)
- Q_PROPERTY(QString family READ family)
- Q_PROPERTY(QString ipAddress READ ipAddress)
- Q_PROPERTY(QString method READ method)
- public:
- explicit Interface(ITF_IFACE_BLOCK &ifb, QObject *pParent = 0);
- virtual ~Interface(void);
-
- inline const ITF_IFACE_BLOCK & getIface(void) const {
- return m_ifb;}
-
- private:
- QString name(void) const;
- QString ipAddress(void) const;
- QString family(void) const;
- QString method(void) const;
- private:
- ITF_IFACE_BLOCK &m_ifb;
- };
- /////////////////////////////////////////////////////////////////////////////
- class NetInterfaces : public QObject, public QQmlParserStatus
- {
- Q_OBJECT
- Q_INTERFACES(QQmlParserStatus)
- public:
- explicit NetInterfaces(QObject *pParent = 0);
- virtual ~NetInterfaces(void);
- public:
- Q_INVOKABLE void reset(void);
- Q_INVOKABLE bool initialize(void);
- Q_INVOKABLE QVariantList getInterface(const QString &itfName);
- virtual void classBegin();
- virtual void componentComplete();
- private:
- ETC_NETWORK_INTERFACES m_eni;
- std::vector<Interface*> m_itfList;
- };
- /////////////////////////////////////////////////////////////////////////////
- #endif // !defined(AGD_NETINTERFACES_H__54DE87BE_1F3C_4914_A062_9CCFCB496122__INCLUDED_)
|