[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/work/~wstephens/solid-control-refactor/control
From: Will Stephenson <wstephenson () kde ! org>
Date: 2008-04-05 19:44:35
Message-ID: 1207424675.875473.3186.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 793969 by wstephens:
Merge with trunk up to r793884
M +1 -1 CMakeLists.txt
M +4 -0 backends/fakebluetooth/fakebluetoothinterface.h
M +2 -0 backends/fakebluetooth/solid_fakebluetooth.desktop
M +2 -2 backends/fakenet/solid_fakenet.desktop
M +12 -2 bluetoothinterface.cpp
M +9 -2 bluetoothinterface.h
M +23 -5 bluetoothmanager.cpp
M +1 -1 ifaces/CMakeLists.txt
M +9 -2 ifaces/bluetoothinterface.h
M +2 -1 powermanager.h
M +2 -2 solidbluetoothmanager.desktop
M +2 -1 solidnetworkmanager.desktop
M +2 -2 solidpowermanager.desktop
--- branches/work/~wstephens/solid-control-refactor/control/CMakeLists.txt \
#793968:793969 @@ -38,7 +38,7 @@
target_link_libraries(solidcontrol ${KDE4_KDECORE_LIBS} ${KDE4_SOLID_LIBS} \
solidcontrolifaces )
set_target_properties(solidcontrol PROPERTIES VERSION ${GENERIC_LIB_VERSION} \
SOVERSION ${GENERIC_LIB_SOVERSION} )
-install(TARGETS solidcontrol DESTINATION ${LIB_INSTALL_DIR} )
+install(TARGETS solidcontrol ${INSTALL_TARGETS_DEFAULT_ARGS} )
########### install files ###############
--- branches/work/~wstephens/solid-control-refactor/control/backends/fakebluetooth/fakebluetoothinterface.h \
#793968:793969 @@ -108,6 +108,10 @@
{
return mName;
}
+ QString getRemoteName(const QString &mac)
+ {
+ return "";
+ }
QStringList listBondings() const
{
return mBondings;
--- branches/work/~wstephens/solid-control-refactor/control/backends/fakebluetooth/solid_fakebluetooth.desktop \
#793968:793969 @@ -46,6 +46,7 @@
Name[sr]=Лажни блутут
Name[sr@latin]=Lažni Bluetooth
Name[sv]=Blåtandstest
+Name[th]=บลูทูธเทียม
Name[tr]=Sahte Bluetooth
Name[uk]=Фальшивий Bluetooth
Name[vi]=Bluetooth giả
@@ -98,6 +99,7 @@
Comment[sr]=Управљање лажним блутутом
Comment[sr@latin]=Upravljanje lažnim Bluetoothom
Comment[sv]=Blåtandshanteringstest
+Comment[th]=การจัดการบลูทูธเทียม
Comment[tr]=Sahte Bluetooth Yönetimi
Comment[uk]=Керування фальшивим Bluetooth
Comment[vi]=Quản lý Bluetooth giả
--- branches/work/~wstephens/solid-control-refactor/control/backends/fakenet/solid_fakenet.desktop \
#793968:793969 @@ -39,7 +39,7 @@
Name[pl]=Nieprawdziwa sieć
Name[pt]=Rede Falsa
Name[pt_BR]=Rede Falsa
-Name[ro]=Reţea falsă
+Name[ro]=Rețea falsă
Name[se]=Mahkáš-fierpmádat
Name[sl]=Lažno omrežje
Name[sr]=Лажна мрежа
@@ -92,7 +92,7 @@
Comment[pl]=Nieprawdziwe zarządzanie siecią
Comment[pt]=Gestão da Rede Falsa
Comment[pt_BR]=Gerenciamento de Rede Falsa
-Comment[ro]=Management de reţea fals
+Comment[ro]=Management de rețea fals
Comment[se]=Mahkáš-fierpmádat-gieđahallan
Comment[sl]=Upravljanje z lažnimi omrežji
Comment[sr]=Управљање лажном мрежом
--- branches/work/~wstephens/solid-control-refactor/control/bluetoothinterface.cpp \
#793968:793969 @@ -112,8 +112,14 @@
}
}
-Solid::Control::BluetoothRemoteDevice * \
Solid::Control::BluetoothInterface::createBluetoothRemoteDevice(const QString & ubi) \
+Solid::Control::BluetoothRemoteDevice * \
Solid::Control::BluetoothInterface::createBluetoothRemoteDevice(const QString \
&address) {
+ QString ubi;
+ if (address.startsWith("/org/bluez"))
+ ubi = address;
+ else
+ ubi = this->ubi() + "/" + address;
+
QPair<BluetoothRemoteDevice *, Ifaces::BluetoothRemoteDevice *> pair = \
d->findRegisteredBluetoothRemoteDevice(ubi); return pair.first;
@@ -200,6 +206,11 @@
return_SOLID_CALL(Ifaces::BluetoothInterface *, d->backendObject(), QString(), \
name()); }
+QString Solid::Control::BluetoothInterface::getRemoteName(const QString &mac)
+{
+ return_SOLID_CALL(Ifaces::BluetoothInterface *, d->backendObject(), QString(), \
getRemoteName(mac)); +}
+
QStringList Solid::Control::BluetoothInterface::listBondings() const
{
return_SOLID_CALL(Ifaces::BluetoothInterface *, d->backendObject(), \
QStringList(), listBondings()); @@ -254,7 +265,6 @@
void Solid::Control::BluetoothInterface::discoverDevices()
{
- kDebug() ;
SOLID_CALL(Ifaces::BluetoothInterface *, d->backendObject(), discoverDevices());
}
--- branches/work/~wstephens/solid-control-refactor/control/bluetoothinterface.h \
#793968:793969 @@ -104,12 +104,12 @@
QString ubi() const;
/**
- * Create new BluetoothRemoteDevice object from this interface given its UBI.
+ * Create new BluetoothRemoteDevice object from this interface given its \
address.
*
* @param ubi the identifier of the bluetooth device to instantiate
* @returns a bluetooth object, if a bluetooth device having the given UBI, for \
this interface exists, 0 otherwise
*/
- BluetoothRemoteDevice *createBluetoothRemoteDevice(const QString & ubi);
+ BluetoothRemoteDevice *createBluetoothRemoteDevice(const QString &address);
/**
* Finds a BluetoothRemoteDevice object given its UBI.
@@ -230,6 +230,13 @@
QString name() const;
/**
+ * Returns the name of the remote device, given its mac address (mac).
+ *
+ * @return the name of the remote device
+ */
+ QString getRemoteName(const QString & mac);
+
+ /**
* List UBIs of bonded/paired remote bluetooth devices with this bluetooth
* interface/adapter.
*
--- branches/work/~wstephens/solid-control-refactor/control/bluetoothmanager.cpp \
#793968:793969 @@ -165,6 +165,23 @@
}
}
+Solid::Control::BluetoothInputDevice* \
Solid::Control::BluetoothManager::createBluetoothInputDevice(const QString &ubi) +{
+ Ifaces::BluetoothManager *backend = qobject_cast<Ifaces::BluetoothManager \
*>(d->managerBackend()); + Ifaces::BluetoothInputDevice *iface = 0;
+ if (backend != 0) {
+ iface = qobject_cast<Ifaces::BluetoothInputDevice \
*>(backend->createBluetoothInputDevice(ubi)); + }
+ if (iface != 0) {
+ BluetoothInputDevice *device = new BluetoothInputDevice(iface);
+ return device;
+
+ } else {
+ return &d->invalidInputDevice;
+ }
+
+}
+
KJob *Solid::Control::BluetoothManager::setupInputDevice(const QString &ubi)
{
return_SOLID_CALL(Ifaces::BluetoothManager *, d->managerBackend(), 0, \
setupInputDevice(ubi)); @@ -180,14 +197,12 @@
QStringList ubis = backend->bluetoothInputDevices();
foreach (const QString &ubi, ubis) {
- QPair<BluetoothInputDevice *, Ifaces::BluetoothInputDevice *> pair =
- d->findRegisteredBluetoothInputDevice(ubi);
-
+ QPair<BluetoothInputDevice *, Ifaces::BluetoothInputDevice *> pair = \
d->findRegisteredBluetoothInputDevice(ubi); +
if (pair.first != 0) {
list.append(*pair.first);
}
}
-
return list;
}
@@ -326,6 +341,7 @@
QPair<Solid::Control::BluetoothInputDevice *, \
Solid::Control::Ifaces::BluetoothInputDevice *> \
Solid::Control::BluetoothManagerPrivate::findRegisteredBluetoothInputDevice(const \
QString &ubi) const {
+
if (bluetoothInputDeviceMap.contains(ubi)) {
return bluetoothInputDeviceMap[ubi];
} else {
@@ -333,7 +349,7 @@
Ifaces::BluetoothInputDevice *iface = 0;
if (backend != 0) {
- iface = qobject_cast<Ifaces::BluetoothInputDevice \
*>(backend->createBluetoothInputDevice(ubi)); + iface = \
qobject_cast<Ifaces::BluetoothInputDevice \
*>(backend->createBluetoothInputDevice(ubi)); }
if (iface != 0) {
@@ -350,4 +366,6 @@
}
+
+
#include "bluetoothmanager.moc"
--- branches/work/~wstephens/solid-control-refactor/control/ifaces/CMakeLists.txt \
#793968:793969 @@ -28,7 +28,7 @@
target_link_libraries(solidcontrolifaces ${KDE4_KDECORE_LIBS} )
set_target_properties(solidcontrolifaces PROPERTIES VERSION ${GENERIC_LIB_VERSION} \
SOVERSION ${GENERIC_LIB_SOVERSION} )
-install(TARGETS solidcontrolifaces DESTINATION ${LIB_INSTALL_DIR} )
+install(TARGETS solidcontrolifaces ${INSTALL_TARGETS_DEFAULT_ARGS} )
########### install files ###############
--- branches/work/~wstephens/solid-control-refactor/control/ifaces/bluetoothinterface.h \
#793968:793969 @@ -175,6 +175,13 @@
virtual QString name() const = 0;
/**
+ * Returns the name of the remote device, given its mac address (mac).
+ *
+ * @return the name of the remote device
+ */
+ virtual QString getRemoteName(const QString & mac) = 0;
+
+ /**
* List UBIs of bonded/paired remote bluetooth devices with this bluetooth
* interface/adapter.
*
@@ -282,12 +289,12 @@
virtual void setPeriodicDiscoveryNameResolving(bool resolveNames) = 0;
/**
- * Instantiates a new BluetoothRemoteDevice object from this backend given its \
UBI. + * Instantiates a new BluetoothRemoteDevice object from this backend given \
its address.
*
* @param ubi the identifier of the bluetooth remote device instantiated
* @returns a new BluetoothRemoteDevice object if there's a device having the \
given UBI, 0 otherwise
*/
- virtual QObject *createBluetoothRemoteDevice(const QString &ubi) = 0;
+ virtual QObject *createBluetoothRemoteDevice(const QString &address) = 0;
Q_SIGNALS:
--- branches/work/~wstephens/solid-control-refactor/control/powermanager.h \
#793968:793969 @@ -94,11 +94,12 @@
*
* - UnknownCpuFreqPolicy: The name says it all
* - OnDemand: Frequency is changed by the kernel depending on the processor \
load + * - Conservative: Frequency is changed by the kernel depending on the \
processor load; the stepping is less aggressive than OnDemand. This may be \
equivalent to OnDemand depending on the operating system.
* - Userspace: Frequency is changed by a userspace agent depending on the \
processor load
* - Powersave: Frequency is always set to the lowest available
* - Performance: Frequency is always set to the highest available
*/
- enum CpuFreqPolicy{ UnknownCpuFreqPolicy = 0, OnDemand = 1, Userspace = 2, \
Powersave = 4, Performance = 8 }; + enum CpuFreqPolicy{ UnknownCpuFreqPolicy = \
0, OnDemand = 1, Userspace = 2, Powersave = 4, Performance = 8, Conservative = 16 }; \
/**
* This type stores an OR combination of CpuFreqPolicy values.
--- branches/work/~wstephens/solid-control-refactor/control/solidbluetoothmanager.desktop \
#793968:793969 @@ -40,13 +40,13 @@
Comment[pl]=Usługa zarządzania połączeniami Bluetooth
Comment[pt]=Infra-Estrutura de Gestão do Bluetooth
Comment[pt_BR]=Infra-estrutura do Gerenciamento de Bluetooth
-Comment[ro]=Backend pentru management bluetooth
+Comment[ro]=Suport pentru administrare bluetooth
Comment[se]=Bluetooth-gieđahallanmohtor
Comment[sl]=Hrbtenica za upravljanje z Bluetooth
Comment[sr]=Позадина за управљање блутутом
Comment[sr@latin]=Pozadina za upravljanje Bluetoothom
Comment[sv]=Blåtandshanteringsgränssnitt
-Comment[th]=โปรแกรมเบื้องหลังในการจัดการบลูทูธ
+Comment[th]=โปรแกรมเบื้องหลังการจัดการบลูทูธ
Comment[tr]=Bluetooth Yönetimi Arka Ucu
Comment[uk]=Програма керування Bluetooth
Comment[vi]=Hậu phương quản lý kỹ thuật Bluetooth
--- branches/work/~wstephens/solid-control-refactor/control/solidnetworkmanager.desktop \
#793968:793969 @@ -39,12 +39,13 @@
Comment[pl]=Usługa zarządzania siecią
Comment[pt]=Infra-Estrutura de Gestão da Rede
Comment[pt_BR]=Infra-estrutura do Gerenciamento de Rede
+Comment[ro]=Suport pentru gestiune rețea
Comment[se]=Fierpmádatgieđahallanmohtor
Comment[sl]=Hrbtenica za upravljanje z omrežji
Comment[sr]=Позадина за управљање мрежом
Comment[sr@latin]=Pozadina za upravljanje mrežom
Comment[sv]=Nätverkshanteringsgränssnitt
-Comment[th]=โปรแกรมเบื้องหลังในการจัดการเครือข่าย
+Comment[th]=โปรแกรมเบื้องหลังการจัดการเครือข่าย
Comment[tr]=Ağ Yönetimi Arka Ucu
Comment[uk]=Програма керування мережею
Comment[vi]=Hậu phương quản lý mạng
--- branches/work/~wstephens/solid-control-refactor/control/solidpowermanager.desktop \
#793968:793969 @@ -39,13 +39,13 @@
Comment[pl]=Usługa zarządzania energią
Comment[pt]=Infra-Estrutura de Gestão da Energia
Comment[pt_BR]=Infra-estrutura do Gerenciamento de Energia
-Comment[ro]=Backend pentru management de energie
+Comment[ro]=Suport pentru administrare de energie
Comment[se]=El-rávdnjegieđahallanmohtor
Comment[sl]=Hrbtenica za upravljanje z energijo
Comment[sr]=Позадина за управљање енергијом
Comment[sr@latin]=Pozadina za upravljanje energijom
Comment[sv]=Gränssnitt för strömsparhantering
-Comment[th]=โปรแกรมเบื้องหลังในการจัดการพลังงาน
+Comment[th]=โปรแกรมเบื้องหลังการจัดการพลังงาน
Comment[tr]=Güç Yönetimi Arka Ucu
Comment[uk]=Програма керування живленням
Comment[vi]=Hậu phương quản lý nguồn điện
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic