[Haiku-commits] r29642 - haiku/trunk/src/preferences/bluetooth
oruizdorantes at BerliOS
oruizdorantes at mail.berlios.de
Sun Mar 22 00:09:56 CET 2009
Author: oruizdorantes
Date: 2009-03-22 00:09:56 +0100 (Sun, 22 Mar 2009)
New Revision: 29642
ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=29642&view=rev
Modified:
haiku/trunk/src/preferences/bluetooth/BluetoothDeviceView.cpp
haiku/trunk/src/preferences/bluetooth/BluetoothDeviceView.h
haiku/trunk/src/preferences/bluetooth/BluetoothMain.cpp
Log:
Show local version information, update about box credits
Modified: haiku/trunk/src/preferences/bluetooth/BluetoothDeviceView.cpp
===================================================================
--- haiku/trunk/src/preferences/bluetooth/BluetoothDeviceView.cpp 2009-03-21 22:27:13 UTC (rev 29641)
+++ haiku/trunk/src/preferences/bluetooth/BluetoothDeviceView.cpp 2009-03-21 23:09:56 UTC (rev 29642)
@@ -5,7 +5,10 @@
#include "BluetoothDeviceView.h"
#include <bluetooth/bdaddrUtils.h>
+#include <bluetooth/LocalDevice.h>
+#include <bluetooth/HCI/btHCI_command.h>
+
#include <Bitmap.h>
#include <GroupLayoutBuilder.h>
#include <SpaceLayoutItem.h>
@@ -19,19 +22,23 @@
{
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));
fIcon->SetViewColor(0,0,0);
@@ -49,7 +56,12 @@
.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 @@
BluetoothDeviceView::SetBluetoothDevice(BluetoothDevice* bDevice)
{
if (bDevice != NULL) {
-
+
SetName(bDevice->GetFriendlyName().String());
fName->SetText(bDevice->GetFriendlyName().String());
@@ -83,7 +95,31 @@
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());
+
}
Modified: haiku/trunk/src/preferences/bluetooth/BluetoothDeviceView.h
===================================================================
--- haiku/trunk/src/preferences/bluetooth/BluetoothDeviceView.h 2009-03-21 22:27:13 UTC (rev 29641)
+++ haiku/trunk/src/preferences/bluetooth/BluetoothDeviceView.h 2009-03-21 23:09:56 UTC (rev 29642)
@@ -38,6 +38,12 @@
BStringView* fBdaddr;
BStringView* fClassService;
BStringView* fClass;
+
+ BStringView* fHCIVersionProperties;
+ BStringView* fLMPVersionProperties;
+ BStringView* fManufacturerProperties;
+
+ BStringView* fBuffersProperties;
BitmapView* fIcon;
Modified: haiku/trunk/src/preferences/bluetooth/BluetoothMain.cpp
===================================================================
--- haiku/trunk/src/preferences/bluetooth/BluetoothMain.cpp 2009-03-21 22:27:13 UTC (rev 29641)
+++ haiku/trunk/src/preferences/bluetooth/BluetoothMain.cpp 2009-03-21 23:09:56 UTC (rev 29642)
@@ -33,6 +33,7 @@
"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 @@
" - 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"
More information about the Haiku-commits
mailing list