2019-02-13 20:43:30 +01:00
|
|
|
/* Copyright (C) 2015-2019 Andreas Shimokawa, Carsten Pfeiffer, José Rebelo,
|
|
|
|
Julien Pivotto, Steffen Liebergeld
|
2017-03-10 14:53:19 +01:00
|
|
|
|
|
|
|
This file is part of Gadgetbridge.
|
|
|
|
|
|
|
|
Gadgetbridge is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU Affero General Public License as published
|
|
|
|
by the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
Gadgetbridge is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU Affero General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
2015-08-18 01:26:15 +02:00
|
|
|
package nodomain.freeyourgadget.gadgetbridge.service.serial;
|
2015-06-23 14:20:13 +02:00
|
|
|
|
|
|
|
import java.util.UUID;
|
|
|
|
|
|
|
|
import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEvent;
|
2016-05-16 23:00:04 +02:00
|
|
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
2016-05-16 17:30:11 +02:00
|
|
|
import nodomain.freeyourgadget.gadgetbridge.model.CalendarEventSpec;
|
2016-06-24 10:25:08 +02:00
|
|
|
import nodomain.freeyourgadget.gadgetbridge.model.CannedMessagesSpec;
|
2015-09-24 14:45:21 +02:00
|
|
|
import nodomain.freeyourgadget.gadgetbridge.model.NotificationSpec;
|
2016-12-31 15:56:05 +01:00
|
|
|
import nodomain.freeyourgadget.gadgetbridge.model.WeatherSpec;
|
2015-06-23 14:20:13 +02:00
|
|
|
|
|
|
|
public abstract class GBDeviceProtocol {
|
|
|
|
|
2018-12-16 16:05:13 +01:00
|
|
|
public static final int RESET_FLAGS_REBOOT = 1;
|
|
|
|
public static final int RESET_FLAGS_FACTORY_RESET = 2;
|
|
|
|
|
2016-05-16 23:00:04 +02:00
|
|
|
private GBDevice mDevice;
|
|
|
|
|
|
|
|
protected GBDeviceProtocol(GBDevice device) {
|
|
|
|
mDevice = device;
|
|
|
|
}
|
|
|
|
|
2015-09-24 14:45:21 +02:00
|
|
|
public byte[] encodeNotification(NotificationSpec notificationSpec) {
|
2015-06-23 14:20:13 +02:00
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2017-01-09 16:33:00 +01:00
|
|
|
public byte[] encodeDeleteNotification(int id) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2015-08-21 00:58:18 +02:00
|
|
|
public byte[] encodeSetTime() {
|
2015-06-23 14:20:13 +02:00
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2016-04-04 20:08:34 +02:00
|
|
|
public byte[] encodeSetCallState(String number, String name, int command) {
|
2015-06-23 14:20:13 +02:00
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2016-06-24 10:25:08 +02:00
|
|
|
public byte[] encodeSetCannedMessages(CannedMessagesSpec cannedMessagesSpec) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2016-03-27 17:44:20 +02:00
|
|
|
public byte[] encodeSetMusicInfo(String artist, String album, String track, int duration, int trackCount, int trackNr) {
|
2015-06-23 14:20:13 +02:00
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2016-06-08 20:27:25 +02:00
|
|
|
public byte[] encodeSetMusicState(byte state, int position, int playRate, byte shuffle, byte repeat) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2015-06-23 14:20:13 +02:00
|
|
|
public byte[] encodeFirmwareVersionReq() {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
public byte[] encodeAppInfoReq() {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2015-06-24 00:23:38 +02:00
|
|
|
public byte[] encodeScreenshotReq() {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2015-06-23 14:20:13 +02:00
|
|
|
public byte[] encodeAppDelete(UUID uuid) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2015-09-13 21:44:26 +02:00
|
|
|
public byte[] encodeAppStart(UUID uuid, boolean start) {
|
2015-06-23 14:20:13 +02:00
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2016-06-12 01:20:12 +02:00
|
|
|
public byte[] encodeAppReorder(UUID[] uuids) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2015-06-23 14:20:13 +02:00
|
|
|
public byte[] encodeSynchronizeActivityData() {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2018-12-16 16:05:13 +01:00
|
|
|
public byte[] encodeReset(int flags) {
|
2015-06-23 14:20:13 +02:00
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
public byte[] encodeFindDevice(boolean start) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2015-09-02 08:00:26 +02:00
|
|
|
public byte[] encodeEnableRealtimeSteps(boolean enable) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2016-04-04 20:08:34 +02:00
|
|
|
public byte[] encodeEnableHeartRateSleepSupport(boolean enable) {
|
|
|
|
return null;
|
|
|
|
}
|
2016-04-03 22:38:06 +02:00
|
|
|
|
2016-04-12 23:12:15 +02:00
|
|
|
public byte[] encodeEnableRealtimeHeartRateMeasurement(boolean enable) { return null; }
|
|
|
|
|
2016-05-16 17:30:11 +02:00
|
|
|
public byte[] encodeAddCalendarEvent(CalendarEventSpec calendarEventSpec) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2016-05-24 13:11:57 +02:00
|
|
|
public byte[] encodeDeleteCalendarEvent(byte type, long id) {
|
2016-05-16 23:37:40 +02:00
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2016-11-13 20:47:24 +01:00
|
|
|
public byte[] encodeSendConfiguration(String config) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2016-10-11 23:06:59 +02:00
|
|
|
public byte[] encodeTestNewFunction() { return null; }
|
|
|
|
|
2015-08-27 15:02:29 +02:00
|
|
|
public GBDeviceEvent[] decodeResponse(byte[] responseData) {
|
2015-06-23 14:20:13 +02:00
|
|
|
return null;
|
|
|
|
}
|
2016-05-16 23:00:04 +02:00
|
|
|
|
|
|
|
public GBDevice getDevice() {
|
|
|
|
return mDevice;
|
|
|
|
}
|
2016-11-13 20:47:24 +01:00
|
|
|
|
2016-12-31 15:56:05 +01:00
|
|
|
public byte[] encodeSendWeather(WeatherSpec weatherSpec) {
|
|
|
|
return null;
|
|
|
|
}
|
2018-07-28 17:23:58 +02:00
|
|
|
|
|
|
|
public byte[] encodeLedColor(int color) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
public byte[] encodeFmFrequency(float frequency) {
|
|
|
|
return null;
|
|
|
|
}
|
2015-09-13 00:39:53 +02:00
|
|
|
}
|