X-Git-Url: http://git.pjr.cc/?p=ga4php.git;a=blobdiff_plain;f=doco%2Fpseudo.txt;h=4ab05c39bf7e1e9e4b936ea74c98cf87b5be64a0;hp=7aa375ff8ee673fa7495d73265d05f992bea39a6;hb=01b5d6290a0d704099cef17071c1fc50b3049bee;hpb=1d6adec6039a635e97e31592bbbcbf4357e33c28 diff --git a/doco/pseudo.txt b/doco/pseudo.txt index 7aa375f..4ab05c3 100644 --- a/doco/pseudo.txt +++ b/doco/pseudo.txt @@ -4,4 +4,38 @@ start: am I inited? yes: load from datastore (AD, database, etc) no: tell any request returns "uninited" - figure out my datastore. \ No newline at end of file + figure out my datastore. + + +Setup: + gaasd starts up with backend set to none + index.php, admin.php redirect to setup.php + setup.php asks questions (ad/in) + setup.php sends gaasd setup instructions + gaasd checks config + setup.php redirects to admin.php if setup works + + + +Plugins, how they work +so in globalLib you define a message: +define("MSG_STATUS", 18); + +then you define a functional prefix +$MESSAGES[MSG_STATUS] = "gaasStatus"; + +then in gaasClientMessages you define gaasStatus_clientsend($params) where $params is an array of parameters in the function call +this returns a "vals" structure thats sent to "sent" to the server, then gaasStatus_clientrecv(..) which accepts that data back from the server + +then in gaasdMessages.php you define gaasStatus_server(...) which defines a method for handling the data at the server side. + +In code you then call $class->MSG_STATUS(params); + + +$params in clientsend is the arguments sent via MSG_STATUS([0], [1], ...); + +$params is then played with to create a single text variable (such as a serialised data structure) and returned to the gasdclient and sent to the server + +server receives what clientsend returns in _server($params) as $params. + +server then returns its data via a text variable in the return which is then send back to clientrecv($params) as $params; \ No newline at end of file