
#include "hwdata.h"

int main( int argc, char **argv )
{
    HWData db;

    if ( !db.open( "/home/lstteam/sh/Videocards.new" ) )
    {
        qDebug( "error opening db." );
        return 1;
    }

    uint vendorIndex = db.indexOfKey( "Server" );

    for ( uint i = 0; i < db.count(); ++i )
    {
        if ( vendorIndex >= db[ i ].count() )
        {
		qDebug( "line %i : %i out of bounds for %i", i, vendorIndex, db[ i ].count() );
                HWDataEntry lst = db[ i ];
                HWDataEntry::ConstIterator it = lst.begin();
                HWDataEntry::ConstIterator end = lst.end();
                for (; it != end; ++it )
                    qDebug( "%s", (*it).ascii() );
        }
        else
        	qDebug( "Vendor: %s", db[ i ][ vendorIndex ].ascii() );
    }
}
