Networksettings API API Documentation

interface.h

00001 #ifndef INTERFACE_H
00002 #define INTERFACE_H
00003 
00004 #include <qstring.h>
00005 #include <qobject.h>
00006 
00007 class Module;
00008 
00016 class Interface : public QObject{
00017   Q_OBJECT
00018 
00019 signals:
00020   void updateInterface(Interface *i);
00021   void updateMessage(const QString &message);
00022 
00023 public:
00024   Interface(QObject * parent=0, const char * name= "unknown", bool status = false);
00025 
00026   QString getInterfaceName() const { QString n(this->name()); return n; };
00027   void setInterfaceName( const QString &n ) { this->setName(n); };
00028 
00029   bool getStatus() const { return status; };
00030   void setStatus(bool newStatus);
00031 
00032   bool isAttached() const { return attached; };
00033   void setAttached(bool isAttached=false);
00034 
00035   QString getHardwareName() const { return hardwareName; };
00036   void setHardwareName(const QString &name="Unknown");
00037 
00038   Module* getModuleOwner() const { return moduleOwner; };
00039   void setModuleOwner(Module *owner=NULL);
00040 
00041   // inet information.
00042   QString getMacAddress() const { return macAddress; };
00043   QString getIp() const { return ip; };
00044   QString getSubnetMask() const { return subnetMask; };
00045   QString getBroadcast() const { return broadcast; };
00046   bool isDhcp() const { return dhcp; };
00047   QString getDhcpServerIp() const { return dhcpServerIp; };
00048   QString getLeaseObtained() const { return leaseObtained; };
00049   QString getLeaseExpires() const { return leaseExpires; };
00050 
00051  public slots:
00052   virtual bool refresh();
00053   virtual void start();
00054   virtual void stop();
00055   virtual void restart();
00056 
00057 protected:
00058   // Interface information
00059   QString hardwareName;
00060   Module *moduleOwner;
00061   bool status;
00062   bool attached;
00063 
00064   // Network information
00065   bool dhcp;
00066   QString dhcpServerIp;
00067   QString leaseObtained;
00068   QString leaseExpires;
00069 
00070   QString macAddress;
00071   QString ip;
00072   QString broadcast;
00073   QString subnetMask;
00074 
00075 };
00076 
00077 #endif
00078 
00079 // interface.h
00080 
KDE Logo
This file is part of the documentation for OPIE Version 1.0.
Documentation copyright © 1997-2003 the KDE developers. 2003 OPIE developers
Generated on Tue Feb 10 20:26:44 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001