diff --git a/src/preferences/bluetooth/BluetoothDeviceView.cpp b/src/preferences/bluetooth/BluetoothDeviceView.cpp index c3c586af25..5ae9a683c9 100644 --- a/src/preferences/bluetooth/BluetoothDeviceView.cpp +++ b/src/preferences/bluetooth/BluetoothDeviceView.cpp @@ -5,6 +5,9 @@ #include "BluetoothDeviceView.h" #include +#include +#include + #include #include @@ -19,18 +22,22 @@ BluetoothDeviceView::BluetoothDeviceView(BRect frame, BluetoothDevice* bDevice, { SetViewColor(B_TRANSPARENT_COLOR); SetLowColor(0,0,0); - BRect iDontCare(0,0,0,0); + //BRect iDontCare(0,0,0,0); SetLayout(new BGroupLayout(B_VERTICAL)); - fName = new BStringView(iDontCare, "name", ""); + fName = new BStringView("name", ""); fName->SetFont(be_bold_font); - fBdaddr = new BStringView(iDontCare, "bdaddr", bdaddrUtils::ToString(bdaddrUtils::NullAddress())); + fBdaddr = new BStringView("bdaddr", bdaddrUtils::ToString(bdaddrUtils::NullAddress())); - fClassService = new BStringView(iDontCare, "ServiceClass", "Service Classes: "); + fClassService = new BStringView("ServiceClass", "Service Classes: "); - fClass = new BStringView(iDontCare, "class", "- / -"); + fClass = new BStringView("class", "- / -"); + + fHCIVersionProperties = new BStringView("version", ""); + fLMPVersionProperties = new BStringView("lmp", ""); + fManufacturerProperties = new BStringView("manufacturer", ""); fIcon = new BitmapView(new BBitmap(BRect(0, 0, 64 - 1, 64 - 1), B_RGBA32)); @@ -49,7 +56,12 @@ BluetoothDeviceView::BluetoothDeviceView(BRect frame, BluetoothDevice* bDevice, .Add(fClass) .AddGlue() .Add(fClassService) - + .AddGlue() + .Add(fHCIVersionProperties) + .AddGlue() + .Add(fLMPVersionProperties) + .AddGlue() + .Add(fManufacturerProperties) .SetInsets(5, 25, 25, 25) ) .Add(BSpaceLayoutItem::CreateHorizontalStrut(10) @@ -69,7 +81,7 @@ void BluetoothDeviceView::SetBluetoothDevice(BluetoothDevice* bDevice) { if (bDevice != NULL) { - + SetName(bDevice->GetFriendlyName().String()); fName->SetText(bDevice->GetFriendlyName().String()); @@ -83,7 +95,31 @@ BluetoothDeviceView::SetBluetoothDevice(BluetoothDevice* bDevice) bDevice->GetDeviceClass().GetMajorDeviceClass(str); str << " / "; bDevice->GetDeviceClass().GetMinorDeviceClass(str); - fClass->SetText(str.String()); + fClass->SetText(str.String()); + + + uint32 value; + + str = ""; + if (bDevice->GetProperty("hci_version", &value) == B_OK) + str << "HCI ver: " << GetHciVersion(value); + if (bDevice->GetProperty("hci_revision", &value) == B_OK) + str << " HCI rev: " << value ; + + fHCIVersionProperties->SetText(str.String()); + + str = ""; + if (bDevice->GetProperty("lmp_version", &value) == B_OK) + str << "LMP ver: " << GetLmpVersion(value); + if (bDevice->GetProperty("lmp_subversion", &value) == B_OK) + str << " LMP subver: " << value; + fLMPVersionProperties->SetText(str.String()); + + str = ""; + if (bDevice->GetProperty("manufacturer", &value) == B_OK) + str << "Manufacturer: " << GetManufacturer(value); + fManufacturerProperties->SetText(str.String()); + } diff --git a/src/preferences/bluetooth/BluetoothDeviceView.h b/src/preferences/bluetooth/BluetoothDeviceView.h index d9198d0c03..c388b90883 100644 --- a/src/preferences/bluetooth/BluetoothDeviceView.h +++ b/src/preferences/bluetooth/BluetoothDeviceView.h @@ -38,6 +38,12 @@ protected: BStringView* fBdaddr; BStringView* fClassService; BStringView* fClass; + + BStringView* fHCIVersionProperties; + BStringView* fLMPVersionProperties; + BStringView* fManufacturerProperties; + + BStringView* fBuffersProperties; BitmapView* fIcon; diff --git a/src/preferences/bluetooth/BluetoothMain.cpp b/src/preferences/bluetooth/BluetoothMain.cpp index 6a2463d0f0..ce387cbb91 100644 --- a/src/preferences/bluetooth/BluetoothMain.cpp +++ b/src/preferences/bluetooth/BluetoothMain.cpp @@ -33,6 +33,7 @@ BluetoothApplication::AboutRequested() "Shipping/donating hardware:\n" " - Henry Jair Abril Florez(el Colombian)\n" " & Stefanie Bartolich\n" + " - Edwin Erik Amsler\n" " - Dennis d'Entremont\n" " - Luroh\n" " - Pieter Panman\n\n" @@ -44,10 +45,10 @@ BluetoothApplication::AboutRequested() " - Greg G, David F, Richard S, Martin W:\n\n" "With patches:\n" " - Fredrik Ekdahl\n" + " - Raynald Lesieur\n" " - Andreas Färber\n\n" "Testing:\n" " - Petter H. Juliussen\n" - " - Raynald Lesieur\n" " - Adrien Destugues\n" " - Jörg Meyer\n\n" "Who gave me all the knowledge:\n"