From 487971af0c1b70babcc39fd549dc0d8142cd4865 Mon Sep 17 00:00:00 2001 From: mickeyl Date: Thu, 03 Apr 2003 23:46:04 +0000 Subject: first part of private IOCTL API for OWirelessNetworkInterface implemented --- (limited to 'libopie2/opienet/onetwork.cpp') diff --git a/libopie2/opienet/onetwork.cpp b/libopie2/opienet/onetwork.cpp index 2548a04..66fa215 100644 --- a/libopie2/opienet/onetwork.cpp +++ b/libopie2/opienet/onetwork.cpp @@ -52,6 +52,7 @@ #include #include #include +#include using namespace std; @@ -582,6 +583,38 @@ QString OWirelessNetworkInterface::nickName() const } +void OWirelessNetworkInterface::setPrivate( const QString& call, int numargs, ... ) +{ + OPrivateIOCTL* priv = static_cast( child( (const char*) call ) ); + if ( !priv ) + { + qDebug( "OWirelessNetworkInterface::setPrivate(): interface '%s' does not support private ioctl '%s'", name(), (const char*) call ); + return; + } + if ( priv->numberSetArgs() != numargs ) + { + qDebug( "OWirelessNetworkInterface::setPrivate(): parameter count not matching. '%s' expects %d arguments, but got %d", (const char*) call, priv->numberSetArgs(), numargs ); + return; + } + + qDebug( "OWirelessNetworkInterface::setPrivate(): about to call '%s' on interface '%s'", (const char*) call, name() ); + memset( &_iwr, 0, sizeof _iwr ); + va_list argp; + va_start( argp, numargs ); + for ( int i = 0; i < numargs; ++i ) + { + priv->setParameter( i, va_arg( argp, int ) ); + } + va_end( argp ); + priv->invoke(); +} + + +void OWirelessNetworkInterface::getPrivate( const QString& call ) +{ +} + + QString OWirelessNetworkInterface::SSID() const { char str[IW_ESSID_MAX_SIZE]; -- cgit v0.9.0.2