From fec6ea1eba9cee325bbd9d82aa71b8ebf5ef90b0 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Mon, 15 Aug 2022 14:41:28 +0200 Subject: Refactor: Use constants for state callbacks instead of strings --- wrappers/python/src/state.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 wrappers/python/src/state.py (limited to 'wrappers/python/src/state.py') diff --git a/wrappers/python/src/state.py b/wrappers/python/src/state.py new file mode 100644 index 0000000..cd5bd90 --- /dev/null +++ b/wrappers/python/src/state.py @@ -0,0 +1,23 @@ +from enum import IntEnum + + +class StateType(IntEnum): + Enter = 1 + Leave = 2 + Wait = 3 + + +class State(IntEnum): + DEREGISTERED = 0 + NO_SERVER = 1 + ASK_LOCATION = 2 + SEARCH_SERVER = 3 + LOADING_SERVER = 4 + CHOSEN_SERVER = 5 + OAUTH_STARTED = 6 + AUTHORIZED = 7 + REQUEST_CONFIG = 8 + ASK_PROFILE = 9 + HAS_CONFIG = 10 + CONNECTING = 11 + CONNECTED = 12 -- cgit v1.2.3