lots of coded stuff, the beginnings of the server/client comms bits
[ga4php.git] / doco / pseudo.txt
index 7aa375f..4ab05c3 100644 (file)
@@ -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