author | mickeyl <mickeyl> | 2004-08-09 13:30:13 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-08-09 13:30:13 (UTC) |
commit | a0527fcaa0b530df47f654333b2c9476d3072022 (patch) (side-by-side diff) | |
tree | d1ae514ed31af4642b477a01f260adaf1a1a9a7c | |
parent | 0784cfdbd261c43856b45be6ab7439841e69b858 (diff) | |
download | opie-a0527fcaa0b530df47f654333b2c9476d3072022.zip opie-a0527fcaa0b530df47f654333b2c9476d3072022.tar.gz opie-a0527fcaa0b530df47f654333b2c9476d3072022.tar.bz2 |
- adjust headers
- kill a warning
-rw-r--r-- | libopie2/opienet/omanufacturerdb.cpp | 4 | ||||
-rw-r--r-- | libopie2/opienet/omanufacturerdb.h | 4 | ||||
-rw-r--r-- | libopie2/opienet/onetutils.cpp | 2 |
3 files changed, 3 insertions, 7 deletions
diff --git a/libopie2/opienet/omanufacturerdb.cpp b/libopie2/opienet/omanufacturerdb.cpp index 209ec94..3003e12 100644 --- a/libopie2/opienet/omanufacturerdb.cpp +++ b/libopie2/opienet/omanufacturerdb.cpp @@ -1,76 +1,74 @@ /* This file is part of the Opie Project - (C) 2003 Michael 'Mickey' Lauer <mickey@Vanille.de> - =. + =. (C) 2003-2004 Michael 'Mickey' Lauer <mickey@Vanille.de> .=l. .>+-= _;:, .> :=|. This program is free software; you can .> <`_, > . <= redistribute it and/or modify it under :`=1 )Y*s>-.-- : the terms of the GNU Library General Public .="- .-=="i, .._ License as published by the Free Software - . .-<_> .<> Foundation; either version 2 of the License, ._= =} : or (at your option) any later version. .%`+i> _;_. .i_,=:_. -<s. This program is distributed in the hope that + . -:. = it will be useful, but WITHOUT ANY WARRANTY; : .. .:, . . . without even the implied warranty of =_ + =;=|` MERCHANTABILITY or FITNESS FOR A _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU ..}^=.= = ; Library General Public License for more ++= -. .` .: details. : = ...= . :.=- -. .:....=;==+<; You should have received a copy of the GNU -_. . . )=. = Library General Public License along with -- :-=` this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ #include "omanufacturerdb.h" #define OPIE_IMPROVE_GUI_LATENCY 1 /* OPIE */ #include <opie2/odebug.h> #ifdef OPIE_IMPROVE_GUI_LATENCY #include <qpe/global.h> #endif /* QT */ #include <qapplication.h> #include <qfile.h> #include <qtextstream.h> using namespace Opie::Core; namespace Opie { namespace Net { OManufacturerDB* OManufacturerDB::_instance = 0; OManufacturerDB* OManufacturerDB::instance() { if ( !OManufacturerDB::_instance ) { odebug << "OManufacturerDB::instance(): creating OManufacturerDB..." << oendl; _instance = new OManufacturerDB(); } return _instance; } OManufacturerDB::OManufacturerDB() { #ifdef OPIE_IMPROVE_GUI_LATENCY Global::statusMessage( "Reading Manufacturers..." ); #endif QString filename( "/etc/manufacturers" ); odebug << "OManufacturerDB: trying to read " << filename << oendl; if ( !QFile::exists( filename ) ) { filename = "/opt/QtPalmtop/etc/manufacturers"; odebug << "OManufacturerDB: trying to read " << filename << oendl; if ( !QFile::exists( filename ) ) { filename = "/usr/share/wellenreiter/manufacturers"; diff --git a/libopie2/opienet/omanufacturerdb.h b/libopie2/opienet/omanufacturerdb.h index 5c1940e..c667e20 100644 --- a/libopie2/opienet/omanufacturerdb.h +++ b/libopie2/opienet/omanufacturerdb.h @@ -1,76 +1,74 @@ /* This file is part of the Opie Project - (C) 2003 Michael 'Mickey' Lauer <mickey@Vanille.de> - =. + =. (C) 2003-2004 Michael 'Mickey' Lauer <mickey@Vanille.de> .=l. .>+-= _;:, .> :=|. This program is free software; you can .> <`_, > . <= redistribute it and/or modify it under :`=1 )Y*s>-.-- : the terms of the GNU Library General Public .="- .-=="i, .._ License as published by the Free Software - . .-<_> .<> Foundation; either version 2 of the License, ._= =} : or (at your option) any later version. .%`+i> _;_. .i_,=:_. -<s. This program is distributed in the hope that + . -:. = it will be useful, but WITHOUT ANY WARRANTY; : .. .:, . . . without even the implied warranty of =_ + =;=|` MERCHANTABILITY or FITNESS FOR A _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU ..}^=.= = ; Library General Public License for more ++= -. .` .: details. : = ...= . :.=- -. .:....=;==+<; You should have received a copy of the GNU -_. . . )=. = Library General Public License along with -- :-=` this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ #ifndef OMANUFACTURERDB_H #define OMANUFACTURERDB_H #include <qmap.h> namespace Opie { namespace Net { /** * @brief A Ethernet card vendor database. * * This class encapsulates the lookup of Ethernet vendor given a * certain Mac Address. Only the first three bytes define the vendor. */ class OManufacturerDB { public: /** * @returns the one-and-only @ref OManufacturerDB instance. */ static OManufacturerDB* instance(); /** * @returns the short manufacturer string given a @a macaddr. */ const QString& lookup( const QString& macaddr ) const; /** * @returns the enhanced manufacturer string given a @a macaddr. */ const QString& lookupExt( const QString& macaddr ) const; protected: OManufacturerDB(); virtual ~OManufacturerDB(); private: QMap<QString, QString> manufacturers; QMap<QString, QString> manufacturersExt; static OManufacturerDB* _instance; class Private; Private *d; }; } } #endif diff --git a/libopie2/opienet/onetutils.cpp b/libopie2/opienet/onetutils.cpp index c185805..047a704 100644 --- a/libopie2/opienet/onetutils.cpp +++ b/libopie2/opienet/onetutils.cpp @@ -152,90 +152,90 @@ OPrivateIOCTL::~OPrivateIOCTL() } int OPrivateIOCTL::numberGetArgs() const { return _getargs & IW_PRIV_SIZE_MASK; } int OPrivateIOCTL::typeGetArgs() const { return _getargs & IW_PRIV_TYPE_MASK >> 12; } int OPrivateIOCTL::numberSetArgs() const { return _setargs & IW_PRIV_SIZE_MASK; } int OPrivateIOCTL::typeSetArgs() const { return _setargs & IW_PRIV_TYPE_MASK >> 12; } void OPrivateIOCTL::invoke() const { ( (OWirelessNetworkInterface*) parent() )->wioctl( _ioctl ); } void OPrivateIOCTL::setParameter( int num, u_int32_t value ) { u_int32_t* arglist = (u_int32_t*) &( (OWirelessNetworkInterface*) parent() )->_iwr.u.name; arglist[num] = value; } namespace Internal { /*====================================================================================== * assorted functions *======================================================================================*/ void dumpBytes( const unsigned char* data, int num ) { - printf( "Dumping %d bytes @ %0x", num, data ); + printf( "Dumping %d bytes @ 0x%p", num, data ); printf( "-------------------------------------------\n" ); for ( int i = 0; i < num; ++i ) { printf( "%02x ", data[i] ); if ( !((i+1) % 32) ) printf( "\n" ); } printf( "\n\n" ); } int stringToMode( const QString& mode ) { if ( mode == "auto" ) return IW_MODE_AUTO; else if ( mode == "adhoc" ) return IW_MODE_ADHOC; else if ( mode == "managed" ) return IW_MODE_INFRA; else if ( mode == "master" ) return IW_MODE_MASTER; else if ( mode == "repeater" ) return IW_MODE_REPEAT; else if ( mode == "secondary" ) return IW_MODE_SECOND; else if ( mode == "monitor" ) return IW_MODE_MONITOR; else assert( 0 ); } QString modeToString( int mode ) { switch ( mode ) { case IW_MODE_AUTO: return "auto"; case IW_MODE_ADHOC: return "adhoc"; case IW_MODE_INFRA: return "managed"; case IW_MODE_MASTER: return "master"; case IW_MODE_REPEAT: return "repeater"; case IW_MODE_SECOND: return "second"; case IW_MODE_MONITOR: return "monitor"; default: assert( 0 ); } } } } } |