2019-06-02 05:03:08 +03:00
|
|
|
package pro.gravit.launchserver.manangers;
|
2019-04-20 01:03:06 +03:00
|
|
|
|
|
|
|
import com.google.gson.GsonBuilder;
|
2019-06-03 10:58:10 +03:00
|
|
|
|
2019-07-02 11:36:50 +03:00
|
|
|
import pro.gravit.launcher.hwid.HWID;
|
|
|
|
import pro.gravit.launcher.hwid.HWIDProvider;
|
2019-06-02 05:03:08 +03:00
|
|
|
import pro.gravit.launcher.managers.GsonManager;
|
2019-07-01 12:59:47 +03:00
|
|
|
import pro.gravit.launcher.request.JsonResultSerializeAdapter;
|
2019-07-01 13:46:49 +03:00
|
|
|
import pro.gravit.launcher.request.WebSocketEvent;
|
2019-06-02 05:03:08 +03:00
|
|
|
import pro.gravit.launchserver.auth.handler.AuthHandler;
|
|
|
|
import pro.gravit.launchserver.auth.hwid.HWIDHandler;
|
|
|
|
import pro.gravit.launchserver.auth.permissions.PermissionsHandler;
|
|
|
|
import pro.gravit.launchserver.auth.protect.ProtectHandler;
|
|
|
|
import pro.gravit.launchserver.auth.provider.AuthProvider;
|
|
|
|
import pro.gravit.launchserver.auth.texture.TextureProvider;
|
|
|
|
import pro.gravit.launchserver.components.Component;
|
2019-07-01 11:22:48 +03:00
|
|
|
import pro.gravit.launchserver.dao.provider.DaoProvider;
|
2019-07-01 12:59:47 +03:00
|
|
|
import pro.gravit.launchserver.socket.WebSocketService;
|
2019-07-01 13:46:49 +03:00
|
|
|
import pro.gravit.launchserver.socket.response.WebSocketServerResponse;
|
2019-06-02 05:03:08 +03:00
|
|
|
import pro.gravit.utils.UniversalJsonAdapter;
|
2019-04-20 01:03:06 +03:00
|
|
|
|
|
|
|
public class LaunchServerGsonManager extends GsonManager {
|
|
|
|
@Override
|
|
|
|
public void registerAdapters(GsonBuilder builder) {
|
|
|
|
super.registerAdapters(builder);
|
2019-04-20 01:58:59 +03:00
|
|
|
builder.registerTypeAdapter(AuthProvider.class, new UniversalJsonAdapter<>(AuthProvider.providers));
|
|
|
|
builder.registerTypeAdapter(TextureProvider.class, new UniversalJsonAdapter<>(TextureProvider.providers));
|
|
|
|
builder.registerTypeAdapter(AuthHandler.class, new UniversalJsonAdapter<>(AuthHandler.providers));
|
|
|
|
builder.registerTypeAdapter(PermissionsHandler.class, new UniversalJsonAdapter<>(PermissionsHandler.providers));
|
|
|
|
builder.registerTypeAdapter(HWIDHandler.class, new UniversalJsonAdapter<>(HWIDHandler.providers));
|
|
|
|
builder.registerTypeAdapter(Component.class, new UniversalJsonAdapter<>(Component.providers));
|
|
|
|
builder.registerTypeAdapter(ProtectHandler.class, new UniversalJsonAdapter<>(ProtectHandler.providers));
|
2019-07-01 11:22:48 +03:00
|
|
|
builder.registerTypeAdapter(DaoProvider.class, new UniversalJsonAdapter<>(DaoProvider.providers));
|
2019-07-02 11:36:50 +03:00
|
|
|
builder.registerTypeAdapter(HWID.class, new UniversalJsonAdapter<>(HWIDProvider.hwids));
|
2019-07-01 13:46:49 +03:00
|
|
|
builder.registerTypeAdapter(WebSocketServerResponse.class, new UniversalJsonAdapter<>(WebSocketService.providers));
|
|
|
|
builder.registerTypeAdapter(WebSocketEvent.class, new JsonResultSerializeAdapter());
|
2019-07-03 10:23:26 +03:00
|
|
|
//ClientWebSocketService.appendTypeAdapters(builder);
|
2019-04-20 01:03:06 +03:00
|
|
|
}
|
|
|
|
}
|