1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-12 21:19:25 +01:00

More refactoring: new service/devices package and service/bt package

This commit is contained in:
cpfeiffer 2015-08-03 23:51:53 +02:00
parent 7c597b325a
commit db4261e02b
15 changed files with 23 additions and 22 deletions

View File

@ -22,7 +22,7 @@ import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceApp;
import nodomain.freeyourgadget.gadgetbridge.service.pebble.PebbleProtocol;
import nodomain.freeyourgadget.gadgetbridge.service.devices.pebble.PebbleProtocol;
public class PBWReader {
private static final Logger LOG = LoggerFactory.getLogger(PBWReader.class);

View File

@ -31,8 +31,8 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice.State;
import nodomain.freeyourgadget.gadgetbridge.R;
import nodomain.freeyourgadget.gadgetbridge.model.Alarm;
import nodomain.freeyourgadget.gadgetbridge.service.miband.MiBandSupport;
import nodomain.freeyourgadget.gadgetbridge.service.pebble.PebbleSupport;
import nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBandSupport;
import nodomain.freeyourgadget.gadgetbridge.service.devices.pebble.PebbleSupport;
public class BluetoothCommunicationService extends Service {
public static final String ACTION_START

View File

@ -1,4 +1,4 @@
package nodomain.freeyourgadget.gadgetbridge.service;
package nodomain.freeyourgadget.gadgetbridge.service.bt;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -9,6 +9,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.EventHandler;
import nodomain.freeyourgadget.gadgetbridge.model.ServiceCommand;
import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEvent;
import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEventSendBytes;
import nodomain.freeyourgadget.gadgetbridge.service.AbstractDeviceSupport;
/**
* An abstract base class for all devices connected via Bluetooth

View File

@ -1,4 +1,4 @@
package nodomain.freeyourgadget.gadgetbridge.service;
package nodomain.freeyourgadget.gadgetbridge.service.bt;
import android.content.Context;

View File

@ -1,4 +1,4 @@
package nodomain.freeyourgadget.gadgetbridge.service;
package nodomain.freeyourgadget.gadgetbridge.service.bt;
import java.util.UUID;

View File

@ -1,4 +1,4 @@
package nodomain.freeyourgadget.gadgetbridge.service.miband;
package nodomain.freeyourgadget.gadgetbridge.service.devices.miband;
public class AbstractInfo {
protected byte[] mData;

View File

@ -1,4 +1,4 @@
package nodomain.freeyourgadget.gadgetbridge.service.miband;
package nodomain.freeyourgadget.gadgetbridge.service.devices.miband;
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
import nodomain.freeyourgadget.gadgetbridge.R;

View File

@ -1,4 +1,4 @@
package nodomain.freeyourgadget.gadgetbridge.service.miband;
package nodomain.freeyourgadget.gadgetbridge.service.devices.miband;
import java.util.Locale;

View File

@ -1,4 +1,4 @@
package nodomain.freeyourgadget.gadgetbridge.service.miband;
package nodomain.freeyourgadget.gadgetbridge.service.devices.miband;
import android.bluetooth.BluetoothGatt;
import android.bluetooth.BluetoothGattCharacteristic;

View File

@ -1,4 +1,4 @@
package nodomain.freeyourgadget.gadgetbridge.service.pebble;
package nodomain.freeyourgadget.gadgetbridge.service.devices.pebble;
import android.util.Pair;

View File

@ -1,4 +1,4 @@
package nodomain.freeyourgadget.gadgetbridge.service.pebble;
package nodomain.freeyourgadget.gadgetbridge.service.devices.pebble;
import android.util.Pair;

View File

@ -1,4 +1,4 @@
package nodomain.freeyourgadget.gadgetbridge.service.pebble;
package nodomain.freeyourgadget.gadgetbridge.service.devices.pebble;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
@ -23,12 +23,12 @@ import nodomain.freeyourgadget.gadgetbridge.util.GB;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
import nodomain.freeyourgadget.gadgetbridge.devices.pebble.PBWReader;
import nodomain.freeyourgadget.gadgetbridge.devices.pebble.PebbleInstallable;
import nodomain.freeyourgadget.gadgetbridge.service.GBDeviceIoThread;
import nodomain.freeyourgadget.gadgetbridge.service.bt.GBDeviceIoThread;
import nodomain.freeyourgadget.gadgetbridge.R;
import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEvent;
import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEventAppInfo;
import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEventAppManagementResult;
import nodomain.freeyourgadget.gadgetbridge.service.GBDeviceProtocol;
import nodomain.freeyourgadget.gadgetbridge.service.bt.GBDeviceProtocol;
public class PebbleIoThread extends GBDeviceIoThread {
private static final Logger LOG = LoggerFactory.getLogger(PebbleIoThread.class);

View File

@ -1,4 +1,4 @@
package nodomain.freeyourgadget.gadgetbridge.service.pebble;
package nodomain.freeyourgadget.gadgetbridge.service.devices.pebble;
import android.util.Pair;
@ -24,7 +24,7 @@ import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEventMusicContr
import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEventScreenshot;
import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEventSendBytes;
import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEventVersionInfo;
import nodomain.freeyourgadget.gadgetbridge.service.GBDeviceProtocol;
import nodomain.freeyourgadget.gadgetbridge.service.bt.GBDeviceProtocol;
public class PebbleProtocol extends GBDeviceProtocol {

View File

@ -1,13 +1,13 @@
package nodomain.freeyourgadget.gadgetbridge.service.pebble;
package nodomain.freeyourgadget.gadgetbridge.service.devices.pebble;
import android.net.Uri;
import java.util.ArrayList;
import nodomain.freeyourgadget.gadgetbridge.model.Alarm;
import nodomain.freeyourgadget.gadgetbridge.service.AbstractBTDeviceSupport;
import nodomain.freeyourgadget.gadgetbridge.service.GBDeviceIoThread;
import nodomain.freeyourgadget.gadgetbridge.service.GBDeviceProtocol;
import nodomain.freeyourgadget.gadgetbridge.service.bt.AbstractBTDeviceSupport;
import nodomain.freeyourgadget.gadgetbridge.service.bt.GBDeviceIoThread;
import nodomain.freeyourgadget.gadgetbridge.service.bt.GBDeviceProtocol;
public class PebbleSupport extends AbstractBTDeviceSupport {

View File

@ -1,4 +1,4 @@
package nodomain.freeyourgadget.gadgetbridge.service.pebble;
package nodomain.freeyourgadget.gadgetbridge.service.devices.pebble;
import android.util.Pair;