Permalink
Browse files

Small modifications

  • Loading branch information...
1 parent 8f9ee4f commit 2e1df918fc43a988be74180c84f8d1f0a4ded2be @nicklasgav committed Apr 11, 2012
Showing with 22 additions and 5 deletions.
  1. +22 −5 src/se/nicklasgavelin/bluetooth/BluetoothService.java
@@ -46,7 +46,7 @@
private BluetoothDevice device;
private ServiceRecord record;
-// private final Bluetooth bt;
+ // private final Bluetooth bt;
private String name;
private String description;
private String provider;
@@ -59,12 +59,14 @@
* @param device The Bluetooth device for this service
* @param record The service record
*/
- protected BluetoothService( BluetoothDevice device, ServiceRecord record )//, Bluetooth bt )
+ protected BluetoothService( BluetoothDevice device, ServiceRecord record )// ,
+ // Bluetooth
+ // bt )
{
// Store objects
this.device = device;
this.record = record;
-// this.bt = bt;
+ // this.bt = bt;
DataElement element;
@@ -97,23 +99,38 @@ protected BluetoothService( BluetoothDevice device, ServiceRecord record )//, Bl
*/
protected BluetoothService( String serviceConnectionURL )
{
-// this.bt = null;
+ // this.bt = null;
this.serviceConnectionURL = serviceConnectionURL;
this.name = UNKNOWN;
this.description = UNKNOWN;
this.provider = UNKNOWN;
}
+ /**
+ * Returns the name of the service
+ *
+ * @return The service name
+ */
public String getName()
{
return this.name;
}
+ /**
+ * Returns service description
+ *
+ * @return Service description
+ */
public String getDescription()
{
return this.description;
}
+ /**
+ * Returns provider name
+ *
+ * @return Provider name
+ */
public String getProvider()
{
return this.provider;
@@ -130,7 +147,7 @@ public String getConnectionURL()
// Check if we can return something
if( this.record != null )
return this.record.getConnectionURL( ServiceRecord.AUTHENTICATE_NOENCRYPT, false );
- if( this.serviceConnectionURL != null )
+ else if( this.serviceConnectionURL != null )
return this.serviceConnectionURL;
return null;

0 comments on commit 2e1df91

Please sign in to comment.