// Copyright (c) 2014, Brad Parker // This file is licensed under the BSD 2-clause license. #ifndef QIPROUTE_INTERFACE_H #define QIPROUTE_INTERFACE_H #include #include "qiproute_global.h" class QIPROUTE_EXPORT Interface : public QObject { Q_OBJECT public: Interface(QString interface); ~Interface(); static QStringList list(); QStringList addresses() const; bool hasCarrier(bool *ok = 0); bool hasAdminLink(bool *ok = 0); int setLinkUp(); int setLinkDown(); int addAddress(QString address) const; int deleteAddress(QString address) const; const QString& name() const; private: QString m_interface; int m_index; }; #endif // QIPROUTE_INTERFACE_H