2015-08-03 23:09:49 +02:00
|
|
|
package nodomain.freeyourgadget.gadgetbridge.devices;
|
2015-04-14 01:24:03 +02:00
|
|
|
|
2015-06-06 23:24:00 +02:00
|
|
|
import android.net.Uri;
|
2015-08-21 00:58:18 +02:00
|
|
|
import android.support.annotation.Nullable;
|
2015-06-06 23:24:00 +02:00
|
|
|
|
2015-06-25 14:34:21 +02:00
|
|
|
import java.util.ArrayList;
|
2015-05-18 20:56:19 +02:00
|
|
|
import java.util.UUID;
|
|
|
|
|
2015-08-03 23:09:49 +02:00
|
|
|
import nodomain.freeyourgadget.gadgetbridge.model.Alarm;
|
2015-09-24 14:45:21 +02:00
|
|
|
import nodomain.freeyourgadget.gadgetbridge.model.NotificationSpec;
|
|
|
|
import nodomain.freeyourgadget.gadgetbridge.model.ServiceCommand;
|
2015-08-03 23:09:49 +02:00
|
|
|
|
2015-08-02 00:12:21 +02:00
|
|
|
/**
|
|
|
|
* Specifies all events that GadgetBridge intends to send to the gadget device.
|
|
|
|
* Implementations can decide to ignore events that they do not support.
|
|
|
|
* Implementations need to send/encode event to the connected device.
|
|
|
|
*/
|
2015-04-14 01:24:03 +02:00
|
|
|
public interface EventHandler {
|
2015-09-24 14:45:21 +02:00
|
|
|
void onNotification(NotificationSpec notificationSpec);
|
2015-05-13 21:55:22 +02:00
|
|
|
|
2015-08-21 00:58:18 +02:00
|
|
|
void onSetTime();
|
2015-04-14 01:24:03 +02:00
|
|
|
|
2015-08-21 00:58:18 +02:00
|
|
|
void onSetAlarms(ArrayList<? extends Alarm> alarms);
|
2015-06-24 20:14:08 +02:00
|
|
|
|
2015-08-21 00:58:18 +02:00
|
|
|
void onSetCallState(@Nullable String number, @Nullable String name, ServiceCommand command);
|
2015-04-14 01:24:03 +02:00
|
|
|
|
2015-05-12 20:09:35 +02:00
|
|
|
void onSetMusicInfo(String artist, String album, String track);
|
2015-04-14 01:24:03 +02:00
|
|
|
|
2015-09-02 08:00:26 +02:00
|
|
|
void onEnableRealtimeSteps(boolean enable);
|
|
|
|
|
2015-06-06 23:24:00 +02:00
|
|
|
void onInstallApp(Uri uri);
|
|
|
|
|
2015-05-12 20:09:35 +02:00
|
|
|
void onAppInfoReq();
|
2015-04-14 01:24:03 +02:00
|
|
|
|
2015-09-13 21:44:26 +02:00
|
|
|
void onAppStart(UUID uuid, boolean start);
|
2015-05-18 22:20:01 +02:00
|
|
|
|
2015-05-18 20:56:19 +02:00
|
|
|
void onAppDelete(UUID uuid);
|
2015-04-14 01:24:03 +02:00
|
|
|
|
2015-06-06 19:39:04 +02:00
|
|
|
void onFetchActivityData();
|
2015-06-06 00:40:16 +02:00
|
|
|
|
2015-05-17 21:58:08 +02:00
|
|
|
void onReboot();
|
2015-06-21 00:34:05 +02:00
|
|
|
|
2015-12-28 14:38:56 +01:00
|
|
|
void onHearRateTest();
|
|
|
|
|
2015-06-21 00:34:05 +02:00
|
|
|
void onFindDevice(boolean start);
|
2015-06-24 00:23:38 +02:00
|
|
|
|
|
|
|
void onScreenshotReq();
|
2015-04-14 01:24:03 +02:00
|
|
|
}
|