Changes between Version 5 and Version 6 of GuiRpc


Ignore:
Timestamp:
Jun 30, 2007, 4:16:54 PM (17 years ago)
Author:
Nicolas
Comment:

Added lots of links, changed formatting.

Legend:

Unmodified
Added
Removed
Modified
  • GuiRpc

    v5 v6  
    1414=== `init(char* host)` === #function-init
    1515
    16 Establish RPC connection to the given host
     16Establish RPC connection to the given host.
    1717
    1818== Dealing with versions ==
     
    2020The GUI RPC protocol changes over time. If you're writing a GUI program that needs to communicate with older versions of the BOINC core client, here's what to do:
    2121
    22     * Create a GUI_RPC object and connect. Call exchange_versions() to get the client version.
    23     * If exchange_versions() fails (it's not supported in pre-5.6 clients) do a get_state() RPC, and get the client version from CC_STATE::version_info.
     22    * Create a `GUI_RPC` object and connect. Call [#function-exchange_versions exchange_versions()] to get the client version.
     23    * If [#function-exchange_versions exchange_versions()] fails (it's not supported in pre-5.6 clients) do a [#function-get_state get_state()] RPC, and get the client version from `CC_STATE::version_info`.
    2424    * Use the client version number to decide what subsequent RPCs to make (version info is included in the RPC list below).
    2525
    2626== Authorization ==
    2727
    28 GUI RPC authorization is described here. The RPC protocol allows the GUI program to authenticate itself using a password. Some of the RPC operations can be done without authentication; others can be done without authentication, but only by a GUI program running on the same machine.
     28The RPC protocol allows the GUI program to authenticate itself using a password. Some of the RPC operations can be done without authentication; others can be done without authentication, but only by a GUI program running on the same machine.
    2929
    3030=== `authorize(char* password)` === #function-authorize
    31 Do authorization sequence with the peer, using given password
     31Do authorization sequence with the peer, using given password.
    3232
    3333== RPC list ==
    34 The following functions require authorization for remote clients, but not for local clients. Note: for core client versions 5.5.12 and earlier, all functions except get_state(), get_results(), get_screensaver_mode(), and set_screensaver_mode() require authorization.
     34The following functions require authorization for remote clients, but not for local clients. Note: for core client versions 5.5.12 and earlier, all functions except [#function-get_state get_state()], [#function-get_results get_results()], [#function-get_screensaver_mode get_screensaver_mode()], and [#function-set_screensaver_mode set_screensaver_mode()] require authorization.
    3535
    3636{{{
     
    6767=== `get_results(RESULTS&)` === #function-get_results
    6868
    69 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.
     69Get a list of [JobOut 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 [#function-get_state get_state()] again.
    7070
    7171=== `get_screensaver_mode(int& status)` === #function-get_screensaver_mode
    7272
    73 Return screensaver mode (values listed in ss_logic.h)
     73Return screensaver mode (values are listed in ss_logic.h).
     74{{{
     75#!comment Uh, no they're not. I don't see any values listed in that file.
     76}}}
    7477
    7578=== `set_screensaver_mode``(bool enabled, ``double blank_time, ``DISPLAY_INFO&)` === #function-set_screensaver_mode
    7679
    77 If enabled is true, the core client should try to get an application to provide screensaver graphics. Blank screen after blank_time seconds.
     80If `enabled` is `true`, the core client should try to get an application to provide screensaver graphics. Blank screen after `blank_time` seconds.
    7881
    7982=== `get_file_transfers(FILE_TRANSFERS&)` === #function-get_file_transfers
    8083
    81 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 the current state; if it's not there, call get_state() again.
     84Get 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 the current state; if it's not there, call [#function-get_state get_state()] again.
    8285
    8386=== `get_simple_gui_info(SIMPLE_GUI_INFO&)` === #function-get_simple_gui_info
     
    9598=== `get_proxy_settings(PROXY_INFO&)` === #function-get_proxy_settings
    9699
    97 Get proxy settings
     100Get proxy settings.
    98101
    99102=== `get_activity_state(ACTIVITY_STATE&)` === #function-get_activity_state
    100103
    101 Return bitmap of reasons why computation and network are suspended. Deprecated - for 5.5.13 and later, use cc_status() instead. In 5.5.10 and earlier, it returns bool (suspended) rather than bitmap.
     104Return bitmap of reasons why computation and network are suspended. '''Deprecated''' - for 5.5.13 and later, use [#function-cc_status cc_status()] instead. In 5.5.10 and earlier, it returns a `bool` (suspended) rather than bitmap.
    102105
    103106=== `get_messages(int seqno, MESSAGES&)` === #function-get_messages
    104107
    105 Returns a list of messages to be displayed to the user. Each message has a sequence number (1, 2, ...), a priority (1=informational, 2=error) and a timestamp. The RPC requests the messages with sequence numbers greater than 'seqno', in order of increasing sequence number.
     108Returns a list of messages to be displayed to the user. Each message has a sequence number (1, 2, ...), a priority (1=informational, 2=error) and a timestamp. The RPC requests the messages with sequence numbers greater than `seqno`, in order of increasing sequence number.
    106109
    107110=== `get_host_info(HOST_INFO&)` === #function-get_host_info
    108111
    109 Get information about host hardware and usage
     112Get information about host hardware and usage.
    110113
    111114=== `get_statistics(PROJECTS&)` === #function-get_statistics
    112115
    113 Get information about project credit history (the PROJECT::statistics field is populated)
     116Get information about project credit history (the `PROJECT::statistics` field is populated).
    114117
    115118=== `network_status(int&)` === #function-network_status
    116119
    117 Find whether the core client has, needs, or is done with a physical network connection. Deprecated - for 5.5.13 and later, use cc_status() instead.
     120Find whether the core client has, needs, or is done with a physical network connection. Deprecated - for 5.5.13 and later, use [#function-cc_status cc_status()] instead.
    118121
    119122=== `get_newer_versions(std::string&)` === #function-get_newer_versions
     
    121124Get a string describing newer versions of the core client, if any.
    122125
     126----
     127
    123128The following operations require authentication for both local and remote clients:
    124129
    125130=== `show_graphics(char* result_name, bool full_screen)` === #function-show_graphics
    126131
    127 Request that the application processing the given result create a graphics window
     132Request that the application processing the given result create a graphics window.
    128133
    129134=== `project_op(PROJECT&, char* op)` === #function-project_op
    130135
    131 Perform a control operation on the given project. op is one of "suspend", "resume", "reset", "detach", or "update".
     136Perform a control operation on the given project. `op` is one of "suspend", "resume", "reset", "detach", or "update".
    132137
    133138=== `project_attach(``char* url, ``char* account_id, ``bool use_config_file)` === #function-project_attach
    134139
    135 Attach to the given project. If 'use_config_file' is true, use the project URL (and account key, if present) in the project_init.xml file.
     140Attach to the given project. If `use_config_file` is true, use the project URL (and account key, if present) in the [ClientStartup project_init.xml] file.
    136141
    137142=== `set_run_mode(int mode, double duration)` === #function-set_run_mode
     
    145150=== `run_benchmarks()` === #function-run_benchmarks
    146151
    147 Run benchmarks
     152Run benchmarks.
    148153
    149154=== `set_proxy_settings(PROXY_INFO&)` === #function-set_proxy_settings
    150155
    151 Set proxy settings
     156Set proxy settings.
    152157
    153158=== `network_available()` === #function-network_available
     
    157162=== `file_transfer_op(FILE_TRANSFER&, char* op)` === #function-file_transfer_op
    158163
    159 Perform a control operation on a file transfer. op is one of "abort" or "retry".
     164Perform a control operation on a file transfer. `op` is one of "abort" or "retry".
    160165
    161166=== `result_op(FILE_TRANSFER&, char* op)` === #function-result_op
    162167
    163 Perform a control operation on an active result. op is one of "suspend", "resume", or "abort".
     168Perform a control operation on an active result. `op` is one of "suspend", "resume", or "abort".
    164169
    165170=== `quit()` === #function-quit
     
    169174=== `acct_mgr_rpc(``const char* url, ``const char* name, ``const char* passwd, ``bool use_cached_credentials)` === #function-acct_mgr_rpc
    170175
    171 Do an Account Manager RPC to the given URL, passing the given name/password. If use_cached_credentials is true, then the existing url, username, and password are used and the core client updates the project information from the account manager. If the RPC is successful, save the account info on disk (it can be retrieved later using acct_mgr_info(), see below). If URL is the empty string, remove account manager info from disk.
     176Do an Account Manager RPC to the given URL, passing the given name/password. If `use_cached_credentials` is true, then the existing URL, username, and password are used and the core client updates the project information from the account manager. If the RPC is successful, save the account info on disk (it can be retrieved later using [#function-acct_mgr_info acct_mgr_info()]). If `url` is the empty string, remove account manager info from disk.
    172177
    173178=== `acct_mgr_info(ACCT_MGR_INFO&)` === #function-acct_mgr_info
     
    177182=== `read_global_prefs_override()` === #function-read_global_prefs_override
    178183
    179 Tells the core client to reread the 'global_prefs_override.xml' file, modifying the global preferences according to its contents.
     184Tells the core client to reread the [PrefsOverride global_prefs_override.xml] file, modifying the global preferences according to its contents.
    180185
    181186=== `get_global_prefs_override(std::string&)` === #function-get_global_prefs_override
    182187
    183 Reads the contents of the global preferences override file into the given string. Return an error code if the file is not present.
     188Reads the contents of the global [PrefsOverride preferences override] file into the given string. Return an error code if the file is not present.
    184189
    185190=== `set_global_prefs_override(std::string&)` === #function-set_global_prefs_override
    186191
    187 Write the given contents to the global preferences override file. If the argument is an empty string, delete the file. Otherwise the argument must be a valid <global_preferences> element.
     192Write the given contents to the global preferences override file. If the argument is an empty string, delete the file. Otherwise the argument must be a valid `<global_preferences>` element.
    188193
    189194=== `get_global_prefs_override_struct(GLOBAL_PREFS&)` === #function-get_global_prefs_override_struct
     
    192197
    193198=== `set_global_prefs_override_struct(GLOBAL_PREFS&)` === #function-set_global_prefs_override_struct
    194 Convert the given structure to XML and write it to the global preferences override file.
     199
     200Convert the given structure to XML and write it to the global [PrefsOverride preferences override] file.
    195201
    196202=== `set_debts(std::vector<PROJECT>)` === #function-set_debts
    197 Set the short- and long-term debts of the given projects
    198 (only the master_url, short_term_debt, and long_term_debt fields
    199 are used in the PROJECT structs).
    200 
     203
     204Set the short- and long-term debts of the given projects (only the `master_url`, `short_term_debt`, and `long_term_debt` fields are used in the `PROJECT` structs).
     205