diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-08-15 14:41:28 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-08-15 14:41:28 +0200 |
| commit | fec6ea1eba9cee325bbd9d82aa71b8ebf5ef90b0 (patch) | |
| tree | dec0894380a2de8721a1e7733d75053bcc5181fc /wrappers/python/src/state.py | |
| parent | c5e85ba79d4d091af9873f1fb0e7415c3b17b9f8 (diff) | |
Refactor: Use constants for state callbacks instead of strings
Diffstat (limited to 'wrappers/python/src/state.py')
| -rw-r--r-- | wrappers/python/src/state.py | 23 |
1 files changed, 23 insertions, 0 deletions
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 |
