mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-02 11:38:30 -04:00
0cdb065739
binary to mount at runtime, -c or DMS_SHELL_DIR overrides required to explicitly override embedded configuration
19 lines
449 B
Go
19 lines
449 B
Go
package evdev
|
|
|
|
import (
|
|
"github.com/AvengeMedia/DankMaterialShell/core/internal/server/models"
|
|
)
|
|
|
|
func HandleRequest(conn *models.Conn, req models.Request, m *Manager) {
|
|
switch req.Method {
|
|
case "evdev.getState":
|
|
handleGetState(conn, req, m)
|
|
default:
|
|
models.RespondError(conn, req.ID, "unknown method: "+req.Method)
|
|
}
|
|
}
|
|
|
|
func handleGetState(conn *models.Conn, req models.Request, m *Manager) {
|
|
models.Respond(conn, req.ID, m.GetState())
|
|
}
|