|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.avetana.bluetooth.sdp.ServiceDescriptor
An helper class for the ServiceFinder class.
COPYRIGHT:
(c) Copyright 2004 Avetana GmbH ALL RIGHTS RESERVED.
This file is part of the Avetana bluetooth API for Linux.
The Avetana bluetooth API for Linux is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
The Avetana bluetooth API is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
The development of the Avetana bluetooth API is based on the work of
Christian Lorenz (see the Javabluetooth Stack at http://www.javabluetooth.org) for some classes,
on the work of the jbluez team (see http://jbluez.sourceforge.net/) and
on the work of the bluez team (see the BlueZ linux Stack at http://www.bluez.org) for the C code.
Classes, part of classes, C functions or part of C functions programmed by these teams and/or persons
are explicitly mentioned.
Description:
This is an helper class for the ServiceFinder class. This class has nothing to do with the JSR82 specification
and just exists in order to provide a serializable Service description. The implementation as well as the
the possibilities of this class are very basic.
| Constructor Summary | |
ServiceDescriptor(BTAddress addr)
Creates a new ServiceDescriptor object and sets the BTAddress of the remote device |
|
ServiceDescriptor(RemoteDevice dev)
Creates a new ServiceDescriptor object and sets the remote device |
|
| Method Summary | |
BTAddress |
getBTAddress()
Returns the BT address of the remote device this service belongs to. |
java.lang.String |
getRemoteName()
Returns the name of the remote device this service belongs to |
java.lang.String |
getServiceName()
Returns the name of the service |
java.lang.String |
getServiceURL()
Returns the connection URL for this service |
void |
parseServiceRecord(ServiceRecord rec,
int security,
boolean master)
Parses the Service record and fills the variables of this class. |
void |
setBTAddress(BTAddress newAdr)
Sets the BT address of the remote device |
void |
setRemoteName(java.lang.String name)
Sets the name of the remote device |
void |
setServiceName(java.lang.String name)
Sets the name if the record |
void |
setServiceURL(java.lang.String URL)
Sets the URL requested to connect to this record |
java.lang.String |
toString()
Returns the String representation used in the JTree of the ServiceFinder class. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ServiceDescriptor(BTAddress addr)
addr - The BTAddress of the remote device
public ServiceDescriptor(RemoteDevice dev)
throws java.lang.Exception
dev - The remote device
java.lang.Exception - If the BT address of this device could not be parsed.| Method Detail |
public void setRemoteName(java.lang.String name)
name - The name of the remote devicepublic void setServiceName(java.lang.String name)
name - The name of the recordpublic void setServiceURL(java.lang.String URL)
URL - The connection URLpublic void setBTAddress(BTAddress newAdr)
newAdr - The BT address of the remote devicepublic java.lang.String getRemoteName()
public BTAddress getBTAddress()
public java.lang.String getServiceURL()
public java.lang.String getServiceName()
public void parseServiceRecord(ServiceRecord rec,
int security,
boolean master)
rec - The service recordsecurity - The security flagsmaster - Is the local device master?public java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||