summaryrefslogtreecommitdiff
path: root/wrappers/python/eduvpn_common/state.py
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2023-05-26 15:51:42 +0200
committerJeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com>2023-09-25 09:43:37 +0200
commite9bb8b360f6d4a072f21e7911ecbfde10f26bac0 (patch)
tree606038d20095c38834d748abd7d7cc3b5d14c672 /wrappers/python/eduvpn_common/state.py
parent76e709193614b3668d3c31a078e667473af20369 (diff)
Wrappers Python: Add back event handler
Now all the states are back in V2 again, we should have the event handler back as well
Diffstat (limited to 'wrappers/python/eduvpn_common/state.py')
-rw-r--r--wrappers/python/eduvpn_common/state.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/wrappers/python/eduvpn_common/state.py b/wrappers/python/eduvpn_common/state.py
new file mode 100644
index 0000000..bb6642b
--- /dev/null
+++ b/wrappers/python/eduvpn_common/state.py
@@ -0,0 +1,32 @@
+from enum import IntEnum
+
+
+class StateType(IntEnum):
+ """
+ The State Type enum.
+ """
+
+ ENTER = 1
+ LEAVE = 2
+
+
+StateEnum = IntEnum
+
+
+class State(StateEnum):
+ # Go states
+ INITIAL = 0
+ MAIN = 1
+ ASK_LOCATION = 2
+ CHOSEN_LOCATION = 3
+ LOADING_SERVER = 4
+ CHOSEN_SERVER = 5
+ OAUTH_STARTED = 6
+ AUTHORIZED = 7
+ REQUEST_CONFIG = 8
+ ASK_PROFILE = 9
+ CHOSEN_PROFILE = 10
+ GOT_CONFIG = 11
+ CONNECTING = 12
+ DISCONNECTING = 13
+ CONNECTED = 14