Diffstat (limited to 'libopie2/opienet/omanufacturerdb.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opienet/omanufacturerdb.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libopie2/opienet/omanufacturerdb.cpp b/libopie2/opienet/omanufacturerdb.cpp index b93b752..209ec94 100644 --- a/libopie2/opienet/omanufacturerdb.cpp +++ b/libopie2/opienet/omanufacturerdb.cpp | |||
@@ -34,24 +34,28 @@ | |||
34 | 34 | ||
35 | /* OPIE */ | 35 | /* OPIE */ |
36 | #include <opie2/odebug.h> | 36 | #include <opie2/odebug.h> |
37 | #ifdef OPIE_IMPROVE_GUI_LATENCY | 37 | #ifdef OPIE_IMPROVE_GUI_LATENCY |
38 | #include <qpe/global.h> | 38 | #include <qpe/global.h> |
39 | #endif | 39 | #endif |
40 | 40 | ||
41 | /* QT */ | 41 | /* QT */ |
42 | #include <qapplication.h> | 42 | #include <qapplication.h> |
43 | #include <qfile.h> | 43 | #include <qfile.h> |
44 | #include <qtextstream.h> | 44 | #include <qtextstream.h> |
45 | 45 | ||
46 | using namespace Opie::Core; | ||
47 | namespace Opie { | ||
48 | namespace Net { | ||
49 | |||
46 | OManufacturerDB* OManufacturerDB::_instance = 0; | 50 | OManufacturerDB* OManufacturerDB::_instance = 0; |
47 | 51 | ||
48 | OManufacturerDB* OManufacturerDB::instance() | 52 | OManufacturerDB* OManufacturerDB::instance() |
49 | { | 53 | { |
50 | if ( !OManufacturerDB::_instance ) | 54 | if ( !OManufacturerDB::_instance ) |
51 | { | 55 | { |
52 | odebug << "OManufacturerDB::instance(): creating OManufacturerDB..." << oendl; | 56 | odebug << "OManufacturerDB::instance(): creating OManufacturerDB..." << oendl; |
53 | _instance = new OManufacturerDB(); | 57 | _instance = new OManufacturerDB(); |
54 | } | 58 | } |
55 | return _instance; | 59 | return _instance; |
56 | } | 60 | } |
57 | 61 | ||
@@ -124,12 +128,15 @@ OManufacturerDB::~OManufacturerDB() | |||
124 | const QString& OManufacturerDB::lookup( const QString& macaddr ) const | 128 | const QString& OManufacturerDB::lookup( const QString& macaddr ) const |
125 | { | 129 | { |
126 | return manufacturers[macaddr.upper().left(8)]; | 130 | return manufacturers[macaddr.upper().left(8)]; |
127 | } | 131 | } |
128 | 132 | ||
129 | 133 | ||
130 | const QString& OManufacturerDB::lookupExt( const QString& macaddr ) const | 134 | const QString& OManufacturerDB::lookupExt( const QString& macaddr ) const |
131 | { | 135 | { |
132 | QMap<QString,QString>::ConstIterator it = manufacturersExt.find( macaddr.upper().left(8) ); | 136 | QMap<QString,QString>::ConstIterator it = manufacturersExt.find( macaddr.upper().left(8) ); |
133 | return it == manufacturersExt.end() ? lookup( macaddr ) : *it; | 137 | return it == manufacturersExt.end() ? lookup( macaddr ) : *it; |
134 | } | 138 | } |
135 | 139 | ||
140 | } | ||
141 | } | ||
142 | |||