Rename AbstractBTDeviceSupport to AbstractSerialDeviceSupport
That way it also fits devices connected via TCP/IP for example.
This commit is contained in:
parent
913f37246f
commit
9dd2f039f2
|
@ -12,10 +12,9 @@ import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEventSendBytes;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.AbstractDeviceSupport;
|
import nodomain.freeyourgadget.gadgetbridge.service.AbstractDeviceSupport;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An abstract base class for all devices connected via Bluetooth
|
* An abstract base class for devices speaking a serial protocol, like via
|
||||||
* (not Bluetooth LE).
|
* an rfcomm bluetooth socket or a TCP socket.
|
||||||
*
|
*
|
||||||
* Such devices are typically connected with an (rfcomm) socket connection.
|
|
||||||
* This class uses two helper classes to deal with that:
|
* This class uses two helper classes to deal with that:
|
||||||
* - GBDeviceIoThread, which creates and maintains the actual socket connection and implements the transport layer
|
* - GBDeviceIoThread, which creates and maintains the actual socket connection and implements the transport layer
|
||||||
* - GBDeviceProtocol, which implements the encoding and decoding of messages, i.e. the actual device specific protocol
|
* - GBDeviceProtocol, which implements the encoding and decoding of messages, i.e. the actual device specific protocol
|
||||||
|
@ -25,7 +24,7 @@ import nodomain.freeyourgadget.gadgetbridge.service.AbstractDeviceSupport;
|
||||||
* This implementation implements all methods of {@link EventHandler}, calls the {@link GBDeviceProtocol device protocol}
|
* This implementation implements all methods of {@link EventHandler}, calls the {@link GBDeviceProtocol device protocol}
|
||||||
* to create the device specific message for the respective events and sends them to the device via {@link #sendToDevice(byte[])}.
|
* to create the device specific message for the respective events and sends them to the device via {@link #sendToDevice(byte[])}.
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractBTDeviceSupport extends AbstractDeviceSupport {
|
public abstract class AbstractSerialDeviceSupport extends AbstractDeviceSupport {
|
||||||
|
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(AbstractDeviceSupport.class);
|
private static final Logger LOG = LoggerFactory.getLogger(AbstractDeviceSupport.class);
|
||||||
|
|
|
@ -5,11 +5,11 @@ import android.net.Uri;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.Alarm;
|
import nodomain.freeyourgadget.gadgetbridge.model.Alarm;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.bt.AbstractBTDeviceSupport;
|
import nodomain.freeyourgadget.gadgetbridge.service.bt.AbstractSerialDeviceSupport;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.bt.GBDeviceIoThread;
|
import nodomain.freeyourgadget.gadgetbridge.service.bt.GBDeviceIoThread;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.bt.GBDeviceProtocol;
|
import nodomain.freeyourgadget.gadgetbridge.service.bt.GBDeviceProtocol;
|
||||||
|
|
||||||
public class PebbleSupport extends AbstractBTDeviceSupport {
|
public class PebbleSupport extends AbstractSerialDeviceSupport {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean connect() {
|
public boolean connect() {
|
||||||
|
|
Loading…
Reference in New Issue