. // RPC handler for getting the status of one or more results // args: // ids=id1,id2... // or // names = name1,name2,... require_once("../inc/util.inc"); require_once("../inc/xml.inc"); function result_xml($r) { echo " $r->id $r->create_time $r->workunitid $r->server_state $r->outcome $r->client_state $r->hostid $r->userid $r->report_deadline $r->sent_time $r->received_time $r->name $r->cpu_time $r->batch $r->file_delete_state $r->validate_state $r->granted_credit $r->app_version_num $r->appid $r->exit_status $r->elapsed_time $r->flops_estimate $r->peak_working_set_size $r->peak_swap_size $r->peak_disk_usage "; } BoincDb::get(true); // read-only; use replica DB if possible xml_header(); echo "\n"; $ids = get_str("ids", true); if ($ids) { $ids = explode(",", $ids); foreach ($ids as $id) { $result = BoincResult::lookup_id($id); if ($result) { result_xml($result); } else { echo "ID $id unknown\n"; } } } else { $names = get_str("names", true); $names = explode(",", $names); foreach ($names as $name) { $result = BoincResult::lookup_name($name); if ($result) { result_xml($result); } else { echo "name $name unknown\n"; } } } echo "\n"; ?>