diff --git a/doc/api.php b/doc/api.php index 5514cf8a39..64e142b482 100644 --- a/doc/api.php +++ b/doc/api.php @@ -3,34 +3,30 @@ require_once("docutil.php"); page_head("The BOINC application programming interface (API)"); echo "
-The BOINC API is a set of C++ functions. +The BOINC API is a set of C functions. Unless otherwise specified, the functions return an integer error code; zero indicates success. -On an error return, the application should exit with that status. -The BOINC graphics API is described separately. +
+BOINC applications may generate graphics, +allowing them to provide a screensaver. +This API is described here. +
+BOINC applications may consist of several programs that are +executed in sequence; +the API for this is described here. +
- int boinc_init(bool is_worker=true); + int boinc_init();before calling other BOINC functions or doing I/O. -
-If is_worker
is true,
-the application will periodically report CPU time and fraction_done to
-the BOINC core client.
-
-An application will detect that it is standalone if it cannot parse -the init data file, or if it cannot setup the shared memory. -A standalone application will function independently of the BOINC core client -(this is useful for testing). -
When the application has completed it must call
- int boinc_finish(int status, is_worker=true); + int boinc_finish(int status);
status
is nonzero if an error was encountered.
-is_worker
is true iff it was true for boinc_init.
This call does not return.
diff --git a/doc/compound_app.php b/doc/compound_app.php index b4374a9781..843ec3cb02 100644 --- a/doc/compound_app.php +++ b/doc/compound_app.php @@ -7,11 +7,11 @@ echo "
-The main program must not call boinc_init() or boinc_finish(). -Its logic is as follows: +The BOINC API provides a number of functions, +and in developing a compound application you must decide +whether these +how these functions are to be divided between +the main and worker programs. +
+struct BOINC_OPTIONS { +}; ++The main program logic is as follows: +
+boinc_init_options(...) read state file for each remaining subsidiary application: boinc_parse_init_data_file() - aip.fraction_done_start = x - aip.fraction_done_end = y + aid.fraction_done_start = x + aid.fraction_done_end = y boinc_write_init_data_file() run the app write state file