summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMaciej Stachowiak <mstachow@src.gnome.org>2000-08-10 17:00:25 +0000
committerMaciej Stachowiak <mstachow@src.gnome.org>2000-08-10 17:00:25 +0000
commit650b212db1e1861e6e766a500ffccebbf714c454 (patch)
treec9b06b18ce6256e2e7a20d08c2e7b15dbece8e5b /docs
parent0c000c070a3587cd705b1879747646d420e2a5e5 (diff)
downloadnautilus-650b212db1e1861e6e766a500ffccebbf714c454.tar.gz
a start on some design work for sane state machines that actually cover
* docs/state-machines.txt: a start on some design work for sane state machines that actually cover all the cases.
Diffstat (limited to 'docs')
-rw-r--r--docs/state-machines.txt72
1 files changed, 72 insertions, 0 deletions
diff --git a/docs/state-machines.txt b/docs/state-machines.txt
new file mode 100644
index 000000000..2ac8a255b
--- /dev/null
+++ b/docs/state-machines.txt
@@ -0,0 +1,72 @@
+
+Proposal for the loading state machines
+
+
+ViewFrame state machine
+
+States are:
+
+E: Empty (the initial state right after construction)
+N: No load_location request (a view component has been loaded, but no load_location request has been sent yet)
+W: Waiting (waiting for a response after a load request)
+U: Underway (the component has responded and the load is assumed underway)
+L: Loaded (the component has finished loading successfully)
+F: Failed (there was a fatal error somewhere)
+
+X: this stimulus is guaranteed impossible in this state
+
+
+Things I was unsure about:
+
+?1: It's theoretically possible to call load_client on a ViewFrame
+more than once, thus loading a new component into an existing
+ViewFrame, although Nautilus never does this. Is it better to forbid
+this, or clearly define the effects?
+
+?2: Once a load has failed at some stage, should it be OK for Nautilus
+to try to make further calls of any kind?
+
+?3: A component making calls on the ViewFrame interface before it has
+ever been told even an initial location to load is weird but, I
+suppose, not excluded by contract - what should be done here? Should
+such calls be taken as errors, or handled in some way?
+
+
+ State Transision Chart
+
+
+ Initial State
+
+
+ | E | N | W | U | L | F |
+ ----------------------------------------|-----|-----|-----|-----|-----|-----|
+ successful load_client call | N | ?1 | ?1 | ?1 | ?1 | ?2 |
+ ----------------------------------------|-----|-----|-----|-----|-----|-----|
+ unsuccessful load_client call | F | ?1 | ?1 | ?1 | ?1 | ?2 |
+ ----------------------------------------|-----|-----|-----|-----|-----|-----|
+ nautilus_view_frame_load_location call | F | W | W | W | W | ?2 |
+ ----------------------------------------|-----|-----|-----|-----|-----|-----|
+ open_location call from component | X | ?3 | U | U | L | X |
+ ----------------------------------------|-----|-----|-----|-----|-----|-----|
+ open_location_in_new_window | X | ?3 | U | U | L | X |
+ ----------------------------------------|-----|-----|-----|-----|-----|-----|
+ report_location_change | X | ?3 | U | U | U | X |
+S ----------------------------------------|-----|-----|-----|-----|-----|-----|
+t report_selection_change | X | ?3 | U | U | L | X |
+i ----------------------------------------|-----|-----|-----|-----|-----|-----|
+m report_status | X | ?3 | U | U | L | X |
+u ----------------------------------------|-----|-----|-----|-----|-----|-----|
+l report_load_underway | X | ?3 | U | U | U | X |
+u ----------------------------------------|-----|-----|-----|-----|-----|-----|
+s report_load_progress | X | ?3 | U | U | U | X |
+ ----------------------------------------|-----|-----|-----|-----|-----|-----|
+ report_load_complete | X | ?3 | L | L | L | X |
+ ----------------------------------------|-----|-----|-----|-----|-----|-----|
+ report_load_failed | X | ?3 | F | F | F | X |
+ ----------------------------------------|-----|-----|-----|-----|-----|-----|
+ set_title | X | ?3 | U | U | L | X |
+ ----------------------------------------|-----|-----|-----|-----|-----|-----|
+ user hits cancel on timer dialog | X | X | F | X | X | X |
+ ----------------------------------------|-----|-----|-----|-----|-----|-----|
+
+