2004-06-09 19:09:16 +00:00
|
|
|
<?php
|
2004-02-09 05:11:05 +00:00
|
|
|
require_once("docutil.php");
|
|
|
|
page_head("Framework for separate GUIs");
|
|
|
|
echo "
|
|
|
|
<p>
|
2004-02-28 19:11:40 +00:00
|
|
|
The BOINC core client provides a set of RPCs
|
|
|
|
(remote procedure calls) for control and state interrogation.
|
|
|
|
This will enable the development of GUI (graphical user interface)
|
|
|
|
programs separately from the core client.
|
|
|
|
This will make it easier to develop new GUIs,
|
2004-02-09 05:11:05 +00:00
|
|
|
and will eliminate security issues related
|
|
|
|
to having GUI code in the core client.
|
2004-07-13 23:51:09 +00:00
|
|
|
<p>
|
2004-07-21 21:30:25 +00:00
|
|
|
BOINC provides a C++ interface to these RPCs.
|
|
|
|
The interface is based on the GUI_RPC class,
|
|
|
|
which provides the following functions
|
|
|
|
(the program <code>gui_test.C</code> gives an example of their use):
|
2004-02-09 05:11:05 +00:00
|
|
|
<p>
|
2004-02-28 19:11:40 +00:00
|
|
|
";
|
|
|
|
list_start();
|
2004-07-21 21:30:25 +00:00
|
|
|
list_heading("function ", "description");
|
2004-09-05 18:46:19 +00:00
|
|
|
list_item_func(
|
|
|
|
"init(char* host)",
|
|
|
|
"Establish RPC connection to the given host"
|
|
|
|
);
|
|
|
|
list_item_func(
|
|
|
|
"get_state(CC_STATE&)",
|
2004-07-21 21:30:25 +00:00
|
|
|
"Get the core client's 'static' state,
|
|
|
|
i.e. its projects, apps, app_versions, workunits and results.
|
|
|
|
This call is relatively slow and should only
|
|
|
|
be done initially, and when needed later (see below).
|
|
|
|
"
|
2004-02-28 19:11:40 +00:00
|
|
|
);
|
2004-09-05 18:46:19 +00:00
|
|
|
list_item_func(
|
|
|
|
"get_results(RESULTS&)",
|
2004-07-21 21:30:25 +00:00
|
|
|
"Get a list of results.
|
|
|
|
Those that are in progress will have information
|
|
|
|
such as CPU time and fraction done.
|
|
|
|
Each result includes a name;
|
|
|
|
use CC_STATE::lookup_result() to find this result in
|
|
|
|
the current static state;
|
|
|
|
if it's not there, call get_state() again.
|
|
|
|
"
|
|
|
|
);
|
2004-09-05 18:46:19 +00:00
|
|
|
list_item_func(
|
|
|
|
"get_file_transfers(FILE_TRANSFERS&)",
|
2004-07-21 21:30:25 +00:00
|
|
|
"Get a list of file transfers in progress.
|
|
|
|
Each is linked by name to a project;
|
|
|
|
use CC_STATE::lookup_project() to find this project in
|
2004-09-05 18:46:19 +00:00
|
|
|
the current state;
|
2004-07-21 21:30:25 +00:00
|
|
|
if it's not there, call get_state() again."
|
|
|
|
);
|
2004-09-05 18:46:19 +00:00
|
|
|
list_item_func(
|
|
|
|
"get_project_status(vector<PROJECT>&)",
|
|
|
|
"Get a list of projects, with only basic fields filled in."
|
2004-06-17 17:00:14 +00:00
|
|
|
);
|
2004-09-05 18:46:19 +00:00
|
|
|
list_item_func(
|
|
|
|
"get_disk_usage(vector<PROJECT>&)",
|
|
|
|
"Get a list of projects, with disk usage fields filled in."
|
|
|
|
);
|
|
|
|
list_item_func(
|
2004-07-21 21:30:25 +00:00
|
|
|
"show_graphics(char* result_name, bool full_screen)",
|
2004-02-28 19:11:40 +00:00
|
|
|
"Request that the application processing the given result
|
|
|
|
create a graphics window"
|
|
|
|
);
|
2004-09-05 18:46:19 +00:00
|
|
|
list_item_func(
|
2004-07-21 21:30:25 +00:00
|
|
|
"project_reset(char* url)",
|
2004-02-28 19:11:40 +00:00
|
|
|
"Reset the given project"
|
|
|
|
);
|
2004-09-05 18:46:19 +00:00
|
|
|
list_item_func(
|
|
|
|
"project_attach(char* url, char* account_id)",
|
|
|
|
"Attach to the given project"
|
2004-02-28 19:11:40 +00:00
|
|
|
);
|
2004-09-05 18:46:19 +00:00
|
|
|
list_item_func(
|
2004-07-21 21:30:25 +00:00
|
|
|
"project_detach(char* url)",
|
2004-02-28 19:11:40 +00:00
|
|
|
"Detach from the given project"
|
|
|
|
);
|
2004-09-05 18:46:19 +00:00
|
|
|
list_item_func(
|
|
|
|
"project_update(char* url)",
|
|
|
|
"Update the given project"
|
|
|
|
);
|
|
|
|
list_item_func(
|
|
|
|
"set_run_mode(int mode)",
|
|
|
|
"Set the run mode (never/auto/always)."
|
|
|
|
);
|
|
|
|
list_item_func(
|
2004-09-21 19:58:30 +00:00
|
|
|
"get_run_mode(int& mode)",
|
2004-09-05 18:46:19 +00:00
|
|
|
"Get the run mode (never/auto/always)."
|
2004-02-28 19:11:40 +00:00
|
|
|
);
|
2004-09-05 18:46:19 +00:00
|
|
|
list_item_func(
|
|
|
|
"set_network_mode(int mode)",
|
|
|
|
"Set the network mode (never/auto/always)."
|
|
|
|
);
|
|
|
|
list_item_func(
|
2004-07-21 21:30:25 +00:00
|
|
|
"run_benchmarks()",
|
2004-02-28 19:11:40 +00:00
|
|
|
"Run benchmarks"
|
|
|
|
);
|
2004-09-05 18:46:19 +00:00
|
|
|
list_item_func(
|
2004-07-21 21:30:25 +00:00
|
|
|
"set_proxy_settings(PROXY_INFO&)",
|
2004-02-28 19:11:40 +00:00
|
|
|
"Set proxy settings"
|
|
|
|
);
|
2004-09-05 18:46:19 +00:00
|
|
|
list_item_func(
|
|
|
|
"get_messages(
|
|
|
|
int nmessages,
|
|
|
|
int seqno,
|
|
|
|
vector<MESSAGE_DESC>&
|
|
|
|
)",
|
|
|
|
"Returns a list of (user-level) messages.
|
|
|
|
Each message has a sequence number (1, 2, ...),
|
|
|
|
a priority (1=informational, 2=error)
|
|
|
|
and a timestamp.
|
|
|
|
The RPC requests the N most recent messages
|
|
|
|
with sequence numbers greater than M.
|
|
|
|
They are returned in order of decreasing sequence number."
|
|
|
|
);
|
|
|
|
list_item_func(
|
|
|
|
"retry_file_transfer(FILE_TRANSFER&)",
|
|
|
|
"Retry file transfer"
|
|
|
|
);
|
2004-02-28 19:11:40 +00:00
|
|
|
list_end();
|
|
|
|
echo "
|
2004-02-09 05:11:05 +00:00
|
|
|
<p>
|
2004-07-21 21:30:25 +00:00
|
|
|
The RPC mechanism uses XML requests and replies.
|
|
|
|
It should be easy fairly easy to generate client
|
|
|
|
interfaces in languages other than C++.
|
|
|
|
GUI programs connect to the core client by opening a TCP socket at port 31416.
|
|
|
|
They can then do repeated RPCs over this connection.
|
|
|
|
Each reply message ends with the character '\\003.
|
2004-02-09 05:11:05 +00:00
|
|
|
";
|
|
|
|
page_tail();
|
|
|
|
?>
|