mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-13 10:31:03 +01:00
6a18d90fee
Also includes some fixes and "find your device" support ;)
70 lines
1.9 KiB
Java
70 lines
1.9 KiB
Java
package nodomain.freeyourgadget.gadgetbridge.devices;
|
|
|
|
import android.net.Uri;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.UUID;
|
|
|
|
import nodomain.freeyourgadget.gadgetbridge.model.Alarm;
|
|
import nodomain.freeyourgadget.gadgetbridge.model.CalendarEventSpec;
|
|
import nodomain.freeyourgadget.gadgetbridge.model.CallSpec;
|
|
import nodomain.freeyourgadget.gadgetbridge.model.CannedMessagesSpec;
|
|
import nodomain.freeyourgadget.gadgetbridge.model.MusicSpec;
|
|
import nodomain.freeyourgadget.gadgetbridge.model.MusicStateSpec;
|
|
import nodomain.freeyourgadget.gadgetbridge.model.NotificationSpec;
|
|
|
|
/**
|
|
* 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.
|
|
*/
|
|
public interface EventHandler {
|
|
void onNotification(NotificationSpec notificationSpec);
|
|
|
|
void onSetTime();
|
|
|
|
void onSetAlarms(ArrayList<? extends Alarm> alarms);
|
|
|
|
void onSetCallState(CallSpec callSpec);
|
|
|
|
void onSetCannedMessages(CannedMessagesSpec cannedMessagesSpec);
|
|
|
|
void onSetMusicState(MusicStateSpec stateSpec);
|
|
|
|
void onSetMusicInfo(MusicSpec musicSpec);
|
|
|
|
void onEnableRealtimeSteps(boolean enable);
|
|
|
|
void onInstallApp(Uri uri);
|
|
|
|
void onAppInfoReq();
|
|
|
|
void onAppStart(UUID uuid, boolean start);
|
|
|
|
void onAppDelete(UUID uuid);
|
|
|
|
void onAppConfiguration(UUID appUuid, String config);
|
|
|
|
void onAppReorder(UUID uuids[]);
|
|
|
|
void onFetchActivityData();
|
|
|
|
void onReboot();
|
|
|
|
void onHeartRateTest();
|
|
|
|
void onEnableRealtimeHeartRateMeasurement(boolean enable);
|
|
|
|
void onFindDevice(boolean start);
|
|
|
|
void onSetConstantVibration(int integer);
|
|
|
|
void onScreenshotReq();
|
|
|
|
void onEnableHeartRateSleepSupport(boolean enable);
|
|
|
|
void onAddCalendarEvent(CalendarEventSpec calendarEventSpec);
|
|
|
|
void onDeleteCalendarEvent(byte type, long id);
|
|
}
|