mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 11:39:11 +03:00
[FIX] NotificationEvent proguard support
This commit is contained in:
parent
490ba360e7
commit
17106886bb
4 changed files with 12 additions and 20 deletions
|
@ -1,19 +0,0 @@
|
||||||
package pro.gravit.launcher.events;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
//Набор стандартных событий
|
|
||||||
public class ControlEvent {
|
|
||||||
@SuppressWarnings("unused")
|
|
||||||
private static final UUID uuid = UUID.fromString("f1051a64-0cd0-4ed8-8430-d856a196e91f");
|
|
||||||
|
|
||||||
public enum ControlCommand {
|
|
||||||
STOP, START, PAUSE, CONTINUE, CRASH
|
|
||||||
}
|
|
||||||
|
|
||||||
public ControlEvent(ControlCommand signal) {
|
|
||||||
this.signal = signal;
|
|
||||||
}
|
|
||||||
|
|
||||||
public final ControlCommand signal;
|
|
||||||
}
|
|
|
@ -1,9 +1,12 @@
|
||||||
package pro.gravit.launcher.events;
|
package pro.gravit.launcher.events;
|
||||||
|
|
||||||
|
import pro.gravit.launcher.LauncherNetworkAPI;
|
||||||
import pro.gravit.launcher.request.WebSocketEvent;
|
import pro.gravit.launcher.request.WebSocketEvent;
|
||||||
|
|
||||||
public class NotificationEvent implements WebSocketEvent {
|
public class NotificationEvent implements WebSocketEvent {
|
||||||
|
@LauncherNetworkAPI
|
||||||
public final String head;
|
public final String head;
|
||||||
|
@LauncherNetworkAPI
|
||||||
public final String message;
|
public final String message;
|
||||||
|
|
||||||
public NotificationEvent(String head, String message) {
|
public NotificationEvent(String head, String message) {
|
||||||
|
|
|
@ -1,13 +1,19 @@
|
||||||
package pro.gravit.launcher.events;
|
package pro.gravit.launcher.events;
|
||||||
|
|
||||||
import pro.gravit.launcher.LauncherNetworkAPI;
|
import pro.gravit.launcher.LauncherNetworkAPI;
|
||||||
|
import pro.gravit.launcher.request.WebSocketEvent;
|
||||||
|
|
||||||
//Используется, что бы послать короткое сообщение, которое вмещается в int
|
//Используется, что бы послать короткое сообщение, которое вмещается в int
|
||||||
public class SignalEvent {
|
public class SignalEvent implements WebSocketEvent {
|
||||||
@LauncherNetworkAPI
|
@LauncherNetworkAPI
|
||||||
public final int signal;
|
public final int signal;
|
||||||
|
|
||||||
public SignalEvent(int signal) {
|
public SignalEvent(int signal) {
|
||||||
this.signal = signal;
|
this.signal = signal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getType() {
|
||||||
|
return "signal";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
import pro.gravit.launcher.Launcher;
|
import pro.gravit.launcher.Launcher;
|
||||||
import pro.gravit.launcher.events.ExceptionEvent;
|
import pro.gravit.launcher.events.ExceptionEvent;
|
||||||
import pro.gravit.launcher.events.NotificationEvent;
|
import pro.gravit.launcher.events.NotificationEvent;
|
||||||
|
import pro.gravit.launcher.events.SignalEvent;
|
||||||
import pro.gravit.launcher.events.request.*;
|
import pro.gravit.launcher.events.request.*;
|
||||||
import pro.gravit.launcher.hasher.HashedEntry;
|
import pro.gravit.launcher.hasher.HashedEntry;
|
||||||
import pro.gravit.launcher.hasher.HashedEntryAdapter;
|
import pro.gravit.launcher.hasher.HashedEntryAdapter;
|
||||||
|
@ -109,6 +110,7 @@ public void registerResults() {
|
||||||
results.register("register", RegisterRequestEvent.class);
|
results.register("register", RegisterRequestEvent.class);
|
||||||
results.register("setpassword", SetPasswordRequestEvent.class);
|
results.register("setpassword", SetPasswordRequestEvent.class);
|
||||||
results.register("notification", NotificationEvent.class);
|
results.register("notification", NotificationEvent.class);
|
||||||
|
results.register("signal", SignalEvent.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void registerHandler(EventHandler eventHandler) {
|
public void registerHandler(EventHandler eventHandler) {
|
||||||
|
|
Loading…
Reference in a new issue