-rw-r--r-- | libopie2/opiecore/oapplication.cpp | 2 | ||||
-rw-r--r-- | libopie2/opiecore/oapplication.h | 6 | ||||
-rw-r--r-- | libopie2/opiecore/oglobal.h | 3 | ||||
-rw-r--r-- | libopie2/opiecore/oglobalsettings.h | 7 | ||||
-rw-r--r-- | libopie2/opienet/omanufacturerdb.h | 1 | ||||
-rw-r--r-- | libopie2/opienet/onetutils.h | 3 | ||||
-rw-r--r-- | libopie2/opienet/onetwork.cpp | 2 | ||||
-rw-r--r-- | libopie2/opienet/onetwork.h | 4 | ||||
-rw-r--r-- | libopie2/opienet/opcap.h | 28 | ||||
-rw-r--r-- | libopie2/opieui/odialog.h | 5 | ||||
-rw-r--r-- | libopie2/opieui/oimageeffect.h | 1 | ||||
-rw-r--r-- | libopie2/opieui/olistview.h | 4 | ||||
-rw-r--r-- | libopie2/opieui/opopupmenu.h | 3 | ||||
-rw-r--r-- | libopie2/qt3/opiecore/opair.h | 1 |
14 files changed, 51 insertions, 19 deletions
diff --git a/libopie2/opiecore/oapplication.cpp b/libopie2/opiecore/oapplication.cpp index d3e04ba..ce26420 100644 --- a/libopie2/opiecore/oapplication.cpp +++ b/libopie2/opiecore/oapplication.cpp | |||
@@ -98,27 +98,27 @@ void OApplication::setMainWidget( QWidget* widget ) | |||
98 | showMainWidget( widget ); | 98 | showMainWidget( widget ); |
99 | } | 99 | } |
100 | 100 | ||
101 | 101 | ||
102 | void OApplication::showMainWidget( QWidget* widget, bool nomax ) | 102 | void OApplication::showMainWidget( QWidget* widget, bool nomax ) |
103 | { | 103 | { |
104 | #ifdef Q_WS_QWS | 104 | #ifdef Q_WS_QWS |
105 | QPEApplication::showMainWidget( widget, nomax ); | 105 | QPEApplication::showMainWidget( widget, nomax ); |
106 | #else | 106 | #else |
107 | QApplication::setMainWidget( widget ); | 107 | QApplication::setMainWidget( widget ); |
108 | widget->show(); | 108 | widget->show(); |
109 | #endif | 109 | #endif |
110 | widget->setCaption( _appname ); | 110 | widget->setCaption( _appname ); |
111 | } | 111 | } |
112 | 112 | ||
113 | 113 | ||
114 | void OApplication::setTitle( QString title ) const | 114 | void OApplication::setTitle( const QString& title ) const |
115 | { | 115 | { |
116 | if ( mainWidget() ) | 116 | if ( mainWidget() ) |
117 | { | 117 | { |
118 | if ( !title.isNull() ) | 118 | if ( !title.isNull() ) |
119 | mainWidget()->setCaption( QString(_appname) + QString( " - " ) + title ); | 119 | mainWidget()->setCaption( QString(_appname) + QString( " - " ) + title ); |
120 | else | 120 | else |
121 | mainWidget()->setCaption( _appname ); | 121 | mainWidget()->setCaption( _appname ); |
122 | } | 122 | } |
123 | } | 123 | } |
124 | 124 | ||
diff --git a/libopie2/opiecore/oapplication.h b/libopie2/opiecore/oapplication.h index 4d25202..8326847 100644 --- a/libopie2/opiecore/oapplication.h +++ b/libopie2/opiecore/oapplication.h | |||
@@ -20,45 +20,49 @@ | |||
20 | ..}^=.= = ; Library General Public License for more | 20 | ..}^=.= = ; Library General Public License for more |
21 | ++= -. .` .: details. | 21 | ++= -. .` .: details. |
22 | : = ...= . :.=- | 22 | : = ...= . :.=- |
23 | -. .:....=;==+<; You should have received a copy of the GNU | 23 | -. .:....=;==+<; You should have received a copy of the GNU |
24 | -_. . . )=. = Library General Public License along with | 24 | -_. . . )=. = Library General Public License along with |
25 | -- :-=` this library; see the file COPYING.LIB. | 25 | -- :-=` this library; see the file COPYING.LIB. |
26 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
27 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
28 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #ifndef OAPPLICATION_H | 31 | #ifndef OAPPLICATION_H |
32 | #define OAPPLICATION_H | 32 | #define OAPPLICATION_H |
33 | 33 | ||
34 | #define oApp OApplication::oApplication() | 34 | #define oApp OApplication::oApplication() |
35 | 35 | ||
36 | // the below stuff will fail with moc because moc does not pre process headers | ||
37 | // This will make usage of signal and slots hard inside QPEApplication -zecke | ||
38 | |||
36 | #ifdef QWS | 39 | #ifdef QWS |
37 | #include <qpe/qpeapplication.h> | 40 | #include <qpe/qpeapplication.h> |
38 | #define OApplicationBaseClass QPEApplication | 41 | #define OApplicationBaseClass QPEApplication |
39 | #else | 42 | #else |
40 | #include <qapplication.h> | 43 | #include <qapplication.h> |
41 | #define OApplicationBaseClass QApplication | 44 | #define OApplicationBaseClass QApplication |
42 | #endif | 45 | #endif |
43 | 46 | ||
44 | class OApplicationPrivate; | 47 | class OApplicationPrivate; |
45 | class OConfig; | 48 | class OConfig; |
46 | 49 | ||
47 | class OApplication: public OApplicationBaseClass | 50 | class OApplication: public OApplicationBaseClass |
48 | { | 51 | { |
52 | // Q_OBJECT would fail -zecke | ||
49 | public: | 53 | public: |
50 | 54 | ||
51 | /** | 55 | /** |
52 | * Constructor. Parses command-line arguments and sets the window caption. | 56 | * Constructor. Parses command-line arguments and sets the window caption. |
53 | * | 57 | * |
54 | * @param rAppName application name. Will be used for finding the | 58 | * @param rAppName application name. Will be used for finding the |
55 | * associated message, icon and configuration files | 59 | * associated message, icon and configuration files |
56 | * | 60 | * |
57 | */ | 61 | */ |
58 | OApplication( int& argc, char** argv, const QCString& rAppName ); | 62 | OApplication( int& argc, char** argv, const QCString& rAppName ); |
59 | /** | 63 | /** |
60 | * Destructor. Destroys the application object and its children. | 64 | * Destructor. Destroys the application object and its children. |
61 | */ | 65 | */ |
62 | virtual ~OApplication(); | 66 | virtual ~OApplication(); |
63 | 67 | ||
64 | /** | 68 | /** |
@@ -101,30 +105,30 @@ class OApplication: public OApplicationBaseClass | |||
101 | 105 | ||
102 | /** | 106 | /** |
103 | * Shows the main widget - reimplemented to call setMainWidget() | 107 | * Shows the main widget - reimplemented to call setMainWidget() |
104 | * on platforms other than Qt/Embedded. | 108 | * on platforms other than Qt/Embedded. |
105 | * | 109 | * |
106 | * @param mainWidget the widget to become the main widget | 110 | * @param mainWidget the widget to become the main widget |
107 | * @see QWidget object | 111 | * @see QWidget object |
108 | */ | 112 | */ |
109 | virtual void showMainWidget( QWidget* widget, bool nomax = false ); | 113 | virtual void showMainWidget( QWidget* widget, bool nomax = false ); |
110 | 114 | ||
111 | /** | 115 | /** |
112 | * Set the application title. The application title will be concatenated | 116 | * Set the application title. The application title will be concatenated |
113 | * to the application name given in the constructor. | 117 | * to the application name given in the constructor. |
114 | * | 118 | * |
115 | * @param title the title. If not given, resets caption to appname | 119 | * @param title the title. If not given, resets caption to appname |
116 | */ | 120 | */ |
117 | virtual void setTitle( QString title = QString::null ) const; | 121 | virtual void setTitle( const QString& title = QString::null ) const; |
118 | //virtual void setTitle() const; | 122 | //virtual void setTitle() const; |
119 | 123 | ||
120 | protected: | 124 | protected: |
121 | void init(); | 125 | void init(); |
122 | 126 | ||
123 | private: | 127 | private: |
124 | const QCString _appname; | 128 | const QCString _appname; |
125 | static OApplication* _instance; | 129 | static OApplication* _instance; |
126 | OConfig* _config; | 130 | OConfig* _config; |
127 | OApplicationPrivate* d; | 131 | OApplicationPrivate* d; |
128 | }; | 132 | }; |
129 | 133 | ||
130 | #endif // OAPPLICATION_H | 134 | #endif // OAPPLICATION_H |
diff --git a/libopie2/opiecore/oglobal.h b/libopie2/opiecore/oglobal.h index 8345c6a..34f211e 100644 --- a/libopie2/opiecore/oglobal.h +++ b/libopie2/opiecore/oglobal.h | |||
@@ -24,25 +24,26 @@ | |||
24 | -_. . . )=. = Library General Public License along with | 24 | -_. . . )=. = Library General Public License along with |
25 | -- :-=` this library; see the file COPYING.LIB. | 25 | -- :-=` this library; see the file COPYING.LIB. |
26 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
27 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
28 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #ifndef OGLOBAL_H | 31 | #ifndef OGLOBAL_H |
32 | #define OGLOBAL_H | 32 | #define OGLOBAL_H |
33 | 33 | ||
34 | #include <qpe/global.h> | 34 | #include <qpe/global.h> |
35 | #include <opie2/oconfig.h> | 35 | #include <opie2/oconfig.h> |
36 | 36 | ||
37 | static OConfig globalconfig = OConfig( "global" ); | 37 | static OConfig globalconfig = OConfig( "global" ); |
38 | 38 | ||
39 | //FIXME: Is it wise or even necessary to inherit OGlobal from Global? | 39 | //FIXME: Is it wise or even necessary to inherit OGlobal from Global? |
40 | // once we totally skip libqpe it should ideally swallow Global -zecke | ||
40 | 41 | ||
41 | class OGlobal : public Global | 42 | class OGlobal : public Global |
42 | { | 43 | { |
43 | public: | 44 | public: |
44 | 45 | // do we want to put that into OApplication as in KApplication -zecke | |
45 | static OConfig* config(); | 46 | static OConfig* config(); |
46 | }; | 47 | }; |
47 | 48 | ||
48 | #endif // OGLOBAL_H | 49 | #endif // OGLOBAL_H |
diff --git a/libopie2/opiecore/oglobalsettings.h b/libopie2/opiecore/oglobalsettings.h index 6481251..d3f357e 100644 --- a/libopie2/opiecore/oglobalsettings.h +++ b/libopie2/opiecore/oglobalsettings.h | |||
@@ -34,32 +34,33 @@ | |||
34 | 34 | ||
35 | #include <qstring.h> | 35 | #include <qstring.h> |
36 | #include <qcolor.h> | 36 | #include <qcolor.h> |
37 | #include <qfont.h> | 37 | #include <qfont.h> |
38 | 38 | ||
39 | #define OPIE_DEFAULT_SINGLECLICK true | 39 | #define OPIE_DEFAULT_SINGLECLICK true |
40 | #define OPIE_DEFAULT_INSERTTEAROFFHANDLES true | 40 | #define OPIE_DEFAULT_INSERTTEAROFFHANDLES true |
41 | #define OPIE_DEFAULT_AUTOSELECTDELAY -1 | 41 | #define OPIE_DEFAULT_AUTOSELECTDELAY -1 |
42 | #define OPIE_DEFAULT_CHANGECURSOR true | 42 | #define OPIE_DEFAULT_CHANGECURSOR true |
43 | #define OPIE_DEFAULT_LARGE_CURSOR false | 43 | #define OPIE_DEFAULT_LARGE_CURSOR false |
44 | #define OPIE_DEFAULT_VISUAL_ACTIVATE true | 44 | #define OPIE_DEFAULT_VISUAL_ACTIVATE true |
45 | #define OPIE_DEFAULT_VISUAL_ACTIVATE_SPEED 50 | 45 | #define OPIE_DEFAULT_VISUAL_ACTIVATE_SPEED 50 |
46 | 46 | ||
47 | //FIXME: There's still a whole lot of stuff in here which has to be revised | 47 | //FIXME: There's still a whole lot of stuff in here which has to be revised |
48 | //FIXME: before public usage... lack of time to do it at once - so it will | 48 | //FIXME: before public usage... lack of time to do it at once - so it will |
49 | //FIXME: happen step-by-step. ML. | 49 | //FIXME: happen step-by-step. ML. |
50 | // we should not habe too much configure options!!!!!! -zecke | ||
50 | 51 | ||
51 | /** | 52 | /** |
52 | * Access the OPIE global configuration settings. | 53 | * Access the OPIE global configuration settings. |
53 | * | 54 | * |
54 | */ | 55 | */ |
55 | class OGlobalSettings | 56 | class OGlobalSettings |
56 | { | 57 | { |
57 | public: | 58 | public: |
58 | 59 | ||
59 | /** | 60 | /** |
60 | * Returns a threshold in pixels for drag & drop operations. | 61 | * Returns a threshold in pixels for drag & drop operations. |
61 | * As long as the mouse movement has not exceeded this number | 62 | * As long as the mouse movement has not exceeded this number |
62 | * of pixels in either X or Y direction no drag operation may | 63 | * of pixels in either X or Y direction no drag operation may |
63 | * be started. This prevents spurious drags when the user intended | 64 | * be started. This prevents spurious drags when the user intended |
64 | * to click on something but moved the mouse a bit while doing so. | 65 | * to click on something but moved the mouse a bit while doing so. |
65 | * | 66 | * |
@@ -86,47 +87,49 @@ class OGlobalSettings | |||
86 | * if(newPos.x() > mOldPos.x()+delay || newPos.x() < mOldPos.x()-delay || | 87 | * if(newPos.x() > mOldPos.x()+delay || newPos.x() < mOldPos.x()-delay || |
87 | * newPos.y() > mOldPos.y()+delay || newPos.y() < mOldPos.y()-delay) | 88 | * newPos.y() > mOldPos.y()+delay || newPos.y() < mOldPos.y()-delay) |
88 | * { | 89 | * { |
89 | * // Drag color object | 90 | * // Drag color object |
90 | * int cell = posToCell(mOldPos); // Find color at mOldPos | 91 | * int cell = posToCell(mOldPos); // Find color at mOldPos |
91 | * if ((cell != -1) && colors[cell].isValid()) | 92 | * if ((cell != -1) && colors[cell].isValid()) |
92 | * { | 93 | * { |
93 | * OColorDrag *d = OColorDrag::makeDrag( colors[cell], this); | 94 | * OColorDrag *d = OColorDrag::makeDrag( colors[cell], this); |
94 | * d->dragCopy(); | 95 | * d->dragCopy(); |
95 | * } | 96 | * } |
96 | * } | 97 | * } |
97 | * } | 98 | * } |
98 | * </pre> | 99 | * </pre> |
99 | * | 100 | * |
100 | */ | 101 | */ |
101 | 102 | ||
103 | // we do not support DND at the momemt -zecke | ||
102 | static int dndEventDelay(); | 104 | static int dndEventDelay(); |
103 | 105 | ||
104 | /** | 106 | /** |
105 | * Returns whether OPIE runs in single (default) or double click | 107 | * Returns whether OPIE runs in single (default) or double click |
106 | * mode. | 108 | * mode. |
107 | * | 109 | * |
108 | * @return @p true if single click mode, or @p false if double click mode. | 110 | * @return @p true if single click mode, or @p false if double click mode. |
109 | * | 111 | * |
110 | * see @ref http://opie.handhelds.org/documentation/standards/opie/style/mouse/index.html | 112 | * see @ref http://opie.handhelds.org/documentation/standards/opie/style/mouse/index.html |
111 | **/ | 113 | **/ |
112 | static bool singleClick(); | 114 | static bool singleClick(); |
113 | 115 | ||
114 | /** | 116 | /** |
115 | * Returns whether tear-off handles are inserted in OPopupMenus. | 117 | * Returns whether tear-off handles are inserted in OPopupMenus. |
116 | **/ | 118 | **/ |
119 | // would clutter the small screen -zecke | ||
117 | static bool insertTearOffHandle(); | 120 | static bool insertTearOffHandle(); |
118 | 121 | ||
119 | /** | 122 | /** |
120 | * @return the OPIE setting for "change cursor over icon" | 123 | * @return the OPIE setting for "change cursor over icon" |
121 | */ | 124 | */ |
122 | static bool changeCursorOverIcon(); | 125 | static bool changeCursorOverIcon(); |
123 | 126 | ||
124 | /** | 127 | /** |
125 | * @return whether to show some feedback when an item (specifically an | 128 | * @return whether to show some feedback when an item (specifically an |
126 | * icon) is activated. | 129 | * icon) is activated. |
127 | */ | 130 | */ |
128 | static bool visualActivate(); | 131 | static bool visualActivate(); |
129 | static unsigned int visualActivateSpeed(); | 132 | static unsigned int visualActivateSpeed(); |
130 | 133 | ||
131 | /** | 134 | /** |
132 | * Returns the OPIE setting for the auto-select option | 135 | * Returns the OPIE setting for the auto-select option |
@@ -238,42 +241,44 @@ class OGlobalSettings | |||
238 | * This is a structure containing the possible mouse settings. | 241 | * This is a structure containing the possible mouse settings. |
239 | */ | 242 | */ |
240 | struct OMouseSettings | 243 | struct OMouseSettings |
241 | { | 244 | { |
242 | enum { RightHanded = 0, LeftHanded = 1 }; | 245 | enum { RightHanded = 0, LeftHanded = 1 }; |
243 | int handed; // left or right | 246 | int handed; // left or right |
244 | }; | 247 | }; |
245 | 248 | ||
246 | /** | 249 | /** |
247 | * This returns the current mouse settings. | 250 | * This returns the current mouse settings. |
248 | */ | 251 | */ |
249 | static OMouseSettings & mouseSettings(); | 252 | static OMouseSettings & mouseSettings(); |
250 | 253 | ||
251 | /** | 254 | /** |
252 | * The path to the desktop directory of the current user. | 255 | * The path to the desktop directory of the current user. |
253 | */ | 256 | */ |
257 | // below handled by Global stuff and QPEApplication | ||
254 | static QString desktopPath() { initStatic(); return *s_desktopPath; } | 258 | static QString desktopPath() { initStatic(); return *s_desktopPath; } |
255 | 259 | ||
256 | /** | 260 | /** |
257 | * The path to the autostart directory of the current user. | 261 | * The path to the autostart directory of the current user. |
258 | */ | 262 | */ |
259 | static QString autostartPath() { initStatic(); return *s_autostartPath; } | 263 | static QString autostartPath() { initStatic(); return *s_autostartPath; } |
260 | 264 | ||
261 | /** | 265 | /** |
262 | * The path to the trash directory of the current user. | 266 | * The path to the trash directory of the current user. |
263 | */ | 267 | */ |
268 | // we do not have that concept -zecke | ||
264 | static QString trashPath() { initStatic(); return *s_trashPath; } | 269 | static QString trashPath() { initStatic(); return *s_trashPath; } |
265 | 270 | ||
266 | /** | 271 | /** |
267 | * The path where documents are stored of the current user. | 272 | * The path where documents are stored of the current user. |
268 | */ | 273 | */ |
269 | static QString documentPath() { initStatic(); return *s_documentPath; } | 274 | static QString documentPath() { initStatic(); return *s_documentPath; } |
270 | 275 | ||
271 | 276 | ||
272 | /** | 277 | /** |
273 | * The default color to use when highlighting toolbar buttons | 278 | * The default color to use when highlighting toolbar buttons |
274 | */ | 279 | */ |
275 | static QColor toolBarHighlightColor(); | 280 | static QColor toolBarHighlightColor(); |
276 | static QColor inactiveTitleColor(); | 281 | static QColor inactiveTitleColor(); |
277 | static QColor inactiveTextColor(); | 282 | static QColor inactiveTextColor(); |
278 | static QColor activeTitleColor(); | 283 | static QColor activeTitleColor(); |
279 | static QColor activeTextColor(); | 284 | static QColor activeTextColor(); |
diff --git a/libopie2/opienet/omanufacturerdb.h b/libopie2/opienet/omanufacturerdb.h index 5e66c37..cb0b6c8 100644 --- a/libopie2/opienet/omanufacturerdb.h +++ b/libopie2/opienet/omanufacturerdb.h | |||
@@ -8,30 +8,31 @@ | |||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | **********************************************************************/ | 14 | **********************************************************************/ |
15 | 15 | ||
16 | #ifndef OMANUFACTURERDB_H | 16 | #ifndef OMANUFACTURERDB_H |
17 | #define OMANUFACTURERDB_H | 17 | #define OMANUFACTURERDB_H |
18 | 18 | ||
19 | #include <qmap.h> | 19 | #include <qmap.h> |
20 | 20 | ||
21 | class OManufacturerDB | 21 | class OManufacturerDB |
22 | { | 22 | { |
23 | public: | 23 | public: |
24 | //FIXME make us consistent -zecke I use self(), sandman inst() you use instance() so we need to chose one! | ||
24 | static OManufacturerDB* instance(); | 25 | static OManufacturerDB* instance(); |
25 | const QString& lookup( const QString& macaddr ) const; | 26 | const QString& lookup( const QString& macaddr ) const; |
26 | 27 | ||
27 | protected: | 28 | protected: |
28 | OManufacturerDB(); | 29 | OManufacturerDB(); |
29 | virtual ~OManufacturerDB(); | 30 | virtual ~OManufacturerDB(); |
30 | 31 | ||
31 | private: | 32 | private: |
32 | QMap<QString, QString> manufacturers; | 33 | QMap<QString, QString> manufacturers; |
33 | static OManufacturerDB* _instance; | 34 | static OManufacturerDB* _instance; |
34 | }; | 35 | }; |
35 | 36 | ||
36 | #endif | 37 | #endif |
37 | 38 | ||
diff --git a/libopie2/opienet/onetutils.h b/libopie2/opienet/onetutils.h index bedea63..9611518 100644 --- a/libopie2/opienet/onetutils.h +++ b/libopie2/opienet/onetutils.h | |||
@@ -37,41 +37,43 @@ | |||
37 | #include <qstring.h> | 37 | #include <qstring.h> |
38 | #include <qhostaddress.h> | 38 | #include <qhostaddress.h> |
39 | #include <qobject.h> | 39 | #include <qobject.h> |
40 | 40 | ||
41 | #include <sys/types.h> | 41 | #include <sys/types.h> |
42 | 42 | ||
43 | struct ifreq; | 43 | struct ifreq; |
44 | class OWirelessNetworkInterface; | 44 | class OWirelessNetworkInterface; |
45 | 45 | ||
46 | /*====================================================================================== | 46 | /*====================================================================================== |
47 | * OMacAddress | 47 | * OMacAddress |
48 | *======================================================================================*/ | 48 | *======================================================================================*/ |
49 | 49 | ||
50 | class OMacAddress | 50 | class OMacAddress |
51 | { | 51 | { |
52 | public: | 52 | public: |
53 | // QString c'tor? -zecke | ||
53 | OMacAddress( unsigned char* ); | 54 | OMacAddress( unsigned char* ); |
54 | OMacAddress( const unsigned char* ); | 55 | OMacAddress( const unsigned char* ); |
55 | OMacAddress( struct ifreq& ); | 56 | OMacAddress( struct ifreq& ); |
56 | ~OMacAddress(); | 57 | ~OMacAddress(); |
57 | 58 | ||
58 | QString manufacturer() const; | 59 | QString manufacturer() const; |
59 | QString toString( bool substitute = false ) const; | 60 | QString toString( bool substitute = false ) const; |
60 | const unsigned char* native() const; | 61 | const unsigned char* native() const; |
61 | 62 | ||
63 | // no c'tor but this one why not make it a c'tor. it could also replace the others or is this the problem? | ||
62 | static OMacAddress fromString( const QString& ); | 64 | static OMacAddress fromString( const QString& ); |
63 | 65 | ||
64 | public: | 66 | public: |
65 | static const OMacAddress& broadcast; // ff:ff:ff:ff:ff:ff | 67 | static const OMacAddress& broadcast; // ff:ff:ff:ff:ff:ff |
66 | static const OMacAddress& unknown; // 44:44:44:44:44:44 | 68 | static const OMacAddress& unknown; // 44:44:44:44:44:44 |
67 | 69 | ||
68 | private: | 70 | private: |
69 | unsigned char _bytes[6]; | 71 | unsigned char _bytes[6]; |
70 | 72 | ||
71 | friend bool operator==( const OMacAddress &m1, const OMacAddress &m2 ); | 73 | friend bool operator==( const OMacAddress &m1, const OMacAddress &m2 ); |
72 | 74 | ||
73 | }; | 75 | }; |
74 | 76 | ||
75 | bool operator==( const OMacAddress &m1, const OMacAddress &m2 ); | 77 | bool operator==( const OMacAddress &m1, const OMacAddress &m2 ); |
76 | 78 | ||
77 | 79 | ||
@@ -89,32 +91,33 @@ class OHostAddress : public QHostAddress | |||
89 | 91 | ||
90 | /*====================================================================================== | 92 | /*====================================================================================== |
91 | * OPrivateIOCTL | 93 | * OPrivateIOCTL |
92 | *======================================================================================*/ | 94 | *======================================================================================*/ |
93 | 95 | ||
94 | class OPrivateIOCTL : public QObject | 96 | class OPrivateIOCTL : public QObject |
95 | { | 97 | { |
96 | public: | 98 | public: |
97 | OPrivateIOCTL( QObject* parent, const char* name, int cmd, int getargs, int setargs ); | 99 | OPrivateIOCTL( QObject* parent, const char* name, int cmd, int getargs, int setargs ); |
98 | ~OPrivateIOCTL(); | 100 | ~OPrivateIOCTL(); |
99 | 101 | ||
100 | int numberGetArgs() const; | 102 | int numberGetArgs() const; |
101 | int typeGetArgs() const; | 103 | int typeGetArgs() const; |
102 | int numberSetArgs() const; | 104 | int numberSetArgs() const; |
103 | int typeSetArgs() const; | 105 | int typeSetArgs() const; |
104 | 106 | ||
107 | // FIXME return int? as ::ioctl does? -zecke | ||
105 | void invoke() const; | 108 | void invoke() const; |
106 | void setParameter( int, u_int32_t ); | 109 | void setParameter( int, u_int32_t ); |
107 | 110 | ||
108 | private: | 111 | private: |
109 | u_int32_t _ioctl; | 112 | u_int32_t _ioctl; |
110 | u_int16_t _getargs; | 113 | u_int16_t _getargs; |
111 | u_int16_t _setargs; | 114 | u_int16_t _setargs; |
112 | 115 | ||
113 | }; | 116 | }; |
114 | 117 | ||
115 | /*====================================================================================== | 118 | /*====================================================================================== |
116 | * Miscellaneous | 119 | * Miscellaneous |
117 | *======================================================================================*/ | 120 | *======================================================================================*/ |
118 | 121 | ||
119 | /* dump bytes */ | 122 | /* dump bytes */ |
120 | 123 | ||
diff --git a/libopie2/opienet/onetwork.cpp b/libopie2/opienet/onetwork.cpp index 73b543b..f0094c7 100644 --- a/libopie2/opienet/onetwork.cpp +++ b/libopie2/opienet/onetwork.cpp | |||
@@ -95,33 +95,33 @@ void ONetwork::synchronize() | |||
95 | ONetworkInterface* iface; | 95 | ONetworkInterface* iface; |
96 | if ( isWirelessInterface( str ) ) | 96 | if ( isWirelessInterface( str ) ) |
97 | { | 97 | { |
98 | iface = new OWirelessNetworkInterface( this, (const char*) str ); | 98 | iface = new OWirelessNetworkInterface( this, (const char*) str ); |
99 | qDebug( "ONetwork: interface '%s' has Wireless Extensions", (const char*) str ); | 99 | qDebug( "ONetwork: interface '%s' has Wireless Extensions", (const char*) str ); |
100 | } | 100 | } |
101 | else | 101 | else |
102 | { | 102 | { |
103 | iface = new ONetworkInterface( this, (const char*) str ); | 103 | iface = new ONetworkInterface( this, (const char*) str ); |
104 | } | 104 | } |
105 | _interfaces.insert( str, iface ); | 105 | _interfaces.insert( str, iface ); |
106 | s.readLine(); | 106 | s.readLine(); |
107 | } | 107 | } |
108 | } | 108 | } |
109 | 109 | ||
110 | 110 | ||
111 | ONetworkInterface* ONetwork::interface( QString iface ) const | 111 | ONetworkInterface* ONetwork::interface( const QString& iface ) const |
112 | { | 112 | { |
113 | return _interfaces[iface]; | 113 | return _interfaces[iface]; |
114 | } | 114 | } |
115 | 115 | ||
116 | 116 | ||
117 | ONetwork* ONetwork::instance() | 117 | ONetwork* ONetwork::instance() |
118 | { | 118 | { |
119 | if ( !_instance ) _instance = new ONetwork(); | 119 | if ( !_instance ) _instance = new ONetwork(); |
120 | return _instance; | 120 | return _instance; |
121 | } | 121 | } |
122 | 122 | ||
123 | 123 | ||
124 | ONetwork::InterfaceIterator ONetwork::iterator() const | 124 | ONetwork::InterfaceIterator ONetwork::iterator() const |
125 | { | 125 | { |
126 | return ONetwork::InterfaceIterator( _interfaces ); | 126 | return ONetwork::InterfaceIterator( _interfaces ); |
127 | } | 127 | } |
diff --git a/libopie2/opienet/onetwork.h b/libopie2/opienet/onetwork.h index d2cc25d..db8e702 100644 --- a/libopie2/opienet/onetwork.h +++ b/libopie2/opienet/onetwork.h | |||
@@ -85,38 +85,40 @@ class ONetwork : public QObject | |||
85 | public: | 85 | public: |
86 | typedef QDict<ONetworkInterface> InterfaceMap; | 86 | typedef QDict<ONetworkInterface> InterfaceMap; |
87 | typedef QDictIterator<ONetworkInterface> InterfaceIterator; | 87 | typedef QDictIterator<ONetworkInterface> InterfaceIterator; |
88 | 88 | ||
89 | public: | 89 | public: |
90 | /** | 90 | /** |
91 | * @returns a pointer to the (one and only) @ref ONetwork instance. | 91 | * @returns a pointer to the (one and only) @ref ONetwork instance. |
92 | */ | 92 | */ |
93 | static ONetwork* instance(); | 93 | static ONetwork* instance(); |
94 | /** | 94 | /** |
95 | * @returns an iterator usable for iterating through all network interfaces. | 95 | * @returns an iterator usable for iterating through all network interfaces. |
96 | */ | 96 | */ |
97 | InterfaceIterator iterator() const; | 97 | InterfaceIterator iterator() const; |
98 | /** | 98 | /** |
99 | * @returns true, if the @p interface supports the wireless extension protocol. | 99 | * @returns true, if the @p interface supports the wireless extension protocol. |
100 | */ | 100 | */ |
101 | // FIXME QString? -zecke | ||
101 | bool isWirelessInterface( const char* interface ) const; | 102 | bool isWirelessInterface( const char* interface ) const; |
102 | /** | 103 | /** |
103 | * @returns a pointer to the @ref ONetworkInterface object for the specified @p interface or 0, if not found | 104 | * @returns a pointer to the @ref ONetworkInterface object for the specified @p interface or 0, if not found |
104 | * @see ONetworkInterface | 105 | * @see ONetworkInterface |
105 | */ | 106 | */ |
106 | ONetworkInterface* interface( QString interface ) const; | 107 | // FIXME: const QString& is prefered over QString!!! -zecke |
108 | ONetworkInterface* interface( const QString& interface ) const; | ||
107 | 109 | ||
108 | protected: | 110 | protected: |
109 | ONetwork(); | 111 | ONetwork(); |
110 | void synchronize(); | 112 | void synchronize(); |
111 | 113 | ||
112 | private: | 114 | private: |
113 | static ONetwork* _instance; | 115 | static ONetwork* _instance; |
114 | InterfaceMap _interfaces; | 116 | InterfaceMap _interfaces; |
115 | }; | 117 | }; |
116 | 118 | ||
117 | 119 | ||
118 | /*====================================================================================== | 120 | /*====================================================================================== |
119 | * ONetworkInterface | 121 | * ONetworkInterface |
120 | *======================================================================================*/ | 122 | *======================================================================================*/ |
121 | 123 | ||
122 | /** | 124 | /** |
diff --git a/libopie2/opienet/opcap.h b/libopie2/opienet/opcap.h index 99631ba..6bf7416 100644 --- a/libopie2/opienet/opcap.h +++ b/libopie2/opienet/opcap.h | |||
@@ -55,365 +55,375 @@ extern "C" // work around a bpf/pcap conflict in recent headers | |||
55 | 55 | ||
56 | /* OPIE */ | 56 | /* OPIE */ |
57 | #include <opie2/onetutils.h> | 57 | #include <opie2/onetutils.h> |
58 | #include "802_11_user.h" | 58 | #include "802_11_user.h" |
59 | 59 | ||
60 | /* TYPEDEFS */ | 60 | /* TYPEDEFS */ |
61 | typedef struct timeval timevalstruct; | 61 | typedef struct timeval timevalstruct; |
62 | typedef struct pcap_pkthdr packetheaderstruct; | 62 | typedef struct pcap_pkthdr packetheaderstruct; |
63 | 63 | ||
64 | /* FORWARDS */ | 64 | /* FORWARDS */ |
65 | class OPacketCapturer; | 65 | class OPacketCapturer; |
66 | class QSocketNotifier; | 66 | class QSocketNotifier; |
67 | 67 | ||
68 | /*====================================================================================== | 68 | /*====================================================================================== |
69 | * OPacket - A frame on the wire | 69 | * OPacket - A frame on the wire |
70 | *======================================================================================*/ | 70 | *======================================================================================*/ |
71 | 71 | // FIXME how many OPackets do we've at a time? QObject seams to be a big for that usage | |
72 | class OPacket : public QObject | 72 | class OPacket : public QObject |
73 | { | 73 | { |
74 | Q_OBJECT | 74 | Q_OBJECT |
75 | 75 | ||
76 | public: | 76 | public: |
77 | OPacket( int datalink, packetheaderstruct, const unsigned char*, QObject* parent ); | 77 | OPacket( int datalink, packetheaderstruct, const unsigned char*, QObject* parent ); |
78 | virtual ~OPacket(); | 78 | virtual ~OPacket(); |
79 | 79 | ||
80 | timevalstruct timeval() const; | 80 | timevalstruct timeval() const; |
81 | 81 | ||
82 | int caplen() const; | 82 | int caplen() const; |
83 | int len() const; | 83 | int len() const; |
84 | QString dump( int = 32 ) const; | 84 | QString dump( int = 32 ) const; |
85 | 85 | ||
86 | void updateStats( QMap<QString,int>&, QObjectList* ); | 86 | void updateStats( QMap<QString,int>&, QObjectList* ); |
87 | 87 | ||
88 | private: | 88 | private: |
89 | const packetheaderstruct _hdr; // pcap packet header | 89 | const packetheaderstruct _hdr; // pcap packet header |
90 | const unsigned char* _data; // pcap packet data | 90 | const unsigned char* _data; // pcap packet data |
91 | const unsigned char* _end; // end of pcap packet data | 91 | const unsigned char* _end; // end of pcap packet data |
92 | }; | 92 | }; |
93 | 93 | ||
94 | /*====================================================================================== | 94 | /*====================================================================================== |
95 | * OEthernetPacket - DLT_EN10MB frame | 95 | * OEthernetPacket - DLT_EN10MB frame |
96 | *======================================================================================*/ | 96 | *======================================================================================*/ |
97 | 97 | ||
98 | //FIXME same critic as above -zecke | ||
98 | class OEthernetPacket : public QObject | 99 | class OEthernetPacket : public QObject |
99 | { | 100 | { |
100 | Q_OBJECT | 101 | Q_OBJECT |
101 | 102 | ||
102 | public: | 103 | public: |
103 | OEthernetPacket( const unsigned char*, const struct ether_header*, QObject* parent = 0 ); | 104 | OEthernetPacket( const unsigned char*, const struct ether_header*, QObject* parent = 0 ); |
104 | virtual ~OEthernetPacket(); | 105 | virtual ~OEthernetPacket(); |
105 | 106 | ||
106 | OMacAddress sourceAddress() const; | 107 | OMacAddress sourceAddress() const; |
107 | OMacAddress destinationAddress() const; | 108 | OMacAddress destinationAddress() const; |
108 | int type() const; | 109 | int type() const; |
109 | 110 | ||
110 | private: | 111 | private: |
111 | const struct ether_header* _ether; | 112 | const struct ether_header* _ether; |
112 | }; | 113 | }; |
113 | 114 | ||
114 | 115 | ||
115 | /*====================================================================================== | 116 | /*====================================================================================== |
116 | * OWaveLanPacket - DLT_IEEE802_11 frame | 117 | * OWaveLanPacket - DLT_IEEE802_11 frame |
117 | *======================================================================================*/ | 118 | *======================================================================================*/ |
118 | 119 | //FIXME same | |
119 | class OWaveLanPacket : public QObject | 120 | class OWaveLanPacket : public QObject |
120 | { | 121 | { |
121 | Q_OBJECT | 122 | Q_OBJECT |
122 | 123 | ||
123 | public: | 124 | public: |
124 | OWaveLanPacket( const unsigned char*, const struct ieee_802_11_header*, QObject* parent = 0 ); | 125 | OWaveLanPacket( const unsigned char*, const struct ieee_802_11_header*, QObject* parent = 0 ); |
125 | virtual ~OWaveLanPacket(); | 126 | virtual ~OWaveLanPacket(); |
126 | 127 | ||
127 | int duration() const; | 128 | int duration() const; |
128 | bool fromDS() const; | 129 | bool fromDS() const; |
129 | bool toDS() const; | 130 | bool toDS() const; |
130 | virtual OMacAddress macAddress1() const; | 131 | virtual OMacAddress macAddress1() const; |
131 | virtual OMacAddress macAddress2() const; | 132 | virtual OMacAddress macAddress2() const; |
132 | virtual OMacAddress macAddress3() const; | 133 | virtual OMacAddress macAddress3() const; |
133 | virtual OMacAddress macAddress4() const; | 134 | virtual OMacAddress macAddress4() const; |
134 | bool usesPowerManagement() const; | 135 | bool usesPowerManagement() const; |
135 | int type() const; | 136 | int type() const; |
136 | int subType() const; | 137 | int subType() const; |
137 | int version() const; | 138 | int version() const; |
138 | bool usesWep() const; | 139 | bool usesWep() const; |
139 | 140 | ||
140 | private: | 141 | private: |
141 | const struct ieee_802_11_header* _wlanhdr; | 142 | const struct ieee_802_11_header* _wlanhdr; |
142 | }; | 143 | }; |
143 | 144 | ||
144 | 145 | ||
145 | /*====================================================================================== | 146 | /*====================================================================================== |
146 | * OWaveLanManagementPacket - type: management (T_MGMT) | 147 | * OWaveLanManagementPacket - type: management (T_MGMT) |
147 | *======================================================================================*/ | 148 | *======================================================================================*/ |
148 | 149 | //FIXME same as above -zecke | |
149 | class OWaveLanManagementPacket : public QObject | 150 | class OWaveLanManagementPacket : public QObject |
150 | { | 151 | { |
151 | Q_OBJECT | 152 | Q_OBJECT |
152 | 153 | ||
153 | public: | 154 | public: |
154 | OWaveLanManagementPacket( const unsigned char*, const struct ieee_802_11_mgmt_header*, OWaveLanPacket* parent = 0 ); | 155 | OWaveLanManagementPacket( const unsigned char*, const struct ieee_802_11_mgmt_header*, OWaveLanPacket* parent = 0 ); |
155 | virtual ~OWaveLanManagementPacket(); | 156 | virtual ~OWaveLanManagementPacket(); |
156 | 157 | ||
157 | QString managementType() const; | 158 | QString managementType() const; |
158 | 159 | ||
159 | int beaconInterval() const; | 160 | int beaconInterval() const; |
160 | int capabilities() const; // generic | 161 | int capabilities() const; // generic |
161 | 162 | ||
162 | bool canESS() const; | 163 | bool canESS() const; |
163 | bool canIBSS() const; | 164 | bool canIBSS() const; |
164 | bool canCFP() const; | 165 | bool canCFP() const; |
165 | bool canCFP_REQ() const; | 166 | bool canCFP_REQ() const; |
166 | bool canPrivacy() const; | 167 | bool canPrivacy() const; |
167 | 168 | ||
168 | private: | 169 | private: |
169 | const struct ieee_802_11_mgmt_header* _header; | 170 | const struct ieee_802_11_mgmt_header* _header; |
170 | const struct ieee_802_11_mgmt_body* _body; | 171 | const struct ieee_802_11_mgmt_body* _body; |
171 | }; | 172 | }; |
172 | 173 | ||
173 | 174 | ||
174 | /*====================================================================================== | 175 | /*====================================================================================== |
175 | * OWaveLanManagementSSID | 176 | * OWaveLanManagementSSID |
176 | *======================================================================================*/ | 177 | *======================================================================================*/ |
177 | 178 | //FIXME is QObject necessary? -zecke | |
178 | class OWaveLanManagementSSID : public QObject | 179 | class OWaveLanManagementSSID : public QObject |
179 | { | 180 | { |
180 | Q_OBJECT | 181 | Q_OBJECT |
181 | 182 | ||
182 | public: | 183 | public: |
183 | OWaveLanManagementSSID( const unsigned char*, const struct ssid_t*, QObject* parent = 0 ); | 184 | OWaveLanManagementSSID( const unsigned char*, const struct ssid_t*, QObject* parent = 0 ); |
184 | virtual ~OWaveLanManagementSSID(); | 185 | virtual ~OWaveLanManagementSSID(); |
185 | 186 | ||
186 | QString ID() const; | 187 | QString ID() const; |
187 | 188 | ||
188 | private: | 189 | private: |
189 | const struct ssid_t* _data; | 190 | const struct ssid_t* _data; |
190 | }; | 191 | }; |
191 | 192 | ||
192 | /*====================================================================================== | 193 | /*====================================================================================== |
193 | * OWaveLanManagementRates | 194 | * OWaveLanManagementRates |
194 | *======================================================================================*/ | 195 | *======================================================================================*/ |
195 | 196 | // FIXME same as above -zecke | |
196 | class OWaveLanManagementRates : public QObject | 197 | class OWaveLanManagementRates : public QObject |
197 | { | 198 | { |
198 | Q_OBJECT | 199 | Q_OBJECT |
199 | 200 | ||
200 | public: | 201 | public: |
201 | OWaveLanManagementRates( const unsigned char*, const struct rates_t*, QObject* parent = 0 ); | 202 | OWaveLanManagementRates( const unsigned char*, const struct rates_t*, QObject* parent = 0 ); |
202 | virtual ~OWaveLanManagementRates(); | 203 | virtual ~OWaveLanManagementRates(); |
203 | 204 | ||
204 | private: | 205 | private: |
205 | const struct rates_t* _data; | 206 | const struct rates_t* _data; |
206 | }; | 207 | }; |
207 | 208 | ||
208 | /*====================================================================================== | 209 | /*====================================================================================== |
209 | * OWaveLanManagementCF | 210 | * OWaveLanManagementCF |
210 | *======================================================================================*/ | 211 | *======================================================================================*/ |
211 | 212 | ||
213 | //FIXME same.... | ||
212 | class OWaveLanManagementCF : public QObject | 214 | class OWaveLanManagementCF : public QObject |
213 | { | 215 | { |
214 | Q_OBJECT | 216 | Q_OBJECT |
215 | 217 | ||
216 | public: | 218 | public: |
217 | OWaveLanManagementCF( const unsigned char*, const struct cf_t*, QObject* parent = 0 ); | 219 | OWaveLanManagementCF( const unsigned char*, const struct cf_t*, QObject* parent = 0 ); |
218 | virtual ~OWaveLanManagementCF(); | 220 | virtual ~OWaveLanManagementCF(); |
219 | 221 | ||
220 | private: | 222 | private: |
221 | const struct cf_t* _data; | 223 | const struct cf_t* _data; |
222 | }; | 224 | }; |
223 | 225 | ||
224 | /*====================================================================================== | 226 | /*====================================================================================== |
225 | * OWaveLanManagementFH | 227 | * OWaveLanManagementFH |
226 | *======================================================================================*/ | 228 | *======================================================================================*/ |
227 | 229 | ||
230 | //FIXME same | ||
228 | class OWaveLanManagementFH : public QObject | 231 | class OWaveLanManagementFH : public QObject |
229 | { | 232 | { |
230 | Q_OBJECT | 233 | Q_OBJECT |
231 | 234 | ||
232 | public: | 235 | public: |
233 | OWaveLanManagementFH( const unsigned char*, const struct fh_t*, QObject* parent = 0 ); | 236 | OWaveLanManagementFH( const unsigned char*, const struct fh_t*, QObject* parent = 0 ); |
234 | virtual ~OWaveLanManagementFH(); | 237 | virtual ~OWaveLanManagementFH(); |
235 | 238 | ||
236 | private: | 239 | private: |
237 | const struct fh_t* _data; | 240 | const struct fh_t* _data; |
238 | }; | 241 | }; |
239 | 242 | ||
240 | /*====================================================================================== | 243 | /*====================================================================================== |
241 | * OWaveLanManagementDS | 244 | * OWaveLanManagementDS |
242 | *======================================================================================*/ | 245 | *======================================================================================*/ |
243 | 246 | //FIXME same | |
244 | class OWaveLanManagementDS : public QObject | 247 | class OWaveLanManagementDS : public QObject |
245 | { | 248 | { |
246 | Q_OBJECT | 249 | Q_OBJECT |
247 | 250 | ||
248 | public: | 251 | public: |
249 | OWaveLanManagementDS( const unsigned char*, const struct ds_t*, QObject* parent = 0 ); | 252 | OWaveLanManagementDS( const unsigned char*, const struct ds_t*, QObject* parent = 0 ); |
250 | virtual ~OWaveLanManagementDS(); | 253 | virtual ~OWaveLanManagementDS(); |
251 | 254 | ||
252 | int channel() const; | 255 | int channel() const; |
253 | 256 | ||
254 | private: | 257 | private: |
255 | const struct ds_t* _data; | 258 | const struct ds_t* _data; |
256 | }; | 259 | }; |
257 | 260 | ||
258 | /*====================================================================================== | 261 | /*====================================================================================== |
259 | * OWaveLanManagementTim | 262 | * OWaveLanManagementTim |
260 | *======================================================================================*/ | 263 | *======================================================================================*/ |
261 | 264 | ||
265 | //FIXME guess what? | ||
262 | class OWaveLanManagementTim : public QObject | 266 | class OWaveLanManagementTim : public QObject |
263 | { | 267 | { |
264 | Q_OBJECT | 268 | Q_OBJECT |
265 | 269 | ||
266 | public: | 270 | public: |
267 | OWaveLanManagementTim( const unsigned char*, const struct tim_t*, QObject* parent = 0 ); | 271 | OWaveLanManagementTim( const unsigned char*, const struct tim_t*, QObject* parent = 0 ); |
268 | virtual ~OWaveLanManagementTim(); | 272 | virtual ~OWaveLanManagementTim(); |
269 | 273 | ||
270 | private: | 274 | private: |
271 | const struct tim_t* _data; | 275 | const struct tim_t* _data; |
272 | }; | 276 | }; |
273 | 277 | ||
274 | /*====================================================================================== | 278 | /*====================================================================================== |
275 | * OWaveLanManagementIBSS | 279 | * OWaveLanManagementIBSS |
276 | *======================================================================================*/ | 280 | *======================================================================================*/ |
277 | 281 | ||
282 | //FIXME same as above ( Qobject ) | ||
278 | class OWaveLanManagementIBSS : public QObject | 283 | class OWaveLanManagementIBSS : public QObject |
279 | { | 284 | { |
280 | Q_OBJECT | 285 | Q_OBJECT |
281 | 286 | ||
282 | public: | 287 | public: |
283 | OWaveLanManagementIBSS( const unsigned char*, const struct ibss_t*, QObject* parent = 0 ); | 288 | OWaveLanManagementIBSS( const unsigned char*, const struct ibss_t*, QObject* parent = 0 ); |
284 | virtual ~OWaveLanManagementIBSS(); | 289 | virtual ~OWaveLanManagementIBSS(); |
285 | 290 | ||
286 | private: | 291 | private: |
287 | const struct ibss_t* _data; | 292 | const struct ibss_t* _data; |
288 | }; | 293 | }; |
289 | 294 | ||
290 | /*====================================================================================== | 295 | /*====================================================================================== |
291 | * OWaveLanManagementChallenge | 296 | * OWaveLanManagementChallenge |
292 | *======================================================================================*/ | 297 | *======================================================================================*/ |
293 | 298 | ||
299 | // Qobject do we need that?? | ||
294 | class OWaveLanManagementChallenge : public QObject | 300 | class OWaveLanManagementChallenge : public QObject |
295 | { | 301 | { |
296 | Q_OBJECT | 302 | Q_OBJECT |
297 | 303 | ||
298 | public: | 304 | public: |
299 | OWaveLanManagementChallenge( const unsigned char*, const struct challenge_t*, QObject* parent = 0 ); | 305 | OWaveLanManagementChallenge( const unsigned char*, const struct challenge_t*, QObject* parent = 0 ); |
300 | virtual ~OWaveLanManagementChallenge(); | 306 | virtual ~OWaveLanManagementChallenge(); |
301 | 307 | ||
302 | private: | 308 | private: |
303 | const struct challenge_t* _data; | 309 | const struct challenge_t* _data; |
304 | }; | 310 | }; |
305 | 311 | ||
306 | /*====================================================================================== | 312 | /*====================================================================================== |
307 | * OWaveLanDataPacket - type: data (T_DATA) | 313 | * OWaveLanDataPacket - type: data (T_DATA) |
308 | *======================================================================================*/ | 314 | *======================================================================================*/ |
309 | 315 | // Qobject? | |
310 | class OWaveLanDataPacket : public QObject | 316 | class OWaveLanDataPacket : public QObject |
311 | { | 317 | { |
312 | Q_OBJECT | 318 | Q_OBJECT |
313 | 319 | ||
314 | public: | 320 | public: |
315 | OWaveLanDataPacket( const unsigned char*, const struct ieee_802_11_data_header*, OWaveLanPacket* parent = 0 ); | 321 | OWaveLanDataPacket( const unsigned char*, const struct ieee_802_11_data_header*, OWaveLanPacket* parent = 0 ); |
316 | virtual ~OWaveLanDataPacket(); | 322 | virtual ~OWaveLanDataPacket(); |
317 | 323 | ||
318 | private: | 324 | private: |
319 | const struct ieee_802_11_data_header* _header; | 325 | const struct ieee_802_11_data_header* _header; |
320 | }; | 326 | }; |
321 | 327 | ||
322 | /*====================================================================================== | 328 | /*====================================================================================== |
323 | * OWaveLanControlPacket - type: control (T_CTRL) | 329 | * OWaveLanControlPacket - type: control (T_CTRL) |
324 | *======================================================================================*/ | 330 | *======================================================================================*/ |
325 | 331 | // Qobject needed? | |
326 | class OWaveLanControlPacket : public QObject | 332 | class OWaveLanControlPacket : public QObject |
327 | { | 333 | { |
328 | Q_OBJECT | 334 | Q_OBJECT |
329 | 335 | ||
330 | public: | 336 | public: |
331 | OWaveLanControlPacket( const unsigned char*, const struct ieee_802_11_control_header*, OWaveLanPacket* parent = 0 ); | 337 | OWaveLanControlPacket( const unsigned char*, const struct ieee_802_11_control_header*, OWaveLanPacket* parent = 0 ); |
332 | virtual ~OWaveLanControlPacket(); | 338 | virtual ~OWaveLanControlPacket(); |
333 | 339 | ||
334 | private: | 340 | private: |
335 | const struct ieee_802_11_control_header* _header; | 341 | const struct ieee_802_11_control_header* _header; |
336 | }; | 342 | }; |
337 | 343 | ||
338 | /*====================================================================================== | 344 | /*====================================================================================== |
339 | * OLLCPacket - IEEE 802.2 Link Level Control | 345 | * OLLCPacket - IEEE 802.2 Link Level Control |
340 | *======================================================================================*/ | 346 | *======================================================================================*/ |
341 | 347 | ||
348 | // QObject needed? | ||
342 | class OLLCPacket : public QObject | 349 | class OLLCPacket : public QObject |
343 | { | 350 | { |
344 | Q_OBJECT | 351 | Q_OBJECT |
345 | 352 | ||
346 | public: | 353 | public: |
347 | OLLCPacket( const unsigned char*, const struct ieee_802_11_802_2_header* data, QObject* parent = 0 ); | 354 | OLLCPacket( const unsigned char*, const struct ieee_802_11_802_2_header* data, QObject* parent = 0 ); |
348 | virtual ~OLLCPacket(); | 355 | virtual ~OLLCPacket(); |
349 | 356 | ||
350 | private: | 357 | private: |
358 | //FIXME how to get that header? | ||
351 | const struct ieee_802_11_802_2_header* _header; | 359 | const struct ieee_802_11_802_2_header* _header; |
352 | }; | 360 | }; |
353 | 361 | ||
354 | /*====================================================================================== | 362 | /*====================================================================================== |
355 | * OIPPacket | 363 | * OIPPacket |
356 | *======================================================================================*/ | 364 | *======================================================================================*/ |
357 | 365 | ||
366 | // Qobject as baseclass? | ||
358 | class OIPPacket : public QObject | 367 | class OIPPacket : public QObject |
359 | { | 368 | { |
360 | Q_OBJECT | 369 | Q_OBJECT |
361 | 370 | ||
362 | public: | 371 | public: |
363 | OIPPacket( const unsigned char*, const struct iphdr*, QObject* parent = 0 ); | 372 | OIPPacket( const unsigned char*, const struct iphdr*, QObject* parent = 0 ); |
364 | virtual ~OIPPacket(); | 373 | virtual ~OIPPacket(); |
365 | 374 | ||
366 | QHostAddress fromIPAddress() const; | 375 | QHostAddress fromIPAddress() const; |
367 | QHostAddress toIPAddress() const; | 376 | QHostAddress toIPAddress() const; |
368 | 377 | ||
369 | int tos() const; | 378 | int tos() const; |
370 | int len() const; | 379 | int len() const; |
371 | int id() const; | 380 | int id() const; |
372 | int offset() const; | 381 | int offset() const; |
373 | int ttl() const; | 382 | int ttl() const; |
374 | int protocol() const; | 383 | int protocol() const; |
375 | int checksum() const; | 384 | int checksum() const; |
376 | 385 | ||
377 | private: | 386 | private: |
378 | const struct iphdr* _iphdr; | 387 | const struct iphdr* _iphdr; |
379 | }; | 388 | }; |
380 | 389 | ||
381 | /*====================================================================================== | 390 | /*====================================================================================== |
382 | * OUDPPacket | 391 | * OUDPPacket |
383 | *======================================================================================*/ | 392 | *======================================================================================*/ |
384 | 393 | // QObject? | |
385 | class OUDPPacket : public QObject | 394 | class OUDPPacket : public QObject |
386 | { | 395 | { |
387 | Q_OBJECT | 396 | Q_OBJECT |
388 | 397 | ||
389 | public: | 398 | public: |
390 | OUDPPacket( const unsigned char*, const struct udphdr*, QObject* parent = 0 ); | 399 | OUDPPacket( const unsigned char*, const struct udphdr*, QObject* parent = 0 ); |
391 | virtual ~OUDPPacket(); | 400 | virtual ~OUDPPacket(); |
392 | 401 | ||
393 | int fromPort() const; | 402 | int fromPort() const; |
394 | int toPort() const; | 403 | int toPort() const; |
395 | 404 | ||
396 | private: | 405 | private: |
397 | const struct udphdr* _udphdr; | 406 | const struct udphdr* _udphdr; |
398 | }; | 407 | }; |
399 | 408 | ||
400 | /*====================================================================================== | 409 | /*====================================================================================== |
401 | * OTCPPacket | 410 | * OTCPPacket |
402 | *======================================================================================*/ | 411 | *======================================================================================*/ |
403 | 412 | ||
413 | // Qobect needed? | ||
404 | class OTCPPacket : public QObject | 414 | class OTCPPacket : public QObject |
405 | { | 415 | { |
406 | Q_OBJECT | 416 | Q_OBJECT |
407 | 417 | ||
408 | public: | 418 | public: |
409 | OTCPPacket( const unsigned char*, const struct tcphdr*, QObject* parent = 0 ); | 419 | OTCPPacket( const unsigned char*, const struct tcphdr*, QObject* parent = 0 ); |
410 | virtual ~OTCPPacket(); | 420 | virtual ~OTCPPacket(); |
411 | 421 | ||
412 | int fromPort() const; | 422 | int fromPort() const; |
413 | int toPort() const; | 423 | int toPort() const; |
414 | 424 | ||
415 | private: | 425 | private: |
416 | const struct tcphdr* _tcphdr; | 426 | const struct tcphdr* _tcphdr; |
417 | }; | 427 | }; |
418 | 428 | ||
419 | 429 | ||
diff --git a/libopie2/opieui/odialog.h b/libopie2/opieui/odialog.h index 7947dfb..4116ed7 100644 --- a/libopie2/opieui/odialog.h +++ b/libopie2/opieui/odialog.h | |||
@@ -38,51 +38,52 @@ class QLayoutItem; | |||
38 | 38 | ||
39 | /** | 39 | /** |
40 | * Dialog with extended nonmodal support and methods for OPIE standard | 40 | * Dialog with extended nonmodal support and methods for OPIE standard |
41 | * compliance. | 41 | * compliance. |
42 | * | 42 | * |
43 | * The @ref marginHint() and @ref spacingHint() sizes shall be used | 43 | * The @ref marginHint() and @ref spacingHint() sizes shall be used |
44 | * whenever you layout the interior of a dialog. One special note. If | 44 | * whenever you layout the interior of a dialog. One special note. If |
45 | * you make your own action buttons (OK, Cancel etc), the space | 45 | * you make your own action buttons (OK, Cancel etc), the space |
46 | * beteween the buttons shall be @ref spacingHint(), whereas the space | 46 | * beteween the buttons shall be @ref spacingHint(), whereas the space |
47 | * above, below, to the right and to the left shall be @ref marginHint(). | 47 | * above, below, to the right and to the left shall be @ref marginHint(). |
48 | * If you add a separator line above the buttons, there shall be a | 48 | * If you add a separator line above the buttons, there shall be a |
49 | * @ref marginHint() between the buttons and the separator and a | 49 | * @ref marginHint() between the buttons and the separator and a |
50 | * @ref marginHint() above the separator as well. | 50 | * @ref marginHint() above the separator as well. |
51 | * | 51 | * |
52 | * @author Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> | 52 | * @author Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> |
53 | */ | 53 | */ |
54 | // lets fix up Qt instead! Size does matter. -zecke | ||
54 | 55 | ||
55 | class ODialog : public QDialog | 56 | class ODialog : public QDialog |
56 | { | 57 | { |
57 | Q_OBJECT | 58 | Q_OBJECT |
58 | 59 | ||
59 | public: | 60 | public: |
60 | 61 | ||
61 | /** | 62 | /** |
62 | * Constructor. | 63 | * Constructor. |
63 | * | 64 | * |
64 | * Takes the same arguments as @ref QDialog. | 65 | * Takes the same arguments as @ref QDialog. |
65 | */ | 66 | */ |
66 | ODialog(QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags f = 0); | 67 | ODialog(QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags f = 0); |
67 | 68 | ||
68 | /** | 69 | /** |
69 | * Return the number of pixels you shall use between a | 70 | * Return the number of pixels you shall use between a |
70 | * dialog edge and the outermost widget(s) according to the KDE standard. | 71 | * dialog edge and the outermost widget(s) according to the KDE standard. |
71 | **/ | 72 | **/ |
72 | static int marginHint(); | 73 | static int marginHint(); |
73 | 74 | ||
74 | /** | 75 | /** |
75 | * Return the number of pixels you shall use between | 76 | * Return the number of pixels you shall use between |
76 | * widgets inside a dialog according to the KDE standard. | 77 | * widgets inside a dialog according to the KDE standard. |
77 | */ | 78 | */ |
78 | static int spacingHint(); | 79 | static int spacingHint(); |
79 | 80 | ||
80 | private: | 81 | private: |
81 | static int mMarginSize; | 82 | static int mMarginSize; |
82 | static int mSpacingSize; | 83 | static int mSpacingSize; |
83 | 84 | ||
84 | //class ODialogPrivate; | 85 | class ODialogPrivate; |
85 | //ODialogPrivate *d; | 86 | ODialogPrivate *d; // d pointer always needed! -zecke |
86 | 87 | ||
87 | }; | 88 | }; |
88 | #endif // ODIALOG_H | 89 | #endif // ODIALOG_H |
diff --git a/libopie2/opieui/oimageeffect.h b/libopie2/opieui/oimageeffect.h index 313ea50..fb4d22d 100644 --- a/libopie2/opieui/oimageeffect.h +++ b/libopie2/opieui/oimageeffect.h | |||
@@ -1,18 +1,19 @@ | |||
1 | //FIXME: Revise for Opie - do we really need such fancy stuff on PDA's? | 1 | //FIXME: Revise for Opie - do we really need such fancy stuff on PDA's? |
2 | //FIXME: Maybe not on SL5xxx, but surely on C700 :)) | 2 | //FIXME: Maybe not on SL5xxx, but surely on C700 :)) |
3 | //FIXME: I think we don#t need that -zecke | ||
3 | 4 | ||
4 | /* This file is part of the KDE libraries | 5 | /* This file is part of the KDE libraries |
5 | Copyright (C) 1998, 1999, 2001, 2002 Daniel M. Duley <mosfet@interaccess.com> | 6 | Copyright (C) 1998, 1999, 2001, 2002 Daniel M. Duley <mosfet@interaccess.com> |
6 | (C) 1998, 1999 Christian Tibirna <ctibirna@total.net> | 7 | (C) 1998, 1999 Christian Tibirna <ctibirna@total.net> |
7 | (C) 1998, 1999 Dirk A. Mueller <mueller@kde.org> | 8 | (C) 1998, 1999 Dirk A. Mueller <mueller@kde.org> |
8 | 9 | ||
9 | Redistribution and use in source and binary forms, with or without | 10 | Redistribution and use in source and binary forms, with or without |
10 | modification, are permitted provided that the following conditions | 11 | modification, are permitted provided that the following conditions |
11 | are met: | 12 | are met: |
12 | 13 | ||
13 | 1. Redistributions of source code must retain the above copyright | 14 | 1. Redistributions of source code must retain the above copyright |
14 | notice, this list of conditions and the following disclaimer. | 15 | notice, this list of conditions and the following disclaimer. |
15 | 2. Redistributions in binary form must reproduce the above copyright | 16 | 2. Redistributions in binary form must reproduce the above copyright |
16 | notice, this list of conditions and the following disclaimer in the | 17 | notice, this list of conditions and the following disclaimer in the |
17 | documentation and/or other materials provided with the distribution. | 18 | documentation and/or other materials provided with the distribution. |
18 | 19 | ||
diff --git a/libopie2/opieui/olistview.h b/libopie2/opieui/olistview.h index bafc67c..b62e278 100644 --- a/libopie2/opieui/olistview.h +++ b/libopie2/opieui/olistview.h | |||
@@ -106,45 +106,45 @@ class OListViewItem; | |||
106 | /** | 106 | /** |
107 | * @return the alternate background color | 107 | * @return the alternate background color |
108 | */ | 108 | */ |
109 | const QColor& alternateBackground() const; | 109 | const QColor& alternateBackground() const; |
110 | 110 | ||
111 | /** | 111 | /** |
112 | * @return the column separator pen | 112 | * @return the column separator pen |
113 | */ | 113 | */ |
114 | const QPen& columnSeparator() const; | 114 | const QPen& columnSeparator() const; |
115 | 115 | ||
116 | /** | 116 | /** |
117 | * create a list view item as child of this object | 117 | * create a list view item as child of this object |
118 | * @return the new object | 118 | * @return the new object |
119 | */ | 119 | */ |
120 | virtual OListViewItem* childFactory(); | 120 | virtual OListViewItem* childFactory(); |
121 | 121 | ||
122 | #ifndef QT_NO_DATASTREAM | 122 | #ifndef QT_NO_DATASTREAM |
123 | /** | 123 | /** |
124 | * serialize this object to a @ref QDataStream | 124 | * serialize this object to a @ref QDataStream |
125 | * @param s the stream used to serialize this object. | 125 | * @param s the stream used to serialize this object. |
126 | */ | 126 | */ |
127 | virtual void serializeTo( QDataStream& s ) const; | 127 | virtual void serializeTo( QDataStream& s ) const; |
128 | 128 | ||
129 | /** | 129 | /** |
130 | * serialize this object from a @ref QDataStream | 130 | * serialize this object from a @ref QDataStream |
131 | * @param s the stream used to serialize this object. | 131 | * @param s the stream used to serialize this object. |
132 | */ | 132 | */ |
133 | virtual void serializeFrom( QDataStream& s ); | 133 | virtual void serializeFrom( QDataStream& s ); |
134 | #endif | 134 | #endif |
135 | 135 | ||
136 | private: | 136 | private: |
137 | QColor m_alternateBackground; | 137 | QColor m_alternateBackground; |
138 | bool m_fullWidth; | 138 | bool m_fullWidth; |
139 | QPen m_columnSeparator; | 139 | QPen m_columnSeparator; |
140 | }; | 140 | }; |
141 | 141 | ||
142 | #ifndef QT_NO_DATASTREAM | 142 | #ifndef QT_NO_DATASTREAM |
143 | /** | 143 | /** |
144 | * \relates QListView | 144 | * \relates QListView |
145 | * Writes a listview to the stream and returns a reference to the stream. | 145 | * Writes a listview to the stream and returns a reference to the stream. |
146 | */ | 146 | */ |
147 | QDataStream& operator<<( QDataStream& s, const OListView& lv ); | 147 | QDataStream& operator<<( QDataStream& s, const OListView& lv ); |
148 | /** | 148 | /** |
149 | * \relates QListView | 149 | * \relates QListView |
150 | * Reads a listview from the stream and returns a reference to the stream. | 150 | * Reads a listview from the stream and returns a reference to the stream. |
diff --git a/libopie2/opieui/opopupmenu.h b/libopie2/opieui/opopupmenu.h index 94f05f4..54e4301 100644 --- a/libopie2/opieui/opopupmenu.h +++ b/libopie2/opieui/opopupmenu.h | |||
@@ -1,16 +1,19 @@ | |||
1 | //FIXME what is ODE? ODE Desktop Environemt? -zecke | ||
2 | //FIXME do we need titles? space is limited that is only eyecandy? -zecke | ||
3 | //FIXME keyboard navigation is also not that popular on a PDA might be with a keyboard (tuxphone) -zecke | ||
1 | /* This file is part of the ODE libraries | 4 | /* This file is part of the ODE libraries |
2 | Copyright (C) 2000 Daniel M. Duley <mosfet@kde.org> | 5 | Copyright (C) 2000 Daniel M. Duley <mosfet@kde.org> |
3 | 6 | ||
4 | This library is free software; you can redistribute it and/or | 7 | This library is free software; you can redistribute it and/or |
5 | modify it under the terms of the GNU Library General Public | 8 | modify it under the terms of the GNU Library General Public |
6 | License version 2 as published by the Free Software Foundation. | 9 | License version 2 as published by the Free Software Foundation. |
7 | 10 | ||
8 | This library is distributed in the hope that it will be useful, | 11 | This library is distributed in the hope that it will be useful, |
9 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
11 | Library General Public License for more details. | 14 | Library General Public License for more details. |
12 | 15 | ||
13 | You should have received a copy of the GNU Library General Public License | 16 | You should have received a copy of the GNU Library General Public License |
14 | along with this library; see the file COPYING.LIB. If not, write to | 17 | along with this library; see the file COPYING.LIB. If not, write to |
15 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 18 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
16 | Boston, MA 02111-1307, USA. | 19 | Boston, MA 02111-1307, USA. |
diff --git a/libopie2/qt3/opiecore/opair.h b/libopie2/qt3/opiecore/opair.h index 26f617d..a151127 100644 --- a/libopie2/qt3/opiecore/opair.h +++ b/libopie2/qt3/opiecore/opair.h | |||
@@ -1,18 +1,19 @@ | |||
1 | // QPair minus QT_INLINE_TEMPLATE (instead directly using 'inline' directive) | 1 | // QPair minus QT_INLINE_TEMPLATE (instead directly using 'inline' directive) |
2 | //FIXME: remove and use qpair.h as soon as we're on Qt3 | 2 | //FIXME: remove and use qpair.h as soon as we're on Qt3 |
3 | // name file qpair -zecke | ||
3 | 4 | ||
4 | /**************************************************************************** | 5 | /**************************************************************************** |
5 | ** | 6 | ** |
6 | ** Definition of QPair class | 7 | ** Definition of QPair class |
7 | ** | 8 | ** |
8 | ** | 9 | ** |
9 | ** Copyright (C) 1992-2001 Trolltech AS. All rights reserved. | 10 | ** Copyright (C) 1992-2001 Trolltech AS. All rights reserved. |
10 | ** | 11 | ** |
11 | ** This file is part of the tools module of the Qt GUI Toolkit. | 12 | ** This file is part of the tools module of the Qt GUI Toolkit. |
12 | ** | 13 | ** |
13 | ** This file may be distributed under the terms of the Q Public License | 14 | ** This file may be distributed under the terms of the Q Public License |
14 | ** as defined by Trolltech AS of Norway and appearing in the file | 15 | ** as defined by Trolltech AS of Norway and appearing in the file |
15 | ** LICENSE.QPL included in the packaging of this file. | 16 | ** LICENSE.QPL included in the packaging of this file. |
16 | ** | 17 | ** |
17 | ** This file may be distributed and/or modified under the terms of the | 18 | ** This file may be distributed and/or modified under the terms of the |
18 | ** GNU General Public License version 2 as published by the Free Software | 19 | ** GNU General Public License version 2 as published by the Free Software |