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-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;
|
2016-05-16 17:30:11 +02:00
|
|
|
import nodomain.freeyourgadget.gadgetbridge.model.CalendarEventSpec;
|
2016-04-04 20:08:34 +02:00
|
|
|
import nodomain.freeyourgadget.gadgetbridge.model.CallSpec;
|
2016-06-24 10:25:08 +02:00
|
|
|
import nodomain.freeyourgadget.gadgetbridge.model.CannedMessagesSpec;
|
2016-04-04 20:08:34 +02:00
|
|
|
import nodomain.freeyourgadget.gadgetbridge.model.MusicSpec;
|
2016-06-08 20:27:25 +02:00
|
|
|
import nodomain.freeyourgadget.gadgetbridge.model.MusicStateSpec;
|
2015-09-24 14:45:21 +02:00
|
|
|
import nodomain.freeyourgadget.gadgetbridge.model.NotificationSpec;
|
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
|
|
|
|
2016-04-04 20:08:34 +02:00
|
|
|
void onSetCallState(CallSpec callSpec);
|
2015-04-14 01:24:03 +02:00
|
|
|
|
2016-06-24 10:25:08 +02:00
|
|
|
void onSetCannedMessages(CannedMessagesSpec cannedMessagesSpec);
|
|
|
|
|
2016-06-08 20:27:25 +02:00
|
|
|
void onSetMusicState(MusicStateSpec stateSpec);
|
|
|
|
|
2016-04-04 20:08:34 +02:00
|
|
|
void onSetMusicInfo(MusicSpec musicSpec);
|
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
|
|
|
|
2016-03-03 14:23:17 +01:00
|
|
|
void onAppConfiguration(UUID appUuid, String config);
|
|
|
|
|
2016-06-12 01:20:12 +02:00
|
|
|
void onAppReorder(UUID uuids[]);
|
|
|
|
|
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
|
|
|
|
2016-02-29 22:05:29 +01:00
|
|
|
void onHeartRateTest();
|
2015-12-28 14:38:56 +01:00
|
|
|
|
2016-04-12 23:12:15 +02:00
|
|
|
void onEnableRealtimeHeartRateMeasurement(boolean enable);
|
|
|
|
|
2015-06-21 00:34:05 +02:00
|
|
|
void onFindDevice(boolean start);
|
2015-06-24 00:23:38 +02:00
|
|
|
|
|
|
|
void onScreenshotReq();
|
2016-03-03 14:23:17 +01:00
|
|
|
|
2016-04-03 22:38:06 +02:00
|
|
|
void onEnableHeartRateSleepSupport(boolean enable);
|
2016-05-16 17:30:11 +02:00
|
|
|
|
|
|
|
void onAddCalendarEvent(CalendarEventSpec calendarEventSpec);
|
2016-05-16 23:37:40 +02:00
|
|
|
|
2016-05-24 13:11:57 +02:00
|
|
|
void onDeleteCalendarEvent(byte type, long id);
|
2015-04-14 01:24:03 +02:00
|
|
|
}
|