Changes between Version 5 and Version 6 of GuiRpc
- Timestamp:
- Jun 30, 2007, 4:16:54 PM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GuiRpc
v5 v6 14 14 === `init(char* host)` === #function-init 15 15 16 Establish RPC connection to the given host 16 Establish RPC connection to the given host. 17 17 18 18 == Dealing with versions == … … 20 20 The 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: 21 21 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`. 24 24 * Use the client version number to decide what subsequent RPCs to make (version info is included in the RPC list below). 25 25 26 26 == Authorization == 27 27 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.28 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. 29 29 30 30 === `authorize(char* password)` === #function-authorize 31 Do authorization sequence with the peer, using given password 31 Do authorization sequence with the peer, using given password. 32 32 33 33 == 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.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 [#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. 35 35 36 36 {{{ … … 67 67 === `get_results(RESULTS&)` === #function-get_results 68 68 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.69 Get 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. 70 70 71 71 === `get_screensaver_mode(int& status)` === #function-get_screensaver_mode 72 72 73 Return screensaver mode (values listed in ss_logic.h) 73 Return 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 }}} 74 77 75 78 === `set_screensaver_mode``(bool enabled, ``double blank_time, ``DISPLAY_INFO&)` === #function-set_screensaver_mode 76 79 77 If enabled is true, the core client should try to get an application to provide screensaver graphics. Blank screen after blank_timeseconds.80 If `enabled` is `true`, the core client should try to get an application to provide screensaver graphics. Blank screen after `blank_time` seconds. 78 81 79 82 === `get_file_transfers(FILE_TRANSFERS&)` === #function-get_file_transfers 80 83 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.84 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 [#function-get_state get_state()] again. 82 85 83 86 === `get_simple_gui_info(SIMPLE_GUI_INFO&)` === #function-get_simple_gui_info … … 95 98 === `get_proxy_settings(PROXY_INFO&)` === #function-get_proxy_settings 96 99 97 Get proxy settings 100 Get proxy settings. 98 101 99 102 === `get_activity_state(ACTIVITY_STATE&)` === #function-get_activity_state 100 103 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.104 Return 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. 102 105 103 106 === `get_messages(int seqno, MESSAGES&)` === #function-get_messages 104 107 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.108 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. 106 109 107 110 === `get_host_info(HOST_INFO&)` === #function-get_host_info 108 111 109 Get information about host hardware and usage 112 Get information about host hardware and usage. 110 113 111 114 === `get_statistics(PROJECTS&)` === #function-get_statistics 112 115 113 Get information about project credit history (the PROJECT::statistics field is populated)116 Get information about project credit history (the `PROJECT::statistics` field is populated). 114 117 115 118 === `network_status(int&)` === #function-network_status 116 119 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.120 Find 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. 118 121 119 122 === `get_newer_versions(std::string&)` === #function-get_newer_versions … … 121 124 Get a string describing newer versions of the core client, if any. 122 125 126 ---- 127 123 128 The following operations require authentication for both local and remote clients: 124 129 125 130 === `show_graphics(char* result_name, bool full_screen)` === #function-show_graphics 126 131 127 Request that the application processing the given result create a graphics window 132 Request that the application processing the given result create a graphics window. 128 133 129 134 === `project_op(PROJECT&, char* op)` === #function-project_op 130 135 131 Perform a control operation on the given project. opis one of "suspend", "resume", "reset", "detach", or "update".136 Perform a control operation on the given project. `op` is one of "suspend", "resume", "reset", "detach", or "update". 132 137 133 138 === `project_attach(``char* url, ``char* account_id, ``bool use_config_file)` === #function-project_attach 134 139 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.xmlfile.140 Attach 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. 136 141 137 142 === `set_run_mode(int mode, double duration)` === #function-set_run_mode … … 145 150 === `run_benchmarks()` === #function-run_benchmarks 146 151 147 Run benchmarks 152 Run benchmarks. 148 153 149 154 === `set_proxy_settings(PROXY_INFO&)` === #function-set_proxy_settings 150 155 151 Set proxy settings 156 Set proxy settings. 152 157 153 158 === `network_available()` === #function-network_available … … 157 162 === `file_transfer_op(FILE_TRANSFER&, char* op)` === #function-file_transfer_op 158 163 159 Perform a control operation on a file transfer. opis one of "abort" or "retry".164 Perform a control operation on a file transfer. `op` is one of "abort" or "retry". 160 165 161 166 === `result_op(FILE_TRANSFER&, char* op)` === #function-result_op 162 167 163 Perform a control operation on an active result. opis one of "suspend", "resume", or "abort".168 Perform a control operation on an active result. `op` is one of "suspend", "resume", or "abort". 164 169 165 170 === `quit()` === #function-quit … … 169 174 === `acct_mgr_rpc(``const char* url, ``const char* name, ``const char* passwd, ``bool use_cached_credentials)` === #function-acct_mgr_rpc 170 175 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 URLis the empty string, remove account manager info from disk.176 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 [#function-acct_mgr_info acct_mgr_info()]). If `url` is the empty string, remove account manager info from disk. 172 177 173 178 === `acct_mgr_info(ACCT_MGR_INFO&)` === #function-acct_mgr_info … … 177 182 === `read_global_prefs_override()` === #function-read_global_prefs_override 178 183 179 Tells the core client to reread the 'global_prefs_override.xml'file, modifying the global preferences according to its contents.184 Tells the core client to reread the [PrefsOverride global_prefs_override.xml] file, modifying the global preferences according to its contents. 180 185 181 186 === `get_global_prefs_override(std::string&)` === #function-get_global_prefs_override 182 187 183 Reads the contents of the global preferences overridefile into the given string. Return an error code if the file is not present.188 Reads the contents of the global [PrefsOverride preferences override] file into the given string. Return an error code if the file is not present. 184 189 185 190 === `set_global_prefs_override(std::string&)` === #function-set_global_prefs_override 186 191 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.192 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. 188 193 189 194 === `get_global_prefs_override_struct(GLOBAL_PREFS&)` === #function-get_global_prefs_override_struct … … 192 197 193 198 === `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 200 Convert the given structure to XML and write it to the global [PrefsOverride preferences override] file. 195 201 196 202 === `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 204 Set 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