summaryrefslogtreecommitdiff
path: root/libopie2/opienet/onetwork.h
Unidiff
Diffstat (limited to 'libopie2/opienet/onetwork.h') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opienet/onetwork.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libopie2/opienet/onetwork.h b/libopie2/opienet/onetwork.h
index 0a51108..93b129f 100644
--- a/libopie2/opienet/onetwork.h
+++ b/libopie2/opienet/onetwork.h
@@ -49,96 +49,100 @@
49#include <opie2/ostation.h> 49#include <opie2/ostation.h>
50 50
51/* QT */ 51/* QT */
52 52
53#include <qvaluelist.h> 53#include <qvaluelist.h>
54#include <qdict.h> 54#include <qdict.h>
55#include <qmap.h> 55#include <qmap.h>
56#include <qobject.h> 56#include <qobject.h>
57#include <qhostaddress.h> 57#include <qhostaddress.h>
58 58
59class ONetworkInterface; 59class ONetworkInterface;
60class OWirelessNetworkInterface; 60class OWirelessNetworkInterface;
61class OChannelHopper; 61class OChannelHopper;
62class OMonitoringInterface; 62class OMonitoringInterface;
63 63
64/*====================================================================================== 64/*======================================================================================
65 * ONetwork 65 * ONetwork
66 *======================================================================================*/ 66 *======================================================================================*/
67 67
68/** 68/**
69 * @brief A container class for all network interfaces 69 * @brief A container class for all network interfaces
70 * 70 *
71 * This class provides access to all available network interfaces of your computer. 71 * This class provides access to all available network interfaces of your computer.
72 * 72 *
73 * @author Michael 'Mickey' Lauer <mickey@vanille.de> 73 * @author Michael 'Mickey' Lauer <mickey@vanille.de>
74 */ 74 */
75class ONetwork : public QObject 75class ONetwork : public QObject
76{ 76{
77 Q_OBJECT 77 Q_OBJECT
78 78
79 public: 79 public:
80 typedef QDict<ONetworkInterface> InterfaceMap; 80 typedef QDict<ONetworkInterface> InterfaceMap;
81 typedef QDictIterator<ONetworkInterface> InterfaceIterator; 81 typedef QDictIterator<ONetworkInterface> InterfaceIterator;
82 82
83 public: 83 public:
84 /** 84 /**
85 * @returns the number of available interfaces 85 * @returns the number of available interfaces
86 */ 86 */
87 int count() const; 87 int count() const;
88 /** 88 /**
89 * @returns a pointer to the (one and only) @ref ONetwork instance. 89 * @returns a pointer to the (one and only) @ref ONetwork instance.
90 */ 90 */
91 static ONetwork* instance(); 91 static ONetwork* instance();
92 /** 92 /**
93 * @returns an iterator usable for iterating through all network interfaces. 93 * @returns an iterator usable for iterating through all network interfaces.
94 */ 94 */
95 InterfaceIterator iterator() const; 95 InterfaceIterator iterator() const;
96 /** 96 /**
97 * @returns true, if the @a interface is present.
98 */
99 bool isPresent( const char* interface ) const;
100 /**
97 * @returns true, if the @a interface supports the wireless extension protocol. 101 * @returns true, if the @a interface supports the wireless extension protocol.
98 */ 102 */
99 bool isWirelessInterface( const char* interface ) const; 103 bool isWirelessInterface( const char* interface ) const;
100 /** 104 /**
101 * @returns a pointer to the @ref ONetworkInterface object for the specified @a interface or 0, if not found. 105 * @returns a pointer to the @ref ONetworkInterface object for the specified @a interface or 0, if not found.
102 * @see ONetworkInterface 106 * @see ONetworkInterface
103 */ 107 */
104 ONetworkInterface* interface( const QString& interface ) const; 108 ONetworkInterface* interface( const QString& interface ) const;
105 /** 109 /**
106 * @internal Rebuild the internal interface database 110 * @internal Rebuild the internal interface database
107 * @note Sometimes it might be useful to call this from client code, 111 * @note Sometimes it might be useful to call this from client code,
108 * e.g. after issuing a cardctl insert 112 * e.g. after issuing a cardctl insert
109 */ 113 */
110 void synchronize(); 114 void synchronize();
111 /** 115 /**
112 * @returns the wireless extension version used at compile time. 116 * @returns the wireless extension version used at compile time.
113 **/ 117 **/
114 static short wirelessExtensionVersion(); 118 static short wirelessExtensionVersion();
115 119
116 protected: 120 protected:
117 ONetwork(); 121 ONetwork();
118 122
119 private: 123 private:
120 static ONetwork* _instance; 124 static ONetwork* _instance;
121 InterfaceMap _interfaces; 125 InterfaceMap _interfaces;
122}; 126};
123 127
124 128
125/*====================================================================================== 129/*======================================================================================
126 * ONetworkInterface 130 * ONetworkInterface
127 *======================================================================================*/ 131 *======================================================================================*/
128 132
129/** 133/**
130 * @brief A network interface wrapper. 134 * @brief A network interface wrapper.
131 * 135 *
132 * This class provides a wrapper for a network interface. All the cumbersume details of 136 * This class provides a wrapper for a network interface. All the cumbersume details of
133 * Linux ioctls are hidden under a convenient high-level interface. 137 * Linux ioctls are hidden under a convenient high-level interface.
134 * @warning Most of the setting methods contained in this class require the appropriate 138 * @warning Most of the setting methods contained in this class require the appropriate
135 * process permissions to work. 139 * process permissions to work.
136 * 140 *
137 * @author Michael 'Mickey' Lauer <mickey@vanille.de> 141 * @author Michael 'Mickey' Lauer <mickey@vanille.de>
138 */ 142 */
139class ONetworkInterface : public QObject 143class ONetworkInterface : public QObject
140{ 144{
141 friend class OMonitoringInterface; 145 friend class OMonitoringInterface;
142 friend class OCiscoMonitoringInterface; 146 friend class OCiscoMonitoringInterface;
143 friend class OWlanNGMonitoringInterface; 147 friend class OWlanNGMonitoringInterface;
144 friend class OHostAPMonitoringInterface; 148 friend class OHostAPMonitoringInterface;