// thie file defines the messages sent too and from the gaas client.
function gaasStatus_clientsend($params)
{
- return $params[0];
+ return $params;
}
function gaasStatus_clientrecv($params)
// IN: "IN", "user", "pass"
function gaasInitServer_clientsend($params)
{
- echo "backend:\n";
- print_r($params);
- echo "\n";
$msg["backend"] = $params[0];
$msg["user"] = $params[1];
$msg["pass"] = $params[2];
}
// pretty simple, it either works or doesnt, we just pass on the result
+// im leaving this function here as an example of how you deal
+// with data coming back from the server but prior to returning
+// to the client. if it just returns the data back to the client
+// you doing have to define a recving function
function gaasInitServer_clientrecv($params)
{
- echo "in recv, params\n";
- print_r($params);
- echo "\n";
return $params;
}
function gaasSetADLogin_clientsend($params)
{
+ $msg["domain"] = $params[2];
+ $msg["user"] = $params[0];
+ $msg["pass"] = $params[1];
+
+ return $msg;
+}
+
+function gaasSetClientGroup_clientsend($params)
+{
+ $msg["clientgroup"] = $params[0];
+ return $msg;
+}
+
+function gaasSetAdminGroup_clientsend($params)
+{
+ $msg["admingroup"] = $params[0];
+ return $msg;
+}
+
+function gaasProvisionUser_clientsend($params)
+{
+ $msg["username"] = $params[0];
+ return $msg;
+}
+
+function gaasGetUsers_clientsend($params)
+{
+ $msg["havetokens"] = false;
+ $msg["userpattern"] = "";
+ $msg["group"] = "client";
+ if(isset($params[0])) {
+ if($params[0] == "admin") {
+ $msg["group"] = "admin";
+ }
+ }
+ if(isset($params[1])) {
+ $msg["userpattern"] = $params[1];
+ }
+ if(isset($params[2])) {
+ if($params[2] == "yes") {
+ $msg["havetokens"] = true;
+ }
+ }
+ return $msg;
}
-function gaasSetADLogin_clientrecv($params)
+
+function gaasDeleteUser_clientsend($params)
{
+ $msg["username"] = $params[0];
+ return $msg;
}
?>
\ No newline at end of file