Qt 4.8
Classes | Macros | Functions
qbbengine.cpp File Reference
#include "qbbengine.h"
#include "../qnetworksession_impl.h"
#include <QDebug>
#include <QThreadStorage>
#include <QStringList>
#include <QTimer>
#include <bps/netstatus.h>

Go to the source code of this file.

Classes

struct  EngineInstanceHolder
 
struct  NetstatusInterfaceCleanupHelper
 
struct  NetstatusInterfaceListCleanupHelper
 

Macros

#define qBearerDebug   QT_NO_QDEBUG_MACRO
 

Functions

static QString idForName (const QString &name)
 
static QNetworkConfiguration::BearerType interfaceType (netstatus_interface_type_t type)
 
 Q_GLOBAL_STATIC (QThreadStorage< EngineInstanceHolder *>, instanceStorage)
 

Macro Definition Documentation

◆ qBearerDebug

#define qBearerDebug   QT_NO_QDEBUG_MACRO

Function Documentation

◆ idForName()

static QString idForName ( const QString name)
static

Definition at line 116 of file qbbengine.cpp.

Referenced by QBBEngine::defaultConfiguration(), QBBEngine::doRequestUpdate(), and QBBEngine::updateConfiguration().

117 {
118  return QLatin1String("bps:") + name;
119 }
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
const char * name

◆ interfaceType()

static QNetworkConfiguration::BearerType interfaceType ( netstatus_interface_type_t  type)
static

Definition at line 87 of file qbbengine.cpp.

Referenced by QBBEngine::updateConfiguration().

88 {
89  switch (type) {
90  case NETSTATUS_INTERFACE_TYPE_USB:
91  case NETSTATUS_INTERFACE_TYPE_WIRED:
93 
94  case NETSTATUS_INTERFACE_TYPE_WIFI:
96 
97  case NETSTATUS_INTERFACE_TYPE_BLUETOOTH_DUN:
99 
100  case NETSTATUS_INTERFACE_TYPE_CELLULAR:
101  //### TODO not sure which BearerType would be the best
102  //to return here. We need to be able to get more
103  //information on the bearer type in order to return
104  //the exact match.
106 
107  case NETSTATUS_INTERFACE_TYPE_VPN:
108  case NETSTATUS_INTERFACE_TYPE_BB:
109  case NETSTATUS_INTERFACE_TYPE_UNKNOWN:
110  break;
111  }
112 
114 }
int type
Definition: qmetatype.cpp:239

◆ Q_GLOBAL_STATIC()

Q_GLOBAL_STATIC ( QThreadStorage< EngineInstanceHolder *>  ,
instanceStorage   
)